* sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
[fw/sdcc] / ChangeLog
1 2006-04-24 Borut Razem <borut.razem AT siol.net>
2
3         * device/examples/main8051.c: deleted - it was removed from CVS
4           24.mar.2000 and after that modified 18.feb.2001, so it reappered
5           after the transition to Subversion 
6         * src/SDCCalloc.h: deleted - it was removed  from CVS
7           3.feb.2001 and after that modified 18.feb.2001, so it reappered
8           after the transition to Subversion 
9         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif, 
10           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
11           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
12           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
13
14 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
15
16         * as/asx8051.dsp: added mcs51/strcmpi.h
17         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
18         * as/hc08/aslink.h: updated lnksect prototype
19         * as/hc08/asm.h,
20         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
21         * as/hc08/asmain.c,
22         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
23           (newdot): handle A_ABS
24         * as/hc08/asout.c,
25         * as/mcs51/asout.c (outarea): output address
26         * as/hc08/lkaomf51.c,
27         * as/mcs51/lkaomf51.c: disabled unused array UsageType
28         * as/hc08/m08pst.c,
29         * as/mcs51/i51pst.c,
30         * as/z80/z80pst.c: "ABS" is not A_OVR
31         * as/hc08/lkarea.c (newarea): read a_addr,
32           (lnkarea): added codemap array, sort absolute areas to the front,
33            combine all GSINITx/GSFINAL,
34           (find_empty_space, allocate_space): new functions,
35           (lnksect): return next address, handle absolute sections
36         * as/mcs51/lkarea.c (newarea): read a_addr,
37           lnksect2 prototype changed,
38           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
39           (find_empty_space, allocate_space): new, factored out of lnksect2,
40           (lnksect2): return next address, handle absolute sections
41         * as/hc08/lkhead.c,
42         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
43         * as/hc08/lklibr.c (addfile, fndsym),
44         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
45           index out of range and detect both '\' and '/'
46         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
47         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
48           regression tests (ds390 cannot return bool yet)
49         * doc/sdccman.lyx: changed version number, document changed --no-peep,
50           document critical interrupts on z80, document changed SDCC define
51         * src/asm.c (_asxxxx_mapping): fixed .org directive,
52           (_a390_mapping): added .org directive
53         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
54           (genMultOneByte): fixed warnings
55         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
56           ones
57         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
58         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
59           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
60         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
61         * src/pic16/main.c: removed newReg prototype
62         * src/pic16/pcode.c,
63         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
64           warnings
65         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
66           ones
67         * src/pic16/ralloc.c
68         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
69           to fix warnings
70         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
71           from short to PIC_OPTYPE
72         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
73         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
74           optype from short to PIC_OPTYPE
75         * src/port.h: made int_size unsigned to fix warnings
76         * src/SDCC.y: fixed warning on MSVC
77         * src/SDCCicode.c (getArraySizePtr): return unsigned int
78         * src/SDCCopt.c (convertToFcall): fixed warnings
79         * src/SDCCsymt.h: removed double prototype for genSymName
80         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
81           offset int to fix warnings
82
83 2006-04-22 Borut Razem <borut.razem AT siol.net>
84
85         * doc/sdccman.lyx, */Makefile, */Makefile.in:
86           references to CVS replaced with Subversion
87
88 2006-04-21 Borut Razem <borut.razem AT siol.net>
89
90         * doc/sdccman.lyx, */Makefile, */Makefile.in:
91           references to CVS replaced with Subversion
92
93 2006-04-19 Borut Razem <borut.razem AT siol.net>
94
95         * src/version.awk: adapted for svn
96         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
97           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
98           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
99           /binutils-avr/etc/*.vi, *.jin: removed all properties
100           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
101
102 2006-04-19 Borut Razem <borut.razem AT siol.net>
103
104         * CVS to Subversion migration completed
105
106 2006-04-18 Borut Razem <borut.razem AT siol.net>
107
108         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
109           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
110
111 2006-04-17 Borut Razem <borut.razem AT siol.net>
112
113         * device/include/Makefile.in: added pic/*.inc to the installation
114
115 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
116
117         * support/regression/collate-results.py: fixed output in case of
118         a valdiag error
119         * support/regression/generate-cases.py: fixed splitting of pathnames
120         with dots
121         * as/hc08/lklibr.c (addfile),
122         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
123
124 2006-04-11 Raphael Neider <rneider AT web.de>
125
126         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
127         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
128         * src/pic16/pcode.c (assignValnums): fixed #1460578
129
130 2006-04-11 Raphael Neider <rneider AT web.de>
131
132         * device/lib/pic/libdev/*.c,
133         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
134           fixes #1468739, enables compilation in --std-c99 mode
135         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
136
137 2006-04-11 Raphael Neider <rneider AT web.de>
138
139         * src/pic/device.c (find_device): removed debug output
140           (list_valid_pics): enabled verbose listing of supported devices
141         * device/include/stdbool.h: define bool as char for pic14/16 as well
142
143 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
144
145         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
146
147 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
148
149         * .version: bumped version to 2.5.6
150         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
151
152 2006-04-06 Raphael Neider <rneider AT web.de>
153
154         * .version: bumped version to 2.5.6 (pic14 ABI changed)
155         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
156         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
157           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
158             pic14_constructAbsMap
159           (pic14printPublics): declare absolute global symbols as global
160           (pic14createInterruptVect),
161         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
162           (newReg): assume new registers unused, use correct name in
163             hashtable (reg->name instead of name), more debugLog output
164         * src/pic/device.h (PIC_device): added fields for verbose output
165         * src/pic/device.c: moved device definition to pic14devices.txt,
166             added routines for runtime parsing of pic14devices.txt,
167             added support for second config word
168         * src/pic/main.c (_process_pragma): removed #pragma maxram,
169           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
170           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
171           (_pic14_parseOptions): moved pCodeInitRegisters here
172           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
173         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
174           (pCodeInitRegisters): rewrapped comments, perpared new approach to
175             handling the pseudo stack
176         * device/lib/Makefile.in: ignore failures in objects-pic16,
177         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
178         * device/lib/pic/NEWS: document new dependency on picXXX.lib
179         * device/lib/pic/Makefile.subdir,
180         * device/lib/pic16/Makefile.subdir: improved clean rules
181         * device/lib/pic/libdev/: NEW, pic14 device libraries
182         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
183         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
184         * device/include/Makefile.in: create subdir and install pic14 headers
185         * device/include/pic/p16f_common.inc: removed unused declarations
186         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
187             PICs from inc2h.pl v1.6,
188             replaced BIT_AT macros with struct declarations
189         * device/include/pic/pic14devices.txt: definition of supported devices,
190             all above improvements contributed by Zik Saleeba, thanks
191         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
192         * support/scripts/sdcc.nsi: also install pic14 device libraries and
193             headers
194
195 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
196
197         * device/include/mcs51/c8051f410.h: added interrupt numbers,
198         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
199           thanks to Charles Olds
200
201 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
202
203         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
204
205 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
206
207         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
208         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
209         * support/regression/bug1464657.c: added, new test
210
211 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
212
213         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
214           version number
215
216 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
217
218         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
219           --no-peep and --peep-file <file> are used don't use default rules but
220           do use the <file>
221
222 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
223
224         * src/mcs51/gen.c (genCall): fixed bug 1457608
225
226 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
227
228         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
229         changes seem to cause (trigger?) problems with the build system.
230
231 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
232
233         * src/SDCCpeeph.c (operandsLiteral): new, added,
234           (callFuncByName): inserted operandsLiteral
235         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
236
237 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
238
239         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
240         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
241
242 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
243
244         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
245           implemented patch 1120823 Thanks to Willy De la Court (normal
246           interrupts need an interrupt number now if they are made critical),
247           and enabled nesting of critical functions though not for gbz80
248           (genCritical, genEndCritical): added functions
249           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
250         * src/z80/mappings.i: added "ei" to all mappings
251
252 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
253
254         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
255         submitted by the Debian SDCC maintainer Aurelien Jarno:
256         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
257         archive with gcc 4.1 on mips and wrote the patch"
258
259 2006-03-16 Raphael Neider <rneider AT web.de>
260
261         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
262           the left operand is shorter than the result (c* = lit-c* + int),
263           fixes bug #1450796
264         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
265           OP_SYMBOL
266
267 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
268
269         * src/.version: increased version number to 2.5.5
270         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
271         linking is done manually in pic16 port's _linkEdit,
272         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
273         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
274         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
275         allocate asmop as AOP_ACC,
276         (aopForRemat): added parameter 'bool result' in function declaration,
277         (pic16_aopGet): return AOP_ACC when accessing WREG,
278         (pic16_popGetTempReg): minor modification,
279         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
280         'pic16_allocWithIdx',
281         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
282         calling function in absolute addresses,
283         (genAssign): take into account AOP_ACC asmop,
284         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
285         * src/pic16/pcoderegs.c: some debug functions and lines added,
286         * src/pic16/ralloc.c (decodeRegType): added but commented out,
287         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
288         register too,
289         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
290         call to allocReg, not by manually allocating a new one,
291         (pic16_assignRegisters): now before going through the register
292         allocating functions mark all registers as free. This eliminates some
293         side effects resulting from peephole parser done earlier in the backbone
294
295 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
296
297         * src/SDCCicode.c (geniCodeLogic),
298         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
299
300 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
301
302         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
303           (genSend): bugfix, do not allocate and free twice,
304           (shiftRLong): handle partially overlapping aops
305         * support/regression/tests/bitopcse.c: fixed warning redefined idata
306
307 2006-03-08 Borut Razem <borut.razem AT siol.net>
308
309         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
310           for pic16
311
312 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
313
314         * support/regression/tests/bug1409955.c: new, added
315         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
316         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
317           (aopForSym, aopOp): increment asmop.allocated if reused,
318           (freeAsmop): decrement asmop.allocated and check for zero instead of
319           using asmop.freed,
320           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
321           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
322            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
323            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
324            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
325            genSignedRightShift, genRightShift, genDataPointerGet,
326            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
327            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
328             in reverse order from allocation,
329           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
330             added swappedLR to keep track
331         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
332           pdata & code for GCC, z80, gbz80 & hc08
333         * support/regression/tests/zeropad.c: moved defines to testfwk.h
334
335 2006-03-08 Raphael Neider <rneider AT web.de>
336
337         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
338
339 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
340
341         * device/include/mcs51/c8051f410.h: new SiLabs mcu
342         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
343         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
344
345 2006-03-06 Borut Razem <borut.razem AT siol.net>
346
347         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
348           made the linker quiet
349
350 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
351
352         * src/pic16/gen.c (genPcall): fixed bug #1443644
353         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
354         which dumps before the function entry point a data byte which represents
355         the number of the local variables used by the specified function, added
356         'xinst' for initial support for Extended Instruction Support,
357         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
358         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
359         port->fun_prefix anymore (may change later),
360         (genFunction, genEndFunction): do not store/restore local registers for
361         _main (this should take care the --main-return command line option in
362         the future),
363         (genOr): removed some legacy pic-port instructions,
364         * src/pic16/genarith.c (genAddLit): re-enabled old code because
365         performing operations with SFR's causes data to be written more than
366         once to each SFR. Perhaps SFRs should be handled in special cases...
367         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
368         pcode.h
369         * src/pic16/main.c (_process_pragma): stack bound checking did not take
370         into account for stack starting position,
371         (struct OPTIONS pic16_optionsTable): added command line argument
372         --extended or -y for Extended Instruction Support,
373         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
374         (deassignLRs): *** perhaps the most important change, old 'for' code
375         (commented out for reference), didn't account for some registers which
376         were left marked 'not free' after a pointer operation. The change
377         reduces register usage a lot in some cases
378
379 2006-03-04 Borut Razem <borut.razem AT siol.net>
380
381         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
382           _clean
383         * support/regression/tests/bug-524697.c: decreased array size for
384           mcs51 to fit into the internal RAM
385         * support/regression/Makefile.in: a little bit more verbose
386
387 2006-03-03 Borut Razem <borut.razem AT siol.net>
388
389         * support/regression/fwk/lib/testfwk.c,
390           support/regression/fwk/include/testfwk.h: introduced function
391           _prints(), nonrecursive _printn(), call _initEmu() from main()
392         * support/regression/ports/gbz80/support.asm,
393           support/regression/ports/ucz80/support.asm,
394           support/regression/ports/z80/support.asm,
395           support/regression/ports/ds390/support.c,
396           support/regression/ports/hc08/support.c,
397           support/regression/ports/host/support.c,
398           support/regression/ports/mcs51/support.c,
399           support/regression/ports/xa51/support.c: added empty _initEmu()
400           function
401         * support/regression/ports/pic16/gpsim.cmd,
402           support/regression/ports/pic16/spec.mk,
403           support/regression/ports/pic16/support.c,
404           support/regression/Makefile.in: added pic16 regression test
405
406 2006-03-01 Raphael Neider <rneider AT web.de>
407
408         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
409           genConstPointerGet): use safe way of generating MOVFF to cover
410             literals as well as registers, fixes bug #1440527
411         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
412             dereference
413           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
414             more correctly, fixes bug #1232186
415           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
416         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
417             gplink guess the correct processor in more cases, applied patch
418             from Till Riedel attached to and fixing bug #1436552
419
420 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
421
422         * support/regression/tests/array.c: added, contains check for #1434401
423         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
424
425 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
426
427         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
428         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
429         * device/include/mcs51/c8051f326.h,
430         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
431         * device/include/mcs51/c8051f000.h,
432         * device/include/mcs51/c8051f018.h,
433         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
434           PCON_IDLE,PCON_STOP and added sfr16 definitions
435
436 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
437
438         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
439           genGetWord): fixed bug 1409955
440
441 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
442
443         * device/include/hc08/mc68hc908gp32.h,
444         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
445
446 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
447
448         * src/SDCCast.c (constExprValue): return NULL if not a value
449         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
450         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
451         * support/regression/tests/bitfields.c: enabled signed bitfield for all
452
453 2006-02-13 Borut Razem <borut.razem AT siol.net>
454
455         * src/regression/ptrarg.c: added, fails due to bug #1430967
456         * src/regression/Makefile: ptrarg.c added, ...
457
458 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
459
460         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
461         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
462
463 2006-02-11 Borut Razem <borut.razem AT siol.net>
464
465         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
466           print "Processor: xxx" message to stdout only if --verbose
467
468 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
469
470         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
471         * support/regression/tests/bug1426356.c: added
472         * support/regression/tests/bitfields.c: removed 2 tests
473
474 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
475
476         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
477         * device/include/mcs51/c8051f330.h,
478         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
479           PCON_IDLE,PCON_STOP and added sfr16 definitions
480         * device/lib/_divsint.c,
481         * device/lib/_divuint.c,
482         * device/lib/_divulong.c,
483         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
484           register bank bug for small stackauto
485
486 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
487
488         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
489
490 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
491
492         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
493         * all.dsp: corrected several bin paths
494         * device/include/mcs51/c8051f120.h,
495         * device/include/mcs51/c8051f300.h,
496         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
497           to PCON_IDLE,PCON_STOP
498         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
499         * device/lib/printf_large.c (output_float): fixed bug 1388703
500         * support/regression/tests/bug1057979.c: added test for bug 1388703
501
502 2006-02-08 Raphael Neider <rneider AT web.de>
503
504         * src/pic/pcode.c (pciTRIS): fixed typo,
505           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
506           (LinkFlow): fixed handling of flows that end in a call,
507           (ReuseReg): perform safety check earlier
508         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
509             to work with flows at the beginning of a pBlock,
510             fixes #1426557 (Symbol not previously defined),
511           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
512             usage information
513           (RemoveUnusedRegisters): update register usage info
514         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
515             created, reuse existing ones instead
516         * src/pic/gen.c (genPcall): fixed #1424719
517
518 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
519
520         * link/z80/lkmain.c,
521         * link/z80/lklex.c,
522         * link/z80/lkdata.c,
523         * link/z80/aslink.h: fixed build on current cygwin:
524         replaced getline() by lk_getline()
525
526 2006-02-01 Borut Razem <borut.razem AT siol.net>
527
528         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
529           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
530           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
531           src/regression/bool1.c, src/regression/bool2.c,
532           src/regression/bool3.c, src/regression/call1.c,
533           src/regression/compare.c, src/regression/compare10.c,
534           src/regression/compare2.c, src/regression/compare3.c,
535           src/regression/compare4.c, src/regression/compare5.c,
536           src/regression/compare6.c, src/regression/compare7.c,
537           src/regression/compare8.c, src/regression/compare9.c,
538           src/regression/configword.c, src/regression/for.c,
539           src/regression/inline.c, src/regression/mult1.c,
540           src/regression/nestfor.c, src/regression/or1.c,
541           src/regression/pointer1.c, src/regression/ptrfunc.c,
542           src/regression/rotate1.c, src/regression/rotate2.c,
543           src/regression/rotate3.c, src/regression/rotate4.c,
544           src/regression/rotate5.c, src/regression/rotate6.c,
545           src/regression/rotate7.c, src/regression/string1.c,
546           src/regression/struct1.c, src/regression/sub.c,
547           src/regression/sub2.c, src/regression/switch1.c,
548           src/regression/while.c, src/regression/xor.c,
549           src/regression/create_stc, src/regression/simulate,
550           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
551           regression tests
552         * src/regression/gpsim_assert.h: added
553
554 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
555
556         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
557         ((void (code *) (void)) 0) ();
558         * as/hc08/aslex.c,
559         * as/hc08/aslink.h,
560         * as/hc08/asm.h,
561         * as/hc08/asmain.c,
562         * as/hc08/lkdata.c,
563         * as/hc08/lklex.c,
564         * as/hc08/lkmain.c,
565         * as/mcs51/aslex.c,
566         * as/mcs51/aslink.h,
567         * as/mcs51/asm.h,
568         * as/mcs51/asmain.c,
569         * as/mcs51/lkdata.c,
570         * as/mcs51/lklex.c,
571         * as/mcs51/lkmain.c,
572         * as/z80/aslex.c,
573         * as/z80/asm.h,
574         * as/z80/asmain.c: fixed build on current cygwin:
575         replaced getline() by as_getline()
576
577 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
578
579         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
580         declarator in the symbol chain
581         * src/SDCCsymt.h,
582         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
583         parameter list for function pointers
584         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
585         * support/regression/tests/bug-716242.c: added
586
587 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
588
589         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
590         offset if possible
591         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
592
593 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
594
595         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
596         inifinitely recurseable, added static
597         * support/regression/tests/bug-1408066.c: added
598
599 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
600
601         * src/SDCCicode.h,
602         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
603         renamed, added possibility to create "postLoopLbl"-labels
604         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
605         newiTempLoopHeaderLabel
606         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
607         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
608         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
609         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
610         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
611         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
612         (basicInduction): fixed bug #136564, made static,
613         (loopInduction): changed parameter of basicInduction, made static,
614         (addPostLoopBlock): added
615         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
616         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
617         findLoopEndSeq
618         * support/regression/tests/bug-136564.c: added
619         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
620         --std-sdcc99 to LIBSDCCFLAGS
621
622 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
623
624         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
625         while loop
626         * support/regression/tests/bug-1406131.c: added
627
628 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
629
630         * src/SDCCast.c (decorateType): fix promotion of unary minus
631         * src/SDCCsymt.c (computeType): beautified
632         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
633         (valUnaryPM, valComplement): fix sign and promotion,
634         (valNot): ANSI: result type is int (SDCC: unsigned char)
635         * support/regression/tests/uminus.c: speedup by removing superflous
636         test case 'int'
637         * support/regression/tests/onebyte.c: added promotion and signedness
638         tests for unary minus
639         * support/regressions/tests/bug-477927.c: disable warning about
640         uninitialized variables
641         * support/regression/tests/not.c: added
642
643 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
644
645         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
646         * src/mcs51/gen.c (gen51Code): show final register usage after
647         fillGaps in asm with --i-code-in-asm
648         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
649         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
650         incUsed, rliveClear, adjustIChain): made static,
651         (setFromRange): excluded because it's unused,
652         (findPrevUseSym, markWholeLoop): added,
653         (findPrevUse): rewritten; fixes bug 895992; now a complete search
654         through all branches of predecessors enables sdcc to emit the warning
655         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
656         (rlivePoint): made static, added parameter emitWarnings which is only
657         true during the first run out of two,
658         (findRecursiveSucc, findRecursivePred): removed,
659         (computeLiveRanges): made static, added parameter emitWarnings,
660         (dumpIcRlive): added for debugging only
661         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
662         removed prototype of setFromRange()
663         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
664         in call of computeLiveRanges()
665         * support/regression/tests/bug-895992.c: added
666         * support/regression/tests/bug-971834.c: added
667         * support/valdiag/tests/bug-895992.c: added
668         * support/valdiag/tests/bug-971834.c: added
669
670 2005-12-18 Raphael Neider <rneider AT web.de>
671
672         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
673           (genUnpackBits): improved code for direct operands,
674           (genPackBits): improved code for literal assignment to bitfields
675             and for direct destination operands (no FSR indirection),
676             prevented redundant AND, fixes #1362800,
677           (AccLsh): added parameter to disable masking of the result
678         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
679           skip instructions with side-effects (like incfsz),
680           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
681         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
682         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
683           fixes #1375263
684
685 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
686
687         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
688         volatile variables as spill location
689
690 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
691
692         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
693         replacing literals
694         * support/regression/tests/bug-1376320.c: added
695
696 2005-12-08 Raphael Neider <rneider AT web.de>
697
698         * src/pic/device.c: renamed is_shared to pic14_is_shared
699         * src/pic/gen.c (genIfx): re-enabled handling of sbits
700         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
701           (is_valid_identifier): added for above workaround
702
703 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
704
705         * device/lib/Makefile.in: fixed to enable port-specific-objects
706         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
707           char, thanks Hubert Sack
708         * doc/sdccman.lyx: documented --xstack-loc,
709           elaborated a bit more on interrupts and pitfalls,
710           removed "setjmp/longjmp unsupported",
711           documented some unsupported C99 features
712         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
713         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
714           if, thanks Hubert Sack
715         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
716         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
717           make make_library
718         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
719           regression tests can report resource usage (rfe 700441)
720         * support/regression/collate-results.py: report resource usage
721         * support/regression/ports/ds390/spec.mk,
722         * support/regression/ports/hc08/spec.mk,
723         * support/regression/ports/mcs51/spec.mk,
724         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
725         * support/regression/ports/ds390/uCsim.cmd,
726         * support/regression/ports/hc08/uCsim.cmd,
727         * support/regression/ports/mcs51/uCsim.cmd,
728         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
729         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
730           library, use the default one
731         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
732           building the library
733
734 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
735
736         * config.dsp: added dependency on .version and configure_vc.awk
737         * device/include/setjmp.h: updated for --stack-auto and --xstack
738         * device/include/mcs51/at89c51snd1c.h: corrected line endings
739         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
740         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
741         * device/lib/libsdcc.lib: added _setjmp
742         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
743           (decorateType): fixed bug 1372851,
744           (optimizeGetHbit): fixed warning
745         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
746           array initialisation
747         * support/regression/tests/bug1057979.c: added test for bug 1358192
748         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
749
750 2005-12-03 Borut Razem <borut.razem AT siol.net>
751
752         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
753           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
754
755 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
756
757         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
758         createIval): implement symbol independant "flexible array member",
759         (createIvalCharPtr): implemented flexible array initialisation with a
760         string
761         * src/SDCCsymt.c (copyStruct): removed,
762         (getSize): fixed misleading comment,
763         (getAllocSize): removed, the additional allocation size is now in
764         sym->flexArrayLength,
765         (checkStructFlexArray): new, syntax checks for flexible array members,
766         (compStructSize): added syntax checks for "flexible array members"
767         (copyStruct): removed,
768         (copyLinkChain): removed inefficient fix for bug 770487
769         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
770         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
771         symbol->flexArrayLength
772         * src/SDCCerr.c,
773         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
774         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
775         * support/regression/tests/structflexarray.c: added
776         * support/valdiag/tests/structflexiblearray.c: added
777
778 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
779
780         * src/SDCCast.c (decorateType): fixed bug 1368489
781         * support/Util/SDCCerr.c,
782         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
783
784 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
785
786         * device/include/mcs51/at89c51snd1c.h: added file submitted by
787           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
788
789 2005-11-27 Borut Razem <borut.razem AT siol.net>
790
791         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
792           support/cpp2/mkdeps.h: added command line option
793           -obj-ext=<extension> to SDCPP to define object file externion, used
794           for generation of make dependencies (-M)
795         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
796
797 2005-11-26 Borut Razem <borut.razem AT siol.net>
798
799         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
800           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
801           added pic and pic16 libraries
802
803 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
804
805         * device/include/float.h: Corrected typo in prototype of __fsgt
806
807 2005-11-25 Borut Razem <borut.razem AT siol.net>
808
809         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
810           added creation of model-mcs51-stack-auto libraries
811
812 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
813
814         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
815         and fields-list too
816         * src/SDCCast.c (createIvalArray): removed obsolete comment
817
818 2005-11-24 Borut Razem <borut.razem AT siol.net>
819
820         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
821           added missing device/lib/mcs51/crt*.asm sources
822
823 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
824
825         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
826
827 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
828
829         * device/lib/_fs2schar.c,
830         * device/lib/_fs2sint.c,
831         * device/lib/_fs2slong.c: optimized inline asm
832
833 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
834
835         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
836           Better handling of floats between -1.0 and 0.0.
837
838 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
839
840         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
841           (the missing "if"s prohibited removal of redundant labels)
842
843 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
844
845         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
846           Properly convert floats between -1.0 and 0.0 to long, int, and char
847           types (max integer value of negative floats tends to zero).
848         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
849           Removed changes made so to work properly with floats between
850           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
851           and _fs2char.c
852
853 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
854
855         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
856         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
857         (genCast) cosmetic change
858         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
859         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
860         from mcs51
861         * support/regression/tests/bitfields (testSignedBitfields): added
862
863 2005-11-18 Borut Razem <borut.razem AT siol.net>
864
865         * sdcc/device/lib/Makefile.in: remove all unnecessary files
866         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
867           introduced SILENT option to make building of pic16 libraries less
868
869 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
870
871         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
872           Now they work properly with floats between -1.0 and 0.0
873         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
874
875 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
876
877         * src/SDCCicode.c (printOperand): added missing else
878
879 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
880
881         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
882         reformatted for better readability
883         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
884         signed bitfields
885
886 2005-11-17 Borut Razem <borut.razem AT siol.net>
887
888         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
889           introduced SILENT option to make building of pic16 libraries less
890           verbose - used for nightly snapshot build
891         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
892           available on Win32 platforms.
893         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
894           medium, large, pic and pic16
895
896 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
897
898         * device/lib/printf_large.c: Temporary patch for bug 1358192:
899           printf("%f"...) sets fraction to zero.
900
901 2005-11-16 Raphael Neider <rneider AT web.de>
902
903         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
904           fixes #1357221
905         * src/pic/gen.c (genIfx): implemented for CARRY bit
906         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
907           to generic pointers, fixes #1357332,
908           (pic16_movLit2f): NEW,
909           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
910
911 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
912
913         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
914
915 2005-11-11 Raphael Neider <rneider AT web.de>
916
917         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
918         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
919           compute pointer's type from operand,
920           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
921           improved single bit reads, fixes bug #1353379
922
923 2005-11-09 Borut Razem <borut.razem AT siol.net>
924
925         * support/scripts/sdcc.nsi: added lib/pic to the package
926
927 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
928
929         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
930
931 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
932
933         * support/regression/tests/bug1348008.c: added
934         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
935         * support/regression/tests/bug1337835.c: updated comment
936
937 2005-11-06 Borut Razem <borut.razem AT siol.net>
938
939         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
940           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
941           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
942           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
943           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
944           dynamic construction of cl_error_class and derivates - 2.nd try
945
946 2005-11-05 Borut Razem <borut.razem AT siol.net>
947
948         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
949           bug, which caused Bus Errors on sparc solaris
950
951 2005-11-04 Borut Razem <borut.razem AT siol.net>
952
953         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
954           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
955           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
956           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
957           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
958           and derivates to resolve the initialization problem on OSX
959
960 2005-11-02 Borut Razem <borut.razem AT siol.net>
961
962         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
963           corrected typo - #include <winsock2.h>
964
965 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
966
967         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
968           (_asxxxx_mapping): added org directive for future enhancements
969
970 2005-11-01 Borut Razem <borut.razem AT siol.net>
971
972         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
973           enabled sockets on WIN32
974         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
975
976 2005-10-31 Borut Razem <borut.razem AT siol.net>
977
978         * support/regression/generate-cases.py: escape backslashes in {testcase}:
979           WIN32 backslash path delimiters should be escaped when used in C strings
980         * support/regression/tests/bitfields.c: exclude failing assertions for
981           __CYGWIN32__ and __MINGW32__ hosts
982
983 2005-10-30 Borut Razem <borut.razem AT siol.net>
984
985         * src/SDCCutil.c: corrected double comparison typo
986
987 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
988
989         * device/lib/medium/Makefile: added for new memory model medium
990         * device/include/asm/mcs51/features.h: updated for medium/pdata
991         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
992           added Multiply & Accumulate sbit's and MAC0_PAGE define
993         * device/include/mcs51/c8051f300.h: added sfr16 definitions
994         * device/include/mcs51/c8051f310.h: added sfr16 definitions
995         * device/lib/_mullong.c: update for medium model
996         * device/lib/incl.mk: added medium model
997         * doc/sdccman.lyx: documented medium model
998         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
999         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1000         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1001         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1002           (allocParms): set SCLS and OCLS to pdata for medium model
1003         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1004           for pdata,
1005           (powof2): return <0 if not power of 2
1006         * src/avr/gen.c (genBitWise): use updated powof2
1007         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1008           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1009           (shiftLLeftOrResult): use B if necessary
1010         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1011         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1012         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1013         * support/regression/Makefile.in: added test-mcs51-medium
1014         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1015
1016 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1017
1018         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1019         specifier unsigned
1020         * device/lib/time.c (mktime): fixed bug 1334315
1021
1022 2005-10-28 Raphael Neider <rneider AT web.de>
1023
1024         * device/include/pic/p16f_common.inc: added common declarations
1025         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1026
1027 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1028
1029         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1030           (aopPutUsesAcc): added to predict accumulator use,
1031           (assignResultValue): save acc if necessary,
1032           (genMinusDec): store result if indirectly addressed,
1033           (genDivOneByte):  save acc if necessary,
1034           (movLeft2Result): bugfix if left already in acc,
1035           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1036             attention to accumulator use (esp. pdata),
1037           (genReceive): receive pdata correctly
1038         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1039         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1040
1041 2005-10-27 Raphael Neider <rneider AT web.de>
1042
1043         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1044
1045 2005-10-27 Raphael Neider <rneider AT web.de>
1046
1047         * .version: changed version to 2.5.4
1048         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1049         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1050           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1051             arithmetics support routines
1052         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1053         * device/lib/Makefile.in: also create installdir for pic
1054
1055         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1056           pic14 port as well
1057         * src/pic/device.c (dump_sfr): rewritten to delegate register
1058           placement to the linker (use `extern sym' rather than sym EQU addr),
1059           (validAddress): fixed to check last specified address
1060         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1061           (popGetLit): truncate literal value to 8 bit,
1062           (popGet): moved assert to more appropriate place
1063           (popGetExternal): create pCode operand from and mark the according
1064             symbol as being `extern'
1065           (popGetAddr): added sanity check on immediate's offset, provide
1066             GPOINTER tag on demand
1067           (aopPut): fixed for immediates,
1068           (mov2w_op): move operand's address or contents to WREG (depending on
1069             operand type), safer variant of mov2w,
1070           (movwf,call_libraryfunc): NEW, handy abbreviations,
1071           (get_argument_pcop,get_return_val_pcop,pass_argument,
1072           get_returnvalue): interface for accessing function parameters and
1073             return values,
1074           (assignResultValuei,genRet): use new parameter/return value interface
1075           (pic14_getDataSize): back to old version handling generic pointers,
1076           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1077             provided implementation and/or fixed old one,
1078           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1079             calls, removed legacy 8051 reference code
1080           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1081           (loadSignToC): NEW, move the operands sign bit to CARRY,
1082           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1083             genRightShiftSigned, accepts negative shift counts,
1084           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1085           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1086             generic pointers, __data pointers and __code pointers,
1087           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1088             and signed bitfields, limit bitfields to 8 bit,
1089           (genDataPointerGet): fixed number of bytes read,
1090           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1091           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1092             pointers to constant data are no longer assumed to point to __code
1093             space, removed invalid pointer types,
1094           (bitpatternFromVal): retrieve the PICs representation of an integer
1095             or float literal,
1096           (genDataPointerSet): fixed assigning to po_immediate operands,
1097           (genGenPointerSet): implemented as library call,
1098           (genIfx): fixed incorrect condition,
1099           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1100             provide GPOINTER tag according to destination's storage class,
1101           (genCast): added code to handle casting to generic pointers, added
1102             sign-/zero extension of the result
1103           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1104         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1105         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1106           extend the result
1107         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1108           address/register resides in the shared banks
1109           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1110             put all variables into separate sections (have the linker arrange
1111             them)
1112           (picglue): put init code and interrupt handlers in separate sections
1113         * src/pic/main.c: added port specific options table, modified to PORT
1114           structure to make GPOINTERs 3 byte, added pic14_options
1115           (_pic14_do_link): private linking routine (update paths to libraries,
1116             add libsdcc.lib by default)
1117         * src/pic/main.h: declare pic14_options
1118         * src/pic/pcode.c: fixed instructions i/o relations,
1119           (RegCond): reverted to correct version,
1120           (newpCodeOpLit): truncate literals to 8 bit,
1121           (genericPrint): added debug output,
1122           (getRegFromInstruction): fixed for various operand types, simplified
1123           (BuildFlow): fixed broken handling of isntructions with labels
1124           (LinkFlow): start at last instruction in flow (skip trailing comments),
1125             pass the flow on to the next instruction after CALL
1126           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1127           (insertPCodeInstruction): fixed inserting after a skip instruction,
1128           (DoBankSelect): fixed for labeled instructions
1129           (OptimizepBlock): honor --nopeep switch
1130           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1131         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1132         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1133           (pCodeOptime2pCodes): allow disabling this optimization via
1134             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1135             but is still buggy), started implementation of a dataflow based
1136             pCode optimization (CSE + dead code elimination)
1137           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1138         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1139           names are independant of the stack location and therefore portable across
1140           devices
1141
1142 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1143
1144         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1145           (selectSpil): fixed bug 1337835 by not spilling bit variables
1146         * support/regression/tests/bug1337835.c: added test for this bug
1147         * src/mcs51/peeph.def: restart after rule 3.c,
1148           addded rules 263.x to optimize loading constants
1149
1150 2005-10-26 Raphael Neider <rneider AT web.de>
1151
1152         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1153         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1154           (genAssign): emit warning when casting literals to generic pointer
1155             type, also applies when taking the address of a fixed variable,
1156           (genCast): improved casting to generic pointers
1157         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1158           extern variables, added verbose error message
1159         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1160
1161 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1162
1163         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1164         carry must be complemented too
1165         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1166         could be emitted by genMinus
1167         * src/SDCCval.c (constVal): fixed bug 1305065
1168
1169 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1170
1171         * src/SDCCast.c (addCast): added promotion for bit variables
1172         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1173         promotion casts + optimisation
1174         (optimizeGetWord): fix warning 'i' might be used uninitialized
1175         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1176         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1177
1178 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1179
1180         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1181         all chars are promoted to int; promotion should be handled in SDCCast.c
1182
1183 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1184
1185         * device/lib/_strcmp.c: Fixed bug 1326457
1186
1187 2005-10-11 Raphael Neider <rneider AT web.de>
1188
1189         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1190         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1191
1192 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1193
1194         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1195         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1196
1197 2005-10-04 Raphael Neider <rneider AT web.de>
1198
1199         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1200           device/lib/pic16/pics.all: added pic18f1320
1201         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1202
1203 2005-09-30 Raphael Neider <rneider AT web.de>
1204
1205         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1206         * src/pic16/devices.inc: NEW, provides device descriptions
1207         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1208
1209 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1210
1211         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1212           GETHBIT
1213
1214 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1215
1216         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1217           documented Any Order Bit, Higher Order Byte and Higher Order Word
1218         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1219         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1220           (optimizeGetAbit): new, to get any bit, not only the high bit,
1221           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1222           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1223           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1224           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1225             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1226             GETABIT, GETBYTE, GETWORD: decorate them,
1227           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1228           (ast_print): added GETABIT, GETBYTE, GETWORD
1229         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1230         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1231           (geniCodeBinary): new generic binary icode,
1232           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1233         * src/port.h: updated comment for PORT.hasExtBitOp
1234         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1235           (genGetByte): new, to get a single byte,
1236           (genGetWord): new, to get a word from a long,
1237           (gen51Code): added GETABIT, GETBYTE, GETWORD
1238         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1239
1240 2005-09-23 Raphael Neider <rneider AT web.de>
1241
1242         * configure.in, configure: have device/lib/pic configured
1243         * device/lib/Makefile.in: added model-pic14
1244         * device/lib/clean.mk: added pic/ to clean rule
1245         * device/lib/pic: added rudimentary pic14 library providing support
1246           functions for multiplication/division/generic pointer access
1247         * src/SDCCopt.c (convilong): mark support functions as extern
1248           for pic14 port as well
1249         * src/pic/gen.c (genMult): added assertions,
1250           (genpic14Code): emit warning on unhandled iCodes
1251         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1252         * src/pic/pcode.c (pCodeOpCopy),
1253         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1254           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1255           SFR_REGISTER}), made safe for future extensions
1256         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1257           instructions even if preceeded by SKIP instructions (also remove
1258           them); removed unused code
1259         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1260           prevents leaving parts of the structure uninitialized after copying
1261
1262 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1263
1264         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1265           ago by me
1266         * support/regression/tests/addsub.c: added test for the bug
1267
1268 2005-09-21 Raphael Neider <rneider AT web.de>
1269
1270         * device/include/pic16/pic18f1220.h,
1271           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1272         * device/lib/pic16/Makefile.rules: added missing opening paren
1273         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1274           are provided in genutils.c,
1275           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1276           operand/result sizes,
1277           (genCmp): assert on NULL pointers first, then check deref'ed values
1278         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1279           result size
1280
1281 2005-09-18 Raphael Neider <rneider AT web.de>
1282
1283         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1284           as these are now unused,
1285           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1286         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1287           local, avoids uninitialized pointer dereference on r->name
1288         * src/pic16/ralloc.c (newReg): fixed indentation
1289
1290 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1291
1292         * src/SDCCval.c (constVal): fixed bug 730366
1293         * support/Util/SDCCerr.c,
1294         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1295
1296 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1297
1298         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1299
1300 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1301
1302         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1303
1304 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1305
1306         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1307           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1308         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1309           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1310         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1311         * packihx/packihx.c (hexDigit): made c unsigned char
1312         * as/mcs51/lklibr.c (fndsym),
1313         * link/z80/lkgb.c (gb),
1314         * link/z80/lklibr.c (fndsym),
1315         * link/z80/lkrloc.c (relr),
1316         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1317         * src/SDCC.lex (checkCurrFile, process_pragma),
1318         * src/SDCCglue.c (spacesToUnderscores),
1319         * src/SDCCmain.c (setParseWithComma, processFile),
1320         * src/asm.c (tvsprintf, printCLine),
1321         * src/avr/gen.c (emitcode, aopPut),
1322         * src/ds390/gen.c (emitcode),
1323         * src/hc08/gen.c (emitcode, emitinline),
1324         * src/mcs51/gen.c (emitcode, genInline),
1325         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1326           tokenizeLineNode),
1327         * src/pic/ralloc.c (debugLog),
1328         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1329           tokenizeLineNode),
1330         * src/pic16/ralloc.c (debugLog),
1331         * src/z80/main.c (_process_pragma):
1332            made all ctype.h function calls safe
1333         * src/SDCCopt.c: include math.h for fabs
1334         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1335           and used them throughout the code to make ctype.h function calls safe
1336         * src/ds390/main.c (asmLineNodeFromLineNode),
1337         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1338         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1339            unsigned char*
1340         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1341           (newpCodeAsmDir): made ctype.h function calls safe
1342         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1343           pic16_emitcode):  made lbp unsigned char*
1344         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1345           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1346         * src/xa51/gen.c (emitcode),
1347         * src/z80/gen.c (_emit2): made lbp unsigned char*
1348         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1349            char*
1350
1351 2005-09-05 Raphael Neider <rneider AT web.de>
1352
1353         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1354           access bank splitpoint
1355
1356 2005-09-05 Raphael Neider <rneider AT web.de>
1357
1358         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1359
1360 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1361
1362         * .version: changed to version 2.5.3
1363         * doc/sdccman.lyx: changed version to 2.5.3,
1364           documented --codeseg and --constseg and pragma codeseg and constseg,
1365           documented bit parameters (reentrant) and bit returning
1366         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1367            currFunc->recvSize, but is this ok for all ports?
1368           (ast2iCode): result of ~ on unsigned char must be cast to int for
1369            bool to work
1370         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1371           function pointers in bit space
1372         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1373           (processFuncArgs): call port.reg_parm() with reentrancy info
1374         * src/port.h,
1375         * src/avr/main.c,
1376         * src/ds390/main.c,
1377         * src/hc08/main.c,
1378         * src/pic/main.c,
1379         * src/pic16/main.c,
1380         * src/xa51/main.c,
1381         * src/z80/main.c: port.reg_parm prototype extended with
1382           "bool reentrant" parameter
1383         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1384           options.stackAuto for allocating bit register parameters
1385         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1386           (genSend): set BitBankUsed if it is,
1387           (selectRegBank): factored out of genCall for use in genPcall,
1388           (genCall): removed redundant dtype assignmen, use selectRegBank,
1389           (genPcall): handle returning in Carry properly, save in F0 if needed,
1390           (genReceive): handle bit register parameters
1391         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1392           (mcs51_assignRegisters): enable bit registers for all reentrant
1393            functions and don't set BitBankUsed unconditionally
1394         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1395         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1396         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1397
1398 2005-08-27 Borut Razem <borut.razem AT siol.net>
1399
1400         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1401         ppc-osx (Darwin) does not support -u option. It seems that it is
1402         supported only on Linux - GNU cp
1403
1404 2005-08-25 Borut Razem <borut.razem AT siol.net>
1405
1406         * sim/ucsim/gui.src/serio.src/Makefile.in,
1407           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1408           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1409           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1410           install and strip, since the strip at /usr/ccs/bin should be used
1411           on solaris
1412
1413 2005-08-24 Borut Razem <borut.razem AT siol.net>
1414
1415         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1416
1417 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1418
1419         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1420         ffffffffu
1421
1422 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1423
1424         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1425         * as/mcs51/lkmain.c (link_main): fixed warning
1426         * device/include/stdbool.h: ds390 has no advanced bit support yet
1427         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1428         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1429         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1430           and updated their macros
1431         * src/SDCCval.c (constVal): updated comment for renamed b_long
1432
1433 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1434
1435         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1436         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1437           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1438           (oprio): set priority for '['
1439         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1440            and adb_24_bit
1441         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1442         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1443         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1444         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1445           added overlayable BIT_BANK area
1446         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1447           (summary2): explain 'T' in legenda
1448         * as/mcs51/lkrloc.c: replaced old K&R style,
1449           (relr): added R_BIT processing,
1450           (errmsg): added "Bit-addressable relocation error",
1451           (adb_bit): added for converting from byte- to bit-addressable space,
1452           (adb_24_bit): added for converting from byte- to bit-addressable space
1453         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1454            used in reentrant functions now even as return value
1455         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1456         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1457           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1458         * src/SDCCglobl.h: added indicator BitBankUsed
1459         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1460            the bit registers b0-b7
1461         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1462           (geniCodeCast): fixed bug 1263853,
1463           (geniCodeLogicAndOr): put result in bool or char,
1464           (geniCodeReceive): added parameter func for accessing the return type,
1465           (geniCodeFunctionBody): pass func to geniCodeReceive
1466         * src/SDCCmain.c: added indicator BitBankUsed
1467         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1468         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1469           (checkSClass): don't put automatic bool/bit on stack,
1470           (checkFunction): removed check on function cannot return bit
1471         * src/SDCCsymt.h: added newBoolLink prototype
1472         * src/mcs51/gen.c (rb1regs): added bit registers,
1473           (movc): created for assigning to carry,
1474           (pushReg, popReg): created for pushing registers,
1475           (sameRegs): check both AOP_REG and AOP_CRY types,
1476           (aopOp): handle bit registers,
1477           (aopPut): optimization no self-assign,
1478           (saveRegisters): push reg->base (bits) only once for bit registers,
1479            and use pushReg,
1480           (unsaveRegisters): pop reg->base only once and use popReg,
1481           (assignResultValue): added parameter func and return in carry for bits,
1482           (genIpush): optimization no reload in A if not changed,
1483           (genSend): bit parameters in reentrant functions are passed in bit
1484            registers by first assigning to bits in B, then save registers and
1485            copy B to bits,
1486           (genCall): handle returning in Carry properly, save it in F0 if needed,
1487           (genPcall): updated assignResultValue call, this is not safe yet for bit
1488            returning function !!!
1489           (genFunction): don't generate equ's for bit registers and use pushReg,
1490           (genEndFunction): take care of bit returning functions and use popReg,
1491           (genRet): return bit in Carry,
1492           (genIfx): optimize bit registers and other directly addressable bits,
1493           (genReceive): updated assignResultValue call
1494         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1495           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1496            registers when using stack-auto
1497         * src/mcs51/ralloc.c (_G): added allBitregs,
1498           (regs8051): added the bit registers,
1499           (createStackSpil): use macro IS_BIT,
1500           (getRegBit): added to allocate a bit register, else spill,
1501           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1502           (updateRegUsage): factored out to ease stepping while debugging,
1503           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1504            also allocate bit registers,
1505           (fillGaps): handle bit registers,
1506           (findAllBitregs): added to create bit vector with all bit registers,
1507           (mcs51_allBitregs): returns this bit vector,
1508           (mcs51_assignRegisters): when using stack-auto use bit registers for
1509            passing parameters and creating local variables
1510         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1511
1512 2005-08-22 Borut Razem <borut.razem AT siol.net>
1513
1514         * device/lib/Makefile.in: replaced find option -or with -o
1515           to make it run on solaris
1516
1517 2005-08-22 Raphael Neider <rneider AT web.de>
1518
1519         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1520           fixes #1265442 (crash on Solaris)
1521
1522 2005-08-20 Borut Razem <borut.razem AT siol.net>
1523
1524         * configure, configure.in: added tests for libsocket and libnsl libraries,
1525           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1526           from support/regression/Makefile.in
1527         * support/regression/Makefile.in: added
1528         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1529         * sim/ucsim/libtool: regenerated on sparc-solaris
1530         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1531           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1532           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1533           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1534           sparc-solaris, which doesn't use GNU ld linker
1535         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1536         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1537
1538 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1539
1540         * src/mcs51/peeph.def: updated comments
1541
1542 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1543
1544         * device/lib/_gptrget.c,
1545         * device/lib/_gptrput.c: slightly shorter
1546         * doc/sdccman.lyx: incremented version
1547         * src/mcs51/peeph.def: moved peephole comments to the line of first
1548           change to better keep line correlation, reanimated 186.e
1549         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1550
1551 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1552
1553         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1554           David Saxton with quotes around file name.
1555
1556 2005-08-15 Borut Razem <borut.razem AT siol.net>
1557
1558         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1559           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1560           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1561           make tests run on x86_64 platform
1562
1563 2005-08-13 Raphael Neider <rneider AT web.de>
1564
1565         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1566           as it might be executed DURING a build (parallel make is wonderful)
1567
1568 2005-08-13 Raphael Neider <rneider AT web.de>
1569
1570         * device/lib/Makefile.in (port-specific-objects-pic16):
1571           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1572         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1573           dependency
1574         * device/lib/pic16/Makefile.rules: build subdirs before creating
1575           the library, removed builddir rule, create $(builddir) early in
1576           recurse rule, use empty recurse rule for leaf directories
1577         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1578           mkdir errors (race condition), removed duplicate suffix "hex"
1579           from clean rules
1580         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1581         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1582           prevents mkdir -p from aborting on Alpha
1583
1584 2005-08-12 Raphael Neider <rneider AT web.de>
1585
1586         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1587           db-statements in order to allow for arrays of pointers in code
1588           sections to be placed without interspersed 0-padding, fixes
1589           bug #1256215
1590         * (emitStatistics): fixed division by zero for pic18f1220
1591         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1592           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1593         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1594         * (pic16_pCodeConstString): keep track of already emitted string
1595           literals to prevent "duplicate definitions of symbol _str_NR"
1596         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1597           debug message
1598         * device/lib/Makefile.in: ignore failing PIC16 library builds
1599         * device/lib/pic16/Makefile: do not build if gputils are missing
1600         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1601
1602 2005-08-10 Raphael Neider <rneider AT web.de>
1603
1604         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1605           my last commit)
1606
1607 2005-08-10 Raphael Neider <rneider AT web.de>
1608
1609         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1610           Rokas' patch to add the new fixed point type "__fixed16x16"
1611         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1612           functions for __fixed16x16 arithmetics
1613         * device/lib/pic16: reimplemented the build system to support
1614           a separate build directory, better handling of libio (create
1615           the library in a separate subdir for each architecture) and
1616           easier configuration (centralized in Makefile.common)
1617
1618 2005-08-07 Raphael Neider <rneider AT web.de>
1619
1620         * src/pic16/gen.c (genrshTwo): fixed sign extension
1621         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1622         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1623           added T0CONbits
1624         * device/include/pic16/pic18f4220.h: NEW, header for
1625           pic18f4220 and pic18f4320
1626         * device/include/pic16/pic18fregs.h: added new devices,
1627           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1628         * device/include/pic16/signal.h: resolved name clashes
1629           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1630           to also allow testing for interrupt enable bits, added
1631           comments on how to use the macros
1632         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1633         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1634           register definitions for the devices
1635         * device/lib/pic16/pics.all: added new devices
1636         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1637           allocated memory
1638         * device/lib/pic16/libc/stdlib/memfree: do not count
1639           the block header as free memory
1640         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1641           simplified and added missing end-of-blocklist-marker
1642           (reported by Peter Onion, fixes #1252814)
1643         * (_mergeHeapBlock): fixed loop condition
1644         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1645           len==0, restructured code
1646         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1647           up a bit, reduced bitfield accesses, prevent endless loops
1648           in case of heap corruption
1649         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1650           "unreferenced arguments/must return a value" warnings
1651         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1652           replaced BAUDREG with SPBRG
1653         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1654           device/lib/pic16/debug/gstack/gstack.c: replaced
1655           _naked, _asm, _endasm with __naked, __asm, __endasm
1656
1657 2005-08-05 Raphael Neider <rneider AT web.de>
1658
1659         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1660           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1661
1662 2005-08-05 Borut Razem <borut.razem AT siol.net>
1663
1664         * device/lib/Makefile.in: added missing ';'
1665         * configure: removed ^M characters
1666
1667 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1668
1669         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1670           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1671           License
1672
1673 2005-08-04 Borut Razem <borut.razem AT siol.net>
1674
1675         * configure.in: pic16 libraries build 2nd try - enable running
1676           configure in device/lib/pic16
1677         * configure: regenerated from configure.in
1678         * device/lib/Makefile.in: create $(PORT)/bin directory
1679
1680 2005-08-03 Raphael Neider <rneider AT web.de>
1681
1682         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1683           to get/set values via pointers
1684         * (genUnpackBits,genPackBits): changed detection of
1685           ptr->bitfield vs. sym.bitfield, fixed access via generic
1686           pointers, removed dead (wrong) code for multibyte bitfields
1687         * (genNearPointerGet, genGenPointerGet): removed useless code,
1688           fixed bitfield detection, fixes #1250594
1689         * (genNearPointerSet): removed useless code
1690         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1691           and introduced macro pic16_emitpcode that conditionally emits
1692           the origin of the following pCode (useful for debugging SDCC)
1693         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1694         * (createDefmap): fixed handling of LFSR for --optimize-df
1695
1696 2005-08-02 Borut Razem <borut.razem AT siol.net>
1697
1698         * device/lib/Makefile.in: pic16 libraries build enabled since
1699           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1700
1701 2005-08-02 Raphael Neider <rneider AT web.de>
1702
1703         * src/pic16/gen.c (genPackBits): removed deprecated warning
1704         * (genGenPointerSet): fixed bitfield detection
1705
1706 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1707
1708         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1709
1710 2005-07-31 Raphael Neider <rneider AT web.de>
1711
1712         * device/lib/pic16/libdev/pic18f458.c,
1713           device/include/pic16/pic18f458.h: added missing T0CONbits
1714
1715 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1716
1717         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1718
1719 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1720
1721         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1722
1723 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1724
1725         * device/include/mcs51/at89c51ed2.h: added.
1726
1727 2005-07-23 Raphael Neider <rneider AT web.de>
1728
1729         * src/pic/gen.h: added emitpcode macro for debugging
1730         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1731           and replace by macro adding debug information on demand
1732         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1733         * (gencjne): tried to fix; replaced with correct (slower) code
1734         * (gen{Unp,P}ackBits): fixed single bit access
1735         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1736         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1737           previous instruction
1738         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1739           register has to be handled with care (forbidding movement
1740           of assignments/uses, removing assignments completely, ...)
1741         * (pCodeOptime2pCodes): make use of regIsSpecial
1742         * added lots of debugging output (commented out)
1743         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1744           from being reused as result UNLESS it is known to work
1745
1746 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1747
1748         * support/Util/dbuf.h: include <stddef.h> for size_t
1749         * .version: changed to version 2.5.2
1750
1751 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1752
1753         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1754
1755 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1756
1757         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1758           (genModOneByte): removed needless psha/pula
1759
1760 2005-07-22 Raphael Neider <rneider AT web.de>
1761
1762         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1763           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1764         * src/pic/gen.c (resolveIfx): do not "invent" labels
1765         * (genSkipc): changed to positive logic
1766         * (genSkipCond): removed as no longer needed
1767         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1768           backport from PIC16
1769         * (genLeftShift): check operands are in different registers
1770         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1771           INCF does not update CARRY...
1772         * src/pic/main.c: fixed _linkCmd
1773         * src/pic/pcode.c (unlinkpCode): added inactive code
1774         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1775           alive (do not assign result and operand overlapping registers)
1776
1777 2005-07-22 Raphael Neider <rneider AT web.de>
1778
1779         * src/pic/device.c (dump_sfr): replaced register declaration with
1780           call to emitSymbolToFile() to avoid duplicate symbols
1781         * (assignRelocatableRegisters): do not declare external symbols
1782         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1783           right (take size of type, not etype)
1784         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1785         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1786         * (packRegsForAccUse): disabled assignment of WREG as
1787           the result reg to prevent occurence of just fixed #1235003,
1788           fixes #1242954
1789         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1790           symbols (avoids duplicate symbols in .asm file)
1791         * (pic14emitRegularMap): use emitSymbolToFile()
1792         * src/pic/gen.c (aopOp): fixed spillLocation handling
1793         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1794         * (genDataPointerSet): removed unneccessary variables/output
1795
1796 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1797
1798         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1799         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1800
1801 2005-07-21 Raphael Neider <rneider AT web.de>
1802
1803         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1804           architecture cannot handle them efficiently, fixes bug #1235003
1805         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1806           check for empty sets before using them (fixes bug #1232190)
1807
1808 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1809
1810         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1811           (lnksect2): generate warnings for memory overlap
1812         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1813           constseg to set the name of these segments so you can instruct the linker
1814           to place them in banks
1815         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1816         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1817           added code_seg and const_seg to options
1818         * src/SDCCglue.c (emitMaps): use options.const_seg,
1819           (createInterruptVect): put interrupt vectors in segment HOME,
1820           (glue): put HOME before static segment and put the main glue in HOME,
1821           (glue): use options.code_seg
1822         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1823         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1824           these segments so you can instruct the linker to place them in banks
1825           (linkEdit): use code_loc for HOME segment which should be the first
1826           segment in code memory now
1827         * src/SDCCmem.c: fixed more stuff like bug 1238386
1828         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1829           (changePointer): don't change function pointers to code pointers for
1830           banked functions,
1831           (compareType): added exceptional check for banked function pointers
1832         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1833         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1834           after static in code memory
1835         * src/mcs51/gen.c: added aopLiteralLong prototype,
1836           (aopForSym): use getSize for functions,
1837           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1838           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1839           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1840           the segment,
1841           (genPcall): use call for literal function pointers and generate banked
1842           calls over the one trampoline so there's only one place for the user to
1843           modify according to his/hers hardware,
1844           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1845           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1846         * src/mcs51/main.c: added keyword banked,
1847           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1848         * support/Util/SDCCerr.c,
1849         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1850           needed for passing the bank and address to the trampoline
1851         * device/lib/mcs51/crtbank.asm: added for bankswitching
1852         * device/lib/mcs51/Makefile: added crtbank
1853
1854 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1855
1856         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1857           for fields at offset 0 of a struct or union as reported
1858           on 2005-07-07 in the developer mailing list.
1859
1860 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1861
1862         * src/SDCCmem.c: fixed bug 1238386
1863
1864 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1865
1866         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1867           (patch #1144962), added peephole 300, enabled 259.x
1868         * doc/sdccman.lyx: removed screenshot and provided link instead
1869
1870 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1871
1872         * doc/sdccman.lyx: added section about debugging with ddd
1873         * doc/figures/ddd_example.eps: screenshot of debugging session
1874
1875 2005-07-04 Raphael Neider <rneider AT web.de>
1876
1877         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1878           like CODE pointers, fixes #1115683
1879         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1880           call, fixes bugs #1232211, #1228110,
1881           fixed wrong casts to pCodeFlow from pCodeInstructions
1882
1883 2005-07-04 Raphael Neider <rneider AT web.de>
1884
1885         * src/pic/gen.c (popGet): changed assert to allow for
1886           bit operands
1887         * (popGetAddr): changed signature to provide
1888           an additional index, patched all call sites
1889         * (genCmpEq): handle literal-like operands correctly
1890         * (genAddrOf): added sanity checks on __code/__data pointers
1891         * (genAssign): added handling of symbols from __code section
1892         * (gencjne): do not generate code for comparisons whose result
1893           is neither stored nor used, fixes bug #1171114
1894         * (AccLsh, AccRsh): operate on operand instead of WREG
1895         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1896           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1897           by known count
1898         * rewrote complete shift-by-literal logic, commented unused
1899           functions out
1900         * (genConstPointerGet): get multiple bytes (if result size > 1),
1901           fixed handling of non-immediate addresses
1902         * (genPointerGet): handle CODE pointers like CONST pointers
1903         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1904         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1905           operand is to be treated as a literal or not
1906         * (mov2w,genPcall,genCmpEq),
1907           src/pic/genarith.c: use aop_isLitLike() to decide between
1908           literal/register contents
1909         * (addSign): added missing offset
1910         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1911           only emit comment in debug-mode,
1912           use {aop,op}_isLitLike throughout the file
1913         * src/pic/glue.c: fix initializers for pointers (work in progress)
1914         * src/pic/pcode.c (get_op): honor index on _const symbols
1915         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1916         * (dumppBlock): added pCode size estimation
1917         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1918           check for IS_SYMOP before OP_SYMBOL'ing
1919         * fixed indentation, compacted switch-statements
1920         * (allocReg): find free register and allocate it instead of
1921           allocating new registers all the time
1922         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1923           registers as its operands (necessary only for multibyte GETs)
1924
1925 2005-07-01 Raphael Neider <rneider AT web.de>
1926
1927         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1928           debugging .asm-output macros FENTRY + FEXIT
1929         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1930           way... I wonder...
1931         * (emitpComment): NEW, printf to pCode
1932         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1933           offset handling
1934         * (popGetAddr): NEW, variant of popGet to access an immediates
1935           high(er) bytes instead of the n'th byte of memory they reference,
1936           replaced popGet with popGetAddr where neccessary
1937         * (genDataPointerGet): reactivated and fixed implementation
1938         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1939           accesses
1940         * (genDataPointerSet): fixed multibyte assignments
1941         * (genpic14Code): fixed --i-code-in-asm handling
1942         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1943         * (genPlus): fixed index-out-of-bounds error
1944         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1945         * src/pic/ralloc.c: added debugging output macro FENTRY2
1946         * (spillThis): fixed indentation, enbraced for-body for clarity
1947         * (rematStr): commented out as now unused
1948         * (regTypeNum): commented out special spill case (overwrites
1949           arbitrary values)
1950         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1951
1952 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1953
1954         * doc/sdccman.lyx: documented sfr16/sfr32,
1955           added example for using storage class with function pointers
1956         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1957
1958 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1959
1960         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1961         * device/lib/_itoa.c,
1962         * device/lib/_ltoa.c: optimized codesize
1963         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1964           but don't know how to suppress the double warning.
1965         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1966         * support/Util/SDCCerr.c,
1967         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1968
1969 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1970
1971         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1972           fixed old K&R prototypes
1973         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1974         * device/lib/_gptrget.c,
1975         * device/lib/_gptrgetc.c,
1976         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1977           also new versions for small generic pointers and banked generic pointers
1978         * src/port.h: added const_name
1979         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1980         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1981         * src/SDCCcse.c (findPrevIc): check all associative operators
1982         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1983         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1984         * src/SDCCmem.c: updated comments,
1985           set far-space to 0 for pdata, results in optimized code
1986         * src/SDCCmem.h: added macro CONST_NAME
1987         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1988           moving the info into the highest bits, see also gptrget/gptrput
1989         * src/src.dsp: added sdcc.ico to project files
1990         * src/avr/gen.c (genCast): fixed bug 0x%d
1991         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1992         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1993           relation between ptr_type and DCL_TYPE,
1994           (genCast): fixed bug 0x%d
1995         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1996           (CODE)" for const_name
1997         * src/hc08/gen.c (genCast): fixed bug 0x%d
1998         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1999           (hc08_port): added "CONST (CODE)" for const_name
2000         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2001           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2002           between ptr_type and DCL_TYPE,
2003           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2004           operand* and took AOP() inside function so sfr-ness can be checked,
2005           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2006           new prototype,
2007           (genFunction, genEndFunction): optimized stack setup,
2008           (genMinus): optimized for literals with ending zeroes (in bytes),
2009           (genCast): fixed bug 0x%d
2010         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2011           (mcs51_port): added "CONST (CODE)" for const_name
2012         * src/mcs51/peeph.def: made rule 226 more generic
2013         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2014         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2015         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2016         * src/z80/main.c (z80_port): added NULL for const_name,
2017           (gbz80_port): added NULL for const_name
2018         * support/regression/tests/bug663539.c,
2019         * support/regression/tests/sfr16.c: new tests
2020
2021 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2022
2023         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2024
2025 2005-06-24 Raphael Neider <rneider AT web.de>
2026
2027         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2028           corrected typos...
2029         * device/include/pic16/signal.h: added USBIF
2030           and SIG_USB
2031
2032 2005-06-24 Raphael Neider <rneider AT web.de>
2033
2034         * device/lib/pic16/libdev/pic18f2455.c,
2035           device/include/pic16/pic18f2455.h: NEW
2036         * device/include/pic16/pic18fregs.h,
2037           device/lib/pic16/pics.all,
2038           src/pic16/device.c: added 18f2455
2039         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2040           device/include/pic16/{pic18f[68][567].h,usart.h}:
2041           replaced MULTIPLE_USARTS define with more relaible
2042           compatibility sfrs (for USART access)
2043
2044 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2045
2046         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2047           and the output asm file line is printed on two lines.
2048
2049 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2050
2051         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2052           BGT, BLE, BHI, and BLS instructions
2053         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2054           genCmpEq): removed
2055         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2056           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2057           fixes bug #1216342
2058         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2059
2060 2005-06-15 Raphael Neider <rneider AT web.de>
2061
2062         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2063         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2064         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2065           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2066           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2067
2068 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2069
2070         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2071           Marcel Telka in bug #1215704
2072
2073 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2074
2075         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2076           located in shared memory bank.
2077
2078 2005-05-31 Raphael Neider <rneider AT web.de>
2079
2080         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2081           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2082           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2083
2084 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2085
2086         * device/lib/_strncpy.c: fixed the fix
2087
2088 2005-05-26 Raphael Neider <rneider AT web.de>
2089
2090         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2091           initializers with \0, bug #1208187
2092         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2093           intializers with \0, bug #1208187
2094
2095 2005-05-26 Raphael Neider <rneider AT web.de>
2096
2097         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2098           initializers with \0, bug #1208187
2099         * src/pic16/main.c (_process_pragma): added sanity checks
2100           for stack position and size, emit warnings when appropriate
2101
2102 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2103
2104         * device/lib/_strncpy.c: fixed not filling with \0
2105
2106 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2107
2108         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2109           createFunction),
2110         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2111           compound_statement),
2112         * src/SDCCsymt.h,
2113         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2114
2115 2005-05-24 Raphael Neider <rneider AT web.de>
2116
2117         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2118
2119 2005-05-24 Raphael Neider <rneider AT web.de>
2120
2121         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2122           TRISE definitions, closes bug #1162453
2123
2124 2005-05-22 Raphael Neider <rneider AT web.de>
2125
2126         * src/pic16/main.c (_process_pragma): check for missing
2127           arguments to pragmas code and udata
2128         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2129           consistency fixes to match other headers (thanks to Jim Paris)
2130         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2131
2132 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2133
2134         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2135
2136 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2137
2138         * support/regression/tests/bug1198642.c: new test
2139         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2140         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2141         * support/scripts/resource.h,
2142         * support/scripts/resource.rc,
2143         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2144         * support/scripts/sdcc.ico: added 32x32 icon
2145
2146 2005-05-18 Raphael Neider <rneider AT web.de>
2147
2148         * device/lib/pic16/libdev/pic18f*.c,
2149         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2150           keywords to "__sfr" and "__at (X)"
2151         * device/include/pic16/pic18fregs.h: added pic18f4520
2152         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2153           #1203088 (MPLAB compatibility)
2154
2155 2005-05-17 Raphael Neider <rneider AT web.de>
2156
2157         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2158         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2159         * device/lib/pic16/pics.all: added new devices
2160         * src/pic16/device.c: added support for pic18f4520
2161
2162 2005-05-16 Raphael Neider <rneider AT web.de>
2163         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2164         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2165         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2166           convenience function for bit access
2167
2168 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2169
2170         * device/lib/printf_large.c: fixed bug 1193299
2171         * support/regression/tests/bug1057979.c: added test %3.3s
2172
2173 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2174
2175         * device/include/mcs51/8051.h,
2176         * device/include/mcs51/8052.h: made parseable with lint
2177         * device/include/mcs51/lint.h: added include file for (sp)lint
2178         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2179         * doc/cdbfileformat.lyx,
2180         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2181
2182 2005-05-14 Raphael Neider <rneider AT web.de>
2183
2184         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2185         * device/lib/pic16/libc/stdlib/itoa.c (new)
2186         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2187         * device/lib/pic16/libio/Makefile: exclude subdir according to
2188           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2189         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2190         * src/pic16/gen.c (genFunction): prevent annoying warning
2191         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2192           nameclashes on BeOS
2193         * support/cpp2/cppmain.c (cpp_output_string): new
2194         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2195           fixes bug 1116802
2196
2197 2005-05-13 Borut Razem <borut.razem AT siol.net>
2198
2199         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2200
2201 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2202
2203         * .version: changed to version 2.5.1; back to bleeding edge development
2204
2205 2005-05-11 Borut Razem <borut.razem AT siol.net>
2206
2207         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2208           generate PDF version 1.3 documents
2209
2210 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2211
2212         * .version: changed to version 2.5.0
2213
2214 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2215
2216         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2217
2218 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2219
2220         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2221         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2222         well as many smaller updates.
2223         * .version: changed to version 2.5.0-pre1
2224
2225 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2226
2227         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2228
2229 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2230
2231         * support/regression/tests/bug1185672.c: added
2232         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2233           bug 1185672
2234         * src/mcs51/gen.c (genCall): added comments, made it look safer
2235         * src/mcs51/gen.c (genEndFunction): simplified
2236
2237 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2238
2239         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2240
2241 2005-04-14 Borut Razem <borut.razem AT siol.net>
2242
2243         * fixed bug 1045046 - SIGSEGV with really simple code?:
2244           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2245           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2246
2247 2005-04-14 Borut Razem <borut.razem AT siol.net>
2248
2249         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2250           src/pic16/device.h: temporarily disabled experimental #inline pragma
2251           for 2.5.0 release
2252
2253 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2254
2255         * device/include/z80/stdio.h,
2256         * device/include/z80/string.h: removed these highly incomplete files so
2257           SDCC can use the default ones in device/include/
2258
2259 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2260
2261         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2262         gcc warning.
2263         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2264         fix sdcpp warnings.
2265
2266 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2267
2268         * device/include/malloc.h: removed redundant __reentrant prototypes
2269         * device/lib/_mullong.c: added working xstack variant in asm (C version
2270           doesn't pass regression tests)
2271         * device/lib/bpx.c: used __data and made bpx char for mcs51
2272         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2273           (createFunction): fixed bug with xstackPtr
2274         * src/SDCCcse.c: corrected comments
2275         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2276           (killDeadCode, eBBlockFromiCode): removed unused code
2277         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2278           corrected comments
2279         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2280           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2281           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2282           (genModOneByte): fixed warning in MSVC
2283         * src/mcs51/main.c (): added comments
2284         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2285
2286 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2287
2288         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2289
2290 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2291
2292         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2293
2294 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2295
2296         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2297         characters arrays of larger size than the declared one.
2298
2299 2005-04-10 Borut Razem <borut.razem AT siol.net>
2300
2301         * src/pic/gen.c (genInline),
2302           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2303           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2304           (findNextInstruction), (findPrevInstruction),
2305           (findInstructionUsingLabel),
2306           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2307         * src/pic/pcode.c (findLabel): added missing '\n'
2308         * src/src.dsp: added SDCCdwarf2.c to the project
2309
2310 2005-04-09 Borut Razem <borut.razem AT siol.net>
2311
2312         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2313
2314 2005-04-08 Raphael Neider <rneider AT web.de>
2315
2316         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2317           into the chain after a given one) and mergeDefmapSymbols (combine
2318           defmap entries for each symbol per pcode)
2319         * (createDefmap): have defmap entries merged in the end
2320         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2321           a symbol before replacing one access type's symbol, merge symbols in
2322           the end (replacement symbol might already have an entry)
2323         * (assignValnums): keep reference to written WREG intact
2324
2325 2005-04-08 Raphael Neider <rneider AT web.de>
2326
2327         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2328           Alpha)
2329
2330 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2331
2332         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2333         bytes
2334
2335 2005-04-07 Raphael Neider <rneider AT web.de>
2336
2337         * device/include/pic16/usart.h: added compatibility defines for
2338           devices with more than one USART
2339         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2340
2341 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2342
2343         * device/lib/Makefile.in: updated for port specific include
2344
2345 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2346
2347         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2348
2349 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2350
2351         * device/include/8051.h,
2352         * device/include/8052.h,
2353         * device/include/at89S8252.h,
2354         * device/include/at89c55.h,
2355         * device/include/at89x051.h,
2356         * device/include/at89x51.h,
2357         * device/include/at89x52.h,
2358         * device/include/mcs51reg.h,
2359         * device/include/reg51.h,
2360         * device/include/reg764.h,
2361         * device/include/regc515c.h,
2362         * device/include/sab80515.h: (re)moved these 12 files
2363         * device/include/mcs51/8051.h,
2364         * device/include/mcs51/8052.h,
2365         * device/include/mcs51/at89S8252.h,
2366         * device/include/mcs51/at89c55.h,
2367         * device/include/mcs51/at89x051.h,
2368         * device/include/mcs51/at89x51.h,
2369         * device/include/mcs51/at89x52.h,
2370         * device/include/mcs51/mcs51reg.h,
2371         * device/include/mcs51/reg51.h,
2372         * device/include/mcs51/reg764.h,
2373         * device/include/mcs51/regc515c.h,
2374         * device/include/mcs51/sab80515.h: and added them here
2375
2376 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2377
2378         * device/include/stdarg.h: changed SDCC specific keywords to double
2379           underlined form.
2380         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2381           mcs51 and ds390.
2382         * device/include/hc08/mc68hc908gp32.h,
2383         * device/include/hc08/mc68hc908jb8.h,
2384         * device/include/hc08/mc68hc908jkjl.h,
2385         * device/include/hc08/mc68hc908qy.h: fixed comments
2386         * device/include/mcs51/README: updated
2387         * device/include/mcs51/c8051f120.h: added PINRSF
2388         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2389         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2390           amidst code. Also inline is not supported.
2391
2392 2005-04-06 Raphael Neider <rneider AT web.de>
2393
2394         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2395         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2396           callers stack/frame pointers
2397
2398 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2399
2400         * device/include/pic16/usart.h: added, missing in previous commit,
2401         * device/include/pic16/adc.h: fixed typo,
2402         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2403         commit,
2404         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2405         <p18fxxx.inc>
2406         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2407         uninitialized because a bug appears with gplink
2408         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2409         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2410         complains for unrecognised option
2411
2412 2005-04-05 Raphael Neider <rneider AT web.de>
2413
2414         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2415           structs as well (using memcpy)
2416         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2417           on ISRs (GOTO has no label)
2418         * src/pic16/device.h: added OF_OPTIMIZE_DF
2419         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2420           new data flow analysis/optimization
2421         * src/pic16/pcode.c: added (prototypes for and implementation of)
2422           dataflow analysis functions, fixed pCodeInstructions' inCond and
2423           outCond values, made RCALL a branch instruction
2424         * (pic16_unlinkpCode): keep C line if possible
2425         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2426           C line moved if possible
2427         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2428         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2429           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2430         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2431           new flow)
2432         * (pic16_getJumptabpCode): NEW, needed in...
2433         * (LinkFlow): fixed handling of jumptables, calls and conditional
2434           branches
2435         * (pic16_InsertCommentAfter): NEW
2436         * (pic16_pCodeReplace): made verbose and flow preserving
2437         * (AnalyzeFlow): added call to data flow analysis
2438         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2439         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2440         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2441
2442 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2443
2444         * src/SDCCast.c (decorateType): fixed bug #1105626
2445
2446 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2447
2448         * device/include/asm/pic16/features.h,
2449         * pic18f*.h headers,
2450         * device/include/pic16/adc.h,
2451         * device/include/pic16/delay.h,
2452         * device/include/pic16/i2c.h,
2453         * device/include/pic16/malloc.h,
2454         * device/include/pic16/stdio.h,
2455         * device/include/pic16/stdlib.h,
2456         * device/include/pic16/string.h,
2457         * device/lib/pic16/libc/stdio/printf_tiny.c,
2458         * device/lib/pic16/libc/stdio/printf_small.c,
2459         * device/lib/pic16/libc/stdio/strmgpsim.c,
2460         * device/lib/pic16/libc/stdio/strmmssp.c,
2461         * device/lib/pic16/libc/stdio/strmusart.c,
2462         * device/lib/pic16/libc/stdio/vfprintf.c,
2463         * device/lib/pic16/libc/stdlib/ltoa.c,
2464         * device/lib/pic16/libc/stdlib/putchar.c,
2465         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2466         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2467         * device/lib/pic16/libc/stdlib/memchrram.c,
2468         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2469         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2470         * device/lib/pic16/libio/adc/adcbusy.c,
2471         * device/lib/pic16/libio/adc/adcread.c,
2472         * device/lib/pic16/libio/adc/adcsetch.c,
2473         * device/lib/pic16/libio/usart/ubaud.c,
2474         * device/lib/pic16/libio/usart/ubusy.c,
2475         * device/lib/pic16/libio/usart/udrdy.c,
2476         * device/lib/pic16/libio/usart/uopen.c,
2477         * device/lib/pic16/libio/usart/uputc.c,
2478         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2479         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2480         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2481         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2482         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2483         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2484         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2485         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2486         specific keywords to double underlined form,
2487         * device/lib/pic16/libc/Makefile.rules,
2488         * device/lib/pic16/libsdcc/Makefile.rules,
2489         * device/lib/pic16/libm/Makefile,
2490         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2491         to compile with C standard set in Makefile.common
2492         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2493         rand.c and crc.c in compilation process,
2494         * device/lib/pic16/libsdcc/int/divuint.c,
2495         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2496         `c' from signed to unsigned,
2497         * device/lib/pic16/startup/crt0.c,
2498         * device/lib/pic16/startup/crt0i.c,
2499         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2500         keywords to double underlined form, bug fixes in _do_cinit function
2501         which prevented the correct initialization of the .idata segment,
2502         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2503         core to enter a infinite loop
2504         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2505
2506 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2507
2508         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2509
2510 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2511
2512         * device/include/Makefile.in: add support for hc08 subdirectory
2513         * device/include/hc08/: new subdirectory
2514         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2515         Lucas Loizaga, thanks!
2516         * device/include/hc08/mc68hc908qy.h,
2517         * device/include/hc08/mc68hc908gp32.h,
2518         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2519         their own directory. Changed internal macro names to use the compiler
2520         reserved namespace. Changed SDCC specific keywords to double
2521         underlined form.
2522         * device/include/math.h,
2523         * device/include/malloc.h,
2524         * device/include/stdarg.h,
2525         * device/include/stdbool.h
2526         * device/include/string.h,
2527         * device/include/tinibios.h,
2528         * device/include/ds400rom.h,
2529         * device/include/8051.h,
2530         * device/include/8052.h,
2531         * device/include/80c51xa.h,
2532         * device/include/at89c55.h,
2533         * device/include/at89S8252.h,
2534         * device/include/at89x51.h,
2535         * device/include/at89x52.h,
2536         * device/include/ds80c390.h,
2537         * device/include/reg764.h,
2538         * device/include/regc515c.h,
2539         * device/include/sab80515.h,
2540         * device/include/mcs51/c8051f000.h,
2541         * device/include/mcs51/c8051f018.h,
2542         * device/include/mcs51/c8051f020.h,
2543         * device/include/mcs51/c8051f040.h,
2544         * device/include/mcs51/c8051f060.h,
2545         * device/include/mcs51/c8051f120.h,
2546         * device/include/mcs51/c8051f300.h,
2547         * device/include/mcs51/c8051f310.h,
2548         * device/include/mcs51/c8051f320.h,
2549         * device/include/mcs51/c8051f330.h,
2550         * device/include/mcs51/c8051f350.h,
2551         * device/include/z180.h: Changed SDCC specific keywords to double
2552         underlined form.
2553
2554 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2555
2556         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2557         18F4455,
2558         * (pic16_assignConfigWordValue): disable testing of configuration
2559         register value with config mask,
2560         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2561         function with port->fun_prefix,
2562         * (genFunction): when generating a naked interrupt function never
2563         create an absolute segment placed in interrupt vector address, place
2564         the actual interrupt function at IVA instead, when an interrupt
2565         function is generated with unspecified interrupt then do not create
2566         the absolute section,
2567         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2568         code for generating a call to generic pointer get/put function with
2569         a call to function pic16_callGenericPointer(),
2570         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2571         the call to the generic pointer get/put functions with prefixing the
2572         function name with port->fun_prefix,
2573         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2574         * src/pic16/main.c (_process_pragma): prefix function with
2575         port->fun_prefix,
2576         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2577         calling assembler, old 18Fxxxx macro is deprecated,
2578         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2579         PC_ASMDIR in while condition,
2580         * (findInstruction): add PC_ASMDIR in while condition,
2581         * (buildCallTree): prefix main with port->fun_prefix,
2582         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2583         identifier for variable with banked access in instructions BTFSS,
2584         BTFSC, BCF, BSF, BTG
2585         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2586         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2587         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2588         perform optimization when enviroment variable NO_REG_OPT is set,
2589         * (insideLRBlock): NEW, return 1 if register is inside an
2590         INF_LOCALREGS block,
2591         * (RemoveRegFromLRBlock): remove a register that is completely
2592         eliminated by register optimization, but it is still left in local
2593         register store/restore in/from stack block,
2594         * (Remove2pcodes): after removing register, check to see if it
2595         should be removed from local register store/restore in/from stack
2596         block,
2597         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2598         DUMMY_READ_VOLATILE,
2599
2600         * device/include/pic16/adc.h: minor prototype modifications and
2601         update,
2602         * device/include/pic16/malloc.h: added GPL notice various
2603         modifications,
2604         * device/include/pic16/stdint.h: NEW, standard header for ints
2605         * device/include/pic16/delay.h: NEW, header for delay functions,
2606         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2607         delay1mtcy,
2608         * device/include/pic16/signal.h: NEW, header providing helper macros
2609         for implementing signal handlers,
2610         * device/include/pic16/stdio.h: added prototypes for functions,
2611         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2612         prototypes for stdin and stdout, added macro PUTCHAR to
2613         automatically implement putchar function prototype,
2614         * device/include/pic16/usart.h: modified and updated USART library,
2615         * device/lib/pic16/libio/adc/,
2616         * device/lib/pic16/libio/i2c: some modifications to improve library
2617         performance,
2618         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2619         family of functions,
2620         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2621         family of functions and other sources,
2622         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2623         of the PIC18Fxx[28] devices,
2624         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2625         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2626         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2627         _do_cinit function, because the previous failed when local variables
2628         where not placed in the same memory bank,
2629         * device/lib/pic16/libsdcc/char/: various modifications to improve
2630         library performance,
2631         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2632         information on the new functions of the c library and more...
2633
2634 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2635
2636         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2637
2638 2005-03-26 Raphael Neider <rneider AT web.de>
2639
2640         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2641           if condition == CARRY)
2642         * (genCmp): adapted to new genSkipc semantics
2643         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2644           on rIfx (genCmp was broken)
2645
2646 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2647
2648         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2649         * src/z80/main.c (_keywords[]),
2650         * src/SDCCglobal.h (struct options),
2651         * src/SDCC.y,
2652         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2653         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2654         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2655         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2656         always available in leading double underscore form. The C99 support is
2657         mostly missing, but it's a start.
2658         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2659         reserved identifier "__data".
2660
2661 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2662
2663         * src/mcs51/peeph.def: fixed bug 1170013
2664
2665 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2666
2667         * device/include/mcs51reg.h: fixed bug 842007
2668
2669 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2670
2671         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2672         last time.
2673
2674 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2675
2676         * src/port.h (struct PORT),
2677         * src/avr/ralloc.c (avr_assignRegisters),
2678         * src/avr/main.c,
2679         * src/ds390/ralloc.c (ds390_assignRegisters),
2680         * src/ds390/main.c,
2681         * src/hc08/ralloc.c (hc08_assignRegisters),
2682         * src/hc08/main.c,
2683         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2684         * src/mcs51/main.c,
2685         * src/pic/ralloc.c (pic14_assignRegisters),
2686         * src/pic/main.c,
2687         * src/pic16/ralloc.c (pic16_assignRegisters),
2688         * src/pic16/main.c,
2689         * src/xa51/ralloc.c (xa51_assignRegisters),
2690         * src/xa51/main.c,
2691         * src/z80/ralloc.c (z80_assignRegisters),
2692         * src/z80/ralloc.h,
2693         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2694         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2695         * src/SDCCcse.h,
2696         * src/SDCCdflow.c (computeDataFlow),
2697         * src/SDCCdflow.h,
2698         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2699         * src/SDCCloop.h,
2700         * src/SDCCcflow.c (*),
2701         * src/SDCCcflow.h,
2702         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2703         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2704         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2705         immedDom() returning wrong block; probably fixes bug #1160833)
2706
2707 2005-03-20 Borut Razem <borut.razem AT siol.net>
2708
2709         * support/scripts/inc2h.pl: WIN32 port
2710
2711 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2712
2713         * device/lib/makefile.in: added abs.c and labs.c
2714
2715 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2716
2717         * device/include/stdint.h: added
2718         * device/lib/abs.c: added
2719         * device/lib/labs.c: added
2720         * device/include/stdlib.h: added abs() and labs() prototypes
2721         * device/lib/libsdcc.lib: added abs and labs
2722         * device/include/float.h,
2723         * device/lib/_fsmul.c,
2724         * device/lib/printf_fast.c,
2725         * device/lib/printf_tiny.c: updated comments
2726
2727 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2728
2729         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2730         bug #1164313
2731
2732 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2733
2734         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2735         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2736
2737 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2738
2739         * device/lib/printf_large.c: removed inline assembly for portability and
2740           readability. Use printf_fast if speed or size are more important.
2741         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2742         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2743
2744 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2745
2746         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2747         prevent compiler warning
2748
2749 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2750
2751         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2752         moved to level 0 and declared as static. Also they are explicit
2753         placed in access bank. This was necessery because some times they
2754         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2755         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2756         optimizations. Currently only compare to unsigned char is implemented,
2757         * src/pic16/gen.c: added fReturnIdx array,
2758         * (struct resolvedIfx) is moved to gen.h and made public,
2759         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2760         * (aopForSym): added an optimization to directly store in stack of
2761         the operand of a SEND iCode,
2762         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2763         but as registers instead (AOP_REG) using the fReturnIdx array,
2764         * (pic16_freeAsmop): remove the freed register from the
2765         _G.sregsAlloc field,
2766         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2767         a compare of 'WREG',
2768         * (pic16_popGetTempRegCond): changed function prototype, now
2769         function takes also a bitVector argument v which holds the current
2770         set of registers that are allocated for stack access by aopForSym,
2771         registers allocated in aopForSym for accessing stack symbols are not
2772         any more part of the functions usedRegs field,
2773         * (genCall): some times aopOp is called for a stack variable to be
2774         send, aopForSym might perform the push, if this is true make sure
2775         that genCall doesn't push the variable twice by testing _G.resDirect,
2776         * (genFunction): changed testing for unspecified interrupt number
2777         from 256 to INTNO_UNSPEC,
2778         * modified selection scheme of frame pointer generation. Previously
2779         if function did use local registers a frame pointer was generated,
2780         now a frame pointer is generated only if function has arguments
2781         (that need PLUSW2 register access), or has stack arguments, or the
2782         compiler is not instructed to omit the frame pointer,
2783         * (genEndFunction): before restoring local registers that were saved
2784         in the function preamble, also restore the registers that *might*
2785         have been allocated for stack access,
2786         * (genRet): removed some old comments,
2787         * (genCmp, the active (RN's) version): added a call to the
2788         pic16_genCmp_special function to perform the compare with a more
2789         robust and optimized way,
2790         * (genInline): a feature has been added in inline code generation,
2791         which allows a wildcard variable substitution when writing inline
2792         assembly. Code is incomplete and experimental therefore undocumented,
2793         * (genCast): changed order of aopOp for result and right to allow
2794         aopForSym to directly load the result if possible,
2795         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2796         perform an optimized compare on some selected special occasions,
2797         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2798         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2799         generate an IVT any more,
2800         * src/pic16/main.c (pic16_optionsTable): added command line option
2801         --optimize-cmp,
2802         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2803         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2804         macros,
2805         * src/pic16/NOTES: Raphael Neider added in list of active developers
2806         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2807         jumptable_end to prevent bug #,
2808         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2809         inCond and outCond fields,
2810         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2811         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2812         turn off register spilling,
2813         * (packRegsForOneUse): synced with other ports' versions although it
2814         is not used currently,
2815         * (pic16_packRegisters): added an optimization while reading
2816         structure bitfields, some registers may be saved (malloc code is
2817         decreased by 80 bytes)
2818
2819 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2820
2821         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2822         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2823         this can be optimized more?
2824
2825 2005-03-10 Raphael Neider <rneider AT web.de>
2826
2827         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2828           genNearPointerGet): (hopefully) fixed access to bitfields via
2829           pointers (p->bitN = x; and x = p->bitN; failed)
2830
2831 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2832
2833         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2834
2835 2005-03-09 Raphael Neider <rneider AT web.de>
2836
2837         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2838
2839 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2840
2841         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2842         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2843           (regTypeNum): set REG_BIT type if necessary
2844         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2845         * support/regression/tests/critical.c: check bug 1144613
2846
2847 2005-03-02 Raphael Neider <rneider AT web.de>
2848
2849         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2850
2851 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2852
2853         * src/avr/ralloc.c (serialRegAssign),
2854         * src/ds390/ralloc.c (serialRegAssign),
2855         * src/hc08/ralloc.c (serialRegAssign),
2856         * src/mcs51/ralloc.c (serialRegAssign),
2857         * src/pic/ralloc.c (serialRegAssign),
2858         * src/pic16/ralloc.c (serialRegAssign),
2859         * src/xa51/ralloc.c (serialRegAssign),
2860         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2861
2862 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2863
2864         * src/SDCCast.c (decorateType): fixed bug 1124787
2865
2866 2005-02-20 Hubert Sack <sack AT digiplan.de>
2867         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2868
2869         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2870         patch #1121755
2871
2872 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2873
2874         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2875         to keep the correct label reference count when adding/removing references
2876         to labels. A peephole file using this is appended to patch #1144962.
2877
2878 2005-02-14 Raphael Neider <rneider AT web.de>
2879
2880         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2881         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2882         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2883           retrievals of result operand's value on assignment
2884
2885 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2886
2887         * device/include/pic16/string.h: modified prototype for memccpy()
2888         to memccpy(void *, void *, char, size_t)
2889         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2890         check whether to omit frame pointer or not,
2891         * (genInline): convert all occurences of "\n" to LF in inline
2892         assembler blocks, this helps formatting the inline text,
2893         * (pic16_loadFSR0): modified prototype,
2894         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2895         removed some 8051 legacy code,
2896         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2897         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2898         before allocating temporary registers in functions,
2899
2900 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2901
2902         * support/regression/tests/bitvars.c: corrected the "fix"
2903
2904 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2905
2906         * support/regression/tests/bitvars.c,
2907         * support/regression/tests/bitwise.c,
2908         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2909
2910 2005-02-10 Raphael Neider <rneider AT web.de>
2911
2912         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2913           different size for Alpha
2914         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2915
2916 2005-02-09 Raphael Neider <rneider AT web.de>
2917
2918         * src/SDCC.lex(doPragma) : save and restore warning options as well
2919           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2920         * have #pragma less_pedantic set the errorlevel to WARNING
2921           (fixes #1117001)
2922         * (cloneOptimize) : fixed wrong malloc's size
2923         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2924           facilitate correct handling of #pragma (save|restore)
2925
2926 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2927
2928         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2929
2930 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2931
2932         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2933
2934 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2935
2936         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2937
2938 2005-02-02 Raphael Neider <rneider AT web.de>
2939
2940         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2941         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2942         * (pic16_storeForReturn): fixed to allow returning function pointers
2943         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2944         * device/include/pic16/{stddef.h,stdbool.h}: added
2945
2946 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2947
2948         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2949
2950 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2951
2952         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2953         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2954          appeared to be required
2955
2956 2005-01-31 Borut Razem <borut.razem AT siol.net>
2957
2958         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2959           include/mcs51 and include/z80 directories to the package
2960
2961 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2962
2963         * src/hc08/gen.c (genFunction): fixed bug #1112752
2964
2965 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2966
2967         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2968
2969 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2970
2971         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2972
2973 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2974
2975         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2976
2977 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2978
2979         * device/include/c8051fxxx.h: removed these 6 files
2980         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2981
2982 2005-01-26 Raphael Neider <rneider AT web.de>
2983
2984         * src/pic16/gen.c (genAssign): fixed assignment from longs
2985           in codespace (were cut to three bytes)
2986         * (genDummyRead): implemented (except for CODESPACE...),
2987           fixed bug #1108575
2988         * src/pic16/glue.c (emitStatistics): beautified
2989         * device/lib/pic16/libm/Makefile: added include path
2990
2991 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2992
2993         * src/z80/gen.c (aopPut): fixed bug #1103902
2994
2995 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2996
2997         * device/lib/expf.c: fixed bug #1095792
2998
2999 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3000
3001         * device/lib/pic16/libm: added Math library sources
3002
3003 2005-01-24 Raphael Neider <rneider AT web.de>
3004
3005         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3006           to enable upcast to pCodeOpReg2 (there is no type tag to
3007           differenciate the two and pic16_popGet2p cast into PCOR2)
3008         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3009           (sizeof(sectNames) changed to sizeof(sectName))
3010           Both patches fix segfaults under MinGW.
3011
3012 2005-01-23 Raphael Neider <rneider AT web.de>
3013
3014         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3015           Safe_[mc]?alloc()'ed variables
3016         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3017           of (byte sized) temporaries (assign them to WREG for now)
3018         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3019           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3020           this might fix SIGSEGVs on MinGW...
3021         * src/SDCCopt.c (killDeadCode): restored original behaviour
3022           (volatile operands might get thrown away though)
3023
3024 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3025
3026         * src/pic16/gen.c: fixed bug #1106975,
3027         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3028         pointer update, INTCON is saved, global interrupts are disabled and
3029         restored after updateing TOS.
3030         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3031         * added function attribute 'shadowregs' to take advantage of shadow
3032         registers,
3033         * added function attribute 'wparam' as an alternative to the wparam
3034         pragma,
3035         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3036         user declares a non-ISR function as 'shadowregs',
3037         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3038
3039 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3040
3041         * .version: bumped version number to 2.4.8
3042         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3043         pic16 port,
3044         * device/lib/pic16/libio/i2c/: I2C module support library,
3045         * device/include/pic16/i2c.h: I2C support library header,
3046         * device/lib/pic16/libc/stdio/: standard IO support sources,
3047         * (printf_small.c): printf_small() source, supports float print,
3048         * (printf_tiny.c): printf_tiny() source, does not support floats,
3049         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3050         enable global optimizations for entire library source, other
3051         Makefiles in the source tree are also modified to reflect this,
3052         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3053         function,
3054         * doc/sdccman.lyx: updated to reflect new changes,
3055         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3056         sym->onStack if-case,
3057         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3058         sbit, idata, _idata, xdata, _xdata,
3059         * added pragma library, to link an external library, (see doc),
3060         * removed command line options, --pomit-config-words, --pomit-ivt,
3061         --pleave-reset-vector,
3062         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3063         when calling assembler to reflect memory model used, also define
3064         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3065         reflect stack model used,
3066         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3067         on stack return NULL,
3068
3069 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3070
3071         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3072           of the operands is volatile. Fixes #1020220
3073
3074 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3075
3076         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3077         * (OptimizeRegUsage): make sure that there is really no other flow where
3078           the first pCode is used
3079
3080 2005-01-22 Raphael Neider <rneider AT web.de>
3081
3082         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3083           to fix #1106967 (pCode->seq are not set up correctly)
3084
3085 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3086
3087         * src/SDCCglue.c (glue): make sure code area is declared before the
3088         static initialization area.
3089
3090 2005-01-21 Raphael Neider <rneider AT web.de>
3091
3092         * device/lib/Makefile.in: fixed test for pic16 install dir
3093         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3094           optimizations
3095         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3096           added --optimize-goto compiler switch and pragma wparam documentation
3097         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3098         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3099           and PRODH closing bug #1071770 (peephole optimizer)
3100
3101 2005-01-19 Raphael Neider <rneider AT web.de>
3102
3103         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3104           cmdLine buffers (used when calling sdcpp...) are large enough
3105           (MAX_PATH=256 truncates arguments leading to system halts when
3106           used in MinGW...)
3107         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3108         * (genUminus): rewritten to for efficiency
3109         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3110           used uninitialized in some cases)
3111         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3112           copy the third byte from the int -- now assumes 0x80 (data memory)
3113         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3114           operands (genAddLit expects the iCode's operands to swapped as
3115           well), fixed leftover bytes (crashed for short left operands)
3116         * (pic16_genMinusDec): performance improvements, removed false
3117           PIC14 emitSKPNCs
3118         * (pic16_genMinus): fixed to cope with differently sized operands
3119         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3120           for --obanksel > 1
3121         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3122         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3123           new banksel optimization
3124         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3125           analysis for temporary registers (segfaults...)
3126         * src/pic16/peeph.def: added rule
3127
3128 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3129
3130         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3131         which converts a float number to its ASCII representation
3132         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3133         functions to convert the fractional and integer part of a float to ASCII,
3134         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3135         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3136         ram
3137         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3138         _STATMEM macros,
3139         * device/include/pic16/adc.h: added GPL info,
3140         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3141         a pCodeOp as tested operand,
3142         * (genNearPointerGet): optimized bit testing, does not use
3143         intermediate register for bit value, test directly instead with
3144         BTFSS, BTFSC, works only for single bits,
3145         * (genpic16Code): dump the name of the iCode in the asm,
3146         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3147         renamed to pic16_decodeOp,
3148         * (serialRegAssign): do not allocate a temporary register for iCode
3149         sequences that test a single bit for 1/0
3150
3151 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3152
3153         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3154         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3155         access stack and frame pointers. They are initially assigned to
3156         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3157         accessing SFRs. Updated all occurences of modification of stack or
3158         frame pointer in gen.c and pcode.c,
3159         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3160         assigning of a literal value to pointers,
3161         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3162         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3163         selected
3164
3165 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3166
3167         * doc/sdccman.lyx: update documentation about stack pragma, added
3168         some info for stack memory models
3169
3170 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3171
3172         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3173
3174 2005-01-08 Raphael Neider <rneider AT web.de>
3175
3176         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3177           udata sections to fix bug #1097823
3178
3179 2005-01-05 Raphael Neider <rneider AT web.de>
3180
3181         * src/pic16/gen.c (genGenericShift): added handling of differently
3182           sized left operand and result
3183
3184 2005-01-04 Raphael Neider <rneider AT web.de>
3185
3186         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3187         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3188           to hold the condition bit)
3189         * added new version of genCmp (old code available via #define)
3190         * added new version of genShiftLeft/genShiftRight in a generic
3191           way, now supports shifting by negative values
3192         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3193           shiftCount (expected by genGenericShift)
3194         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3195         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3196           dump
3197         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3198           is an invalid literal too...)
3199
3200 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3201
3202         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3203         from Raphael Neider,
3204         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3205         for 8-bit literals. This fixes some literal operands which are sign
3206         extended to 16-bits ints when instruction needs only 8-bits.
3207
3208 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3209
3210         * device/lib/logf.c: added mcs51 assembly version
3211         * device/lib/expf.c: added mcs51 assembly version
3212         * device/lib/_logexpf.c: new shared asm code for expf and logf
3213         * device/include/math.h: add defines for assembly math library
3214         * device/lib/Makefile.in: build new _logexpf.c
3215         * device/lib/libfloat.lib: use new _logexpf.c
3216
3217 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3218
3219         * src/pic/device.c
3220         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3221           device types which have less than 0x7f registers.
3222
3223 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3224
3225         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3226
3227 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3228
3229         * device/lib/printf_fast.c: only build on supported arch.
3230         * device/lib/printf_tiny.c: only build on supported arch.
3231         * device/lib/printf_fast_f.c: only build if asm float lib
3232         * device/lib/_fsget1arg.c: only build if asm float lib
3233         * device/lib/_fsget2args.c: only build if asm float lib
3234         * device/lib/_fsnormalize.c: only build if asm float lib
3235         * device/lib/_fsreturnval.c: only build if asm float lib
3236         * device/lib/_fsrshift.c: only build if asm float lib
3237         * device/lib/_fsswapargs.c: only build if asm float lib
3238         * device/include/stdio.h: don't provide print_fast,
3239           print_fast_f, print_tiny prototypes if --xstack used
3240
3241 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3242
3243         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3244         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3245           to the SOURCES
3246
3247 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3248
3249         * device/lib/printf_fast_f.c: same as printf_fast, but
3250           with floating point enabled
3251         * device/lib/printf_fast.c: minor tweaks
3252         * device/include/stdio.h: add printf_fast_f
3253
3254 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3255
3256         * src/SDCCmain.c: make --float-reent default for mcs51
3257         * device/lib/_fsadd.c: added mcs51 assembly version
3258         * device/lib/_fssub.c: added mcs51 assembly version
3259         * device/lib/_fsmul.c: added mcs51 assembly version
3260         * device/lib/_fsdiv.c: added mcs51 assembly version
3261         * device/lib/_fseq.c: added mcs51 assembly version
3262         * device/lib/_fsneq.c: added mcs51 assembly version
3263         * device/lib/_fsgt.c: added mcs51 assembly version
3264         * device/lib/_fslt.c: added mcs51 assembly version
3265         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3266         * device/lib/Makefile.in: add _fscmp to build
3267         * device/lib/libfloat.lib: add _fscmp to build
3268
3269 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3270
3271         * device/lib/_fs2slong.c: added mcs51 assembly version
3272         * device/lib/_fs2sint.c: added mcs51 assembly version
3273         * device/lib/_fs2schar.c: added mcs51 assembly version
3274         * device/lib/_fs2ulong.c: added mcs51 assembly version
3275         * device/lib/_fs2uint.c: added mcs51 assembly version
3276         * device/lib/_fs2uchar.c: added mcs51 assembly version
3277         * device/lib/_slong2fs.c: added mcs51 assembly version
3278         * device/lib/_sint2fs.c: added mcs51 assembly version
3279         * device/lib/_schar2fs.c: added mcs51 assembly version
3280         * device/lib/_ulong2fs.c: added mcs51 assembly version
3281         * device/lib/_uint2fs.c: added mcs51 assembly version
3282         * device/lib/_uchar2fs.c: added mcs51 assembly version
3283         * device/include/float.h: added #define to select asm vs c
3284
3285 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3286
3287         * device/lib/printf_fast.c: improvements to float output
3288         * device/include/float.h: add defines for assembly float library
3289         * device/lib/_fsget1arg.c: receive 1 float arg
3290         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3291         * device/lib/_fsnormalize.c: normalize a float
3292         * device/lib/_fsreturnval.c: return float, various helper routines
3293         * device/lib/_fsrshift.c: right shift a float's mantissa
3294         * device/lib/_fsswapargs.c: swap 2 floats
3295         * device/lib/Makefile.in: build these 6 new files for mcs51
3296         * device/lib/libfloat.lib: add these 6 files to the library
3297
3298 2004-12-26 Borut Razem <borut.razem AT siol.net>
3299
3300         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3301           built by gcc 3.4.2
3302
3303 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3304
3305         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3306           and fully reentrant and register bank neutral.
3307         * device/lib/printf_fast.c: added float (not enabled by default),
3308           added compact/slower integer (also not enabled by default),
3309           improved size/speed of fast integer code, other minor changes
3310         * device/include/stdio.h, device/lib/Makefile.in,
3311           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3312
3313 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3314
3315         * src/pic16/pcode.c: declaring variables other than at the start of a
3316           block is not supported in C by VC6.
3317
3318 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3319
3320         * applied a previous patch from Raphael Neider that wasn't included
3321         in the previous commits, which fixes infinite loops within jumptable
3322         improvements,
3323         * made some fixes that previous patches introduced
3324
3325 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3326
3327         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3328         that fixes an issue with AOP_PCODE asmop's offset,
3329         * (pic16_popCopyReg): update instance field too,
3330         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3331         function of pic port,
3332         * (genCmp, genAnd, genAssign),
3333         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3334
3335 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3336
3337         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3338         variables initial values to idata section,
3339         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3340         variables in some functions. This utilizes parmBytes field of iCode
3341         structure to hold the offset of the variable in stack. (might be
3342         able to use the stack field too?)
3343         * applied patch from Raphael Neider # ### , # ###
3344         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3345         variable initial values in idata section,
3346         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3347         for static variables with initial value
3348         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3349         applied fix in while loop from Raphael Neider.
3350
3351 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3352
3353         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3354         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3355         * src/ds390/ralloc.c (serialRegAssign): spill bits
3356         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3357         * support/Util/SDCCerr.c,
3358         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3359         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3360         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3361
3362 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3363
3364         * device/include/sdcc-lib.h: inserted LGPL, added includes
3365           asm/ds390/features.h and asm/mcs51/features.h
3366         * device/include/asm/default/features.h,
3367         * device/include/asm/gbz80/features.h,
3368         * device/include/asm/z80/features.h: added empty _AUTOMEM
3369           and _STATMEM
3370         * device/include/asm/ds390/features.h,
3371         * device/include/asm/mcs51/features.h: added files with defines for
3372           _AUTOMEM and _STATMEM indicating automatic and static storage class
3373         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3374         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3375         * src/SDCCicode.c (geniCodeCast),
3376         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3377         * src/SDCCloop.c (loopInduction): removed unused variable lr
3378         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3379           to convertToFcall to include char modulo (RFE 1065037), added check
3380           if left operand is unsigned and use abs of literal value
3381         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3382           as it doesn't work after conversion from peephole.def to peephole.rul
3383         * src/mcs51/gen.c (toBoolean): added check for size,
3384           (genModOneByte): optimized code for signed char modulo a literal
3385           power of 2 (thanks to Hubert Sack),
3386           (genRRC): removed unnecessary "clr c",
3387           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3388         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3389           jump optimization,
3390           swapped rules 256.c and 256.d,
3391           extended 256.d by using new multiple checks (thanks Erik),
3392           added rules 256.e and 256.f,
3393           updated rule 261.a and 261.b to new generated code
3394         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3395
3396 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3397
3398         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3399           induction related bugs, including first part of bug #1074377
3400
3401 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3402
3403         * applied patch from bug-report #1076292,
3404         * applied patches for genAnd and Goto-optimizations for Raphael
3405         Neider,
3406         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3407         dump a less iCode information,
3408         * src/pic16/device.h (pic16_options_t): added field debgen,
3409         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3410         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3411         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3412         puclic,
3413         * (various functions): added macros FENTRY and FENTRY2 to functions,
3414         to emit function prologue,
3415         * (various functions): fixed indentation,
3416         * (genNearPointerGet): fixed loading of FSR0,
3417         * (genPackBits): applied patch from Raphael Neider to fix updating
3418         of FSR0 and touching only the modified bits,
3419         * src/pic16/genarith.c (various functions): added macros FENTRY to
3420         emit function prologue in comments,
3421         * src/pic16/pcode.h: added functions debugf2, debugf3,
3422         * src/pic16/ralloc.c: partial fix for packForPush caused
3423         segmentation fault,
3424
3425 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3426
3427         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3428           <stsp AT users.sourceforge.net> with reversed byte order
3429         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3430
3431 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3432
3433         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3434           bug #1074377
3435         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3436         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3437
3438 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3439
3440         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3441
3442 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3443
3444         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3445           conditions,
3446           (setFromConditionArgs): friendly operand parser for peephole rules,
3447           (operandBaseName, operandsNotRelated): new peephole condition
3448           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3449           architecture specific register naming into account, handles n-way
3450           comparisons, and supports quoted literals
3451         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3452
3453 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3454
3455         * src/mcs51/peeph.def: fixed bug #1076940
3456
3457 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3458
3459         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3460
3461 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3462
3463         Adding support for replacing ljmps with sjmps in jumptables
3464         generated for switch statements. For now you need to set the
3465         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3466         Now 4 algorithms for mcs51 jumptable generation are used:
3467         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3468         addresses loaded pc-relative for up to 112 cases and stack-pushing
3469         target addresses loaded with offset from dptr for up to 256 cases.
3470
3471         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3472         * src/mcs51/main.c: adapted constants for switch table generation
3473         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3474
3475 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3476
3477         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3478         * support/regression/tests/bug1057979.c: added test for bug 1073386
3479
3480 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3481
3482         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3483         compilers
3484
3485 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3486
3487         * src/pic16/device.h,
3488         * src/pic16/genarith.c,
3489         * src/pic16/glue.c,
3490         * src/pic16/main.c,
3491         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3492
3493 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3494
3495         Large cummulative patch for pic16 port.
3496         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3497         to call when a stack overflow occurs,
3498         * (malloc.h): added CVS Id tag,
3499         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3500         variable,
3501         * added libc directory. The current version of LibC contains string
3502         functions, ctype functions and macros and some functions of the
3503         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3504         be extensively tested in the future. Standard disclaimer here.
3505         Library is not automatically build yet. But one can build it by
3506         invoking 'make' inside the libc directory.
3507         * added ADC library under libio. Preliminary version yet.
3508
3509         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3510         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3511         aopForRemat() now and not by pic16_aopOp(),
3512         * (pic16_popGetTempReg): removed warning messgae when allocating
3513         temporary registers, its a buggy feature and will be removed,
3514         * (pic16_popGet): set register instance field in AOP_CRY,
3515         * (pic16_outBitC): fixed for results in size greater than 1,
3516         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3517         * (pic16_storeForReturn): optimized return of 0,
3518         * (genCmp): experimental code for new genCmp which uses PIC18's
3519         special compare&skip instructions. Initial tests fail some times
3520         with variables grater than 1 byte in size, so new code is disabled,
3521         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3522         a single bit,
3523         * (genCast): began a fix to optimize the casting of a bit to another
3524         bit, now assigning a bitfield to another bitfield will fail, sorry,
3525         * src/pic16/main.c: disabled the use of lr-support feature,
3526         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3527         * added some function prototypes, added function _debugf prototype,
3528         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3529         bits with offset (case PO_GPR_BIT),
3530         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3531         command line,
3532         * (isBankInstruction): modified to return 0 for no banking instruction,
3533         and 1 for banking instruction,
3534         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3535         caused stop processing pCodes after a inline assembly block,
3536         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3537         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3538         registers when it shouldn't,
3539         * src/pic16/ralloc.c (allocReg): add preliminary support for
3540         supporting a limited set of temporary registers,
3541
3542 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3543
3544         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3545           genDataPointerSet): ensure assignments always copy in MSB to LSB
3546           order,
3547           (loadRegFromAop): recognize CLRH optimization,
3548           (genFunction): optimize RECEIVE iCodes in reentrant functions
3549
3550 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3551
3552         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3553           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3554           selected.
3555         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3556         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3557           contiguous with data
3558
3559 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3560
3561         * device/lib/_gptrget.c (_gptrget),
3562         * device/lib/_gptrgetc.c (_gptrgetc),
3563         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3564           instead of sjmp to ret
3565         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3566           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3567
3568 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3569
3570         * .version: bumped version to 2.4.7
3571         * device/lib/_gptrget.c (_gptrget): is now _naked
3572         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3573         * device/lib/_gptrput.c (_gptrput): is now _naked
3574         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3575           (createFunction): fixed xstack
3576         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3577         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3578           or bit either,
3579           (geniCodeCritical): store original interrupt state in an iTemp bit
3580           var unless stack-auto
3581         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3582         * src/SDCCmain.c (setIncludePath): added include/target to search path
3583         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3584         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3585           prototype,
3586           (processFuncArgs): put bit vars in bit area
3587         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3588           unsaveRBank): fixed xstack,
3589           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3590           (genFunction, genEndFunction): fixed xstack,
3591           (genAssign): optimization don't walk backwards through mem
3592         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3593         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3594         * support/regression/Makefile: also make library (for stack-auto) when
3595           making "all" and added "test-mcs51-xstack-auto"
3596         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3597         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3598         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3599         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3600         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3601           make-library by MAKE_LIBRARY
3602         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3603           regression tests for xstack
3604         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3605         * support/regression/tests/critical.c: test for critical on mcs51
3606
3607 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3608
3609         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3610           built version of sdcc instead of installed version
3611
3612 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3613
3614         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3615         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3616           vprintf.c now
3617         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3618         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3619           WARNING: remove device/lib/build/z80/printf.o by hand when
3620           updating from previous build!
3621         * device/lib/z80/printf.c: updated comment
3622         * support/regression/tests/bug1057979.c: test all ports now
3623         * support/regression/tests/bug1065458.c: file added
3624
3625 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3626
3627         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3628           *_start and *_end symbols for static functions
3629
3630 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3631
3632         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3633           and search crt0.o in all library paths,
3634           (setIncludePath): proper handling of --nostdinc,
3635           (setLibPath): proper handling of --nostdlib
3636         * support/regression/Makefile,
3637         * support/regression/ports/ds390/spec.mk,
3638         * support/regression/ports/gbz80/spec.mk,
3639         * support/regression/ports/hc08/spec.mk,
3640         * support/regression/ports/mcs51/spec.mk,
3641         * support/regression/ports/mcs51-large/spec.mk,
3642         * support/regression/ports/mcs51-stack-auto/spec.mk,
3643         * support/regression/ports/z80/spec.mk: use include and lib files from
3644           built version of sdcc instead of installed version
3645         * doc/sdccman.lyx: fixed typo in --nostdinc
3646
3647 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3648
3649         * src/pic/pcode.c,
3650         * src/pic/device.c,
3651         * src/pic/ralloc.c,
3652         * src/pic/gen.c : added support to generate code for struct bit fields.
3653
3654 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3655
3656         * as/xa51/xa_version.h,
3657         * device/include/errno.h,
3658         * device/include/regc515c.h,
3659         * device/lib/_itoa.c,
3660         * device/lib/_ltoa.c,
3661         * device/lib/ser_ir_cts_rts.c,
3662         * sim/ucsim/xa.src/glob.cc,
3663         * sim/ucsim/xa.src/inst_gen.cc,
3664         * sim/ucsim/xa.src/xa_bit.cc,
3665         * sim/ucsim/xa.src/xa_sfr.cc,
3666         * sim/ucsim/z80.src/inst_dd.cc,
3667         * sim/ucsim/z80.src/inst_fdcb.cc,
3668         * support/scripts/keil2sdcc.pl,
3669         * src/pic16/pic16.dsp,
3670         * src/pic16/pic16a.dsp: corrected cvs line endings
3671         * device/lib/printf_large.c: fixed bug 1057979
3672         * src/pic16/gen.c: fixed non-C standard code
3673         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3674         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3675         * support/regression/ports/mcs51/support.c: reload T1 asap
3676         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3677           pdata use and clear idata startup behaviour
3678         * support/regression/tests/bug1057979.c: added
3679
3680 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3681
3682         * device/examples/ds390/ow390/ad26.h,
3683         * device/examples/ds390/ow390/cnt1d.h,
3684         * device/examples/ds390/ow390/crcutil.c,
3685         * device/examples/ds390/ow390/ownet.h,
3686         * device/examples/ds390/ow390/owsesu.c,
3687         * device/examples/ds390/ow390/swt12.h,
3688         * device/examples/ds390/ow390/swtoper.c,
3689         * device/examples/ds390/ow390/temp10.h,
3690         * device/examples/ds390/ow390/thermodl.c,
3691         * device/examples/ds390/tinitalk/tinitalk.dsp,
3692         * device/examples/ds390/tinitalk/tinitalk.dsw,
3693         * device/examples/mcs51/clock/hw.h,
3694         * device/examples/mcs51/simple2/go.bat,
3695         * device/examples/serialcomm/windows/serial.h,
3696         * device/examples/xa51/dummy.c,
3697         * device/examples/xa51/hello.c,
3698         * device/include/80c51xa.h,
3699         * device/include/at89x051.h: corrected cvs line endings
3700
3701 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3702
3703         * src/pic16/main.c (options): added command line --gstack, to trace
3704         stack over/under flows,
3705         * added pragma 'wparam' to allow passing first byte of function
3706         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3707         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3708         call to __gstack_test function and sets up the symbol as extern,
3709         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3710         * popaop): added call to pic16_testStackOverflow,
3711         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3712         wparamList list,
3713         * (genCall, genPcall): now all parameters are passed via stack
3714         except in functions that are pass to wparam pragma in which WREG is
3715         used too,
3716         * (genPcall): REENTRANT flag is checked to see if variable prototype
3717         contains reentrant keyword, don't call a non-reentrant function, via
3718         a reentrant function pointer or vice versa, functions are never
3719         passed via WREG,
3720         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3721         D.Winkler,
3722         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3723         SIGSEGV when accessing a NULL register stucture,
3724         * (pic16_printGPointerType): modified to handle UPPER modifier for
3725         function initializers, changed prototype of function to simpler one,
3726         * (pic16_printIvalFuncPtr): check to see if function is already
3727         added in externs list,
3728         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3729         optimized a move from W to SFR with a move to the same register
3730         later after a CALL,
3731         * device/lib/pic16/debug: NEW directory, contains debug features
3732         which are enabled when linking with libdebug.lib, currently command
3733         line option --gstack enables stack pointer tracing for over/under
3734         flow, corresponding sources are in debug/gstack
3735
3736 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3737
3738         * doc/sdccman.lyx: updated SDCC version,
3739         * (PIC16 port): update list of command line options,
3740         * src/pic16/device.h (structure pic16_options_t): added field gstack
3741         to enable stack overflow tracing on push/pops,
3742         * src/pic16/device.c (statistics structure): added statistics
3743         structure,
3744         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3745         pic16_dump_int_registers): increase statistics counters for each
3746         * variable which is encountered
3747         * (pic16_dump_usection): emit each .udata variable to its own udata
3748         section,
3749         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3750         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3751         parameters via stack, otherwise use old scheme,
3752         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3753         assembler output file,
3754         * src/pic16/main.c: added command line options --gstack to enable
3755         push/pop tracing for stack overflow,
3756         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3757         instructions): added size of each instruction,
3758         * (pic16_countInstruction): estimate size of instructions in
3759         the_pFile list, inline assembly blocks are not counted,
3760         * (pic16_FixRegisterBanking): trace previous register usage, when
3761         banksel optimizations is greater than 0, don't emit a redudant
3762         banksel directive,
3763
3764 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3765
3766         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3767         * src/pic16/ralloc.c : applied same fix for pic16.
3768         * src/pic/gen.c : tidied it up a little.
3769
3770 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3771
3772         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3773         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3774
3775 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3776
3777         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3778
3779 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3780
3781         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3782         non-reentrant function __modsint in the interrupt function (thus
3783         corrupting math operations during serial I/O)
3784         * device/lib/ser_ir.c: as above, changed buffersize
3785         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3786         256.c,d for zeroing
3787         * doc/Makefile: added option -t for rsync
3788
3789 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3790
3791         * src/SDCCast.h (struct ast),
3792         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3793
3794 2004-10-20 Borut Razem <borut.razem AT siol.net>
3795
3796         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3797         package
3798
3799 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3800
3801         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3802         makefile targets,
3803         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3804         support functions to replace long sequences of MOVFF's from access
3805         bank registers to stack and vice versa,
3806         * src/pic16/device.h: added new field opt_flags, where optimization
3807         flags can be set to enable certain features,
3808         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3809         * pBlock, (genFunction, genEndFunction): surroung loop for
3810         saving/loading used registers in stack with PC_INFO pCodes,
3811         INF_LREGS. Code in between can then be optimized by pCode optimizer
3812         to support function calls,
3813         * (genDataPointerSet): fixed bug which loaded float fields in
3814         structures with corrupt data,
3815         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3816         in a standard way debug info on stderr. Feature used for developing
3817         and debugging only,
3818         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3819         obsolete chunks of code,
3820         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3821         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3822         * pic16/src/pcode.c (pic16_newpCodeInfo,
3823         * (pic16_newpCodeOpLocalRegs),
3824         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3825         feature,
3826         * (pic16_pCodeConstString): printing of the initial value of a
3827         symbol as a comment is inhibited since parsing was already done by
3828         copyStr and output is corrupt,
3829         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3830
3831 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3832
3833         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3834
3835 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3836
3837         * as/mcs51/lkarea.c: removed old K&R style,
3838           (lnksect): changed check on boundary error,
3839           (lnksect2): changed check on boundary error,
3840           (lnksect2): extend XSTK to end of page if size = 1
3841         * as/mcs51/lkmain.c: removed old K&R style,
3842           (Areas51): create l_IRAM symbol
3843         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3844         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3845           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3846         * device/lib/_mullong.c: added version to be compiled with xstack
3847         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3848         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3849         * device/lib/mcs51/crtxstack.asm: fixed comment
3850         * src/SDCCglue.c: maxInterrupts defaults to 0,
3851           (emitMaps): added pdata,
3852           (createInterruptVect): (re)moved default,
3853           (glue): added pdata,
3854           (glue): moved __start__xstack to XSTK with default size 1
3855         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3856           and options.float_rent when options.stackAuto is set,
3857           (linkEdit): only write XDATA_NAME if provided on command line
3858         * src/SDCCmem.h,
3859         * src/SDCCmem.c: added pdata
3860         * src/port.h: added pdata_name to PORT
3861         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3862           (saveRegisters, unsaveRegisters): removed usage of B,
3863           (genMinus): fixed accumulator clash,
3864           (genJumpTab): added comment, this needs another look
3865         * src/mcs51/gen.c: added check for "B in use" paranoia,
3866           added pushB() and popB()
3867         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3868           chance
3869         * src/avr/main.c,
3870         * src/ds390/main.c,
3871         * src/hc08/main.c,
3872         * src/mcs51/main.c,
3873         * src/pic/main.c,
3874         * src/pic16/main.c,
3875         * src/xa51/main.c,
3876         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3877           added PSEG (PAG,XDATA) or NULL to port specifier
3878         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3879         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3880           (_mcs51_genInitStartup): removed __start__xstack equ,
3881           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3882         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3883         * src/z80/gen.c (_rleAppend): fixed warnings
3884         * support/regression/tests/zeropad.c: added pdata test
3885         * .version: bumped to 2.4.6
3886
3887 2004-10-17 Borut Razem <borut.razem AT siol.net>
3888
3889         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3890         as a part of nightly build
3891
3892 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3893
3894         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3895         WREG holds the first byte function parameters,
3896         * (aopForSym): take special case for symbols which are in FARSPACE
3897         but in CODESPACE too,
3898         * (assignResultValue): modified to take into account _G.useWreg,
3899         * (genCall): don't use wreg for parameter passing when function is
3900         declared as reentrant, too, added optimization INCF to stack
3901         pointer when stack parameter count is 1,
3902         * (genFunction, genEndFunction): refurnished and fixed to not using
3903         wreg for passing parameters when function has varargs or is
3904         reentrant, fixed bug with symbol name compare for generating
3905         functions in absolute address,
3906         * (pic16_storeForReturn): refurnished,
3907         * (genCmp): began writing a new version of the function, not ready
3908         yet, therefore it is disabled,
3909         * (genAssign): do not read code memory when assigning a function to
3910         a pointer function,
3911         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3912         array of characters, not pointer,
3913         * (pic16initialComments): in debug mode emit an .ident directive for
3914         the assembler,
3915         * (_process_pragma): emit a new warning type (internal to pic16)
3916         when setting stack to default length, emit a similar warning when
3917         placing a function at absolute address and address is not word aligned
3918         * (_pic16_parseOptions): added 'return TRUE' statement,
3919         * (_pic16_linkEdit): if compiling a source, then add the source's
3920         file object, first in the list of objects to link,
3921
3922 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3923
3924         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3925         * src/pic/main.c : removed VC warning.
3926         * src/pic/gen.c : changed comment.
3927
3928 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3929
3930         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3931         reference to a deprecated symbol _GPTRREG was causing failure to
3932         link. Thanks G. M. Gallant for the info.
3933
3934 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3935
3936         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3937         comments for Bugs item #954788.
3938
3939 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3940
3941         * src/pic16/device.c (pic16_dump_gsection,
3942         * pic16_groupRegistersInSection): handle symbols declared to be in
3943         access bank differently,
3944         * src/pic16/gen.c (struct _G): added field resDirect,
3945         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3946         send values read from stack directly to result and don't allocate
3947         temporary values,
3948         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3949         same registers,
3950         * (pic16_sameRegsOfs): NEW,
3951         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3952         free because they were not allocated from temporary pool,
3953         * pic16_popRegFromString): workaround to fix a problem with
3954         allocating variables twice or never,
3955         * (genGenPointerGet): using PRODL instead of FSR0H,
3956         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3957         instead of FSR0H,
3958         * (genAssign): take advantage of the _G.resDirect flag,
3959         * (genCast): around line 11844, use mov2f instead of directly
3960         MOVFF'ing between operands to account for literal values,
3961         * src/pic16/genutils.c: some new debug functions for gpsim have been
3962         added,
3963         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3964         float with integer part only,
3965         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3966         place variables in access bank
3967         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3968         updated sources to reflect recent changes in gen.c
3969
3970 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3971
3972         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3973         sources that searched for headers in installation path, now the
3974         device/include/pic16 is used,
3975         * src/pic16/glue.c (pic16glue),
3976         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3977         .line directives if not in debug mode, this suppresses assembler's
3978         warnings for ignored directives
3979
3980 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3981
3982         * src/port.h: made reset_regparms prototype void parameter explicit.
3983         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3984         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3985         * doc/sdccman.lyx: documented warning disabling and how to use
3986           printf_large to make it print floats.
3987         * device/include/stdbool.h: NEW
3988         * device/lib/_atof.c,
3989         * device/lib/_divuint.c,
3990         * device/lib/_divulong.c,
3991         * device/lib/expf.c,
3992         * device/lib/printf_large.c,
3993         * device/lib/sincosf.c,
3994         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3995         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3996           a completely reentrant lib.
3997
3998 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3999
4000         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4001         * device/include/pic16/stdio.h: fixed bug with colon
4002
4003 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4004
4005         * device/include/pic16/stdio.h,
4006         * device/include/pic16/stdlib.h,
4007         * device/include/pic16/math.h: NEW
4008         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4009         declared as _naked to reduce overhead
4010         * device/lib/Makefile.in (target port-specific-objects-pic16):
4011         changed * to *.* so to ignore the CVS directory,
4012         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4013         stacked variables back in stack,
4014         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4015         corruption
4016
4017 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4018
4019         * .version: bumped version number to 2.4.5
4020         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4021         * support/Util/SDCCerr.c (messages structure): added entry for
4022         W_POSSBUG2
4023
4024         Large cumulative patch for pic16 port and libraries.
4025         * device/include/pic16/sdcc-lib.h,
4026         * device/include/pic16/stdarg.h,
4027         * device/include/asm/pic16/features.h,
4028         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4029         * device/include/pic16/float.h: changes reentrant keyword with
4030         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4031         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4032         updated target build-libraries to include objects from gptr,
4033         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4034         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4035         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4036         all function headings,
4037         * src/SDCCmain.c: added global parameter userIncDirsSet,
4038         * (parseCmdLine): when option -I is encountered add directory to
4039         userIncDirsSet too,
4040         * src/version.awk: added space between control and long,
4041         * src/pic16/NOTES: added some notes for the port,
4042         * src/pic16/gen.c: added prototype for mov2fp function,
4043         * (fReturnpic16[]): properly named return value registers,
4044         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4045         * (aopForSym): added code to handle symbols with onStack flag set,
4046         symbols onStack are allocated PTRSIZE bytes,
4047         * (aopFreeAsmop): handles special case where asmops are stack objects,
4048         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4049         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4050         added argument lock to trace flaws in allocating temporary registers
4051         when developing port,
4052         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4053         * (pic16_popRegFromString): reenabled allocating a direct register
4054         from string,
4055         * (assignResultValue): various beautifications,
4056         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4057         referenced function argument,
4058         * (genIpush): reenabled to allow stacked arguments, handles only
4059         ic->parmPush iCodes,
4060         * (genCall, genPcall): major changes to allow for variable argument
4061         functions, fixed a bug with falsely restoring stack pointer after
4062         returning from call,
4063         * (genFunction): pending code for critical function,
4064         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4065         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4066         * (genNearPointerGet): fixed bug with indirect reading, was always
4067         reading from INDF0
4068         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4069         pointers,
4070         * (genAddrOf): rewrote code to take address of a stacked function parameter
4071         * (genCast): fixed casting to generic pointer type,
4072         * src/pic16/gen.h: added AOP_STA,
4073         * (struct asmop): added field stk,
4074         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4075         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4076         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4077         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4078         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4079         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4080         generic pointers,
4081         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4082         and library paths,
4083         * (pic16_port structure): generic pointer size is set to 3,
4084         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4085         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4086         compiler warning,
4087         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4088         operand is an iTemp,
4089
4090 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4091
4092         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4093         * debugger/mcs51/simi.c: addapt new syntax of s51
4094
4095 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4096
4097         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4098         * src/pic16/pcode.c: commented out some calls to free() in order to
4099         fix bug #989576,
4100
4101 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4102
4103         * src/SDCCicode.h,
4104         * src/SDCCicode.c (isiCodeInFunctionCall),
4105         * src/avr/ralloc.c (selectSpil),
4106         * src/pic/ralloc.c (selectSpil),
4107         * src/pic16/ralloc.c (selectSpil),
4108         * src/ds390/ralloc.c (selectSpil),
4109         * src/hc08/ralloc.c (selectSpil),
4110         * src/xa51/ralloc.c (selectSpil),
4111         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4112         stack in the middle of a function call sequence (fixes bug #1020268)
4113         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4114         costs associated with the minimum switch case.
4115
4116 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4117
4118         * src/SDCC.lex: fixed bug #1030549
4119
4120 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4121
4122         * src/SDCCcse.h (struct cseDef),
4123         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4124         over a function call if the CSE is derived from a symbol whose
4125         address has been taken (fixes bug #1029883)
4126         * support/regression/tests/bug-1029883: a new regression test for
4127         this bug
4128
4129 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4130
4131         * src/hc08/gen.c (emitinline): fixed bug #1029778
4132         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4133         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4134         and starts toward RFE #905167)
4135
4136 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4137
4138         * src/pic16/gen.c (mov2f): New function to move an operand to
4139         another without considering if it is a literal or a register,
4140         * (pic16_sameRegs): don't check if they are both AOP_REG,
4141         * (AccRsh): removed andmask=0 lines,
4142         * (genLeftShift): duplicated to be improved in future versions,
4143         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4144         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4145         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4146         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4147         * (insertBankSwitch): fixed inserting banksel directives algorithm
4148         for instructions that follow a skip instruction, this fixes a report
4149         for broken subtraction code generation,
4150         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4151         iCode is a left op, just in case result and right share the same
4152         registers
4153
4154 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4155
4156         * src/hc08/main.c,
4157         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4158         preservation of HX
4159         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4160         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4161         on 2004-09-12; it was buggy
4162
4163 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4164
4165         * src/SDCCsymt.h: removed RESULT_CHECK
4166         * src/SDCCast.c,
4167         * src/SDCCglue.c,
4168         * src/SDCCval.c,
4169         * src/pic/glue.c,
4170         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4171
4172 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4173
4174         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4175         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4176         configuration values no more rejected by compiler, they are assigned
4177         to configuration registers with a warning message instead,
4178         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4179         the for-loop so last conf register is emitted too,
4180         * (_pic16_initPaths): link library libsdcc.lib by default,
4181         * (_hasNativeMulFor): modified test for multiplication according to
4182         Raphael Neider's remarks. Integer multiplication is also done with
4183         support functions,
4184         * device/include/pic16/pic18fregs.h: corrected type error in while
4185         testing and including 18f6720 header file
4186
4187 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4188
4189         * src/pic16/device.h (pic16_options): removed field use_crt,
4190         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4191         until an optimization to handle single bits is added,
4192         * (pic16_loadFSR0): moved before genUnpackBits,
4193         * (genAnd): some white lines removed,
4194         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4195         leave_reset flags in pic16_options when using crt modules,
4196
4197 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4198
4199         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4200           for bugs 898889 & 979599. Also used some safer print instructions.
4201
4202 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4203
4204         * src/pic16/device.h (pic16_options_t): added field use_crt,
4205         crt_name, no_crt,
4206         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4207         catch a probable future bug,
4208         * src/pic16/gen.c: aopIdx function commented out,
4209         * (genAssign): commented out old code which used aopIdx,
4210         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4211         code, added if conditionals to take into account the --use-crt
4212         command line options,
4213         * src/pic16/main.c (pic16_optionsTable): added new command line
4214         options, --use-crt= and --no-crt,
4215         * (_pic16_linkEdit): now the proper crt object is added in the
4216         linker command line except than when --no-crt is specified,
4217         * src/pic16/pcode.c,
4218         * src/pic16/pcode.h: added some structures and functions for a new
4219         optimization scheme to compansate for instruction overhead between
4220         same iCodes, this scheme is currently under development and is not
4221         working in any way,
4222         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4223         to && operator,
4224         * device/lib/pic16/startup/crt0i.c,
4225         * device/lib/pic16/startup/crt0iz.c: added global char variable
4226         __uflags to force the generation of an idata section
4227
4228 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4229
4230         * doc/Makefile,
4231         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4232         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4233
4234 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4235
4236         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4237         Frieder) and clarified the default code optimization mode
4238
4239 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4240
4241         * src/SDCC.lex (doPragma, process_pragma),
4242         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4243         "opt_code_size", and "opt_code_balanced"
4244         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4245         regrouped options by category, added support for category headers
4246         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4247         and "--opt-code-size"
4248         * doc/sdccman.lyx: documented these new options and pragmas
4249         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4250         preference into account
4251
4252 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4253
4254         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4255           geniCodePreDec): Fixed bug 904237 by generating a warning
4256         * src/SDCCerr.h,
4257         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4258
4259 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4260
4261         * src/pic/device.c : When no max ram set validate full memory range.
4262         * src/pic/pcode.c,
4263         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4264
4265 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4266
4267         * device/lib/_gptrget.c,
4268         * device/lib/_gptrput.c: updated comment
4269         * device/lib/calloc.c,
4270         * device/lib/free.c,
4271         * device/lib/malloc.c,
4272         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4273         * src/SDCCcse.c (cseBBlock),
4274         * src/SDCCicode.c (printOperand, geniCodeArray),
4275         * src/SDCCicode.h (struct operand): fixed bug 868103
4276         * support/regression/tests/bug-868103.c: added
4277         * src/SDCCast.c (searchLitOp),
4278         * src/SDCCcse.h (struct cseDef),
4279         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4280         * src/SDCCicode.h (struct operand),
4281         * src/SDCCsymt.h (struct sym_link),
4282         * src/avr/gen.c (hasInc),
4283         * src/ds390/gen.c (hasInc),
4284         * src/hc08/gen.c (genPlusIncr, hasInc),
4285         * src/mcs51/gen.c (hasInc),
4286         * src/pic16/glue.c (pic16_printIvalChar),
4287         * src/pic16/ralloc.c (regWithIdx),
4288         * src/xa51/gen.c (hasInc) : removed warnings
4289         * src/SDCCast.c (createBlock): added comment ???
4290         * src/hc08/ralloc.c: updated comments
4291
4292 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4293
4294         * doc/sdccman.lyx: updated section on switch statements, added
4295         section about semaphore locking
4296         * doc/Makefile: added option -info for latex2html
4297         * device/lib/_gptrget.c,
4298         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4299
4300 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4301
4302         * src/pic/device.h,
4303         * src/pic/device.c,
4304         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4305          maxram is less than 0x100.
4306
4307 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4308
4309         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4310
4311 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4312
4313         * src/port.h,
4314         * src/mcs51/main.c,
4315         * src/ds390/main.c,
4316         * src/z80/main.c,
4317         * src/hc08/main.c,
4318         * src/pic/main.c,
4319         * src/pic16/main.c,
4320         * src/avr/main.c,
4321         * src/xa51/main.c
4322         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4323         a jump table is the best form for a switch statement, including
4324         automatic insertion of missing cases to make the case range
4325         continuous. Developed in collaboration with Frieder Ferlemann.
4326
4327 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4328
4329         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4330         accumulator result if it needs sign extension
4331
4332 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4333
4334         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4335
4336 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4337
4338         * device/lib/gbz80/printf.c,
4339         * device/lib/z80/printf.c: removed define for NULL
4340
4341 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4342
4343         * as/xa51/xa_link.c,
4344         * device/examples/ds390/ow390/ad26.c,
4345         * device/examples/ds390/ow390/cnt1d.c,
4346         * device/examples/ds390/ow390/counter.c,
4347         * device/examples/ds390/ow390/ds2480.h,
4348         * device/examples/ds390/ow390/ds2480ut.c,
4349         * device/examples/ds390/ow390/findtype.c,
4350         * device/examples/ds390/ow390/gethumd.c,
4351         * device/examples/ds390/ow390/owllu.c,
4352         * device/examples/ds390/ow390/ownetu.c,
4353         * device/examples/ds390/ow390/swt12.c,
4354         * device/examples/ds390/ow390/swtloop.c,
4355         * device/examples/ds390/ow390/temp.c,
4356         * device/examples/ds390/ow390/temp10.c,
4357         * device/examples/ds390/ow390/thermo21.c,
4358         * device/examples/ds390/ow390/tinilnk.c,
4359         * device/examples/ds390/ow390/tstfind.c,
4360         * device/examples/serialcomm/windows/serial.cpp,
4361         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4362         * device/include/reg51.h: fixed line endings for cvs
4363
4364 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4365
4366         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4367         packRegsForAccUse, packRegisters): new accumulator register
4368         packing algorithm
4369         * support/regression/ports/hc08/support.c (_putchar): suppress
4370         warning of unused variable
4371         * src/SDCCicode.c: added SWAP entry to codeTable
4372
4373 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4374
4375         * device/lib/sprintf.c: forgot to add this file before previous commit
4376
4377 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4378
4379         * src/pic16/gen.c (genPackBits): added operand right in function
4380         parameters, load result directly if p_type is POINTER (that is
4381         called by genNearPointerSet)
4382         * (genUnPackBits): added operand left in function parameters,
4383         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4384         FSR0 if accessing bitfields,
4385
4386 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4387
4388         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4389           _print_format; updated printf, sprintf, vsprintf
4390         * device/include/asm/default/features.h: corrected comment/define
4391         * device/lib/Makefile.in: added sprintf.c
4392         * device/lib/libsdcc.lib: added sprintf module
4393         * device/lib/printf_large.c,
4394         * device/lib/vprintf.c,
4395         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4396           into these 3 files
4397         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4398         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4399         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4400           hc08 test
4401         * support/regression/tests/zeropad.c: define idata as data for hc08
4402
4403 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4404
4405         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4406         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4407         labels are referenced at least once (even if a reference is not found)
4408         * src/hc08/gen.c (emitcode): set isComment flag for comments
4409         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4410         loads), rules 6a..6b (optimize jumps to return)
4411
4412 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4413
4414         * device/lib/acosf.c (acosf),
4415         * device/lib/asinf.c (asinf),
4416         * device/lib/atanf.c (atanf),
4417         * device/lib/ceilf.c (ceilf),
4418         * device/lib/cosf.c (cosf),
4419         * device/lib/coshf.c (coshf),
4420         * device/lib/cotf.c (cotf),
4421         * device/lib/fabsf.c (fabsf),
4422         * device/lib/floorf.c (floorf),
4423         * device/lib/log10f.c (log10f),
4424         * device/lib/logf.c (logf),
4425         * device/lib/sinf.c (sinf),
4426         * device/lib/sinhf.c (sinhf),
4427         * device/lib/sqrtf.c (sqrtf),
4428         * device/lib/tanf.c (tanf),
4429         * device/lib/tanhf.c (tanhf),
4430         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4431         replaced all instances of "reentrant" in the library functions
4432         defined in math.h with this macro.
4433         * support/regression/tests/float_trans.c: reenabled test for hc08
4434
4435 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4436
4437         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4438         erroneously deleted
4439
4440 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4441
4442         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4443         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4444         multi-byte volatile operands are used
4445         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4446         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4447         initialization to area GSINIT0 so that it would always precede
4448         any static initializers in GSINIT
4449         * support/regression/tests/zeropad.c: fixed idata define for hc08
4450         * support/regression/tests/bug-927659.c,
4451         * support/regression/tests/float_trans.c: disabled tests for hc08
4452         pending missing library routines
4453         * .version: increased version number to 2.4.4 - hc08 port now passes
4454         regression tests
4455
4456
4457 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4458
4459         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4460         * Makefile.common.in,
4461         * as/Makefile,
4462         * as/hc08/Makefile.in,
4463         * as/mcs51/Makefile.in,
4464         * as/z80/Makefile.in,
4465         * debugger/mcs51/Makefile.in,
4466         * device/include/Makefile.in,
4467         * device/lib/Makefile.in,
4468         * doc/Makefile,
4469         * link/Makefile,
4470         * link/z80/Makefile.in,
4471         * packihx/Makefile.in,
4472         * sim/ucsim/main_in.mk,
4473         * sim/ucsim/avr.src/Makefile.in,
4474         * sim/ucsim/doc/Makefile.in,
4475         * sim/ucsim/gui.src/serio.src/Makefile.in,
4476         * sim/ucsim/hc08.src/Makefile.in,
4477         * sim/ucsim/s51.src/Makefile.in,
4478         * sim/ucsim/xa.src/Makefile.in,
4479         * sim/ucsim/z80.src/Makefile.in,
4480         * src/Makefile.in,
4481         * support/cpp2/Makefile.in,
4482         * support/librarian/Makefile,
4483         * support/makebin/Makefile: added DESTDIR to the install path proposed
4484         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4485         * doc/sdccman.lyx: added DESTDIR documentation
4486
4487 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4488
4489         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4490         instruction for interrupt handlers, use fast returns when returning
4491         from high priority interrupts
4492
4493 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4494
4495         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4496         code generation
4497         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4498         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4499         bugs, ported much of Bernhard's code from mcs51
4500         * src/mcs51/gen.c (genSend),
4501         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4502         than one when calling a reentrant function
4503         * device/lib/_mullong.c: defined an alternate struct layout for big
4504         endian ports (hc08)
4505
4506 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4507
4508         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4509         test
4510
4511 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4512
4513         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4514         are sane and complete before asking the port its prefered parameter
4515         passing method (fixes bug #1017633)
4516         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4517         and _ret3
4518
4519 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4520
4521         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4522         problem in bitfields >= 8 bits.
4523
4524 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4525
4526         * src/SDCCsymt.c: undid changes that were not meant to be committed
4527
4528 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4529
4530         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4531
4532 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4533
4534         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4535           copied and wrong bit got inverted
4536
4537 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4538
4539         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4540         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4541         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4542         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4543         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4544         assignments to bitfields at known addresses
4545         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4546         reads from bitfields at known addresses
4547         * src/hc08/ralloc.c (packRegisters),
4548         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4549         genhc08Code): optimize pointer get values used as conditionals
4550         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4551         and branch
4552
4553 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4554
4555         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4556         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4557         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4558         as conditionals
4559
4560 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4561
4562         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4563
4564 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4565
4566         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4567         related problems
4568
4569 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4570
4571         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4572
4573 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4574
4575         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4576         mcs51 port
4577
4578 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4579
4580         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4581
4582 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4583
4584         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4585         cases use more compact code.
4586
4587 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4588
4589         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4590
4591 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4592
4593         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4594
4595 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4596
4597         * src/SDCCsymt.h,
4598         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4599         parameter of changePointer() from symbol* to sym_link*
4600         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4601         * src/SDCCsymt.c (compareType): void* type is castable to other
4602         pointers, but not necesarily an exact match.
4603         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4604         is no longer blindly treated as an exact match.
4605         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4606
4607 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4608
4609         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4610
4611 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4612
4613         * src/pic/gen.c,
4614         * src/pic/pcode.c,
4615         * src/pic/ralloc.h,
4616         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4617
4618 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4619
4620         * src/pic/device.c,
4621         * src/pic/device.h,
4622         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4623
4624 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4625
4626         * src/mcs51/gen.c (emitcode): fixed bug #992819
4627
4628 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4629
4630         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4631           there's no need to make it worse
4632
4633 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4634
4635         * src/mcs51/ralloc.c (deassignLR),
4636         * src/ds390/ralloc.c (deassignLR),
4637         * src/hc08/ralloc.c (deassignLR),
4638         * src/z80/ralloc.c (deassignLR),
4639         * src/pic/ralloc.c (deassignLR),
4640         * src/pic16/ralloc.c (deassignLR),
4641         * src/avr/ralloc.c (deassignLR),
4642         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4643         rlivePoint): fixed another part of bug #971834
4644
4645 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4646
4647         * src/z80/main.c: enabled "critical" keyword
4648         * src/z80/mappings.i,
4649         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4650         functions (fixes bug #979646)
4651         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4652
4653 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4654
4655         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4656           such as c:\mydir.
4657
4658 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4659
4660         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4661           doesn't disable too much optimizations
4662
4663 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4664
4665         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4666
4667 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4668
4669         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4670
4671 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4672
4673         * src/pic/gen.c tidied up tabs
4674         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4675         * src/pic/main.c tidied up tabs
4676         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4677         * src/pic/pcoderegs.c tidied up tabs
4678         * src/pic/ralloc.c tidied up tabs
4679
4680 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4681
4682         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4683         to S_FIXED for pic16 port and when symbol is not in level 0,
4684         allocate for S_REGISTER storage class and pic16 port, too,
4685         * src/pic16/device.h: prototype for checkSym,
4686         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4687         * (pic16_assignConfigWordValue): test the value and the mask to
4688         validate that the value is suitable for the configuration word,
4689         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4690         collect extern declared symbols, don't emit symbol twice, check
4691         first if symbol is in publics set first,
4692         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4693         * added command line '--fstack' which enables an experimental
4694         feature for stack access, too buggy to be used yet...
4695         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4696         * (pic16_allocDirReg): when register has storage class S_REGISTER
4697         allocate in pic16_dynAccessRegs,
4698         * device/include/pic16/pic18f????.h: modified configuration word
4699         naming convention, words started as CONFIG0H but should be CONFIG1H
4700
4701 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4702
4703         * device/include/mcs51reg.h: fixed bug 970993
4704
4705 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4706
4707         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4708         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4709         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4710         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4711         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4712         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4713           error/warning numbers,
4714           added function setWarningDisabled()
4715         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4716         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4717           _memcmp.c _memmove.c calloc.c realloc.c free.c
4718         * support/regression/tests/malloc.c: added tests for new functionality
4719         * support/regression/tests/zeropad.c: added tests for truncated initializers
4720           and initialized char arrays starting with '\x0'
4721         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4722
4723 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4724
4725         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4726
4727 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4728
4729         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4730         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4731         peephole 177.e. Thanks to anonymous
4732
4733 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4734
4735         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4736         function isn't used in the source but referenced as a
4737         variable initializer then declare it as extern in .asm file
4738
4739 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4740
4741         * .version: increased version number to 2.4.3
4742
4743         Adding version extension according to ChangeLog CVS revision
4744         * src/Makefile.in (target all): added dependency 'version.h'
4745         * (rule version.h): added rule to create version.h from ChangeLog,
4746         * (rule dep): added dependency version.h,
4747         * src/version.awk: AWK script to create version.h
4748         * src/SDCCdwarf2.c (dwWriteModule),
4749         * src/SDCCglue.c (initialComments),
4750         * src/SDCCmain.c (printVersionInfo): modified to write after
4751         version string the version extension number,
4752         * src/SDCCutil.c: included "version.h"
4753         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4754         number,
4755         * src/SDCCutil.h: added prototype for getBuildNumber
4756
4757         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4758         includeDirsSet, too,
4759         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4760         const char [] is found in function prototype...
4761
4762         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4763         moving to WREG with source is already in WREG,
4764         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4765         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4766         * (aopForSym): stack'ed symbols are partially supported, added
4767         if-clause to support symbols in FARSPACE,
4768         * (sameRegs): added test for AOP_ACC to see if registers are same,
4769         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4770         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4771         * (pic16_popRegFromString): will not allocate a new register if it
4772         doesn't find one by name, bug may have introduced...
4773         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4774         * (genIpush): revived to use pic16 port's stack,
4775         * (genAddrOf): added incomplete case for stack'ed operand,
4776         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4777         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4778         can handle multibyte operands,
4779         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4780         * (pic16initialComments): added message for MPLAB compatibility
4781         mode enabled,
4782         * src/pic16/main.h: prototype for pic16_mplab_comp,
4783         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4784         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4785         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4786         because of increased complexity of procedure,
4787         * (_process_pragma): stack pragma changed to format 'stack pos len',
4788         emit symbol '_stack_end' to conform with gplink,
4789         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4790         to search for register,
4791         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4792         PO_GPR_REGISTER,
4793         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4794         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4795         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4796         case for PO_GPR_REGISTER,
4797         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4798         dies, the new era is ahead !...
4799         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4800         pic16_dynInternalRegs,
4801         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4802         * (pic16_allocDirReg): minor optimizations and bug fixes,
4803         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4804
4805         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4806         load stack and frame pointer with address of 'stack_end' symbol
4807
4808 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4809
4810         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4811         without source code but only variable initializers
4812
4813 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4814
4815         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4816         external are not declared as extern to reduce overhead while linking
4817
4818 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4819
4820         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4821
4822 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4823
4824         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4825           Yee Keat for the patch
4826         * src/SDCCast.c (decorateType): fixed bug #979599
4827         * src/ds390/gen.h: removed local fReturnSizeDS390
4828         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4829         * src/ds390/gen.c (genAnd, genOr, genXor),
4830         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4831
4832 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4833
4834         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4835         add relFilesSet to $3, manipulate $2 to handle linking of object
4836         files without source files in command line,
4837         * device/include/pic16 (all headers): added ID location macros,
4838         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4839         entries for ID location bytes,
4840         * (pic16_assignIdByteValue): NEW,
4841         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4842         added field dumpcalltree to pic16_options_t,
4843         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4844         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4845         emitting rFalseIfx label after check_carry label,
4846         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4847         pic16_emitDIRegs), NEW
4848         * (pic16glue): dump .calltree file when option --calltree found,
4849         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4850         * (_pic16_genAssemblerPreamble): emit ID locations after
4851         configuration registers,
4852         * (pic16_linkCmd): modifications of the link command,
4853         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4854         * (pic16_pCodeInitRegisters): don't init stack registers,
4855         * (pic16_findPrevInstruction): fixed bug,
4856         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4857         bug with immediate registers,
4858         * (buildCallTree): traces stack push and pop,
4859         * (pct2): dump also stack usage for each function,
4860         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4861         * (pic16_allocDirReg): various modifications,
4862         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4863         fixed to 1,
4864
4865 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4866
4867         * src/pic16/pcode.c: removed buggy double colon
4868
4869 2004-07-01 Borut Razem <borut.razem AT siol.net>
4870
4871         * support/scripts/sdcc.nsi: added include/pic16 to setup
4872
4873 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4874
4875         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4876         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4877         target 'clean',
4878         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4879         specific command line arguments. Also added sample lkr script
4880         for placing a variable at a specific memory bank.
4881         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4882         at a specific memory bank,
4883         * (pic16_dump_isection): fixed bug which caused string literals to
4884         be omitted when dumping idata section,
4885         * (pic16_groupRegistersInSection): added code to handle registers
4886         in specific memory banks,
4887         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4888         public, all references are renamed too,
4889         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4890         AOP_DPTR2,
4891         * (pic16_storeForReturn): added case to handle when dest is WREG,
4892         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4893         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4894         pic16_rel_udata, check to see if that register is marked as being
4895         a member of a specific memory bank,
4896         * (pic16_printIvalCharPtr): added code to add string literals either
4897         to code or the idata sections,
4898         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4899         also accept the 'udata' pragma,
4900         * src/pic16/main.h: new structure types sectName and sectSym
4901         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4902         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4903         * (pic16_findPrevInstruction): fixed, it returned nothing,
4904         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4905         instruction combinations,
4906         * (pic16_FixRegisterBanking): heavily reorganised,
4907         * (pic16_AnalyzeBanking): if generating banksel directives is
4908         disabled, then don't call FixRegisterBanking at all,
4909         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4910         completely removed,
4911         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4912
4913 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4914
4915         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4916         Phuah Yee Keat <yk.phuah AT nestac.com>
4917
4918 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4919
4920         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4921         correctly the IVT even if it is relocated to some other location
4922
4923 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4924
4925         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4926         * device/include/pic16/pic18f2220.h: NEW,
4927         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4928         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4929         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4930         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4931         nodefaultlibs, ivt_loc is the location of the interrupt vector
4932         table, and nodefaultlibs signs that default libraries should not be
4933         linked in link stage,
4934         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4935         according to --ivt-loc argument,
4936         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4937         when pragma stack is found,
4938
4939 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4940
4941         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4942         256 (range check), 257 (do while), 258.a-f (bit banging
4943         f.e. on 3-wire SPI bus)
4944
4945 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4946
4947         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4948         variables used exclusively within a loop
4949
4950 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4951
4952         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4953
4954 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4955
4956         * src/SDCClrange.c (computeClash): fixed bug #971834
4957
4958 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4959
4960         * src/mcs51/gen.c (genCmp): fixed bug #975903
4961         * src/hc08/gen.c (operandsEqu),
4962         * src/ds390/gen.c (operandsEqu),
4963         * src/z80/gen.c (operandsEqu),
4964         * src/pic/gen.c (operandsEqu),
4965         * src/pic16/gen.c (operandsEqu),
4966         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4967         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4968
4969 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4970
4971         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4972
4973 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4974
4975         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4976         default case in switch statement,
4977         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4978         to eliminate problem with initialisation of pointers, but problem
4979         still exists,
4980         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4981         * (emitStaticSegment): removed various lines emitting debug info,
4982         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4983         added processor registers for utilizing EEPROM,
4984         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4985         configurable and set 8
4986
4987 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4988
4989         * .version: increased version number to 2.4.2,
4990
4991         Cumulative patch for pic16 port
4992         * src/pic16/device.c: changed scheme to dump initial values for
4993         variables in idata segment, all print_idata* functions were removed,
4994         now the pic16_printIval* will be called,
4995         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4996         * _pic16_printPointerType, pic16_printPointerType,
4997         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4998         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4999         NEW, similar to the respective functions in SDCCglue.c,
5000         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5001         way, emitting hex bytes,
5002         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5003
5004 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5005
5006         * src/avr/ralloc.c (serialRegAssign),
5007         * src/xa51/ralloc.c (serialRegAssign),
5008         * src/pic/ralloc.c (serialRegAssign),
5009         * src/pic16/ralloc.c (serialRegAssign),
5010         * src/hc08/ralloc.c (serialRegAssign),
5011         * src/z80/ralloc.c (serialRegAssign),
5012         * src/ds390/ralloc.c (serialRegAssign),
5013         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5014
5015 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5016
5017         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5018         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5019
5020 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5021
5022         Cumulative patch for pic16 port:
5023         * src/pic16/device.h (typedef PIC16_device) modified fields for
5024         defining microcontrollers,
5025         * src/pic16/device.c: added new info for all devices in Pics16 array,
5026         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5027         to be optimised out by the pCode optimiser,
5028         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5029         specially, bug reported by G.M. Gallant,
5030         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5031         as force'd so that cannot be optimised out by pCode optimiser,
5032         * src/pic16/pcode.c,
5033         * src/pic16/pcodepeeph.c,
5034         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5035         they are disabled by default, but can be enabled explicit with
5036         command argument --denable-peeps, for testing,
5037         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5038         --pomit-ivt in COMPILE_FLAGS
5039
5040 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5041
5042         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5043           compilation on MSVC
5044
5045 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5046
5047         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5048
5049 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5050
5051         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5052         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5053
5054 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5055
5056         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5057         would only assign 0x300001 register.
5058
5059 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5060
5061         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5062         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5063
5064 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5065
5066         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5067         for ds80c400
5068         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5069         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5070         added peephole 254 (left shift), 255 (jump table)
5071
5072 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5073
5074         * device/lib/Makefile.in: removed comment line with model-pic16,
5075         * (target port-specific-objects-pic16): the libraries and objects
5076         are copied to the build directory form the device/lib/pic16/bin
5077         directory
5078
5079         Cumulative patch concerning pic16 port:
5080         * library directory has been re-organized,
5081         * added support for PIC18F1220,
5082         * added headers and library sources for chips 18f1220,18f6520,
5083         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5084
5085         * configuration registers setting has changed, now each supported
5086         device has a complete description of the registers it uses,
5087         * all initialisations are moved to idata sections, these section
5088         can be absolute or relocatable,
5089         * fixed initialisation of codespace variables,
5090         * fixed warning about PCLATU and gpsim,
5091         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5092         * (genAssign): use table reads when assigning from variables in codespace,
5093         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5094         char/int variables placed in codespace,
5095         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5096         registers set in .asm file, no need for --pomit-config-words anymore,
5097         * (pic16glue): some 8051 legacy segments are commented out
5098         (to be removed completely),
5099         * added support for alternative assembler and linker with --asm=
5100         and --link= command line arguments,
5101         * peepholes are disabled automatically in the port, no need to
5102         specify on command line,
5103         * port supports natively char/int/long multiplication, but converts
5104         all divisions to support functions,
5105         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5106         to the file set in variable $2,
5107         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5108         strings in ASCII format and not in hex,
5109         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5110         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5111         allocate proper register if iCodes aren't temporary,
5112
5113 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5114
5115         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5116
5117 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5118
5119         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5120         is commented out
5121
5122 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5123
5124         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5125         computed address is reused
5126         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5127         multi-byte bitfields
5128
5129 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5130
5131         * src/z80/gen.c: (genArrayInit): must check for pointers too
5132
5133 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5134
5135         * support/regression/tests/zeropad.c: never meant to commit the
5136           nestedstruct test: removed, added check for GCC version
5137
5138 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5139
5140         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5141         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5142         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5143           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5144           bugs 928906 and 954082 half-empty initializers
5145         * src/SDCCsymt.h,
5146         * src/SDCCsymt.c (getAllocSize): added for above fix
5147         * src/z80/gen.c (genArrayInit): fixed bug 741044
5148         * support/regression/tests/zeropad.c: added tests
5149
5150 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5151
5152         * src/pic16/device.c (pic16_dump_section): corrected bug which
5153         caused some symbols of the libraries to be misplaced
5154
5155 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5156
5157         * src/pic16/glue.c,
5158         * src/pic16/ralloc.h,
5159         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5160         to fix conflict with pic port
5161
5162 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5163
5164         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5165         externs configuration variables,
5166         * src/pic16/ralloc.h,
5167         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5168         prototype in header, commented out some debug messages
5169
5170 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5171
5172         * src/pic16/glue.c,
5173         * src/pic16/main.c,
5174         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5175         for gpasm COFF object generation. Thanks to D. Hawkins for
5176         his patch info
5177
5178 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5179
5180         * src/ds390/main.c,
5181         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5182         Brock for spotting this)
5183         * src/ds390/gen.c (genEndFunction),
5184         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5185         interrupt handler and critical. Disable push/pop optimizations when
5186         peephole optimizations disabled.
5187
5188 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5189
5190         Updated pic16 library sources and headers.
5191         * device/lib/pic16/pic18f*/ ,
5192         * device/include/pic16/*.h: modified to handle structured SFR
5193         definitions
5194
5195 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5196
5197         * src/port.h (PORT structure): added hook initPaths, now each
5198         port can declare its own default search paths,
5199         which can been seen with the --print-search-dirs option,
5200         see pic16 port for example,
5201         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5202         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5203         * (doPrintSearchDirs): NEW, replaces in a central manner the
5204         printing of search dirs which was split in set*Paths functions,
5205         * (main): added call to port->initPaths and doPrintSearchDirs,
5206         * src/avr/main.c,
5207         * src/ds390/main.c,
5208         * src/hc08/main.c,
5209         * src/izt/i186.c,
5210         * src/izt/tlcs900h.c,
5211         * src/mcs51/main.c,
5212         * src/pic/main.c,
5213         * src/pic16/main.c: modified port structures to reflect addition of
5214         initPaths hook,
5215
5216         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5217         * (pic16_dump_section): for registers in same address reserve memory once,
5218         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5219         to no_banksel,
5220         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5221         result is greater in size than right or left,
5222         * (pic16_genUMult8X8_8): there are some cases where the result can
5223         be 16 bits size, so handle these,
5224         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5225         * (pic16_outBitC): modified to emit pcodes,
5226         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5227         or not,
5228         * (genDivOneByte): implemented algorithm to divide 8-bits,
5229         * (genCmp): uncommented goto, but issues still exist,
5230         * (genAnd): fixed a bug with variables >8bits,
5231         * (genPackBits): optimization added that uses BCF/BSF to change a
5232         single bit,
5233         * (genAssign): fixed bug when assigning floating point literals,
5234         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5235         __sdcc_gsinit_startup label,
5236         * src/pic16/main.c (_pic16_init): removed search directory
5237         initialisations,
5238         * (_pic16_initPaths): NEW, used to initialise search directories,
5239         * (_hasNativeMulFor): support functions for all except char/int
5240         multiplication, and char division,
5241         * (PIC16_port struct): modified entry for native mul support,
5242         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5243         no_banksel option,
5244         * (buildCallTree): call to register_usage is ifdef'ed out,
5245
5246 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5247
5248         * device/include/string.h: applied Stas Sergeev's patch to make this
5249         header file compatible with the preprocessor -Wundef option
5250         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5251         failure (fixes bug #941458)
5252
5253 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5254
5255         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5256         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5257         that the variable, not the function, should be static
5258         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5259         to be consistent with non-literal case
5260
5261 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5262
5263         * src/SDCCast.c (isConformingBody): fixed bug #949967
5264         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5265         convilong): fixed bug #952086
5266
5267 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5268
5269         * src/SDCCmem.c (allocVariables): fixed bug #955321
5270
5271 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5272
5273         * src/hc08/main.c (_hc08_genAssemblerEnd),
5274         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5275         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5276         completely eliminated the use of a temporary file
5277         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5278         when more than one file linked
5279         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5280
5281 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5282
5283         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5284         which fixes bug #543481
5285         * support/regression/tests/bug-751703.c: fixed comments left from a
5286         cut and paste error
5287         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5288         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5289         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5290         scopes
5291         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5292         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5293         are now changed to underscores in moduleName
5294
5295 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5296
5297         * as/mcs51/lkmem.c: better fix for bug #954173
5298
5299 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5300         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5301
5302         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5303         * device/include/c8051f000.h,
5304         * device/include/c8051f120.h,
5305         * device/include/c8051f300.h,
5306         * device/include/c8051f310.h,
5307         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5308         PWM16) and detab'ed
5309
5310 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5311
5312         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5313         and mailing lists, doc'ed --no-peep-comments, removed reference
5314         to knoppix (newest version has no LyX/LaTeX), other minor changes
5315         * src/SDCCglue.c (glue): save 2 bytes stack space with
5316         option --main-return. The ljmp could probably be avoided too
5317
5318 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5319
5320         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5321
5322 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5323
5324         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5325         * src/SDCCopt.c (isLocalWithoutDef),
5326         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5327         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5328         (credit to Maarten Brock for patch #949363, on which this is based)
5329         * support/regression/tests/bug-751703.c: some test cases of extern used
5330         within inner scopes.
5331
5332 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5333
5334         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5335         SPEC_STRUCT
5336         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5337         struct definitions
5338         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5339         dwWriteLabel): fix to create valid debugger symbols even when
5340         the module name has non-alphanumeric symbols in it
5341         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5342         when a variable's allocation has been optimized away
5343
5344
5345 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5346
5347         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5348         * src/hc08/main.c,
5349         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5350         * src/mcs51/main.c,
5351         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5352         * src/ds390/main.c,
5353         * src/z80/gen.c (z80_emitDebuggerSymbol),
5354         * src/z80/main.c,
5355         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5356         * src/pic/main.c,
5357         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5358         * src/pic16/main.c,
5359         * src/avr/gen.c (avr_emitDebuggerSymbol),
5360         * src/avr/main.c,
5361         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5362         * src/xa51/main.c,
5363         * src/SDCCdebug.c (emitDebuggerSymbol),
5364         * src/SDCCdebug.h,
5365         * src/port.h: added a debugger struct to the port struct. Added a
5366         callback for defining debugger symbols
5367
5368         * src/SDCCast.c (createLabel),
5369         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5370         with isitmp = 1
5371         * src/SDCCicode.h,
5372         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5373         iCode back to the ast for the function
5374
5375         * src/hc08/ralloc.c (hc08_assignRegisters),
5376         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5377         unneeded fields from the regs struct.
5378         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5379         pushReg() & pullReg() functions instead of emitcode()
5380
5381         * src/hc08/gen.c (genLabel, genhc08Code),
5382         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5383
5384         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5385         debugger hooks
5386
5387         * src/hc08/gen.c (genEndFunction, genhc08Code),
5388         * src/hc08/gen.h,
5389         * src/mcs51/gen.c (genEndFunction, gen51Code),
5390         * src/mcs51/gen.h,
5391         * src/ds390/gen.c (genEndFunction, gen390Code),
5392         * src/ds390/gen.h,
5393         * src/z80/gen.c (genEndFunction, genZ80Code),
5394         * src/z80/gen.h,
5395         * src/z80/z80.h,
5396         * src/pic/gen.c (genEndFunction, genpic14Code),
5397         * src/pic/gen.h,
5398         * src/pic16/gen.c (genEndFunction, genpic16Code),
5399         * src/pic16/gen.h,
5400         * src/avr/gen.c (genEndFunction, genAVRCode),
5401         * src/avr/gen.h,
5402         * src/xa51/gen.c (genEndFunction, genXA51Code),
5403         * src/xa51/gen.h,
5404         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5405         specific code to cdbFile.c and out of the backend code generators
5406
5407         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5408         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5409         starting address is now 0
5410
5411         * as/hc08/asm.h,
5412         * as/hc08/m08pst.c,
5413         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5414         assembler directive for DWARF support
5415         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5416
5417         * src/src.dsp,
5418         * src/Makefile.in,
5419         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5420
5421 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5422
5423         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5424         and inappropriate peephole optimization in jump tables
5425
5426 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5427
5428         * as/hc08/m08pst.c,
5429         * src/SDCCglue.c: sdccopt works for the hc08 port now
5430
5431 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5432
5433         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5434
5435 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5436
5437         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5438
5439 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5440
5441         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5442         rules
5443         * src/SDCCmain.c,
5444         * src/SDCCglobl.h,
5445         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5446         comments from the peephole optimizer replacement rules
5447         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5448         symbols
5449         * src/SDCCcse.c (updateSpillLocation),
5450         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5451         equivalents
5452         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5453         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5454         objects far pointers
5455
5456 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5457
5458         * src/SDCCsymt.h: a missing part of my last change
5459         * src/pic/ralloc.c (regTypeNum),
5460         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5461
5462 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5463
5464         * src/SDCCicode.h,
5465         * src/SDCCicode.c (aggrToPtrDclType),
5466         * src/SDCCptropt.h,
5467         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5468         ptrPseudoSymConvert),
5469         * src/pic/ralloc.c (regTypeNum),
5470         * src/pic16/ralloc.c (regTypeNum),
5471         * src/hc08/ralloc.c (regTypeNum),
5472         * src/ds390/ralloc.c (regTypeNum),
5473         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5474         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5475
5476 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5477
5478         * link/z80/lkmain.c (afile),
5479         * as/hc08/lkmain.c (afile),
5480         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5481         prevent a pointer problem when a filename has no directory and
5482         no extension specified.
5483
5484 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5485
5486         * link/z80/lkmain.c (afile): allow periods in directory names
5487         * link/z80/lkmain.c (afile),
5488         * as/mcs51/lkmain.c (afile),
5489         * as/hc08/lkmain.c (afile): allow linker script file to have an
5490         extension other than ".lnk"
5491         * link/z80/lklex.c (getfid),
5492         * link/z80/lkmain.c (parse),
5493         * as/mcs51/lklex.c (getfid),
5494         * as/mcs51/lkmain.c (parse),
5495         * as/hc08/lklex.c (getfid),
5496         * as/hc08/lkmain.c (parse): Support comments in the linker script
5497         file on lines by themselves and after filenames
5498
5499 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5500
5501         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5502
5503 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5504
5505         * src/z80/peeph-z80.def: removed some peephole rules that don't
5506         work with multibyte arithmetic (fixed bug #937126)
5507         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5508         to registers and not global variables
5509         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5510         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5511         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5512         checking for assignments not internally generated (fixed bug #931895)
5513         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5514         structure member (fixed bug #930072)
5515
5516 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5517
5518         * src/SDCCmain.c (linkEdit),
5519         * src/hc08/main.c (_hc08_parseOptions),
5520         * as/hc08/Makefile.in,
5521         * as/hc08/aslink.h,
5522         * as/hc08/asm.h,
5523         * as/hc08/m08pst.c,
5524         * as/hc08/lkrloc.c (relr, rele),
5525         * as/hc08/lkarea.c (lnkarea)
5526         * as/hc08/lkmain.c (afile, parse),
5527         * as/hc08/lkelf.c: support for ELF output
5528         * as/hc08/lks19.c (s19),
5529         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5530
5531 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5532
5533         * as/mcs51/lkihx.c: Fixed bug #899105.
5534
5535 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5536
5537         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5538         .dsp files from Unix to DOS.
5539
5540 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5541
5542         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5543         function pointers; we have been compliant for several months now.
5544         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5545         change that was accidently commented out
5546         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5547         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5548         bug #922319
5549
5550 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5551
5552         * src/hc08/gen.c: output of all of the internal debugging information
5553         is now controlled by the D() macro; it is disabled by default
5554
5555 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5556
5557         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5558         harder to keep the same registers during a CAST iCode
5559         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5560         long via int can be done in a single cast, if the signedness is
5561         correct.
5562         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5563         putchar() in tinibios.c in ds390's library
5564
5565 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5566
5567         * src/SDCCast.c (decorateType): fixed bug #898889,
5568         cast result of a literal complement too
5569         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5570         fixed check for bitfields
5571
5572 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5573
5574         * src/SDCCicode.c (geniCodeLogic): made it static,
5575         (geniCodeLogicAndOr): added in order to fix bug #905492,
5576         (ast2iCode): fixed bug #905492
5577         * support/regression/tests/bug-905492.c: added
5578         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5579         (processParms): fixed bug #927659: don't copy parms, this will clear
5580         decorated flag
5581         * support/regression/tests/bug-927659.c: added
5582
5583 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5584
5585         * src/SDCCast.c (addCast): don't cast float to char
5586         * device/lib/libsdcc.lib: added _memmove
5587
5588 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5589
5590         * device/lib/large/Makefile: fixed parallel execution by
5591         replacing `make` by `$(MAKE)`
5592
5593 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5594
5595         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5596         offsets (fixes bug #923936)
5597
5598 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5599
5600         * device/lib/small/Makefile: fixed parallel execution by
5601         replacing `make` by `$(MAKE)`
5602
5603 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5604
5605         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5606
5607 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5608
5609         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5610         * src/regression/Makefile: Regression test was not running.
5611
5612 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5613
5614         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5615         complement if possible
5616         * src/SDCCval.c (valComplement),
5617         * src/SDCCicode.c (operandOperation): fixed complement of literal
5618         * support/regression/tests/onebyte.c (testComplement): added
5619
5620 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5621
5622         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5623         return an optimized tree; actually replace actParm with the new tree
5624         * src/SDCCast.h: added some parantheses to remove side effects
5625         * support/regression/tests/bug-920866.c
5626
5627 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5628         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5629         Bit operands were not being handled properly in the pic14 port.
5630         (now src/regression/add.c passes again).
5631
5632 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5633
5634         * src/SDCC.y (labeled_statement): case and default no longer require
5635         a following statement (RFE #893037)
5636
5637 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5638
5639         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5640         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5641         disabled (fixes bug #916294)
5642         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5643         "mov a,acc"; patch provided by Lenny Story
5644         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5645
5646 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5647
5648         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5649         functions
5650         * src/ds390/gen.c (genFunction, genEndFunction),
5651         * src/ds390/ralloc.c (ds390_assignRegisters),
5652         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5653         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5654         pushed if there are parameters passed on the stack. Also, a cleaner
5655         way to decide if r0/r1 should be pushed/popped. (Together they fix
5656         bug #918693)
5657
5658 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5659
5660         * doc/sdccman.lyx,
5661         * device/lib/mcs51/crtpagesfr.asm,
5662         * device/lib/mcs51/crtxinit.asm,
5663         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5664         to avoid confusion with Si Lab's SFRPAGE register.
5665
5666 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5667
5668         * src/SDCCglue.c (emitMaps): allow public sfr variables
5669         * src/SDCCglue.c (initialComments): include compiler build date
5670         with compiler version and put the timestamp of the generated
5671         assembly file on a serperate line to be less confusing.
5672         * src/port.h: added genInitStartup hook
5673         * src/avr/main.c,
5674         * src/ds390/main.c,
5675         * src/hc08/main.c,
5676         * src/pic/main.c,
5677         * src/pic16/main.c,
5678         * src/xa51/main.c,
5679         * src/z80/main.c: genInitStartup initialize as NULL (default to
5680         historical behaviour)
5681         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5682         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5683         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5684         library instead of hard coding it into the compiler.
5685         * support/regression/ports/mcs51-stack-auto/spec.mk,
5686         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5687         * device/lib/mcs51/Makefile,
5688         * device/lib/small/Makefile,
5689         * device/lib/large/Makefile,
5690         * device/lib/mcs51/crtpagesfr.asm,
5691         * device/lib/mcs51/crtstart.asm,
5692         * device/lib/mcs51/crtxclear.asm,
5693         * device/lib/mcs51/crtxinit.asm,
5694         * device/lib/mcs51/crtclear.asm,
5695         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5696         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5697         and into user configurable files.
5698         * device/lib/clean.mk: clean mcs51 directory too
5699         * support/regression/tests/longlit.c: added static to T1 declaration
5700         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5701         accesses in the initialization code
5702
5703 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5704
5705         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5706         OSCTRIMVAL as noted in bug #916008
5707
5708 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5709
5710         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5711         in loops with multiple exits (reported as incorrect registers
5712         used by Martin Helmling in Sdcc-user list)
5713
5714 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5715
5716         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5717         made ds390 register extensions look less like error messages
5718
5719 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5720
5721         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5722         reported by Adam Wozniak in Sdcc-user list
5723
5724 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5725
5726         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5727         arithmetic optimizations, added debug output
5728
5729 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5730
5731         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5732         * sdcc.spec: updated and split sdcc into 3 rpms
5733         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5734         needed for literals of LEFT_OP and '+'
5735         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5736         introduced RESULT_TYPE_NOPROM
5737         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5738         left shift
5739         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5740         limited promotion to int only for '*'
5741         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5742
5743 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5744
5745         * src/pic16/gen.c (genSkip),
5746         (genc16bit2lit), (gencjneshort): commented out
5747         (is_LitOp): new helper function, checks operand type
5748         (genCmpEq): rewritten
5749
5750 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5751
5752         * support/regression/tests/bug-908454.c: added
5753
5754 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5755
5756         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5757         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5758         (geniCodeCast): cosmetic, don't preserve bit storage class
5759         (geniCodeLeftShift): added promotion
5760         (geniCodeLogic): fixed regression
5761         * src/SDCCsymt.c (computeTypeOr): accept bits too
5762         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5763
5764 2004-03-07  Borut Razem <borut.razem AT siol.net>
5765
5766         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5767
5768 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5769
5770         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5771         version of pic16_genPackRegisters which does not check if ic is a
5772         CAST operator,
5773         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5774         function cause string1.c regression test fails
5775
5776 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5777
5778         * sim/ucsim/configure.in,
5779         * sim/ucsim/configure,
5780         * sim/ucsim/doc/Makefile.in: use docdir
5781         * src/SDCC.y: fixed sbit atrributes
5782         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5783         * src/SDCCast.c (decorateType): |^& need special promotion handling
5784         * src/SDCCast.h,
5785         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5786         * src/SDCCsymt.h (computeType),
5787         * src/SDCCicode.c: computeType() needs op
5788         * src/SDCCsymt.c (checkTypeSanity),
5789         * doc/sddman.lyx: "plain" bitfields are unsigned
5790         * src/SDCCsymt.c (computeTypeOr): added
5791         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5792         |^& ops
5793         * src/SDCCval.c (val*): computeType() needs op
5794         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5795         * support/regression/tests/onebyte.c: added tests for |^&
5796
5797 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5798
5799         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5800         for writing icode into asm output.
5801
5802 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5803
5804         * src/pic16/device.c: added some debug lines enabled
5805         with macro DEBUG_CHECK,
5806         * src/pic16/genarith.c: more debug in genPlus,
5807         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5808         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5809         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5810         * (aopForSym): onStack symbols are re-placed in data memspace,
5811         and onStack flag is cleared,
5812         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5813         copy temporary pcodeop,
5814         * (genPcall): added warning for not updating PCLATU,
5815         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5816         always true for pic16 port,
5817         * (genMultOneWord): NEW, supports integer multiplication,
5818         * (genMult): modified to call genMultOneWord,
5819         * (ifxForOp): added warning when return NULL,
5820         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5821         flag is set before call to operandFromSymbol for implicit
5822         added structures,
5823         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5824         options.intlong_rent are set by default,
5825         * (_hasNativeMulFor): modified to allow port generation of integer
5826         multiplication,
5827         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5828         set regtype to REG_SFR for all registers, restricting seting the
5829         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5830
5831 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5832
5833         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5834         more than 500 times in the regression tests
5835
5836 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5837
5838         * support/Util/SDCCerr.h,
5839         * support/Util/SDCCerr.c,
5840         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5841         enumerator_list),
5842         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5843         for symbol conflicts.
5844         * support/valdiags/tests/enum.c,
5845         * support/valdiags/tests/tentdecl.c,
5846         * support/valdiags/tests/struct.c: expect possible error messages
5847         referring to original symbol definitions.
5848         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5849         * src/SDCCsymt.h,
5850         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5851
5852 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5853
5854         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5855
5856 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5857
5858         * src/pic16/ralloc.c (newReg): fixed bug #908929
5859
5860 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5861
5862         * src/ds390/gen.c: added missing #include "main.h"
5863
5864 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5865
5866         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5867         checking if symbol is already in set,
5868         * src/pic16/device.h: prototype for checkAddSym,
5869         * src/pic16/gen.c: (_G): added entry interruptvector,
5870         * (assignResultValue): removed some commented out lines,
5871         * (genFunction): check for ISR via sym->type, absolute section for
5872         interrupt code is created via a new pBlock, the goto instruction is
5873         placed now correctly at the interrupt vector position, changed all
5874         references from ivec to _G.interruptvector,
5875         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5876         is the interrupt is a high priority one, same for return from ISR,
5877         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5878         externs to calls of checkAddSym,
5879         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5880         pic16_pcode_verbose flag is set,
5881         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5882         * src/pic16/pcoderegs.c: message about how many registers are saved
5883         will only be emitted if pic16_pcode_verbose flag is set,
5884
5885 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5886
5887         * src/ds390/ralloc.h,
5888         * src/ds390/ralloc.c (ds390_regWithIdx),
5889         * src/ds390/gen.c (emitcode),
5890         * src/ds390/main.h,
5891         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5892         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5893         ds390operandCompare, getRegsRead, getRegsWritten,
5894         initializeAsmLineNode): customized instruction size calculation for
5895         ds390, started basis for some register optimizations
5896         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5897         corresponding assembly output
5898         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5899         missing push/pop of r0/r1. Optimized push/pops
5900
5901 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5902
5903         * src/mcs51/main.c (instructionSize): fixed ACALL size
5904         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5905
5906 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5907
5908         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5909         the sorting of rlist with NULL elements
5910         * (print_idataType, print_idata): NEW to create idata sections
5911         * src/pic16/device.h: idataSymSet new variable
5912         * src/pic16/gen.c (genFunction): fixed some bugs in string
5913         comparing, improved the absolute section creation for ISRs,
5914         added FSR0L/FSR0H in registers that are saved in an ISR,
5915         * (genInline): fixed the processing of inline snippets,
5916         now they undergo no process by the peephole optimizer
5917         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5918         are placed in idataSymSet,
5919         * (pic16emitStaticSeg): extern symbols are added in externs,
5920         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5921         switching when aboslute variables are placed in access bank memory
5922         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5923         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5924         commented out with #if,
5925         * (pic16_packRegisters): reintroduce the check for CAST because some
5926         symbols are not correctly handled,
5927         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5928         pCodeInstruction instead of pCode,
5929         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5930         pCodeAsmDir definition,
5931         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5932         directive, then the argument directive is emitted without the leading
5933         tab, hack for inline labels which must be in the first column,
5934         * (compareLabel,pic16_findNextInstruction),
5935         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5936         * (insertBankSwitch): modified for the new pCodeAsmDir,
5937
5938 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5939         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5940
5941         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5942         instance,
5943         * (pushSide): commented out with #if,
5944         * (assignResultValue): fixed some typos in saving
5945         registers,
5946         * (genPcall): FIXED and sync'ed with genCall,
5947         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5948         * (genNearPointerGet): fixed to handle some more cases,
5949         implementation scheme via table reads,
5950         * (genConstPointerGet): modified to access code memory correct,
5951         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5952         and improved to handle some cases
5953         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5954         instead of "RETLW" for init data
5955         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5956         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5957         variables are placed in access bank memory (<0x80 and >=0xf80),
5958         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5959         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5960         TBLWT_POSTDEC,TBLWT_PREINC
5961         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5962         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5963         directives
5964         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5965         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5966         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5967         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5968
5969 2004-02-29  Borut Razem <borut.razem AT siol.net>
5970
5971         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5972         support/Util/findme.h, support/Util/system.h: enhance binary relative
5973         search for lib and include by using findProgramPath()
5974
5975 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5976
5977         * src/SDCCpeeph.h,
5978         * src/SDCCpeeph.c (pcDistance),
5979         * src/port.h,
5980         * src/mcs51/ralloc.h,
5981         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5982         * src/mcs51/main.h,
5983         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5984         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5985         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5986         size calculation port specific, started basis for some register
5987         optimizations
5988         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5989         missing push/pop of r0/r1. Optimized push/pops
5990         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5991         * device/lib/_modsint.c (_modsint),
5992         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5993         and stack version so regression tests pass
5994
5995 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5996
5997         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5998         * src/SDCCast.c (decorateType): catch another small optimization
5999         with '?' operator
6000         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6001         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6002         modified to finally use computeType() all over SDCC,
6003         see Feature Request #877103
6004         * src/SDCCval.h: cosmetic
6005         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6006         valCompare(); regression tested in muldiv.c
6007         * support/regression/tests/muldiv.c (testMod): mod sign follows
6008         dividend only
6009
6010 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6011
6012         * src/SDCCast.c (decorateType): fixed bug #902362
6013         * doc/INSTALL.txt: fixed install instructions for win32
6014
6015 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6016
6017         * device/include/Makefile.in (install): fixed by replacing spaces
6018         by tabs
6019         * doc/README.txt,
6020         * doc/INSTALL.txt: updated for release
6021         * doc/sdccman.lyx: added warning for --xstack being buggy
6022
6023 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6024
6025         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6026         to eliminate build warnings.
6027         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6028
6029 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6030            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6031
6032         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6033         removed -penable-stack, added comment for stack pragma, added
6034         warning for not initializing the stack/frame registers, removed
6035         comment at interrupts section
6036
6037         Stack is made permanent, there is no ability to disable stack usage.
6038         * src/pic16/device.h,
6039         * src/pic16/device.c: removed all references to USE_STACK macro,
6040         * src/pic16/device.c (pic16_dump_section): when no elements in
6041         rlist, free rlist before return,
6042         * (pic16_dump_int_registers): NEW, internal registers are a new set
6043         of general purpose registers reused by each function,
6044         * (checkAddReg): returns 1 if registers is added to set,
6045         * (pic16_groupRegistersInSection): when a registers is of type
6046         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6047         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6048         SRCASECMP macro is moved here from device.c
6049         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6050         PO_PCLATU, PO_PRODL, PO_PRODH,
6051         * (pic16_pCodeOpType, genMinus,
6052         changed compares to "a" register, with AOP_ACC,
6053         * (pic16_genPlus): fixed some bugs and indented properly,
6054         * (pic16_addSign): changed size to size+offset in the MOVWF
6055         instruction,
6056         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6057         multiply 8-bit operand by literal, result is 8-bit,
6058         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6059         multiply 2 8-bit operand, result is 8-bit,
6060         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6061         genUMult8X*_16,
6062         * src/pic16/gen.c: changed accUse to contain WREG only,
6063         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6064         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6065         true, do not use immediate addressing any more unless sym is a
6066         pointer in codespace,
6067         * (aopForRemat): do not use immediate addressing when symbol not in
6068         codespace and when symbol's address is requested,
6069         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6070         accUse size (= 1),
6071         * (aopGet): added case for AOP_ACC and don't return "accumulator
6072         bug" but WREG instead,
6073         * (popGetTempReg): pushes contents of temporary register in stack,
6074         * (popReleaseTempReg): pops contents of temporary register from
6075         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6076         * (pic16_popGet): separated case AOP_ACC to return register WREG
6077         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6078         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6079         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6080         the use of immediate pointers to certain cases only.
6081
6082         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6083         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6084         * (assignResultValue, genCall, genRet): modified to use the new
6085         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6086         genPcall is still broken,
6087         * (genFunction): added code to create 'A' type pBlocks when
6088         interrupt functions are generated, code not extensively tested yet,
6089         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6090         * (genEndFunction): modified so ISRs pop stored registers from stack,
6091         * (genMultOneByte): cleanup,
6092         * (AccRsh): added flag andmask, to and result with appropriate mask,
6093         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6094         * (genDataPointerGet): fixed and reenabled its use,
6095         * (genNearDataPointerGet): bugs fixed,
6096         * (genDataPointerSet): bugs fixed,
6097         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6098         pic16_DumpSymbol, pic16_DumpOp,
6099         * src/pic16/genutils.h: function prototypes for the above functions,
6100         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6101         pointers,
6102         * (pic16emitRegularMap): many many many improvements, but needs a
6103         major cleanup,
6104         * src/pic16/main.c: enable_stack in pic16_options is removed,
6105         * (_pic16_parseOptions): removed command line options -penable-stack,
6106         * (_process_pragma): emit stack symbol only when stack pragma is
6107         processed,
6108         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6109         redirected to FSR0L/FSR0H pair,
6110         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6111         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6112         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6113         for immediates,
6114         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6115         * (dumpPicOptype): NEW,
6116         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6117         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6118         with movff instruction,
6119         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6120         added pic16_int_regs, some packRegsFor* functions are commented out,
6121         because produce errors,
6122         * src/pic16/NOTES: minor modifications
6123
6124 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6125
6126         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6127         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6128         --pack-iram.
6129         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6130         * as/mcs51/lkaomf51.c: fixed bug #895763
6131
6132 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6133
6134         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6135
6136 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6137
6138         * doc/sdccman.lyx: added details about the HC08 storage classes and
6139         interrupts, fixed the register usage info for z80 & gbz80
6140
6141 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6142
6143         * doc/sdccman.lyx: added more pic16 port documentation
6144         * device/include/pic16/: added header pic18fregs.h
6145
6146 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6147
6148         * doc/sdccman.lyx: added Vangelis' contribution
6149
6150 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6151
6152         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6153         extend to the next CALL or PCALL, not just to the next CALL.
6154
6155 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6156
6157         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6158
6159 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6160
6161         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6162         bug #895752 and a better fix for bug #716790
6163
6164 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6165
6166         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6167
6168 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6169
6170         * doc/sdccman.lyx: minor changes, minor changed
6171
6172 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6173
6174         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6175         which can't handle SDCC_NEWONEBYTEOPS,
6176         (geniCodeMultiply): removed conversion from mult to shift for pic14
6177         and pic16
6178
6179 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6180
6181         * src/hc08/gen.h,
6182         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6183         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6184         thus fixing bug #895406
6185
6186 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6187
6188         * device/lib/_modsint.c,
6189         * device/lib/_modslong.c: sign follows divisor only
6190         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6191         signs or signedness can be ignored
6192         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6193         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6194         added optimization for IFX,
6195         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6196         arguments;
6197         reenabled optimization for IFX, which was removed on 2004-01-11
6198         * src/SDCCast.h: added return type IFX
6199         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6200         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6201         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6202         SDCC_OLDONEBYTEOPS selects the old behaviour
6203         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6204         changed again and commented promotion rule
6205         * src/SDCCval.c (valDiv): promotion no longer necessary
6206         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6207         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6208         rewritten
6209         * support/regression/tests/onebyte.c: added
6210
6211 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6212
6213         * gen.c (genInline): reverted to old code for assemnling inline
6214         code because of bug reported James Chadd
6215
6216 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6217
6218         * ralloc.h: missing declarations from previous patch,
6219         seems that patch for ralloc.h was never applied, fixed
6220
6221 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6222            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6223
6224         * pcode.c,
6225         * pcode.h,
6226         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6227         indirect addressing. Marked FSR0 as deprecated
6228         * gen.c (pointerCode): commented out, not needed now
6229         (pic16_popGet2p): new MOVFF helper function
6230         (genGenPointerGet),
6231         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6232         (shiftRLong): removed duplicate debugging info
6233
6234 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6235
6236         * src/ds390/gen.c (genNearPointerGet),
6237         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6238         optimization with bits, but not bitfields.
6239         * src/ds390/ralloc.c (packRegisters),
6240         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6241
6242 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6243
6244         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6245
6246 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6247
6248         * src/SDCCsymt.h,
6249         * src/SDCCicode.c (operandFromSymbol),
6250         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6251         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6252         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6253         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6254         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6255         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6256         bug #892038
6257         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6258         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6259         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6260         * src/SDCCsymt.c (newSymbol),
6261         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6262         enumerator_list),
6263         * src/SDCCval.h,
6264         * src/SDCCval.c (newiList): fixed bug #885705
6265
6266 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6267
6268         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6269         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6270
6271 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6272
6273         * device/include/c8051f120.h,
6274         * device/include/c8051f300.h,
6275         * device/include/c8051f310.h: added/updated header files for Silicon
6276         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6277         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6278         in new section Submitting patches
6279
6280 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6281
6282         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6283         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6284         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6285         genGenPointerSet),
6286         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6287         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6288         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6289         genGenPointerSet),
6290         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6291         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6292         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6293         genGenPointerSet),
6294         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6295         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6296         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6297         genGenPointerSet): fixed bug #892400
6298         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6299         to eliminate build warnings.
6300         * src/SDCCast.c (processParms),
6301         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6302         fixed bug 751859
6303         * support/valdiag/valdiag.py: added GCC to the list of defines active
6304         when compiling with gcc
6305
6306 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6307
6308         * support/Util/SDCCerr.h,
6309         * support/Util/SDCCerr.c,
6310         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6311         with an incomplete type (fixed bug #883734)
6312         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6313
6314 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6315
6316         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6317
6318 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6319
6320         * src/SDCCast.c (decorateType),
6321         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6322         function pointer implementation
6323         * support/regression/tests/funptrs.c: added tests to verify both forms
6324         of function pointers work correctly. Added tests to verify parameters
6325         are passed in the correct order.
6326
6327 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6328
6329         * device.c (regCompare): registers are sorted by ascending
6330         address and increasing size,
6331         * main.c (_pic16_finaliseOptions): removed the declaration
6332         of compiler macro MCU. Now a macro of the format pic18fxxxx
6333         will be defined from the command line
6334
6335 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6336             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6337
6338         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6339         PCOP_RLCF was overwritten!
6340         * gen.c (genSkip): commented out calls to pic16_emitcode,
6341         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6342         * (genlshTwo),
6343         * (genRRC): added debugging info,
6344         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6345         overwritten while shifting,
6346         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6347         overwritten while shifting,
6348         * (AccLsh),
6349         * (AccRsh),
6350         * (shiftLLeftOrResult),
6351         * (shiftRLeftOrResult),
6352         * (shiftRLong),
6353         * (shiftLLong): Implemented with pic16_emitpcode
6354         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6355         * (genLeftShift): Fixed bug, operand for shift by variable always
6356         was "and"ed with 0x0f,
6357         * (genLeftShiftLiteral),
6358         * (genrshTwo),
6359         * (genRightShiftLiteral): added debugging info,
6360         * (genrshFour): added comment,
6361         * (genRightShift): determined signedness from operand "left"
6362         instead of "result"
6363
6364 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6365
6366         * src/SDCCicode.c (geniCodeParms),
6367         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6368         function pointers, fixed function pointer bugs #861242 and #861896
6369
6370 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6371
6372         * device/include/c8051f000.h,
6373         * device/include/c8051f120.h,
6374         * device/include/c8051f300.h: added header files for Silicon
6375         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6376
6377 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6378
6379         * src/SDCCast.c (processParams): added new type flow and restructured
6380         (gatherAutoInit): added new type flow
6381         (addCast): cosmetic changes
6382         (getLeftResultType): added new type flow for array indices, patch
6383         provided by Stas, see FR #877103
6384         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6385         array index patch by Stas
6386         * src/SDCCast.h: added prototype getResultTypeFromType()
6387         * src/SDCCval.h,
6388         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6389         * src/pic/glue.c (pic14emitStaticSeg),
6390         * src/pic16/glue.c (pic16emitStaticSeg),
6391         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6392         for initialization of symbols
6393         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6394         * support/Util/SDCCerr.h:
6395         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6396         * .version: bumped version number to 2.3.8
6397         * device/include/Makefile.in (install),
6398         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6399         avoid warnings
6400
6401 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6402
6403         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6404         Slade Rich fixed an optimization bug
6405         * src/pic/pcodepeep.c,
6406         * src/pic/pcoderegs.c
6407         * doc/Makefile (install): added test for directory
6408
6409 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6410
6411         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6412         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6413         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6414         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6415         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6416         * as/mcs51/asexpr.c (term),
6417         * as/hc08/asexpr.c (term): fixed bug #887146
6418
6419 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6420
6421         * src/z80/gen.c (genMult): handle single byte result product
6422         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6423         DUMMY_READ_VOLATILE (fixed bug #886367)
6424
6425 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6426
6427         * support/regression/tests/libmullong.c: fixed logic, on little endian
6428         hosts we ended without a mullong_wrapper()
6429
6430 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6431
6432         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6433         virus/worm forged address usage.
6434
6435 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6436
6437         Fixed promotion, it should be done on AST level:
6438         * src/SDCCast.c (addCast): added promotion to int
6439         (decorateType): updated call to upCast()
6440         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6441         usualUnaryConversions()
6442
6443 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6444
6445         * support/regression/tests/literalop.c (mulWrapper): Added a
6446         wrapper to remove integer overflow warnings.
6447
6448         * support/regression/tests/float_trans.c: Made work on host.
6449
6450         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6451         location of sz80.
6452
6453         * support/regression/generate-cases.py (main): Changed from inline
6454         to a main method.
6455
6456         * doc/Makefile (install): Changed to depth first to get rid of
6457         missing directory install warning.
6458
6459         * as/Makefile (install-doc): Made work on Mac.
6460
6461 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6462
6463         * src/SDCCast.c: added an additional type flow in decorateType() of
6464         opposite direction, see feature request #860006; it's enabled at runtime
6465         by setting the environment variable SDCC_NEWTYPEFLOW
6466         * src/SDCCast.h: changed prototype of decorateType()
6467         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6468         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6469         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6470         see feature request #877103
6471         * src/SDCCval.c: updated call of decorateType()
6472         (valBitwise): fixed bug #882876
6473         (valMinus): added promotion
6474         (valLogicAndOr): result is unsigned
6475         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6476         * src/SDCCsymt.c (computeType),
6477         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6478         must not cause an unsigned operation
6479         * src/pic/glue (pic14emitRegularMap),
6480         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6481
6482 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6483
6484         * src/pic/pcode.c (PCodeID): commented out left over debug code
6485
6486 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6487
6488         * support/valdiag/tests/overflow.c: added shift tests
6489         * src/pic/device.c,
6490         * src/pic/gen.c,
6491         * src/pic/gen.h,
6492         * src/pic/glue.c,
6493         * src/pic/main.c,
6494         * src/pic/pcode.c,
6495         * src/pic/pcode.h,
6496         * src/pic/pcodepeep.c,
6497         * src/pic/pcoderegs.c,
6498         * src/pic/ralloc.c,
6499         * src/pic/ralloc.h: applied patch from Slade Rich;
6500         added support for multiple code pages and multiple RAM banks on the
6501         PIC 14 port. The ASM files now no longer simply assume all the
6502         code / RAM are in the same page / bank. This means the linker can
6503         safely allocate code/RAM of separate ASM files to different pages/banks.
6504         * doc/sdccman.lyx: added Slade's tips
6505         * src/mcs51/peeph.def: fixed bug #880768
6506
6507 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6508
6509         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6510         * src/SDCCast.c (decorateType): fixed bug #880197
6511
6512 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6513
6514         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6515         getopt.h.
6516
6517         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6518         strtof is not part of C89 and isn't included with Mac OS X.
6519
6520 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6521
6522         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6523         shiftL2Left2Result): fixed bug #879326
6524         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6525         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6526         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6527         address fetch for clr instruction
6528         * device/lib/hc08/_mulint.c: created optimized assembly version
6529         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6530
6531 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6532
6533         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6534         proposed in FR #877103
6535
6536 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6537
6538         * src/SDCCval.c (cheapestVal): added missing checks
6539         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6540         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6541
6542 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6543
6544         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6545         equal operands
6546
6547 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6548
6549         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6550         loaded with the linker search paths (-L arguments) and the libraries
6551         to be linked with the current source (-l arguments). Changes
6552         currently will affect only the pic16 port.
6553         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6554         include path the port specific paths and port specific libraries,
6555         * gplink command now contains the $3 argument,
6556         * src/pic16/device.h,
6557         * src/pic16/device.c,: structure PIC_device is made public and
6558         renamed to PIC16_device, the same for variable Pics which is renamed
6559         to Pics16. Updated all references to them.
6560         * src/pic16/glue.c (pic16glue): corrected bug with code
6561         initialization which bypassed the variable initializations block.
6562
6563         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6564         COMPILE_FLAGS and added the --nostdinc option
6565
6566 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6567
6568         * device/include/mc68hc908jb8.h: Register defs for another member
6569         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6570
6571 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6572
6573         Documenting changes from previous commits.
6574         * configure.in (version 1.56),
6575         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6576         when generating output files to configure the pic16 library,
6577         but now I've commented it out, since gputils aren't installed in the
6578         SF compile farm, so library won't compile
6579
6580         * device/lib/Makefile.in (version 1.56): initially I've added in
6581         target 'all' the prerequestive 'model-pic16' so it compiled the
6582         pic16 library, but now I've commented it out for the same reasons
6583         above,
6584         * added targets 'model-pic16' and 'objects-pic16' to compile the
6585         library
6586         * added target 'port-specific-objects-pic16' to handle the
6587         generated libraries and copy them into the build/ directory
6588         * added target 'clean-intermediate-pic16' to clean intermediate
6589         files into pic16 directory
6590         * in target 'installdirs' added line to create directory pic16 in
6591         the installation path
6592
6593         * device/include/Makefile.in (version 1.11): in target 'install'
6594         added lines to copy all header files to installation path,
6595         * in target 'installdirs' added line create directory for pic16
6596         headers in the installation path
6597
6598 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6599
6600         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6601          a function call
6602
6603 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6604
6605         * configure,
6606         * device/lib/configure.in,
6607         * device/lib/configure: fixed for autoconf 2.57
6608
6609 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6610
6611         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6612         option so that it actually works. Made it specific to the z80, since
6613         the gbz80 doesn't have these kinds of I/O ports.
6614
6615 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6616
6617         * device/include/z180.h,
6618         * device/lib/_memcpy.c,
6619         * device/lib/_memmove.c,
6620         * device/lib/_mulint.c,
6621         * device/lib/ser_ir.c,
6622         * device/lib/ser_ir_cts_rts.c,
6623         * device/lib/_strcmp.c,
6624         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6625         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6626         portmode; added deprecation warning for bank= and protmode= forms.
6627         Also, guard against buffer overflow.
6628         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6629
6630 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6631
6632         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6633         changed interrupt vector table generation to only emit declared vectors.
6634         * device/include/Makefile.in: added missing backslash
6635         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6636
6637 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6638
6639         Mainly changes to support compilation of the device libraries
6640         * src/pic16/device.c: stack is allocated via symbol and not
6641         via literal number. The symbol is placed in the corresponding
6642         position of the data ram
6643         * (pic16_dump_section): relocatable and absolute uninitialized
6644         data are now emitted in sorted order to reduce section naming,
6645         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6646         weren't marked as being in the access bank,
6647
6648 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6649
6650         Added portion of GNU PIC Library under the directory
6651         device/include/pic16 and device/lib/pic16. These files
6652         contain the declarations of SFRs for the PIC18Fxx2 devices.
6653         The directory is initialized via configure from toplevel.
6654
6655 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6656
6657         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6658         the spilllocations to be compared correctly
6659
6660 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6661
6662         * src/SDCCast.c (decorateType): fixed bug introduced today
6663
6664 2004-01-12  Borut Razem <borut.razem AT siol.net>
6665
6666         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6667         doc/sdccman.lyx: upper case pragmas are deprecated
6668
6669 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6670
6671         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6672         in simpler and even better code
6673
6674 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6675
6676         * src/SDCCicode.c (operandOperation): fixed bug #874819
6677         * src/SDCCast.c (decorateType): fixed
6678         char foo (unsigned long ul) { return ul > 0; }
6679
6680 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6681
6682         * doc/sdccman.lyx: Moved and added some sections, small changes
6683         all over. Telling LaTeX to be less strict with word spacing
6684         to better keep the right margin. Changed some notes about
6685         maintainance of the ports in section 3.2.1 - is it OK like this?
6686
6687 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6688
6689         SDCC source changes:
6690         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6691         convilong): modified to inform the pic16 port that builtin functions
6692         are external
6693
6694         PIC16 PORT specific changes:
6695         * src/pic16/device.c pic16_dump_equates() added,
6696         processor registers declared internally by the port are emitted in
6697         the translation as equates,
6698         * src/pic16/gen.c: inline code is passed unprocessed to the
6699         translation,
6700         * (pic16_popGetLit2): fnuction modified to take second operand as
6701         pCodeOp pointer and not as literal,
6702         * (popRegFromIdx): prefixed with pic16_,
6703         * (pic16_popCombine2): modified to receive already allocated pCode
6704         operands,
6705         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6706         * (genFunction): initializes local stack frame and pushes on stack
6707         all the registers used by this function,
6708         * (genEndFunction): restores all registers from stack and restores
6709         stack frame,
6710         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6711         improvements,
6712         * (pic16glue): changed the program startup sequence,
6713         * added new dbName code 'A' for functions placed in absolute section
6714         * src/pic16/main.c: added function attribute _naked,
6715         * added pragma 'code' to place a fnuction at an absolute address,
6716         * added command line arguments --debug-ralloc and --pcode-verbose,
6717         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6718         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6719         * (pic16_newpCodeOpLit2): modified to take the second operand as
6720         pCodeOp pointer,
6721         * (pic16_printpBlock): modified to emit each function in a separate
6722         section,
6723         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6724         UPPER for immediate operands,
6725         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6726         instruction,
6727         * src/pic16/peeph.def: all peepholes with movff are commented out,
6728         because there is a problem in the pcode peep optimizer,
6729         * src/pic16/ralloc.c: the register allocator can now reuse local
6730         function symbols for another function. This saves register usage.
6731         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6732
6733         Added file src/pic16/NOTES with information about program writing on
6734         the current port version.
6735
6736 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6737
6738         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6739         and peephole 252 (array access)
6740
6741 2004-01-09  Borut Razem <borut.razem AT siol.net>
6742
6743         * src/SDCCmain.c : fixed #872250: -l command line defined library
6744           files are scanned before standard library files
6745
6746 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6747
6748         * src/SDCCast.c (decorateType): fixed bug #874046
6749
6750 2004-01-09  Borut Razem <borut.razem AT siol.net>
6751
6752         * support/scripts/sdcc.nsi: remove previous installation
6753
6754 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6755
6756         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6757         bytes for last interrupt vector (mcs51)
6758         * sdcc.spec: fixed typo
6759
6760 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6761
6762         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6763         gen51Code): more efficient parameter receive for --model-large
6764         ("bug" #845294)
6765
6766 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6767
6768         * src/ds390/main.c,
6769         * src/z80/main.c: added missed needLinkerScript flags (more than
6770         one port structure defined in these file)
6771         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6772         bug #795325
6773
6774 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6775
6776         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6777         * src/port.h: added flag needLinkerScript in port->linker
6778         structure to inform whether to create a .lnk file or not,
6779         * src/avr/main.c,
6780         * src/ds390/main.c,
6781         * src/hc08/main.c,
6782         * src/mcs51/main.c,
6783         * src/pic/main.c,
6784         * src/pic16/main.c,
6785         * src/xa51/main.c,
6786         * src/z80/main.c: changed appropriately to configure
6787         needLinkerScript flag
6788         * src/pic/gen.c,
6789         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6790         * src/pic/glue.c: added variable udata_section_name to
6791         override default uninitialized data segment definition for
6792         devices only with SHAREBANK memory (reported from Erik Epetrich)
6793         * (pic14emitOverlay): modified to emit a commented overlay segment
6794         directive when no overlay data exist
6795         * (picglue): modified to emit uninitialized data segment
6796         according to udata_section_name
6797         * src/pic/main.c (_pic14_parseOptions): added command line
6798         options --udata-section-name=[name] to override default
6799         udata definition name
6800         * modified _linkCmd and _asmCmd to include compiler passed
6801         arguments via -W option
6802         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6803         object file from '.rel' to '.o' in port->linker structure,
6804         changed size of fptr from 2 to 3 in port structure
6805
6806 2004-01-07  Borut Razem <borut.razem AT siol.net>
6807
6808         * support/scripts/sdcc.nsi: update PATH
6809         * support/scripts/sdcc.ico: craeted
6810
6811 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6812
6813         * device/include/Makefile.in: fix install
6814         * doc/Makefile: fix install
6815
6816 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6817
6818         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6819         in bug #860505
6820         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6821         how the function variable allocation summary is displayed; also
6822         include information about variables allocated to the overlay
6823         segment
6824
6825 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6826
6827         * as/mcs51/lkmain.c: Help about -Y option
6828         * as/mcs51/lkarea.c: Fixed gcc warnings
6829
6830 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6831
6832         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6833         fixed warning
6834         * support/valdiag/tests/overflow.c: added
6835         * src/SDCCast.c (decorateType),
6836         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6837         LEFT_OP (left shift)
6838
6839 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6840
6841         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6842         (default behaviour).
6843
6844 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6845
6846         A python script to validate compiler diagnostic messages. It can be
6847         used to verify that sdcc complains about bad c source code and
6848         gives a good location of the error.
6849         * support/valdiag/Makefile,
6850         * support/valdiag/valdiag.py,
6851         * support/valdiag/tests/*
6852
6853 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6854
6855         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6856         * src/SDCCsymt.c (newEnumType),
6857         * src/SDCCsymt.h
6858         * support/Util/SDCCerr.c,
6859         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6860         enum related bugs.
6861         * support/regression/tests/enum.c: added test for enum values that
6862         require at least 2 bytes of storage.
6863
6864 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6865
6866         * src/common.h: added ifndef/define/endif macros
6867         around the header file.
6868         Bug reported from Jesus Calvino-Fraga
6869
6870 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6871
6872         * sdcc.spec: updated
6873         * device/include/Makefile.in: don't install CVS directories
6874         * device/lib/Makefile.in: added removal of CVS directories after install
6875         * doc/Makefile: fixed install, added local_icons
6876         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6877         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6878         * src/ds390/gen.c (genRightShift): fixed bug #870788
6879         * src/SDCCast.c (decorateType): fixed bug #870781
6880
6881 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6882
6883         PIC16 port related changes:
6884         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6885         added variable stackPos,
6886
6887         * gen.c: genCall, assignResultValue: added support for
6888         pushing/retrieving function parameters to/from stack,
6889         genFunction,genEndFunction: setup stack frame for the
6890         generated function,
6891         genAddrOf: will be changed according to bug 863624
6892
6893         * added files genutils.c and genutils.h which contain gen*
6894         debugged and optimised functions extracted from gen.c
6895
6896         * glue.c: added variable 'externs' which holds extern symbols,
6897         pic16emitRegularMap: is modified to properly handle relocatable
6898          symbols under the new scheme,
6899         pic16createInterruptVect: is modified
6900         pic16printPublics: is modified to emit 'global' assembler directives,
6901         added pic16_printExterns to print extern symbols,
6902         pic16glue: initializes stack/frame pointer in the beginning of
6903         the assembly output. Temporary hack, will be corrected later,
6904         because gplink yet does not support stack and SDCC does not
6905         yet support a type of crt0.o object to create the final binary.
6906
6907         * Removed many lines that contain 8051 legacy code.
6908         * The code is finally placed under a 'code' directive.
6909         * Added port specific options.
6910
6911         * _process_pragma: simplified since now we do not need *special*
6912         include file to define SFR registers. But a separate header
6913         will be needed. This will be developed later.
6914         * _pic16_parseOptions: added, parses port specific options:
6915         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6916         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6917         --preplace-udata-with=
6918
6919         * _pic16_setDefaultOptions: modified to initialize section names,
6920         but hack is temporarly out of order since it needs improvement.
6921         * _pic16_genAssemblerPreamble: configuration words are emitted by
6922         their address instead of their name. This part is incomplete and
6923         supports only the 18Fxx2 devices. Other devices will emit an error
6924         during assembly since they do not contain the same set of config
6925         registers
6926         * _pic16_genIVT: is modified,
6927
6928         * pcode.c: added definitions for some hardware registers that are needed
6929         for stack support
6930         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6931         All PCI entries are updated. Now LFSR is supported.
6932         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6933         * added pic16_newpCodeOpLit2 to support instructions with
6934         two literal arguments
6935         * pic16_pCode2str: corrected code that emits assembler instructions
6936         with two literal operands and those that have an access bit modifier
6937         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6938         this fixes a bug which caused some labels to be lost, when an
6939         assembler directive was added, i.e. banksel,
6940         * pic16_FixRegisterBanking: improved logic that causes the insertion
6941         of bank switching,
6942         * InlineFunction: functions that are called once, are not any more
6943         inlined. This can be a port option in the future,
6944
6945         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6946
6947         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6948         hold the corresponding uninitialized symbols,
6949         * pic16_allocProcessorRegister: registers have explicit marked the
6950         accessBank field,
6951         * pic16_allocInternalRegister: registers are explicit marked as
6952         not used,
6953         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6954         processing list, so bit registers were lost,
6955         *
6956
6957         * ralloc.h: added field 'accessBank' and original symbol operand
6958         in register definition,
6959         * removed the field isMapped from register definition,
6960
6961         ** Several functions have been removed from various sources:
6962         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6963         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6964         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6965         pic16_assignRelocatableRegisters
6966
6967         ** others have been introduced:
6968         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6969         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6970
6971 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6972
6973         * support/scripts/inc2h.pl: changed definition of BIT_AT
6974         to emit 'sbit at' instead of 'bit at'. This was a request.
6975
6976         PIC16 port related preliminary changes:
6977         * gen.c: prefixed function popRegFromString with
6978         pic16_ and all references to it corrected
6979         * pcode.c: all pic16_pc_* hardware registers prefixed
6980         with underscore (_),
6981         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6982         * ralloc.c: newReg(): when register is REG_SFR then
6983         set address to rIdx,
6984         pic16_allocProcessorRegister(): marks register wasUsed=0
6985         pic16_writeUsedRegs(): added a call to assign processor
6986         registers via pic16_assignFixedRegisters
6987
6988 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6989
6990         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6991         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6992         variables in unused register banks.  Also the SSEG is placed
6993         wherever there is enough space for it, and IDATA can be anywhere
6994         in internal RAM.  For now compile using -Wl-Y[stack_size].
6995         The mem file is different for this option as well, since it
6996         makes no sense of talking about DSEG lenght.
6997
6998 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6999
7000         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7001         in certain cases, e.g. when ROM assignment, patch provided
7002         from Albert den Haan.
7003
7004 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7005
7006         Many signedness and type propagation fixes:
7007         * src/SDCCicode.c: made geniCodeCast() static
7008         replaced SPEC_ by IS_ (cosmetic)
7009         (operandOperation): fixed div and mod operation
7010         (usualBinaryConversions): added support for promotion of char
7011         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7012         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7013         (geniCodeAdd): an array index will stay unsigned, even if promoted
7014         from char to int
7015         (geniCodeArray): ditto
7016         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7017         * src/SDCCsymt.c (computeType): added more support for char;
7018         promotion of char is selectable by promoteCharToInt, fixed signedness
7019         for all cases
7020         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7021         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7022         * src/SDCCval (val*): replaced signedness calculation by
7023         computeType()
7024         rearranged if-branches (cosmetic)
7025         (valShift): added warning W_SHIFT_CHANGED
7026         (valCompare): fixed problem with different types
7027         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7028         * support/regression/tests/literalop.c: added many cases
7029         * support/regression/tests/ast_constant_folding.c: changed finally to
7030         'unsigned int'
7031         * .version: new year, new version: 2.3.7
7032         * src/SDCCmain.c (main): applied patch #866468
7033         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7034         provided by Scott Bronson
7035         * doc/sdccman.lyx: updated documentation for sdcdb
7036         updated and added chapter tips
7037
7038 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7039
7040         * src/SDCCsymt.h: missing from yesterday's commits
7041
7042 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7043
7044         * src/SDCC.y (struct_or_union_specifier),
7045         * support/Util/SDCCerr.c,
7046         * support/Util/SDCCerr.h: verify that struct & union tags are used
7047         as declared.
7048
7049 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7050
7051         * src/SDCCglobl.h: missing from yesterday's commits
7052
7053 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7054
7055         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7056         sft_attributes, struct_declaration, parameter_declaration,
7057         type_name, start_block, declaration_list),
7058         * src/SDCC.lex (check_type): support redefinition of typedef names
7059
7060 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7061
7062         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7063         aligned xdata arrays. Erik helped me with the if clause.
7064
7065 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7066
7067         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7068         warning
7069
7070 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7071
7072         * src/SDCCast.h,
7073         * src/SDCCast.c (newAst_),
7074         * src/SDCCicode.h,
7075         * src/SDCCicode.c (ast2iCode, newiCode),
7076         * src/SDCCglobl.h,
7077         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7078         expr, statement, expression_statement, selection_statement,
7079         iteration_statement, expr_opt, jump_statement): foundation for tracking
7080         sequence points
7081         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7082         point code too)
7083
7084 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7085
7086         * support/Util/SDCCerr.c,
7087         * src/SDCCast.h,
7088         * src/SDCCast.c (createCase, createDefault, decorateType),
7089         * src/SDCClabel.c (labelUnreach),
7090         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7091         to error messages.
7092         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7093         (with thanks to Stas Sergeev)
7094         * device/include/time.h,
7095         * device/lib/time.c (CheckTime): suppress unreachable code warning
7096
7097 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7098
7099         * src/SDCCast.c (createIvalCharPtr),
7100         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7101         bug #753752)
7102         * support/regression/tests/nullstring.c: tests for these two bugs
7103
7104 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7105
7106         * support/Util/SDCCerr.h,
7107         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7108         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7109         about storage class and 'at' used inside struct or union
7110         * src/SDCCBBlock.c (iCodeFromeBBlock),
7111         * src/SDCCcse.c (ifxOptimize),
7112         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7113         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7114         printIval, emitStaticSeg, emitOverlay),
7115         * src/SDCClabel.c (deleteIfx),
7116         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7117         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7118         gatherAutoInit, processParms),
7119         * support/Util/SDCCerr.h,
7120         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7121         reporting for post-parse errors.
7122
7123 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7124
7125         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7126         implicit casts via union; they don't work on big endian systems
7127         (possible fix for bug #861138)
7128
7129 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7130
7131         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7132         * src/mcs51/main.c: fixed the fix for bug #737001
7133
7134 2003-12-15  Borut Razem <borut.razem AT siol.net>
7135
7136         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7137
7138 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7139
7140         * support/makebin/makebin.c: put output in binary mode
7141
7142 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7143
7144         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7145         xdata and data memory on startup. Set the environment variable
7146         SDCC_NOGENRAMCLEAR to disable this.
7147         * src/mcs51/peephole.def,
7148         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7149         (allows non-interrupt and interrupt code to safely compete for a resource
7150         without the non-interrupt code having to disable interrupts)
7151
7152 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7153
7154         * src/SDCCicode.c (geniCodeAdd),
7155         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7156         with valFromType if type might be a pointer and host is big endian).
7157         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7158         types, not just integer types.
7159         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7160         multiply defined with mismatching "at" address.
7161
7162 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7163
7164         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7165         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7166         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7167         with embedded nulls (fixed bug #753752)
7168
7169 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7170
7171         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7172         Apparently this did not see much testing (endless loop)
7173
7174 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7175
7176         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7177
7178 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7179
7180         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7181         gracefully handle NULL memmap pointers
7182
7183 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7184
7185         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7186         instead of deleting the iCode when an operand is volatile
7187         * src/z80/gen.c (genDummyRead),
7188         * src/mcs51/gen.c (genDummyRead),
7189         * src/ds390/gen.c (genDummyRead),
7190         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7191         not just IC_RIGHT
7192         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7193         * src/SDCC.y: fixed bug #850420
7194
7195 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7196
7197         Applied z80 i/o port patch from Peter Townson and fixed some operators
7198         to better handle operands in A register.
7199         * device/include/z180.h
7200         * src/SDCC.y
7201         * src/SDCCglue.c
7202         * src/z80/gen.c
7203         * src/z80/gen.h
7204         * src/z80/main.c
7205         * src/z80/peeph-z80.def
7206         * src/z80/peeph.def
7207         * src/z80/z80.h
7208
7209 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7210
7211         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7212
7213 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7214
7215         * device/lib/hc08/_mullong.c: Removed extra #endif
7216
7217 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7218
7219         * sim/ucsim/hc08.src/inst.cc,
7220         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7221         carries from x to h
7222         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7223         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7224         * device/include/stdarg.h: fixed varargs for hc08
7225         * device/lib/Makefile.in,
7226         * device/lib/hc08/Makefile,
7227         * device/lib/hc08/_mulint.c,
7228         * device/lib/hc08/_mullong.c: fixed some endian problems
7229
7230 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7231
7232         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7233         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7234         * device/lib/_gptrget.c,
7235         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7236
7237 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7238
7239         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7240         * src/SDCCast.c (astErrors): fixed bug #846007
7241         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7242
7243 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7244
7245         * src/SDCCast.c (decorateType): disabled a transformation I added in
7246         revision 1.188 (access to fields of a structure at an absolute address);
7247         it breaks with bitfields, extern declarations, and gcse analysis.
7248         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7249         could be assigned through a pointer, so don't complain.
7250         * src/SDCCast.c (astErrors),
7251         * src/SDCCast.h,
7252         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7253
7254 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7255
7256         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7257         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7258         output of __config directives, since gpasm now supports them
7259         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7260         pre-processor macro, i.e. -DMCU=p18f452
7261         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7262         and modified to handle 'cast' icode similarly to '=' icode
7263         * src/pic16/device.h (typedef struct PIC_device): added field
7264         'extMIface' to indicate that chip has external memory interface
7265         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7266         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7267         18F8720
7268
7269 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7270
7271         * src/SDCC.y (pointer): fixed bug #846006
7272         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7273         * src/SDCCast.c (decorateType): fixed bug #846009
7274         * src/ds390/peeph.def,
7275         * src/ds390/gen.c (genAnd, genOr),
7276         * src/mcs51/peeph.def,
7277         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7278
7279 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7280
7281         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7282         * src/SDCCdflow.c
7283         * src/SDCCcse.c
7284         * src/SDCCcse.h
7285         * src/SDCCBBlock.h
7286         * src/SDCCBBlock.c
7287
7288 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7289
7290         fixed bug #845089
7291         * src/SDCCbitv.h,
7292         * src/SDCCbitv.c: added function to free a bitvector
7293         * src/SDCClrange.h,
7294         * src/SDCClrange.c: added function to recompute the liveranges
7295         * src/avr/ralloc.c,
7296         * src/ds390/ralloc.c,
7297         * src/hc08/ralloc.c,
7298         * src/mcs51/ralloc.c,
7299         * src/pic/ralloc.c,
7300         * src/pic16/ralloc.c,
7301         * src/xa51/ralloc.c,
7302         * src/z80/ralloc.c: recompute the liveranges after register packing
7303
7304 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7305
7306         * src/SDCCloop.c (newInduction): fixed bug #845630
7307
7308 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7309
7310         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7311         inadvertantly left behind from my 2003-11-12 change
7312
7313 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7314
7315         Updated headers I neglected to commit yesterday.
7316         * src/SDCClrange.h,
7317         * src/SDCCicode.h
7318
7319 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7320
7321         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7322         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7323         * src/SDCCopt.c (eBBlockFromiCode),
7324         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7325         the creation of the key hash table from the sequencing so it can be used
7326         earlier (for some GCSE bug fixes still pending)
7327
7328 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7329
7330         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7331         * support/regression/tests/addsub.c: testing genPlus shortcut
7332
7333 2003-11-15  Borut Razem <borut.razem AT siol.net>
7334
7335         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7336
7337 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7338
7339         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7340         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7341         ordering is immaterial.
7342         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7343
7344 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7345
7346         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7347         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7348         (SIGSEV) of bug #840381
7349         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7350         unlink new file before rename if new and old filenames are the same)
7351
7352 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7353
7354         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7355         uninitialized variables) for the mcs51. Set environment variable
7356         SDCC_GENRAMCLEAR to test.
7357         xdata initialization slightly shorter
7358
7359 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7360
7361         * src/SDCCsymt.h,
7362         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7363         #838241 & 780691 (basicly the same bug)
7364         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7365         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7366
7367 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7368
7369         * src/SDCCmain.c (linkEdit): "fix" #834252
7370
7371 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7372
7373         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7374         * src/SDCCast.h,
7375         * src/SDCC.y: fixed bug #819403
7376
7377 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7378
7379         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7380         the reentrant attribute.
7381         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7382         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7383         simulation
7384         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7385         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7386         erroneously reduced to a literal.
7387         * src/hc08/ralloc.c (packRegisters, rematStr),
7388         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7389         some cases
7390
7391 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7392
7393         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7394         * doc/sdccman.lyx: changed from 'article' to 'book'
7395         * doc/Makefile: readded test_suite_spec and cdbfileformat
7396
7397 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7398
7399         * device/include/stdlib.h: include malloc.h to comply with ANSI
7400         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7401
7402 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7403
7404         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7405         * doc/clean.mk: also remove *.out files
7406         * doc/sdccman.lyx: some additions, larger top/bottom margins
7407
7408 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7409
7410         * src/SDCC.y: fixed bug #837365
7411         * support/regression/tests/bitopcse.c
7412         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7413         a symbol (might be valop instead)
7414         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7415         * device/lib/clean.mk: added hc08 to the cleaning list
7416
7417 2003-11-04  Borut Razem <borut.razem AT siol.net>
7418
7419         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7420           made 2003-11-04
7421         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7422           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7423           malloc is declared in standard stdlib.h
7424
7425 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7426
7427         * device/lib/hc08/Makefile: need to clean .rel not .o files
7428         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7429
7430 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7431
7432         * src/port.h,
7433         * src/hc08/main.c,
7434         * src/mcs51/main.c,
7435         * src/ds390/main.c,
7436         * src/z80/main.c,
7437         * src/avr/main.c,
7438         * src/pic/main.c,
7439         * src/pic16/main.c,
7440         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7441         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7442         tests (which uses the port's oclsExpense function)
7443         * src/SDCC.y,
7444         * src/SDCCast.c,
7445         * src/SDCCicode.c,
7446         * src/hc08/gen.c,
7447         * src/ds390/gen.c,
7448         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7449
7450 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7451
7452         * src/SDCCcse.c (ifxOptimize),
7453         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7454         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7455         deleting the IFX iCode.
7456         * src/hc08/ralloc.c: reduced unneeded slocs
7457         * src/hc08/gen.c: fixed bug in asmopToBoolean
7458
7459 2003-11-04  Borut Razem <borut.razem AT siol.net>
7460
7461         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7462           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7463           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7464           transferred to configure
7465
7466 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7467
7468         Use headers defined in the C[++] standards:
7469         * sim/ucsim/gui.src/serio.src/fileio.cc
7470         * sim/ucsim/gui.src/serio.src/frontend.cc
7471         * sim/ucsim/gui.src/serio.src/main.cc
7472         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7473         * support/Util/NewAlloc.c
7474         * as/hc08/lklibr.c
7475         * as/mcs51/lklibr.c
7476         * as/z80/aslist.c
7477         * as/z80/assym.c
7478
7479 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7480
7481         * Added MSVC projects for hc08 assembler and linker:
7482         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7483         /as/hc08/link_hc08.dsp
7484
7485 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7486
7487         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7488
7489 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7490
7491         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7492
7493 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7494
7495         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7496
7497 2003-10-31  Borut Razem <borut.razem AT siol.net>
7498
7499         * support/cpp2/cpplib.h,
7500           support/cpp2/cpplib.c,
7501           support/cpp2/cpplex.c,
7502           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7503           to switch _asm block preprocessing on / off. Default is
7504           #pragma preproc_asm +
7505
7506 2003-10-31  Borut Razem <borut.razem AT siol.net>
7507
7508         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7509           when outputting comment blocks (when executed with -C option) and
7510           _asm (SDCPP specific) blocks
7511
7512 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7513
7514         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7515
7516 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7517
7518         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7519
7520 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7521
7522         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7523         * src/SDCCast.c (decorateType): fixed bug #832664
7524
7525 2003-10-31  Borut Razem <borut.razem AT siol.net>
7526
7527         * support\cpp2\cpplex.c: fixed for SDCPP:
7528           comments(when executed with -C option) and _asm blocks
7529           were included even if they where in skipped #if block.
7530           Applied solution from GCC cpp 3.3.2
7531
7532 2003-10-31  Borut Razem <borut.razem AT siol.net>
7533
7534         * src/SDCC.lex: sdcc now understands both formats:
7535           '# <line_number> <file_name>' and
7536           '#line <line_number> <file_name>'
7537         * support/cpp2/cppmain.c: sdcpp now generates the standard
7538           '# <line_number> <file_name>' instead of former
7539           '#line <line_number> <file_name>'
7540
7541 2003-10-30  Borut Razem <borut.razem AT siol.net>
7542
7543         * support/cpp2/cpphash.h,
7544         * support/cpp2/cpplib.h
7545         * support/cpp2/cpplex.c,
7546         * support/cpp2/cppmain.c,
7547         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7548
7549 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7550
7551         Fixed a number of problems revealed by bug #827883.
7552         * src/SDCCloop.c (loopInvariants): Spill location of the
7553         result operand should be recomputed if extracted from
7554         a loop. Also, don't extract assignments of an iTemp
7555         from a literal.
7556         * src/SDCCast.c (isConformingBody): loop reversal should
7557         not occur if the control variable is involved with a
7558         relational operator.
7559
7560 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7561
7562         * .version: bumped to 2.3.6 to reflect the big improvements
7563         made by Erik and Klaus. Thanks!
7564
7565 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7566
7567         Replaced the livrange code.
7568         * src/SDCClrange.c: added new LR code
7569         * src/SDCCloop.c,
7570         * src/SDCCBBlock.h: removed remainig parts from old LR code
7571         * src/ds390/ralloc.c,
7572         * src/ds390/gen.c: minor fixes to make it work with new code
7573
7574 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7575
7576         * as/hc08/asm.h,
7577         * as/hc08/lkrloc.c,
7578         * src/hc08/gen.c,
7579         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7580         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7581         (tweaked fix for bug #818696)
7582
7583 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7584
7585         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7586
7587 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7588
7589         * src/SDCCmain.c,
7590         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7591         * src/mcs51/gen.c (gencjneshort),
7592         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7593         more efficient (per Scott Bronson's suggestion)
7594
7595 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7596
7597         Extended the semantics of the critical keyword to include
7598         individual statements. See RFE #827755 and #799831
7599         * src/SDCC.y
7600         * src/SDCCicode.c
7601         * src/SDCCopt.c
7602         * src/SDCCast.c
7603         * support/Util/SDCCerr.c
7604         * support/Util/SDCCerr.h
7605         * src/mcs51/gen.c
7606         * src/ds390/gen.c
7607         * src/hc08/gen.c
7608
7609 2003-10-19  Borut Razem <borut.razem AT siol.net>
7610
7611         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7612
7613 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7614
7615         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7616         Fixed bug #818696
7617         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7618         and predecrement operand is displayed
7619
7620 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7621
7622         * src/SDCCval.c (valMinus): fixed bug #826041
7623
7624 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7625
7626         Some hc08 related updates that I missed earlier
7627         * sim/ucsim/stypes.h
7628         * support/regression/ports/hc08/spec.mk
7629
7630 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7631
7632         New target "hc08" for the Motorola 68hc08 family of micros
7633
7634         * configure
7635         * configure.in
7636         * Makefile
7637         * src/hc08/*
7638         * src/SDCCmain.c
7639         * src/port.h
7640         * sim/ucsim/hc08.src/*
7641         * sim/ucsim/configure.in
7642         * src/ucsim/configure
7643         * sim/ucsim/packages_in.mk
7644         * as/hc08/*
7645         * as/Makefile
7646         * device/include/mc68hc908qy.h
7647         * device/lib/hc08/*
7648         * device/lib/Makefile.in
7649         * support/regression/ports/hc08/*
7650         * support/regression/Makefile
7651
7652 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7653
7654         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7655         regression test
7656         * src/ds390/gen.c (genCast): fixed bug #821957
7657
7658 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7659
7660         * device/lib/logf.c: "fixed" overlay bug
7661         * support/regression/ports/host/spec.mk: added m library
7662         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7663         * support/regression/tests/float_trans: added (for Eric)
7664
7665 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7666
7667         * src/mcs51/gen.c (genCpl): fixed bug
7668         http://sf.net/mailarchive/message.php?msg_id=6263915
7669
7670 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7671
7672         * src/SDCCast.c (decorateType): added extended constant folding
7673         * src/SDCCsymt.c (computeType): cleanup
7674         * src/SDCCval.c (valShift): minor optimization
7675         * support/regression/tests/ast_constant_folding.c: added
7676
7677 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7678
7679         * src/SDCCmain.c: removed some unintended changes
7680
7681 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7682
7683         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7684         * src/z80/gen.c: fixed part of bug #817589
7685         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7686
7687 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7688
7689         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7690         * src/SDCCcflow.c
7691         * src/SDCCcse.c
7692         * src/SDCCdflow.c
7693         * src/SDCClabel.c
7694         * src/SDCClrange.c
7695         * src/SDCCmem.c
7696         * src/SDCCopt.c
7697         * src/SDCCpeeph.c
7698         * src/SDCCset.c
7699         * src/avr/ralloc.c
7700         * src/ds390/ralloc.c
7701         * src/izt/ralloc.c
7702         * src/mcs51/ralloc.c
7703         * src/pic/ralloc.c
7704         * src/pic16/ralloc.c
7705         * src/xa51/ralloc.c
7706         * src/z80/ralloc.c
7707         * src/z80/gen.c: removed unused label "release:"
7708
7709 2003-10-06  Borut Razem <borut.razem AT siol.net>
7710
7711         * src/SDCC.lex: removed definition of unused variables
7712           save_optimize and save_options
7713
7714 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7715
7716         * clean.mk: removed '=' in "-maxdepth=1"
7717         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7718         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7719
7720 2003-10-06  Borut Razem <borut.razem AT siol.net>
7721
7722         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7723           my_unput() replaced by unput()
7724
7725 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7726
7727         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7728         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7729         type-punned pointer will break strict-aliasing rules"
7730         Old LR behaviour is again default; Klaus' LR can be choosen by
7731         defining the environment variable LRKLAUS
7732         * src/SDCCBBlock.h
7733         * src/SDCCloop.c
7734         * src/SDCClrange.c
7735         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7736         * clean.mk: fixed removal of files in bin/CVS/
7737         * device/lib/clean.mk: fixed removal of directories small and large
7738         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7739         * src/SDCCicode.c,
7740         * src/SDCCval.c: removed superflous test for pedantic
7741
7742 2003-10-05  Borut Razem <borut.razem AT siol.net>
7743
7744         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7745           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7746           message "unmatched #pragma SAVE and #pragma RESTORE"
7747
7748 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7749
7750         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7751           assembly, critical functions, atomic, nojtbound)
7752
7753 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7754
7755         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7756         * src/SDCCBBlock.h
7757         * src/SDCCloop.c
7758         * src/SDCCloop.h
7759         * src/SDCClrange.c
7760
7761 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7762
7763         * src/z80/gen.h,
7764         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7765         * src/mcs51/gen.h
7766         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7767         * src/ds390/gen.h
7768         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7769         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7770         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7771
7772 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7773
7774         * src/z80/gen.c (genRet): fixed bug #524753
7775         * src/z80/gen.c (genCast): fixed internal error on cast from
7776         pointer to long
7777         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7778         fix for bug #477835 to the z80
7779         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7780         for tracking iCodes in the peephole optimizer for z80
7781
7782 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7783
7784         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7785         the other part of bug #814548
7786         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7787
7788 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7789
7790         * src/SDCCcse.c: fixed part of bug #814548
7791
7792 2003-09-28  Borut Razem <borut.razem AT siol.net>
7793
7794         * src/asm.c: rewrite of printILine() to use temporary file instead
7795           a pipe
7796         * src/xa51/main.c: commented out declaration of int rewinds
7797
7798 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7799
7800         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7801
7802 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7803
7804         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7805         * src/asm.c (printILine): Fixed bug #811015
7806
7807 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7808
7809         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7810         freeing.
7811
7812 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7813
7814         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7815         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7816         to correctly handle general case of AOP_PAIRPTR
7817         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7818
7819 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7820
7821         * src/mcs51/ralloc.c (fillGaps),
7822         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7823         register positioning bug)
7824
7825 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7826
7827         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7828
7829 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7830
7831         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7832         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7833         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7834         (ralloc doesn't intentionally do this now, but perhaps later)
7835         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7836         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7837         register positioning bugs (Fixed bug #762602 and #795325)
7838         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7839         (Fixed bug #808779)
7840         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7841         lines that --i-code-in-asm generates
7842
7843 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7844
7845         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7846         trying to fclose a FILE* that was already closed.
7847
7848 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7849
7850         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7851         of const struct should be treated as if const themselves)
7852
7853 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7854
7855         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7856
7857 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7858
7859         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7860         Unix (/n) and DOS (/r/n) line terminations.
7861
7862 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7863
7864         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7865         bug #613775
7866
7867 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7868
7869         * src/mcs51/gen.c (genFunction, genEndFunction),
7870         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7871         and restore of EA so that stack offsets to parameters are
7872         correct when using both critical and reentrant/stack-auto.
7873         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7874         size (can be triggered in error if sloc is shared between
7875         different sized objects)
7876         * device/include/float.h: fixed macros to explicitly use
7877         unsigned long where needed
7878
7879 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7880
7881         Feature req. 799831: added code to allow nesting of critical functions
7882         * src/mcs51/gen.c (genFunction, genEndFunction)
7883         * src/ds390/gen.c (genFunction, genEndFunction)
7884
7885 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7886
7887         * src/SDCCsymt.c (sclsFromPtr),
7888         * src/SDCCsymt.h,
7889         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7890         support for standard C idiom of memory mapped variables; for
7891         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7892         to xdata int at 0x1234 tempvar = 1.
7893         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7894         provided by Akiya ISHIDA
7895
7896 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7897
7898         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7899         * src/SDCCval.c (constVal): added reduction from int to char
7900         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7901         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7902         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7903         to ignore the sign
7904         * support/regression/tests/shifts.c: fixed
7905
7906 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7907
7908         * src/z80/gen.c (genXor): Fixed bug #805445
7909
7910 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7911
7912         Fixed bug #621531 (const & volatile confusion in the type chain).
7913         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7914         refer to the const or volatile state of the pointer itself.
7915
7916         * src/SDCCast.c
7917         * src/SDCCglue.c
7918         * src/SDCCicode.c
7919         * src/SDCCsymt.c
7920         * src/SDCCval.c
7921         * src/SDCC.y
7922         * src/SDCCsymt.h
7923         * src/pic/gen.c
7924         * src/pic/ralloc.c
7925         * src/pic16/gen.c
7926         * src/pic16/ralloc.c
7927         * support/regression/tests/const.c
7928
7929 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7930
7931         When checking for duplicated modules, use absolute paths
7932         instead of relative paths.  Files changed:
7933
7934         * as/mcs51/lklib.c
7935         * link/z80/lklib.c
7936
7937 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7938
7939         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7940
7941 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7942
7943         * device/include/string.h: added size_t typedef, changed
7944         prototypes to use size_t, eliminated separate reentrant and
7945         non-reentrant declarations, added _memmove declaration
7946         * device/lib/_memcpy.c: changed to use size_t instead of int,
7947         changed /4 to >>2 to avoid division library call
7948         * device/lib/_memcmp.c,
7949         * device/lib/_memset.c,
7950         * device/lib/_strncat.c,
7951         * device/lib/_strncpy.c,
7952         * device/lib/_strncmp.c: changed to use size_t instead of int
7953         * device/lib/_memmove.c: new file (fixed bug #772294)
7954         * device/lib/Makefile.in: added _memmove.c
7955         * device/lib/z80/asm_strings.s: fixed bug #772290
7956         * support/regression/tests/bitfields.c: attempt to fix host assertion
7957         failure on amd64-unknown-linux2.2
7958
7959 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7960
7961         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7962         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7963         * as/z80/asmain.c (main): fixed bug #801766
7964
7965 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7966
7967         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7968         compilers
7969
7970 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7971
7972         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7973         reported in bug #800609
7974
7975 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7976
7977         * Top header beautifications in src/pic16 directory:
7978           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7979           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7980           pcoderegs.h, ralloc.c, ralloc.h
7981         * main.c: added top header and GPL license notice
7982         * pcode.c: fixed the if-conditional warning
7983
7984 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7985
7986         * device/lib/_mullong.c: replaced int by short for gcc
7987
7988 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7989
7990         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7991         and JUMPTABLE iCodes properly now (worked by accident before)
7992         * src/mcs51/gen.c (leftRightUseAcc),
7993         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7994         iCode properly now. Use getSize instead of nRegs since a & b
7995         aren't part of the nRegs tally.
7996
7997 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7998
7999         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8000         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8001           before instructions that use the _STATUS register
8002
8003 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8004
8005         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8006         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8007         fetching of the pointer
8008         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8009         copied from genNearPointerSet()
8010         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8011         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8012         If they pop r0/r1 they must be called in the opposite order than aopOp().
8013         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8014         (resp. --stack-auto), prepared for --xstack
8015
8016 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8017
8018         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8019
8020 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8021
8022         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8023         these ports have their own __sdcc_external_start()
8024
8025 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8026
8027         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8028         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8029         type for bits was changed. It resulted in bit variables becoming
8030         global, which is not permitted in PIC 14 assembly output.
8031
8032 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8033
8034         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8035
8036 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8037
8038         Z80 and MCS51 linkers complaint if a public symbol is defined
8039         in more than one library module:
8040
8041         * as/mcs51/lklib.c
8042         * link/z80/lklib.c
8043         * as/mcs51/Makefile.in
8044
8045 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8046
8047         A few small changes that speed up the peephole optimizer.
8048
8049         * src/SDCCpeeph.c
8050
8051 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8052
8053         Try to make the peephole optimizer smarter by maintaining
8054         an association between the assembly source code and the
8055         iCodes that originated them. Put this information to use
8056         with a new peephole rule condition "notVolatile" so that
8057         the rules can be aggressive yet still safe.
8058
8059         * src/SDCCpeeph.c
8060         * src/SDCCpeeph.h
8061         * src/mcs51/gen.c
8062         * src/mcs51/peeph.def
8063
8064 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8065
8066         Fixed bug #741761
8067
8068         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8069         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8070         if the left or right operand symbols have the accuse flag set.
8071
8072 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8073
8074         Changed the type of the result of the ! (NOT) operator to char;
8075         previously it returned the same type as the source. This allows
8076         us to eliminate all the genFloatNot functions (all of its target
8077         implementations were very buggy) since !float can use the same
8078         code as !long now.
8079
8080         * src/SDCCicode.c (ast2iCode): ! returns char
8081         * src/mcs51/gen.c (genNot, genNotFloat),
8082         * src/ds390/gen.c (genNot, genNotFloat),
8083         * src/z80/gen.c (genNot, genNotFloat),
8084         * src/pic/gen.c (genNot, genNotFloat),
8085         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8086
8087 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8088
8089         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8090         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8091            during interrupts. Ensure WSAVE is located at a shared bank address.
8092         2. Fixed page selection in some places
8093         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8094            the registers name strings.
8095         4. Fixed "signed / unsigned compare" compiler warnings.
8096         5. The PIC port manages its own allocation of the general purpose
8097            registers, but makes no attempt to reuse them. As a result when
8098            compiling it soon runs out of general purpose registers. Some
8099            additional code was added to the files pcode.c and device.c to walk
8100            through the function call tree and rename the registers so that they
8101            get reused.
8102
8103         * src/pic/device.c
8104         * src/pic/gen.c
8105         * src/pic/glue.c
8106         * src/pic/pcode.c
8107         * src/pic/pcode.h
8108         * src/pic/ralloc.c
8109         * src/pic/ralloc.h
8110         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8111         genPlus() & genMinus() when the result is the same as left or right
8112
8113 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8114
8115         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8116
8117 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8118
8119         Made bitfield a distinct type from bit so that bitfields
8120         convert as per ANSI C and bits retain their traditional
8121         boolean style behaviour. Implemented bitfield support in
8122         the z80 port.
8123
8124         * src/SDCCsymt.h,
8125         * src/SDCCsymt.c,
8126         * src/SDCCast.c,
8127         * src/cdbFile.c,
8128         * src/mcs51/gen.c,
8129         * src/ds390/gen.c: bit v bitfield split
8130         * src/z80/gen.c: New support for bitfields
8131         * support/regression/tests/bitfields.c: reenabled z80,
8132         added more tests
8133
8134 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8135
8136         Rules 246.x, 247.x relate to bitfields, the others speed up
8137         access to xdata mapped I/O devices.
8138
8139         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8140
8141 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8142
8143         Cleaned up genPackBits and genUnpackBits and added two helper
8144         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8145         for literal assignments in genPackBits (thanks to Frieder for
8146         reminding me).
8147
8148         * src/mcs51/gen.c
8149         * src/ds390/gen.c
8150
8151 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8152
8153         Fixed bug #748310 (pointer to function type mishandled when the
8154         function name is omitted). Also fixed a SIGSEGV when a function
8155         attribute (reentrant, etc) is used on a non-function or on a
8156         function but misplaced before the parameter list.
8157
8158         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8159         bug #748310
8160         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8161         * support/Util/SDCCerr.h,
8162         * support/Util/SDCCerr.c: Added func attr misuse error msg
8163
8164 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8165
8166         Fixed bug #787649 by anonymous
8167         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8168         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8169
8170 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8171
8172         Fixed numerous bitfield problems.
8173
8174         * src/SDCC.y: More bitfield related error checking
8175         * src/SDCCsymt.h,
8176         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8177         * support/Util/SDCCerr.h,
8178         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8179         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8180         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8181         * support/regression/tests/bitfields.c: tests added
8182
8183 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8184
8185         Made the constant following the "interrupt" keyword optional. If
8186         omitted, the function will not automatically be given an entry
8187         in the interrupt vector table (similar to #pragma NOIV, but
8188         less syntacticly kludgy). The interrupt number is also now
8189         range checked. Also fixed a bug in the high order bit example
8190         in the manual.
8191
8192         * src/SDCC.y
8193         * src/SDCCmem.c
8194         * src/SDCCglue.c
8195         * src/SDCCsymt.h
8196         * support/Util/SDCCerr.c
8197         * support/Util/SDCCerr.h
8198         * doc/sdccman.lyx
8199
8200 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8201
8202         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8203         * src/SDCCicode.c (operandOperation): rewritten some ops
8204         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8205         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8206         other type
8207         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8208         be re-activated by defining REDUCE_LITERALS)
8209         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8210         unsigned, but are signed by default
8211         * src/SDCCval.c (constVal): rearranged
8212         * src/SDCCval.c (valMod): preliminary fix
8213         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8214         * support/regression/literalop.c: added, work in progress
8215
8216 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8217
8218         Generate warnings for useless declarations like "char data;"
8219         that don't do what new users expect.
8220
8221         * src/SDCC.y
8222         * support/Util/SDCCerr.h
8223         * support/Util/SDCCerr.c
8224
8225 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8226
8227         * src/SDCCval.c (valMult): fix overflow detection of negative int
8228
8229 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8230
8231         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8232
8233         Changes to support big endian targets:
8234
8235         * src/ports.h
8236         * src/SDCCglue.c
8237         * src/avr/main.c
8238         * src/ds390/main.c
8239         * src/izt/i186.c
8240         * src/mcs51/main.c
8241         * src/pic/main.c
8242         * src/pic16/main.c
8243         * src/xa51/main.c
8244         * src/z80/main.c
8245
8246 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8247
8248         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8249         * device/lib/time.c: fixed warning "integer overflow in expression"
8250
8251 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8252
8253         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8254         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8255         constants are unsigned; added recognition of "u" flag for unsigned
8256         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8257         * src/SDCCval.c (valDiv, valMod): fixed signdness
8258         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8259         signedness of modulo, left and right shift
8260         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8261         * support/Util/SDCCerr.h: added warning W_INT_OVL
8262         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8263         * src/SDCCast.c (ast_print): improved output of constants
8264
8265 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8266
8267         Fixed some warnings when building with MSVC:
8268
8269         * as\mcs51\asdata.c
8270         * as\z80\asdata.c
8271         * as\mcs51\asm.h
8272         * as\z80\asm.h
8273         * link\z80\aslink.h
8274         * link\z80\lkdata.c
8275         * link\z80\lkeval.c
8276         * link\z80\lkgb.c
8277         * link\z80\lkihx.c
8278         * link\z80\lks19.c
8279         * link\z80\lksym.c
8280         * support\cpp2\cpplib.c
8281         * src\ds390\gen.c
8282         * src\mcs51\gen.c
8283
8284 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8285
8286         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8287
8288 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8289
8290         * support\librarian\clean.mk: Do not remove Makefile.
8291         * support\librarian\Makefile: added.
8292
8293 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8294
8295         Added librarian to MSVC build:
8296         * all.dsp
8297         * sdcc.dsw
8298         * support\librarian\librarian.dsp
8299
8300         'configure' not needed for librarian, removed:
8301         * support\librarian\configure
8302         * support\librarian\configure.in
8303         * support\librarian\config_in.h
8304         * support\librarian\Makefile.in
8305
8306         Hopefully these ones built the librarian and the rest of sdcc properly:
8307         * Makefile
8308         * Makefile.common.in
8309
8310         Messed up 'configure', so revert to previous version:
8311         * configure
8312         * configure.in
8313
8314 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8315
8316         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8317         there, while the mantissa of a double is "only" 53 bits wide.
8318
8319 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8320
8321         Adding sdcclib to the build.  MSVC project coming soon.
8322         Files added/changed:
8323
8324         * support\librarian\clean.mk
8325         * support\librarian\configure
8326         * support\librarian\configure.in
8327         * support\librarian\config_in.h
8328         * support\librarian\Makefile.bcc
8329         * support\librarian\Makefile.in
8330         * support\librarian\sdcclib.c
8331         * Makefile.bcc
8332         * Makefile
8333         * Makefile.common.in
8334         * configure
8335         * configure.in
8336
8337 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8338
8339         Linker now complaints if linked modules have conflicting options, for
8340         example, one compiled using --model-large and another one compiled with
8341         --model-small.  The following files were modified:
8342
8343         * as\mcs51\asdata.c
8344         * as\mcs51\aslink.h
8345         * as\mcs51\asm.h
8346         * as\mcs51\asmain.c
8347         * as\mcs51\asout.c
8348         * as\mcs51\i51pst.c
8349         * as\mcs51\lkdata.c
8350         * as\mcs51\lklibr.c
8351         * as\mcs51\lkmain.c
8352         * as\z80\asdata.c
8353         * as\z80\asm.h
8354         * as\z80\asmain.c
8355         * as\z80\asout.c
8356         * as\z80\z80pst.c
8357         * link\z80\aslink.h
8358         * link\z80\lkdata.c
8359         * link\z80\lklibr.c
8360         * link\z80\lkmain.c
8361         * src\SDCCglue.c
8362
8363 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8364
8365         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8366         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8367
8368 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8369
8370         * src/z80/mappings.i: fix _mul[us][int,long] entries
8371
8372 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8373
8374         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8375
8376 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8377
8378         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8379         * support/regression/tests/bitopcse.c: added
8380         fixed warning:
8381         * src/avr/gen.c:
8382         * src/pic/gen.c:
8383         * src/pic16/gen.c:
8384         * src/z80/gen.c:
8385         * src/xa51/gen.c:
8386
8387 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8388
8389         added support for new library format to z80, gbz80 linkers:
8390         *link/z80/aslink.h
8391         *link/z80/lklex.c
8392         *link/z80/lklib.c
8393         *link/z80/lklist.c
8394
8395 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8396
8397         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8398         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8399
8400 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8401
8402         added DUMMY_READ_VOLATILE:
8403         * src/SDCC.y:
8404         * src/avr/gen.c:
8405         * src/xa51/gen.c:
8406         * src/z80/gen.c:
8407         * src/pic/gen.c:
8408         * src/pic16/gen.c:
8409         * src/mcs51/gen.c:
8410         * src/ds390/gen.c:
8411         * src/SDCCcse.c (algebraicOpts): many improvements
8412         * src/SDCCcse.h: removed algebraicOpts()
8413         * src/SDCCicode.c (picDummyRead): added
8414
8415 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8416
8417         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8418         "Insufficient space in data memory".
8419
8420 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8421
8422         * src/mcs51/gen.c: fixed bug #771358
8423         * src/z80/gen.c: fixed bug #759087
8424
8425 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8426
8427         * src/pic16/glue.c: minor cleanup by Vangelis
8428
8429 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8430
8431         * device/include/regc515c.h: fixed #758477
8432         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8433         * device/lib/_gptrput.c: saved a few bytes
8434         * my tab spacing is 8, yours too?)
8435         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8436         * device/lib/serial.c: process RX bytes earlier than TX bytes
8437         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8438
8439 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8440
8441         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8442
8443 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8444
8445     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8446
8447 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8448
8449         * device/lib/Makefile.in: bad fix, reverted to 1.43
8450
8451 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8452
8453         * device/lib/Makefile.in: added missing z80 object files
8454
8455 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8456
8457         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8458         pic16 progress by Vangelis:
8459         * src/SDCCglobl.h:
8460         * src/SDCCmain.c:
8461         * src/pic/Makefile:
8462         * src/pic:
8463         * pic/Makefile:
8464         * pic16/device.c:
8465         * pic16/device.h:
8466         * pic16/gen.c:
8467         * pic16/gen.h:
8468         * pic16/genarith.c:
8469         * pic16/glue.c:
8470         * pic16/main.c:
8471         * pic16/pcode.c:
8472         * pic16/pcode.h:
8473         * pic16/pcodepeep.c:
8474         * pic16/peeph.def:
8475
8476 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8477
8478     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8479
8480 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8481
8482     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8483     added gbz80 build to MSVC project.
8484     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8485     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8486     from 8051 stuff and setup so it links using a .lnk file.
8487
8488 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8489
8490     * support/librarian/sdcclib.c: sdcc librarian.
8491     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8492     with sdcclib.
8493
8494 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8495
8496     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8497
8498 2003-07-02  Borut Razem <borut.razem AT siol.net>
8499
8500         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8501         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8502         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8503         src/xa51/main.c, src/z80/main.c:
8504         virtualization of glue() function: each port has it's own glue function,
8505         which is accessed by do_glue function pointer in PORT.general structure
8506
8507 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8508
8509         * DS800C400 fun, improved ROM interface and tinibios.
8510
8511 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8512
8513         * More support for DS80C400. Now includes beginning of interface to ROM.
8514
8515 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8516
8517         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8518
8519 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8520
8521         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8522
8523 2003-06-19  Borut Razem <borut.razem AT siol.net>
8524
8525         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8526
8527 2003-06-19  Borut Razem <borut.razem AT siol.net>
8528
8529         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8530         fixed Z80 port - crt0.o: cannot open.
8531
8532 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8533
8534         * support/Util/MySystem.c (merge_command): revert bad fix
8535
8536 2003-06-18  Borut Razem <borut.razem AT siol.net>
8537
8538         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8539
8540 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8541
8542         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8543         option --use-stdout sends errors to stdout instead of stderr.
8544
8545 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8546
8547         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8548
8549 2003-06-15  Borut Razem <borut.razem AT siol.net>
8550
8551         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8552         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8553         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8554         fixed width array of pointers replaced with sets;
8555         multiple include and lib paths ared transferred to preprocessor and linker
8556         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8557         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8558         fixed width array of pointers
8559         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8560         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8561         fixupPath(), getPathDifference()
8562         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8563         fixed width array of pointers
8564
8565 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8566
8567         * src/pic16/ralloc.c: fix warnings
8568         * src/pic16/pcode.c: fix warning
8569
8570 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8571
8572          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8573         know all the details, but essentially this set of changes enable
8574         the pic16 port to generate movff instructions and generate assembler
8575         directives,
8576         * src/SDCCmain.c:
8577         * src/pic16/gen.c:
8578         * src/pic16/glue.c:
8579         * src/pic16/pcode.c:
8580         * src/pic16/device.c:
8581         * src/pic16/main.c:
8582         * src/pic16/pcode.h:
8583         * src/pic16/pcoderegs.c:
8584         * src/pic16/ralloc.c:
8585         * src/pic16/ralloc.h:
8586
8587 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8588
8589         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8590         added option --vc, so sdcc errors and warnings are compatible with
8591         Microsoft Visual Studio.
8592
8593 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8594
8595         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8596           device/lib/libfloat.lib: added atof function.
8597
8598 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8599
8600         * doc/sdccman.lyx: updated to Lyx 1.3
8601         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8602         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8603         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8604
8605 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8606
8607         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8608
8609 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8610
8611         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8612           additions to the "related tools/documentation" section
8613
8614 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8615
8616         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8617
8618 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8619
8620         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8621         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8622
8623 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8624
8625         * doc/sdccman.lyx: fix double dash and other minor things
8626         * doc/Makefile: fix double dash
8627
8628 2003-05-28  Karl Bongers(patches from Martin Helmling)
8629         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8630           condition and ignore commands.
8631
8632 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8633
8634         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8635           is in parts still quite out of date, I did changes as far as I felt makes sense
8636           for a non-native english speaker.
8637           Please feel free to add to the manual or to correct my changes.
8638         * doc/Makefile: undid touching the date of intermediate tex files.
8639
8640 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8641
8642         * doc/sdccman.lyx: Manual has an index now
8643
8644 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8645
8646         Finalize muluint/mulsint and mululong/mulslong merging:
8647         * device/lib/_mulint.c
8648         * device/lib/_mullong.c
8649         * device/lib/gbz80/mul.s
8650         * device/lib/gbz80/stubs.s
8651         * device/lib/z80/mul.s
8652         * device/lib/z80/stubs.s
8653         * src/SDCCsymt.c (initCSupport)
8654
8655 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8656
8657         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8658         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8659           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8660           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8661           instead of /Zm500.
8662
8663 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8664
8665         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8666           the regression tests I'm not brave enough to enable 245.b, 245.c
8667         * doc/sdccman.lyx: added latex preamble for hyperref package.
8668           Using pdflatex this will give you a hyperlinked pdf file with
8669           bookmarks. (prepend '%' before /usepackage if this breaks something)
8670
8671 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8672
8673          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8674
8675 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8676
8677         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8678
8679 2003-05-21    <johan AT balder>
8680
8681         * src/SDCCglue.c (printIval): fixed bug #739934
8682
8683 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8684
8685         Applied patch from bug 737905 (renamed yylineo to mylineno):
8686         * src/altlex.c
8687         * src/SDCCast.c
8688         * src/SDCglobl.h
8689         * src/SDCC.lex
8690         * src/SDCCsymt.c
8691         * src/SDCCval.c
8692         * src/pic16/pcode.c: Cleaned warnings
8693         * src/pic16/pcodeflow.c: Cleaned warnings
8694         * src/pic16/pcoderegs.c: Cleaned warnings
8695
8696 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8697
8698         * src/pic16/pcode.c: Cleaned warnings
8699         * src/pic16/pcodepeep.c: Cleaned warnings
8700         * src/pic16/ralloc.c: Cleaned warnings
8701
8702 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8703
8704         * doc/sdccman.lyx: fixed bug 739745
8705         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8706
8707 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8708
8709         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8710         it can be defined with CFLAGS when running configure
8711         * src/SDCCmain.c: fixed compiling + linking with object files
8712
8713 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8714
8715         * configure.in: configure for pic16 port,
8716             added --disable-pic16-port
8717         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8718         * src/SDCCmain.c: linkOptions is changed to set *,
8719             added if/endif conditional macros to remove options help
8720             messages from optionsTable when a port is not configured, added
8721             support for the PIc16 port in the ports table, when executing
8722             the compiler with no port specified on command line, a default
8723             port is selected with the new macro DEFAULT_PORT which is
8724             defined in port.h, in setDefaultOptions() linkOptions is removed
8725             from initialization assignment, since now it is a set,
8726             parseCmdLine uses setParseWithComma for linkOptions, in
8727             linkEdit() linkOptions are accessed with new function indexSet()
8728             which returns the i'th item of a set variable. See SDCCset.c, in
8729             linkEdit() when calling buildCmdLine(), added linkOptions as
8730             last argument. Now users can pass arguments to gplink via the
8731             -Wl option, main() uses pic16glue() to glue up pic16 programs
8732         * src/SDCCpeeph.c: various changes to support pic16
8733         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8734             return the i'th item of the set
8735         * src/SDCCset.h: added function prototype for indexSet()
8736         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8737         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8738         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8739             added macro DEFAULT_PORT
8740         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8741         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8742             generated
8743         * src/pic16/glue.c: commented out some error producing lines
8744         * src/pic16/main.c: __config directives are commented out to stop
8745             gpasm complaining and test the linkage with gplink, _linkCmd and
8746             _asmCmd changed to be more gplink and gpasm friendly
8747         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8748             produced an error when parsed, peep rule 12 is added to utilize
8749             movff, but it is commented out since the pCode does not support
8750             yet a command with 2 address arguments
8751
8752 2003-05-18    <johan AT balder>
8753
8754         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8755         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8756 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8757
8758         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8759   Added feature to script commands from file.
8760
8761 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8762
8763         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8764         * src/SDCCutil.c: include ctype.h for win32
8765
8766 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8767
8768         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8769
8770 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8771
8772         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8773   Fixed so you can set breakpoints prior to run, run does not stop
8774   on entry now.  Add tbreak.  Other enhancements and fixes for use
8775   with ddd.
8776
8777 2003-05-12  Borut Razem <borut.razem AT siol.net>
8778
8779         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8780
8781 2003-05-11  Borut Razem <borut.razem AT siol.net>
8782
8783         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8784         the path of bin directory, so that PATH is the only env. variable, which has to be set
8785         in case of standard installation.
8786         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8787         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8788         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8789
8790 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8791
8792         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8793         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8794         temp files are in the port dir; clean the gen/test directory when
8795         generating new test.c
8796         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8797         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8798         * support/regression/tests/zeropad.c: added
8799
8800 2003-05-09    <johan AT balder>
8801
8802         * src/SDCCglue.c: fixed bug #597940
8803
8804 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8805
8806         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8807   cache sfr, optimize next,step, fix off by one sourceline,
8808   support ddd list function.
8809         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8810
8811 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8812
8813         * support/regression/HTMLgen.py: added compare_s2f()
8814         * support/regression/Makefile: redo 1.27
8815         * support/regression/generate-cases.py: redo 1.5
8816
8817 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8818
8819         * support/regression/tests/float.c: workaround 33 bit hex constant
8820         * support/regression/tests/simplefloat.c: fix division for host
8821
8822 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8823
8824         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8825         that tame's the PIC's over-aggressive optimizer.
8826
8827 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8828
8829          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8830          support for MSVC.
8831
8832 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8833
8834         Initial support for DS80C400. "Hello world" runs on TINIm400
8835         (with polled I/O).
8836
8837 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8838
8839          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8840          * Some notes on ddd usage added in debugger/README
8841          Martin Helmling adding more features and fixes for ddd GUI debugger.
8842          Code added for nexti, stepi, up, down, and other adjustments.
8843
8844 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8845
8846         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8847         * src/pic/peeph.def Added two rules to optimize carry manipulation
8848         * src/pic/* removed debug printfs
8849
8850 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8851
8852         * debugger/mcs51/cmd.c: added header newalloc.h
8853
8854 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8855
8856         * as/Makefile: new EXEEXT
8857         * as/z80/Makefile: remove trailing slash of BUILDIR
8858         * as/z80/clean.mk: new EXEEXT
8859         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8860         * support/cpp2/Makefile.in: new EXEEXT
8861         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8862
8863 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8864
8865         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8866         EXEEXT was introduced to fix all related problems with targets
8867         "clean", "install" and "uninstall"; a couple of further flaws
8868         especially with "clean" have been fixed too
8869         * as/mcs51/Makefile.in
8870         * as/mcs51/clean.mk
8871         * as/z80/Makefile
8872         * Makefile
8873         * clean.mk
8874         * debugger/mcs51/Makefile.in
8875         * debugger/mcs51/clean.mk
8876         * link/z80/Makefile
8877         * link/z80/Makefile.in
8878         * link/z80/clean.mk
8879         * link/Makefile
8880         * packihx/Makefile.in
8881         * packihx/clean.mk
8882         * sim/ucsim/Makefile
8883         * sim/ucsim/clean.mk
8884         * sim/ucsim/avr.src/Makefile.in
8885         * sim/ucsim/avr.src/clean.mk
8886         * sim/ucsim/s51.src/Makefile.in
8887         * sim/ucsim/s51.src/clean.mk
8888         * sim/ucsim/xa.src/Makefile.in
8889         * sim/ucsim/xa.src/clean.mk
8890         * sim/ucsim/z80.src/Makefile.in
8891         * sim/ucsim/z80.src/clean.mk
8892         * sim/ucsim/main_in.mk
8893         * sim/ucsim/packages_in.mk
8894         * sim/ucsim/gui.src/Makefile.in
8895         * sim/ucsim/gui.src/serio.src/Makefile.in
8896         * sim/ucsim/gui.src/serio.src/clean.mk
8897         * src/Makefile.in
8898         * src/clean.mk
8899         * support/cpp2/Makefile.in
8900         * support/cpp2/clean.mk
8901         * support/makebin/Makefile
8902         * support/makebin/clean.mk
8903         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8904         * doc/sdccman.lyx: --program-suffix no longer needed
8905
8906 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8907
8908          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8909          Martin Helmling added support for ddd GUI debugger.
8910          Code added to display assembly, set variables, and other commands
8911          to interface to ddd.
8912
8913 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8914
8915         * as/Makefile: fix target clean
8916         * as/clean.mk: fix target clean
8917         * as/z80/clean.mk: fix target clean
8918
8919 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8920
8921         * Makefile.common.in: added  AT EXEEXT AT
8922         * configure.in: removed all mingw32 stuff
8923         * configure: rebuilt from configure.in
8924         * doc/sdccman.lyx: updated section "installation"
8925         * support/scripts/sdcc_mingw32: adapted to configure
8926         * support/scripts/sdcc_cygwin_mingw32: added
8927
8928 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8929
8930         * src/pic Added object file support for the PIC port
8931         * src/pic Applied patch from Craig Franklin (this started the object file support)
8932         * src/regression Updated the PIC regression tests for object files
8933
8934 2003-04-20  Borut Razem <borut.razem AT siol.net>
8935
8936         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8937           lklex.c: In function `getfid':
8938           lklex.c:203: warning: array subscript has type `char'
8939         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8940           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8941         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8942           stack handling macros
8943
8944 2003-04-19  Borut Razem <borut.razem AT siol.net>
8945
8946         * "handling space characters in file path" task:
8947         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8948         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8949         * support/Util/MySystem.h: make it self-sufficient
8950         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8951           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8952           handling space characters in file path
8953         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8954           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8955         * support/Util/MySystem.c: handling space characters in executable's path
8956
8957 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8958
8959         * as/z80/Makefile: fix permanent rebuild of z80
8960         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8961         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8962
8963 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8964
8965         * src/SDCCopt.c: add special case optimization to replace modulo by
8966           a power of two with a bitwise AND.
8967
8968 2003-04-18    <johan AT balder>
8969
8970         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8971
8972 2003-04-17    <johan AT balder>
8973
8974         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8975         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8976
8977 2003-04-13  Borut Razem <borut.razem AT siol.net>
8978
8979         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8980         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8981           fixed mingw problem in adl_NORMALIZE_PATH
8982
8983 2003-04-12  Borut Razem <borut.razem AT siol.net>
8984
8985         * fixed "#pragma SAVE/RESTORE can not be nested":
8986         * src/SDCC.lex: reworked pragma handling functions
8987         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8988         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8989
8990 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8991
8992         * src/SDCCutil.c (pathEquivalent): defined but not used
8993         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8994         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8995         * configure: rebuilt from configure.in
8996         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8997         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8998         * device/include/Makefile.in: replace sdcc_datadir
8999         * device/lib/Makefile.in: replace sdcc_datadir
9000         * Makefile.common.in: add LDFLAGS from configure
9001         * packihx/Makefile.in: use LDFLAGS
9002         * src/Makefile.in: use LDFLAGS
9003         * support/cpp2/Makefile.in: add LDFLAGS from configure
9004         * support/makebin/Makefile: use LDFLAGS
9005         * .version: bumped version number to 2.3.5
9006
9007 2003-04-12  Borut Razem <borut.razem AT siol.net>
9008
9009         * completed "different paths" task:
9010         * src/SDCCmacro.c: fixed bug in handling quotes
9011         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9012         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9013
9014 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9015
9016         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9017
9018 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9019
9020         * ds390/gen.c ds390/peeph.def: fix bug 706781
9021
9022 2003-04-11  Borut Razem <borut.razem AT siol.net>
9023
9024         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9025
9026 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9027
9028         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9029         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9030          set - this bit used to not be set...).
9031         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9032           bad code in PIC Port
9033         * src/regression/and2.c added to test bug 609268
9034         * src/regression/Makefile added and2.c to regression test
9035
9036
9037 2003-04-08    <johan AT CP255758-A>
9038
9039         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9040         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9041         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9042
9043 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9044
9045         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9046         fix bug #487815
9047         * support/cpp2/Makefile.in: fix bug #487815
9048         * configure: rebuilt from configure.in
9049         * Makefile.common.in: docdir changed, new path suffixes
9050         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9051         * sdcc_vc_in.h: reflect changes from sdccconf.h
9052         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9053         * src/SDCCutil.h: remove BINDIR hack
9054         * doc/sdccman.lyx: update new path hierarchy
9055
9056 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9057
9058         * src/SDCCpeeph.c: added okToRemoveSLOC test
9059
9060 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9061
9062         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9063
9064 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9065
9066         * src/SDCCpeeph.c: added labelIsReturnOnly test
9067         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9068
9069 2003-04-05    <johan AT balder>
9070
9071         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9072         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9073         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9074         * src/SDCCast.c: fixed a warning
9075         * src/SDCCast.h: fixed a warning
9076         * src/SDCCicode.c (operandFromAst): fixed a warning
9077
9078 2003-04-04    <johan AT balder>
9079
9080         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9081         * src/SDCCast.c (decorateType): fixed bug #715076
9082         * src/SDCC.y: fixed bug #702907
9083
9084 2003-04-03    <johan AT balder>
9085
9086         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9087         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9088         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9089         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9090         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9091
9092 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9093
9094         * _decdptr.c: fix return values
9095         * _gptrget.c: fix return values
9096         * _gptrgetc.c: fix return values
9097         * _gptrput.c: fix return values
9098         * _mulint.c: fix return values
9099         * as/z80/Makefile: fix 'make -j' problem
9100
9101 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9102
9103         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9104         * configure.in: big cleanup, updated to autoconf 2.5x
9105         * configure: rebuilt from configure.in
9106         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9107         * sdcc_vc_in.h: reflect changes from sdccconf.h
9108         * doc/Makefile: fixed a flaw in "make install"
9109
9110 2003-04-02    <johan AT balder>
9111
9112         * src/ds390/gen.c (genCmp): no comments
9113         * src/mcs51/gen.c (genCmp): no comments
9114         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9115         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9116
9117 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9118
9119         * support/regression/generate-cases.py: place generated file in given sub directory
9120         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9121         * support/regression/Makefile: improvements for 'make -j';
9122         side effect: it's simpler and faster now
9123
9124 2003-03-31  Borut Razem <borut.razem AT siol.net>
9125
9126         * src/z80/main.c: link-{port} and as-{port} defined without path
9127         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9128
9129 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9130
9131         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9132
9133 2003-03-30  Borut Razem <borut.razem AT siol.net>
9134
9135         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9136           changed type of list parameter to set
9137         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9138         * src/port.h: changed type of do_assemble() parameter to set
9139         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9140           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9141           definition of "cppoutfilename" macro with NULL value in preProcess()
9142         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9143         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9144         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9145           replaced with set *binPathSet
9146         * shash_add() deallocates the item, if allready exsists, before adding the new one
9147         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9148
9149 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9150
9151         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9152           a nested for loop bug in the PIC port
9153         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9154           for loops
9155
9156 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9157
9158         * support/Util/dbuf.h: remove C++ stuff to make it portable
9159
9160 2003-03-28  Borut Razem <borut.razem AT siol.net>
9161
9162         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9163           literal strings in stringLiteral()
9164         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9165         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9166           to the project
9167
9168 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9169
9170         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9171
9172 2003-03-26    <johan AT balder>
9173
9174         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9175         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9176         * src/SDCCast.c (decorateType): fixed " -v < 3"
9177
9178 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9179
9180         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9181         Added Lenny Story's debug infrastructure changes:
9182         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9183         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9184         * src/cdbFile.c: added
9185         * src/SDCCdebug.c: added
9186         * src/SDCCdebug.h: added
9187         * src/SDCCast.c (createFunction)
9188         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9189         * src/SDCCmain.c (parseCmdLine, main)
9190         * src/SDCCmem.c (redoStackOffsets)
9191         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9192         * src/SDCCsymt.h
9193         * src/common.h
9194         * src/avr/gen.c (genAVRCode)
9195         * src/ds390/gen.c (gen390Code)
9196         * src/mcs51/gen.c (gen51Code)
9197         * src/pic/gen.c (genpic14Code)
9198         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9199         * src/xa51/gen.c (genXA51Code)
9200         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9201
9202 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9203
9204         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9205         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9206
9207 2003-03-22    <johan AT balder>
9208
9209         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9210
9211 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9212
9213         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9214         * doc/cdbfileformat.lyx: added, written by Lenny Story
9215         * doc/Makefile: added cdbfileformat.lyx
9216         * doc/clean.mk: added cdbfileformat.lyx
9217
9218 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9219
9220         * src/mcs51/peeph.def: fix bug #705773
9221
9222 2003-03-20    <johan AT balder>
9223
9224         An sfr/sbit can have an "at #" AND an initializer
9225         * src/SDCCsymt.c (checkSClass):
9226         * src/SDCCmem.c (allocGlobal):
9227         * src/SDCCmem.c (allocLocal):
9228         * src/SDCCast.c (createBlock):
9229
9230 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9231
9232         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9233
9234 2003-03-16    <johan AT balder>
9235
9236         Undid the hackup of const and volatile, the problem is much bigger
9237         * src/SDCC.y:1.65
9238         * src/SDCCast.c:1.171
9239         * src/SDCCglue.c:1.138
9240         * src/SDCCicode.c:1.146
9241         * src/SDCCsymt.c:1.150
9242         * src/SDCCval.c:1.65
9243
9244 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9245
9246         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9247         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9248
9249 2003-03-13    <johan AT balder>
9250
9251         Hackup const and volatile modifiers in type chains a bit:
9252         * src/SDCC.y:1.63
9253         * src/SDCCast.c:1.169
9254         * src/SDCCglue.c:1.136
9255         * src/SDCCicode.c:1.143
9256         * src/SDCCsymt.c1.146
9257         * src/SDCCsymt.h1.59
9258         * src/SDCCval.c:1.63
9259
9260 2003-03-12    <johan AT balder>
9261
9262         * src/SDCCBBlock.h: more LRH debugging junk
9263         * src/SDCCcflow.h: more LRH debugging junk
9264         * src/SDCCloop.c: more LRH debugging junk
9265         * src/SDCC.y (struct_declaration): fixed bug #697590
9266         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9267         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9268         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9269
9270 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9271         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9272         test function names must now match exactly).
9273         * src/SDCCcse.c: added special case in findCheaperOp to allow
9274         extending a short integer. Makes less awful code for bug 700121 test case.
9275
9276 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9277
9278         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9279         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9280
9281 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9282
9283         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9284         actually called (operandsNotEqual() was called for all
9285         operandsNotEqualX tests).
9286
9287 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9288
9289         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9290         with shorter literals. Fixes bug 700121.
9291
9292 2003-03-11    <johan AT balder>
9293
9294         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9295
9296 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9297
9298         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9299         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9300
9301 2003-03-10  Borut Razem <borut.razem AT siol.net>
9302
9303         * src/SDCCmain.c: pipe preprocessor's output
9304         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9305         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9306         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9307         which closes all pipes in pipeSet set
9308         * src/SDCCset.c: free deleted item in function deleteSetItem()
9309         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9310         moved from z80 to src subproject
9311         * .version: increased version number to 2.3.4
9312
9313 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9314
9315         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9316         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9317         * support/regression/ports/xa51/spec.mk: fix typo
9318
9319 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9320
9321         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9322
9323 2003-03-09  Borut Razem <borut.razem AT siol.net>
9324
9325         * src/SDCCmain.c: pipe preprocessor's output
9326         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9327         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9328         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9329         which closes all pipes in pipeSet set
9330         * src/SDCCset.c: free deleted item in function deleteSetItem()
9331         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9332         moved from z80 to src subproject
9333
9334 2003-03-09  Borut Razem <borut.razem AT siol.net>
9335
9336         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9337         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9338         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9339         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9340         * src/SDCCglobl.h: unification of WIN32 native definitions
9341
9342 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9343
9344         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9345
9346 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9347
9348         * src/configure.in:   check for endianess (even while cross-compiling)
9349         * src/configure:      check for endianess (even while cross-compiling)
9350         * src/configure_in.h: check for endianess (even while cross-compiling)
9351         * src/avr/gen.c:        remove old endianess stuff
9352         * src/mcs51/gen.c:      remove old endianess stuff
9353         * src/ds390/gen.c:      remove old endianess stuff
9354         * src/pic/gen.c:        remove old endianess stuff
9355         * src/pic/genarith.c:   remove old endianess stuff
9356         * src/pic/glue.c:       fix endianess check
9357         * src/pic16/gen.c:      remove old endianess stuff
9358         * src/pic16/genarith.c: remove old endianess stuff
9359         * src/pic16/glue.c:     fix endianess check
9360         * src/xa51/gen.c:       remove old endianess stuff
9361         * src/z80/gen.c:        fix endianess check
9362         * src/SDCCglue.c:       fix endianess check
9363         * src/ds390/peeph.def: fix bug 700036
9364
9365 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9366
9367         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9368         * src/configure: find appropriate data-types on host for SDCC's int and long
9369         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9370         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9371         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9372
9373 2003-03-07    <johan AT balder>
9374
9375         Just a big NOOP:
9376                 some minor cleanups before the big shot
9377                 OP_DEFS and OP_USES now use Kevin's protection
9378                 new option --nolabelopt
9379
9380         * src/SDCCBBlock.c:
9381         * src/SDCCast.c,:
9382         * src/SDCCcflow.c:
9383         * src/SDCCcse.c:
9384         * src/SDCCicode.c:
9385         * src/SDCCicode.h:
9386         * src/SDCClabel.c:
9387         * src/SDCCloop.c:
9388         * src/SDCCmain.c:
9389         * src/ds390/ralloc.c:
9390         * src/mcs51/ralloc.c:
9391         * src/pic/ralloc.c:
9392         * src/xa51/ralloc.c:
9393         * src/z80/ralloc.c:
9394
9395 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9396
9397         * src/pic/pcode.c (get_op): fix 64 bit warnings
9398         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9399         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9400         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9401         * support/regression/tests/malloc.c: fix 64 bit warnings
9402
9403 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9404
9405         * src/mcs51/gen.c (genMinus): fixed bug 696436
9406
9407 2003-03-02  Borut Razem <borut.razem AT siol.net>
9408
9409         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9410
9411 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9412
9413         * configure.in: test for mkstemp
9414         * sdccconf_in.h: add HAVE_MKSTEMP
9415
9416 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9417
9418         * device/include/ctype.h: removed warning while using --stack-auto
9419         * device/include/malloc.h: removed warning while using --stack-auto
9420         * device/include/string.h: removed warning while using --stack-auto
9421
9422 2003-02-23  Borut Razem <borut.razem AT siol.net>
9423
9424         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9425         because NDEBUG is defined (see man assert)
9426         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9427
9428 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9429
9430         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9431         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9432
9433 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9434
9435         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9436         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9437
9438 2003-02-18    <johan AT balder>
9439
9440         * as/mcs51/asmain.c (asmbl): module can start with a digit
9441         * as/z80/asmain.c (asmbl): module can start with a digit
9442
9443 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9444
9445         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9446         * src/asm.c: fix pipe() for Mingw32
9447
9448 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9449
9450         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9451         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9452         make -V work again; --c1mode reads now from stdin
9453         * doc/sdccman.lyx: added --c1mode
9454         * support/Util/SDCCerr.c: new messages for c1 mode
9455         * support/Util/SDCCerr.h: new messages for c1 mode
9456         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9457
9458 2003-02-15    <johan AT balder>
9459
9460         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9461
9462 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9463
9464         * doc/sdccman.lyx: Environment variables, -o and other minor things
9465
9466 2003-02-14    <johan AT balder>
9467
9468         * src/xa51/main.c: before anyone really tries to use it :)
9469
9470         * Install doc's in share/sdcc/doc
9471         * removed some obsolete files
9472         * Do a proper make distclean and uninstall
9473         M Makefile.common.in
9474         R sdccbuild.sh
9475         M as/Makefile
9476         M device/include/Makefile.in
9477         M device/lib/Makefile.in
9478         M doc/sdccman.lyx
9479         M link/Makefile
9480         M sim/ucsim/doc/Makefile.in
9481         M src/clean.mk
9482         R src/avr/peeph.rul
9483         R src/xa51/peeph.rul
9484         M support/cpp2/Makefile.in
9485         M support/makebin/Makefile
9486
9487
9488 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9489
9490         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9491
9492 2003-02-10  Borut Razem <borut.razem AT siol.net>
9493
9494         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9495         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9496         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9497         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9498         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9499         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9500         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9501         src/z80/Makefile.bcc: Borland Makefile cleanup
9502         * as/z80/Makefile.bcc: Added Borland Makefile
9503         * support/cpp2/borland.h: Removed
9504
9505 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9506
9507         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9508         * src/SDCC.lex: new pragma NOIV
9509         * src/SDCCglobl.h: new pragma NOIV
9510         * src/SDCCmem.c: new pragma NOIV
9511
9512 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9513
9514         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9515
9516 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9517
9518         * src/SDCCmain.c: signal handling is switched off by --debug
9519         * doc/Makefile: small fix for install; use clean.mk again
9520         * doc/clean.mk: clean *.pdf and *.html too
9521
9522 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9523
9524         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9525         * device/lib/printfl.c: fix a ds390 bug by making it portable
9526         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9527         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9528         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9529         * debugger/mcs51/cmd.c: converted multi-line string literals
9530         * sim/ucsim/globals.cc: converted multi-line string literals
9531         * src/SDCCmain.c: introduced signal handler to remove temp files
9532         * doc/Makefile: small tweaks, implement clean
9533         * doc: removed generated files
9534
9535 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9536
9537         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9538         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9539         Address Record is not correctly generated for DS390."
9540
9541 2003-02-02  Borut Razem <borut.razem AT siol.net>
9542
9543         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9544         * as/mcs51/asm.h: fixed compilation with Borland C
9545         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9546         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9547         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9548         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9549         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9550         src/z80/Makefile.bcc: delete $(LIB) only if exist
9551         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9552
9553 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9554
9555         * device/include/malloc.h: introduced NULL
9556         * device/include/string.h: introduced NULL
9557         * device/include/stdlib.h: introduced NULL
9558         * device/lib/_memcpy.c: removed NULL
9559         * device/lib/_strcat.c: removed NULL
9560         * device/lib/_strchr.c: removed NULL
9561         * device/lib/_strcmp.c: removed NULL
9562         * device/lib/_strcpy.c: removed NULL
9563         * device/lib/_strcspn.c: removed NULL
9564         * device/lib/_strlen.c: removed NULL
9565         * device/lib/_strncat.c: removed NULL
9566         * device/lib/_strncmp.c: removed NULL
9567         * device/lib/_strncpy.c: removed NULL
9568         * device/lib/_strpbrk.c: removed NULL
9569         * device/lib/_strrchr.c: removed NULL
9570         * device/lib/_strspn.c: removed NULL
9571         * device/lib/_strstr.c: removed NULL
9572         * device/lib/_strtok.c: removed NULL
9573         * device/lib/malloc.c: removed NULL, include own header
9574
9575 2003-02-02    <johan AT balder>
9576
9577         * 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
9578         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9579         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9580         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9581         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9582         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9583
9584 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9585
9586         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9587         area 'DATA'"
9588
9589 2003-02-01    <johan AT balder>
9590
9591         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9592
9593 2003-01-31    <johan AT CP255758-A>
9594
9595         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9596
9597 2003-01-30    <johan AT balder>
9598
9599         * src/SDCCBBlock.c: automatic bug detection
9600         * src/SDCCicode.c: automatic bug detection
9601
9602 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9603
9604         * src/SDCCglobl.h:   now --xram-size 0 works
9605         * src/SDCCmain.c:    now --xram-size 0 works
9606
9607 2003-01-29    <johan AT balder>
9608
9609         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9610
9611 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9612
9613         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9614         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9615         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9616         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9617         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9618         * src/SDCCmain.c:    Added options --xram-size and --code-size
9619
9620 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9621
9622         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9623         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9624
9625 2003-01-27    <johan AT balder>
9626
9627         * src/SDCC.y: fixed bug #613764
9628
9629 2003-01-26    <johan AT balder>
9630
9631         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9632         * src/SDCCsymt.h: fixed bug #673374
9633         * src/SDCCglue.c: fixed bug #661910
9634         * src/SDCCast.c: fixed bug #458099 and 673374
9635
9636 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9637
9638         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9639         * as/mcs51/strcmpi.h: added
9640         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9641         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9642         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9643         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9644         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9645         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9646         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9647         * as/mcs51/Makefile.aslink: new module strcmpi
9648         * as/mcs51/Makefile.asx8051: new module strcmpi
9649         * as/mcs51/Makefil.bcc: new module strcmpi
9650         * as/mcs51/Makefile.in: new module strcmpi
9651         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9652
9653 2003-01-26    <johan AT balder>
9654
9655         * src/SDCCglue.c: reverted back to 1.124
9656         * src/SDCCast.c: reverted back to 1.156
9657         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9658
9659 2003-01-25    <johan AT balder>
9660
9661         * src/SDCCglue.c: A better fix for bug #661910
9662         * src/SDCCast.c: A better fix for bug #661910
9663         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9664
9665 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9666
9667         * src/Makefile.in: remove spawn.o
9668         * src/SDCCmain.c: remove spawn.h
9669         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9670         * src/spawn.c: removed
9671         * src/spawn.h: removed
9672         * support/regression/ports/ds390/spec.mk: link with -r
9673
9674 2003-01-24    <johan AT CP255758-A>
9675
9676         * src/ds390/gen.c (aopOp): fixed bug #667458
9677         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9678         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9679         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9680
9681 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9682
9683         * src/mcs51/peeph.def: better assembler identation by Frieder
9684         * src/mcs51/gen.c: better assembler identation by Frieder
9685
9686 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9687
9688         * as/z80/string.h: removed for gcc 3.2
9689         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9690         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9691
9692 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9693
9694         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9695         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9696         * support/regression/Makefile: separate temp files for ports
9697         * support/regression/generate-cases.py: separate temp files for ports
9698         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9699         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9700
9701 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9702
9703         * moved tinitalk to device/examples/ds390
9704
9705 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9706
9707         * as/mcs51/lkmem.c: rflag is for DS390
9708         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9709         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9710                          (linkEdit): move mem- and map-files the same way as ihx-files
9711         * src/z80/main.c (_setDefaultOptions): removed --generic
9712         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9713         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9714         * src/pic/glue.c (picglue): --c1mode works again
9715         * src/pic16/glue.c (pic16glue): --c1mode works again
9716         * src/asm.c (printCLine): fix #660034
9717
9718 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9719
9720         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9721         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9722         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9723         * as/mcs51/lkmem (summary): better fix for sp problem
9724         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9725         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9726         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9727                                               remove --stack-after-data
9728
9729 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9730
9731         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9732         * src/SDCCutil.c (join): ugly bug: missing '\0'
9733         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9734
9735 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9736
9737         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9738         * src/port.h: typo
9739         * src/pic/main.c (_asmCmd): gpasm supports -o
9740         * src/z80/main.c: more general macros
9741         * device/lib/Makefile.in: remove intermediate files
9742
9743 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9744
9745         * .version: Bumped version number to 2.3.3
9746         * src/SDCCBBlock.c: new option -o
9747         * src/SDCCglobl.h: new option -o
9748         * src/SDCCglue.c: new option -o
9749         * src/SDCCmain.c: new option -o
9750         * src/asm.c: new option -o
9751         * src/ds390/main.c: new option -o
9752         * src/pic/glue.c: new option -o
9753         * src/pic/pcode.c: new option -o
9754         * src/pic/ralloc.c: new option -o
9755         * src/pic16/glue.c: new option -o
9756         * src/pic16/pcode.c: new option -o
9757         * src/pic16/ralloc.c: new option -o
9758         * src/z80/main.c: new option -o
9759         * device/lib/Makefile.in: use -o
9760         * support/regression/ports/ds390/spec.mk: use -o
9761         * support/regression/ports/gbz80/spec.mk: use -o
9762         * support/regression/ports/mcs51/spec.mk: use -o
9763         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9764         * support/regression/ports/z80/spec.mk: use -o
9765         * support/regression/ports/ucz80/spec.mk: use -o
9766         * support/regression/ports/xa51/spec.mk: use -o
9767         * support/regression/fwk/lib/timeout.c: fix usage string
9768
9769 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9770         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9771
9772 2003-01-07    <johan AT balder>
9773
9774         * src/SDCCast.c (decorateType): fixed bug #600035
9775
9776 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9777         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9778         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9779         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9780         * src/pic/pcode.c: outcommented unused variable to remove warnings
9781         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9782
9783 2003-01-06    <karl AT turbobit.com>
9784         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9785    regression tests.
9786
9787 2003-01-06    <johan AT balder>
9788
9789         * src/SDCCicode.c: fixed array add
9790
9791 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9792         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9793         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9794
9795 2003-01-04    <johan AT balder>
9796
9797         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9798
9799 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9800         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9801
9802 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9803         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9804         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9805
9806 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9807         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9808
9809 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9810         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9811
9812 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9813         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9814
9815 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9816
9817     * in \sdcc\as\mcs51\ changed these files in order to create an
9818     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9819     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9820     following files to include the previous two files: aslink.dsp,
9821     Makefile.aslink, Makefile.bcc, and Makefile.in.
9822
9823     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9824     .adb instead of .cdb
9825
9826 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9827
9828         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9829         value from option --iram-size.
9830
9831 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9832
9833         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9834         dram[] array.
9835
9836 2002-09-18    <wiml AT hhhh.org>
9837
9838         * SDCClrange.h: exposed setFromRange() and setToRange()
9839         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9840           packRegsForAccUse() (bug 542397)
9841         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9842           multiple times and emitting the fetch operations more than once
9843           added aopGetUsesAcc() function to allow binary operators to
9844           fetch their operands in the correct order; made genMinus() emit
9845           compact code for X = LITERAL - Y
9846
9847 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9848         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9849         sprintf() in line 1267.
9850
9851 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9852         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9853         like ports.
9854
9855 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9856         Changes to aslink (All the changes are marked with 'JCF'):
9857
9858         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9859         summary().
9860
9861         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9862         area BSEG.  Also moves, if possible, the DATA area down into the internal
9863         ram so more space is available.
9864
9865         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9866         sflag.
9867
9868         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9869         not bytes.  Function summary() which creates a memory usage summary
9870         file with extension .mem.  Reports of overlaping stack and small stack
9871         size.  If the space for the stack is less than 16 bytes aslink trows a
9872         warning.
9873
9874         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9875         the 8051.  Option 'y' for memory summary output file.
9876
9877         Changes to sdcc (All the changes are marked with 'JCF'):
9878
9879         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9880
9881         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9882         overlaying area for it (uses RegBankUsed[4]).
9883
9884         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9885         bank zero as used by default.  By default aslink locates the stack
9886         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9887         the creation of the .mem file.  Delegates the allocation of data area
9888         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9889         the begining of the stack area to aslink.
9890
9891         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9892         glue() in SDCCglue.c creates an area for it.
9893
9894 2002-09-03  Borut Razem <borut.razem AT siol.net>
9895         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9896         sdcc/src/pic/glue.c:
9897         introduced atexit() handler for teporay files removal in case of
9898         errors, assertions, ...
9899
9900 2002-08-29  Borut Razem <borut.razem AT siol.net>
9901         * sdcc/support/cpp2/auto-host_vc_in.h:
9902         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9903         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9904         Maybe there is a similar problem with BORLANDC? It should be checked!
9905
9906         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9907         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9908         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9909         was not executed, and the compiler (cl) launched a warning:
9910         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9911
9912 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9913         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9914
9915 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9916         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9917
9918         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9919           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9920           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9921           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9922           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9923           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9924           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9925         - added Release configuration in VS projects
9926         - review of compiler an linker options
9927         - VC .exe files are generated in bin_vc directory, not to interfere
9928           with binaries generated from other projects (cygwin, mingw, bcc ...)
9929
9930         * sdcc/src/yacc.dsp: added
9931
9932         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9933         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9934         and insert the version number definitions from .version
9935
9936         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9937
9938         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9939         added - genarate auto-host.h using auto-host_vc_in.h as template
9940
9941         * sdcc/sdcc_vc.h,
9942         removed from CVS, generated automatically
9943
9944 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9945         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9946
9947 2002-08-11  Borut Razem <borut.razem AT siol.net>
9948         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9949
9950 2002-08-10  Borut Razem <borut.razem AT siol.net>
9951         * src/SDCCmain.c (main):
9952         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9953         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9954         The consequence was that some temporary files were not removed.
9955
9956         * src/SDCCglue.c:
9957         unification of code in functions tempfilename() and tempfile():
9958         function tempnam() is defined in Visual Studio 6.0 and .NET
9959
9960         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9961
9962         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9963           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9964         - removed compiler command line option /WX: Treats all warnings as errors
9965         - update a list of source files, included into the project
9966
9967         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9968           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9969         changed project type to Generic Project so that can be correcly converted to VS.NET project
9970
9971         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9972
9973         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9974
9975         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9976
9977         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9978         added return 0 statements after assert() to make compiler happy
9979
9980         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9981         added newline in the def file to keep MSC compiler satisfied
9982
9983         * sdcc/src/z80/gen.c:
9984         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9985           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9986         - solved MSC error in function aopDump()
9987
9988         * sdcc_vc.h: define PREFIX as "\\sdcc"
9989
9990 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9991         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9992
9993 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9994         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9995         - Rewrote the register banking algorithm.
9996         - Added pCode live-range analysis to registers (for now, only non-used and
9997         singly-used registers optimized away)
9998
9999         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10000
10001         * 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.
10002
10003 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10004         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10005
10006 2002-04-22  Michael Hope  <michaelh AT vroom>
10007
10008         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10009
10010         * configure.in (DD_COPT): Added include support required for gbdk.
10011
10012         * .version: Bumped version number just to increase it.
10013
10014         * src/SDCCmain.c: Added -nostdinc to the default options.
10015
10016 2002-04-15  Michael Hope  <michaelh AT vroom>
10017
10018         * device/lib/z80/printf.c (sprintf): Added.
10019
10020         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10021
10022         * src/z80/peeph.def: Added transpose redundent load rule.
10023
10024         * src/z80/main.c: Added force callee saves for jaune.
10025
10026         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10027
10028         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10029
10030 2002-03-28  Johan Knol  <johan AT balder>
10031
10032         * src/SDCCval.c: fixed bug #532436
10033
10034 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10035         * /src/port.h:
10036         Added "char *Processor" field to the port structure.
10037
10038         * /src/SDCCmain.c:
10039         Added -p option. Allows port dependent processor to be specified.
10040
10041         * all ports:
10042         Initialized the new field char *Processor field to NULL in all ports
10043
10044         * /src/pic/*:
10045         Compiler generated registers for interrupt context saving
10046         were not getting allocated.
10047
10048 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10049
10050         * /src/SDCCast.c:
10051         Fixed left shift. Will promote the left side of a left shift
10052         if a) left shifting more than size of operand or b) when assigned
10053         to something size > size of left side
10054
10055 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10056         * src/pic/*
10057         tons of changes. Register allocation has been
10058         rewritten. Added customization for the various PICs. Flow
10059         analysis is restructured. ...
10060
10061         * src/pic/device.h:
10062         Added
10063
10064         * src/pic/device.c:
10065         Added. device.c is a PIC port hack to accomodate variations
10066         in PIC devices.
10067
10068 2002-03-13  Michael Hope  <michaelh AT vroom>
10069
10070         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10071
10072 2002-03-04  johanknol  <johanknol AT manik>
10073
10074         * /src/SDCCval.c: fixed
10075
10076         const unsigned char arr[][2] = { { 0, 1 } };
10077         t18.c:1: error: Initializer element is not constant
10078
10079 2002-03-04  bela  <bela AT manik>
10080
10081         * /device/include/mcs51reg.h:
10082         ds89c420 register definition update
10083
10084 2002-03-03    <johan AT FRIJA>
10085
10086         * support/Util/SDCCerr.c: did something, but don't no why anymore
10087
10088         * support/regression/tests/bug-524691.c: made it a little less shy
10089
10090         * src/SDCCast.c (decorateType): fixed bug #524697
10091
10092         * src/SDCCast.c: made some lineno improvements
10093
10094         * src/SDCCval.c (getNelements): changed warning to error
10095
10096         * src/SDCCglue.c (printIvalArray): changed warning to error
10097
10098         * src/SDCCicode.c: fixed a warning for mingw
10099
10100         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10101
10102         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10103
10104 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10105
10106         * src/ds390/peeph.def:
10107         Added some more peephole rules
10108
10109         * src/ds390/gen.c: Various fixes & enhancements
10110
10111         * src/SDCClrange.c, src/SDCClrange.h:
10112         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10113
10114         * src/ds390/ralloc.c:
10115         various fixes & enhancements (ds390) specific
10116
10117         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10118         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10119         from rallocs.
10120
10121         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10122
10123 2002-03-02    <johan AT FRIJA>
10124
10125         * src/SDCCast.c (decorateType): fixed bug #524708
10126
10127         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10128
10129         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10130
10131 2002-03-01  Michael Hope  <michaelh AT vroom>
10132
10133         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10134
10135         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10136
10137 2002-03-01    <johan AT FRIJA>
10138
10139         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10140
10141         * src/SDCCast.c (decorateType): fixed bug #524209
10142
10143         * src/SDCCval.c (valNot): fixed bug #524195
10144
10145 2002-02-26    <johan AT balder>
10146
10147         * src/xa51/gen.c: fixed a warning
10148
10149         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10150
10151         * src/SDCCast.c (decorateType): fixed bug #522534
10152
10153 2002-02-23    <johan AT balder>
10154
10155         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10156
10157 2002-02-22    <johan AT balder>
10158
10159         * src/SDCCast.c: fixed bug #514865
10160
10161         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10162
10163 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10164
10165         * sdcc/src/SDCCloop.c:
10166         Previous fix was not good. basic blocks that have "break" or "return" are
10167         not really partof a loop , but live ranges used in these blocks should
10168         be live thru the entire loop, so set partOfLoop but don't add them to
10169         loop region
10170
10171 2002-02-21    <johan AT FRIJA>
10172
10173         * src/SDCCcse.c: fixed bug #514308
10174
10175 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10176
10177         * src/SDCCloop.c:
10178         Fixed BUG #519583. If a conditional block ended in a return/break
10179         statement inside a loop, it was not being considered part of the loop.
10180
10181         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10182
10183 2002-02-10  Karl Bongers <karl AT turbobit.com>
10184
10185         * debugger/*:
10186         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10187         with lots of comments and notes.
10188
10189         * device/examples/test2.c:
10190         Fix bug, "red" variable not being initialized(compiler complained).
10191
10192         * device/examples/Makefile, examples/test3.c:
10193         Add Makefile in device/examples folder, compiles test3.c
10194         for use as a multiple module SDCDB test case.
10195
10196         * sim/ucsim/cmd.src/cmdset.cc:
10197         Took out debug printfs in ucsim "next" command.
10198
10199         * sim/ucsim/xa.src:
10200         Karl and Johan start ucsim XA support.  Most dissassembly working,
10201         about 75% emulation done(plenty of work remaining).
10202
10203         * sim/ucsim/z80.src:
10204         Add Z80 support to ucsim, add test-ucz80 regression test,
10205         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10206         Notice z80 compiler fails on examples/test3.c/crc code.
10207
10208 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10209
10210         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10211         Added support for --parms-in-bank1
10212
10213         * src/ds390/peeph.def:
10214         added a few more peephole optimzations
10215
10216         * src/ds390/main.c:
10217         1) added __builtin_inp & __builtin_outp used to read in data of given length
10218            from a memory mapped port
10219         2) added __builtin_memcmp
10220         3) added __builtin_swapw swap bytes of a short
10221
10222         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10223         1) handle multiple send & receives from register bank1
10224         2) ralloc can now allocate DPTR1 to some liveRanges
10225
10226         * src/SDCCsymt.c, src/SDCCsymt.h:
10227         changes to handle multiple sends & receives
10228
10229         * src/SDCCptropt.h:
10230         added some pointer arithmetic optimization
10231
10232         * src/SDCCptropt.c:
10233         added some pointer arithmetic optimizations but not stable yet so not
10234         called from anywhere (will get this working shortly)
10235
10236         * src/SDCCopt.c: fixed for multiple sends & receives
10237
10238         * src/SDCCmain.c:
10239         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10240         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10241            set preprocessor defines (depending on options)
10242
10243         * src/SDCCicode.c, src/SDCCicode.h:
10244         changes made to handle multiple sends & receives
10245
10246         * src/SDCCglobl.h:
10247         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10248
10249         * src/SDCCcse.c, src/SDCCcse.h:
10250         added function findbackward def (to be used in upcoming optimization)
10251
10252         * src/SDCCcflow.c, src/SDCCcflow.h:
10253         added function returnAtEnd - to determine if a basic block terminates with
10254         a RETURN iCode
10255
10256         * src/SDCCast.c, src/SDCCast.h:
10257         added option parms-in-bank1
10258
10259         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10260         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10261         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10262         adjusted for --parms-in-bank1 option
10263
10264         * device/include/string.h:
10265         donot redefine "reentrant" keyword
10266
10267         * device/include/ds80c390.h: Added some more SFRs
10268
10269 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10270
10271         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10272
10273 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10274
10275         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10276
10277 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10278
10279         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10280
10281 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10282
10283         * Added --xram-movc option
10284
10285 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10286
10287         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10288
10289 2002-01-11  Johan Knol
10290
10291         * Added math lib of Jesus Calvino-Fraga
10292
10293 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10294
10295         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10296         * support/regression/Makefile: new target test-mcs51-stack-auto
10297         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10298
10299 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10300
10301         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10302
10303 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10304
10305         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10306
10307 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10308
10309         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10310
10311         * src/SDCCglue.h: add definition for printIvalChar()
10312
10313 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10314
10315         * src/SDCCast.c: fix #498138 by Johan
10316
10317         * src/SDCCglue.c: fix #498138 by Johan
10318
10319 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10320
10321         * support/regression/Makefile: fix clean
10322
10323         * support/regression/ports/ds390/support.c: fix transmission of last character
10324
10325 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10326
10327         * /sdcc/src/ds390/gen.c:
10328         a) improved computing address of stack variable
10329         b) took out some #if 0 code
10330         c) improved parmBytes adjustment
10331         d) improved genPlusIncr & genMinusIncr
10332         e) genCmp could generate bad code (when left assigned to DPTR)
10333         f) Fixed bug in hasInc
10334
10335         * /sdcc/src/ds390/ralloc.c:
10336         a) packRegsForSupport could mess up live information (Fixed)
10337         b) packRegsDPTRuse could be incorrect for left & right shift
10338
10339         * /sdcc/src/mcs51/ralloc.c:
10340         packRegsForSupport could mess up the live information (Fixed)
10341
10342         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10343
10344         * /sdcc/src/SDCCast.c:
10345         can reverse a loop even if function call is present as long
10346         as the loop control variable is local & is not passed as parameter
10347
10348 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10349
10350         * /sdcc/ChangeLog: *** empty log message ***
10351
10352         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10353         More builtin function additions for TININative
10354
10355         * /sdcc/src/ds390/ralloc.c:
10356         Had broken the regression testsuite
10357
10358         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10359
10360         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10361         Added funcattr hasStackParms will be set for reentrant functions when there
10362         are paramteres on the stack, this helps in minimizing frame pointer generation
10363         typeFromStr can handle function pointers now
10364
10365         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10366         *** empty log message ***
10367
10368 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10369
10370         * /src/ds390/gen.c, /src/ds390/main.c:
10371         More builtin function additions for TININative
10372
10373         * /src/ds390/ralloc.c:
10374         Had broken the regression testsuite
10375
10376         * /src/SDCCast.c: Fixed a bug in dumptree
10377
10378         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10379         Added funcattr hasStackParms will be set for reentrant functions when there
10380         are paramteres on the stack, this helps in minimizing frame pointer generation
10381         typeFromStr can handle function pointers now
10382
10383         * /doc/builtins.txt, /doc/TININative.txt:
10384         *** empty log message ***
10385
10386
10387 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10388
10389         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10390         ALPHA version for -mTININative
10391
10392         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10393         updated to reflect changes in the port structure
10394
10395         * /src/port.h:
10396         added function do_assemble (similar to do_link) if non-null this function
10397         will be called to do assembly (-mTININative) requires a multi command
10398         assembly
10399         added function genAssemblerEnd will be called to generate assembler Epilogue
10400
10401         * /src/SDCCsymt.c:
10402         added _JavaNative to debug info printing
10403
10404         * /src/SDCCmain.c: added option --tini-libid
10405         added port->do_assemble function (-mTININative) has a multi command assemble
10406
10407         * /src/SDCCglue.c: Disabled "constExpr" check
10408         added port->genAssemblerEnd function
10409
10410         * /src/SDCCglobl.h: Added option --tini-libid value
10411
10412         * /src/SDCCast.h:
10413         tookout optimizeCompare from the header (has no external references)
10414
10415         * /src/SDCCast.c: made one more function "static"
10416
10417 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10418
10419         * src/z80/mappings.i: Added z80asm support.
10420
10421         * src/z80/main.c: Added z80asm support on --asm=z80asm
10422
10423         * src/z80/gen.c: Fixed asm portability issues.
10424
10425         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10426
10427         * src/SDCCglue.c (printExterns): Added global/extern split.
10428
10429 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10430
10431         * support/regression/Makefile: added test for mcs51 model large
10432
10433         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10434
10435         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10436
10437 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10438
10439         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10440
10441 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10442
10443         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10444
10445         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10446
10447 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10448
10449         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10450
10451         * support/regression/tests/simplefloat.c: Port to mcs51.
10452
10453 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10454         * support/regression/tests/bug-485362.c: Added.
10455
10456         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10457
10458         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10459
10460         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10461
10462         * src/z80/gen.c (aopDump): Added a dump function.
10463
10464 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10465         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10466
10467         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10468
10469         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10470
10471         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10472
10473         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10474
10475         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10476
10477         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10478
10479         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10480
10481         * support/regression/ports/ds390/support.c: Use tinibios.
10482
10483         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10484
10485 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10486
10487         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10488         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10489
10490         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10491
10492         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10493
10494 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10495
10496         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10497
10498         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10499         (packRegsForIYUse): Created and optimised.
10500
10501 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10502
10503         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10504 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10505
10506         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10507
10508         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10509
10510         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10511
10512 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10513
10514         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10515
10516         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10517
10518 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10519
10520         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10521
10522         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10523
10524         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10525
10526 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10527
10528         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10529         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10530         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10531
10532         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10533
10534         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10535         (genNotFloat): Added.
10536         (genUminusFloat): Added.
10537
10538         * device/lib/z80/Makefile: Added floating pt stubs.
10539
10540         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10541
10542         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10543
10544         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10545
10546 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10547
10548         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10549
10550         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10551
10552         * sdcc/support/regression/Makefile: Add port ds390.
10553
10554         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10555
10556         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10557
10558         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10559
10560         * sdcc/support/regression/ports/ds390/support.c: Added.
10561
10562         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10563
10564         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10565
10566         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10567
10568 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10569
10570         * device/include/malloc.h: Added z80 and gbz80 support.
10571
10572         * device/lib/gbz80/heap.s: Added.
10573
10574         * device/lib/z80/heap.s: Added.
10575
10576         * device/lib/malloc.c: Added z80 and gbz80 support.
10577
10578         * support/regression/tests/malloc.c (testMalloc): Added.
10579
10580         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10581
10582         * support/regression/tests/bug-478094.c: Added.
10583
10584         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10585
10586 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10587
10588         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10589
10590         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10591
10592         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10593
10594         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10595
10596         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10597
10598 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10599
10600         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10601
10602 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10603
10604         * support/regression/tests/bug-477927.c: Added.
10605
10606         * src/z80/peeph.def: Added minor rules.
10607
10608         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10609
10610         * src/z80/peeph.def: Added jump optimisation modification.
10611
10612 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10613
10614         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10615
10616 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10617
10618         * support/regression/tests/funptrs.c: Added.
10619
10620 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10621
10622         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10623
10624 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10625
10626         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10627
10628         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10629
10630         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10631         (movLeft2ResultLong): Created.
10632
10633         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10634         (joinPushes): Added.  Joins two char pushes into a word push.
10635
10636 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10637
10638         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10639
10640         * support/makebin/Makefile (install): Added creation of dest dir.
10641
10642 2001-10-24 Karl Bongers <karl AT turbobit.com>
10643
10644         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10645
10646 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10647
10648         * src/z80/ralloc.c: Turned off faulty pack for one use.
10649
10650         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10651
10652         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10653
10654 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10655
10656         * support/regression/Makefile: Improved clean
10657
10658         * support/regression/ports/gbz80/spec.mk: Added clean
10659
10660         * support/regression/ports/host/spec.mk: Added clean
10661
10662         * support/regression/ports/z80/spec.mk: Added clean
10663
10664         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10665
10666         * support/regression/ports/mcs51/timeout.c: little improvements
10667
10668 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10669
10670         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10671
10672         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10673
10674         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10675
10676 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10677
10678         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10679
10680         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10681
10682 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10683         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10684
10685         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10686
10687         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10688
10689         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10690
10691         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10692
10693         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10694
10695         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10696
10697         * support/regression/tests/longor.c: Added.
10698
10699 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10700
10701         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10702
10703         * as/mcs51/aslink.h: define PATH_MAX
10704
10705         * as/mcs51/asm.h: define PATH_MAX
10706
10707         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10708
10709         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10710
10711         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10712
10713         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10714
10715         * src/SDCCglobl.h: define PATH_MAX
10716
10717         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10718
10719         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10720
10721 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10722
10723         * src/z80/gen.c (gencjneshort): Fixed
10724
10725         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10726
10727 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10728
10729         * support/regression/tests/bug-469671.c: Added.
10730
10731         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10732
10733 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10734
10735         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10736
10737         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10738
10739 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10740
10741         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10742
10743         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10744
10745         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10746
10747         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10748
10749         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10750
10751         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10752
10753         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10754
10755 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10756
10757         * 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.
10758
10759         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10760
10761         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10762
10763 2001-10-07    <johan AT FRIJA>
10764
10765         * device/lib/gets.c (gets): fixed the return value.
10766
10767 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10768         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10769
10770         * 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.
10771
10772         * 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.
10773
10774         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10775
10776         * src/pic/gen.c: Removed Safe_strdup.
10777
10778         * configure.in: Added option to enable libgc support.
10779
10780         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10781         (bitVectUnion): Optimised.
10782         (bitVectIntersect): Optimised.
10783         (bitVectBitsInCommon): Optimised.
10784         (bitVectCplAnd): Optimised.
10785
10786         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10787
10788 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10789
10790         * src/SDCCmain.c: distinguish between assembler debug and plain options
10791
10792         * src/avr/main.c:   remove standard assembler options
10793
10794         * src/ds390/main.c: remove standard assembler options
10795
10796         * src/mcs51/main.c: remove standard assembler options
10797
10798         * src/port.h: removed "PENDING" comment
10799
10800 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10801
10802         * src/device/lib/_mulint.c  : new, with assember functions
10803
10804         * src/device/lib/_mullong.c : new, with assember functions
10805
10806         * src/device/lib/_divuint.c : with assember functions
10807
10808         * src/device/lib/_divsint.c : with assember functions
10809
10810         * src/device/lib/_divulong.c: with assember functions
10811
10812         * src/device/lib/_divslong.c: with assember functions
10813
10814         * src/device/lib/_moduint.c : with assember functions
10815
10816         * src/device/lib/_modsint.c : with assember functions
10817
10818         * src/device/lib/_modulong.c: with assember functions
10819
10820         * src/device/lib/_modslong.c: with assember functions
10821
10822         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10823
10824         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10825
10826         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10827                                       replaced _mululong.c and _mulslong.c by _mullong.c
10828
10829 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10830
10831         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10832
10833 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10834
10835         * src/SDCCglue.c: test, if win32api is available for MINGW
10836
10837 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10838
10839         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10840         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10841         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10842         * support/regression/ports/host/spec.mk: removed GENERIC
10843         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10844         * support/regression/ports/z80/spec.mk: removed GENERIC
10845
10846 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10847
10848         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10849
10850         * support/regression/tests/bug-467035.c: Created.
10851
10852 2001-10-01    <johan AT FRIJA>
10853
10854         * src/SDCC.y: fixed bug #466586 part 1
10855
10856 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10857
10858         * SDCCicode.c: z80 has no generic pointers
10859         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10860
10861 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10862
10863         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10864
10865 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10866
10867         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10868
10869         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10870
10871 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10872
10873         * configure.in: Fixed up so that ucsim is only configured once.
10874
10875         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10876
10877         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10878         (getPathDifference): As above.
10879
10880         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10881
10882         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10883
10884 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10885         * .version: Updated to 2.3.1
10886
10887         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10888         Added copyright header.
10889
10890         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10891         (assemble): Added support for macro based assembler commands.
10892         (linkEdit): Added support for macro based linker commands.
10893         (preProcess): Changed the pre-processor to use macros.
10894         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10895         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10896
10897         * device/lib/z80/crt0.s: Added module name for debugging.
10898
10899 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10900
10901         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10902
10903         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10904
10905         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10906
10907         * src/Makefile.in: Added SDCCmacro and SDCCutil
10908
10909 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10910
10911         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10912
10913 2001-09-16    <johan AT FRIJA>
10914
10915         * 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.
10916
10917 2001-09-15    <johan AT FRIJA>
10918
10919         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10920         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10921
10922 2001-09-11    <johan AT FRIJA>
10923
10924         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10925
10926 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10927
10928         * support/regression/tests/bug-460444.c: Added test case.
10929
10930         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10931         (genCast): Added justification for all of the asserts.
10932
10933 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10934
10935         * support/regression/support.c: _xdata replaced by xdata
10936
10937         * support/regression/spec.mk: removed _generic
10938
10939 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10940
10941         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10942
10943         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10944         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10945
10946         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10947
10948         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10949
10950         * support/regression/tests/bug-460010.c: Added test case.
10951
10952         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10953
10954 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10955
10956         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10957
10958         * support/regression/testfwk.c: removed workaround for bug #436344
10959
10960         * support/regression/tests/bp.c: use less memory with mcs51
10961
10962         * support/regression/tests/bug-441448.c: use less memory
10963
10964         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10965
10966         * support/regression/collate-results.py: typo
10967
10968 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10969
10970         * support/regression/tests/fetchoverlap.c: Added new test case.
10971
10972         * support/regression/tests/bp.c: Added new test case.
10973
10974         * support/regression/tests/bug-448984.c: Added new test case.
10975
10976         * support/regression/tests/pow2shifts.c: Added new test case.
10977
10978         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10979         (genlshTwo): Fixed right shift for count > 8.
10980
10981         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10982
10983 2001-09-08    <johan AT FRIJA>
10984
10985         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10986
10987 2001-09-07    <johan AT FRIJA>
10988
10989         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10990
10991         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10992
10993 2001-09-06    <johan AT FRIJA>
10994
10995         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10996         * bernhard noted me at this: "() equals to (void)" (1.38)
10997
10998 2001-09-05    <johan AT FRIJA>
10999
11000         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11001
11002 2001-09-04    <johan AT FRIJA>
11003
11004         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11005
11006
11007 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11008
11009         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11010
11011 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11012
11013         * link/z80/aslink.h: Fixed path for PATH_MAX
11014
11015 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11016
11017         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11018
11019         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11020
11021         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11022
11023         * 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.
11024
11025 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11026
11027         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11028         (genCmp): Fixed up genCmp for the GB with longs.
11029
11030         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11031
11032         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11033
11034         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11035
11036         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11037
11038 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11039
11040         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11041
11042 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11043
11044         * 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.
11045
11046         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11047
11048 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11049
11050         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11051
11052         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11053
11054 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11055
11056   * sim/ucsim/configure:    little improvement of Cygwin-detection
11057   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11058   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11059   * support/regression/tests/bug-221100.c: small changes for mcs51
11060   * support/regression/tests/bug-221168.c: small changes for mcs51
11061   * support/regression/tests/bug-227710.c: small changes for mcs51
11062   * support/regression/tests/staticinit.c: small changes for mcs51
11063   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11064   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11065   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11066
11067 $Revision$