26dde108184b66ffc617563d96602e381b193b60
[fw/sdcc] / ChangeLog
1 2006-04-11 Raphael Neider <rneider AT web.de>
2
3         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
4         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
5         * src/pic16/pcode.c (assignValnums): fixed #1460578
6
7 2006-04-11 Raphael Neider <rneider AT web.de>
8
9         * device/lib/pic/libdev/*.c,
10         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
11           fixes #1468739, enables compilation in --std-c99 mode
12         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
13
14 2006-04-11 Raphael Neider <rneider AT web.de>
15
16         * src/pic/device.c (find_device): removed debug output
17           (list_valid_pics): enabled verbose listing of supported devices
18         * device/include/stdbool.h: define bool as char for pic14/16 as well
19
20 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
21
22         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
23
24 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
25
26         * .version: bumped version to 2.5.6
27         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
28
29 2006-04-06 Raphael Neider <rneider AT web.de>
30
31         * .version: bumped version to 2.5.6 (pic14 ABI changed)
32         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
33         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
34           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
35             pic14_constructAbsMap
36           (pic14printPublics): declare absolute global symbols as global
37           (pic14createInterruptVect),
38         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
39           (newReg): assume new registers unused, use correct name in
40             hashtable (reg->name instead of name), more debugLog output
41         * src/pic/device.h (PIC_device): added fields for verbose output
42         * src/pic/device.c: moved device definition to pic14devices.txt,
43             added routines for runtime parsing of pic14devices.txt,
44             added support for second config word
45         * src/pic/main.c (_process_pragma): removed #pragma maxram,
46           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
47           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
48           (_pic14_parseOptions): moved pCodeInitRegisters here
49           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
50         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
51           (pCodeInitRegisters): rewrapped comments, perpared new approach to
52             handling the pseudo stack
53         * device/lib/Makefile.in: ignore failures in objects-pic16,
54         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
55         * device/lib/pic/NEWS: document new dependency on picXXX.lib
56         * device/lib/pic/Makefile.subdir,
57         * device/lib/pic16/Makefile.subdir: improved clean rules
58         * device/lib/pic/libdev/: NEW, pic14 device libraries
59         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
60         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
61         * device/include/Makefile.in: create subdir and install pic14 headers
62         * device/include/pic/p16f_common.inc: removed unused declarations
63         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
64             PICs from inc2h.pl v1.6,
65             replaced BIT_AT macros with struct declarations
66         * device/include/pic/pic14devices.txt: definition of supported devices,
67             all above improvements contributed by Zik Saleeba, thanks
68         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
69         * support/scripts/sdcc.nsi: also install pic14 device libraries and
70             headers
71
72 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
73
74         * device/include/mcs51/c8051f410.h: added interrupt numbers,
75         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
76           thanks to Charles Olds
77
78 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
79
80         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
81
82 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
83
84         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
85         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
86         * support/regression/bug1464657.c: added, new test
87
88 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
89
90         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
91           version number
92
93 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
94
95         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
96           --no-peep and --peep-file <file> are used don't use default rules but
97           do use the <file>
98
99 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
100
101         * src/mcs51/gen.c (genCall): fixed bug 1457608
102
103 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
104
105         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
106         changes seem to cause (trigger?) problems with the build system.
107
108 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
109
110         * src/SDCCpeeph.c (operandsLiteral): new, added,
111           (callFuncByName): inserted operandsLiteral
112         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
113
114 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
115
116         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
117         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
118
119 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
120
121         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
122           implemented patch 1120823 Thanks to Willy De la Court (normal
123           interrupts need an interrupt number now if they are made critical),
124           and enabled nesting of critical functions though not for gbz80
125           (genCritical, genEndCritical): added functions
126           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
127         * src/z80/mappings.i: added "ei" to all mappings
128
129 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
130
131         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
132         submitted by the Debian SDCC maintainer Aurelien Jarno:
133         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
134         archive with gcc 4.1 on mips and wrote the patch"
135
136 2006-03-16 Raphael Neider <rneider AT web.de>
137
138         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
139           the left operand is shorter than the result (c* = lit-c* + int),
140           fixes bug #1450796
141         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
142           OP_SYMBOL
143
144 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
145
146         * src/.version: increased version number to 2.5.5
147         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
148         linking is done manually in pic16 port's _linkEdit,
149         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
150         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
151         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
152         allocate asmop as AOP_ACC,
153         (aopForRemat): added parameter 'bool result' in function declaration,
154         (pic16_aopGet): return AOP_ACC when accessing WREG,
155         (pic16_popGetTempReg): minor modification,
156         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
157         'pic16_allocWithIdx',
158         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
159         calling function in absolute addresses,
160         (genAssign): take into account AOP_ACC asmop,
161         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
162         * src/pic16/pcoderegs.c: some debug functions and lines added,
163         * src/pic16/ralloc.c (decodeRegType): added but commented out,
164         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
165         register too,
166         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
167         call to allocReg, not by manually allocating a new one,
168         (pic16_assignRegisters): now before going through the register
169         allocating functions mark all registers as free. This eliminates some
170         side effects resulting from peephole parser done earlier in the backbone
171
172 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
173
174         * src/SDCCicode.c (geniCodeLogic),
175         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
176
177 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
178
179         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
180           (genSend): bugfix, do not allocate and free twice,
181           (shiftRLong): handle partially overlapping aops
182         * support/regression/tests/bitopcse.c: fixed warning redefined idata
183
184 2006-03-08 Borut Razem <borut.razem AT siol.net>
185
186         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
187           for pic16
188
189 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
190
191         * support/regression/tests/bug1409955.c: new, added
192         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
193         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
194           (aopForSym, aopOp): increment asmop.allocated if reused,
195           (freeAsmop): decrement asmop.allocated and check for zero instead of
196           using asmop.freed,
197           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
198           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
199            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
200            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
201            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
202            genSignedRightShift, genRightShift, genDataPointerGet,
203            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
204            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
205             in reverse order from allocation,
206           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
207             added swappedLR to keep track
208         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
209           pdata & code for GCC, z80, gbz80 & hc08
210         * support/regression/tests/zeropad.c: moved defines to testfwk.h
211
212 2006-03-08 Raphael Neider <rneider AT web.de>
213
214         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
215
216 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
217
218         * device/include/mcs51/c8051f410.h: new SiLabs mcu
219         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
220         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
221
222 2006-03-06 Borut Razem <borut.razem AT siol.net>
223
224         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
225           made the linker quiet
226
227 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
228
229         * src/pic16/gen.c (genPcall): fixed bug #1443644
230         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
231         which dumps before the function entry point a data byte which represents
232         the number of the local variables used by the specified function, added
233         'xinst' for initial support for Extended Instruction Support,
234         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
235         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
236         port->fun_prefix anymore (may change later),
237         (genFunction, genEndFunction): do not store/restore local registers for
238         _main (this should take care the --main-return command line option in
239         the future),
240         (genOr): removed some legacy pic-port instructions,
241         * src/pic16/genarith.c (genAddLit): re-enabled old code because
242         performing operations with SFR's causes data to be written more than
243         once to each SFR. Perhaps SFRs should be handled in special cases...
244         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
245         pcode.h
246         * src/pic16/main.c (_process_pragma): stack bound checking did not take
247         into account for stack starting position,
248         (struct OPTIONS pic16_optionsTable): added command line argument
249         --extended or -y for Extended Instruction Support,
250         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
251         (deassignLRs): *** perhaps the most important change, old 'for' code
252         (commented out for reference), didn't account for some registers which
253         were left marked 'not free' after a pointer operation. The change
254         reduces register usage a lot in some cases
255
256 2006-03-04 Borut Razem <borut.razem AT siol.net>
257
258         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
259           _clean
260         * support/regression/tests/bug-524697.c: decreased array size for
261           mcs51 to fit into the internal RAM
262         * support/regression/Makefile.in: a little bit more verbose
263
264 2006-03-03 Borut Razem <borut.razem AT siol.net>
265
266         * support/regression/fwk/lib/testfwk.c,
267           support/regression/fwk/include/testfwk.h: introduced function
268           _prints(), nonrecursive _printn(), call _initEmu() from main()
269         * support/regression/ports/gbz80/support.asm,
270           support/regression/ports/ucz80/support.asm,
271           support/regression/ports/z80/support.asm,
272           support/regression/ports/ds390/support.c,
273           support/regression/ports/hc08/support.c,
274           support/regression/ports/host/support.c,
275           support/regression/ports/mcs51/support.c,
276           support/regression/ports/xa51/support.c: added empty _initEmu()
277           function
278         * support/regression/ports/pic16/gpsim.cmd,
279           support/regression/ports/pic16/spec.mk,
280           support/regression/ports/pic16/support.c,
281           support/regression/Makefile.in: added pic16 regression test
282
283 2006-03-01 Raphael Neider <rneider AT web.de>
284
285         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
286           genConstPointerGet): use safe way of generating MOVFF to cover
287             literals as well as registers, fixes bug #1440527
288         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
289             dereference
290           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
291             more correctly, fixes bug #1232186
292           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
293         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
294             gplink guess the correct processor in more cases, applied patch
295             from Till Riedel attached to and fixing bug #1436552
296
297 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
298
299         * support/regression/tests/array.c: added, contains check for #1434401
300         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
301
302 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
303
304         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
305         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
306         * device/include/mcs51/c8051f326.h,
307         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
308         * device/include/mcs51/c8051f000.h,
309         * device/include/mcs51/c8051f018.h,
310         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
311           PCON_IDLE,PCON_STOP and added sfr16 definitions
312
313 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
314
315         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
316           genGetWord): fixed bug 1409955
317
318 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
319
320         * device/include/hc08/mc68hc908gp32.h,
321         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
322
323 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
324
325         * src/SDCCast.c (constExprValue): return NULL if not a value
326         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
327         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
328         * support/regression/tests/bitfields.c: enabled signed bitfield for all
329
330 2006-02-13 Borut Razem <borut.razem AT siol.net>
331
332         * src/regression/ptrarg.c: added, fails due to bug #1430967
333         * src/regression/Makefile: ptrarg.c added, ...
334
335 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
336
337         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
338         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
339
340 2006-02-11 Borut Razem <borut.razem AT siol.net>
341
342         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
343           print "Processor: xxx" message to stdout only if --verbose
344
345 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
346
347         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
348         * support/regression/tests/bug1426356.c: added
349         * support/regression/tests/bitfields.c: removed 2 tests
350
351 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
352
353         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
354         * device/include/mcs51/c8051f330.h,
355         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
356           PCON_IDLE,PCON_STOP and added sfr16 definitions
357         * device/lib/_divsint.c,
358         * device/lib/_divuint.c,
359         * device/lib/_divulong.c,
360         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
361           register bank bug for small stackauto
362
363 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
364
365         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
366
367 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
368
369         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
370         * all.dsp: corrected several bin paths
371         * device/include/mcs51/c8051f120.h,
372         * device/include/mcs51/c8051f300.h,
373         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
374           to PCON_IDLE,PCON_STOP
375         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
376         * device/lib/printf_large.c (output_float): fixed bug 1388703
377         * support/regression/tests/bug1057979.c: added test for bug 1388703
378
379 2006-02-08 Raphael Neider <rneider AT web.de>
380
381         * src/pic/pcode.c (pciTRIS): fixed typo,
382           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
383           (LinkFlow): fixed handling of flows that end in a call,
384           (ReuseReg): perform safety check earlier
385         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
386             to work with flows at the beginning of a pBlock,
387             fixes #1426557 (Symbol not previously defined),
388           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
389             usage information
390           (RemoveUnusedRegisters): update register usage info
391         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
392             created, reuse existing ones instead
393         * src/pic/gen.c (genPcall): fixed #1424719
394
395 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
396
397         * link/z80/lkmain.c,
398         * link/z80/lklex.c,
399         * link/z80/lkdata.c,
400         * link/z80/aslink.h: fixed build on current cygwin:
401         replaced getline() by lk_getline()
402
403 2006-02-01 Borut Razem <borut.razem AT siol.net>
404
405         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
406           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
407           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
408           src/regression/bool1.c, src/regression/bool2.c,
409           src/regression/bool3.c, src/regression/call1.c,
410           src/regression/compare.c, src/regression/compare10.c,
411           src/regression/compare2.c, src/regression/compare3.c,
412           src/regression/compare4.c, src/regression/compare5.c,
413           src/regression/compare6.c, src/regression/compare7.c,
414           src/regression/compare8.c, src/regression/compare9.c,
415           src/regression/configword.c, src/regression/for.c,
416           src/regression/inline.c, src/regression/mult1.c,
417           src/regression/nestfor.c, src/regression/or1.c,
418           src/regression/pointer1.c, src/regression/ptrfunc.c,
419           src/regression/rotate1.c, src/regression/rotate2.c,
420           src/regression/rotate3.c, src/regression/rotate4.c,
421           src/regression/rotate5.c, src/regression/rotate6.c,
422           src/regression/rotate7.c, src/regression/string1.c,
423           src/regression/struct1.c, src/regression/sub.c,
424           src/regression/sub2.c, src/regression/switch1.c,
425           src/regression/while.c, src/regression/xor.c,
426           src/regression/create_stc, src/regression/simulate,
427           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
428           regression tests
429         * src/regression/gpsim_assert.h: added
430
431 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
432
433         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
434         ((void (code *) (void)) 0) ();
435         * as/hc08/aslex.c,
436         * as/hc08/aslink.h,
437         * as/hc08/asm.h,
438         * as/hc08/asmain.c,
439         * as/hc08/lkdata.c,
440         * as/hc08/lklex.c,
441         * as/hc08/lkmain.c,
442         * as/mcs51/aslex.c,
443         * as/mcs51/aslink.h,
444         * as/mcs51/asm.h,
445         * as/mcs51/asmain.c,
446         * as/mcs51/lkdata.c,
447         * as/mcs51/lklex.c,
448         * as/mcs51/lkmain.c,
449         * as/z80/aslex.c,
450         * as/z80/asm.h,
451         * as/z80/asmain.c: fixed build on current cygwin:
452         replaced getline() by as_getline()
453
454 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
455
456         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
457         declarator in the symbol chain
458         * src/SDCCsymt.h,
459         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
460         parameter list for function pointers
461         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
462         * support/regression/tests/bug-716242.c: added
463
464 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
465
466         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
467         offset if possible
468         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
469
470 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
471
472         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
473         inifinitely recurseable, added static
474         * support/regression/tests/bug-1408066.c: added
475
476 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
477
478         * src/SDCCicode.h,
479         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
480         renamed, added possibility to create "postLoopLbl"-labels
481         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
482         newiTempLoopHeaderLabel
483         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
484         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
485         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
486         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
487         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
488         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
489         (basicInduction): fixed bug #136564, made static,
490         (loopInduction): changed parameter of basicInduction, made static,
491         (addPostLoopBlock): added
492         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
493         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
494         findLoopEndSeq
495         * support/regression/tests/bug-136564.c: added
496         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
497         --std-sdcc99 to LIBSDCCFLAGS
498
499 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
500
501         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
502         while loop
503         * support/regression/tests/bug-1406131.c: added
504
505 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
506
507         * src/SDCCast.c (decorateType): fix promotion of unary minus
508         * src/SDCCsymt.c (computeType): beautified
509         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
510         (valUnaryPM, valComplement): fix sign and promotion,
511         (valNot): ANSI: result type is int (SDCC: unsigned char)
512         * support/regression/tests/uminus.c: speedup by removing superflous
513         test case 'int'
514         * support/regression/tests/onebyte.c: added promotion and signedness
515         tests for unary minus
516         * support/regressions/tests/bug-477927.c: disable warning about
517         uninitialized variables
518         * support/regression/tests/not.c: added
519
520 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
521
522         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
523         * src/mcs51/gen.c (gen51Code): show final register usage after
524         fillGaps in asm with --i-code-in-asm
525         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
526         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
527         incUsed, rliveClear, adjustIChain): made static,
528         (setFromRange): excluded because it's unused,
529         (findPrevUseSym, markWholeLoop): added,
530         (findPrevUse): rewritten; fixes bug 895992; now a complete search
531         through all branches of predecessors enables sdcc to emit the warning
532         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
533         (rlivePoint): made static, added parameter emitWarnings which is only
534         true during the first run out of two,
535         (findRecursiveSucc, findRecursivePred): removed,
536         (computeLiveRanges): made static, added parameter emitWarnings,
537         (dumpIcRlive): added for debugging only
538         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
539         removed prototype of setFromRange()
540         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
541         in call of computeLiveRanges()
542         * support/regression/tests/bug-895992.c: added
543         * support/regression/tests/bug-971834.c: added
544         * support/valdiag/tests/bug-895992.c: added
545         * support/valdiag/tests/bug-971834.c: added
546
547 2005-12-18 Raphael Neider <rneider AT web.de>
548
549         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
550           (genUnpackBits): improved code for direct operands,
551           (genPackBits): improved code for literal assignment to bitfields
552             and for direct destination operands (no FSR indirection),
553             prevented redundant AND, fixes #1362800,
554           (AccLsh): added parameter to disable masking of the result
555         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
556           skip instructions with side-effects (like incfsz),
557           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
558         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
559         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
560           fixes #1375263
561
562 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
563
564         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
565         volatile variables as spill location
566
567 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
568
569         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
570         replacing literals
571         * support/regression/tests/bug-1376320.c: added
572
573 2005-12-08 Raphael Neider <rneider AT web.de>
574
575         * src/pic/device.c: renamed is_shared to pic14_is_shared
576         * src/pic/gen.c (genIfx): re-enabled handling of sbits
577         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
578           (is_valid_identifier): added for above workaround
579
580 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
581
582         * device/lib/Makefile.in: fixed to enable port-specific-objects
583         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
584           char, thanks Hubert Sack
585         * doc/sdccman.lyx: documented --xstack-loc,
586           elaborated a bit more on interrupts and pitfalls,
587           removed "setjmp/longjmp unsupported",
588           documented some unsupported C99 features
589         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
590         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
591           if, thanks Hubert Sack
592         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
593         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
594           make make_library
595         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
596           regression tests can report resource usage (rfe 700441)
597         * support/regression/collate-results.py: report resource usage
598         * support/regression/ports/ds390/spec.mk,
599         * support/regression/ports/hc08/spec.mk,
600         * support/regression/ports/mcs51/spec.mk,
601         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
602         * support/regression/ports/ds390/uCsim.cmd,
603         * support/regression/ports/hc08/uCsim.cmd,
604         * support/regression/ports/mcs51/uCsim.cmd,
605         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
606         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
607           library, use the default one
608         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
609           building the library
610
611 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
612
613         * config.dsp: added dependency on .version and configure_vc.awk
614         * device/include/setjmp.h: updated for --stack-auto and --xstack
615         * device/include/mcs51/at89c51snd1c.h: corrected line endings
616         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
617         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
618         * device/lib/libsdcc.lib: added _setjmp
619         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
620           (decorateType): fixed bug 1372851,
621           (optimizeGetHbit): fixed warning
622         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
623           array initialisation
624         * support/regression/tests/bug1057979.c: added test for bug 1358192
625         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
626
627 2005-12-03 Borut Razem <borut.razem AT siol.net>
628
629         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
630           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
631
632 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
633
634         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
635         createIval): implement symbol independant "flexible array member",
636         (createIvalCharPtr): implemented flexible array initialisation with a
637         string
638         * src/SDCCsymt.c (copyStruct): removed,
639         (getSize): fixed misleading comment,
640         (getAllocSize): removed, the additional allocation size is now in
641         sym->flexArrayLength,
642         (checkStructFlexArray): new, syntax checks for flexible array members,
643         (compStructSize): added syntax checks for "flexible array members"
644         (copyStruct): removed,
645         (copyLinkChain): removed inefficient fix for bug 770487
646         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
647         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
648         symbol->flexArrayLength
649         * src/SDCCerr.c,
650         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
651         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
652         * support/regression/tests/structflexarray.c: added
653         * support/valdiag/tests/structflexiblearray.c: added
654
655 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
656
657         * src/SDCCast.c (decorateType): fixed bug 1368489
658         * support/Util/SDCCerr.c,
659         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
660
661 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
662
663         * device/include/mcs51/at89c51snd1c.h: added file submitted by
664           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
665
666 2005-11-27 Borut Razem <borut.razem AT siol.net>
667
668         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
669           support/cpp2/mkdeps.h: added command line option
670           -obj-ext=<extension> to SDCPP to define object file externion, used
671           for generation of make dependencies (-M)
672         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
673
674 2005-11-26 Borut Razem <borut.razem AT siol.net>
675
676         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
677           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
678           added pic and pic16 libraries
679
680 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
681
682         * device/include/float.h: Corrected typo in prototype of __fsgt
683
684 2005-11-25 Borut Razem <borut.razem AT siol.net>
685
686         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
687           added creation of model-mcs51-stack-auto libraries
688
689 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
690
691         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
692         and fields-list too
693         * src/SDCCast.c (createIvalArray): removed obsolete comment
694
695 2005-11-24 Borut Razem <borut.razem AT siol.net>
696
697         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
698           added missing device/lib/mcs51/crt*.asm sources
699
700 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
701
702         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
703
704 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
705
706         * device/lib/_fs2schar.c,
707         * device/lib/_fs2sint.c,
708         * device/lib/_fs2slong.c: optimized inline asm
709
710 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
711
712         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
713           Better handling of floats between -1.0 and 0.0.
714
715 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
716
717         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
718           (the missing "if"s prohibited removal of redundant labels)
719
720 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
721
722         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
723           Properly convert floats between -1.0 and 0.0 to long, int, and char
724           types (max integer value of negative floats tends to zero).
725         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
726           Removed changes made so to work properly with floats between
727           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
728           and _fs2char.c
729
730 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
731
732         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
733         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
734         (genCast) cosmetic change
735         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
736         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
737         from mcs51
738         * support/regression/tests/bitfields (testSignedBitfields): added
739
740 2005-11-18 Borut Razem <borut.razem AT siol.net>
741
742         * sdcc/device/lib/Makefile.in: remove all unnecessary files
743         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
744           introduced SILENT option to make building of pic16 libraries less
745
746 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
747
748         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
749           Now they work properly with floats between -1.0 and 0.0
750         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
751
752 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
753
754         * src/SDCCicode.c (printOperand): added missing else
755
756 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
757
758         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
759         reformatted for better readability
760         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
761         signed bitfields
762
763 2005-11-17 Borut Razem <borut.razem AT siol.net>
764
765         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
766           introduced SILENT option to make building of pic16 libraries less
767           verbose - used for nightly snapshot build
768         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
769           available on Win32 platforms.
770         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
771           medium, large, pic and pic16
772
773 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
774
775         * device/lib/printf_large.c: Temporary patch for bug 1358192:
776           printf("%f"...) sets fraction to zero.
777
778 2005-11-16 Raphael Neider <rneider AT web.de>
779
780         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
781           fixes #1357221
782         * src/pic/gen.c (genIfx): implemented for CARRY bit
783         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
784           to generic pointers, fixes #1357332,
785           (pic16_movLit2f): NEW,
786           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
787
788 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
789
790         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
791
792 2005-11-11 Raphael Neider <rneider AT web.de>
793
794         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
795         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
796           compute pointer's type from operand,
797           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
798           improved single bit reads, fixes bug #1353379
799
800 2005-11-09 Borut Razem <borut.razem AT siol.net>
801
802         * support/scripts/sdcc.nsi: added lib/pic to the package
803
804 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
805
806         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
807
808 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
809
810         * support/regression/tests/bug1348008.c: added
811         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
812         * support/regression/tests/bug1337835.c: updated comment
813
814 2005-11-06 Borut Razem <borut.razem AT siol.net>
815
816         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
817           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
818           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
819           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
820           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
821           dynamic construction of cl_error_class and derivates - 2.nd try
822
823 2005-11-05 Borut Razem <borut.razem AT siol.net>
824
825         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
826           bug, which caused Bus Errors on sparc solaris
827
828 2005-11-04 Borut Razem <borut.razem AT siol.net>
829
830         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
831           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
832           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
833           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
834           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
835           and derivates to resolve the initialization problem on OSX
836
837 2005-11-02 Borut Razem <borut.razem AT siol.net>
838
839         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
840           corrected typo - #include <winsock2.h>
841
842 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
843
844         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
845           (_asxxxx_mapping): added org directive for future enhancements
846
847 2005-11-01 Borut Razem <borut.razem AT siol.net>
848
849         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
850           enabled sockets on WIN32
851         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
852
853 2005-10-31 Borut Razem <borut.razem AT siol.net>
854
855         * support/regression/generate-cases.py: escape backslashes in {testcase}:
856           WIN32 backslash path delimiters should be escaped when used in C strings
857         * support/regression/tests/bitfields.c: exclude failing assertions for
858           __CYGWIN32__ and __MINGW32__ hosts
859
860 2005-10-30 Borut Razem <borut.razem AT siol.net>
861
862         * src/SDCCutil.c: corrected double comparison typo
863
864 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
865
866         * device/lib/medium/Makefile: added for new memory model medium
867         * device/include/asm/mcs51/features.h: updated for medium/pdata
868         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
869           added Multiply & Accumulate sbit's and MAC0_PAGE define
870         * device/include/mcs51/c8051f300.h: added sfr16 definitions
871         * device/include/mcs51/c8051f310.h: added sfr16 definitions
872         * device/lib/_mullong.c: update for medium model
873         * device/lib/incl.mk: added medium model
874         * doc/sdccman.lyx: documented medium model
875         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
876         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
877         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
878         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
879           (allocParms): set SCLS and OCLS to pdata for medium model
880         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
881           for pdata,
882           (powof2): return <0 if not power of 2
883         * src/avr/gen.c (genBitWise): use updated powof2
884         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
885           (shiftR2Left2Result): small optimization in setup, save acc when storing,
886           (shiftLLeftOrResult): use B if necessary
887         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
888         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
889         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
890         * support/regression/Makefile.in: added test-mcs51-medium
891         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
892
893 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
894
895         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
896         specifier unsigned
897         * device/lib/time.c (mktime): fixed bug 1334315
898
899 2005-10-28 Raphael Neider <rneider AT web.de>
900
901         * device/include/pic/p16f_common.inc: added common declarations
902         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
903
904 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
905
906         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
907           (aopPutUsesAcc): added to predict accumulator use,
908           (assignResultValue): save acc if necessary,
909           (genMinusDec): store result if indirectly addressed,
910           (genDivOneByte):  save acc if necessary,
911           (movLeft2Result): bugfix if left already in acc,
912           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
913             attention to accumulator use (esp. pdata),
914           (genReceive): receive pdata correctly
915         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
916         * src/SDCCicode.h: added isOperandInPagedSpace prototype
917
918 2005-10-27 Raphael Neider <rneider AT web.de>
919
920         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
921
922 2005-10-27 Raphael Neider <rneider AT web.de>
923
924         * .version: changed version to 2.5.4
925         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
926         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
927           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
928             arithmetics support routines
929         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
930         * device/lib/Makefile.in: also create installdir for pic
931
932         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
933           pic14 port as well
934         * src/pic/device.c (dump_sfr): rewritten to delegate register
935           placement to the linker (use `extern sym' rather than sym EQU addr),
936           (validAddress): fixed to check last specified address
937         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
938           (popGetLit): truncate literal value to 8 bit,
939           (popGet): moved assert to more appropriate place
940           (popGetExternal): create pCode operand from and mark the according
941             symbol as being `extern'
942           (popGetAddr): added sanity check on immediate's offset, provide
943             GPOINTER tag on demand
944           (aopPut): fixed for immediates,
945           (mov2w_op): move operand's address or contents to WREG (depending on
946             operand type), safer variant of mov2w,
947           (movwf,call_libraryfunc): NEW, handy abbreviations,
948           (get_argument_pcop,get_return_val_pcop,pass_argument,
949           get_returnvalue): interface for accessing function parameters and
950             return values,
951           (assignResultValuei,genRet): use new parameter/return value interface
952           (pic14_getDataSize): back to old version handling generic pointers,
953           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
954             provided implementation and/or fixed old one,
955           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
956             calls, removed legacy 8051 reference code
957           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
958           (loadSignToC): NEW, move the operands sign bit to CARRY,
959           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
960             genRightShiftSigned, accepts negative shift counts,
961           (setup_fsr): load FSR and adjust IRP (indirect memory access),
962           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
963             generic pointers, __data pointers and __code pointers,
964           (genUnpackBits,genPackBits): rewritten to work with generic pointers
965             and signed bitfields, limit bitfields to 8 bit,
966           (genDataPointerGet): fixed number of bytes read,
967           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
968           (genPointerGet,genPointerSet): fixed handling of __code pointers,
969             pointers to constant data are no longer assumed to point to __code
970             space, removed invalid pointer types,
971           (bitpatternFromVal): retrieve the PICs representation of an integer
972             or float literal,
973           (genDataPointerSet): fixed assigning to po_immediate operands,
974           (genGenPointerSet): implemented as library call,
975           (genIfx): fixed incorrect condition,
976           (genAddrOf): limit generic pointers' addresses to 2 bytes,
977             provide GPOINTER tag according to destination's storage class,
978           (genCast): added code to handle casting to generic pointers, added
979             sign-/zero extension of the result
980           (aop_isLitLike,op_isLitLike): fixed handling of immediates
981         * src/pic/gen.h: added macros to access IRP bit in STATUS register
982         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
983           extend the result
984         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
985           address/register resides in the shared banks
986           (emitSymbolToFile): improved to handle global and `pinned' symbols,
987             put all variables into separate sections (have the linker arrange
988             them)
989           (picglue): put init code and interrupt handlers in separate sections
990         * src/pic/main.c: added port specific options table, modified to PORT
991           structure to make GPOINTERs 3 byte, added pic14_options
992           (_pic14_do_link): private linking routine (update paths to libraries,
993             add libsdcc.lib by default)
994         * src/pic/main.h: declare pic14_options
995         * src/pic/pcode.c: fixed instructions i/o relations,
996           (RegCond): reverted to correct version,
997           (newpCodeOpLit): truncate literals to 8 bit,
998           (genericPrint): added debug output,
999           (getRegFromInstruction): fixed for various operand types, simplified
1000           (BuildFlow): fixed broken handling of isntructions with labels
1001           (LinkFlow): start at last instruction in flow (skip trailing comments),
1002             pass the flow on to the next instruction after CALL
1003           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1004           (insertPCodeInstruction): fixed inserting after a skip instruction,
1005           (DoBankSelect): fixed for labeled instructions
1006           (OptimizepBlock): honor --nopeep switch
1007           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1008         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1009         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1010           (pCodeOptime2pCodes): allow disabling this optimization via
1011             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1012             but is still buggy), started implementation of a dataflow based
1013             pCode optimization (CSE + dead code elimination)
1014           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1015         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1016           names are independant of the stack location and therefore portable across
1017           devices
1018
1019 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1020
1021         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1022           (selectSpil): fixed bug 1337835 by not spilling bit variables
1023         * support/regression/tests/bug1337835.c: added test for this bug
1024         * src/mcs51/peeph.def: restart after rule 3.c,
1025           addded rules 263.x to optimize loading constants
1026
1027 2005-10-26 Raphael Neider <rneider AT web.de>
1028
1029         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1030         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1031           (genAssign): emit warning when casting literals to generic pointer
1032             type, also applies when taking the address of a fixed variable,
1033           (genCast): improved casting to generic pointers
1034         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1035           extern variables, added verbose error message
1036         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1037
1038 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1039
1040         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1041         carry must be complemented too
1042         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1043         could be emitted by genMinus
1044         * src/SDCCval.c (constVal): fixed bug 1305065
1045
1046 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1047
1048         * src/SDCCast.c (addCast): added promotion for bit variables
1049         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1050         promotion casts + optimisation
1051         (optimizeGetWord): fix warning 'i' might be used uninitialized
1052         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1053         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1054
1055 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1056
1057         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1058         all chars are promoted to int; promotion should be handled in SDCCast.c
1059
1060 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1061
1062         * device/lib/_strcmp.c: Fixed bug 1326457
1063
1064 2005-10-11 Raphael Neider <rneider AT web.de>
1065
1066         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1067         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1068
1069 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1070
1071         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1072         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1073
1074 2005-10-04 Raphael Neider <rneider AT web.de>
1075
1076         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1077           device/lib/pic16/pics.all: added pic18f1320
1078         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1079
1080 2005-09-30 Raphael Neider <rneider AT web.de>
1081
1082         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1083         * src/pic16/devices.inc: NEW, provides device descriptions
1084         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1085
1086 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1087
1088         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1089           GETHBIT
1090
1091 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1092
1093         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1094           documented Any Order Bit, Higher Order Byte and Higher Order Word
1095         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1096         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1097           (optimizeGetAbit): new, to get any bit, not only the high bit,
1098           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1099           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1100           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1101           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1102             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1103             GETABIT, GETBYTE, GETWORD: decorate them,
1104           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1105           (ast_print): added GETABIT, GETBYTE, GETWORD
1106         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1107         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1108           (geniCodeBinary): new generic binary icode,
1109           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1110         * src/port.h: updated comment for PORT.hasExtBitOp
1111         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1112           (genGetByte): new, to get a single byte,
1113           (genGetWord): new, to get a word from a long,
1114           (gen51Code): added GETABIT, GETBYTE, GETWORD
1115         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1116
1117 2005-09-23 Raphael Neider <rneider AT web.de>
1118
1119         * configure.in, configure: have device/lib/pic configured
1120         * device/lib/Makefile.in: added model-pic14
1121         * device/lib/clean.mk: added pic/ to clean rule
1122         * device/lib/pic: added rudimentary pic14 library providing support
1123           functions for multiplication/division/generic pointer access
1124         * src/SDCCopt.c (convilong): mark support functions as extern
1125           for pic14 port as well
1126         * src/pic/gen.c (genMult): added assertions,
1127           (genpic14Code): emit warning on unhandled iCodes
1128         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1129         * src/pic/pcode.c (pCodeOpCopy),
1130         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1131           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1132           SFR_REGISTER}), made safe for future extensions
1133         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1134           instructions even if preceeded by SKIP instructions (also remove
1135           them); removed unused code
1136         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1137           prevents leaving parts of the structure uninitialized after copying
1138
1139 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1140
1141         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1142           ago by me
1143         * support/regression/tests/addsub.c: added test for the bug
1144
1145 2005-09-21 Raphael Neider <rneider AT web.de>
1146
1147         * device/include/pic16/pic18f1220.h,
1148           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1149         * device/lib/pic16/Makefile.rules: added missing opening paren
1150         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1151           are provided in genutils.c,
1152           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1153           operand/result sizes,
1154           (genCmp): assert on NULL pointers first, then check deref'ed values
1155         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1156           result size
1157
1158 2005-09-18 Raphael Neider <rneider AT web.de>
1159
1160         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1161           as these are now unused,
1162           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1163         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1164           local, avoids uninitialized pointer dereference on r->name
1165         * src/pic16/ralloc.c (newReg): fixed indentation
1166
1167 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1168
1169         * src/SDCCval.c (constVal): fixed bug 730366
1170         * support/Util/SDCCerr.c,
1171         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1172
1173 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1174
1175         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1176
1177 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1178
1179         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1180
1181 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1182
1183         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1184           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1185         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1186           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1187         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1188         * packihx/packihx.c (hexDigit): made c unsigned char
1189         * as/mcs51/lklibr.c (fndsym),
1190         * link/z80/lkgb.c (gb),
1191         * link/z80/lklibr.c (fndsym),
1192         * link/z80/lkrloc.c (relr),
1193         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1194         * src/SDCC.lex (checkCurrFile, process_pragma),
1195         * src/SDCCglue.c (spacesToUnderscores),
1196         * src/SDCCmain.c (setParseWithComma, processFile),
1197         * src/asm.c (tvsprintf, printCLine),
1198         * src/avr/gen.c (emitcode, aopPut),
1199         * src/ds390/gen.c (emitcode),
1200         * src/hc08/gen.c (emitcode, emitinline),
1201         * src/mcs51/gen.c (emitcode, genInline),
1202         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1203           tokenizeLineNode),
1204         * src/pic/ralloc.c (debugLog),
1205         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1206           tokenizeLineNode),
1207         * src/pic16/ralloc.c (debugLog),
1208         * src/z80/main.c (_process_pragma):
1209            made all ctype.h function calls safe
1210         * src/SDCCopt.c: include math.h for fabs
1211         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1212           and used them throughout the code to make ctype.h function calls safe
1213         * src/ds390/main.c (asmLineNodeFromLineNode),
1214         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1215         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1216            unsigned char*
1217         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1218           (newpCodeAsmDir): made ctype.h function calls safe
1219         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1220           pic16_emitcode):  made lbp unsigned char*
1221         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1222           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1223         * src/xa51/gen.c (emitcode),
1224         * src/z80/gen.c (_emit2): made lbp unsigned char*
1225         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1226            char*
1227
1228 2005-09-05 Raphael Neider <rneider AT web.de>
1229
1230         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1231           access bank splitpoint
1232
1233 2005-09-05 Raphael Neider <rneider AT web.de>
1234
1235         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1236
1237 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1238
1239         * .version: changed to version 2.5.3
1240         * doc/sdccman.lyx: changed version to 2.5.3,
1241           documented --codeseg and --constseg and pragma codeseg and constseg,
1242           documented bit parameters (reentrant) and bit returning
1243         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1244            currFunc->recvSize, but is this ok for all ports?
1245           (ast2iCode): result of ~ on unsigned char must be cast to int for
1246            bool to work
1247         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1248           function pointers in bit space
1249         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1250           (processFuncArgs): call port.reg_parm() with reentrancy info
1251         * src/port.h,
1252         * src/avr/main.c,
1253         * src/ds390/main.c,
1254         * src/hc08/main.c,
1255         * src/pic/main.c,
1256         * src/pic16/main.c,
1257         * src/xa51/main.c,
1258         * src/z80/main.c: port.reg_parm prototype extended with
1259           "bool reentrant" parameter
1260         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1261           options.stackAuto for allocating bit register parameters
1262         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1263           (genSend): set BitBankUsed if it is,
1264           (selectRegBank): factored out of genCall for use in genPcall,
1265           (genCall): removed redundant dtype assignmen, use selectRegBank,
1266           (genPcall): handle returning in Carry properly, save in F0 if needed,
1267           (genReceive): handle bit register parameters
1268         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1269           (mcs51_assignRegisters): enable bit registers for all reentrant
1270            functions and don't set BitBankUsed unconditionally
1271         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1272         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1273         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1274
1275 2005-08-27 Borut Razem <borut.razem AT siol.net>
1276
1277         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1278         ppc-osx (Darwin) does not support -u option. It seems that it is
1279         supported only on Linux - GNU cp
1280
1281 2005-08-25 Borut Razem <borut.razem AT siol.net>
1282
1283         * sim/ucsim/gui.src/serio.src/Makefile.in,
1284           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1285           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1286           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1287           install and strip, since the strip at /usr/ccs/bin should be used
1288           on solaris
1289
1290 2005-08-24 Borut Razem <borut.razem AT siol.net>
1291
1292         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1293
1294 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1295
1296         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1297         ffffffffu
1298
1299 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1300
1301         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1302         * as/mcs51/lkmain.c (link_main): fixed warning
1303         * device/include/stdbool.h: ds390 has no advanced bit support yet
1304         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1305         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1306         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1307           and updated their macros
1308         * src/SDCCval.c (constVal): updated comment for renamed b_long
1309
1310 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1311
1312         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1313         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1314           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1315           (oprio): set priority for '['
1316         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1317            and adb_24_bit
1318         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1319         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1320         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1321         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1322           added overlayable BIT_BANK area
1323         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1324           (summary2): explain 'T' in legenda
1325         * as/mcs51/lkrloc.c: replaced old K&R style,
1326           (relr): added R_BIT processing,
1327           (errmsg): added "Bit-addressable relocation error",
1328           (adb_bit): added for converting from byte- to bit-addressable space,
1329           (adb_24_bit): added for converting from byte- to bit-addressable space
1330         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1331            used in reentrant functions now even as return value
1332         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1333         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1334           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1335         * src/SDCCglobl.h: added indicator BitBankUsed
1336         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1337            the bit registers b0-b7
1338         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1339           (geniCodeCast): fixed bug 1263853,
1340           (geniCodeLogicAndOr): put result in bool or char,
1341           (geniCodeReceive): added parameter func for accessing the return type,
1342           (geniCodeFunctionBody): pass func to geniCodeReceive
1343         * src/SDCCmain.c: added indicator BitBankUsed
1344         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1345         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1346           (checkSClass): don't put automatic bool/bit on stack,
1347           (checkFunction): removed check on function cannot return bit
1348         * src/SDCCsymt.h: added newBoolLink prototype
1349         * src/mcs51/gen.c (rb1regs): added bit registers,
1350           (movc): created for assigning to carry,
1351           (pushReg, popReg): created for pushing registers,
1352           (sameRegs): check both AOP_REG and AOP_CRY types,
1353           (aopOp): handle bit registers,
1354           (aopPut): optimization no self-assign,
1355           (saveRegisters): push reg->base (bits) only once for bit registers,
1356            and use pushReg,
1357           (unsaveRegisters): pop reg->base only once and use popReg,
1358           (assignResultValue): added parameter func and return in carry for bits,
1359           (genIpush): optimization no reload in A if not changed,
1360           (genSend): bit parameters in reentrant functions are passed in bit
1361            registers by first assigning to bits in B, then save registers and
1362            copy B to bits,
1363           (genCall): handle returning in Carry properly, save it in F0 if needed,
1364           (genPcall): updated assignResultValue call, this is not safe yet for bit
1365            returning function !!!
1366           (genFunction): don't generate equ's for bit registers and use pushReg,
1367           (genEndFunction): take care of bit returning functions and use popReg,
1368           (genRet): return bit in Carry,
1369           (genIfx): optimize bit registers and other directly addressable bits,
1370           (genReceive): updated assignResultValue call
1371         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1372           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1373            registers when using stack-auto
1374         * src/mcs51/ralloc.c (_G): added allBitregs,
1375           (regs8051): added the bit registers,
1376           (createStackSpil): use macro IS_BIT,
1377           (getRegBit): added to allocate a bit register, else spill,
1378           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1379           (updateRegUsage): factored out to ease stepping while debugging,
1380           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1381            also allocate bit registers,
1382           (fillGaps): handle bit registers,
1383           (findAllBitregs): added to create bit vector with all bit registers,
1384           (mcs51_allBitregs): returns this bit vector,
1385           (mcs51_assignRegisters): when using stack-auto use bit registers for
1386            passing parameters and creating local variables
1387         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1388
1389 2005-08-22 Borut Razem <borut.razem AT siol.net>
1390
1391         * device/lib/Makefile.in: replaced find option -or with -o
1392           to make it run on solaris
1393
1394 2005-08-22 Raphael Neider <rneider AT web.de>
1395
1396         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1397           fixes #1265442 (crash on Solaris)
1398
1399 2005-08-20 Borut Razem <borut.razem AT siol.net>
1400
1401         * configure, configure.in: added tests for libsocket and libnsl libraries,
1402           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1403           from support/regression/Makefile.in
1404         * support/regression/Makefile.in: added
1405         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1406         * sim/ucsim/libtool: regenerated on sparc-solaris
1407         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1408           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1409           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1410           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1411           sparc-solaris, which doesn't use GNU ld linker
1412         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1413         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1414
1415 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1416
1417         * src/mcs51/peeph.def: updated comments
1418
1419 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1420
1421         * device/lib/_gptrget.c,
1422         * device/lib/_gptrput.c: slightly shorter
1423         * doc/sdccman.lyx: incremented version
1424         * src/mcs51/peeph.def: moved peephole comments to the line of first
1425           change to better keep line correlation, reanimated 186.e
1426         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1427
1428 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1429
1430         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1431           David Saxton with quotes around file name.
1432
1433 2005-08-15 Borut Razem <borut.razem AT siol.net>
1434
1435         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1436           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1437           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1438           make tests run on x86_64 platform
1439
1440 2005-08-13 Raphael Neider <rneider AT web.de>
1441
1442         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1443           as it might be executed DURING a build (parallel make is wonderful)
1444
1445 2005-08-13 Raphael Neider <rneider AT web.de>
1446
1447         * device/lib/Makefile.in (port-specific-objects-pic16):
1448           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1449         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1450           dependency
1451         * device/lib/pic16/Makefile.rules: build subdirs before creating
1452           the library, removed builddir rule, create $(builddir) early in
1453           recurse rule, use empty recurse rule for leaf directories
1454         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1455           mkdir errors (race condition), removed duplicate suffix "hex"
1456           from clean rules
1457         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1458         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1459           prevents mkdir -p from aborting on Alpha
1460
1461 2005-08-12 Raphael Neider <rneider AT web.de>
1462
1463         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1464           db-statements in order to allow for arrays of pointers in code
1465           sections to be placed without interspersed 0-padding, fixes
1466           bug #1256215
1467         * (emitStatistics): fixed division by zero for pic18f1220
1468         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1469           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1470         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1471         * (pic16_pCodeConstString): keep track of already emitted string
1472           literals to prevent "duplicate definitions of symbol _str_NR"
1473         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1474           debug message
1475         * device/lib/Makefile.in: ignore failing PIC16 library builds
1476         * device/lib/pic16/Makefile: do not build if gputils are missing
1477         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1478
1479 2005-08-10 Raphael Neider <rneider AT web.de>
1480
1481         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1482           my last commit)
1483
1484 2005-08-10 Raphael Neider <rneider AT web.de>
1485
1486         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1487           Rokas' patch to add the new fixed point type "__fixed16x16"
1488         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1489           functions for __fixed16x16 arithmetics
1490         * device/lib/pic16: reimplemented the build system to support
1491           a separate build directory, better handling of libio (create
1492           the library in a separate subdir for each architecture) and
1493           easier configuration (centralized in Makefile.common)
1494
1495 2005-08-07 Raphael Neider <rneider AT web.de>
1496
1497         * src/pic16/gen.c (genrshTwo): fixed sign extension
1498         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1499         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1500           added T0CONbits
1501         * device/include/pic16/pic18f4220.h: NEW, header for
1502           pic18f4220 and pic18f4320
1503         * device/include/pic16/pic18fregs.h: added new devices,
1504           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1505         * device/include/pic16/signal.h: resolved name clashes
1506           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1507           to also allow testing for interrupt enable bits, added
1508           comments on how to use the macros
1509         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1510         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1511           register definitions for the devices
1512         * device/lib/pic16/pics.all: added new devices
1513         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1514           allocated memory
1515         * device/lib/pic16/libc/stdlib/memfree: do not count
1516           the block header as free memory
1517         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1518           simplified and added missing end-of-blocklist-marker
1519           (reported by Peter Onion, fixes #1252814)
1520         * (_mergeHeapBlock): fixed loop condition
1521         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1522           len==0, restructured code
1523         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1524           up a bit, reduced bitfield accesses, prevent endless loops
1525           in case of heap corruption
1526         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1527           "unreferenced arguments/must return a value" warnings
1528         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1529           replaced BAUDREG with SPBRG
1530         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1531           device/lib/pic16/debug/gstack/gstack.c: replaced
1532           _naked, _asm, _endasm with __naked, __asm, __endasm
1533
1534 2005-08-05 Raphael Neider <rneider AT web.de>
1535
1536         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1537           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1538
1539 2005-08-05 Borut Razem <borut.razem AT siol.net>
1540
1541         * device/lib/Makefile.in: added missing ';'
1542         * configure: removed ^M characters
1543
1544 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1545
1546         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1547           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1548           License
1549
1550 2005-08-04 Borut Razem <borut.razem AT siol.net>
1551
1552         * configure.in: pic16 libraries build 2nd try - enable running
1553           configure in device/lib/pic16
1554         * configure: regenerated from configure.in
1555         * device/lib/Makefile.in: create $(PORT)/bin directory
1556
1557 2005-08-03 Raphael Neider <rneider AT web.de>
1558
1559         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1560           to get/set values via pointers
1561         * (genUnpackBits,genPackBits): changed detection of
1562           ptr->bitfield vs. sym.bitfield, fixed access via generic
1563           pointers, removed dead (wrong) code for multibyte bitfields
1564         * (genNearPointerGet, genGenPointerGet): removed useless code,
1565           fixed bitfield detection, fixes #1250594
1566         * (genNearPointerSet): removed useless code
1567         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1568           and introduced macro pic16_emitpcode that conditionally emits
1569           the origin of the following pCode (useful for debugging SDCC)
1570         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1571         * (createDefmap): fixed handling of LFSR for --optimize-df
1572
1573 2005-08-02 Borut Razem <borut.razem AT siol.net>
1574
1575         * device/lib/Makefile.in: pic16 libraries build enabled since
1576           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1577
1578 2005-08-02 Raphael Neider <rneider AT web.de>
1579
1580         * src/pic16/gen.c (genPackBits): removed deprecated warning
1581         * (genGenPointerSet): fixed bitfield detection
1582
1583 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1584
1585         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1586
1587 2005-07-31 Raphael Neider <rneider AT web.de>
1588
1589         * device/lib/pic16/libdev/pic18f458.c,
1590           device/include/pic16/pic18f458.h: added missing T0CONbits
1591
1592 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1593
1594         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1595
1596 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1597
1598         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1599
1600 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1601
1602         * device/include/mcs51/at89c51ed2.h: added.
1603
1604 2005-07-23 Raphael Neider <rneider AT web.de>
1605
1606         * src/pic/gen.h: added emitpcode macro for debugging
1607         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1608           and replace by macro adding debug information on demand
1609         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1610         * (gencjne): tried to fix; replaced with correct (slower) code
1611         * (gen{Unp,P}ackBits): fixed single bit access
1612         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1613         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1614           previous instruction
1615         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1616           register has to be handled with care (forbidding movement
1617           of assignments/uses, removing assignments completely, ...)
1618         * (pCodeOptime2pCodes): make use of regIsSpecial
1619         * added lots of debugging output (commented out)
1620         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1621           from being reused as result UNLESS it is known to work
1622
1623 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1624
1625         * support/Util/dbuf.h: include <stddef.h> for size_t
1626         * .version: changed to version 2.5.2
1627
1628 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1629
1630         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1631
1632 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1633
1634         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1635           (genModOneByte): removed needless psha/pula
1636
1637 2005-07-22 Raphael Neider <rneider AT web.de>
1638
1639         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1640           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1641         * src/pic/gen.c (resolveIfx): do not "invent" labels
1642         * (genSkipc): changed to positive logic
1643         * (genSkipCond): removed as no longer needed
1644         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1645           backport from PIC16
1646         * (genLeftShift): check operands are in different registers
1647         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1648           INCF does not update CARRY...
1649         * src/pic/main.c: fixed _linkCmd
1650         * src/pic/pcode.c (unlinkpCode): added inactive code
1651         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1652           alive (do not assign result and operand overlapping registers)
1653
1654 2005-07-22 Raphael Neider <rneider AT web.de>
1655
1656         * src/pic/device.c (dump_sfr): replaced register declaration with
1657           call to emitSymbolToFile() to avoid duplicate symbols
1658         * (assignRelocatableRegisters): do not declare external symbols
1659         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1660           right (take size of type, not etype)
1661         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1662         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1663         * (packRegsForAccUse): disabled assignment of WREG as
1664           the result reg to prevent occurence of just fixed #1235003,
1665           fixes #1242954
1666         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1667           symbols (avoids duplicate symbols in .asm file)
1668         * (pic14emitRegularMap): use emitSymbolToFile()
1669         * src/pic/gen.c (aopOp): fixed spillLocation handling
1670         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1671         * (genDataPointerSet): removed unneccessary variables/output
1672
1673 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1674
1675         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1676         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1677
1678 2005-07-21 Raphael Neider <rneider AT web.de>
1679
1680         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1681           architecture cannot handle them efficiently, fixes bug #1235003
1682         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1683           check for empty sets before using them (fixes bug #1232190)
1684
1685 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1686
1687         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1688           (lnksect2): generate warnings for memory overlap
1689         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1690           constseg to set the name of these segments so you can instruct the linker
1691           to place them in banks
1692         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1693         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1694           added code_seg and const_seg to options
1695         * src/SDCCglue.c (emitMaps): use options.const_seg,
1696           (createInterruptVect): put interrupt vectors in segment HOME,
1697           (glue): put HOME before static segment and put the main glue in HOME,
1698           (glue): use options.code_seg
1699         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1700         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1701           these segments so you can instruct the linker to place them in banks
1702           (linkEdit): use code_loc for HOME segment which should be the first
1703           segment in code memory now
1704         * src/SDCCmem.c: fixed more stuff like bug 1238386
1705         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1706           (changePointer): don't change function pointers to code pointers for
1707           banked functions,
1708           (compareType): added exceptional check for banked function pointers
1709         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1710         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1711           after static in code memory
1712         * src/mcs51/gen.c: added aopLiteralLong prototype,
1713           (aopForSym): use getSize for functions,
1714           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1715           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1716           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1717           the segment,
1718           (genPcall): use call for literal function pointers and generate banked
1719           calls over the one trampoline so there's only one place for the user to
1720           modify according to his/hers hardware,
1721           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1722           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1723         * src/mcs51/main.c: added keyword banked,
1724           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1725         * support/Util/SDCCerr.c,
1726         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1727           needed for passing the bank and address to the trampoline
1728         * device/lib/mcs51/crtbank.asm: added for bankswitching
1729         * device/lib/mcs51/Makefile: added crtbank
1730
1731 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1732
1733         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1734           for fields at offset 0 of a struct or union as reported
1735           on 2005-07-07 in the developer mailing list.
1736
1737 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1738
1739         * src/SDCCmem.c: fixed bug 1238386
1740
1741 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1742
1743         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1744           (patch #1144962), added peephole 300, enabled 259.x
1745         * doc/sdccman.lyx: removed screenshot and provided link instead
1746
1747 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1748
1749         * doc/sdccman.lyx: added section about debugging with ddd
1750         * doc/figures/ddd_example.eps: screenshot of debugging session
1751
1752 2005-07-04 Raphael Neider <rneider AT web.de>
1753
1754         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1755           like CODE pointers, fixes #1115683
1756         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1757           call, fixes bugs #1232211, #1228110,
1758           fixed wrong casts to pCodeFlow from pCodeInstructions
1759
1760 2005-07-04 Raphael Neider <rneider AT web.de>
1761
1762         * src/pic/gen.c (popGet): changed assert to allow for
1763           bit operands
1764         * (popGetAddr): changed signature to provide
1765           an additional index, patched all call sites
1766         * (genCmpEq): handle literal-like operands correctly
1767         * (genAddrOf): added sanity checks on __code/__data pointers
1768         * (genAssign): added handling of symbols from __code section
1769         * (gencjne): do not generate code for comparisons whose result
1770           is neither stored nor used, fixes bug #1171114
1771         * (AccLsh, AccRsh): operate on operand instead of WREG
1772         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1773           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1774           by known count
1775         * rewrote complete shift-by-literal logic, commented unused
1776           functions out
1777         * (genConstPointerGet): get multiple bytes (if result size > 1),
1778           fixed handling of non-immediate addresses
1779         * (genPointerGet): handle CODE pointers like CONST pointers
1780         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1781         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1782           operand is to be treated as a literal or not
1783         * (mov2w,genPcall,genCmpEq),
1784           src/pic/genarith.c: use aop_isLitLike() to decide between
1785           literal/register contents
1786         * (addSign): added missing offset
1787         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1788           only emit comment in debug-mode,
1789           use {aop,op}_isLitLike throughout the file
1790         * src/pic/glue.c: fix initializers for pointers (work in progress)
1791         * src/pic/pcode.c (get_op): honor index on _const symbols
1792         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1793         * (dumppBlock): added pCode size estimation
1794         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1795           check for IS_SYMOP before OP_SYMBOL'ing
1796         * fixed indentation, compacted switch-statements
1797         * (allocReg): find free register and allocate it instead of
1798           allocating new registers all the time
1799         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1800           registers as its operands (necessary only for multibyte GETs)
1801
1802 2005-07-01 Raphael Neider <rneider AT web.de>
1803
1804         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1805           debugging .asm-output macros FENTRY + FEXIT
1806         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1807           way... I wonder...
1808         * (emitpComment): NEW, printf to pCode
1809         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1810           offset handling
1811         * (popGetAddr): NEW, variant of popGet to access an immediates
1812           high(er) bytes instead of the n'th byte of memory they reference,
1813           replaced popGet with popGetAddr where neccessary
1814         * (genDataPointerGet): reactivated and fixed implementation
1815         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1816           accesses
1817         * (genDataPointerSet): fixed multibyte assignments
1818         * (genpic14Code): fixed --i-code-in-asm handling
1819         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1820         * (genPlus): fixed index-out-of-bounds error
1821         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1822         * src/pic/ralloc.c: added debugging output macro FENTRY2
1823         * (spillThis): fixed indentation, enbraced for-body for clarity
1824         * (rematStr): commented out as now unused
1825         * (regTypeNum): commented out special spill case (overwrites
1826           arbitrary values)
1827         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1828
1829 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1830
1831         * doc/sdccman.lyx: documented sfr16/sfr32,
1832           added example for using storage class with function pointers
1833         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1834
1835 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1836
1837         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1838         * device/lib/_itoa.c,
1839         * device/lib/_ltoa.c: optimized codesize
1840         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1841           but don't know how to suppress the double warning.
1842         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1843         * support/Util/SDCCerr.c,
1844         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1845
1846 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1847
1848         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1849           fixed old K&R prototypes
1850         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1851         * device/lib/_gptrget.c,
1852         * device/lib/_gptrgetc.c,
1853         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1854           also new versions for small generic pointers and banked generic pointers
1855         * src/port.h: added const_name
1856         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1857         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1858         * src/SDCCcse.c (findPrevIc): check all associative operators
1859         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1860         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1861         * src/SDCCmem.c: updated comments,
1862           set far-space to 0 for pdata, results in optimized code
1863         * src/SDCCmem.h: added macro CONST_NAME
1864         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1865           moving the info into the highest bits, see also gptrget/gptrput
1866         * src/src.dsp: added sdcc.ico to project files
1867         * src/avr/gen.c (genCast): fixed bug 0x%d
1868         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1869         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1870           relation between ptr_type and DCL_TYPE,
1871           (genCast): fixed bug 0x%d
1872         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1873           (CODE)" for const_name
1874         * src/hc08/gen.c (genCast): fixed bug 0x%d
1875         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1876           (hc08_port): added "CONST (CODE)" for const_name
1877         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1878           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1879           between ptr_type and DCL_TYPE,
1880           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1881           operand* and took AOP() inside function so sfr-ness can be checked,
1882           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1883           new prototype,
1884           (genFunction, genEndFunction): optimized stack setup,
1885           (genMinus): optimized for literals with ending zeroes (in bytes),
1886           (genCast): fixed bug 0x%d
1887         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1888           (mcs51_port): added "CONST (CODE)" for const_name
1889         * src/mcs51/peeph.def: made rule 226 more generic
1890         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1891         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1892         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1893         * src/z80/main.c (z80_port): added NULL for const_name,
1894           (gbz80_port): added NULL for const_name
1895         * support/regression/tests/bug663539.c,
1896         * support/regression/tests/sfr16.c: new tests
1897
1898 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1899
1900         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1901
1902 2005-06-24 Raphael Neider <rneider AT web.de>
1903
1904         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1905           corrected typos...
1906         * device/include/pic16/signal.h: added USBIF
1907           and SIG_USB
1908
1909 2005-06-24 Raphael Neider <rneider AT web.de>
1910
1911         * device/lib/pic16/libdev/pic18f2455.c,
1912           device/include/pic16/pic18f2455.h: NEW
1913         * device/include/pic16/pic18fregs.h,
1914           device/lib/pic16/pics.all,
1915           src/pic16/device.c: added 18f2455
1916         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1917           device/include/pic16/{pic18f[68][567].h,usart.h}:
1918           replaced MULTIPLE_USARTS define with more relaible
1919           compatibility sfrs (for USART access)
1920
1921 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1922
1923         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1924           and the output asm file line is printed on two lines.
1925
1926 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1927
1928         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1929           BGT, BLE, BHI, and BLS instructions
1930         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1931           genCmpEq): removed
1932         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1933           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1934           fixes bug #1216342
1935         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1936
1937 2005-06-15 Raphael Neider <rneider AT web.de>
1938
1939         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1940         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1941         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1942           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1943           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1944
1945 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1946
1947         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1948           Marcel Telka in bug #1215704
1949
1950 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1951
1952         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1953           located in shared memory bank.
1954
1955 2005-05-31 Raphael Neider <rneider AT web.de>
1956
1957         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1958           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1959           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1960
1961 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1962
1963         * device/lib/_strncpy.c: fixed the fix
1964
1965 2005-05-26 Raphael Neider <rneider AT web.de>
1966
1967         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1968           initializers with \0, bug #1208187
1969         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
1970           intializers with \0, bug #1208187
1971
1972 2005-05-26 Raphael Neider <rneider AT web.de>
1973
1974         * src/pic16/glue.c (pic16_printIvalChar): fixed string
1975           initializers with \0, bug #1208187
1976         * src/pic16/main.c (_process_pragma): added sanity checks
1977           for stack position and size, emit warnings when appropriate
1978
1979 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1980
1981         * device/lib/_strncpy.c: fixed not filling with \0
1982
1983 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1984
1985         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
1986           createFunction),
1987         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
1988           compound_statement),
1989         * src/SDCCsymt.h,
1990         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
1991
1992 2005-05-24 Raphael Neider <rneider AT web.de>
1993
1994         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
1995
1996 2005-05-24 Raphael Neider <rneider AT web.de>
1997
1998         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
1999           TRISE definitions, closes bug #1162453
2000
2001 2005-05-22 Raphael Neider <rneider AT web.de>
2002
2003         * src/pic16/main.c (_process_pragma): check for missing
2004           arguments to pragmas code and udata
2005         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2006           consistency fixes to match other headers (thanks to Jim Paris)
2007         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2008
2009 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2010
2011         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2012
2013 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2014
2015         * support/regression/tests/bug1198642.c: new test
2016         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2017         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2018         * support/scripts/resource.h,
2019         * support/scripts/resource.rc,
2020         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2021         * support/scripts/sdcc.ico: added 32x32 icon
2022
2023 2005-05-18 Raphael Neider <rneider AT web.de>
2024
2025         * device/lib/pic16/libdev/pic18f*.c,
2026         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2027           keywords to "__sfr" and "__at (X)"
2028         * device/include/pic16/pic18fregs.h: added pic18f4520
2029         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2030           #1203088 (MPLAB compatibility)
2031
2032 2005-05-17 Raphael Neider <rneider AT web.de>
2033
2034         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2035         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2036         * device/lib/pic16/pics.all: added new devices
2037         * src/pic16/device.c: added support for pic18f4520
2038
2039 2005-05-16 Raphael Neider <rneider AT web.de>
2040         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2041         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2042         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2043           convenience function for bit access
2044
2045 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2046
2047         * device/lib/printf_large.c: fixed bug 1193299
2048         * support/regression/tests/bug1057979.c: added test %3.3s
2049
2050 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2051
2052         * device/include/mcs51/8051.h,
2053         * device/include/mcs51/8052.h: made parseable with lint
2054         * device/include/mcs51/lint.h: added include file for (sp)lint
2055         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2056         * doc/cdbfileformat.lyx,
2057         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2058
2059 2005-05-14 Raphael Neider <rneider AT web.de>
2060
2061         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2062         * device/lib/pic16/libc/stdlib/itoa.c (new)
2063         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2064         * device/lib/pic16/libio/Makefile: exclude subdir according to
2065           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2066         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2067         * src/pic16/gen.c (genFunction): prevent annoying warning
2068         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2069           nameclashes on BeOS
2070         * support/cpp2/cppmain.c (cpp_output_string): new
2071         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2072           fixes bug 1116802
2073
2074 2005-05-13 Borut Razem <borut.razem AT siol.net>
2075
2076         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2077
2078 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2079
2080         * .version: changed to version 2.5.1; back to bleeding edge development
2081
2082 2005-05-11 Borut Razem <borut.razem AT siol.net>
2083
2084         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2085           generate PDF version 1.3 documents
2086
2087 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2088
2089         * .version: changed to version 2.5.0
2090
2091 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2092
2093         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2094
2095 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2096
2097         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2098         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2099         well as many smaller updates.
2100         * .version: changed to version 2.5.0-pre1
2101
2102 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2103
2104         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2105
2106 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2107
2108         * support/regression/tests/bug1185672.c: added
2109         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2110           bug 1185672
2111         * src/mcs51/gen.c (genCall): added comments, made it look safer
2112         * src/mcs51/gen.c (genEndFunction): simplified
2113
2114 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2115
2116         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2117
2118 2005-04-14 Borut Razem <borut.razem AT siol.net>
2119
2120         * fixed bug 1045046 - SIGSEGV with really simple code?:
2121           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2122           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2123
2124 2005-04-14 Borut Razem <borut.razem AT siol.net>
2125
2126         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2127           src/pic16/device.h: temporarily disabled experimental #inline pragma
2128           for 2.5.0 release
2129
2130 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2131
2132         * device/include/z80/stdio.h,
2133         * device/include/z80/string.h: removed these highly incomplete files so
2134           SDCC can use the default ones in device/include/
2135
2136 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2137
2138         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2139         gcc warning.
2140         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2141         fix sdcpp warnings.
2142
2143 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2144
2145         * device/include/malloc.h: removed redundant __reentrant prototypes
2146         * device/lib/_mullong.c: added working xstack variant in asm (C version
2147           doesn't pass regression tests)
2148         * device/lib/bpx.c: used __data and made bpx char for mcs51
2149         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2150           (createFunction): fixed bug with xstackPtr
2151         * src/SDCCcse.c: corrected comments
2152         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2153           (killDeadCode, eBBlockFromiCode): removed unused code
2154         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2155           corrected comments
2156         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2157           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2158           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2159           (genModOneByte): fixed warning in MSVC
2160         * src/mcs51/main.c (): added comments
2161         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2162
2163 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2164
2165         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2166
2167 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2168
2169         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2170
2171 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2172
2173         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2174         characters arrays of larger size than the declared one.
2175
2176 2005-04-10 Borut Razem <borut.razem AT siol.net>
2177
2178         * src/pic/gen.c (genInline),
2179           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2180           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2181           (findNextInstruction), (findPrevInstruction),
2182           (findInstructionUsingLabel),
2183           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2184         * src/pic/pcode.c (findLabel): added missing '\n'
2185         * src/src.dsp: added SDCCdwarf2.c to the project
2186
2187 2005-04-09 Borut Razem <borut.razem AT siol.net>
2188
2189         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2190
2191 2005-04-08 Raphael Neider <rneider AT web.de>
2192
2193         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2194           into the chain after a given one) and mergeDefmapSymbols (combine
2195           defmap entries for each symbol per pcode)
2196         * (createDefmap): have defmap entries merged in the end
2197         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2198           a symbol before replacing one access type's symbol, merge symbols in
2199           the end (replacement symbol might already have an entry)
2200         * (assignValnums): keep reference to written WREG intact
2201
2202 2005-04-08 Raphael Neider <rneider AT web.de>
2203
2204         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2205           Alpha)
2206
2207 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2208
2209         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2210         bytes
2211
2212 2005-04-07 Raphael Neider <rneider AT web.de>
2213
2214         * device/include/pic16/usart.h: added compatibility defines for
2215           devices with more than one USART
2216         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2217
2218 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2219
2220         * device/lib/Makefile.in: updated for port specific include
2221
2222 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2223
2224         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2225
2226 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2227
2228         * device/include/8051.h,
2229         * device/include/8052.h,
2230         * device/include/at89S8252.h,
2231         * device/include/at89c55.h,
2232         * device/include/at89x051.h,
2233         * device/include/at89x51.h,
2234         * device/include/at89x52.h,
2235         * device/include/mcs51reg.h,
2236         * device/include/reg51.h,
2237         * device/include/reg764.h,
2238         * device/include/regc515c.h,
2239         * device/include/sab80515.h: (re)moved these 12 files
2240         * device/include/mcs51/8051.h,
2241         * device/include/mcs51/8052.h,
2242         * device/include/mcs51/at89S8252.h,
2243         * device/include/mcs51/at89c55.h,
2244         * device/include/mcs51/at89x051.h,
2245         * device/include/mcs51/at89x51.h,
2246         * device/include/mcs51/at89x52.h,
2247         * device/include/mcs51/mcs51reg.h,
2248         * device/include/mcs51/reg51.h,
2249         * device/include/mcs51/reg764.h,
2250         * device/include/mcs51/regc515c.h,
2251         * device/include/mcs51/sab80515.h: and added them here
2252
2253 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2254
2255         * device/include/stdarg.h: changed SDCC specific keywords to double
2256           underlined form.
2257         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2258           mcs51 and ds390.
2259         * device/include/hc08/mc68hc908gp32.h,
2260         * device/include/hc08/mc68hc908jb8.h,
2261         * device/include/hc08/mc68hc908jkjl.h,
2262         * device/include/hc08/mc68hc908qy.h: fixed comments
2263         * device/include/mcs51/README: updated
2264         * device/include/mcs51/c8051f120.h: added PINRSF
2265         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2266         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2267           amidst code. Also inline is not supported.
2268
2269 2005-04-06 Raphael Neider <rneider AT web.de>
2270
2271         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2272         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2273           callers stack/frame pointers
2274
2275 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2276
2277         * device/include/pic16/usart.h: added, missing in previous commit,
2278         * device/include/pic16/adc.h: fixed typo,
2279         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2280         commit,
2281         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2282         <p18fxxx.inc>
2283         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2284         uninitialized because a bug appears with gplink
2285         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2286         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2287         complains for unrecognised option
2288
2289 2005-04-05 Raphael Neider <rneider AT web.de>
2290
2291         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2292           structs as well (using memcpy)
2293         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2294           on ISRs (GOTO has no label)
2295         * src/pic16/device.h: added OF_OPTIMIZE_DF
2296         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2297           new data flow analysis/optimization
2298         * src/pic16/pcode.c: added (prototypes for and implementation of)
2299           dataflow analysis functions, fixed pCodeInstructions' inCond and
2300           outCond values, made RCALL a branch instruction
2301         * (pic16_unlinkpCode): keep C line if possible
2302         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2303           C line moved if possible
2304         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2305         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2306           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2307         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2308           new flow)
2309         * (pic16_getJumptabpCode): NEW, needed in...
2310         * (LinkFlow): fixed handling of jumptables, calls and conditional
2311           branches
2312         * (pic16_InsertCommentAfter): NEW
2313         * (pic16_pCodeReplace): made verbose and flow preserving
2314         * (AnalyzeFlow): added call to data flow analysis
2315         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2316         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2317         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2318
2319 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2320
2321         * src/SDCCast.c (decorateType): fixed bug #1105626
2322
2323 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2324
2325         * device/include/asm/pic16/features.h,
2326         * pic18f*.h headers,
2327         * device/include/pic16/adc.h,
2328         * device/include/pic16/delay.h,
2329         * device/include/pic16/i2c.h,
2330         * device/include/pic16/malloc.h,
2331         * device/include/pic16/stdio.h,
2332         * device/include/pic16/stdlib.h,
2333         * device/include/pic16/string.h,
2334         * device/lib/pic16/libc/stdio/printf_tiny.c,
2335         * device/lib/pic16/libc/stdio/printf_small.c,
2336         * device/lib/pic16/libc/stdio/strmgpsim.c,
2337         * device/lib/pic16/libc/stdio/strmmssp.c,
2338         * device/lib/pic16/libc/stdio/strmusart.c,
2339         * device/lib/pic16/libc/stdio/vfprintf.c,
2340         * device/lib/pic16/libc/stdlib/ltoa.c,
2341         * device/lib/pic16/libc/stdlib/putchar.c,
2342         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2343         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2344         * device/lib/pic16/libc/stdlib/memchrram.c,
2345         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2346         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2347         * device/lib/pic16/libio/adc/adcbusy.c,
2348         * device/lib/pic16/libio/adc/adcread.c,
2349         * device/lib/pic16/libio/adc/adcsetch.c,
2350         * device/lib/pic16/libio/usart/ubaud.c,
2351         * device/lib/pic16/libio/usart/ubusy.c,
2352         * device/lib/pic16/libio/usart/udrdy.c,
2353         * device/lib/pic16/libio/usart/uopen.c,
2354         * device/lib/pic16/libio/usart/uputc.c,
2355         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2356         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2357         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2358         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2359         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2360         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2361         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2362         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2363         specific keywords to double underlined form,
2364         * device/lib/pic16/libc/Makefile.rules,
2365         * device/lib/pic16/libsdcc/Makefile.rules,
2366         * device/lib/pic16/libm/Makefile,
2367         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2368         to compile with C standard set in Makefile.common
2369         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2370         rand.c and crc.c in compilation process,
2371         * device/lib/pic16/libsdcc/int/divuint.c,
2372         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2373         `c' from signed to unsigned,
2374         * device/lib/pic16/startup/crt0.c,
2375         * device/lib/pic16/startup/crt0i.c,
2376         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2377         keywords to double underlined form, bug fixes in _do_cinit function
2378         which prevented the correct initialization of the .idata segment,
2379         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2380         core to enter a infinite loop
2381         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2382
2383 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2384
2385         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2386
2387 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2388
2389         * device/include/Makefile.in: add support for hc08 subdirectory
2390         * device/include/hc08/: new subdirectory
2391         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2392         Lucas Loizaga, thanks!
2393         * device/include/hc08/mc68hc908qy.h,
2394         * device/include/hc08/mc68hc908gp32.h,
2395         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2396         their own directory. Changed internal macro names to use the compiler
2397         reserved namespace. Changed SDCC specific keywords to double
2398         underlined form.
2399         * device/include/math.h,
2400         * device/include/malloc.h,
2401         * device/include/stdarg.h,
2402         * device/include/stdbool.h
2403         * device/include/string.h,
2404         * device/include/tinibios.h,
2405         * device/include/ds400rom.h,
2406         * device/include/8051.h,
2407         * device/include/8052.h,
2408         * device/include/80c51xa.h,
2409         * device/include/at89c55.h,
2410         * device/include/at89S8252.h,
2411         * device/include/at89x51.h,
2412         * device/include/at89x52.h,
2413         * device/include/ds80c390.h,
2414         * device/include/reg764.h,
2415         * device/include/regc515c.h,
2416         * device/include/sab80515.h,
2417         * device/include/mcs51/c8051f000.h,
2418         * device/include/mcs51/c8051f018.h,
2419         * device/include/mcs51/c8051f020.h,
2420         * device/include/mcs51/c8051f040.h,
2421         * device/include/mcs51/c8051f060.h,
2422         * device/include/mcs51/c8051f120.h,
2423         * device/include/mcs51/c8051f300.h,
2424         * device/include/mcs51/c8051f310.h,
2425         * device/include/mcs51/c8051f320.h,
2426         * device/include/mcs51/c8051f330.h,
2427         * device/include/mcs51/c8051f350.h,
2428         * device/include/z180.h: Changed SDCC specific keywords to double
2429         underlined form.
2430
2431 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2432
2433         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2434         18F4455,
2435         * (pic16_assignConfigWordValue): disable testing of configuration
2436         register value with config mask,
2437         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2438         function with port->fun_prefix,
2439         * (genFunction): when generating a naked interrupt function never
2440         create an absolute segment placed in interrupt vector address, place
2441         the actual interrupt function at IVA instead, when an interrupt
2442         function is generated with unspecified interrupt then do not create
2443         the absolute section,
2444         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2445         code for generating a call to generic pointer get/put function with
2446         a call to function pic16_callGenericPointer(),
2447         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2448         the call to the generic pointer get/put functions with prefixing the
2449         function name with port->fun_prefix,
2450         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2451         * src/pic16/main.c (_process_pragma): prefix function with
2452         port->fun_prefix,
2453         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2454         calling assembler, old 18Fxxxx macro is deprecated,
2455         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2456         PC_ASMDIR in while condition,
2457         * (findInstruction): add PC_ASMDIR in while condition,
2458         * (buildCallTree): prefix main with port->fun_prefix,
2459         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2460         identifier for variable with banked access in instructions BTFSS,
2461         BTFSC, BCF, BSF, BTG
2462         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2463         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2464         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2465         perform optimization when enviroment variable NO_REG_OPT is set,
2466         * (insideLRBlock): NEW, return 1 if register is inside an
2467         INF_LOCALREGS block,
2468         * (RemoveRegFromLRBlock): remove a register that is completely
2469         eliminated by register optimization, but it is still left in local
2470         register store/restore in/from stack block,
2471         * (Remove2pcodes): after removing register, check to see if it
2472         should be removed from local register store/restore in/from stack
2473         block,
2474         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2475         DUMMY_READ_VOLATILE,
2476
2477         * device/include/pic16/adc.h: minor prototype modifications and
2478         update,
2479         * device/include/pic16/malloc.h: added GPL notice various
2480         modifications,
2481         * device/include/pic16/stdint.h: NEW, standard header for ints
2482         * device/include/pic16/delay.h: NEW, header for delay functions,
2483         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2484         delay1mtcy,
2485         * device/include/pic16/signal.h: NEW, header providing helper macros
2486         for implementing signal handlers,
2487         * device/include/pic16/stdio.h: added prototypes for functions,
2488         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2489         prototypes for stdin and stdout, added macro PUTCHAR to
2490         automatically implement putchar function prototype,
2491         * device/include/pic16/usart.h: modified and updated USART library,
2492         * device/lib/pic16/libio/adc/,
2493         * device/lib/pic16/libio/i2c: some modifications to improve library
2494         performance,
2495         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2496         family of functions,
2497         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2498         family of functions and other sources,
2499         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2500         of the PIC18Fxx[28] devices,
2501         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2502         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2503         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2504         _do_cinit function, because the previous failed when local variables
2505         where not placed in the same memory bank,
2506         * device/lib/pic16/libsdcc/char/: various modifications to improve
2507         library performance,
2508         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2509         information on the new functions of the c library and more...
2510
2511 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2512
2513         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2514
2515 2005-03-26 Raphael Neider <rneider AT web.de>
2516
2517         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2518           if condition == CARRY)
2519         * (genCmp): adapted to new genSkipc semantics
2520         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2521           on rIfx (genCmp was broken)
2522
2523 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2524
2525         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2526         * src/z80/main.c (_keywords[]),
2527         * src/SDCCglobal.h (struct options),
2528         * src/SDCC.y,
2529         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2530         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2531         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2532         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2533         always available in leading double underscore form. The C99 support is
2534         mostly missing, but it's a start.
2535         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2536         reserved identifier "__data".
2537
2538 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2539
2540         * src/mcs51/peeph.def: fixed bug 1170013
2541
2542 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2543
2544         * device/include/mcs51reg.h: fixed bug 842007
2545
2546 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2547
2548         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2549         last time.
2550
2551 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2552
2553         * src/port.h (struct PORT),
2554         * src/avr/ralloc.c (avr_assignRegisters),
2555         * src/avr/main.c,
2556         * src/ds390/ralloc.c (ds390_assignRegisters),
2557         * src/ds390/main.c,
2558         * src/hc08/ralloc.c (hc08_assignRegisters),
2559         * src/hc08/main.c,
2560         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2561         * src/mcs51/main.c,
2562         * src/pic/ralloc.c (pic14_assignRegisters),
2563         * src/pic/main.c,
2564         * src/pic16/ralloc.c (pic16_assignRegisters),
2565         * src/pic16/main.c,
2566         * src/xa51/ralloc.c (xa51_assignRegisters),
2567         * src/xa51/main.c,
2568         * src/z80/ralloc.c (z80_assignRegisters),
2569         * src/z80/ralloc.h,
2570         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2571         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2572         * src/SDCCcse.h,
2573         * src/SDCCdflow.c (computeDataFlow),
2574         * src/SDCCdflow.h,
2575         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2576         * src/SDCCloop.h,
2577         * src/SDCCcflow.c (*),
2578         * src/SDCCcflow.h,
2579         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2580         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2581         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2582         immedDom() returning wrong block; probably fixes bug #1160833)
2583
2584 2005-03-20 Borut Razem <borut.razem AT siol.net>
2585
2586         * support/scripts/inc2h.pl: WIN32 port
2587
2588 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2589
2590         * device/lib/makefile.in: added abs.c and labs.c
2591
2592 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2593
2594         * device/include/stdint.h: added
2595         * device/lib/abs.c: added
2596         * device/lib/labs.c: added
2597         * device/include/stdlib.h: added abs() and labs() prototypes
2598         * device/lib/libsdcc.lib: added abs and labs
2599         * device/include/float.h,
2600         * device/lib/_fsmul.c,
2601         * device/lib/printf_fast.c,
2602         * device/lib/printf_tiny.c: updated comments
2603
2604 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2605
2606         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2607         bug #1164313
2608
2609 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2610
2611         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2612         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2613
2614 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2615
2616         * device/lib/printf_large.c: removed inline assembly for portability and
2617           readability. Use printf_fast if speed or size are more important.
2618         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2619         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2620
2621 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2622
2623         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2624         prevent compiler warning
2625
2626 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2627
2628         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2629         moved to level 0 and declared as static. Also they are explicit
2630         placed in access bank. This was necessery because some times they
2631         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2632         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2633         optimizations. Currently only compare to unsigned char is implemented,
2634         * src/pic16/gen.c: added fReturnIdx array,
2635         * (struct resolvedIfx) is moved to gen.h and made public,
2636         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2637         * (aopForSym): added an optimization to directly store in stack of
2638         the operand of a SEND iCode,
2639         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2640         but as registers instead (AOP_REG) using the fReturnIdx array,
2641         * (pic16_freeAsmop): remove the freed register from the
2642         _G.sregsAlloc field,
2643         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2644         a compare of 'WREG',
2645         * (pic16_popGetTempRegCond): changed function prototype, now
2646         function takes also a bitVector argument v which holds the current
2647         set of registers that are allocated for stack access by aopForSym,
2648         registers allocated in aopForSym for accessing stack symbols are not
2649         any more part of the functions usedRegs field,
2650         * (genCall): some times aopOp is called for a stack variable to be
2651         send, aopForSym might perform the push, if this is true make sure
2652         that genCall doesn't push the variable twice by testing _G.resDirect,
2653         * (genFunction): changed testing for unspecified interrupt number
2654         from 256 to INTNO_UNSPEC,
2655         * modified selection scheme of frame pointer generation. Previously
2656         if function did use local registers a frame pointer was generated,
2657         now a frame pointer is generated only if function has arguments
2658         (that need PLUSW2 register access), or has stack arguments, or the
2659         compiler is not instructed to omit the frame pointer,
2660         * (genEndFunction): before restoring local registers that were saved
2661         in the function preamble, also restore the registers that *might*
2662         have been allocated for stack access,
2663         * (genRet): removed some old comments,
2664         * (genCmp, the active (RN's) version): added a call to the
2665         pic16_genCmp_special function to perform the compare with a more
2666         robust and optimized way,
2667         * (genInline): a feature has been added in inline code generation,
2668         which allows a wildcard variable substitution when writing inline
2669         assembly. Code is incomplete and experimental therefore undocumented,
2670         * (genCast): changed order of aopOp for result and right to allow
2671         aopForSym to directly load the result if possible,
2672         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2673         perform an optimized compare on some selected special occasions,
2674         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2675         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2676         generate an IVT any more,
2677         * src/pic16/main.c (pic16_optionsTable): added command line option
2678         --optimize-cmp,
2679         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2680         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2681         macros,
2682         * src/pic16/NOTES: Raphael Neider added in list of active developers
2683         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2684         jumptable_end to prevent bug #,
2685         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2686         inCond and outCond fields,
2687         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2688         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2689         turn off register spilling,
2690         * (packRegsForOneUse): synced with other ports' versions although it
2691         is not used currently,
2692         * (pic16_packRegisters): added an optimization while reading
2693         structure bitfields, some registers may be saved (malloc code is
2694         decreased by 80 bytes)
2695
2696 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2697
2698         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2699         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2700         this can be optimized more?
2701
2702 2005-03-10 Raphael Neider <rneider AT web.de>
2703
2704         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2705           genNearPointerGet): (hopefully) fixed access to bitfields via
2706           pointers (p->bitN = x; and x = p->bitN; failed)
2707
2708 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2709
2710         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2711
2712 2005-03-09 Raphael Neider <rneider AT web.de>
2713
2714         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2715
2716 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2717
2718         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2719         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2720           (regTypeNum): set REG_BIT type if necessary
2721         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2722         * support/regression/tests/critical.c: check bug 1144613
2723
2724 2005-03-02 Raphael Neider <rneider AT web.de>
2725
2726         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2727
2728 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2729
2730         * src/avr/ralloc.c (serialRegAssign),
2731         * src/ds390/ralloc.c (serialRegAssign),
2732         * src/hc08/ralloc.c (serialRegAssign),
2733         * src/mcs51/ralloc.c (serialRegAssign),
2734         * src/pic/ralloc.c (serialRegAssign),
2735         * src/pic16/ralloc.c (serialRegAssign),
2736         * src/xa51/ralloc.c (serialRegAssign),
2737         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2738
2739 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2740
2741         * src/SDCCast.c (decorateType): fixed bug 1124787
2742
2743 2005-02-20 Hubert Sack <sack AT digiplan.de>
2744         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2745
2746         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2747         patch #1121755
2748
2749 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2750
2751         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2752         to keep the correct label reference count when adding/removing references
2753         to labels. A peephole file using this is appended to patch #1144962.
2754
2755 2005-02-14 Raphael Neider <rneider AT web.de>
2756
2757         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2758         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2759         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2760           retrievals of result operand's value on assignment
2761
2762 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2763
2764         * device/include/pic16/string.h: modified prototype for memccpy()
2765         to memccpy(void *, void *, char, size_t)
2766         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2767         check whether to omit frame pointer or not,
2768         * (genInline): convert all occurences of "\n" to LF in inline
2769         assembler blocks, this helps formatting the inline text,
2770         * (pic16_loadFSR0): modified prototype,
2771         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2772         removed some 8051 legacy code,
2773         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2774         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2775         before allocating temporary registers in functions,
2776
2777 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2778
2779         * support/regression/tests/bitvars.c: corrected the "fix"
2780
2781 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2782
2783         * support/regression/tests/bitvars.c,
2784         * support/regression/tests/bitwise.c,
2785         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2786
2787 2005-02-10 Raphael Neider <rneider AT web.de>
2788
2789         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2790           different size for Alpha
2791         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2792
2793 2005-02-09 Raphael Neider <rneider AT web.de>
2794
2795         * src/SDCC.lex(doPragma) : save and restore warning options as well
2796           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2797         * have #pragma less_pedantic set the errorlevel to WARNING
2798           (fixes #1117001)
2799         * (cloneOptimize) : fixed wrong malloc's size
2800         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2801           facilitate correct handling of #pragma (save|restore)
2802
2803 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2804
2805         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2806
2807 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2808
2809         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2810
2811 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2812
2813         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2814
2815 2005-02-02 Raphael Neider <rneider AT web.de>
2816
2817         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2818         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2819         * (pic16_storeForReturn): fixed to allow returning function pointers
2820         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2821         * device/include/pic16/{stddef.h,stdbool.h}: added
2822
2823 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2824
2825         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2826
2827 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2828
2829         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2830         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2831          appeared to be required
2832
2833 2005-01-31 Borut Razem <borut.razem AT siol.net>
2834
2835         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2836           include/mcs51 and include/z80 directories to the package
2837
2838 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2839
2840         * src/hc08/gen.c (genFunction): fixed bug #1112752
2841
2842 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2843
2844         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2845
2846 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2847
2848         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2849
2850 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2851
2852         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2853
2854 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2855
2856         * device/include/c8051fxxx.h: removed these 6 files
2857         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2858
2859 2005-01-26 Raphael Neider <rneider AT web.de>
2860
2861         * src/pic16/gen.c (genAssign): fixed assignment from longs
2862           in codespace (were cut to three bytes)
2863         * (genDummyRead): implemented (except for CODESPACE...),
2864           fixed bug #1108575
2865         * src/pic16/glue.c (emitStatistics): beautified
2866         * device/lib/pic16/libm/Makefile: added include path
2867
2868 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2869
2870         * src/z80/gen.c (aopPut): fixed bug #1103902
2871
2872 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2873
2874         * device/lib/expf.c: fixed bug #1095792
2875
2876 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2877
2878         * device/lib/pic16/libm: added Math library sources
2879
2880 2005-01-24 Raphael Neider <rneider AT web.de>
2881
2882         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2883           to enable upcast to pCodeOpReg2 (there is no type tag to
2884           differenciate the two and pic16_popGet2p cast into PCOR2)
2885         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2886           (sizeof(sectNames) changed to sizeof(sectName))
2887           Both patches fix segfaults under MinGW.
2888
2889 2005-01-23 Raphael Neider <rneider AT web.de>
2890
2891         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2892           Safe_[mc]?alloc()'ed variables
2893         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2894           of (byte sized) temporaries (assign them to WREG for now)
2895         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2896           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2897           this might fix SIGSEGVs on MinGW...
2898         * src/SDCCopt.c (killDeadCode): restored original behaviour
2899           (volatile operands might get thrown away though)
2900
2901 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2902
2903         * src/pic16/gen.c: fixed bug #1106975,
2904         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2905         pointer update, INTCON is saved, global interrupts are disabled and
2906         restored after updateing TOS.
2907         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2908         * added function attribute 'shadowregs' to take advantage of shadow
2909         registers,
2910         * added function attribute 'wparam' as an alternative to the wparam
2911         pragma,
2912         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2913         user declares a non-ISR function as 'shadowregs',
2914         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2915
2916 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2917
2918         * .version: bumped version number to 2.4.8
2919         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2920         pic16 port,
2921         * device/lib/pic16/libio/i2c/: I2C module support library,
2922         * device/include/pic16/i2c.h: I2C support library header,
2923         * device/lib/pic16/libc/stdio/: standard IO support sources,
2924         * (printf_small.c): printf_small() source, supports float print,
2925         * (printf_tiny.c): printf_tiny() source, does not support floats,
2926         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2927         enable global optimizations for entire library source, other
2928         Makefiles in the source tree are also modified to reflect this,
2929         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2930         function,
2931         * doc/sdccman.lyx: updated to reflect new changes,
2932         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2933         sym->onStack if-case,
2934         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2935         sbit, idata, _idata, xdata, _xdata,
2936         * added pragma library, to link an external library, (see doc),
2937         * removed command line options, --pomit-config-words, --pomit-ivt,
2938         --pleave-reset-vector,
2939         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2940         when calling assembler to reflect memory model used, also define
2941         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2942         reflect stack model used,
2943         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2944         on stack return NULL,
2945
2946 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2947
2948         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2949           of the operands is volatile. Fixes #1020220
2950
2951 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2952
2953         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2954         * (OptimizeRegUsage): make sure that there is really no other flow where
2955           the first pCode is used
2956
2957 2005-01-22 Raphael Neider <rneider AT web.de>
2958
2959         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2960           to fix #1106967 (pCode->seq are not set up correctly)
2961
2962 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2963
2964         * src/SDCCglue.c (glue): make sure code area is declared before the
2965         static initialization area.
2966
2967 2005-01-21 Raphael Neider <rneider AT web.de>
2968
2969         * device/lib/Makefile.in: fixed test for pic16 install dir
2970         * device/lib/pic16/*/Makefile*: modified compile flags to enable
2971           optimizations
2972         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
2973           added --optimize-goto compiler switch and pragma wparam documentation
2974         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
2975         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
2976           and PRODH closing bug #1071770 (peephole optimizer)
2977
2978 2005-01-19 Raphael Neider <rneider AT web.de>
2979
2980         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
2981           cmdLine buffers (used when calling sdcpp...) are large enough
2982           (MAX_PATH=256 truncates arguments leading to system halts when
2983           used in MinGW...)
2984         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
2985         * (genUminus): rewritten to for efficiency
2986         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
2987           used uninitialized in some cases)
2988         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
2989           copy the third byte from the int -- now assumes 0x80 (data memory)
2990         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
2991           operands (genAddLit expects the iCode's operands to swapped as
2992           well), fixed leftover bytes (crashed for short left operands)
2993         * (pic16_genMinusDec): performance improvements, removed false
2994           PIC14 emitSKPNCs
2995         * (pic16_genMinus): fixed to cope with differently sized operands
2996         * src/pic16/glue.c (pic16_glue): added new banksel optimization
2997           for --obanksel > 1
2998         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
2999         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3000           new banksel optimization
3001         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3002           analysis for temporary registers (segfaults...)
3003         * src/pic16/peeph.def: added rule
3004
3005 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3006
3007         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3008         which converts a float number to its ASCII representation
3009         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3010         functions to convert the fractional and integer part of a float to ASCII,
3011         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3012         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3013         ram
3014         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3015         _STATMEM macros,
3016         * device/include/pic16/adc.h: added GPL info,
3017         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3018         a pCodeOp as tested operand,
3019         * (genNearPointerGet): optimized bit testing, does not use
3020         intermediate register for bit value, test directly instead with
3021         BTFSS, BTFSC, works only for single bits,
3022         * (genpic16Code): dump the name of the iCode in the asm,
3023         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3024         renamed to pic16_decodeOp,
3025         * (serialRegAssign): do not allocate a temporary register for iCode
3026         sequences that test a single bit for 1/0
3027
3028 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3029
3030         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3031         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3032         access stack and frame pointers. They are initially assigned to
3033         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3034         accessing SFRs. Updated all occurences of modification of stack or
3035         frame pointer in gen.c and pcode.c,
3036         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3037         assigning of a literal value to pointers,
3038         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3039         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3040         selected
3041
3042 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3043
3044         * doc/sdccman.lyx: update documentation about stack pragma, added
3045         some info for stack memory models
3046
3047 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3048
3049         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3050
3051 2005-01-08 Raphael Neider <rneider AT web.de>
3052
3053         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3054           udata sections to fix bug #1097823
3055
3056 2005-01-05 Raphael Neider <rneider AT web.de>
3057
3058         * src/pic16/gen.c (genGenericShift): added handling of differently
3059           sized left operand and result
3060
3061 2005-01-04 Raphael Neider <rneider AT web.de>
3062
3063         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3064         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3065           to hold the condition bit)
3066         * added new version of genCmp (old code available via #define)
3067         * added new version of genShiftLeft/genShiftRight in a generic
3068           way, now supports shifting by negative values
3069         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3070           shiftCount (expected by genGenericShift)
3071         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3072         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3073           dump
3074         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3075           is an invalid literal too...)
3076
3077 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3078
3079         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3080         from Raphael Neider,
3081         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3082         for 8-bit literals. This fixes some literal operands which are sign
3083         extended to 16-bits ints when instruction needs only 8-bits.
3084
3085 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3086
3087         * device/lib/logf.c: added mcs51 assembly version
3088         * device/lib/expf.c: added mcs51 assembly version
3089         * device/lib/_logexpf.c: new shared asm code for expf and logf
3090         * device/include/math.h: add defines for assembly math library
3091         * device/lib/Makefile.in: build new _logexpf.c
3092         * device/lib/libfloat.lib: use new _logexpf.c
3093
3094 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3095
3096         * src/pic/device.c
3097         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3098           device types which have less than 0x7f registers.
3099
3100 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3101
3102         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3103
3104 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3105
3106         * device/lib/printf_fast.c: only build on supported arch.
3107         * device/lib/printf_tiny.c: only build on supported arch.
3108         * device/lib/printf_fast_f.c: only build if asm float lib
3109         * device/lib/_fsget1arg.c: only build if asm float lib
3110         * device/lib/_fsget2args.c: only build if asm float lib
3111         * device/lib/_fsnormalize.c: only build if asm float lib
3112         * device/lib/_fsreturnval.c: only build if asm float lib
3113         * device/lib/_fsrshift.c: only build if asm float lib
3114         * device/lib/_fsswapargs.c: only build if asm float lib
3115         * device/include/stdio.h: don't provide print_fast,
3116           print_fast_f, print_tiny prototypes if --xstack used
3117
3118 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3119
3120         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3121         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3122           to the SOURCES
3123
3124 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3125
3126         * device/lib/printf_fast_f.c: same as printf_fast, but
3127           with floating point enabled
3128         * device/lib/printf_fast.c: minor tweaks
3129         * device/include/stdio.h: add printf_fast_f
3130
3131 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3132
3133         * src/SDCCmain.c: make --float-reent default for mcs51
3134         * device/lib/_fsadd.c: added mcs51 assembly version
3135         * device/lib/_fssub.c: added mcs51 assembly version
3136         * device/lib/_fsmul.c: added mcs51 assembly version
3137         * device/lib/_fsdiv.c: added mcs51 assembly version
3138         * device/lib/_fseq.c: added mcs51 assembly version
3139         * device/lib/_fsneq.c: added mcs51 assembly version
3140         * device/lib/_fsgt.c: added mcs51 assembly version
3141         * device/lib/_fslt.c: added mcs51 assembly version
3142         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3143         * device/lib/Makefile.in: add _fscmp to build
3144         * device/lib/libfloat.lib: add _fscmp to build
3145
3146 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3147
3148         * device/lib/_fs2slong.c: added mcs51 assembly version
3149         * device/lib/_fs2sint.c: added mcs51 assembly version
3150         * device/lib/_fs2schar.c: added mcs51 assembly version
3151         * device/lib/_fs2ulong.c: added mcs51 assembly version
3152         * device/lib/_fs2uint.c: added mcs51 assembly version
3153         * device/lib/_fs2uchar.c: added mcs51 assembly version
3154         * device/lib/_slong2fs.c: added mcs51 assembly version
3155         * device/lib/_sint2fs.c: added mcs51 assembly version
3156         * device/lib/_schar2fs.c: added mcs51 assembly version
3157         * device/lib/_ulong2fs.c: added mcs51 assembly version
3158         * device/lib/_uint2fs.c: added mcs51 assembly version
3159         * device/lib/_uchar2fs.c: added mcs51 assembly version
3160         * device/include/float.h: added #define to select asm vs c
3161
3162 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3163
3164         * device/lib/printf_fast.c: improvements to float output
3165         * device/include/float.h: add defines for assembly float library
3166         * device/lib/_fsget1arg.c: receive 1 float arg
3167         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3168         * device/lib/_fsnormalize.c: normalize a float
3169         * device/lib/_fsreturnval.c: return float, various helper routines
3170         * device/lib/_fsrshift.c: right shift a float's mantissa
3171         * device/lib/_fsswapargs.c: swap 2 floats
3172         * device/lib/Makefile.in: build these 6 new files for mcs51
3173         * device/lib/libfloat.lib: add these 6 files to the library
3174
3175 2004-12-26 Borut Razem <borut.razem AT siol.net>
3176
3177         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3178           built by gcc 3.4.2
3179
3180 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3181
3182         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3183           and fully reentrant and register bank neutral.
3184         * device/lib/printf_fast.c: added float (not enabled by default),
3185           added compact/slower integer (also not enabled by default),
3186           improved size/speed of fast integer code, other minor changes
3187         * device/include/stdio.h, device/lib/Makefile.in,
3188           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3189
3190 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3191
3192         * src/pic16/pcode.c: declaring variables other than at the start of a
3193           block is not supported in C by VC6.
3194
3195 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3196
3197         * applied a previous patch from Raphael Neider that wasn't included
3198         in the previous commits, which fixes infinite loops within jumptable
3199         improvements,
3200         * made some fixes that previous patches introduced
3201
3202 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3203
3204         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3205         that fixes an issue with AOP_PCODE asmop's offset,
3206         * (pic16_popCopyReg): update instance field too,
3207         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3208         function of pic port,
3209         * (genCmp, genAnd, genAssign),
3210         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3211
3212 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3213
3214         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3215         variables initial values to idata section,
3216         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3217         variables in some functions. This utilizes parmBytes field of iCode
3218         structure to hold the offset of the variable in stack. (might be
3219         able to use the stack field too?)
3220         * applied patch from Raphael Neider # ### , # ###
3221         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3222         variable initial values in idata section,
3223         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3224         for static variables with initial value
3225         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3226         applied fix in while loop from Raphael Neider.
3227
3228 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3229
3230         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3231         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3232         * src/ds390/ralloc.c (serialRegAssign): spill bits
3233         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3234         * support/Util/SDCCerr.c,
3235         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3236         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3237         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3238
3239 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3240
3241         * device/include/sdcc-lib.h: inserted LGPL, added includes
3242           asm/ds390/features.h and asm/mcs51/features.h
3243         * device/include/asm/default/features.h,
3244         * device/include/asm/gbz80/features.h,
3245         * device/include/asm/z80/features.h: added empty _AUTOMEM
3246           and _STATMEM
3247         * device/include/asm/ds390/features.h,
3248         * device/include/asm/mcs51/features.h: added files with defines for
3249           _AUTOMEM and _STATMEM indicating automatic and static storage class
3250         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3251         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3252         * src/SDCCicode.c (geniCodeCast),
3253         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3254         * src/SDCCloop.c (loopInduction): removed unused variable lr
3255         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3256           to convertToFcall to include char modulo (RFE 1065037), added check
3257           if left operand is unsigned and use abs of literal value
3258         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3259           as it doesn't work after conversion from peephole.def to peephole.rul
3260         * src/mcs51/gen.c (toBoolean): added check for size,
3261           (genModOneByte): optimized code for signed char modulo a literal
3262           power of 2 (thanks to Hubert Sack),
3263           (genRRC): removed unnecessary "clr c",
3264           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3265         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3266           jump optimization,
3267           swapped rules 256.c and 256.d,
3268           extended 256.d by using new multiple checks (thanks Erik),
3269           added rules 256.e and 256.f,
3270           updated rule 261.a and 261.b to new generated code
3271         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3272
3273 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3274
3275         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3276           induction related bugs, including first part of bug #1074377
3277
3278 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3279
3280         * applied patch from bug-report #1076292,
3281         * applied patches for genAnd and Goto-optimizations for Raphael
3282         Neider,
3283         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3284         dump a less iCode information,
3285         * src/pic16/device.h (pic16_options_t): added field debgen,
3286         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3287         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3288         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3289         puclic,
3290         * (various functions): added macros FENTRY and FENTRY2 to functions,
3291         to emit function prologue,
3292         * (various functions): fixed indentation,
3293         * (genNearPointerGet): fixed loading of FSR0,
3294         * (genPackBits): applied patch from Raphael Neider to fix updating
3295         of FSR0 and touching only the modified bits,
3296         * src/pic16/genarith.c (various functions): added macros FENTRY to
3297         emit function prologue in comments,
3298         * src/pic16/pcode.h: added functions debugf2, debugf3,
3299         * src/pic16/ralloc.c: partial fix for packForPush caused
3300         segmentation fault,
3301
3302 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3303
3304         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3305           <stsp AT users.sourceforge.net> with reversed byte order
3306         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3307
3308 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3309
3310         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3311           bug #1074377
3312         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3313         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3314
3315 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3316
3317         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3318
3319 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3320
3321         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3322           conditions,
3323           (setFromConditionArgs): friendly operand parser for peephole rules,
3324           (operandBaseName, operandsNotRelated): new peephole condition
3325           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3326           architecture specific register naming into account, handles n-way
3327           comparisons, and supports quoted literals
3328         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3329
3330 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3331
3332         * src/mcs51/peeph.def: fixed bug #1076940
3333
3334 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3335
3336         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3337
3338 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3339
3340         Adding support for replacing ljmps with sjmps in jumptables
3341         generated for switch statements. For now you need to set the
3342         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3343         Now 4 algorithms for mcs51 jumptable generation are used:
3344         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3345         addresses loaded pc-relative for up to 112 cases and stack-pushing
3346         target addresses loaded with offset from dptr for up to 256 cases.
3347
3348         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3349         * src/mcs51/main.c: adapted constants for switch table generation
3350         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3351
3352 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3353
3354         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3355         * support/regression/tests/bug1057979.c: added test for bug 1073386
3356
3357 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3358
3359         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3360         compilers
3361
3362 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3363
3364         * src/pic16/device.h,
3365         * src/pic16/genarith.c,
3366         * src/pic16/glue.c,
3367         * src/pic16/main.c,
3368         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3369
3370 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3371
3372         Large cummulative patch for pic16 port.
3373         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3374         to call when a stack overflow occurs,
3375         * (malloc.h): added CVS Id tag,
3376         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3377         variable,
3378         * added libc directory. The current version of LibC contains string
3379         functions, ctype functions and macros and some functions of the
3380         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3381         be extensively tested in the future. Standard disclaimer here.
3382         Library is not automatically build yet. But one can build it by
3383         invoking 'make' inside the libc directory.
3384         * added ADC library under libio. Preliminary version yet.
3385
3386         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3387         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3388         aopForRemat() now and not by pic16_aopOp(),
3389         * (pic16_popGetTempReg): removed warning messgae when allocating
3390         temporary registers, its a buggy feature and will be removed,
3391         * (pic16_popGet): set register instance field in AOP_CRY,
3392         * (pic16_outBitC): fixed for results in size greater than 1,
3393         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3394         * (pic16_storeForReturn): optimized return of 0,
3395         * (genCmp): experimental code for new genCmp which uses PIC18's
3396         special compare&skip instructions. Initial tests fail some times
3397         with variables grater than 1 byte in size, so new code is disabled,
3398         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3399         a single bit,
3400         * (genCast): began a fix to optimize the casting of a bit to another
3401         bit, now assigning a bitfield to another bitfield will fail, sorry,
3402         * src/pic16/main.c: disabled the use of lr-support feature,
3403         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3404         * added some function prototypes, added function _debugf prototype,
3405         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3406         bits with offset (case PO_GPR_BIT),
3407         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3408         command line,
3409         * (isBankInstruction): modified to return 0 for no banking instruction,
3410         and 1 for banking instruction,
3411         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3412         caused stop processing pCodes after a inline assembly block,
3413         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3414         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3415         registers when it shouldn't,
3416         * src/pic16/ralloc.c (allocReg): add preliminary support for
3417         supporting a limited set of temporary registers,
3418
3419 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3420
3421         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3422           genDataPointerSet): ensure assignments always copy in MSB to LSB
3423           order,
3424           (loadRegFromAop): recognize CLRH optimization,
3425           (genFunction): optimize RECEIVE iCodes in reentrant functions
3426
3427 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3428
3429         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3430           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3431           selected.
3432         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3433         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3434           contiguous with data
3435
3436 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3437
3438         * device/lib/_gptrget.c (_gptrget),
3439         * device/lib/_gptrgetc.c (_gptrgetc),
3440         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3441           instead of sjmp to ret
3442         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3443           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3444
3445 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3446
3447         * .version: bumped version to 2.4.7
3448         * device/lib/_gptrget.c (_gptrget): is now _naked
3449         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3450         * device/lib/_gptrput.c (_gptrput): is now _naked
3451         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3452           (createFunction): fixed xstack
3453         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3454         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3455           or bit either,
3456           (geniCodeCritical): store original interrupt state in an iTemp bit
3457           var unless stack-auto
3458         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3459         * src/SDCCmain.c (setIncludePath): added include/target to search path
3460         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3461         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3462           prototype,
3463           (processFuncArgs): put bit vars in bit area
3464         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3465           unsaveRBank): fixed xstack,
3466           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3467           (genFunction, genEndFunction): fixed xstack,
3468           (genAssign): optimization don't walk backwards through mem
3469         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3470         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3471         * support/regression/Makefile: also make library (for stack-auto) when
3472           making "all" and added "test-mcs51-xstack-auto"
3473         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3474         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3475         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3476         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3477         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3478           make-library by MAKE_LIBRARY
3479         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3480           regression tests for xstack
3481         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3482         * support/regression/tests/critical.c: test for critical on mcs51
3483
3484 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3485
3486         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3487           built version of sdcc instead of installed version
3488
3489 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3490
3491         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3492         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3493           vprintf.c now
3494         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3495         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3496           WARNING: remove device/lib/build/z80/printf.o by hand when
3497           updating from previous build!
3498         * device/lib/z80/printf.c: updated comment
3499         * support/regression/tests/bug1057979.c: test all ports now
3500         * support/regression/tests/bug1065458.c: file added
3501
3502 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3503
3504         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3505           *_start and *_end symbols for static functions
3506
3507 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3508
3509         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3510           and search crt0.o in all library paths,
3511           (setIncludePath): proper handling of --nostdinc,
3512           (setLibPath): proper handling of --nostdlib
3513         * support/regression/Makefile,
3514         * support/regression/ports/ds390/spec.mk,
3515         * support/regression/ports/gbz80/spec.mk,
3516         * support/regression/ports/hc08/spec.mk,
3517         * support/regression/ports/mcs51/spec.mk,
3518         * support/regression/ports/mcs51-large/spec.mk,
3519         * support/regression/ports/mcs51-stack-auto/spec.mk,
3520         * support/regression/ports/z80/spec.mk: use include and lib files from
3521           built version of sdcc instead of installed version
3522         * doc/sdccman.lyx: fixed typo in --nostdinc
3523
3524 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3525
3526         * src/pic/pcode.c,
3527         * src/pic/device.c,
3528         * src/pic/ralloc.c,
3529         * src/pic/gen.c : added support to generate code for struct bit fields.
3530
3531 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3532
3533         * as/xa51/xa_version.h,
3534         * device/include/errno.h,
3535         * device/include/regc515c.h,
3536         * device/lib/_itoa.c,
3537         * device/lib/_ltoa.c,
3538         * device/lib/ser_ir_cts_rts.c,
3539         * sim/ucsim/xa.src/glob.cc,
3540         * sim/ucsim/xa.src/inst_gen.cc,
3541         * sim/ucsim/xa.src/xa_bit.cc,
3542         * sim/ucsim/xa.src/xa_sfr.cc,
3543         * sim/ucsim/z80.src/inst_dd.cc,
3544         * sim/ucsim/z80.src/inst_fdcb.cc,
3545         * support/scripts/keil2sdcc.pl,
3546         * src/pic16/pic16.dsp,
3547         * src/pic16/pic16a.dsp: corrected cvs line endings
3548         * device/lib/printf_large.c: fixed bug 1057979
3549         * src/pic16/gen.c: fixed non-C standard code
3550         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3551         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3552         * support/regression/ports/mcs51/support.c: reload T1 asap
3553         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3554           pdata use and clear idata startup behaviour
3555         * support/regression/tests/bug1057979.c: added
3556
3557 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3558
3559         * device/examples/ds390/ow390/ad26.h,
3560         * device/examples/ds390/ow390/cnt1d.h,
3561         * device/examples/ds390/ow390/crcutil.c,
3562         * device/examples/ds390/ow390/ownet.h,
3563         * device/examples/ds390/ow390/owsesu.c,
3564         * device/examples/ds390/ow390/swt12.h,
3565         * device/examples/ds390/ow390/swtoper.c,
3566         * device/examples/ds390/ow390/temp10.h,
3567         * device/examples/ds390/ow390/thermodl.c,
3568         * device/examples/ds390/tinitalk/tinitalk.dsp,
3569         * device/examples/ds390/tinitalk/tinitalk.dsw,
3570         * device/examples/mcs51/clock/hw.h,
3571         * device/examples/mcs51/simple2/go.bat,
3572         * device/examples/serialcomm/windows/serial.h,
3573         * device/examples/xa51/dummy.c,
3574         * device/examples/xa51/hello.c,
3575         * device/include/80c51xa.h,
3576         * device/include/at89x051.h: corrected cvs line endings
3577
3578 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3579
3580         * src/pic16/main.c (options): added command line --gstack, to trace
3581         stack over/under flows,
3582         * added pragma 'wparam' to allow passing first byte of function
3583         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3584         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3585         call to __gstack_test function and sets up the symbol as extern,
3586         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3587         * popaop): added call to pic16_testStackOverflow,
3588         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3589         wparamList list,
3590         * (genCall, genPcall): now all parameters are passed via stack
3591         except in functions that are pass to wparam pragma in which WREG is
3592         used too,
3593         * (genPcall): REENTRANT flag is checked to see if variable prototype
3594         contains reentrant keyword, don't call a non-reentrant function, via
3595         a reentrant function pointer or vice versa, functions are never
3596         passed via WREG,
3597         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3598         D.Winkler,
3599         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3600         SIGSEGV when accessing a NULL register stucture,
3601         * (pic16_printGPointerType): modified to handle UPPER modifier for
3602         function initializers, changed prototype of function to simpler one,
3603         * (pic16_printIvalFuncPtr): check to see if function is already
3604         added in externs list,
3605         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3606         optimized a move from W to SFR with a move to the same register
3607         later after a CALL,
3608         * device/lib/pic16/debug: NEW directory, contains debug features
3609         which are enabled when linking with libdebug.lib, currently command
3610         line option --gstack enables stack pointer tracing for over/under
3611         flow, corresponding sources are in debug/gstack
3612
3613 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3614
3615         * doc/sdccman.lyx: updated SDCC version,
3616         * (PIC16 port): update list of command line options,
3617         * src/pic16/device.h (structure pic16_options_t): added field gstack
3618         to enable stack overflow tracing on push/pops,
3619         * src/pic16/device.c (statistics structure): added statistics
3620         structure,
3621         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3622         pic16_dump_int_registers): increase statistics counters for each
3623         * variable which is encountered
3624         * (pic16_dump_usection): emit each .udata variable to its own udata
3625         section,
3626         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3627         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3628         parameters via stack, otherwise use old scheme,
3629         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3630         assembler output file,
3631         * src/pic16/main.c: added command line options --gstack to enable
3632         push/pop tracing for stack overflow,
3633         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3634         instructions): added size of each instruction,
3635         * (pic16_countInstruction): estimate size of instructions in
3636         the_pFile list, inline assembly blocks are not counted,
3637         * (pic16_FixRegisterBanking): trace previous register usage, when
3638         banksel optimizations is greater than 0, don't emit a redudant
3639         banksel directive,
3640
3641 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3642
3643         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3644         * src/pic16/ralloc.c : applied same fix for pic16.
3645         * src/pic/gen.c : tidied it up a little.
3646
3647 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3648
3649         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3650         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3651
3652 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3653
3654         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3655
3656 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3657
3658         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3659         non-reentrant function __modsint in the interrupt function (thus
3660         corrupting math operations during serial I/O)
3661         * device/lib/ser_ir.c: as above, changed buffersize
3662         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3663         256.c,d for zeroing
3664         * doc/Makefile: added option -t for rsync
3665
3666 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3667
3668         * src/SDCCast.h (struct ast),
3669         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3670
3671 2004-10-20 Borut Razem <borut.razem AT siol.net>
3672
3673         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3674         package
3675
3676 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3677
3678         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3679         makefile targets,
3680         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3681         support functions to replace long sequences of MOVFF's from access
3682         bank registers to stack and vice versa,
3683         * src/pic16/device.h: added new field opt_flags, where optimization
3684         flags can be set to enable certain features,
3685         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3686         * pBlock, (genFunction, genEndFunction): surroung loop for
3687         saving/loading used registers in stack with PC_INFO pCodes,
3688         INF_LREGS. Code in between can then be optimized by pCode optimizer
3689         to support function calls,
3690         * (genDataPointerSet): fixed bug which loaded float fields in
3691         structures with corrupt data,
3692         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3693         in a standard way debug info on stderr. Feature used for developing
3694         and debugging only,
3695         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3696         obsolete chunks of code,
3697         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3698         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3699         * pic16/src/pcode.c (pic16_newpCodeInfo,
3700         * (pic16_newpCodeOpLocalRegs),
3701         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3702         feature,
3703         * (pic16_pCodeConstString): printing of the initial value of a
3704         symbol as a comment is inhibited since parsing was already done by
3705         copyStr and output is corrupt,
3706         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3707
3708 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3709
3710         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3711
3712 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3713
3714         * as/mcs51/lkarea.c: removed old K&R style,
3715           (lnksect): changed check on boundary error,
3716           (lnksect2): changed check on boundary error,
3717           (lnksect2): extend XSTK to end of page if size = 1
3718         * as/mcs51/lkmain.c: removed old K&R style,
3719           (Areas51): create l_IRAM symbol
3720         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3721         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3722           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3723         * device/lib/_mullong.c: added version to be compiled with xstack
3724         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3725         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3726         * device/lib/mcs51/crtxstack.asm: fixed comment
3727         * src/SDCCglue.c: maxInterrupts defaults to 0,
3728           (emitMaps): added pdata,
3729           (createInterruptVect): (re)moved default,
3730           (glue): added pdata,
3731           (glue): moved __start__xstack to XSTK with default size 1
3732         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3733           and options.float_rent when options.stackAuto is set,
3734           (linkEdit): only write XDATA_NAME if provided on command line
3735         * src/SDCCmem.h,
3736         * src/SDCCmem.c: added pdata
3737         * src/port.h: added pdata_name to PORT
3738         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3739           (saveRegisters, unsaveRegisters): removed usage of B,
3740           (genMinus): fixed accumulator clash,
3741           (genJumpTab): added comment, this needs another look
3742         * src/mcs51/gen.c: added check for "B in use" paranoia,
3743           added pushB() and popB()
3744         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3745           chance
3746         * src/avr/main.c,
3747         * src/ds390/main.c,
3748         * src/hc08/main.c,
3749         * src/mcs51/main.c,
3750         * src/pic/main.c,
3751         * src/pic16/main.c,
3752         * src/xa51/main.c,
3753         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3754           added PSEG (PAG,XDATA) or NULL to port specifier
3755         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3756         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3757           (_mcs51_genInitStartup): removed __start__xstack equ,
3758           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3759         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3760         * src/z80/gen.c (_rleAppend): fixed warnings
3761         * support/regression/tests/zeropad.c: added pdata test
3762         * .version: bumped to 2.4.6
3763
3764 2004-10-17 Borut Razem <borut.razem AT siol.net>
3765
3766         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3767         as a part of nightly build
3768
3769 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3770
3771         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3772         WREG holds the first byte function parameters,
3773         * (aopForSym): take special case for symbols which are in FARSPACE
3774         but in CODESPACE too,
3775         * (assignResultValue): modified to take into account _G.useWreg,
3776         * (genCall): don't use wreg for parameter passing when function is
3777         declared as reentrant, too, added optimization INCF to stack
3778         pointer when stack parameter count is 1,
3779         * (genFunction, genEndFunction): refurnished and fixed to not using
3780         wreg for passing parameters when function has varargs or is
3781         reentrant, fixed bug with symbol name compare for generating
3782         functions in absolute address,
3783         * (pic16_storeForReturn): refurnished,
3784         * (genCmp): began writing a new version of the function, not ready
3785         yet, therefore it is disabled,
3786         * (genAssign): do not read code memory when assigning a function to
3787         a pointer function,
3788         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3789         array of characters, not pointer,
3790         * (pic16initialComments): in debug mode emit an .ident directive for
3791         the assembler,
3792         * (_process_pragma): emit a new warning type (internal to pic16)
3793         when setting stack to default length, emit a similar warning when
3794         placing a function at absolute address and address is not word aligned
3795         * (_pic16_parseOptions): added 'return TRUE' statement,
3796         * (_pic16_linkEdit): if compiling a source, then add the source's
3797         file object, first in the list of objects to link,
3798
3799 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3800
3801         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3802         * src/pic/main.c : removed VC warning.
3803         * src/pic/gen.c : changed comment.
3804
3805 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3806
3807         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3808         reference to a deprecated symbol _GPTRREG was causing failure to
3809         link. Thanks G. M. Gallant for the info.
3810
3811 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3812
3813         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3814         comments for Bugs item #954788.
3815
3816 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3817
3818         * src/pic16/device.c (pic16_dump_gsection,
3819         * pic16_groupRegistersInSection): handle symbols declared to be in
3820         access bank differently,
3821         * src/pic16/gen.c (struct _G): added field resDirect,
3822         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3823         send values read from stack directly to result and don't allocate
3824         temporary values,
3825         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3826         same registers,
3827         * (pic16_sameRegsOfs): NEW,
3828         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3829         free because they were not allocated from temporary pool,
3830         * pic16_popRegFromString): workaround to fix a problem with
3831         allocating variables twice or never,
3832         * (genGenPointerGet): using PRODL instead of FSR0H,
3833         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3834         instead of FSR0H,
3835         * (genAssign): take advantage of the _G.resDirect flag,
3836         * (genCast): around line 11844, use mov2f instead of directly
3837         MOVFF'ing between operands to account for literal values,
3838         * src/pic16/genutils.c: some new debug functions for gpsim have been
3839         added,
3840         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3841         float with integer part only,
3842         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3843         place variables in access bank
3844         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3845         updated sources to reflect recent changes in gen.c
3846
3847 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3848
3849         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3850         sources that searched for headers in installation path, now the
3851         device/include/pic16 is used,
3852         * src/pic16/glue.c (pic16glue),
3853         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3854         .line directives if not in debug mode, this suppresses assembler's
3855         warnings for ignored directives
3856
3857 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3858
3859         * src/port.h: made reset_regparms prototype void parameter explicit.
3860         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3861         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3862         * doc/sdccman.lyx: documented warning disabling and how to use
3863           printf_large to make it print floats.
3864         * device/include/stdbool.h: NEW
3865         * device/lib/_atof.c,
3866         * device/lib/_divuint.c,
3867         * device/lib/_divulong.c,
3868         * device/lib/expf.c,
3869         * device/lib/printf_large.c,
3870         * device/lib/sincosf.c,
3871         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3872         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3873           a completely reentrant lib.
3874
3875 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3876
3877         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3878         * device/include/pic16/stdio.h: fixed bug with colon
3879
3880 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3881
3882         * device/include/pic16/stdio.h,
3883         * device/include/pic16/stdlib.h,
3884         * device/include/pic16/math.h: NEW
3885         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3886         declared as _naked to reduce overhead
3887         * device/lib/Makefile.in (target port-specific-objects-pic16):
3888         changed * to *.* so to ignore the CVS directory,
3889         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3890         stacked variables back in stack,
3891         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3892         corruption
3893
3894 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3895
3896         * .version: bumped version number to 2.4.5
3897         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3898         * support/Util/SDCCerr.c (messages structure): added entry for
3899         W_POSSBUG2
3900
3901         Large cumulative patch for pic16 port and libraries.
3902         * device/include/pic16/sdcc-lib.h,
3903         * device/include/pic16/stdarg.h,
3904         * device/include/asm/pic16/features.h,
3905         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3906         * device/include/pic16/float.h: changes reentrant keyword with
3907         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3908         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3909         updated target build-libraries to include objects from gptr,
3910         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3911         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3912         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3913         all function headings,
3914         * src/SDCCmain.c: added global parameter userIncDirsSet,
3915         * (parseCmdLine): when option -I is encountered add directory to
3916         userIncDirsSet too,
3917         * src/version.awk: added space between control and long,
3918         * src/pic16/NOTES: added some notes for the port,
3919         * src/pic16/gen.c: added prototype for mov2fp function,
3920         * (fReturnpic16[]): properly named return value registers,
3921         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3922         * (aopForSym): added code to handle symbols with onStack flag set,
3923         symbols onStack are allocated PTRSIZE bytes,
3924         * (aopFreeAsmop): handles special case where asmops are stack objects,
3925         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3926         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3927         added argument lock to trace flaws in allocating temporary registers
3928         when developing port,
3929         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3930         * (pic16_popRegFromString): reenabled allocating a direct register
3931         from string,
3932         * (assignResultValue): various beautifications,
3933         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3934         referenced function argument,
3935         * (genIpush): reenabled to allow stacked arguments, handles only
3936         ic->parmPush iCodes,
3937         * (genCall, genPcall): major changes to allow for variable argument
3938         functions, fixed a bug with falsely restoring stack pointer after
3939         returning from call,
3940         * (genFunction): pending code for critical function,
3941         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3942         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3943         * (genNearPointerGet): fixed bug with indirect reading, was always
3944         reading from INDF0
3945         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3946         pointers,
3947         * (genAddrOf): rewrote code to take address of a stacked function parameter
3948         * (genCast): fixed casting to generic pointer type,
3949         * src/pic16/gen.h: added AOP_STA,
3950         * (struct asmop): added field stk,
3951         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3952         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3953         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3954         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3955         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3956         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3957         generic pointers,
3958         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3959         and library paths,
3960         * (pic16_port structure): generic pointer size is set to 3,
3961         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3962         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3963         compiler warning,
3964         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3965         operand is an iTemp,
3966
3967 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3968
3969         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
3970         * debugger/mcs51/simi.c: addapt new syntax of s51
3971
3972 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
3973
3974         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
3975         * src/pic16/pcode.c: commented out some calls to free() in order to
3976         fix bug #989576,
3977
3978 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3979
3980         * src/SDCCicode.h,
3981         * src/SDCCicode.c (isiCodeInFunctionCall),
3982         * src/avr/ralloc.c (selectSpil),
3983         * src/pic/ralloc.c (selectSpil),
3984         * src/pic16/ralloc.c (selectSpil),
3985         * src/ds390/ralloc.c (selectSpil),
3986         * src/hc08/ralloc.c (selectSpil),
3987         * src/xa51/ralloc.c (selectSpil),
3988         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
3989         stack in the middle of a function call sequence (fixes bug #1020268)
3990         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
3991         costs associated with the minimum switch case.
3992
3993 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3994
3995         * src/SDCC.lex: fixed bug #1030549
3996
3997 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3998
3999         * src/SDCCcse.h (struct cseDef),
4000         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4001         over a function call if the CSE is derived from a symbol whose
4002         address has been taken (fixes bug #1029883)
4003         * support/regression/tests/bug-1029883: a new regression test for
4004         this bug
4005
4006 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4007
4008         * src/hc08/gen.c (emitinline): fixed bug #1029778
4009         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4010         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4011         and starts toward RFE #905167)
4012
4013 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4014
4015         * src/pic16/gen.c (mov2f): New function to move an operand to
4016         another without considering if it is a literal or a register,
4017         * (pic16_sameRegs): don't check if they are both AOP_REG,
4018         * (AccRsh): removed andmask=0 lines,
4019         * (genLeftShift): duplicated to be improved in future versions,
4020         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4021         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4022         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4023         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4024         * (insertBankSwitch): fixed inserting banksel directives algorithm
4025         for instructions that follow a skip instruction, this fixes a report
4026         for broken subtraction code generation,
4027         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4028         iCode is a left op, just in case result and right share the same
4029         registers
4030
4031 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4032
4033         * src/hc08/main.c,
4034         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4035         preservation of HX
4036         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4037         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4038         on 2004-09-12; it was buggy
4039
4040 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4041
4042         * src/SDCCsymt.h: removed RESULT_CHECK
4043         * src/SDCCast.c,
4044         * src/SDCCglue.c,
4045         * src/SDCCval.c,
4046         * src/pic/glue.c,
4047         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4048
4049 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4050
4051         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4052         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4053         configuration values no more rejected by compiler, they are assigned
4054         to configuration registers with a warning message instead,
4055         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4056         the for-loop so last conf register is emitted too,
4057         * (_pic16_initPaths): link library libsdcc.lib by default,
4058         * (_hasNativeMulFor): modified test for multiplication according to
4059         Raphael Neider's remarks. Integer multiplication is also done with
4060         support functions,
4061         * device/include/pic16/pic18fregs.h: corrected type error in while
4062         testing and including 18f6720 header file
4063
4064 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4065
4066         * src/pic16/device.h (pic16_options): removed field use_crt,
4067         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4068         until an optimization to handle single bits is added,
4069         * (pic16_loadFSR0): moved before genUnpackBits,
4070         * (genAnd): some white lines removed,
4071         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4072         leave_reset flags in pic16_options when using crt modules,
4073
4074 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4075
4076         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4077           for bugs 898889 & 979599. Also used some safer print instructions.
4078
4079 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4080
4081         * src/pic16/device.h (pic16_options_t): added field use_crt,
4082         crt_name, no_crt,
4083         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4084         catch a probable future bug,
4085         * src/pic16/gen.c: aopIdx function commented out,
4086         * (genAssign): commented out old code which used aopIdx,
4087         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4088         code, added if conditionals to take into account the --use-crt
4089         command line options,
4090         * src/pic16/main.c (pic16_optionsTable): added new command line
4091         options, --use-crt= and --no-crt,
4092         * (_pic16_linkEdit): now the proper crt object is added in the
4093         linker command line except than when --no-crt is specified,
4094         * src/pic16/pcode.c,
4095         * src/pic16/pcode.h: added some structures and functions for a new
4096         optimization scheme to compansate for instruction overhead between
4097         same iCodes, this scheme is currently under development and is not
4098         working in any way,
4099         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4100         to && operator,
4101         * device/lib/pic16/startup/crt0i.c,
4102         * device/lib/pic16/startup/crt0iz.c: added global char variable
4103         __uflags to force the generation of an idata section
4104
4105 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4106
4107         * doc/Makefile,
4108         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4109         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4110
4111 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4112
4113         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4114         Frieder) and clarified the default code optimization mode
4115
4116 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4117
4118         * src/SDCC.lex (doPragma, process_pragma),
4119         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4120         "opt_code_size", and "opt_code_balanced"
4121         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4122         regrouped options by category, added support for category headers
4123         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4124         and "--opt-code-size"
4125         * doc/sdccman.lyx: documented these new options and pragmas
4126         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4127         preference into account
4128
4129 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4130
4131         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4132           geniCodePreDec): Fixed bug 904237 by generating a warning
4133         * src/SDCCerr.h,
4134         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4135
4136 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4137
4138         * src/pic/device.c : When no max ram set validate full memory range.
4139         * src/pic/pcode.c,
4140         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4141
4142 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4143
4144         * device/lib/_gptrget.c,
4145         * device/lib/_gptrput.c: updated comment
4146         * device/lib/calloc.c,
4147         * device/lib/free.c,
4148         * device/lib/malloc.c,
4149         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4150         * src/SDCCcse.c (cseBBlock),
4151         * src/SDCCicode.c (printOperand, geniCodeArray),
4152         * src/SDCCicode.h (struct operand): fixed bug 868103
4153         * support/regression/tests/bug-868103.c: added
4154         * src/SDCCast.c (searchLitOp),
4155         * src/SDCCcse.h (struct cseDef),
4156         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4157         * src/SDCCicode.h (struct operand),
4158         * src/SDCCsymt.h (struct sym_link),
4159         * src/avr/gen.c (hasInc),
4160         * src/ds390/gen.c (hasInc),
4161         * src/hc08/gen.c (genPlusIncr, hasInc),
4162         * src/mcs51/gen.c (hasInc),
4163         * src/pic16/glue.c (pic16_printIvalChar),
4164         * src/pic16/ralloc.c (regWithIdx),
4165         * src/xa51/gen.c (hasInc) : removed warnings
4166         * src/SDCCast.c (createBlock): added comment ???
4167         * src/hc08/ralloc.c: updated comments
4168
4169 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4170
4171         * doc/sdccman.lyx: updated section on switch statements, added
4172         section about semaphore locking
4173         * doc/Makefile: added option -info for latex2html
4174         * device/lib/_gptrget.c,
4175         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4176
4177 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4178
4179         * src/pic/device.h,
4180         * src/pic/device.c,
4181         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4182          maxram is less than 0x100.
4183
4184 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4185
4186         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4187
4188 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4189
4190         * src/port.h,
4191         * src/mcs51/main.c,
4192         * src/ds390/main.c,
4193         * src/z80/main.c,
4194         * src/hc08/main.c,
4195         * src/pic/main.c,
4196         * src/pic16/main.c,
4197         * src/avr/main.c,
4198         * src/xa51/main.c
4199         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4200         a jump table is the best form for a switch statement, including
4201         automatic insertion of missing cases to make the case range
4202         continuous. Developed in collaboration with Frieder Ferlemann.
4203
4204 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4205
4206         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4207         accumulator result if it needs sign extension
4208
4209 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4210
4211         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4212
4213 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4214
4215         * device/lib/gbz80/printf.c,
4216         * device/lib/z80/printf.c: removed define for NULL
4217
4218 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4219
4220         * as/xa51/xa_link.c,
4221         * device/examples/ds390/ow390/ad26.c,
4222         * device/examples/ds390/ow390/cnt1d.c,
4223         * device/examples/ds390/ow390/counter.c,
4224         * device/examples/ds390/ow390/ds2480.h,
4225         * device/examples/ds390/ow390/ds2480ut.c,
4226         * device/examples/ds390/ow390/findtype.c,
4227         * device/examples/ds390/ow390/gethumd.c,
4228         * device/examples/ds390/ow390/owllu.c,
4229         * device/examples/ds390/ow390/ownetu.c,
4230         * device/examples/ds390/ow390/swt12.c,
4231         * device/examples/ds390/ow390/swtloop.c,
4232         * device/examples/ds390/ow390/temp.c,
4233         * device/examples/ds390/ow390/temp10.c,
4234         * device/examples/ds390/ow390/thermo21.c,
4235         * device/examples/ds390/ow390/tinilnk.c,
4236         * device/examples/ds390/ow390/tstfind.c,
4237         * device/examples/serialcomm/windows/serial.cpp,
4238         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4239         * device/include/reg51.h: fixed line endings for cvs
4240
4241 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4242
4243         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4244         packRegsForAccUse, packRegisters): new accumulator register
4245         packing algorithm
4246         * support/regression/ports/hc08/support.c (_putchar): suppress
4247         warning of unused variable
4248         * src/SDCCicode.c: added SWAP entry to codeTable
4249
4250 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4251
4252         * device/lib/sprintf.c: forgot to add this file before previous commit
4253
4254 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4255
4256         * src/pic16/gen.c (genPackBits): added operand right in function
4257         parameters, load result directly if p_type is POINTER (that is
4258         called by genNearPointerSet)
4259         * (genUnPackBits): added operand left in function parameters,
4260         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4261         FSR0 if accessing bitfields,
4262
4263 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4264
4265         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4266           _print_format; updated printf, sprintf, vsprintf
4267         * device/include/asm/default/features.h: corrected comment/define
4268         * device/lib/Makefile.in: added sprintf.c
4269         * device/lib/libsdcc.lib: added sprintf module
4270         * device/lib/printf_large.c,
4271         * device/lib/vprintf.c,
4272         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4273           into these 3 files
4274         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4275         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4276         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4277           hc08 test
4278         * support/regression/tests/zeropad.c: define idata as data for hc08
4279
4280 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4281
4282         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4283         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4284         labels are referenced at least once (even if a reference is not found)
4285         * src/hc08/gen.c (emitcode): set isComment flag for comments
4286         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4287         loads), rules 6a..6b (optimize jumps to return)
4288
4289 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4290
4291         * device/lib/acosf.c (acosf),
4292         * device/lib/asinf.c (asinf),
4293         * device/lib/atanf.c (atanf),
4294         * device/lib/ceilf.c (ceilf),
4295         * device/lib/cosf.c (cosf),
4296         * device/lib/coshf.c (coshf),
4297         * device/lib/cotf.c (cotf),
4298         * device/lib/fabsf.c (fabsf),
4299         * device/lib/floorf.c (floorf),
4300         * device/lib/log10f.c (log10f),
4301         * device/lib/logf.c (logf),
4302         * device/lib/sinf.c (sinf),
4303         * device/lib/sinhf.c (sinhf),
4304         * device/lib/sqrtf.c (sqrtf),
4305         * device/lib/tanf.c (tanf),
4306         * device/lib/tanhf.c (tanhf),
4307         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4308         replaced all instances of "reentrant" in the library functions
4309         defined in math.h with this macro.
4310         * support/regression/tests/float_trans.c: reenabled test for hc08
4311
4312 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4313
4314         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4315         erroneously deleted
4316
4317 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4318
4319         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4320         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4321         multi-byte volatile operands are used
4322         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4323         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4324         initialization to area GSINIT0 so that it would always precede
4325         any static initializers in GSINIT
4326         * support/regression/tests/zeropad.c: fixed idata define for hc08
4327         * support/regression/tests/bug-927659.c,
4328         * support/regression/tests/float_trans.c: disabled tests for hc08
4329         pending missing library routines
4330         * .version: increased version number to 2.4.4 - hc08 port now passes
4331         regression tests
4332
4333
4334 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4335
4336         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4337         * Makefile.common.in,
4338         * as/Makefile,
4339         * as/hc08/Makefile.in,
4340         * as/mcs51/Makefile.in,
4341         * as/z80/Makefile.in,
4342         * debugger/mcs51/Makefile.in,
4343         * device/include/Makefile.in,
4344         * device/lib/Makefile.in,
4345         * doc/Makefile,
4346         * link/Makefile,
4347         * link/z80/Makefile.in,
4348         * packihx/Makefile.in,
4349         * sim/ucsim/main_in.mk,
4350         * sim/ucsim/avr.src/Makefile.in,
4351         * sim/ucsim/doc/Makefile.in,
4352         * sim/ucsim/gui.src/serio.src/Makefile.in,
4353         * sim/ucsim/hc08.src/Makefile.in,
4354         * sim/ucsim/s51.src/Makefile.in,
4355         * sim/ucsim/xa.src/Makefile.in,
4356         * sim/ucsim/z80.src/Makefile.in,
4357         * src/Makefile.in,
4358         * support/cpp2/Makefile.in,
4359         * support/librarian/Makefile,
4360         * support/makebin/Makefile: added DESTDIR to the install path proposed
4361         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4362         * doc/sdccman.lyx: added DESTDIR documentation
4363
4364 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4365
4366         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4367         instruction for interrupt handlers, use fast returns when returning
4368         from high priority interrupts
4369
4370 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4371
4372         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4373         code generation
4374         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4375         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4376         bugs, ported much of Bernhard's code from mcs51
4377         * src/mcs51/gen.c (genSend),
4378         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4379         than one when calling a reentrant function
4380         * device/lib/_mullong.c: defined an alternate struct layout for big
4381         endian ports (hc08)
4382
4383 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4384
4385         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4386         test
4387
4388 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4389
4390         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4391         are sane and complete before asking the port its prefered parameter
4392         passing method (fixes bug #1017633)
4393         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4394         and _ret3
4395
4396 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4397
4398         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4399         problem in bitfields >= 8 bits.
4400
4401 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4402
4403         * src/SDCCsymt.c: undid changes that were not meant to be committed
4404
4405 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4406
4407         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4408
4409 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4410
4411         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4412           copied and wrong bit got inverted
4413
4414 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4415
4416         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4417         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4418         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4419         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4420         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4421         assignments to bitfields at known addresses
4422         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4423         reads from bitfields at known addresses
4424         * src/hc08/ralloc.c (packRegisters),
4425         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4426         genhc08Code): optimize pointer get values used as conditionals
4427         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4428         and branch
4429
4430 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4431
4432         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4433         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4434         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4435         as conditionals
4436
4437 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4438
4439         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4440
4441 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4442
4443         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4444         related problems
4445
4446 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4447
4448         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4449
4450 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4451
4452         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4453         mcs51 port
4454
4455 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4456
4457         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4458
4459 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4460
4461         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4462         cases use more compact code.
4463
4464 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4465
4466         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4467
4468 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4469
4470         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4471
4472 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4473
4474         * src/SDCCsymt.h,
4475         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4476         parameter of changePointer() from symbol* to sym_link*
4477         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4478         * src/SDCCsymt.c (compareType): void* type is castable to other
4479         pointers, but not necesarily an exact match.
4480         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4481         is no longer blindly treated as an exact match.
4482         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4483
4484 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4485
4486         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4487
4488 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4489
4490         * src/pic/gen.c,
4491         * src/pic/pcode.c,
4492         * src/pic/ralloc.h,
4493         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4494
4495 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4496
4497         * src/pic/device.c,
4498         * src/pic/device.h,
4499         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4500
4501 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4502
4503         * src/mcs51/gen.c (emitcode): fixed bug #992819
4504
4505 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4506
4507         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4508           there's no need to make it worse
4509
4510 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4511
4512         * src/mcs51/ralloc.c (deassignLR),
4513         * src/ds390/ralloc.c (deassignLR),
4514         * src/hc08/ralloc.c (deassignLR),
4515         * src/z80/ralloc.c (deassignLR),
4516         * src/pic/ralloc.c (deassignLR),
4517         * src/pic16/ralloc.c (deassignLR),
4518         * src/avr/ralloc.c (deassignLR),
4519         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4520         rlivePoint): fixed another part of bug #971834
4521
4522 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4523
4524         * src/z80/main.c: enabled "critical" keyword
4525         * src/z80/mappings.i,
4526         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4527         functions (fixes bug #979646)
4528         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4529
4530 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4531
4532         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4533           such as c:\mydir.
4534
4535 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4536
4537         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4538           doesn't disable too much optimizations
4539
4540 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4541
4542         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4543
4544 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4545
4546         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4547
4548 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4549
4550         * src/pic/gen.c tidied up tabs
4551         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4552         * src/pic/main.c tidied up tabs
4553         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4554         * src/pic/pcoderegs.c tidied up tabs
4555         * src/pic/ralloc.c tidied up tabs
4556
4557 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4558
4559         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4560         to S_FIXED for pic16 port and when symbol is not in level 0,
4561         allocate for S_REGISTER storage class and pic16 port, too,
4562         * src/pic16/device.h: prototype for checkSym,
4563         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4564         * (pic16_assignConfigWordValue): test the value and the mask to
4565         validate that the value is suitable for the configuration word,
4566         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4567         collect extern declared symbols, don't emit symbol twice, check
4568         first if symbol is in publics set first,
4569         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4570         * added command line '--fstack' which enables an experimental
4571         feature for stack access, too buggy to be used yet...
4572         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4573         * (pic16_allocDirReg): when register has storage class S_REGISTER
4574         allocate in pic16_dynAccessRegs,
4575         * device/include/pic16/pic18f????.h: modified configuration word
4576         naming convention, words started as CONFIG0H but should be CONFIG1H
4577
4578 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4579
4580         * device/include/mcs51reg.h: fixed bug 970993
4581
4582 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4583
4584         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4585         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4586         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4587         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4588         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4589         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4590           error/warning numbers,
4591           added function setWarningDisabled()
4592         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4593         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4594           _memcmp.c _memmove.c calloc.c realloc.c free.c
4595         * support/regression/tests/malloc.c: added tests for new functionality
4596         * support/regression/tests/zeropad.c: added tests for truncated initializers
4597           and initialized char arrays starting with '\x0'
4598         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4599
4600 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4601
4602         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4603
4604 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4605
4606         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4607         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4608         peephole 177.e. Thanks to anonymous
4609
4610 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4611
4612         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4613         function isn't used in the source but referenced as a
4614         variable initializer then declare it as extern in .asm file
4615
4616 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4617
4618         * .version: increased version number to 2.4.3
4619
4620         Adding version extension according to ChangeLog CVS revision
4621         * src/Makefile.in (target all): added dependency 'version.h'
4622         * (rule version.h): added rule to create version.h from ChangeLog,
4623         * (rule dep): added dependency version.h,
4624         * src/version.awk: AWK script to create version.h
4625         * src/SDCCdwarf2.c (dwWriteModule),
4626         * src/SDCCglue.c (initialComments),
4627         * src/SDCCmain.c (printVersionInfo): modified to write after
4628         version string the version extension number,
4629         * src/SDCCutil.c: included "version.h"
4630         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4631         number,
4632         * src/SDCCutil.h: added prototype for getBuildNumber
4633
4634         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4635         includeDirsSet, too,
4636         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4637         const char [] is found in function prototype...
4638
4639         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4640         moving to WREG with source is already in WREG,
4641         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4642         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4643         * (aopForSym): stack'ed symbols are partially supported, added
4644         if-clause to support symbols in FARSPACE,
4645         * (sameRegs): added test for AOP_ACC to see if registers are same,
4646         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4647         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4648         * (pic16_popRegFromString): will not allocate a new register if it
4649         doesn't find one by name, bug may have introduced...
4650         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4651         * (genIpush): revived to use pic16 port's stack,
4652         * (genAddrOf): added incomplete case for stack'ed operand,
4653         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4654         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4655         can handle multibyte operands,
4656         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4657         * (pic16initialComments): added message for MPLAB compatibility
4658         mode enabled,
4659         * src/pic16/main.h: prototype for pic16_mplab_comp,
4660         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4661         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4662         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4663         because of increased complexity of procedure,
4664         * (_process_pragma): stack pragma changed to format 'stack pos len',
4665         emit symbol '_stack_end' to conform with gplink,
4666         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4667         to search for register,
4668         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4669         PO_GPR_REGISTER,
4670         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4671         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4672         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4673         case for PO_GPR_REGISTER,
4674         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4675         dies, the new era is ahead !...
4676         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4677         pic16_dynInternalRegs,
4678         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4679         * (pic16_allocDirReg): minor optimizations and bug fixes,
4680         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4681
4682         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4683         load stack and frame pointer with address of 'stack_end' symbol
4684
4685 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4686
4687         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4688         without source code but only variable initializers
4689
4690 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4691
4692         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4693         external are not declared as extern to reduce overhead while linking
4694
4695 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4696
4697         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4698
4699 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4700
4701         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4702           Yee Keat for the patch
4703         * src/SDCCast.c (decorateType): fixed bug #979599
4704         * src/ds390/gen.h: removed local fReturnSizeDS390
4705         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4706         * src/ds390/gen.c (genAnd, genOr, genXor),
4707         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4708
4709 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4710
4711         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4712         add relFilesSet to $3, manipulate $2 to handle linking of object
4713         files without source files in command line,
4714         * device/include/pic16 (all headers): added ID location macros,
4715         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4716         entries for ID location bytes,
4717         * (pic16_assignIdByteValue): NEW,
4718         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4719         added field dumpcalltree to pic16_options_t,
4720         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4721         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4722         emitting rFalseIfx label after check_carry label,
4723         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4724         pic16_emitDIRegs), NEW
4725         * (pic16glue): dump .calltree file when option --calltree found,
4726         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4727         * (_pic16_genAssemblerPreamble): emit ID locations after
4728         configuration registers,
4729         * (pic16_linkCmd): modifications of the link command,
4730         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4731         * (pic16_pCodeInitRegisters): don't init stack registers,
4732         * (pic16_findPrevInstruction): fixed bug,
4733         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4734         bug with immediate registers,
4735         * (buildCallTree): traces stack push and pop,
4736         * (pct2): dump also stack usage for each function,
4737         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4738         * (pic16_allocDirReg): various modifications,
4739         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4740         fixed to 1,
4741
4742 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4743
4744         * src/pic16/pcode.c: removed buggy double colon
4745
4746 2004-07-01 Borut Razem <borut.razem AT siol.net>
4747
4748         * support/scripts/sdcc.nsi: added include/pic16 to setup
4749
4750 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4751
4752         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4753         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4754         target 'clean',
4755         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4756         specific command line arguments. Also added sample lkr script
4757         for placing a variable at a specific memory bank.
4758         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4759         at a specific memory bank,
4760         * (pic16_dump_isection): fixed bug which caused string literals to
4761         be omitted when dumping idata section,
4762         * (pic16_groupRegistersInSection): added code to handle registers
4763         in specific memory banks,
4764         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4765         public, all references are renamed too,
4766         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4767         AOP_DPTR2,
4768         * (pic16_storeForReturn): added case to handle when dest is WREG,
4769         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4770         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4771         pic16_rel_udata, check to see if that register is marked as being
4772         a member of a specific memory bank,
4773         * (pic16_printIvalCharPtr): added code to add string literals either
4774         to code or the idata sections,
4775         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4776         also accept the 'udata' pragma,
4777         * src/pic16/main.h: new structure types sectName and sectSym
4778         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4779         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4780         * (pic16_findPrevInstruction): fixed, it returned nothing,
4781         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4782         instruction combinations,
4783         * (pic16_FixRegisterBanking): heavily reorganised,
4784         * (pic16_AnalyzeBanking): if generating banksel directives is
4785         disabled, then don't call FixRegisterBanking at all,
4786         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4787         completely removed,
4788         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4789
4790 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4791
4792         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4793         Phuah Yee Keat <yk.phuah AT nestac.com>
4794
4795 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4796
4797         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4798         correctly the IVT even if it is relocated to some other location
4799
4800 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4801
4802         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4803         * device/include/pic16/pic18f2220.h: NEW,
4804         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4805         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4806         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4807         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4808         nodefaultlibs, ivt_loc is the location of the interrupt vector
4809         table, and nodefaultlibs signs that default libraries should not be
4810         linked in link stage,
4811         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4812         according to --ivt-loc argument,
4813         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4814         when pragma stack is found,
4815
4816 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4817
4818         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4819         256 (range check), 257 (do while), 258.a-f (bit banging
4820         f.e. on 3-wire SPI bus)
4821
4822 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4823
4824         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4825         variables used exclusively within a loop
4826
4827 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4828
4829         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4830
4831 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4832
4833         * src/SDCClrange.c (computeClash): fixed bug #971834
4834
4835 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4836
4837         * src/mcs51/gen.c (genCmp): fixed bug #975903
4838         * src/hc08/gen.c (operandsEqu),
4839         * src/ds390/gen.c (operandsEqu),
4840         * src/z80/gen.c (operandsEqu),
4841         * src/pic/gen.c (operandsEqu),
4842         * src/pic16/gen.c (operandsEqu),
4843         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4844         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4845
4846 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4847
4848         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4849
4850 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4851
4852         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4853         default case in switch statement,
4854         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4855         to eliminate problem with initialisation of pointers, but problem
4856         still exists,
4857         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4858         * (emitStaticSegment): removed various lines emitting debug info,
4859         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4860         added processor registers for utilizing EEPROM,
4861         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4862         configurable and set 8
4863
4864 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4865
4866         * .version: increased version number to 2.4.2,
4867
4868         Cumulative patch for pic16 port
4869         * src/pic16/device.c: changed scheme to dump initial values for
4870         variables in idata segment, all print_idata* functions were removed,
4871         now the pic16_printIval* will be called,
4872         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4873         * _pic16_printPointerType, pic16_printPointerType,
4874         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4875         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4876         NEW, similar to the respective functions in SDCCglue.c,
4877         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4878         way, emitting hex bytes,
4879         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4880
4881 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4882
4883         * src/avr/ralloc.c (serialRegAssign),
4884         * src/xa51/ralloc.c (serialRegAssign),
4885         * src/pic/ralloc.c (serialRegAssign),
4886         * src/pic16/ralloc.c (serialRegAssign),
4887         * src/hc08/ralloc.c (serialRegAssign),
4888         * src/z80/ralloc.c (serialRegAssign),
4889         * src/ds390/ralloc.c (serialRegAssign),
4890         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4891
4892 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4893
4894         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4895         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4896
4897 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4898
4899         Cumulative patch for pic16 port:
4900         * src/pic16/device.h (typedef PIC16_device) modified fields for
4901         defining microcontrollers,
4902         * src/pic16/device.c: added new info for all devices in Pics16 array,
4903         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4904         to be optimised out by the pCode optimiser,
4905         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4906         specially, bug reported by G.M. Gallant,
4907         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4908         as force'd so that cannot be optimised out by pCode optimiser,
4909         * src/pic16/pcode.c,
4910         * src/pic16/pcodepeeph.c,
4911         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4912         they are disabled by default, but can be enabled explicit with
4913         command argument --denable-peeps, for testing,
4914         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4915         --pomit-ivt in COMPILE_FLAGS
4916
4917 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4918
4919         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4920           compilation on MSVC
4921
4922 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4923
4924         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4925
4926 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4927
4928         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4929         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4930
4931 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4932
4933         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4934         would only assign 0x300001 register.
4935
4936 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4937
4938         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4939         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4940
4941 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4942
4943         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4944         for ds80c400
4945         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4946         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4947         added peephole 254 (left shift), 255 (jump table)
4948
4949 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4950
4951         * device/lib/Makefile.in: removed comment line with model-pic16,
4952         * (target port-specific-objects-pic16): the libraries and objects
4953         are copied to the build directory form the device/lib/pic16/bin
4954         directory
4955
4956         Cumulative patch concerning pic16 port:
4957         * library directory has been re-organized,
4958         * added support for PIC18F1220,
4959         * added headers and library sources for chips 18f1220,18f6520,
4960         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4961
4962         * configuration registers setting has changed, now each supported
4963         device has a complete description of the registers it uses,
4964         * all initialisations are moved to idata sections, these section
4965         can be absolute or relocatable,
4966         * fixed initialisation of codespace variables,
4967         * fixed warning about PCLATU and gpsim,
4968         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
4969         * (genAssign): use table reads when assigning from variables in codespace,
4970         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
4971         char/int variables placed in codespace,
4972         * (pic16_emitConfigRegs): NEW, emits a list with configuration
4973         registers set in .asm file, no need for --pomit-config-words anymore,
4974         * (pic16glue): some 8051 legacy segments are commented out
4975         (to be removed completely),
4976         * added support for alternative assembler and linker with --asm=
4977         and --link= command line arguments,
4978         * peepholes are disabled automatically in the port, no need to
4979         specify on command line,
4980         * port supports natively char/int/long multiplication, but converts
4981         all divisions to support functions,
4982         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
4983         to the file set in variable $2,
4984         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
4985         strings in ASCII format and not in hex,
4986         * ralloc.c (serialRegAssign): added a triplet of conditional calls
4987         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
4988         allocate proper register if iCodes aren't temporary,
4989
4990 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
4991
4992         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
4993
4994 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
4995
4996         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
4997         is commented out
4998
4999 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5000
5001         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5002         computed address is reused
5003         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5004         multi-byte bitfields
5005
5006 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5007
5008         * src/z80/gen.c: (genArrayInit): must check for pointers too
5009
5010 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5011
5012         * support/regression/tests/zeropad.c: never meant to commit the
5013           nestedstruct test: removed, added check for GCC version
5014
5015 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5016
5017         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5018         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5019         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5020           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5021           bugs 928906 and 954082 half-empty initializers
5022         * src/SDCCsymt.h,
5023         * src/SDCCsymt.c (getAllocSize): added for above fix
5024         * src/z80/gen.c (genArrayInit): fixed bug 741044
5025         * support/regression/tests/zeropad.c: added tests
5026
5027 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5028
5029         * src/pic16/device.c (pic16_dump_section): corrected bug which
5030         caused some symbols of the libraries to be misplaced
5031
5032 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5033
5034         * src/pic16/glue.c,
5035         * src/pic16/ralloc.h,
5036         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5037         to fix conflict with pic port
5038
5039 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5040
5041         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5042         externs configuration variables,
5043         * src/pic16/ralloc.h,
5044         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5045         prototype in header, commented out some debug messages
5046
5047 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5048
5049         * src/pic16/glue.c,
5050         * src/pic16/main.c,
5051         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5052         for gpasm COFF object generation. Thanks to D. Hawkins for
5053         his patch info
5054
5055 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5056
5057         * src/ds390/main.c,
5058         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5059         Brock for spotting this)
5060         * src/ds390/gen.c (genEndFunction),
5061         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5062         interrupt handler and critical. Disable push/pop optimizations when
5063         peephole optimizations disabled.
5064
5065 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5066
5067         Updated pic16 library sources and headers.
5068         * device/lib/pic16/pic18f*/ ,
5069         * device/include/pic16/*.h: modified to handle structured SFR
5070         definitions
5071
5072 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5073
5074         * src/port.h (PORT structure): added hook initPaths, now each
5075         port can declare its own default search paths,
5076         which can been seen with the --print-search-dirs option,
5077         see pic16 port for example,
5078         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5079         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5080         * (doPrintSearchDirs): NEW, replaces in a central manner the
5081         printing of search dirs which was split in set*Paths functions,
5082         * (main): added call to port->initPaths and doPrintSearchDirs,
5083         * src/avr/main.c,
5084         * src/ds390/main.c,
5085         * src/hc08/main.c,
5086         * src/izt/i186.c,
5087         * src/izt/tlcs900h.c,
5088         * src/mcs51/main.c,
5089         * src/pic/main.c,
5090         * src/pic16/main.c: modified port structures to reflect addition of
5091         initPaths hook,
5092
5093         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5094         * (pic16_dump_section): for registers in same address reserve memory once,
5095         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5096         to no_banksel,
5097         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5098         result is greater in size than right or left,
5099         * (pic16_genUMult8X8_8): there are some cases where the result can
5100         be 16 bits size, so handle these,
5101         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5102         * (pic16_outBitC): modified to emit pcodes,
5103         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5104         or not,
5105         * (genDivOneByte): implemented algorithm to divide 8-bits,
5106         * (genCmp): uncommented goto, but issues still exist,
5107         * (genAnd): fixed a bug with variables >8bits,
5108         * (genPackBits): optimization added that uses BCF/BSF to change a
5109         single bit,
5110         * (genAssign): fixed bug when assigning floating point literals,
5111         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5112         __sdcc_gsinit_startup label,
5113         * src/pic16/main.c (_pic16_init): removed search directory
5114         initialisations,
5115         * (_pic16_initPaths): NEW, used to initialise search directories,
5116         * (_hasNativeMulFor): support functions for all except char/int
5117         multiplication, and char division,
5118         * (PIC16_port struct): modified entry for native mul support,
5119         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5120         no_banksel option,
5121         * (buildCallTree): call to register_usage is ifdef'ed out,
5122
5123 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5124
5125         * device/include/string.h: applied Stas Sergeev's patch to make this
5126         header file compatible with the preprocessor -Wundef option
5127         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5128         failure (fixes bug #941458)
5129
5130 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5131
5132         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5133         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5134         that the variable, not the function, should be static
5135         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5136         to be consistent with non-literal case
5137
5138 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5139
5140         * src/SDCCast.c (isConformingBody): fixed bug #949967
5141         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5142         convilong): fixed bug #952086
5143
5144 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5145
5146         * src/SDCCmem.c (allocVariables): fixed bug #955321
5147
5148 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5149
5150         * src/hc08/main.c (_hc08_genAssemblerEnd),
5151         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5152         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5153         completely eliminated the use of a temporary file
5154         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5155         when more than one file linked
5156         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5157
5158 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5159
5160         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5161         which fixes bug #543481
5162         * support/regression/tests/bug-751703.c: fixed comments left from a
5163         cut and paste error
5164         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5165         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5166         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5167         scopes
5168         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5169         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5170         are now changed to underscores in moduleName
5171
5172 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5173
5174         * as/mcs51/lkmem.c: better fix for bug #954173
5175
5176 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5177         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5178
5179         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5180         * device/include/c8051f000.h,
5181         * device/include/c8051f120.h,
5182         * device/include/c8051f300.h,
5183         * device/include/c8051f310.h,
5184         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5185         PWM16) and detab'ed
5186
5187 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5188
5189         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5190         and mailing lists, doc'ed --no-peep-comments, removed reference
5191         to knoppix (newest version has no LyX/LaTeX), other minor changes
5192         * src/SDCCglue.c (glue): save 2 bytes stack space with
5193         option --main-return. The ljmp could probably be avoided too
5194
5195 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5196
5197         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5198
5199 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5200
5201         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5202         * src/SDCCopt.c (isLocalWithoutDef),
5203         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5204         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5205         (credit to Maarten Brock for patch #949363, on which this is based)
5206         * support/regression/tests/bug-751703.c: some test cases of extern used
5207         within inner scopes.
5208
5209 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5210
5211         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5212         SPEC_STRUCT
5213         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5214         struct definitions
5215         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5216         dwWriteLabel): fix to create valid debugger symbols even when
5217         the module name has non-alphanumeric symbols in it
5218         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5219         when a variable's allocation has been optimized away
5220
5221
5222 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5223
5224         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5225         * src/hc08/main.c,
5226         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5227         * src/mcs51/main.c,
5228         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5229         * src/ds390/main.c,
5230         * src/z80/gen.c (z80_emitDebuggerSymbol),
5231         * src/z80/main.c,
5232         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5233         * src/pic/main.c,
5234         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5235         * src/pic16/main.c,
5236         * src/avr/gen.c (avr_emitDebuggerSymbol),
5237         * src/avr/main.c,
5238         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5239         * src/xa51/main.c,
5240         * src/SDCCdebug.c (emitDebuggerSymbol),
5241         * src/SDCCdebug.h,
5242         * src/port.h: added a debugger struct to the port struct. Added a
5243         callback for defining debugger symbols
5244
5245         * src/SDCCast.c (createLabel),
5246         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5247         with isitmp = 1
5248         * src/SDCCicode.h,
5249         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5250         iCode back to the ast for the function
5251
5252         * src/hc08/ralloc.c (hc08_assignRegisters),
5253         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5254         unneeded fields from the regs struct.
5255         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5256         pushReg() & pullReg() functions instead of emitcode()
5257
5258         * src/hc08/gen.c (genLabel, genhc08Code),
5259         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5260
5261         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5262         debugger hooks
5263
5264         * src/hc08/gen.c (genEndFunction, genhc08Code),
5265         * src/hc08/gen.h,
5266         * src/mcs51/gen.c (genEndFunction, gen51Code),
5267         * src/mcs51/gen.h,
5268         * src/ds390/gen.c (genEndFunction, gen390Code),
5269         * src/ds390/gen.h,
5270         * src/z80/gen.c (genEndFunction, genZ80Code),
5271         * src/z80/gen.h,
5272         * src/z80/z80.h,
5273         * src/pic/gen.c (genEndFunction, genpic14Code),
5274         * src/pic/gen.h,
5275         * src/pic16/gen.c (genEndFunction, genpic16Code),
5276         * src/pic16/gen.h,
5277         * src/avr/gen.c (genEndFunction, genAVRCode),
5278         * src/avr/gen.h,
5279         * src/xa51/gen.c (genEndFunction, genXA51Code),
5280         * src/xa51/gen.h,
5281         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5282         specific code to cdbFile.c and out of the backend code generators
5283
5284         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5285         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5286         starting address is now 0
5287
5288         * as/hc08/asm.h,
5289         * as/hc08/m08pst.c,
5290         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5291         assembler directive for DWARF support
5292         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5293
5294         * src/src.dsp,
5295         * src/Makefile.in,
5296         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5297
5298 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5299
5300         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5301         and inappropriate peephole optimization in jump tables
5302
5303 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5304
5305         * as/hc08/m08pst.c,
5306         * src/SDCCglue.c: sdccopt works for the hc08 port now
5307
5308 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5309
5310         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5311
5312 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5313
5314         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5315
5316 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5317
5318         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5319         rules
5320         * src/SDCCmain.c,
5321         * src/SDCCglobl.h,
5322         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5323         comments from the peephole optimizer replacement rules
5324         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5325         symbols
5326         * src/SDCCcse.c (updateSpillLocation),
5327         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5328         equivalents
5329         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5330         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5331         objects far pointers
5332
5333 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5334
5335         * src/SDCCsymt.h: a missing part of my last change
5336         * src/pic/ralloc.c (regTypeNum),
5337         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5338
5339 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5340
5341         * src/SDCCicode.h,
5342         * src/SDCCicode.c (aggrToPtrDclType),
5343         * src/SDCCptropt.h,
5344         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5345         ptrPseudoSymConvert),
5346         * src/pic/ralloc.c (regTypeNum),
5347         * src/pic16/ralloc.c (regTypeNum),
5348         * src/hc08/ralloc.c (regTypeNum),
5349         * src/ds390/ralloc.c (regTypeNum),
5350         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5351         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5352
5353 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5354
5355         * link/z80/lkmain.c (afile),
5356         * as/hc08/lkmain.c (afile),
5357         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5358         prevent a pointer problem when a filename has no directory and
5359         no extension specified.
5360
5361 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5362
5363         * link/z80/lkmain.c (afile): allow periods in directory names
5364         * link/z80/lkmain.c (afile),
5365         * as/mcs51/lkmain.c (afile),
5366         * as/hc08/lkmain.c (afile): allow linker script file to have an
5367         extension other than ".lnk"
5368         * link/z80/lklex.c (getfid),
5369         * link/z80/lkmain.c (parse),
5370         * as/mcs51/lklex.c (getfid),
5371         * as/mcs51/lkmain.c (parse),
5372         * as/hc08/lklex.c (getfid),
5373         * as/hc08/lkmain.c (parse): Support comments in the linker script
5374         file on lines by themselves and after filenames
5375
5376 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5377
5378         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5379
5380 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5381
5382         * src/z80/peeph-z80.def: removed some peephole rules that don't
5383         work with multibyte arithmetic (fixed bug #937126)
5384         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5385         to registers and not global variables
5386         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5387         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5388         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5389         checking for assignments not internally generated (fixed bug #931895)
5390         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5391         structure member (fixed bug #930072)
5392
5393 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5394
5395         * src/SDCCmain.c (linkEdit),
5396         * src/hc08/main.c (_hc08_parseOptions),
5397         * as/hc08/Makefile.in,
5398         * as/hc08/aslink.h,
5399         * as/hc08/asm.h,
5400         * as/hc08/m08pst.c,
5401         * as/hc08/lkrloc.c (relr, rele),
5402         * as/hc08/lkarea.c (lnkarea)
5403         * as/hc08/lkmain.c (afile, parse),
5404         * as/hc08/lkelf.c: support for ELF output
5405         * as/hc08/lks19.c (s19),
5406         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5407
5408 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5409
5410         * as/mcs51/lkihx.c: Fixed bug #899105.
5411
5412 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5413
5414         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5415         .dsp files from Unix to DOS.
5416
5417 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5418
5419         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5420         function pointers; we have been compliant for several months now.
5421         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5422         change that was accidently commented out
5423         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5424         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5425         bug #922319
5426
5427 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5428
5429         * src/hc08/gen.c: output of all of the internal debugging information
5430         is now controlled by the D() macro; it is disabled by default
5431
5432 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5433
5434         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5435         harder to keep the same registers during a CAST iCode
5436         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5437         long via int can be done in a single cast, if the signedness is
5438         correct.
5439         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5440         putchar() in tinibios.c in ds390's library
5441
5442 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5443
5444         * src/SDCCast.c (decorateType): fixed bug #898889,
5445         cast result of a literal complement too
5446         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5447         fixed check for bitfields
5448
5449 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5450
5451         * src/SDCCicode.c (geniCodeLogic): made it static,
5452         (geniCodeLogicAndOr): added in order to fix bug #905492,
5453         (ast2iCode): fixed bug #905492
5454         * support/regression/tests/bug-905492.c: added
5455         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5456         (processParms): fixed bug #927659: don't copy parms, this will clear
5457         decorated flag
5458         * support/regression/tests/bug-927659.c: added
5459
5460 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5461
5462         * src/SDCCast.c (addCast): don't cast float to char
5463         * device/lib/libsdcc.lib: added _memmove
5464
5465 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5466
5467         * device/lib/large/Makefile: fixed parallel execution by
5468         replacing `make` by `$(MAKE)`
5469
5470 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5471
5472         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5473         offsets (fixes bug #923936)
5474
5475 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5476
5477         * device/lib/small/Makefile: fixed parallel execution by
5478         replacing `make` by `$(MAKE)`
5479
5480 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5481
5482         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5483
5484 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5485
5486         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5487         * src/regression/Makefile: Regression test was not running.
5488
5489 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5490
5491         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5492         complement if possible
5493         * src/SDCCval.c (valComplement),
5494         * src/SDCCicode.c (operandOperation): fixed complement of literal
5495         * support/regression/tests/onebyte.c (testComplement): added
5496
5497 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5498
5499         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5500         return an optimized tree; actually replace actParm with the new tree
5501         * src/SDCCast.h: added some parantheses to remove side effects
5502         * support/regression/tests/bug-920866.c
5503
5504 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5505         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5506         Bit operands were not being handled properly in the pic14 port.
5507         (now src/regression/add.c passes again).
5508
5509 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5510
5511         * src/SDCC.y (labeled_statement): case and default no longer require
5512         a following statement (RFE #893037)
5513
5514 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5515
5516         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5517         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5518         disabled (fixes bug #916294)
5519         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5520         "mov a,acc"; patch provided by Lenny Story
5521         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5522
5523 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5524
5525         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5526         functions
5527         * src/ds390/gen.c (genFunction, genEndFunction),
5528         * src/ds390/ralloc.c (ds390_assignRegisters),
5529         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5530         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5531         pushed if there are parameters passed on the stack. Also, a cleaner
5532         way to decide if r0/r1 should be pushed/popped. (Together they fix
5533         bug #918693)
5534
5535 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5536
5537         * doc/sdccman.lyx,
5538         * device/lib/mcs51/crtpagesfr.asm,
5539         * device/lib/mcs51/crtxinit.asm,
5540         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5541         to avoid confusion with Si Lab's SFRPAGE register.
5542
5543 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5544
5545         * src/SDCCglue.c (emitMaps): allow public sfr variables
5546         * src/SDCCglue.c (initialComments): include compiler build date
5547         with compiler version and put the timestamp of the generated
5548         assembly file on a serperate line to be less confusing.
5549         * src/port.h: added genInitStartup hook
5550         * src/avr/main.c,
5551         * src/ds390/main.c,
5552         * src/hc08/main.c,
5553         * src/pic/main.c,
5554         * src/pic16/main.c,
5555         * src/xa51/main.c,
5556         * src/z80/main.c: genInitStartup initialize as NULL (default to
5557         historical behaviour)
5558         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5559         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5560         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5561         library instead of hard coding it into the compiler.
5562         * support/regression/ports/mcs51-stack-auto/spec.mk,
5563         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5564         * device/lib/mcs51/Makefile,
5565         * device/lib/small/Makefile,
5566         * device/lib/large/Makefile,
5567         * device/lib/mcs51/crtpagesfr.asm,
5568         * device/lib/mcs51/crtstart.asm,
5569         * device/lib/mcs51/crtxclear.asm,
5570         * device/lib/mcs51/crtxinit.asm,
5571         * device/lib/mcs51/crtclear.asm,
5572         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5573         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5574         and into user configurable files.
5575         * device/lib/clean.mk: clean mcs51 directory too
5576         * support/regression/tests/longlit.c: added static to T1 declaration
5577         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5578         accesses in the initialization code
5579
5580 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5581
5582         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5583         OSCTRIMVAL as noted in bug #916008
5584
5585 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5586
5587         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5588         in loops with multiple exits (reported as incorrect registers
5589         used by Martin Helmling in Sdcc-user list)
5590
5591 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5592
5593         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5594         made ds390 register extensions look less like error messages
5595
5596 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5597
5598         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5599         reported by Adam Wozniak in Sdcc-user list
5600
5601 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5602
5603         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5604         arithmetic optimizations, added debug output
5605
5606 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5607
5608         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5609         * sdcc.spec: updated and split sdcc into 3 rpms
5610         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5611         needed for literals of LEFT_OP and '+'
5612         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5613         introduced RESULT_TYPE_NOPROM
5614         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5615         left shift
5616         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5617         limited promotion to int only for '*'
5618         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5619
5620 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5621
5622         * src/pic16/gen.c (genSkip),
5623         (genc16bit2lit), (gencjneshort): commented out
5624         (is_LitOp): new helper function, checks operand type
5625         (genCmpEq): rewritten
5626
5627 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5628
5629         * support/regression/tests/bug-908454.c: added
5630
5631 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5632
5633         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5634         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5635         (geniCodeCast): cosmetic, don't preserve bit storage class
5636         (geniCodeLeftShift): added promotion
5637         (geniCodeLogic): fixed regression
5638         * src/SDCCsymt.c (computeTypeOr): accept bits too
5639         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5640
5641 2004-03-07  Borut Razem <borut.razem AT siol.net>
5642
5643         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5644
5645 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5646
5647         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5648         version of pic16_genPackRegisters which does not check if ic is a
5649         CAST operator,
5650         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5651         function cause string1.c regression test fails
5652
5653 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5654
5655         * sim/ucsim/configure.in,
5656         * sim/ucsim/configure,
5657         * sim/ucsim/doc/Makefile.in: use docdir
5658         * src/SDCC.y: fixed sbit atrributes
5659         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5660         * src/SDCCast.c (decorateType): |^& need special promotion handling
5661         * src/SDCCast.h,
5662         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5663         * src/SDCCsymt.h (computeType),
5664         * src/SDCCicode.c: computeType() needs op
5665         * src/SDCCsymt.c (checkTypeSanity),
5666         * doc/sddman.lyx: "plain" bitfields are unsigned
5667         * src/SDCCsymt.c (computeTypeOr): added
5668         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5669         |^& ops
5670         * src/SDCCval.c (val*): computeType() needs op
5671         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5672         * support/regression/tests/onebyte.c: added tests for |^&
5673
5674 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5675
5676         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5677         for writing icode into asm output.
5678
5679 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5680
5681         * src/pic16/device.c: added some debug lines enabled
5682         with macro DEBUG_CHECK,
5683         * src/pic16/genarith.c: more debug in genPlus,
5684         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5685         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5686         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5687         * (aopForSym): onStack symbols are re-placed in data memspace,
5688         and onStack flag is cleared,
5689         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5690         copy temporary pcodeop,
5691         * (genPcall): added warning for not updating PCLATU,
5692         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5693         always true for pic16 port,
5694         * (genMultOneWord): NEW, supports integer multiplication,
5695         * (genMult): modified to call genMultOneWord,
5696         * (ifxForOp): added warning when return NULL,
5697         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5698         flag is set before call to operandFromSymbol for implicit
5699         added structures,
5700         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5701         options.intlong_rent are set by default,
5702         * (_hasNativeMulFor): modified to allow port generation of integer
5703         multiplication,
5704         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5705         set regtype to REG_SFR for all registers, restricting seting the
5706         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5707
5708 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5709
5710         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5711         more than 500 times in the regression tests
5712
5713 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5714
5715         * support/Util/SDCCerr.h,
5716         * support/Util/SDCCerr.c,
5717         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5718         enumerator_list),
5719         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5720         for symbol conflicts.
5721         * support/valdiags/tests/enum.c,
5722         * support/valdiags/tests/tentdecl.c,
5723         * support/valdiags/tests/struct.c: expect possible error messages
5724         referring to original symbol definitions.
5725         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5726         * src/SDCCsymt.h,
5727         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5728
5729 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5730
5731         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5732
5733 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5734
5735         * src/pic16/ralloc.c (newReg): fixed bug #908929
5736
5737 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5738
5739         * src/ds390/gen.c: added missing #include "main.h"
5740
5741 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5742
5743         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5744         checking if symbol is already in set,
5745         * src/pic16/device.h: prototype for checkAddSym,
5746         * src/pic16/gen.c: (_G): added entry interruptvector,
5747         * (assignResultValue): removed some commented out lines,
5748         * (genFunction): check for ISR via sym->type, absolute section for
5749         interrupt code is created via a new pBlock, the goto instruction is
5750         placed now correctly at the interrupt vector position, changed all
5751         references from ivec to _G.interruptvector,
5752         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5753         is the interrupt is a high priority one, same for return from ISR,
5754         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5755         externs to calls of checkAddSym,
5756         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5757         pic16_pcode_verbose flag is set,
5758         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5759         * src/pic16/pcoderegs.c: message about how many registers are saved
5760         will only be emitted if pic16_pcode_verbose flag is set,
5761
5762 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5763
5764         * src/ds390/ralloc.h,
5765         * src/ds390/ralloc.c (ds390_regWithIdx),
5766         * src/ds390/gen.c (emitcode),
5767         * src/ds390/main.h,
5768         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5769         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5770         ds390operandCompare, getRegsRead, getRegsWritten,
5771         initializeAsmLineNode): customized instruction size calculation for
5772         ds390, started basis for some register optimizations
5773         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5774         corresponding assembly output
5775         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5776         missing push/pop of r0/r1. Optimized push/pops
5777
5778 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5779
5780         * src/mcs51/main.c (instructionSize): fixed ACALL size
5781         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5782
5783 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5784
5785         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5786         the sorting of rlist with NULL elements
5787         * (print_idataType, print_idata): NEW to create idata sections
5788         * src/pic16/device.h: idataSymSet new variable
5789         * src/pic16/gen.c (genFunction): fixed some bugs in string
5790         comparing, improved the absolute section creation for ISRs,
5791         added FSR0L/FSR0H in registers that are saved in an ISR,
5792         * (genInline): fixed the processing of inline snippets,
5793         now they undergo no process by the peephole optimizer
5794         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5795         are placed in idataSymSet,
5796         * (pic16emitStaticSeg): extern symbols are added in externs,
5797         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5798         switching when aboslute variables are placed in access bank memory
5799         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5800         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5801         commented out with #if,
5802         * (pic16_packRegisters): reintroduce the check for CAST because some
5803         symbols are not correctly handled,
5804         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5805         pCodeInstruction instead of pCode,
5806         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5807         pCodeAsmDir definition,
5808         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5809         directive, then the argument directive is emitted without the leading
5810         tab, hack for inline labels which must be in the first column,
5811         * (compareLabel,pic16_findNextInstruction),
5812         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5813         * (insertBankSwitch): modified for the new pCodeAsmDir,
5814
5815 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5816         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5817
5818         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5819         instance,
5820         * (pushSide): commented out with #if,
5821         * (assignResultValue): fixed some typos in saving
5822         registers,
5823         * (genPcall): FIXED and sync'ed with genCall,
5824         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5825         * (genNearPointerGet): fixed to handle some more cases,
5826         implementation scheme via table reads,
5827         * (genConstPointerGet): modified to access code memory correct,
5828         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5829         and improved to handle some cases
5830         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5831         instead of "RETLW" for init data
5832         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5833         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5834         variables are placed in access bank memory (<0x80 and >=0xf80),
5835         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5836         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5837         TBLWT_POSTDEC,TBLWT_PREINC
5838         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5839         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5840         directives
5841         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5842         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5843         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5844         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5845
5846 2004-02-29  Borut Razem <borut.razem AT siol.net>
5847
5848         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5849         support/Util/findme.h, support/Util/system.h: enhance binary relative
5850         search for lib and include by using findProgramPath()
5851
5852 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5853
5854         * src/SDCCpeeph.h,
5855         * src/SDCCpeeph.c (pcDistance),
5856         * src/port.h,
5857         * src/mcs51/ralloc.h,
5858         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5859         * src/mcs51/main.h,
5860         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5861         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5862         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5863         size calculation port specific, started basis for some register
5864         optimizations
5865         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5866         missing push/pop of r0/r1. Optimized push/pops
5867         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5868         * device/lib/_modsint.c (_modsint),
5869         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5870         and stack version so regression tests pass
5871
5872 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5873
5874         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5875         * src/SDCCast.c (decorateType): catch another small optimization
5876         with '?' operator
5877         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5878         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5879         modified to finally use computeType() all over SDCC,
5880         see Feature Request #877103
5881         * src/SDCCval.h: cosmetic
5882         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5883         valCompare(); regression tested in muldiv.c
5884         * support/regression/tests/muldiv.c (testMod): mod sign follows
5885         dividend only
5886
5887 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5888
5889         * src/SDCCast.c (decorateType): fixed bug #902362
5890         * doc/INSTALL.txt: fixed install instructions for win32
5891
5892 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5893
5894         * device/include/Makefile.in (install): fixed by replacing spaces
5895         by tabs
5896         * doc/README.txt,
5897         * doc/INSTALL.txt: updated for release
5898         * doc/sdccman.lyx: added warning for --xstack being buggy
5899
5900 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5901
5902         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5903         to eliminate build warnings.
5904         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5905
5906 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5907            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5908
5909         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5910         removed -penable-stack, added comment for stack pragma, added
5911         warning for not initializing the stack/frame registers, removed
5912         comment at interrupts section
5913
5914         Stack is made permanent, there is no ability to disable stack usage.
5915         * src/pic16/device.h,
5916         * src/pic16/device.c: removed all references to USE_STACK macro,
5917         * src/pic16/device.c (pic16_dump_section): when no elements in
5918         rlist, free rlist before return,
5919         * (pic16_dump_int_registers): NEW, internal registers are a new set
5920         of general purpose registers reused by each function,
5921         * (checkAddReg): returns 1 if registers is added to set,
5922         * (pic16_groupRegistersInSection): when a registers is of type
5923         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5924         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5925         SRCASECMP macro is moved here from device.c
5926         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5927         PO_PCLATU, PO_PRODL, PO_PRODH,
5928         * (pic16_pCodeOpType, genMinus,
5929         changed compares to "a" register, with AOP_ACC,
5930         * (pic16_genPlus): fixed some bugs and indented properly,
5931         * (pic16_addSign): changed size to size+offset in the MOVWF
5932         instruction,
5933         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5934         multiply 8-bit operand by literal, result is 8-bit,
5935         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5936         multiply 2 8-bit operand, result is 8-bit,
5937         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5938         genUMult8X*_16,
5939         * src/pic16/gen.c: changed accUse to contain WREG only,
5940         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5941         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5942         true, do not use immediate addressing any more unless sym is a
5943         pointer in codespace,
5944         * (aopForRemat): do not use immediate addressing when symbol not in
5945         codespace and when symbol's address is requested,
5946         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5947         accUse size (= 1),
5948         * (aopGet): added case for AOP_ACC and don't return "accumulator
5949         bug" but WREG instead,
5950         * (popGetTempReg): pushes contents of temporary register in stack,
5951         * (popReleaseTempReg): pops contents of temporary register from
5952         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5953         * (pic16_popGet): separated case AOP_ACC to return register WREG
5954         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5955         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5956         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5957         the use of immediate pointers to certain cases only.
5958
5959         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5960         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5961         * (assignResultValue, genCall, genRet): modified to use the new
5962         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5963         genPcall is still broken,
5964         * (genFunction): added code to create 'A' type pBlocks when
5965         interrupt functions are generated, code not extensively tested yet,
5966         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5967         * (genEndFunction): modified so ISRs pop stored registers from stack,
5968         * (genMultOneByte): cleanup,
5969         * (AccRsh): added flag andmask, to and result with appropriate mask,
5970         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
5971         * (genDataPointerGet): fixed and reenabled its use,
5972         * (genNearDataPointerGet): bugs fixed,
5973         * (genDataPointerSet): bugs fixed,
5974         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
5975         pic16_DumpSymbol, pic16_DumpOp,
5976         * src/pic16/genutils.h: function prototypes for the above functions,
5977         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
5978         pointers,
5979         * (pic16emitRegularMap): many many many improvements, but needs a
5980         major cleanup,
5981         * src/pic16/main.c: enable_stack in pic16_options is removed,
5982         * (_pic16_parseOptions): removed command line options -penable-stack,
5983         * (_process_pragma): emit stack symbol only when stack pragma is
5984         processed,
5985         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
5986         redirected to FSR0L/FSR0H pair,
5987         * (pic16_get_op, pic16_get_op2): modifications and improvements,
5988         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5989         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
5990         for immediates,
5991         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
5992         * (dumpPicOptype): NEW,
5993         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
5994         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
5995         with movff instruction,
5996         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
5997         added pic16_int_regs, some packRegsFor* functions are commented out,
5998         because produce errors,
5999         * src/pic16/NOTES: minor modifications
6000
6001 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6002
6003         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6004         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6005         --pack-iram.
6006         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6007         * as/mcs51/lkaomf51.c: fixed bug #895763
6008
6009 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6010
6011         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6012
6013 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6014
6015         * doc/sdccman.lyx: added details about the HC08 storage classes and
6016         interrupts, fixed the register usage info for z80 & gbz80
6017
6018 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6019
6020         * doc/sdccman.lyx: added more pic16 port documentation
6021         * device/include/pic16/: added header pic18fregs.h
6022
6023 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6024
6025         * doc/sdccman.lyx: added Vangelis' contribution
6026
6027 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6028
6029         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6030         extend to the next CALL or PCALL, not just to the next CALL.
6031
6032 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6033
6034         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6035
6036 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6037
6038         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6039         bug #895752 and a better fix for bug #716790
6040
6041 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6042
6043         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6044
6045 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6046
6047         * doc/sdccman.lyx: minor changes, minor changed
6048
6049 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6050
6051         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6052         which can't handle SDCC_NEWONEBYTEOPS,
6053         (geniCodeMultiply): removed conversion from mult to shift for pic14
6054         and pic16
6055
6056 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6057
6058         * src/hc08/gen.h,
6059         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6060         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6061         thus fixing bug #895406
6062
6063 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6064
6065         * device/lib/_modsint.c,
6066         * device/lib/_modslong.c: sign follows divisor only
6067         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6068         signs or signedness can be ignored
6069         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6070         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6071         added optimization for IFX,
6072         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6073         arguments;
6074         reenabled optimization for IFX, which was removed on 2004-01-11
6075         * src/SDCCast.h: added return type IFX
6076         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6077         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6078         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6079         SDCC_OLDONEBYTEOPS selects the old behaviour
6080         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6081         changed again and commented promotion rule
6082         * src/SDCCval.c (valDiv): promotion no longer necessary
6083         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6084         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6085         rewritten
6086         * support/regression/tests/onebyte.c: added
6087
6088 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6089
6090         * gen.c (genInline): reverted to old code for assemnling inline
6091         code because of bug reported James Chadd
6092
6093 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6094
6095         * ralloc.h: missing declarations from previous patch,
6096         seems that patch for ralloc.h was never applied, fixed
6097
6098 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6099            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6100
6101         * pcode.c,
6102         * pcode.h,
6103         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6104         indirect addressing. Marked FSR0 as deprecated
6105         * gen.c (pointerCode): commented out, not needed now
6106         (pic16_popGet2p): new MOVFF helper function
6107         (genGenPointerGet),
6108         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6109         (shiftRLong): removed duplicate debugging info
6110
6111 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6112
6113         * src/ds390/gen.c (genNearPointerGet),
6114         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6115         optimization with bits, but not bitfields.
6116         * src/ds390/ralloc.c (packRegisters),
6117         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6118
6119 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6120
6121         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6122
6123 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6124
6125         * src/SDCCsymt.h,
6126         * src/SDCCicode.c (operandFromSymbol),
6127         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6128         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6129         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6130         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6131         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6132         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6133         bug #892038
6134         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6135         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6136         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6137         * src/SDCCsymt.c (newSymbol),
6138         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6139         enumerator_list),
6140         * src/SDCCval.h,
6141         * src/SDCCval.c (newiList): fixed bug #885705
6142
6143 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6144
6145         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6146         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6147
6148 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6149
6150         * device/include/c8051f120.h,
6151         * device/include/c8051f300.h,
6152         * device/include/c8051f310.h: added/updated header files for Silicon
6153         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6154         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6155         in new section Submitting patches
6156
6157 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6158
6159         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6160         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6161         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6162         genGenPointerSet),
6163         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6164         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6165         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6166         genGenPointerSet),
6167         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6168         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6169         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6170         genGenPointerSet),
6171         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6172         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6173         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6174         genGenPointerSet): fixed bug #892400
6175         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6176         to eliminate build warnings.
6177         * src/SDCCast.c (processParms),
6178         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6179         fixed bug 751859
6180         * support/valdiag/valdiag.py: added GCC to the list of defines active
6181         when compiling with gcc
6182
6183 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6184
6185         * support/Util/SDCCerr.h,
6186         * support/Util/SDCCerr.c,
6187         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6188         with an incomplete type (fixed bug #883734)
6189         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6190
6191 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6192
6193         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6194
6195 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6196
6197         * src/SDCCast.c (decorateType),
6198         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6199         function pointer implementation
6200         * support/regression/tests/funptrs.c: added tests to verify both forms
6201         of function pointers work correctly. Added tests to verify parameters
6202         are passed in the correct order.
6203
6204 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6205
6206         * device.c (regCompare): registers are sorted by ascending
6207         address and increasing size,
6208         * main.c (_pic16_finaliseOptions): removed the declaration
6209         of compiler macro MCU. Now a macro of the format pic18fxxxx
6210         will be defined from the command line
6211
6212 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6213             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6214
6215         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6216         PCOP_RLCF was overwritten!
6217         * gen.c (genSkip): commented out calls to pic16_emitcode,
6218         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6219         * (genlshTwo),
6220         * (genRRC): added debugging info,
6221         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6222         overwritten while shifting,
6223         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6224         overwritten while shifting,
6225         * (AccLsh),
6226         * (AccRsh),
6227         * (shiftLLeftOrResult),
6228         * (shiftRLeftOrResult),
6229         * (shiftRLong),
6230         * (shiftLLong): Implemented with pic16_emitpcode
6231         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6232         * (genLeftShift): Fixed bug, operand for shift by variable always
6233         was "and"ed with 0x0f,
6234         * (genLeftShiftLiteral),
6235         * (genrshTwo),
6236         * (genRightShiftLiteral): added debugging info,
6237         * (genrshFour): added comment,
6238         * (genRightShift): determined signedness from operand "left"
6239         instead of "result"
6240
6241 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6242
6243         * src/SDCCicode.c (geniCodeParms),
6244         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6245         function pointers, fixed function pointer bugs #861242 and #861896
6246
6247 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6248
6249         * device/include/c8051f000.h,
6250         * device/include/c8051f120.h,
6251         * device/include/c8051f300.h: added header files for Silicon
6252         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6253
6254 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6255
6256         * src/SDCCast.c (processParams): added new type flow and restructured
6257         (gatherAutoInit): added new type flow
6258         (addCast): cosmetic changes
6259         (getLeftResultType): added new type flow for array indices, patch
6260         provided by Stas, see FR #877103
6261         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6262         array index patch by Stas
6263         * src/SDCCast.h: added prototype getResultTypeFromType()
6264         * src/SDCCval.h,
6265         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6266         * src/pic/glue.c (pic14emitStaticSeg),
6267         * src/pic16/glue.c (pic16emitStaticSeg),
6268         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6269         for initialization of symbols
6270         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6271         * support/Util/SDCCerr.h:
6272         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6273         * .version: bumped version number to 2.3.8
6274         * device/include/Makefile.in (install),
6275         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6276         avoid warnings
6277
6278 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6279
6280         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6281         Slade Rich fixed an optimization bug
6282         * src/pic/pcodepeep.c,
6283         * src/pic/pcoderegs.c
6284         * doc/Makefile (install): added test for directory
6285
6286 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6287
6288         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6289         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6290         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6291         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6292         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6293         * as/mcs51/asexpr.c (term),
6294         * as/hc08/asexpr.c (term): fixed bug #887146
6295
6296 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6297
6298         * src/z80/gen.c (genMult): handle single byte result product
6299         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6300         DUMMY_READ_VOLATILE (fixed bug #886367)
6301
6302 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6303
6304         * support/regression/tests/libmullong.c: fixed logic, on little endian
6305         hosts we ended without a mullong_wrapper()
6306
6307 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6308
6309         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6310         virus/worm forged address usage.
6311
6312 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6313
6314         Fixed promotion, it should be done on AST level:
6315         * src/SDCCast.c (addCast): added promotion to int
6316         (decorateType): updated call to upCast()
6317         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6318         usualUnaryConversions()
6319
6320 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6321
6322         * support/regression/tests/literalop.c (mulWrapper): Added a
6323         wrapper to remove integer overflow warnings.
6324
6325         * support/regression/tests/float_trans.c: Made work on host.
6326
6327         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6328         location of sz80.
6329
6330         * support/regression/generate-cases.py (main): Changed from inline
6331         to a main method.
6332
6333         * doc/Makefile (install): Changed to depth first to get rid of
6334         missing directory install warning.
6335
6336         * as/Makefile (install-doc): Made work on Mac.
6337
6338 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6339
6340         * src/SDCCast.c: added an additional type flow in decorateType() of
6341         opposite direction, see feature request #860006; it's enabled at runtime
6342         by setting the environment variable SDCC_NEWTYPEFLOW
6343         * src/SDCCast.h: changed prototype of decorateType()
6344         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6345         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6346         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6347         see feature request #877103
6348         * src/SDCCval.c: updated call of decorateType()
6349         (valBitwise): fixed bug #882876
6350         (valMinus): added promotion
6351         (valLogicAndOr): result is unsigned
6352         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6353         * src/SDCCsymt.c (computeType),
6354         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6355         must not cause an unsigned operation
6356         * src/pic/glue (pic14emitRegularMap),
6357         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6358
6359 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6360
6361         * src/pic/pcode.c (PCodeID): commented out left over debug code
6362
6363 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6364
6365         * support/valdiag/tests/overflow.c: added shift tests
6366         * src/pic/device.c,
6367         * src/pic/gen.c,
6368         * src/pic/gen.h,
6369         * src/pic/glue.c,
6370         * src/pic/main.c,
6371         * src/pic/pcode.c,
6372         * src/pic/pcode.h,
6373         * src/pic/pcodepeep.c,
6374         * src/pic/pcoderegs.c,
6375         * src/pic/ralloc.c,
6376         * src/pic/ralloc.h: applied patch from Slade Rich;
6377         added support for multiple code pages and multiple RAM banks on the
6378         PIC 14 port. The ASM files now no longer simply assume all the
6379         code / RAM are in the same page / bank. This means the linker can
6380         safely allocate code/RAM of separate ASM files to different pages/banks.
6381         * doc/sdccman.lyx: added Slade's tips
6382         * src/mcs51/peeph.def: fixed bug #880768
6383
6384 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6385
6386         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6387         * src/SDCCast.c (decorateType): fixed bug #880197
6388
6389 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6390
6391         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6392         getopt.h.
6393
6394         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6395         strtof is not part of C89 and isn't included with Mac OS X.
6396
6397 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6398
6399         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6400         shiftL2Left2Result): fixed bug #879326
6401         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6402         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6403         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6404         address fetch for clr instruction
6405         * device/lib/hc08/_mulint.c: created optimized assembly version
6406         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6407
6408 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6409
6410         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6411         proposed in FR #877103
6412
6413 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6414
6415         * src/SDCCval.c (cheapestVal): added missing checks
6416         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6417         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6418
6419 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6420
6421         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6422         equal operands
6423
6424 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6425
6426         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6427         loaded with the linker search paths (-L arguments) and the libraries
6428         to be linked with the current source (-l arguments). Changes
6429         currently will affect only the pic16 port.
6430         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6431         include path the port specific paths and port specific libraries,
6432         * gplink command now contains the $3 argument,
6433         * src/pic16/device.h,
6434         * src/pic16/device.c,: structure PIC_device is made public and
6435         renamed to PIC16_device, the same for variable Pics which is renamed
6436         to Pics16. Updated all references to them.
6437         * src/pic16/glue.c (pic16glue): corrected bug with code
6438         initialization which bypassed the variable initializations block.
6439
6440         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6441         COMPILE_FLAGS and added the --nostdinc option
6442
6443 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6444
6445         * device/include/mc68hc908jb8.h: Register defs for another member
6446         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6447
6448 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6449
6450         Documenting changes from previous commits.
6451         * configure.in (version 1.56),
6452         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6453         when generating output files to configure the pic16 library,
6454         but now I've commented it out, since gputils aren't installed in the
6455         SF compile farm, so library won't compile
6456
6457         * device/lib/Makefile.in (version 1.56): initially I've added in
6458         target 'all' the prerequestive 'model-pic16' so it compiled the
6459         pic16 library, but now I've commented it out for the same reasons
6460         above,
6461         * added targets 'model-pic16' and 'objects-pic16' to compile the
6462         library
6463         * added target 'port-specific-objects-pic16' to handle the
6464         generated libraries and copy them into the build/ directory
6465         * added target 'clean-intermediate-pic16' to clean intermediate
6466         files into pic16 directory
6467         * in target 'installdirs' added line to create directory pic16 in
6468         the installation path
6469
6470         * device/include/Makefile.in (version 1.11): in target 'install'
6471         added lines to copy all header files to installation path,
6472         * in target 'installdirs' added line create directory for pic16
6473         headers in the installation path
6474
6475 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6476
6477         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6478          a function call
6479
6480 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6481
6482         * configure,
6483         * device/lib/configure.in,
6484         * device/lib/configure: fixed for autoconf 2.57
6485
6486 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6487
6488         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6489         option so that it actually works. Made it specific to the z80, since
6490         the gbz80 doesn't have these kinds of I/O ports.
6491
6492 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6493
6494         * device/include/z180.h,
6495         * device/lib/_memcpy.c,
6496         * device/lib/_memmove.c,
6497         * device/lib/_mulint.c,
6498         * device/lib/ser_ir.c,
6499         * device/lib/ser_ir_cts_rts.c,
6500         * device/lib/_strcmp.c,
6501         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6502         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6503         portmode; added deprecation warning for bank= and protmode= forms.
6504         Also, guard against buffer overflow.
6505         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6506
6507 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6508
6509         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6510         changed interrupt vector table generation to only emit declared vectors.
6511         * device/include/Makefile.in: added missing backslash
6512         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6513
6514 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6515
6516         Mainly changes to support compilation of the device libraries
6517         * src/pic16/device.c: stack is allocated via symbol and not
6518         via literal number. The symbol is placed in the corresponding
6519         position of the data ram
6520         * (pic16_dump_section): relocatable and absolute uninitialized
6521         data are now emitted in sorted order to reduce section naming,
6522         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6523         weren't marked as being in the access bank,
6524
6525 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6526
6527         Added portion of GNU PIC Library under the directory
6528         device/include/pic16 and device/lib/pic16. These files
6529         contain the declarations of SFRs for the PIC18Fxx2 devices.
6530         The directory is initialized via configure from toplevel.
6531
6532 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6533
6534         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6535         the spilllocations to be compared correctly
6536
6537 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6538
6539         * src/SDCCast.c (decorateType): fixed bug introduced today
6540
6541 2004-01-12  Borut Razem <borut.razem AT siol.net>
6542
6543         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6544         doc/sdccman.lyx: upper case pragmas are deprecated
6545
6546 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6547
6548         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6549         in simpler and even better code
6550
6551 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6552
6553         * src/SDCCicode.c (operandOperation): fixed bug #874819
6554         * src/SDCCast.c (decorateType): fixed
6555         char foo (unsigned long ul) { return ul > 0; }
6556
6557 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6558
6559         * doc/sdccman.lyx: Moved and added some sections, small changes
6560         all over. Telling LaTeX to be less strict with word spacing
6561         to better keep the right margin. Changed some notes about
6562         maintainance of the ports in section 3.2.1 - is it OK like this?
6563
6564 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6565
6566         SDCC source changes:
6567         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6568         convilong): modified to inform the pic16 port that builtin functions
6569         are external
6570
6571         PIC16 PORT specific changes:
6572         * src/pic16/device.c pic16_dump_equates() added,
6573         processor registers declared internally by the port are emitted in
6574         the translation as equates,
6575         * src/pic16/gen.c: inline code is passed unprocessed to the
6576         translation,
6577         * (pic16_popGetLit2): fnuction modified to take second operand as
6578         pCodeOp pointer and not as literal,
6579         * (popRegFromIdx): prefixed with pic16_,
6580         * (pic16_popCombine2): modified to receive already allocated pCode
6581         operands,
6582         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6583         * (genFunction): initializes local stack frame and pushes on stack
6584         all the registers used by this function,
6585         * (genEndFunction): restores all registers from stack and restores
6586         stack frame,
6587         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6588         improvements,
6589         * (pic16glue): changed the program startup sequence,
6590         * added new dbName code 'A' for functions placed in absolute section
6591         * src/pic16/main.c: added function attribute _naked,
6592         * added pragma 'code' to place a fnuction at an absolute address,
6593         * added command line arguments --debug-ralloc and --pcode-verbose,
6594         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6595         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6596         * (pic16_newpCodeOpLit2): modified to take the second operand as
6597         pCodeOp pointer,
6598         * (pic16_printpBlock): modified to emit each function in a separate
6599         section,
6600         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6601         UPPER for immediate operands,
6602         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6603         instruction,
6604         * src/pic16/peeph.def: all peepholes with movff are commented out,
6605         because there is a problem in the pcode peep optimizer,
6606         * src/pic16/ralloc.c: the register allocator can now reuse local
6607         function symbols for another function. This saves register usage.
6608         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6609
6610         Added file src/pic16/NOTES with information about program writing on
6611         the current port version.
6612
6613 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6614
6615         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6616         and peephole 252 (array access)
6617
6618 2004-01-09  Borut Razem <borut.razem AT siol.net>
6619
6620         * src/SDCCmain.c : fixed #872250: -l command line defined library
6621           files are scanned before standard library files
6622
6623 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6624
6625         * src/SDCCast.c (decorateType): fixed bug #874046
6626
6627 2004-01-09  Borut Razem <borut.razem AT siol.net>
6628
6629         * support/scripts/sdcc.nsi: remove previous installation
6630
6631 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6632
6633         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6634         bytes for last interrupt vector (mcs51)
6635         * sdcc.spec: fixed typo
6636
6637 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6638
6639         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6640         gen51Code): more efficient parameter receive for --model-large
6641         ("bug" #845294)
6642
6643 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6644
6645         * src/ds390/main.c,
6646         * src/z80/main.c: added missed needLinkerScript flags (more than
6647         one port structure defined in these file)
6648         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6649         bug #795325
6650
6651 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6652
6653         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6654         * src/port.h: added flag needLinkerScript in port->linker
6655         structure to inform whether to create a .lnk file or not,
6656         * src/avr/main.c,
6657         * src/ds390/main.c,
6658         * src/hc08/main.c,
6659         * src/mcs51/main.c,
6660         * src/pic/main.c,
6661         * src/pic16/main.c,
6662         * src/xa51/main.c,
6663         * src/z80/main.c: changed appropriately to configure
6664         needLinkerScript flag
6665         * src/pic/gen.c,
6666         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6667         * src/pic/glue.c: added variable udata_section_name to
6668         override default uninitialized data segment definition for
6669         devices only with SHAREBANK memory (reported from Erik Epetrich)
6670         * (pic14emitOverlay): modified to emit a commented overlay segment
6671         directive when no overlay data exist
6672         * (picglue): modified to emit uninitialized data segment
6673         according to udata_section_name
6674         * src/pic/main.c (_pic14_parseOptions): added command line
6675         options --udata-section-name=[name] to override default
6676         udata definition name
6677         * modified _linkCmd and _asmCmd to include compiler passed
6678         arguments via -W option
6679         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6680         object file from '.rel' to '.o' in port->linker structure,
6681         changed size of fptr from 2 to 3 in port structure
6682
6683 2004-01-07  Borut Razem <borut.razem AT siol.net>
6684
6685         * support/scripts/sdcc.nsi: update PATH
6686         * support/scripts/sdcc.ico: craeted
6687
6688 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6689
6690         * device/include/Makefile.in: fix install
6691         * doc/Makefile: fix install
6692
6693 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6694
6695         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6696         in bug #860505
6697         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6698         how the function variable allocation summary is displayed; also
6699         include information about variables allocated to the overlay
6700         segment
6701
6702 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6703
6704         * as/mcs51/lkmain.c: Help about -Y option
6705         * as/mcs51/lkarea.c: Fixed gcc warnings
6706
6707 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6708
6709         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6710         fixed warning
6711         * support/valdiag/tests/overflow.c: added
6712         * src/SDCCast.c (decorateType),
6713         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6714         LEFT_OP (left shift)
6715
6716 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6717
6718         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6719         (default behaviour).
6720
6721 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6722
6723         A python script to validate compiler diagnostic messages. It can be
6724         used to verify that sdcc complains about bad c source code and
6725         gives a good location of the error.
6726         * support/valdiag/Makefile,
6727         * support/valdiag/valdiag.py,
6728         * support/valdiag/tests/*
6729
6730 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6731
6732         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6733         * src/SDCCsymt.c (newEnumType),
6734         * src/SDCCsymt.h
6735         * support/Util/SDCCerr.c,
6736         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6737         enum related bugs.
6738         * support/regression/tests/enum.c: added test for enum values that
6739         require at least 2 bytes of storage.
6740
6741 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6742
6743         * src/common.h: added ifndef/define/endif macros
6744         around the header file.
6745         Bug reported from Jesus Calvino-Fraga
6746
6747 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6748
6749         * sdcc.spec: updated
6750         * device/include/Makefile.in: don't install CVS directories
6751         * device/lib/Makefile.in: added removal of CVS directories after install
6752         * doc/Makefile: fixed install, added local_icons
6753         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6754         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6755         * src/ds390/gen.c (genRightShift): fixed bug #870788
6756         * src/SDCCast.c (decorateType): fixed bug #870781
6757
6758 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6759
6760         PIC16 port related changes:
6761         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6762         added variable stackPos,
6763
6764         * gen.c: genCall, assignResultValue: added support for
6765         pushing/retrieving function parameters to/from stack,
6766         genFunction,genEndFunction: setup stack frame for the
6767         generated function,
6768         genAddrOf: will be changed according to bug 863624
6769
6770         * added files genutils.c and genutils.h which contain gen*
6771         debugged and optimised functions extracted from gen.c
6772
6773         * glue.c: added variable 'externs' which holds extern symbols,
6774         pic16emitRegularMap: is modified to properly handle relocatable
6775          symbols under the new scheme,
6776         pic16createInterruptVect: is modified
6777         pic16printPublics: is modified to emit 'global' assembler directives,
6778         added pic16_printExterns to print extern symbols,
6779         pic16glue: initializes stack/frame pointer in the beginning of
6780         the assembly output. Temporary hack, will be corrected later,
6781         because gplink yet does not support stack and SDCC does not
6782         yet support a type of crt0.o object to create the final binary.
6783
6784         * Removed many lines that contain 8051 legacy code.
6785         * The code is finally placed under a 'code' directive.
6786         * Added port specific options.
6787
6788         * _process_pragma: simplified since now we do not need *special*
6789         include file to define SFR registers. But a separate header
6790         will be needed. This will be developed later.
6791         * _pic16_parseOptions: added, parses port specific options:
6792         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6793         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6794         --preplace-udata-with=
6795
6796         * _pic16_setDefaultOptions: modified to initialize section names,
6797         but hack is temporarly out of order since it needs improvement.
6798         * _pic16_genAssemblerPreamble: configuration words are emitted by
6799         their address instead of their name. This part is incomplete and
6800         supports only the 18Fxx2 devices. Other devices will emit an error
6801         during assembly since they do not contain the same set of config
6802         registers
6803         * _pic16_genIVT: is modified,
6804
6805         * pcode.c: added definitions for some hardware registers that are needed
6806         for stack support
6807         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6808         All PCI entries are updated. Now LFSR is supported.
6809         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6810         * added pic16_newpCodeOpLit2 to support instructions with
6811         two literal arguments
6812         * pic16_pCode2str: corrected code that emits assembler instructions
6813         with two literal operands and those that have an access bit modifier
6814         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6815         this fixes a bug which caused some labels to be lost, when an
6816         assembler directive was added, i.e. banksel,
6817         * pic16_FixRegisterBanking: improved logic that causes the insertion
6818         of bank switching,
6819         * InlineFunction: functions that are called once, are not any more
6820         inlined. This can be a port option in the future,
6821
6822         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6823
6824         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6825         hold the corresponding uninitialized symbols,
6826         * pic16_allocProcessorRegister: registers have explicit marked the
6827         accessBank field,
6828         * pic16_allocInternalRegister: registers are explicit marked as
6829         not used,
6830         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6831         processing list, so bit registers were lost,
6832         *
6833
6834         * ralloc.h: added field 'accessBank' and original symbol operand
6835         in register definition,
6836         * removed the field isMapped from register definition,
6837
6838         ** Several functions have been removed from various sources:
6839         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6840         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6841         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6842         pic16_assignRelocatableRegisters
6843
6844         ** others have been introduced:
6845         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6846         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6847
6848 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6849
6850         * support/scripts/inc2h.pl: changed definition of BIT_AT
6851         to emit 'sbit at' instead of 'bit at'. This was a request.
6852
6853         PIC16 port related preliminary changes:
6854         * gen.c: prefixed function popRegFromString with
6855         pic16_ and all references to it corrected
6856         * pcode.c: all pic16_pc_* hardware registers prefixed
6857         with underscore (_),
6858         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6859         * ralloc.c: newReg(): when register is REG_SFR then
6860         set address to rIdx,
6861         pic16_allocProcessorRegister(): marks register wasUsed=0
6862         pic16_writeUsedRegs(): added a call to assign processor
6863         registers via pic16_assignFixedRegisters
6864
6865 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6866
6867         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6868         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6869         variables in unused register banks.  Also the SSEG is placed
6870         wherever there is enough space for it, and IDATA can be anywhere
6871         in internal RAM.  For now compile using -Wl-Y[stack_size].
6872         The mem file is different for this option as well, since it
6873         makes no sense of talking about DSEG lenght.
6874
6875 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6876
6877         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6878         in certain cases, e.g. when ROM assignment, patch provided
6879         from Albert den Haan.
6880
6881 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6882
6883         Many signedness and type propagation fixes:
6884         * src/SDCCicode.c: made geniCodeCast() static
6885         replaced SPEC_ by IS_ (cosmetic)
6886         (operandOperation): fixed div and mod operation
6887         (usualBinaryConversions): added support for promotion of char
6888         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6889         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6890         (geniCodeAdd): an array index will stay unsigned, even if promoted
6891         from char to int
6892         (geniCodeArray): ditto
6893         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6894         * src/SDCCsymt.c (computeType): added more support for char;
6895         promotion of char is selectable by promoteCharToInt, fixed signedness
6896         for all cases
6897         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6898         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6899         * src/SDCCval (val*): replaced signedness calculation by
6900         computeType()
6901         rearranged if-branches (cosmetic)
6902         (valShift): added warning W_SHIFT_CHANGED
6903         (valCompare): fixed problem with different types
6904         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6905         * support/regression/tests/literalop.c: added many cases
6906         * support/regression/tests/ast_constant_folding.c: changed finally to
6907         'unsigned int'
6908         * .version: new year, new version: 2.3.7
6909         * src/SDCCmain.c (main): applied patch #866468
6910         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6911         provided by Scott Bronson
6912         * doc/sdccman.lyx: updated documentation for sdcdb
6913         updated and added chapter tips
6914
6915 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6916
6917         * src/SDCCsymt.h: missing from yesterday's commits
6918
6919 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6920
6921         * src/SDCC.y (struct_or_union_specifier),
6922         * support/Util/SDCCerr.c,
6923         * support/Util/SDCCerr.h: verify that struct & union tags are used
6924         as declared.
6925
6926 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6927
6928         * src/SDCCglobl.h: missing from yesterday's commits
6929
6930 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6931
6932         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6933         sft_attributes, struct_declaration, parameter_declaration,
6934         type_name, start_block, declaration_list),
6935         * src/SDCC.lex (check_type): support redefinition of typedef names
6936
6937 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6938
6939         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6940         aligned xdata arrays. Erik helped me with the if clause.
6941
6942 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6943
6944         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6945         warning
6946
6947 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6948
6949         * src/SDCCast.h,
6950         * src/SDCCast.c (newAst_),
6951         * src/SDCCicode.h,
6952         * src/SDCCicode.c (ast2iCode, newiCode),
6953         * src/SDCCglobl.h,
6954         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6955         expr, statement, expression_statement, selection_statement,
6956         iteration_statement, expr_opt, jump_statement): foundation for tracking
6957         sequence points
6958         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6959         point code too)
6960
6961 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6962
6963         * support/Util/SDCCerr.c,
6964         * src/SDCCast.h,
6965         * src/SDCCast.c (createCase, createDefault, decorateType),
6966         * src/SDCClabel.c (labelUnreach),
6967         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6968         to error messages.
6969         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
6970         (with thanks to Stas Sergeev)
6971         * device/include/time.h,
6972         * device/lib/time.c (CheckTime): suppress unreachable code warning
6973
6974 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6975
6976         * src/SDCCast.c (createIvalCharPtr),
6977         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
6978         bug #753752)
6979         * support/regression/tests/nullstring.c: tests for these two bugs
6980
6981 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6982
6983         * support/Util/SDCCerr.h,
6984         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
6985         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
6986         about storage class and 'at' used inside struct or union
6987         * src/SDCCBBlock.c (iCodeFromeBBlock),
6988         * src/SDCCcse.c (ifxOptimize),
6989         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
6990         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
6991         printIval, emitStaticSeg, emitOverlay),
6992         * src/SDCClabel.c (deleteIfx),
6993         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
6994         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
6995         gatherAutoInit, processParms),
6996         * support/Util/SDCCerr.h,
6997         * support/Util/SDCCerr.c (werrorfl): Support for better error location
6998         reporting for post-parse errors.
6999
7000 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7001
7002         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7003         implicit casts via union; they don't work on big endian systems
7004         (possible fix for bug #861138)
7005
7006 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7007
7008         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7009         * src/mcs51/main.c: fixed the fix for bug #737001
7010
7011 2003-12-15  Borut Razem <borut.razem AT siol.net>
7012
7013         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7014
7015 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7016
7017         * support/makebin/makebin.c: put output in binary mode
7018
7019 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7020
7021         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7022         xdata and data memory on startup. Set the environment variable
7023         SDCC_NOGENRAMCLEAR to disable this.
7024         * src/mcs51/peephole.def,
7025         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7026         (allows non-interrupt and interrupt code to safely compete for a resource
7027         without the non-interrupt code having to disable interrupts)
7028
7029 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7030
7031         * src/SDCCicode.c (geniCodeAdd),
7032         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7033         with valFromType if type might be a pointer and host is big endian).
7034         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7035         types, not just integer types.
7036         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7037         multiply defined with mismatching "at" address.
7038
7039 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7040
7041         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7042         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7043         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7044         with embedded nulls (fixed bug #753752)
7045
7046 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7047
7048         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7049         Apparently this did not see much testing (endless loop)
7050
7051 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7052
7053         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7054
7055 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7056
7057         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7058         gracefully handle NULL memmap pointers
7059
7060 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7061
7062         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7063         instead of deleting the iCode when an operand is volatile
7064         * src/z80/gen.c (genDummyRead),
7065         * src/mcs51/gen.c (genDummyRead),
7066         * src/ds390/gen.c (genDummyRead),
7067         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7068         not just IC_RIGHT
7069         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7070         * src/SDCC.y: fixed bug #850420
7071
7072 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7073
7074         Applied z80 i/o port patch from Peter Townson and fixed some operators
7075         to better handle operands in A register.
7076         * device/include/z180.h
7077         * src/SDCC.y
7078         * src/SDCCglue.c
7079         * src/z80/gen.c
7080         * src/z80/gen.h
7081         * src/z80/main.c
7082         * src/z80/peeph-z80.def
7083         * src/z80/peeph.def
7084         * src/z80/z80.h
7085
7086 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7087
7088         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7089
7090 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7091
7092         * device/lib/hc08/_mullong.c: Removed extra #endif
7093
7094 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7095
7096         * sim/ucsim/hc08.src/inst.cc,
7097         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7098         carries from x to h
7099         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7100         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7101         * device/include/stdarg.h: fixed varargs for hc08
7102         * device/lib/Makefile.in,
7103         * device/lib/hc08/Makefile,
7104         * device/lib/hc08/_mulint.c,
7105         * device/lib/hc08/_mullong.c: fixed some endian problems
7106
7107 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7108
7109         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7110         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7111         * device/lib/_gptrget.c,
7112         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7113
7114 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7115
7116         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7117         * src/SDCCast.c (astErrors): fixed bug #846007
7118         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7119
7120 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7121
7122         * src/SDCCast.c (decorateType): disabled a transformation I added in
7123         revision 1.188 (access to fields of a structure at an absolute address);
7124         it breaks with bitfields, extern declarations, and gcse analysis.
7125         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7126         could be assigned through a pointer, so don't complain.
7127         * src/SDCCast.c (astErrors),
7128         * src/SDCCast.h,
7129         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7130
7131 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7132
7133         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7134         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7135         output of __config directives, since gpasm now supports them
7136         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7137         pre-processor macro, i.e. -DMCU=p18f452
7138         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7139         and modified to handle 'cast' icode similarly to '=' icode
7140         * src/pic16/device.h (typedef struct PIC_device): added field
7141         'extMIface' to indicate that chip has external memory interface
7142         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7143         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7144         18F8720
7145
7146 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7147
7148         * src/SDCC.y (pointer): fixed bug #846006
7149         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7150         * src/SDCCast.c (decorateType): fixed bug #846009
7151         * src/ds390/peeph.def,
7152         * src/ds390/gen.c (genAnd, genOr),
7153         * src/mcs51/peeph.def,
7154         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7155
7156 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7157
7158         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7159         * src/SDCCdflow.c
7160         * src/SDCCcse.c
7161         * src/SDCCcse.h
7162         * src/SDCCBBlock.h
7163         * src/SDCCBBlock.c
7164
7165 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7166
7167         fixed bug #845089
7168         * src/SDCCbitv.h,
7169         * src/SDCCbitv.c: added function to free a bitvector
7170         * src/SDCClrange.h,
7171         * src/SDCClrange.c: added function to recompute the liveranges
7172         * src/avr/ralloc.c,
7173         * src/ds390/ralloc.c,
7174         * src/hc08/ralloc.c,
7175         * src/mcs51/ralloc.c,
7176         * src/pic/ralloc.c,
7177         * src/pic16/ralloc.c,
7178         * src/xa51/ralloc.c,
7179         * src/z80/ralloc.c: recompute the liveranges after register packing
7180
7181 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7182
7183         * src/SDCCloop.c (newInduction): fixed bug #845630
7184
7185 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7186
7187         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7188         inadvertantly left behind from my 2003-11-12 change
7189
7190 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7191
7192         Updated headers I neglected to commit yesterday.
7193         * src/SDCClrange.h,
7194         * src/SDCCicode.h
7195
7196 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7197
7198         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7199         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7200         * src/SDCCopt.c (eBBlockFromiCode),
7201         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7202         the creation of the key hash table from the sequencing so it can be used
7203         earlier (for some GCSE bug fixes still pending)
7204
7205 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7206
7207         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7208         * support/regression/tests/addsub.c: testing genPlus shortcut
7209
7210 2003-11-15  Borut Razem <borut.razem AT siol.net>
7211
7212         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7213
7214 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7215
7216         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7217         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7218         ordering is immaterial.
7219         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7220
7221 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7222
7223         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7224         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7225         (SIGSEV) of bug #840381
7226         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7227         unlink new file before rename if new and old filenames are the same)
7228
7229 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7230
7231         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7232         uninitialized variables) for the mcs51. Set environment variable
7233         SDCC_GENRAMCLEAR to test.
7234         xdata initialization slightly shorter
7235
7236 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7237
7238         * src/SDCCsymt.h,
7239         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7240         #838241 & 780691 (basicly the same bug)
7241         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7242         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7243
7244 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7245
7246         * src/SDCCmain.c (linkEdit): "fix" #834252
7247
7248 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7249
7250         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7251         * src/SDCCast.h,
7252         * src/SDCC.y: fixed bug #819403
7253
7254 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7255
7256         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7257         the reentrant attribute.
7258         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7259         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7260         simulation
7261         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7262         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7263         erroneously reduced to a literal.
7264         * src/hc08/ralloc.c (packRegisters, rematStr),
7265         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7266         some cases
7267
7268 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7269
7270         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7271         * doc/sdccman.lyx: changed from 'article' to 'book'
7272         * doc/Makefile: readded test_suite_spec and cdbfileformat
7273
7274 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7275
7276         * device/include/stdlib.h: include malloc.h to comply with ANSI
7277         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7278
7279 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7280
7281         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7282         * doc/clean.mk: also remove *.out files
7283         * doc/sdccman.lyx: some additions, larger top/bottom margins
7284
7285 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7286
7287         * src/SDCC.y: fixed bug #837365
7288         * support/regression/tests/bitopcse.c
7289         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7290         a symbol (might be valop instead)
7291         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7292         * device/lib/clean.mk: added hc08 to the cleaning list
7293
7294 2003-11-04  Borut Razem <borut.razem AT siol.net>
7295
7296         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7297           made 2003-11-04
7298         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7299           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7300           malloc is declared in standard stdlib.h
7301
7302 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7303
7304         * device/lib/hc08/Makefile: need to clean .rel not .o files
7305         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7306
7307 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7308
7309         * src/port.h,
7310         * src/hc08/main.c,
7311         * src/mcs51/main.c,
7312         * src/ds390/main.c,
7313         * src/z80/main.c,
7314         * src/avr/main.c,
7315         * src/pic/main.c,
7316         * src/pic16/main.c,
7317         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7318         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7319         tests (which uses the port's oclsExpense function)
7320         * src/SDCC.y,
7321         * src/SDCCast.c,
7322         * src/SDCCicode.c,
7323         * src/hc08/gen.c,
7324         * src/ds390/gen.c,
7325         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7326
7327 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7328
7329         * src/SDCCcse.c (ifxOptimize),
7330         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7331         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7332         deleting the IFX iCode.
7333         * src/hc08/ralloc.c: reduced unneeded slocs
7334         * src/hc08/gen.c: fixed bug in asmopToBoolean
7335
7336 2003-11-04  Borut Razem <borut.razem AT siol.net>
7337
7338         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7339           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7340           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7341           transferred to configure
7342
7343 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7344
7345         Use headers defined in the C[++] standards:
7346         * sim/ucsim/gui.src/serio.src/fileio.cc
7347         * sim/ucsim/gui.src/serio.src/frontend.cc
7348         * sim/ucsim/gui.src/serio.src/main.cc
7349         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7350         * support/Util/NewAlloc.c
7351         * as/hc08/lklibr.c
7352         * as/mcs51/lklibr.c
7353         * as/z80/aslist.c
7354         * as/z80/assym.c
7355
7356 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7357
7358         * Added MSVC projects for hc08 assembler and linker:
7359         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7360         /as/hc08/link_hc08.dsp
7361
7362 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7363
7364         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7365
7366 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7367
7368         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7369
7370 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7371
7372         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7373
7374 2003-10-31  Borut Razem <borut.razem AT siol.net>
7375
7376         * support/cpp2/cpplib.h,
7377           support/cpp2/cpplib.c,
7378           support/cpp2/cpplex.c,
7379           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7380           to switch _asm block preprocessing on / off. Default is
7381           #pragma preproc_asm +
7382
7383 2003-10-31  Borut Razem <borut.razem AT siol.net>
7384
7385         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7386           when outputting comment blocks (when executed with -C option) and
7387           _asm (SDCPP specific) blocks
7388
7389 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7390
7391         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7392
7393 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7394
7395         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7396
7397 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7398
7399         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7400         * src/SDCCast.c (decorateType): fixed bug #832664
7401
7402 2003-10-31  Borut Razem <borut.razem AT siol.net>
7403
7404         * support\cpp2\cpplex.c: fixed for SDCPP:
7405           comments(when executed with -C option) and _asm blocks
7406           were included even if they where in skipped #if block.
7407           Applied solution from GCC cpp 3.3.2
7408
7409 2003-10-31  Borut Razem <borut.razem AT siol.net>
7410
7411         * src/SDCC.lex: sdcc now understands both formats:
7412           '# <line_number> <file_name>' and
7413           '#line <line_number> <file_name>'
7414         * support/cpp2/cppmain.c: sdcpp now generates the standard
7415           '# <line_number> <file_name>' instead of former
7416           '#line <line_number> <file_name>'
7417
7418 2003-10-30  Borut Razem <borut.razem AT siol.net>
7419
7420         * support/cpp2/cpphash.h,
7421         * support/cpp2/cpplib.h
7422         * support/cpp2/cpplex.c,
7423         * support/cpp2/cppmain.c,
7424         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7425
7426 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7427
7428         Fixed a number of problems revealed by bug #827883.
7429         * src/SDCCloop.c (loopInvariants): Spill location of the
7430         result operand should be recomputed if extracted from
7431         a loop. Also, don't extract assignments of an iTemp
7432         from a literal.
7433         * src/SDCCast.c (isConformingBody): loop reversal should
7434         not occur if the control variable is involved with a
7435         relational operator.
7436
7437 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7438
7439         * .version: bumped to 2.3.6 to reflect the big improvements
7440         made by Erik and Klaus. Thanks!
7441
7442 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7443
7444         Replaced the livrange code.
7445         * src/SDCClrange.c: added new LR code
7446         * src/SDCCloop.c,
7447         * src/SDCCBBlock.h: removed remainig parts from old LR code
7448         * src/ds390/ralloc.c,
7449         * src/ds390/gen.c: minor fixes to make it work with new code
7450
7451 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7452
7453         * as/hc08/asm.h,
7454         * as/hc08/lkrloc.c,
7455         * src/hc08/gen.c,
7456         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7457         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7458         (tweaked fix for bug #818696)
7459
7460 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7461
7462         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7463
7464 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7465
7466         * src/SDCCmain.c,
7467         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7468         * src/mcs51/gen.c (gencjneshort),
7469         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7470         more efficient (per Scott Bronson's suggestion)
7471
7472 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7473
7474         Extended the semantics of the critical keyword to include
7475         individual statements. See RFE #827755 and #799831
7476         * src/SDCC.y
7477         * src/SDCCicode.c
7478         * src/SDCCopt.c
7479         * src/SDCCast.c
7480         * support/Util/SDCCerr.c
7481         * support/Util/SDCCerr.h
7482         * src/mcs51/gen.c
7483         * src/ds390/gen.c
7484         * src/hc08/gen.c
7485
7486 2003-10-19  Borut Razem <borut.razem AT siol.net>
7487
7488         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7489
7490 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7491
7492         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7493         Fixed bug #818696
7494         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7495         and predecrement operand is displayed
7496
7497 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7498
7499         * src/SDCCval.c (valMinus): fixed bug #826041
7500
7501 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7502
7503         Some hc08 related updates that I missed earlier
7504         * sim/ucsim/stypes.h
7505         * support/regression/ports/hc08/spec.mk
7506
7507 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7508
7509         New target "hc08" for the Motorola 68hc08 family of micros
7510
7511         * configure
7512         * configure.in
7513         * Makefile
7514         * src/hc08/*
7515         * src/SDCCmain.c
7516         * src/port.h
7517         * sim/ucsim/hc08.src/*
7518         * sim/ucsim/configure.in
7519         * src/ucsim/configure
7520         * sim/ucsim/packages_in.mk
7521         * as/hc08/*
7522         * as/Makefile
7523         * device/include/mc68hc908qy.h
7524         * device/lib/hc08/*
7525         * device/lib/Makefile.in
7526         * support/regression/ports/hc08/*
7527         * support/regression/Makefile
7528
7529 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7530
7531         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7532         regression test
7533         * src/ds390/gen.c (genCast): fixed bug #821957
7534
7535 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7536
7537         * device/lib/logf.c: "fixed" overlay bug
7538         * support/regression/ports/host/spec.mk: added m library
7539         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7540         * support/regression/tests/float_trans: added (for Eric)
7541
7542 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7543
7544         * src/mcs51/gen.c (genCpl): fixed bug
7545         http://sf.net/mailarchive/message.php?msg_id=6263915
7546
7547 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7548
7549         * src/SDCCast.c (decorateType): added extended constant folding
7550         * src/SDCCsymt.c (computeType): cleanup
7551         * src/SDCCval.c (valShift): minor optimization
7552         * support/regression/tests/ast_constant_folding.c: added
7553
7554 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7555
7556         * src/SDCCmain.c: removed some unintended changes
7557
7558 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7559
7560         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7561         * src/z80/gen.c: fixed part of bug #817589
7562         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7563
7564 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7565
7566         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7567         * src/SDCCcflow.c
7568         * src/SDCCcse.c
7569         * src/SDCCdflow.c
7570         * src/SDCClabel.c
7571         * src/SDCClrange.c
7572         * src/SDCCmem.c
7573         * src/SDCCopt.c
7574         * src/SDCCpeeph.c
7575         * src/SDCCset.c
7576         * src/avr/ralloc.c
7577         * src/ds390/ralloc.c
7578         * src/izt/ralloc.c
7579         * src/mcs51/ralloc.c
7580         * src/pic/ralloc.c
7581         * src/pic16/ralloc.c
7582         * src/xa51/ralloc.c
7583         * src/z80/ralloc.c
7584         * src/z80/gen.c: removed unused label "release:"
7585
7586 2003-10-06  Borut Razem <borut.razem AT siol.net>
7587
7588         * src/SDCC.lex: removed definition of unused variables
7589           save_optimize and save_options
7590
7591 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7592
7593         * clean.mk: removed '=' in "-maxdepth=1"
7594         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7595         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7596
7597 2003-10-06  Borut Razem <borut.razem AT siol.net>
7598
7599         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7600           my_unput() replaced by unput()
7601
7602 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7603
7604         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7605         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7606         type-punned pointer will break strict-aliasing rules"
7607         Old LR behaviour is again default; Klaus' LR can be choosen by
7608         defining the environment variable LRKLAUS
7609         * src/SDCCBBlock.h
7610         * src/SDCCloop.c
7611         * src/SDCClrange.c
7612         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7613         * clean.mk: fixed removal of files in bin/CVS/
7614         * device/lib/clean.mk: fixed removal of directories small and large
7615         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7616         * src/SDCCicode.c,
7617         * src/SDCCval.c: removed superflous test for pedantic
7618
7619 2003-10-05  Borut Razem <borut.razem AT siol.net>
7620
7621         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7622           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7623           message "unmatched #pragma SAVE and #pragma RESTORE"
7624
7625 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7626
7627         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7628           assembly, critical functions, atomic, nojtbound)
7629
7630 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7631
7632         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7633         * src/SDCCBBlock.h
7634         * src/SDCCloop.c
7635         * src/SDCCloop.h
7636         * src/SDCClrange.c
7637
7638 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7639
7640         * src/z80/gen.h,
7641         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7642         * src/mcs51/gen.h
7643         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7644         * src/ds390/gen.h
7645         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7646         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7647         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7648
7649 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7650
7651         * src/z80/gen.c (genRet): fixed bug #524753
7652         * src/z80/gen.c (genCast): fixed internal error on cast from
7653         pointer to long
7654         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7655         fix for bug #477835 to the z80
7656         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7657         for tracking iCodes in the peephole optimizer for z80
7658
7659 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7660
7661         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7662         the other part of bug #814548
7663         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7664
7665 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7666
7667         * src/SDCCcse.c: fixed part of bug #814548
7668
7669 2003-09-28  Borut Razem <borut.razem AT siol.net>
7670
7671         * src/asm.c: rewrite of printILine() to use temporary file instead
7672           a pipe
7673         * src/xa51/main.c: commented out declaration of int rewinds
7674
7675 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7676
7677         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7678
7679 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7680
7681         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7682         * src/asm.c (printILine): Fixed bug #811015
7683
7684 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7685
7686         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7687         freeing.
7688
7689 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7690
7691         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7692         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7693         to correctly handle general case of AOP_PAIRPTR
7694         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7695
7696 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7697
7698         * src/mcs51/ralloc.c (fillGaps),
7699         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7700         register positioning bug)
7701
7702 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7703
7704         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7705
7706 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7707
7708         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7709         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7710         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7711         (ralloc doesn't intentionally do this now, but perhaps later)
7712         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7713         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7714         register positioning bugs (Fixed bug #762602 and #795325)
7715         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7716         (Fixed bug #808779)
7717         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7718         lines that --i-code-in-asm generates
7719
7720 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7721
7722         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7723         trying to fclose a FILE* that was already closed.
7724
7725 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7726
7727         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7728         of const struct should be treated as if const themselves)
7729
7730 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7731
7732         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7733
7734 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7735
7736         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7737         Unix (/n) and DOS (/r/n) line terminations.
7738
7739 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7740
7741         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7742         bug #613775
7743
7744 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7745
7746         * src/mcs51/gen.c (genFunction, genEndFunction),
7747         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7748         and restore of EA so that stack offsets to parameters are
7749         correct when using both critical and reentrant/stack-auto.
7750         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7751         size (can be triggered in error if sloc is shared between
7752         different sized objects)
7753         * device/include/float.h: fixed macros to explicitly use
7754         unsigned long where needed
7755
7756 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7757
7758         Feature req. 799831: added code to allow nesting of critical functions
7759         * src/mcs51/gen.c (genFunction, genEndFunction)
7760         * src/ds390/gen.c (genFunction, genEndFunction)
7761
7762 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7763
7764         * src/SDCCsymt.c (sclsFromPtr),
7765         * src/SDCCsymt.h,
7766         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7767         support for standard C idiom of memory mapped variables; for
7768         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7769         to xdata int at 0x1234 tempvar = 1.
7770         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7771         provided by Akiya ISHIDA
7772
7773 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7774
7775         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7776         * src/SDCCval.c (constVal): added reduction from int to char
7777         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7778         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7779         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7780         to ignore the sign
7781         * support/regression/tests/shifts.c: fixed
7782
7783 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7784
7785         * src/z80/gen.c (genXor): Fixed bug #805445
7786
7787 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7788
7789         Fixed bug #621531 (const & volatile confusion in the type chain).
7790         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7791         refer to the const or volatile state of the pointer itself.
7792
7793         * src/SDCCast.c
7794         * src/SDCCglue.c
7795         * src/SDCCicode.c
7796         * src/SDCCsymt.c
7797         * src/SDCCval.c
7798         * src/SDCC.y
7799         * src/SDCCsymt.h
7800         * src/pic/gen.c
7801         * src/pic/ralloc.c
7802         * src/pic16/gen.c
7803         * src/pic16/ralloc.c
7804         * support/regression/tests/const.c
7805
7806 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7807
7808         When checking for duplicated modules, use absolute paths
7809         instead of relative paths.  Files changed:
7810
7811         * as/mcs51/lklib.c
7812         * link/z80/lklib.c
7813
7814 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7815
7816         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7817
7818 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7819
7820         * device/include/string.h: added size_t typedef, changed
7821         prototypes to use size_t, eliminated separate reentrant and
7822         non-reentrant declarations, added _memmove declaration
7823         * device/lib/_memcpy.c: changed to use size_t instead of int,
7824         changed /4 to >>2 to avoid division library call
7825         * device/lib/_memcmp.c,
7826         * device/lib/_memset.c,
7827         * device/lib/_strncat.c,
7828         * device/lib/_strncpy.c,
7829         * device/lib/_strncmp.c: changed to use size_t instead of int
7830         * device/lib/_memmove.c: new file (fixed bug #772294)
7831         * device/lib/Makefile.in: added _memmove.c
7832         * device/lib/z80/asm_strings.s: fixed bug #772290
7833         * support/regression/tests/bitfields.c: attempt to fix host assertion
7834         failure on amd64-unknown-linux2.2
7835
7836 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7837
7838         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7839         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7840         * as/z80/asmain.c (main): fixed bug #801766
7841
7842 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7843
7844         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7845         compilers
7846
7847 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7848
7849         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7850         reported in bug #800609
7851
7852 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7853
7854         * Top header beautifications in src/pic16 directory:
7855           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7856           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7857           pcoderegs.h, ralloc.c, ralloc.h
7858         * main.c: added top header and GPL license notice
7859         * pcode.c: fixed the if-conditional warning
7860
7861 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7862
7863         * device/lib/_mullong.c: replaced int by short for gcc
7864
7865 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7866
7867         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7868         and JUMPTABLE iCodes properly now (worked by accident before)
7869         * src/mcs51/gen.c (leftRightUseAcc),
7870         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7871         iCode properly now. Use getSize instead of nRegs since a & b
7872         aren't part of the nRegs tally.
7873
7874 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7875
7876         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7877         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7878           before instructions that use the _STATUS register
7879
7880 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7881
7882         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7883         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7884         fetching of the pointer
7885         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7886         copied from genNearPointerSet()
7887         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7888         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7889         If they pop r0/r1 they must be called in the opposite order than aopOp().
7890         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7891         (resp. --stack-auto), prepared for --xstack
7892
7893 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7894
7895         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7896
7897 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7898
7899         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7900         these ports have their own __sdcc_external_start()
7901
7902 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7903
7904         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7905         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7906         type for bits was changed. It resulted in bit variables becoming
7907         global, which is not permitted in PIC 14 assembly output.
7908
7909 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7910
7911         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7912
7913 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7914
7915         Z80 and MCS51 linkers complaint if a public symbol is defined
7916         in more than one library module:
7917
7918         * as/mcs51/lklib.c
7919         * link/z80/lklib.c
7920         * as/mcs51/Makefile.in
7921
7922 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7923
7924         A few small changes that speed up the peephole optimizer.
7925
7926         * src/SDCCpeeph.c
7927
7928 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7929
7930         Try to make the peephole optimizer smarter by maintaining
7931         an association between the assembly source code and the
7932         iCodes that originated them. Put this information to use
7933         with a new peephole rule condition "notVolatile" so that
7934         the rules can be aggressive yet still safe.
7935
7936         * src/SDCCpeeph.c
7937         * src/SDCCpeeph.h
7938         * src/mcs51/gen.c
7939         * src/mcs51/peeph.def
7940
7941 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7942
7943         Fixed bug #741761
7944
7945         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7946         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7947         if the left or right operand symbols have the accuse flag set.
7948
7949 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7950
7951         Changed the type of the result of the ! (NOT) operator to char;
7952         previously it returned the same type as the source. This allows
7953         us to eliminate all the genFloatNot functions (all of its target
7954         implementations were very buggy) since !float can use the same
7955         code as !long now.
7956
7957         * src/SDCCicode.c (ast2iCode): ! returns char
7958         * src/mcs51/gen.c (genNot, genNotFloat),
7959         * src/ds390/gen.c (genNot, genNotFloat),
7960         * src/z80/gen.c (genNot, genNotFloat),
7961         * src/pic/gen.c (genNot, genNotFloat),
7962         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7963
7964 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7965
7966         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7967         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7968            during interrupts. Ensure WSAVE is located at a shared bank address.
7969         2. Fixed page selection in some places
7970         3. Fixed BTFSS/C to where necessary use registers directly and not simply
7971            the registers name strings.
7972         4. Fixed "signed / unsigned compare" compiler warnings.
7973         5. The PIC port manages its own allocation of the general purpose
7974            registers, but makes no attempt to reuse them. As a result when
7975            compiling it soon runs out of general purpose registers. Some
7976            additional code was added to the files pcode.c and device.c to walk
7977            through the function call tree and rename the registers so that they
7978            get reused.
7979
7980         * src/pic/device.c
7981         * src/pic/gen.c
7982         * src/pic/glue.c
7983         * src/pic/pcode.c
7984         * src/pic/pcode.h
7985         * src/pic/ralloc.c
7986         * src/pic/ralloc.h
7987         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
7988         genPlus() & genMinus() when the result is the same as left or right
7989
7990 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7991
7992         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
7993
7994 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7995
7996         Made bitfield a distinct type from bit so that bitfields
7997         convert as per ANSI C and bits retain their traditional
7998         boolean style behaviour. Implemented bitfield support in
7999         the z80 port.
8000
8001         * src/SDCCsymt.h,
8002         * src/SDCCsymt.c,
8003         * src/SDCCast.c,
8004         * src/cdbFile.c,
8005         * src/mcs51/gen.c,
8006         * src/ds390/gen.c: bit v bitfield split
8007         * src/z80/gen.c: New support for bitfields
8008         * support/regression/tests/bitfields.c: reenabled z80,
8009         added more tests
8010
8011 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8012
8013         Rules 246.x, 247.x relate to bitfields, the others speed up
8014         access to xdata mapped I/O devices.
8015
8016         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8017
8018 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8019
8020         Cleaned up genPackBits and genUnpackBits and added two helper
8021         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8022         for literal assignments in genPackBits (thanks to Frieder for
8023         reminding me).
8024
8025         * src/mcs51/gen.c
8026         * src/ds390/gen.c
8027
8028 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8029
8030         Fixed bug #748310 (pointer to function type mishandled when the
8031         function name is omitted). Also fixed a SIGSEGV when a function
8032         attribute (reentrant, etc) is used on a non-function or on a
8033         function but misplaced before the parameter list.
8034
8035         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8036         bug #748310
8037         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8038         * support/Util/SDCCerr.h,
8039         * support/Util/SDCCerr.c: Added func attr misuse error msg
8040
8041 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8042
8043         Fixed bug #787649 by anonymous
8044         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8045         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8046
8047 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8048
8049         Fixed numerous bitfield problems.
8050
8051         * src/SDCC.y: More bitfield related error checking
8052         * src/SDCCsymt.h,
8053         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8054         * support/Util/SDCCerr.h,
8055         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8056         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8057         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8058         * support/regression/tests/bitfields.c: tests added
8059
8060 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8061
8062         Made the constant following the "interrupt" keyword optional. If
8063         omitted, the function will not automatically be given an entry
8064         in the interrupt vector table (similar to #pragma NOIV, but
8065         less syntacticly kludgy). The interrupt number is also now
8066         range checked. Also fixed a bug in the high order bit example
8067         in the manual.
8068
8069         * src/SDCC.y
8070         * src/SDCCmem.c
8071         * src/SDCCglue.c
8072         * src/SDCCsymt.h
8073         * support/Util/SDCCerr.c
8074         * support/Util/SDCCerr.h
8075         * doc/sdccman.lyx
8076
8077 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8078
8079         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8080         * src/SDCCicode.c (operandOperation): rewritten some ops
8081         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8082         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8083         other type
8084         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8085         be re-activated by defining REDUCE_LITERALS)
8086         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8087         unsigned, but are signed by default
8088         * src/SDCCval.c (constVal): rearranged
8089         * src/SDCCval.c (valMod): preliminary fix
8090         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8091         * support/regression/literalop.c: added, work in progress
8092
8093 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8094
8095         Generate warnings for useless declarations like "char data;"
8096         that don't do what new users expect.
8097
8098         * src/SDCC.y
8099         * support/Util/SDCCerr.h
8100         * support/Util/SDCCerr.c
8101
8102 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8103
8104         * src/SDCCval.c (valMult): fix overflow detection of negative int
8105
8106 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8107
8108         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8109
8110         Changes to support big endian targets:
8111
8112         * src/ports.h
8113         * src/SDCCglue.c
8114         * src/avr/main.c
8115         * src/ds390/main.c
8116         * src/izt/i186.c
8117         * src/mcs51/main.c
8118         * src/pic/main.c
8119         * src/pic16/main.c
8120         * src/xa51/main.c
8121         * src/z80/main.c
8122
8123 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8124
8125         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8126         * device/lib/time.c: fixed warning "integer overflow in expression"
8127
8128 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8129
8130         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8131         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8132         constants are unsigned; added recognition of "u" flag for unsigned
8133         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8134         * src/SDCCval.c (valDiv, valMod): fixed signdness
8135         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8136         signedness of modulo, left and right shift
8137         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8138         * support/Util/SDCCerr.h: added warning W_INT_OVL
8139         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8140         * src/SDCCast.c (ast_print): improved output of constants
8141
8142 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8143
8144         Fixed some warnings when building with MSVC:
8145
8146         * as\mcs51\asdata.c
8147         * as\z80\asdata.c
8148         * as\mcs51\asm.h
8149         * as\z80\asm.h
8150         * link\z80\aslink.h
8151         * link\z80\lkdata.c
8152         * link\z80\lkeval.c
8153         * link\z80\lkgb.c
8154         * link\z80\lkihx.c
8155         * link\z80\lks19.c
8156         * link\z80\lksym.c
8157         * support\cpp2\cpplib.c
8158         * src\ds390\gen.c
8159         * src\mcs51\gen.c
8160
8161 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8162
8163         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8164
8165 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8166
8167         * support\librarian\clean.mk: Do not remove Makefile.
8168         * support\librarian\Makefile: added.
8169
8170 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8171
8172         Added librarian to MSVC build:
8173         * all.dsp
8174         * sdcc.dsw
8175         * support\librarian\librarian.dsp
8176
8177         'configure' not needed for librarian, removed:
8178         * support\librarian\configure
8179         * support\librarian\configure.in
8180         * support\librarian\config_in.h
8181         * support\librarian\Makefile.in
8182
8183         Hopefully these ones built the librarian and the rest of sdcc properly:
8184         * Makefile
8185         * Makefile.common.in
8186
8187         Messed up 'configure', so revert to previous version:
8188         * configure
8189         * configure.in
8190
8191 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8192
8193         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8194         there, while the mantissa of a double is "only" 53 bits wide.
8195
8196 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8197
8198         Adding sdcclib to the build.  MSVC project coming soon.
8199         Files added/changed:
8200
8201         * support\librarian\clean.mk
8202         * support\librarian\configure
8203         * support\librarian\configure.in
8204         * support\librarian\config_in.h
8205         * support\librarian\Makefile.bcc
8206         * support\librarian\Makefile.in
8207         * support\librarian\sdcclib.c
8208         * Makefile.bcc
8209         * Makefile
8210         * Makefile.common.in
8211         * configure
8212         * configure.in
8213
8214 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8215
8216         Linker now complaints if linked modules have conflicting options, for
8217         example, one compiled using --model-large and another one compiled with
8218         --model-small.  The following files were modified:
8219
8220         * as\mcs51\asdata.c
8221         * as\mcs51\aslink.h
8222         * as\mcs51\asm.h
8223         * as\mcs51\asmain.c
8224         * as\mcs51\asout.c
8225         * as\mcs51\i51pst.c
8226         * as\mcs51\lkdata.c
8227         * as\mcs51\lklibr.c
8228         * as\mcs51\lkmain.c
8229         * as\z80\asdata.c
8230         * as\z80\asm.h
8231         * as\z80\asmain.c
8232         * as\z80\asout.c
8233         * as\z80\z80pst.c
8234         * link\z80\aslink.h
8235         * link\z80\lkdata.c
8236         * link\z80\lklibr.c
8237         * link\z80\lkmain.c
8238         * src\SDCCglue.c
8239
8240 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8241
8242         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8243         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8244
8245 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8246
8247         * src/z80/mappings.i: fix _mul[us][int,long] entries
8248
8249 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8250
8251         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8252
8253 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8254
8255         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8256         * support/regression/tests/bitopcse.c: added
8257         fixed warning:
8258         * src/avr/gen.c:
8259         * src/pic/gen.c:
8260         * src/pic16/gen.c:
8261         * src/z80/gen.c:
8262         * src/xa51/gen.c:
8263
8264 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8265
8266         added support for new library format to z80, gbz80 linkers:
8267         *link/z80/aslink.h
8268         *link/z80/lklex.c
8269         *link/z80/lklib.c
8270         *link/z80/lklist.c
8271
8272 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8273
8274         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8275         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8276
8277 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8278
8279         added DUMMY_READ_VOLATILE:
8280         * src/SDCC.y:
8281         * src/avr/gen.c:
8282         * src/xa51/gen.c:
8283         * src/z80/gen.c:
8284         * src/pic/gen.c:
8285         * src/pic16/gen.c:
8286         * src/mcs51/gen.c:
8287         * src/ds390/gen.c:
8288         * src/SDCCcse.c (algebraicOpts): many improvements
8289         * src/SDCCcse.h: removed algebraicOpts()
8290         * src/SDCCicode.c (picDummyRead): added
8291
8292 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8293
8294         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8295         "Insufficient space in data memory".
8296
8297 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8298
8299         * src/mcs51/gen.c: fixed bug #771358
8300         * src/z80/gen.c: fixed bug #759087
8301
8302 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8303
8304         * src/pic16/glue.c: minor cleanup by Vangelis
8305
8306 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8307
8308         * device/include/regc515c.h: fixed #758477
8309         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8310         * device/lib/_gptrput.c: saved a few bytes
8311         * my tab spacing is 8, yours too?)
8312         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8313         * device/lib/serial.c: process RX bytes earlier than TX bytes
8314         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8315
8316 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8317
8318         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8319
8320 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8321
8322     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8323
8324 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8325
8326         * device/lib/Makefile.in: bad fix, reverted to 1.43
8327
8328 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8329
8330         * device/lib/Makefile.in: added missing z80 object files
8331
8332 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8333
8334         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8335         pic16 progress by Vangelis:
8336         * src/SDCCglobl.h:
8337         * src/SDCCmain.c:
8338         * src/pic/Makefile:
8339         * src/pic:
8340         * pic/Makefile:
8341         * pic16/device.c:
8342         * pic16/device.h:
8343         * pic16/gen.c:
8344         * pic16/gen.h:
8345         * pic16/genarith.c:
8346         * pic16/glue.c:
8347         * pic16/main.c:
8348         * pic16/pcode.c:
8349         * pic16/pcode.h:
8350         * pic16/pcodepeep.c:
8351         * pic16/peeph.def:
8352
8353 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8354
8355     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8356
8357 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8358
8359     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8360     added gbz80 build to MSVC project.
8361     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8362     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8363     from 8051 stuff and setup so it links using a .lnk file.
8364
8365 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8366
8367     * support/librarian/sdcclib.c: sdcc librarian.
8368     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8369     with sdcclib.
8370
8371 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8372
8373     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8374
8375 2003-07-02  Borut Razem <borut.razem AT siol.net>
8376
8377         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8378         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8379         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8380         src/xa51/main.c, src/z80/main.c:
8381         virtualization of glue() function: each port has it's own glue function,
8382         which is accessed by do_glue function pointer in PORT.general structure
8383
8384 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8385
8386         * DS800C400 fun, improved ROM interface and tinibios.
8387
8388 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8389
8390         * More support for DS80C400. Now includes beginning of interface to ROM.
8391
8392 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8393
8394         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8395
8396 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8397
8398         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8399
8400 2003-06-19  Borut Razem <borut.razem AT siol.net>
8401
8402         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8403
8404 2003-06-19  Borut Razem <borut.razem AT siol.net>
8405
8406         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8407         fixed Z80 port - crt0.o: cannot open.
8408
8409 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8410
8411         * support/Util/MySystem.c (merge_command): revert bad fix
8412
8413 2003-06-18  Borut Razem <borut.razem AT siol.net>
8414
8415         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8416
8417 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8418
8419         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8420         option --use-stdout sends errors to stdout instead of stderr.
8421
8422 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8423
8424         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8425
8426 2003-06-15  Borut Razem <borut.razem AT siol.net>
8427
8428         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8429         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8430         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8431         fixed width array of pointers replaced with sets;
8432         multiple include and lib paths ared transferred to preprocessor and linker
8433         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8434         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8435         fixed width array of pointers
8436         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8437         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8438         fixupPath(), getPathDifference()
8439         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8440         fixed width array of pointers
8441
8442 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8443
8444         * src/pic16/ralloc.c: fix warnings
8445         * src/pic16/pcode.c: fix warning
8446
8447 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8448
8449          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8450         know all the details, but essentially this set of changes enable
8451         the pic16 port to generate movff instructions and generate assembler
8452         directives,
8453         * src/SDCCmain.c:
8454         * src/pic16/gen.c:
8455         * src/pic16/glue.c:
8456         * src/pic16/pcode.c:
8457         * src/pic16/device.c:
8458         * src/pic16/main.c:
8459         * src/pic16/pcode.h:
8460         * src/pic16/pcoderegs.c:
8461         * src/pic16/ralloc.c:
8462         * src/pic16/ralloc.h:
8463
8464 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8465
8466         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8467         added option --vc, so sdcc errors and warnings are compatible with
8468         Microsoft Visual Studio.
8469
8470 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8471
8472         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8473           device/lib/libfloat.lib: added atof function.
8474
8475 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8476
8477         * doc/sdccman.lyx: updated to Lyx 1.3
8478         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8479         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8480         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8481
8482 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8483
8484         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8485
8486 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8487
8488         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8489           additions to the "related tools/documentation" section
8490
8491 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8492
8493         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8494
8495 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8496
8497         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8498         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8499
8500 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8501
8502         * doc/sdccman.lyx: fix double dash and other minor things
8503         * doc/Makefile: fix double dash
8504
8505 2003-05-28  Karl Bongers(patches from Martin Helmling)
8506         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8507           condition and ignore commands.
8508
8509 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8510
8511         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8512           is in parts still quite out of date, I did changes as far as I felt makes sense
8513           for a non-native english speaker.
8514           Please feel free to add to the manual or to correct my changes.
8515         * doc/Makefile: undid touching the date of intermediate tex files.
8516
8517 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8518
8519         * doc/sdccman.lyx: Manual has an index now
8520
8521 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8522
8523         Finalize muluint/mulsint and mululong/mulslong merging:
8524         * device/lib/_mulint.c
8525         * device/lib/_mullong.c
8526         * device/lib/gbz80/mul.s
8527         * device/lib/gbz80/stubs.s
8528         * device/lib/z80/mul.s
8529         * device/lib/z80/stubs.s
8530         * src/SDCCsymt.c (initCSupport)
8531
8532 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8533
8534         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8535         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8536           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8537           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8538           instead of /Zm500.
8539
8540 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8541
8542         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8543           the regression tests I'm not brave enough to enable 245.b, 245.c
8544         * doc/sdccman.lyx: added latex preamble for hyperref package.
8545           Using pdflatex this will give you a hyperlinked pdf file with
8546           bookmarks. (prepend '%' before /usepackage if this breaks something)
8547
8548 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8549
8550          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8551
8552 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8553
8554         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8555
8556 2003-05-21    <johan AT balder>
8557
8558         * src/SDCCglue.c (printIval): fixed bug #739934
8559
8560 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8561
8562         Applied patch from bug 737905 (renamed yylineo to mylineno):
8563         * src/altlex.c
8564         * src/SDCCast.c
8565         * src/SDCglobl.h
8566         * src/SDCC.lex
8567         * src/SDCCsymt.c
8568         * src/SDCCval.c
8569         * src/pic16/pcode.c: Cleaned warnings
8570         * src/pic16/pcodeflow.c: Cleaned warnings
8571         * src/pic16/pcoderegs.c: Cleaned warnings
8572
8573 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8574
8575         * src/pic16/pcode.c: Cleaned warnings
8576         * src/pic16/pcodepeep.c: Cleaned warnings
8577         * src/pic16/ralloc.c: Cleaned warnings
8578
8579 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8580
8581         * doc/sdccman.lyx: fixed bug 739745
8582         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8583
8584 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8585
8586         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8587         it can be defined with CFLAGS when running configure
8588         * src/SDCCmain.c: fixed compiling + linking with object files
8589
8590 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8591
8592         * configure.in: configure for pic16 port,
8593             added --disable-pic16-port
8594         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8595         * src/SDCCmain.c: linkOptions is changed to set *,
8596             added if/endif conditional macros to remove options help
8597             messages from optionsTable when a port is not configured, added
8598             support for the PIc16 port in the ports table, when executing
8599             the compiler with no port specified on command line, a default
8600             port is selected with the new macro DEFAULT_PORT which is
8601             defined in port.h, in setDefaultOptions() linkOptions is removed
8602             from initialization assignment, since now it is a set,
8603             parseCmdLine uses setParseWithComma for linkOptions, in
8604             linkEdit() linkOptions are accessed with new function indexSet()
8605             which returns the i'th item of a set variable. See SDCCset.c, in
8606             linkEdit() when calling buildCmdLine(), added linkOptions as
8607             last argument. Now users can pass arguments to gplink via the
8608             -Wl option, main() uses pic16glue() to glue up pic16 programs
8609         * src/SDCCpeeph.c: various changes to support pic16
8610         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8611             return the i'th item of the set
8612         * src/SDCCset.h: added function prototype for indexSet()
8613         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8614         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8615         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8616             added macro DEFAULT_PORT
8617         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8618         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8619             generated
8620         * src/pic16/glue.c: commented out some error producing lines
8621         * src/pic16/main.c: __config directives are commented out to stop
8622             gpasm complaining and test the linkage with gplink, _linkCmd and
8623             _asmCmd changed to be more gplink and gpasm friendly
8624         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8625             produced an error when parsed, peep rule 12 is added to utilize
8626             movff, but it is commented out since the pCode does not support
8627             yet a command with 2 address arguments
8628
8629 2003-05-18    <johan AT balder>
8630
8631         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8632         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8633 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8634
8635         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8636   Added feature to script commands from file.
8637
8638 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8639
8640         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8641         * src/SDCCutil.c: include ctype.h for win32
8642
8643 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8644
8645         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8646
8647 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8648
8649         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8650   Fixed so you can set breakpoints prior to run, run does not stop
8651   on entry now.  Add tbreak.  Other enhancements and fixes for use
8652   with ddd.
8653
8654 2003-05-12  Borut Razem <borut.razem AT siol.net>
8655
8656         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8657
8658 2003-05-11  Borut Razem <borut.razem AT siol.net>
8659
8660         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8661         the path of bin directory, so that PATH is the only env. variable, which has to be set
8662         in case of standard installation.
8663         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8664         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8665         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8666
8667 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8668
8669         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8670         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8671         temp files are in the port dir; clean the gen/test directory when
8672         generating new test.c
8673         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8674         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8675         * support/regression/tests/zeropad.c: added
8676
8677 2003-05-09    <johan AT balder>
8678
8679         * src/SDCCglue.c: fixed bug #597940
8680
8681 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8682
8683         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8684   cache sfr, optimize next,step, fix off by one sourceline,
8685   support ddd list function.
8686         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8687
8688 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8689
8690         * support/regression/HTMLgen.py: added compare_s2f()
8691         * support/regression/Makefile: redo 1.27
8692         * support/regression/generate-cases.py: redo 1.5
8693
8694 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8695
8696         * support/regression/tests/float.c: workaround 33 bit hex constant
8697         * support/regression/tests/simplefloat.c: fix division for host
8698
8699 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8700
8701         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8702         that tame's the PIC's over-aggressive optimizer.
8703
8704 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8705
8706          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8707          support for MSVC.
8708
8709 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8710
8711         Initial support for DS80C400. "Hello world" runs on TINIm400
8712         (with polled I/O).
8713
8714 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8715
8716          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8717          * Some notes on ddd usage added in debugger/README
8718          Martin Helmling adding more features and fixes for ddd GUI debugger.
8719          Code added for nexti, stepi, up, down, and other adjustments.
8720
8721 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8722
8723         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8724         * src/pic/peeph.def Added two rules to optimize carry manipulation
8725         * src/pic/* removed debug printfs
8726
8727 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8728
8729         * debugger/mcs51/cmd.c: added header newalloc.h
8730
8731 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8732
8733         * as/Makefile: new EXEEXT
8734         * as/z80/Makefile: remove trailing slash of BUILDIR
8735         * as/z80/clean.mk: new EXEEXT
8736         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8737         * support/cpp2/Makefile.in: new EXEEXT
8738         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8739
8740 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8741
8742         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8743         EXEEXT was introduced to fix all related problems with targets
8744         "clean", "install" and "uninstall"; a couple of further flaws
8745         especially with "clean" have been fixed too
8746         * as/mcs51/Makefile.in
8747         * as/mcs51/clean.mk
8748         * as/z80/Makefile
8749         * Makefile
8750         * clean.mk
8751         * debugger/mcs51/Makefile.in
8752         * debugger/mcs51/clean.mk
8753         * link/z80/Makefile
8754         * link/z80/Makefile.in
8755         * link/z80/clean.mk
8756         * link/Makefile
8757         * packihx/Makefile.in
8758         * packihx/clean.mk
8759         * sim/ucsim/Makefile
8760         * sim/ucsim/clean.mk
8761         * sim/ucsim/avr.src/Makefile.in
8762         * sim/ucsim/avr.src/clean.mk
8763         * sim/ucsim/s51.src/Makefile.in
8764         * sim/ucsim/s51.src/clean.mk
8765         * sim/ucsim/xa.src/Makefile.in
8766         * sim/ucsim/xa.src/clean.mk
8767         * sim/ucsim/z80.src/Makefile.in
8768         * sim/ucsim/z80.src/clean.mk
8769         * sim/ucsim/main_in.mk
8770         * sim/ucsim/packages_in.mk
8771         * sim/ucsim/gui.src/Makefile.in
8772         * sim/ucsim/gui.src/serio.src/Makefile.in
8773         * sim/ucsim/gui.src/serio.src/clean.mk
8774         * src/Makefile.in
8775         * src/clean.mk
8776         * support/cpp2/Makefile.in
8777         * support/cpp2/clean.mk
8778         * support/makebin/Makefile
8779         * support/makebin/clean.mk
8780         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8781         * doc/sdccman.lyx: --program-suffix no longer needed
8782
8783 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8784
8785          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8786          Martin Helmling added support for ddd GUI debugger.
8787          Code added to display assembly, set variables, and other commands
8788          to interface to ddd.
8789
8790 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8791
8792         * as/Makefile: fix target clean
8793         * as/clean.mk: fix target clean
8794         * as/z80/clean.mk: fix target clean
8795
8796 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8797
8798         * Makefile.common.in: added  AT EXEEXT AT
8799         * configure.in: removed all mingw32 stuff
8800         * configure: rebuilt from configure.in
8801         * doc/sdccman.lyx: updated section "installation"
8802         * support/scripts/sdcc_mingw32: adapted to configure
8803         * support/scripts/sdcc_cygwin_mingw32: added
8804
8805 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8806
8807         * src/pic Added object file support for the PIC port
8808         * src/pic Applied patch from Craig Franklin (this started the object file support)
8809         * src/regression Updated the PIC regression tests for object files
8810
8811 2003-04-20  Borut Razem <borut.razem AT siol.net>
8812
8813         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8814           lklex.c: In function `getfid':
8815           lklex.c:203: warning: array subscript has type `char'
8816         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8817           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8818         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8819           stack handling macros
8820
8821 2003-04-19  Borut Razem <borut.razem AT siol.net>
8822
8823         * "handling space characters in file path" task:
8824         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8825         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8826         * support/Util/MySystem.h: make it self-sufficient
8827         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8828           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8829           handling space characters in file path
8830         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8831           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8832         * support/Util/MySystem.c: handling space characters in executable's path
8833
8834 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8835
8836         * as/z80/Makefile: fix permanent rebuild of z80
8837         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8838         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8839
8840 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8841
8842         * src/SDCCopt.c: add special case optimization to replace modulo by
8843           a power of two with a bitwise AND.
8844
8845 2003-04-18    <johan AT balder>
8846
8847         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8848
8849 2003-04-17    <johan AT balder>
8850
8851         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8852         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8853
8854 2003-04-13  Borut Razem <borut.razem AT siol.net>
8855
8856         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8857         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8858           fixed mingw problem in adl_NORMALIZE_PATH
8859
8860 2003-04-12  Borut Razem <borut.razem AT siol.net>
8861
8862         * fixed "#pragma SAVE/RESTORE can not be nested":
8863         * src/SDCC.lex: reworked pragma handling functions
8864         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8865         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8866
8867 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8868
8869         * src/SDCCutil.c (pathEquivalent): defined but not used
8870         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8871         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8872         * configure: rebuilt from configure.in
8873         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8874         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8875         * device/include/Makefile.in: replace sdcc_datadir
8876         * device/lib/Makefile.in: replace sdcc_datadir
8877         * Makefile.common.in: add LDFLAGS from configure
8878         * packihx/Makefile.in: use LDFLAGS
8879         * src/Makefile.in: use LDFLAGS
8880         * support/cpp2/Makefile.in: add LDFLAGS from configure
8881         * support/makebin/Makefile: use LDFLAGS
8882         * .version: bumped version number to 2.3.5
8883
8884 2003-04-12  Borut Razem <borut.razem AT siol.net>
8885
8886         * completed "different paths" task:
8887         * src/SDCCmacro.c: fixed bug in handling quotes
8888         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8889         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8890
8891 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8892
8893         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8894
8895 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8896
8897         * ds390/gen.c ds390/peeph.def: fix bug 706781
8898
8899 2003-04-11  Borut Razem <borut.razem AT siol.net>
8900
8901         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8902
8903 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8904
8905         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8906         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8907          set - this bit used to not be set...).
8908         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8909           bad code in PIC Port
8910         * src/regression/and2.c added to test bug 609268
8911         * src/regression/Makefile added and2.c to regression test
8912
8913
8914 2003-04-08    <johan AT CP255758-A>
8915
8916         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8917         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8918         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8919
8920 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8921
8922         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8923         fix bug #487815
8924         * support/cpp2/Makefile.in: fix bug #487815
8925         * configure: rebuilt from configure.in
8926         * Makefile.common.in: docdir changed, new path suffixes
8927         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8928         * sdcc_vc_in.h: reflect changes from sdccconf.h
8929         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8930         * src/SDCCutil.h: remove BINDIR hack
8931         * doc/sdccman.lyx: update new path hierarchy
8932
8933 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8934
8935         * src/SDCCpeeph.c: added okToRemoveSLOC test
8936
8937 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8938
8939         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8940
8941 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8942
8943         * src/SDCCpeeph.c: added labelIsReturnOnly test
8944         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8945
8946 2003-04-05    <johan AT balder>
8947
8948         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8949         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8950         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8951         * src/SDCCast.c: fixed a warning
8952         * src/SDCCast.h: fixed a warning
8953         * src/SDCCicode.c (operandFromAst): fixed a warning
8954
8955 2003-04-04    <johan AT balder>
8956
8957         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8958         * src/SDCCast.c (decorateType): fixed bug #715076
8959         * src/SDCC.y: fixed bug #702907
8960
8961 2003-04-03    <johan AT balder>
8962
8963         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8964         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8965         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8966         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8967         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8968
8969 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
8970
8971         * _decdptr.c: fix return values
8972         * _gptrget.c: fix return values
8973         * _gptrgetc.c: fix return values
8974         * _gptrput.c: fix return values
8975         * _mulint.c: fix return values
8976         * as/z80/Makefile: fix 'make -j' problem
8977
8978 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
8979
8980         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
8981         * configure.in: big cleanup, updated to autoconf 2.5x
8982         * configure: rebuilt from configure.in
8983         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8984         * sdcc_vc_in.h: reflect changes from sdccconf.h
8985         * doc/Makefile: fixed a flaw in "make install"
8986
8987 2003-04-02    <johan AT balder>
8988
8989         * src/ds390/gen.c (genCmp): no comments
8990         * src/mcs51/gen.c (genCmp): no comments
8991         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
8992         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
8993
8994 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
8995
8996         * support/regression/generate-cases.py: place generated file in given sub directory
8997         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
8998         * support/regression/Makefile: improvements for 'make -j';
8999         side effect: it's simpler and faster now
9000
9001 2003-03-31  Borut Razem <borut.razem AT siol.net>
9002
9003         * src/z80/main.c: link-{port} and as-{port} defined without path
9004         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9005
9006 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9007
9008         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9009
9010 2003-03-30  Borut Razem <borut.razem AT siol.net>
9011
9012         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9013           changed type of list parameter to set
9014         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9015         * src/port.h: changed type of do_assemble() parameter to set
9016         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9017           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9018           definition of "cppoutfilename" macro with NULL value in preProcess()
9019         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9020         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9021         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9022           replaced with set *binPathSet
9023         * shash_add() deallocates the item, if allready exsists, before adding the new one
9024         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9025
9026 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9027
9028         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9029           a nested for loop bug in the PIC port
9030         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9031           for loops
9032
9033 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9034
9035         * support/Util/dbuf.h: remove C++ stuff to make it portable
9036
9037 2003-03-28  Borut Razem <borut.razem AT siol.net>
9038
9039         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9040           literal strings in stringLiteral()
9041         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9042         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9043           to the project
9044
9045 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9046
9047         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9048
9049 2003-03-26    <johan AT balder>
9050
9051         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9052         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9053         * src/SDCCast.c (decorateType): fixed " -v < 3"
9054
9055 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9056
9057         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9058         Added Lenny Story's debug infrastructure changes:
9059         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9060         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9061         * src/cdbFile.c: added
9062         * src/SDCCdebug.c: added
9063         * src/SDCCdebug.h: added
9064         * src/SDCCast.c (createFunction)
9065         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9066         * src/SDCCmain.c (parseCmdLine, main)
9067         * src/SDCCmem.c (redoStackOffsets)
9068         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9069         * src/SDCCsymt.h
9070         * src/common.h
9071         * src/avr/gen.c (genAVRCode)
9072         * src/ds390/gen.c (gen390Code)
9073         * src/mcs51/gen.c (gen51Code)
9074         * src/pic/gen.c (genpic14Code)
9075         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9076         * src/xa51/gen.c (genXA51Code)
9077         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9078
9079 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9080
9081         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9082         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9083
9084 2003-03-22    <johan AT balder>
9085
9086         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9087
9088 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9089
9090         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9091         * doc/cdbfileformat.lyx: added, written by Lenny Story
9092         * doc/Makefile: added cdbfileformat.lyx
9093         * doc/clean.mk: added cdbfileformat.lyx
9094
9095 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9096
9097         * src/mcs51/peeph.def: fix bug #705773
9098
9099 2003-03-20    <johan AT balder>
9100
9101         An sfr/sbit can have an "at #" AND an initializer
9102         * src/SDCCsymt.c (checkSClass):
9103         * src/SDCCmem.c (allocGlobal):
9104         * src/SDCCmem.c (allocLocal):
9105         * src/SDCCast.c (createBlock):
9106
9107 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9108
9109         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9110
9111 2003-03-16    <johan AT balder>
9112
9113         Undid the hackup of const and volatile, the problem is much bigger
9114         * src/SDCC.y:1.65
9115         * src/SDCCast.c:1.171
9116         * src/SDCCglue.c:1.138
9117         * src/SDCCicode.c:1.146
9118         * src/SDCCsymt.c:1.150
9119         * src/SDCCval.c:1.65
9120
9121 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9122
9123         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9124         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9125
9126 2003-03-13    <johan AT balder>
9127
9128         Hackup const and volatile modifiers in type chains a bit:
9129         * src/SDCC.y:1.63
9130         * src/SDCCast.c:1.169
9131         * src/SDCCglue.c:1.136
9132         * src/SDCCicode.c:1.143
9133         * src/SDCCsymt.c1.146
9134         * src/SDCCsymt.h1.59
9135         * src/SDCCval.c:1.63
9136
9137 2003-03-12    <johan AT balder>
9138
9139         * src/SDCCBBlock.h: more LRH debugging junk
9140         * src/SDCCcflow.h: more LRH debugging junk
9141         * src/SDCCloop.c: more LRH debugging junk
9142         * src/SDCC.y (struct_declaration): fixed bug #697590
9143         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9144         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9145         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9146
9147 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9148         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9149         test function names must now match exactly).
9150         * src/SDCCcse.c: added special case in findCheaperOp to allow
9151         extending a short integer. Makes less awful code for bug 700121 test case.
9152
9153 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9154
9155         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9156         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9157
9158 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9159
9160         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9161         actually called (operandsNotEqual() was called for all
9162         operandsNotEqualX tests).
9163
9164 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9165
9166         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9167         with shorter literals. Fixes bug 700121.
9168
9169 2003-03-11    <johan AT balder>
9170
9171         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9172
9173 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9174
9175         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9176         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9177
9178 2003-03-10  Borut Razem <borut.razem AT siol.net>
9179
9180         * src/SDCCmain.c: pipe preprocessor's output
9181         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9182         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9183         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9184         which closes all pipes in pipeSet set
9185         * src/SDCCset.c: free deleted item in function deleteSetItem()
9186         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9187         moved from z80 to src subproject
9188         * .version: increased version number to 2.3.4
9189
9190 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9191
9192         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9193         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9194         * support/regression/ports/xa51/spec.mk: fix typo
9195
9196 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9197
9198         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9199
9200 2003-03-09  Borut Razem <borut.razem AT siol.net>
9201
9202         * src/SDCCmain.c: pipe preprocessor's output
9203         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9204         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9205         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9206         which closes all pipes in pipeSet set
9207         * src/SDCCset.c: free deleted item in function deleteSetItem()
9208         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9209         moved from z80 to src subproject
9210
9211 2003-03-09  Borut Razem <borut.razem AT siol.net>
9212
9213         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9214         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9215         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9216         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9217         * src/SDCCglobl.h: unification of WIN32 native definitions
9218
9219 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9220
9221         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9222
9223 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9224
9225         * src/configure.in:   check for endianess (even while cross-compiling)
9226         * src/configure:      check for endianess (even while cross-compiling)
9227         * src/configure_in.h: check for endianess (even while cross-compiling)
9228         * src/avr/gen.c:        remove old endianess stuff
9229         * src/mcs51/gen.c:      remove old endianess stuff
9230         * src/ds390/gen.c:      remove old endianess stuff
9231         * src/pic/gen.c:        remove old endianess stuff
9232         * src/pic/genarith.c:   remove old endianess stuff
9233         * src/pic/glue.c:       fix endianess check
9234         * src/pic16/gen.c:      remove old endianess stuff
9235         * src/pic16/genarith.c: remove old endianess stuff
9236         * src/pic16/glue.c:     fix endianess check
9237         * src/xa51/gen.c:       remove old endianess stuff
9238         * src/z80/gen.c:        fix endianess check
9239         * src/SDCCglue.c:       fix endianess check
9240         * src/ds390/peeph.def: fix bug 700036
9241
9242 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9243
9244         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9245         * src/configure: find appropriate data-types on host for SDCC's int and long
9246         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9247         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9248         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9249
9250 2003-03-07    <johan AT balder>
9251
9252         Just a big NOOP:
9253                 some minor cleanups before the big shot
9254                 OP_DEFS and OP_USES now use Kevin's protection
9255                 new option --nolabelopt
9256
9257         * src/SDCCBBlock.c:
9258         * src/SDCCast.c,:
9259         * src/SDCCcflow.c:
9260         * src/SDCCcse.c:
9261         * src/SDCCicode.c:
9262         * src/SDCCicode.h:
9263         * src/SDCClabel.c:
9264         * src/SDCCloop.c:
9265         * src/SDCCmain.c:
9266         * src/ds390/ralloc.c:
9267         * src/mcs51/ralloc.c:
9268         * src/pic/ralloc.c:
9269         * src/xa51/ralloc.c:
9270         * src/z80/ralloc.c:
9271
9272 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9273
9274         * src/pic/pcode.c (get_op): fix 64 bit warnings
9275         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9276         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9277         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9278         * support/regression/tests/malloc.c: fix 64 bit warnings
9279
9280 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9281
9282         * src/mcs51/gen.c (genMinus): fixed bug 696436
9283
9284 2003-03-02  Borut Razem <borut.razem AT siol.net>
9285
9286         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9287
9288 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9289
9290         * configure.in: test for mkstemp
9291         * sdccconf_in.h: add HAVE_MKSTEMP
9292
9293 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9294
9295         * device/include/ctype.h: removed warning while using --stack-auto
9296         * device/include/malloc.h: removed warning while using --stack-auto
9297         * device/include/string.h: removed warning while using --stack-auto
9298
9299 2003-02-23  Borut Razem <borut.razem AT siol.net>
9300
9301         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9302         because NDEBUG is defined (see man assert)
9303         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9304
9305 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9306
9307         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9308         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9309
9310 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9311
9312         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9313         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9314
9315 2003-02-18    <johan AT balder>
9316
9317         * as/mcs51/asmain.c (asmbl): module can start with a digit
9318         * as/z80/asmain.c (asmbl): module can start with a digit
9319
9320 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9321
9322         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9323         * src/asm.c: fix pipe() for Mingw32
9324
9325 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9326
9327         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9328         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9329         make -V work again; --c1mode reads now from stdin
9330         * doc/sdccman.lyx: added --c1mode
9331         * support/Util/SDCCerr.c: new messages for c1 mode
9332         * support/Util/SDCCerr.h: new messages for c1 mode
9333         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9334
9335 2003-02-15    <johan AT balder>
9336
9337         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9338
9339 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9340
9341         * doc/sdccman.lyx: Environment variables, -o and other minor things
9342
9343 2003-02-14    <johan AT balder>
9344
9345         * src/xa51/main.c: before anyone really tries to use it :)
9346
9347         * Install doc's in share/sdcc/doc
9348         * removed some obsolete files
9349         * Do a proper make distclean and uninstall
9350         M Makefile.common.in
9351         R sdccbuild.sh
9352         M as/Makefile
9353         M device/include/Makefile.in
9354         M device/lib/Makefile.in
9355         M doc/sdccman.lyx
9356         M link/Makefile
9357         M sim/ucsim/doc/Makefile.in
9358         M src/clean.mk
9359         R src/avr/peeph.rul
9360         R src/xa51/peeph.rul
9361         M support/cpp2/Makefile.in
9362         M support/makebin/Makefile
9363
9364
9365 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9366
9367         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9368
9369 2003-02-10  Borut Razem <borut.razem AT siol.net>
9370
9371         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9372         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9373         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9374         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9375         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9376         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9377         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9378         src/z80/Makefile.bcc: Borland Makefile cleanup
9379         * as/z80/Makefile.bcc: Added Borland Makefile
9380         * support/cpp2/borland.h: Removed
9381
9382 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9383
9384         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9385         * src/SDCC.lex: new pragma NOIV
9386         * src/SDCCglobl.h: new pragma NOIV
9387         * src/SDCCmem.c: new pragma NOIV
9388
9389 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9390
9391         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9392
9393 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9394
9395         * src/SDCCmain.c: signal handling is switched off by --debug
9396         * doc/Makefile: small fix for install; use clean.mk again
9397         * doc/clean.mk: clean *.pdf and *.html too
9398
9399 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9400
9401         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9402         * device/lib/printfl.c: fix a ds390 bug by making it portable
9403         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9404         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9405         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9406         * debugger/mcs51/cmd.c: converted multi-line string literals
9407         * sim/ucsim/globals.cc: converted multi-line string literals
9408         * src/SDCCmain.c: introduced signal handler to remove temp files
9409         * doc/Makefile: small tweaks, implement clean
9410         * doc: removed generated files
9411
9412 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9413
9414         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9415         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9416         Address Record is not correctly generated for DS390."
9417
9418 2003-02-02  Borut Razem <borut.razem AT siol.net>
9419
9420         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9421         * as/mcs51/asm.h: fixed compilation with Borland C
9422         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9423         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9424         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9425         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9426         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9427         src/z80/Makefile.bcc: delete $(LIB) only if exist
9428         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9429
9430 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9431
9432         * device/include/malloc.h: introduced NULL
9433         * device/include/string.h: introduced NULL
9434         * device/include/stdlib.h: introduced NULL
9435         * device/lib/_memcpy.c: removed NULL
9436         * device/lib/_strcat.c: removed NULL
9437         * device/lib/_strchr.c: removed NULL
9438         * device/lib/_strcmp.c: removed NULL
9439         * device/lib/_strcpy.c: removed NULL
9440         * device/lib/_strcspn.c: removed NULL
9441         * device/lib/_strlen.c: removed NULL
9442         * device/lib/_strncat.c: removed NULL
9443         * device/lib/_strncmp.c: removed NULL
9444         * device/lib/_strncpy.c: removed NULL
9445         * device/lib/_strpbrk.c: removed NULL
9446         * device/lib/_strrchr.c: removed NULL
9447         * device/lib/_strspn.c: removed NULL
9448         * device/lib/_strstr.c: removed NULL
9449         * device/lib/_strtok.c: removed NULL
9450         * device/lib/malloc.c: removed NULL, include own header
9451
9452 2003-02-02    <johan AT balder>
9453
9454         * 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
9455         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9456         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9457         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9458         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9459         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9460
9461 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9462
9463         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9464         area 'DATA'"
9465
9466 2003-02-01    <johan AT balder>
9467
9468         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9469
9470 2003-01-31    <johan AT CP255758-A>
9471
9472         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9473
9474 2003-01-30    <johan AT balder>
9475
9476         * src/SDCCBBlock.c: automatic bug detection
9477         * src/SDCCicode.c: automatic bug detection
9478
9479 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9480
9481         * src/SDCCglobl.h:   now --xram-size 0 works
9482         * src/SDCCmain.c:    now --xram-size 0 works
9483
9484 2003-01-29    <johan AT balder>
9485
9486         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9487
9488 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9489
9490         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9491         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9492         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9493         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9494         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9495         * src/SDCCmain.c:    Added options --xram-size and --code-size
9496
9497 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9498
9499         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9500         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9501
9502 2003-01-27    <johan AT balder>
9503
9504         * src/SDCC.y: fixed bug #613764
9505
9506 2003-01-26    <johan AT balder>
9507
9508         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9509         * src/SDCCsymt.h: fixed bug #673374
9510         * src/SDCCglue.c: fixed bug #661910
9511         * src/SDCCast.c: fixed bug #458099 and 673374
9512
9513 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9514
9515         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9516         * as/mcs51/strcmpi.h: added
9517         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9518         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9519         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9520         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9521         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9522         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9523         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9524         * as/mcs51/Makefile.aslink: new module strcmpi
9525         * as/mcs51/Makefile.asx8051: new module strcmpi
9526         * as/mcs51/Makefil.bcc: new module strcmpi
9527         * as/mcs51/Makefile.in: new module strcmpi
9528         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9529
9530 2003-01-26    <johan AT balder>
9531
9532         * src/SDCCglue.c: reverted back to 1.124
9533         * src/SDCCast.c: reverted back to 1.156
9534         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9535
9536 2003-01-25    <johan AT balder>
9537
9538         * src/SDCCglue.c: A better fix for bug #661910
9539         * src/SDCCast.c: A better fix for bug #661910
9540         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9541
9542 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9543
9544         * src/Makefile.in: remove spawn.o
9545         * src/SDCCmain.c: remove spawn.h
9546         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9547         * src/spawn.c: removed
9548         * src/spawn.h: removed
9549         * support/regression/ports/ds390/spec.mk: link with -r
9550
9551 2003-01-24    <johan AT CP255758-A>
9552
9553         * src/ds390/gen.c (aopOp): fixed bug #667458
9554         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9555         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9556         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9557
9558 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9559
9560         * src/mcs51/peeph.def: better assembler identation by Frieder
9561         * src/mcs51/gen.c: better assembler identation by Frieder
9562
9563 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9564
9565         * as/z80/string.h: removed for gcc 3.2
9566         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9567         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9568
9569 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9570
9571         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9572         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9573         * support/regression/Makefile: separate temp files for ports
9574         * support/regression/generate-cases.py: separate temp files for ports
9575         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9576         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9577
9578 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9579
9580         * moved tinitalk to device/examples/ds390
9581
9582 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9583
9584         * as/mcs51/lkmem.c: rflag is for DS390
9585         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9586         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9587                          (linkEdit): move mem- and map-files the same way as ihx-files
9588         * src/z80/main.c (_setDefaultOptions): removed --generic
9589         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9590         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9591         * src/pic/glue.c (picglue): --c1mode works again
9592         * src/pic16/glue.c (pic16glue): --c1mode works again
9593         * src/asm.c (printCLine): fix #660034
9594
9595 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9596
9597         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9598         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9599         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9600         * as/mcs51/lkmem (summary): better fix for sp problem
9601         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9602         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9603         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9604                                               remove --stack-after-data
9605
9606 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9607
9608         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9609         * src/SDCCutil.c (join): ugly bug: missing '\0'
9610         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9611
9612 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9613
9614         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9615         * src/port.h: typo
9616         * src/pic/main.c (_asmCmd): gpasm supports -o
9617         * src/z80/main.c: more general macros
9618         * device/lib/Makefile.in: remove intermediate files
9619
9620 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9621
9622         * .version: Bumped version number to 2.3.3
9623         * src/SDCCBBlock.c: new option -o
9624         * src/SDCCglobl.h: new option -o
9625         * src/SDCCglue.c: new option -o
9626         * src/SDCCmain.c: new option -o
9627         * src/asm.c: new option -o
9628         * src/ds390/main.c: new option -o
9629         * src/pic/glue.c: new option -o
9630         * src/pic/pcode.c: new option -o
9631         * src/pic/ralloc.c: new option -o
9632         * src/pic16/glue.c: new option -o
9633         * src/pic16/pcode.c: new option -o
9634         * src/pic16/ralloc.c: new option -o
9635         * src/z80/main.c: new option -o
9636         * device/lib/Makefile.in: use -o
9637         * support/regression/ports/ds390/spec.mk: use -o
9638         * support/regression/ports/gbz80/spec.mk: use -o
9639         * support/regression/ports/mcs51/spec.mk: use -o
9640         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9641         * support/regression/ports/z80/spec.mk: use -o
9642         * support/regression/ports/ucz80/spec.mk: use -o
9643         * support/regression/ports/xa51/spec.mk: use -o
9644         * support/regression/fwk/lib/timeout.c: fix usage string
9645
9646 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9647         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9648
9649 2003-01-07    <johan AT balder>
9650
9651         * src/SDCCast.c (decorateType): fixed bug #600035
9652
9653 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9654         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9655         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9656         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9657         * src/pic/pcode.c: outcommented unused variable to remove warnings
9658         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9659
9660 2003-01-06    <karl AT turbobit.com>
9661         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9662    regression tests.
9663
9664 2003-01-06    <johan AT balder>
9665
9666         * src/SDCCicode.c: fixed array add
9667
9668 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9669         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9670         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9671
9672 2003-01-04    <johan AT balder>
9673
9674         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9675
9676 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9677         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9678
9679 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9680         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9681         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9682
9683 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9684         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9685
9686 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9687         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9688
9689 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9690         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9691
9692 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9693
9694     * in \sdcc\as\mcs51\ changed these files in order to create an
9695     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9696     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9697     following files to include the previous two files: aslink.dsp,
9698     Makefile.aslink, Makefile.bcc, and Makefile.in.
9699
9700     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9701     .adb instead of .cdb
9702
9703 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9704
9705         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9706         value from option --iram-size.
9707
9708 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9709
9710         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9711         dram[] array.
9712
9713 2002-09-18    <wiml AT hhhh.org>
9714
9715         * SDCClrange.h: exposed setFromRange() and setToRange()
9716         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9717           packRegsForAccUse() (bug 542397)
9718         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9719           multiple times and emitting the fetch operations more than once
9720           added aopGetUsesAcc() function to allow binary operators to
9721           fetch their operands in the correct order; made genMinus() emit
9722           compact code for X = LITERAL - Y
9723
9724 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9725         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9726         sprintf() in line 1267.
9727
9728 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9729         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9730         like ports.
9731
9732 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9733         Changes to aslink (All the changes are marked with 'JCF'):
9734
9735         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9736         summary().
9737
9738         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9739         area BSEG.  Also moves, if possible, the DATA area down into the internal
9740         ram so more space is available.
9741
9742         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9743         sflag.
9744
9745         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9746         not bytes.  Function summary() which creates a memory usage summary
9747         file with extension .mem.  Reports of overlaping stack and small stack
9748         size.  If the space for the stack is less than 16 bytes aslink trows a
9749         warning.
9750
9751         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9752         the 8051.  Option 'y' for memory summary output file.
9753
9754         Changes to sdcc (All the changes are marked with 'JCF'):
9755
9756         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9757
9758         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9759         overlaying area for it (uses RegBankUsed[4]).
9760
9761         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9762         bank zero as used by default.  By default aslink locates the stack
9763         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9764         the creation of the .mem file.  Delegates the allocation of data area
9765         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9766         the begining of the stack area to aslink.
9767
9768         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9769         glue() in SDCCglue.c creates an area for it.
9770
9771 2002-09-03  Borut Razem <borut.razem AT siol.net>
9772         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9773         sdcc/src/pic/glue.c:
9774         introduced atexit() handler for teporay files removal in case of
9775         errors, assertions, ...
9776
9777 2002-08-29  Borut Razem <borut.razem AT siol.net>
9778         * sdcc/support/cpp2/auto-host_vc_in.h:
9779         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9780         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9781         Maybe there is a similar problem with BORLANDC? It should be checked!
9782
9783         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9784         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9785         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9786         was not executed, and the compiler (cl) launched a warning:
9787         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9788
9789 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9790         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9791
9792 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9793         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9794
9795         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9796           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9797           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9798           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9799           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9800           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9801           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9802         - added Release configuration in VS projects
9803         - review of compiler an linker options
9804         - VC .exe files are generated in bin_vc directory, not to interfere
9805           with binaries generated from other projects (cygwin, mingw, bcc ...)
9806
9807         * sdcc/src/yacc.dsp: added
9808
9809         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9810         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9811         and insert the version number definitions from .version
9812
9813         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9814
9815         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9816         added - genarate auto-host.h using auto-host_vc_in.h as template
9817
9818         * sdcc/sdcc_vc.h,
9819         removed from CVS, generated automatically
9820
9821 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9822         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9823
9824 2002-08-11  Borut Razem <borut.razem AT siol.net>
9825         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9826
9827 2002-08-10  Borut Razem <borut.razem AT siol.net>
9828         * src/SDCCmain.c (main):
9829         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9830         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9831         The consequence was that some temporary files were not removed.
9832
9833         * src/SDCCglue.c:
9834         unification of code in functions tempfilename() and tempfile():
9835         function tempnam() is defined in Visual Studio 6.0 and .NET
9836
9837         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9838
9839         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9840           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9841         - removed compiler command line option /WX: Treats all warnings as errors
9842         - update a list of source files, included into the project
9843
9844         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9845           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9846         changed project type to Generic Project so that can be correcly converted to VS.NET project
9847
9848         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9849
9850         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9851
9852         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9853
9854         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9855         added return 0 statements after assert() to make compiler happy
9856
9857         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9858         added newline in the def file to keep MSC compiler satisfied
9859
9860         * sdcc/src/z80/gen.c:
9861         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9862           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9863         - solved MSC error in function aopDump()
9864
9865         * sdcc_vc.h: define PREFIX as "\\sdcc"
9866
9867 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9868         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9869
9870 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9871         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9872         - Rewrote the register banking algorithm.
9873         - Added pCode live-range analysis to registers (for now, only non-used and
9874         singly-used registers optimized away)
9875
9876         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9877
9878         * 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.
9879
9880 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9881         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9882
9883 2002-04-22  Michael Hope  <michaelh AT vroom>
9884
9885         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9886
9887         * configure.in (DD_COPT): Added include support required for gbdk.
9888
9889         * .version: Bumped version number just to increase it.
9890
9891         * src/SDCCmain.c: Added -nostdinc to the default options.
9892
9893 2002-04-15  Michael Hope  <michaelh AT vroom>
9894
9895         * device/lib/z80/printf.c (sprintf): Added.
9896
9897         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9898
9899         * src/z80/peeph.def: Added transpose redundent load rule.
9900
9901         * src/z80/main.c: Added force callee saves for jaune.
9902
9903         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9904
9905         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9906
9907 2002-03-28  Johan Knol  <johan AT balder>
9908
9909         * src/SDCCval.c: fixed bug #532436
9910
9911 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9912         * /src/port.h:
9913         Added "char *Processor" field to the port structure.
9914
9915         * /src/SDCCmain.c:
9916         Added -p option. Allows port dependent processor to be specified.
9917
9918         * all ports:
9919         Initialized the new field char *Processor field to NULL in all ports
9920
9921         * /src/pic/*:
9922         Compiler generated registers for interrupt context saving
9923         were not getting allocated.
9924
9925 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9926
9927         * /src/SDCCast.c:
9928         Fixed left shift. Will promote the left side of a left shift
9929         if a) left shifting more than size of operand or b) when assigned
9930         to something size > size of left side
9931
9932 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9933         * src/pic/*
9934         tons of changes. Register allocation has been
9935         rewritten. Added customization for the various PICs. Flow
9936         analysis is restructured. ...
9937
9938         * src/pic/device.h:
9939         Added
9940
9941         * src/pic/device.c:
9942         Added. device.c is a PIC port hack to accomodate variations
9943         in PIC devices.
9944
9945 2002-03-13  Michael Hope  <michaelh AT vroom>
9946
9947         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9948
9949 2002-03-04  johanknol  <johanknol AT manik>
9950
9951         * /src/SDCCval.c: fixed
9952
9953         const unsigned char arr[][2] = { { 0, 1 } };
9954         t18.c:1: error: Initializer element is not constant
9955
9956 2002-03-04  bela  <bela AT manik>
9957
9958         * /device/include/mcs51reg.h:
9959         ds89c420 register definition update
9960
9961 2002-03-03    <johan AT FRIJA>
9962
9963         * support/Util/SDCCerr.c: did something, but don't no why anymore
9964
9965         * support/regression/tests/bug-524691.c: made it a little less shy
9966
9967         * src/SDCCast.c (decorateType): fixed bug #524697
9968
9969         * src/SDCCast.c: made some lineno improvements
9970
9971         * src/SDCCval.c (getNelements): changed warning to error
9972
9973         * src/SDCCglue.c (printIvalArray): changed warning to error
9974
9975         * src/SDCCicode.c: fixed a warning for mingw
9976
9977         * src/SDCCast.c (decorateType): fixed the << promotion for ops
9978
9979         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
9980
9981 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
9982
9983         * src/ds390/peeph.def:
9984         Added some more peephole rules
9985
9986         * src/ds390/gen.c: Various fixes & enhancements
9987
9988         * src/SDCClrange.c, src/SDCClrange.h:
9989         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
9990
9991         * src/ds390/ralloc.c:
9992         various fixes & enhancements (ds390) specific
9993
9994         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
9995         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
9996         from rallocs.
9997
9998         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
9999
10000 2002-03-02    <johan AT FRIJA>
10001
10002         * src/SDCCast.c (decorateType): fixed bug #524708
10003
10004         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10005
10006         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10007
10008 2002-03-01  Michael Hope  <michaelh AT vroom>
10009
10010         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10011
10012         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10013
10014 2002-03-01    <johan AT FRIJA>
10015
10016         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10017
10018         * src/SDCCast.c (decorateType): fixed bug #524209
10019
10020         * src/SDCCval.c (valNot): fixed bug #524195
10021
10022 2002-02-26    <johan AT balder>
10023
10024         * src/xa51/gen.c: fixed a warning
10025
10026         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10027
10028         * src/SDCCast.c (decorateType): fixed bug #522534
10029
10030 2002-02-23    <johan AT balder>
10031
10032         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10033
10034 2002-02-22    <johan AT balder>
10035
10036         * src/SDCCast.c: fixed bug #514865
10037
10038         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10039
10040 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10041
10042         * sdcc/src/SDCCloop.c:
10043         Previous fix was not good. basic blocks that have "break" or "return" are
10044         not really partof a loop , but live ranges used in these blocks should
10045         be live thru the entire loop, so set partOfLoop but don't add them to
10046         loop region
10047
10048 2002-02-21    <johan AT FRIJA>
10049
10050         * src/SDCCcse.c: fixed bug #514308
10051
10052 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10053
10054         * src/SDCCloop.c:
10055         Fixed BUG #519583. If a conditional block ended in a return/break
10056         statement inside a loop, it was not being considered part of the loop.
10057
10058         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10059
10060 2002-02-10  Karl Bongers <karl AT turbobit.com>
10061
10062         * debugger/*:
10063         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10064         with lots of comments and notes.
10065
10066         * device/examples/test2.c:
10067         Fix bug, "red" variable not being initialized(compiler complained).
10068
10069         * device/examples/Makefile, examples/test3.c:
10070         Add Makefile in device/examples folder, compiles test3.c
10071         for use as a multiple module SDCDB test case.
10072
10073         * sim/ucsim/cmd.src/cmdset.cc:
10074         Took out debug printfs in ucsim "next" command.
10075
10076         * sim/ucsim/xa.src:
10077         Karl and Johan start ucsim XA support.  Most dissassembly working,
10078         about 75% emulation done(plenty of work remaining).
10079
10080         * sim/ucsim/z80.src:
10081         Add Z80 support to ucsim, add test-ucz80 regression test,
10082         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10083         Notice z80 compiler fails on examples/test3.c/crc code.
10084
10085 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10086
10087         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10088         Added support for --parms-in-bank1
10089
10090         * src/ds390/peeph.def:
10091         added a few more peephole optimzations
10092
10093         * src/ds390/main.c:
10094         1) added __builtin_inp & __builtin_outp used to read in data of given length
10095            from a memory mapped port
10096         2) added __builtin_memcmp
10097         3) added __builtin_swapw swap bytes of a short
10098
10099         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10100         1) handle multiple send & receives from register bank1
10101         2) ralloc can now allocate DPTR1 to some liveRanges
10102
10103         * src/SDCCsymt.c, src/SDCCsymt.h:
10104         changes to handle multiple sends & receives
10105
10106         * src/SDCCptropt.h:
10107         added some pointer arithmetic optimization
10108
10109         * src/SDCCptropt.c:
10110         added some pointer arithmetic optimizations but not stable yet so not
10111         called from anywhere (will get this working shortly)
10112
10113         * src/SDCCopt.c: fixed for multiple sends & receives
10114
10115         * src/SDCCmain.c:
10116         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10117         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10118            set preprocessor defines (depending on options)
10119
10120         * src/SDCCicode.c, src/SDCCicode.h:
10121         changes made to handle multiple sends & receives
10122
10123         * src/SDCCglobl.h:
10124         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10125
10126         * src/SDCCcse.c, src/SDCCcse.h:
10127         added function findbackward def (to be used in upcoming optimization)
10128
10129         * src/SDCCcflow.c, src/SDCCcflow.h:
10130         added function returnAtEnd - to determine if a basic block terminates with
10131         a RETURN iCode
10132
10133         * src/SDCCast.c, src/SDCCast.h:
10134         added option parms-in-bank1
10135
10136         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10137         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10138         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10139         adjusted for --parms-in-bank1 option
10140
10141         * device/include/string.h:
10142         donot redefine "reentrant" keyword
10143
10144         * device/include/ds80c390.h: Added some more SFRs
10145
10146 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10147
10148         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10149
10150 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10151
10152         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10153
10154 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10155
10156         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10157
10158 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10159
10160         * Added --xram-movc option
10161
10162 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10163
10164         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10165
10166 2002-01-11  Johan Knol
10167
10168         * Added math lib of Jesus Calvino-Fraga
10169
10170 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10171
10172         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10173         * support/regression/Makefile: new target test-mcs51-stack-auto
10174         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10175
10176 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10177
10178         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10179
10180 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10181
10182         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10183
10184 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10185
10186         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10187
10188         * src/SDCCglue.h: add definition for printIvalChar()
10189
10190 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10191
10192         * src/SDCCast.c: fix #498138 by Johan
10193
10194         * src/SDCCglue.c: fix #498138 by Johan
10195
10196 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10197
10198         * support/regression/Makefile: fix clean
10199
10200         * support/regression/ports/ds390/support.c: fix transmission of last character
10201
10202 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10203
10204         * /sdcc/src/ds390/gen.c:
10205         a) improved computing address of stack variable
10206         b) took out some #if 0 code
10207         c) improved parmBytes adjustment
10208         d) improved genPlusIncr & genMinusIncr
10209         e) genCmp could generate bad code (when left assigned to DPTR)
10210         f) Fixed bug in hasInc
10211
10212         * /sdcc/src/ds390/ralloc.c:
10213         a) packRegsForSupport could mess up live information (Fixed)
10214         b) packRegsDPTRuse could be incorrect for left & right shift
10215
10216         * /sdcc/src/mcs51/ralloc.c:
10217         packRegsForSupport could mess up the live information (Fixed)
10218
10219         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10220
10221         * /sdcc/src/SDCCast.c:
10222         can reverse a loop even if function call is present as long
10223         as the loop control variable is local & is not passed as parameter
10224
10225 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10226
10227         * /sdcc/ChangeLog: *** empty log message ***
10228
10229         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10230         More builtin function additions for TININative
10231
10232         * /sdcc/src/ds390/ralloc.c:
10233         Had broken the regression testsuite
10234
10235         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10236
10237         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10238         Added funcattr hasStackParms will be set for reentrant functions when there
10239         are paramteres on the stack, this helps in minimizing frame pointer generation
10240         typeFromStr can handle function pointers now
10241
10242         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10243         *** empty log message ***
10244
10245 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10246
10247         * /src/ds390/gen.c, /src/ds390/main.c:
10248         More builtin function additions for TININative
10249
10250         * /src/ds390/ralloc.c:
10251         Had broken the regression testsuite
10252
10253         * /src/SDCCast.c: Fixed a bug in dumptree
10254
10255         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10256         Added funcattr hasStackParms will be set for reentrant functions when there
10257         are paramteres on the stack, this helps in minimizing frame pointer generation
10258         typeFromStr can handle function pointers now
10259
10260         * /doc/builtins.txt, /doc/TININative.txt:
10261         *** empty log message ***
10262
10263
10264 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10265
10266         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10267         ALPHA version for -mTININative
10268
10269         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10270         updated to reflect changes in the port structure
10271
10272         * /src/port.h:
10273         added function do_assemble (similar to do_link) if non-null this function
10274         will be called to do assembly (-mTININative) requires a multi command
10275         assembly
10276         added function genAssemblerEnd will be called to generate assembler Epilogue
10277
10278         * /src/SDCCsymt.c:
10279         added _JavaNative to debug info printing
10280
10281         * /src/SDCCmain.c: added option --tini-libid
10282         added port->do_assemble function (-mTININative) has a multi command assemble
10283
10284         * /src/SDCCglue.c: Disabled "constExpr" check
10285         added port->genAssemblerEnd function
10286
10287         * /src/SDCCglobl.h: Added option --tini-libid value
10288
10289         * /src/SDCCast.h:
10290         tookout optimizeCompare from the header (has no external references)
10291
10292         * /src/SDCCast.c: made one more function "static"
10293
10294 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10295
10296         * src/z80/mappings.i: Added z80asm support.
10297
10298         * src/z80/main.c: Added z80asm support on --asm=z80asm
10299
10300         * src/z80/gen.c: Fixed asm portability issues.
10301
10302         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10303
10304         * src/SDCCglue.c (printExterns): Added global/extern split.
10305
10306 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10307
10308         * support/regression/Makefile: added test for mcs51 model large
10309
10310         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10311
10312         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10313
10314 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10315
10316         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10317
10318 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10319
10320         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10321
10322         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10323
10324 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10325
10326         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10327
10328         * support/regression/tests/simplefloat.c: Port to mcs51.
10329
10330 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10331         * support/regression/tests/bug-485362.c: Added.
10332
10333         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10334
10335         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10336
10337         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10338
10339         * src/z80/gen.c (aopDump): Added a dump function.
10340
10341 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10342         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10343
10344         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10345
10346         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10347
10348         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10349
10350         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10351
10352         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10353
10354         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10355
10356         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10357
10358         * support/regression/ports/ds390/support.c: Use tinibios.
10359
10360         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10361
10362 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10363
10364         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10365         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10366
10367         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10368
10369         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10370
10371 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10372
10373         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10374
10375         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10376         (packRegsForIYUse): Created and optimised.
10377
10378 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10379
10380         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10381 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10382
10383         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10384
10385         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10386
10387         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10388
10389 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10390
10391         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10392
10393         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10394
10395 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10396
10397         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10398
10399         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10400
10401         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10402
10403 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10404
10405         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10406         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10407         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10408
10409         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10410
10411         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10412         (genNotFloat): Added.
10413         (genUminusFloat): Added.
10414
10415         * device/lib/z80/Makefile: Added floating pt stubs.
10416
10417         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10418
10419         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10420
10421         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10422
10423 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10424
10425         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10426
10427         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10428
10429         * sdcc/support/regression/Makefile: Add port ds390.
10430
10431         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10432
10433         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10434
10435         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10436
10437         * sdcc/support/regression/ports/ds390/support.c: Added.
10438
10439         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10440
10441         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10442
10443         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10444
10445 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10446
10447         * device/include/malloc.h: Added z80 and gbz80 support.
10448
10449         * device/lib/gbz80/heap.s: Added.
10450
10451         * device/lib/z80/heap.s: Added.
10452
10453         * device/lib/malloc.c: Added z80 and gbz80 support.
10454
10455         * support/regression/tests/malloc.c (testMalloc): Added.
10456
10457         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10458
10459         * support/regression/tests/bug-478094.c: Added.
10460
10461         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10462
10463 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10464
10465         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10466
10467         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10468
10469         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10470
10471         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10472
10473         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10474
10475 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10476
10477         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10478
10479 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10480
10481         * support/regression/tests/bug-477927.c: Added.
10482
10483         * src/z80/peeph.def: Added minor rules.
10484
10485         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10486
10487         * src/z80/peeph.def: Added jump optimisation modification.
10488
10489 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10490
10491         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10492
10493 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10494
10495         * support/regression/tests/funptrs.c: Added.
10496
10497 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10498
10499         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10500
10501 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10502
10503         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10504
10505         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10506
10507         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10508         (movLeft2ResultLong): Created.
10509
10510         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10511         (joinPushes): Added.  Joins two char pushes into a word push.
10512
10513 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10514
10515         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10516
10517         * support/makebin/Makefile (install): Added creation of dest dir.
10518
10519 2001-10-24 Karl Bongers <karl AT turbobit.com>
10520
10521         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10522
10523 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10524
10525         * src/z80/ralloc.c: Turned off faulty pack for one use.
10526
10527         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10528
10529         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10530
10531 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10532
10533         * support/regression/Makefile: Improved clean
10534
10535         * support/regression/ports/gbz80/spec.mk: Added clean
10536
10537         * support/regression/ports/host/spec.mk: Added clean
10538
10539         * support/regression/ports/z80/spec.mk: Added clean
10540
10541         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10542
10543         * support/regression/ports/mcs51/timeout.c: little improvements
10544
10545 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10546
10547         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10548
10549         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10550
10551         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10552
10553 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10554
10555         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10556
10557         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10558
10559 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10560         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10561
10562         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10563
10564         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10565
10566         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10567
10568         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10569
10570         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10571
10572         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10573
10574         * support/regression/tests/longor.c: Added.
10575
10576 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10577
10578         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10579
10580         * as/mcs51/aslink.h: define PATH_MAX
10581
10582         * as/mcs51/asm.h: define PATH_MAX
10583
10584         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10585
10586         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10587
10588         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10589
10590         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10591
10592         * src/SDCCglobl.h: define PATH_MAX
10593
10594         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10595
10596         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10597
10598 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10599
10600         * src/z80/gen.c (gencjneshort): Fixed
10601
10602         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10603
10604 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10605
10606         * support/regression/tests/bug-469671.c: Added.
10607
10608         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10609
10610 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10611
10612         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10613
10614         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10615
10616 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10617
10618         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10619
10620         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10621
10622         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10623
10624         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10625
10626         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10627
10628         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10629
10630         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10631
10632 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10633
10634         * 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.
10635
10636         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10637
10638         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10639
10640 2001-10-07    <johan AT FRIJA>
10641
10642         * device/lib/gets.c (gets): fixed the return value.
10643
10644 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10645         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10646
10647         * 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.
10648
10649         * 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.
10650
10651         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10652
10653         * src/pic/gen.c: Removed Safe_strdup.
10654
10655         * configure.in: Added option to enable libgc support.
10656
10657         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10658         (bitVectUnion): Optimised.
10659         (bitVectIntersect): Optimised.
10660         (bitVectBitsInCommon): Optimised.
10661         (bitVectCplAnd): Optimised.
10662
10663         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10664
10665 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10666
10667         * src/SDCCmain.c: distinguish between assembler debug and plain options
10668
10669         * src/avr/main.c:   remove standard assembler options
10670
10671         * src/ds390/main.c: remove standard assembler options
10672
10673         * src/mcs51/main.c: remove standard assembler options
10674
10675         * src/port.h: removed "PENDING" comment
10676
10677 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10678
10679         * src/device/lib/_mulint.c  : new, with assember functions
10680
10681         * src/device/lib/_mullong.c : new, with assember functions
10682
10683         * src/device/lib/_divuint.c : with assember functions
10684
10685         * src/device/lib/_divsint.c : with assember functions
10686
10687         * src/device/lib/_divulong.c: with assember functions
10688
10689         * src/device/lib/_divslong.c: with assember functions
10690
10691         * src/device/lib/_moduint.c : with assember functions
10692
10693         * src/device/lib/_modsint.c : with assember functions
10694
10695         * src/device/lib/_modulong.c: with assember functions
10696
10697         * src/device/lib/_modslong.c: with assember functions
10698
10699         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10700
10701         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10702
10703         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10704                                       replaced _mululong.c and _mulslong.c by _mullong.c
10705
10706 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10707
10708         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10709
10710 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10711
10712         * src/SDCCglue.c: test, if win32api is available for MINGW
10713
10714 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10715
10716         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10717         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10718         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10719         * support/regression/ports/host/spec.mk: removed GENERIC
10720         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10721         * support/regression/ports/z80/spec.mk: removed GENERIC
10722
10723 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10724
10725         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10726
10727         * support/regression/tests/bug-467035.c: Created.
10728
10729 2001-10-01    <johan AT FRIJA>
10730
10731         * src/SDCC.y: fixed bug #466586 part 1
10732
10733 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10734
10735         * SDCCicode.c: z80 has no generic pointers
10736         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10737
10738 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10739
10740         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10741
10742 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10743
10744         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10745
10746         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10747
10748 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10749
10750         * configure.in: Fixed up so that ucsim is only configured once.
10751
10752         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10753
10754         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10755         (getPathDifference): As above.
10756
10757         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10758
10759         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10760
10761 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10762         * .version: Updated to 2.3.1
10763
10764         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10765         Added copyright header.
10766
10767         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10768         (assemble): Added support for macro based assembler commands.
10769         (linkEdit): Added support for macro based linker commands.
10770         (preProcess): Changed the pre-processor to use macros.
10771         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10772         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10773
10774         * device/lib/z80/crt0.s: Added module name for debugging.
10775
10776 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10777
10778         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10779
10780         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10781
10782         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10783
10784         * src/Makefile.in: Added SDCCmacro and SDCCutil
10785
10786 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10787
10788         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10789
10790 2001-09-16    <johan AT FRIJA>
10791
10792         * 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.
10793
10794 2001-09-15    <johan AT FRIJA>
10795
10796         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10797         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10798
10799 2001-09-11    <johan AT FRIJA>
10800
10801         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10802
10803 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10804
10805         * support/regression/tests/bug-460444.c: Added test case.
10806
10807         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10808         (genCast): Added justification for all of the asserts.
10809
10810 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10811
10812         * support/regression/support.c: _xdata replaced by xdata
10813
10814         * support/regression/spec.mk: removed _generic
10815
10816 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10817
10818         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10819
10820         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10821         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10822
10823         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10824
10825         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10826
10827         * support/regression/tests/bug-460010.c: Added test case.
10828
10829         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10830
10831 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10832
10833         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10834
10835         * support/regression/testfwk.c: removed workaround for bug #436344
10836
10837         * support/regression/tests/bp.c: use less memory with mcs51
10838
10839         * support/regression/tests/bug-441448.c: use less memory
10840
10841         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10842
10843         * support/regression/collate-results.py: typo
10844
10845 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10846
10847         * support/regression/tests/fetchoverlap.c: Added new test case.
10848
10849         * support/regression/tests/bp.c: Added new test case.
10850
10851         * support/regression/tests/bug-448984.c: Added new test case.
10852
10853         * support/regression/tests/pow2shifts.c: Added new test case.
10854
10855         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10856         (genlshTwo): Fixed right shift for count > 8.
10857
10858         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10859
10860 2001-09-08    <johan AT FRIJA>
10861
10862         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10863
10864 2001-09-07    <johan AT FRIJA>
10865
10866         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10867
10868         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10869
10870 2001-09-06    <johan AT FRIJA>
10871
10872         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10873         * bernhard noted me at this: "() equals to (void)" (1.38)
10874
10875 2001-09-05    <johan AT FRIJA>
10876
10877         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10878
10879 2001-09-04    <johan AT FRIJA>
10880
10881         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10882
10883
10884 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10885
10886         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10887
10888 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10889
10890         * link/z80/aslink.h: Fixed path for PATH_MAX
10891
10892 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10893
10894         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10895
10896         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10897
10898         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10899
10900         * 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.
10901
10902 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10903
10904         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10905         (genCmp): Fixed up genCmp for the GB with longs.
10906
10907         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10908
10909         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10910
10911         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10912
10913         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10914
10915 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10916
10917         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10918
10919 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10920
10921         * 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.
10922
10923         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10924
10925 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10926
10927         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10928
10929         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10930
10931 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10932
10933   * sim/ucsim/configure:    little improvement of Cygwin-detection
10934   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10935   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10936   * support/regression/tests/bug-221100.c: small changes for mcs51
10937   * support/regression/tests/bug-221168.c: small changes for mcs51
10938   * support/regression/tests/bug-227710.c: small changes for mcs51
10939   * support/regression/tests/staticinit.c: small changes for mcs51
10940   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10941   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10942   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10943
10944 $Revision$