* doc/sdccman.lyx, */Makefile, */Makefile.in:
[fw/sdcc] / ChangeLog
1 2006-04-22 Borut Razem <borut.razem AT siol.net>
2
3         * doc/sdccman.lyx, */Makefile, */Makefile.in:
4           references to CVS replaced with Subversion
5
6 2006-04-21 Borut Razem <borut.razem AT siol.net>
7
8         * doc/sdccman.lyx, */Makefile, */Makefile.in:
9           references to CVS replaced with Subversion
10
11 2006-04-19 Borut Razem <borut.razem AT siol.net>
12
13         * src/version.awk: adapted for svn
14         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
15           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
16           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
17           /binutils-avr/etc/*.vi, *.jin: removed all properties
18           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
19
20 2006-04-19 Borut Razem <borut.razem AT siol.net>
21
22         * CVS to Subversion migration completed
23
24 2006-04-18 Borut Razem <borut.razem AT siol.net>
25
26         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
27           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
28
29 2006-04-17 Borut Razem <borut.razem AT siol.net>
30
31         * device/include/Makefile.in: added pic/*.inc to the installation
32
33 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
34
35         * support/regression/collate-results.py: fixed output in case of
36         a valdiag error
37         * support/regression/generate-cases.py: fixed splitting of pathnames
38         with dots
39         * as/hc08/lklibr.c (addfile),
40         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
41
42 2006-04-11 Raphael Neider <rneider AT web.de>
43
44         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
45         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
46         * src/pic16/pcode.c (assignValnums): fixed #1460578
47
48 2006-04-11 Raphael Neider <rneider AT web.de>
49
50         * device/lib/pic/libdev/*.c,
51         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
52           fixes #1468739, enables compilation in --std-c99 mode
53         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
54
55 2006-04-11 Raphael Neider <rneider AT web.de>
56
57         * src/pic/device.c (find_device): removed debug output
58           (list_valid_pics): enabled verbose listing of supported devices
59         * device/include/stdbool.h: define bool as char for pic14/16 as well
60
61 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
62
63         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
64
65 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
66
67         * .version: bumped version to 2.5.6
68         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
69
70 2006-04-06 Raphael Neider <rneider AT web.de>
71
72         * .version: bumped version to 2.5.6 (pic14 ABI changed)
73         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
74         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
75           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
76             pic14_constructAbsMap
77           (pic14printPublics): declare absolute global symbols as global
78           (pic14createInterruptVect),
79         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
80           (newReg): assume new registers unused, use correct name in
81             hashtable (reg->name instead of name), more debugLog output
82         * src/pic/device.h (PIC_device): added fields for verbose output
83         * src/pic/device.c: moved device definition to pic14devices.txt,
84             added routines for runtime parsing of pic14devices.txt,
85             added support for second config word
86         * src/pic/main.c (_process_pragma): removed #pragma maxram,
87           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
88           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
89           (_pic14_parseOptions): moved pCodeInitRegisters here
90           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
91         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
92           (pCodeInitRegisters): rewrapped comments, perpared new approach to
93             handling the pseudo stack
94         * device/lib/Makefile.in: ignore failures in objects-pic16,
95         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
96         * device/lib/pic/NEWS: document new dependency on picXXX.lib
97         * device/lib/pic/Makefile.subdir,
98         * device/lib/pic16/Makefile.subdir: improved clean rules
99         * device/lib/pic/libdev/: NEW, pic14 device libraries
100         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
101         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
102         * device/include/Makefile.in: create subdir and install pic14 headers
103         * device/include/pic/p16f_common.inc: removed unused declarations
104         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
105             PICs from inc2h.pl v1.6,
106             replaced BIT_AT macros with struct declarations
107         * device/include/pic/pic14devices.txt: definition of supported devices,
108             all above improvements contributed by Zik Saleeba, thanks
109         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
110         * support/scripts/sdcc.nsi: also install pic14 device libraries and
111             headers
112
113 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
114
115         * device/include/mcs51/c8051f410.h: added interrupt numbers,
116         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
117           thanks to Charles Olds
118
119 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
120
121         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
122
123 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
124
125         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
126         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
127         * support/regression/bug1464657.c: added, new test
128
129 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
130
131         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
132           version number
133
134 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
135
136         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
137           --no-peep and --peep-file <file> are used don't use default rules but
138           do use the <file>
139
140 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
141
142         * src/mcs51/gen.c (genCall): fixed bug 1457608
143
144 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
145
146         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
147         changes seem to cause (trigger?) problems with the build system.
148
149 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
150
151         * src/SDCCpeeph.c (operandsLiteral): new, added,
152           (callFuncByName): inserted operandsLiteral
153         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
154
155 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
156
157         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
158         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
159
160 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
161
162         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
163           implemented patch 1120823 Thanks to Willy De la Court (normal
164           interrupts need an interrupt number now if they are made critical),
165           and enabled nesting of critical functions though not for gbz80
166           (genCritical, genEndCritical): added functions
167           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
168         * src/z80/mappings.i: added "ei" to all mappings
169
170 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
171
172         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
173         submitted by the Debian SDCC maintainer Aurelien Jarno:
174         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
175         archive with gcc 4.1 on mips and wrote the patch"
176
177 2006-03-16 Raphael Neider <rneider AT web.de>
178
179         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
180           the left operand is shorter than the result (c* = lit-c* + int),
181           fixes bug #1450796
182         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
183           OP_SYMBOL
184
185 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
186
187         * src/.version: increased version number to 2.5.5
188         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
189         linking is done manually in pic16 port's _linkEdit,
190         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
191         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
192         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
193         allocate asmop as AOP_ACC,
194         (aopForRemat): added parameter 'bool result' in function declaration,
195         (pic16_aopGet): return AOP_ACC when accessing WREG,
196         (pic16_popGetTempReg): minor modification,
197         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
198         'pic16_allocWithIdx',
199         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
200         calling function in absolute addresses,
201         (genAssign): take into account AOP_ACC asmop,
202         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
203         * src/pic16/pcoderegs.c: some debug functions and lines added,
204         * src/pic16/ralloc.c (decodeRegType): added but commented out,
205         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
206         register too,
207         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
208         call to allocReg, not by manually allocating a new one,
209         (pic16_assignRegisters): now before going through the register
210         allocating functions mark all registers as free. This eliminates some
211         side effects resulting from peephole parser done earlier in the backbone
212
213 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
214
215         * src/SDCCicode.c (geniCodeLogic),
216         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
217
218 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
219
220         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
221           (genSend): bugfix, do not allocate and free twice,
222           (shiftRLong): handle partially overlapping aops
223         * support/regression/tests/bitopcse.c: fixed warning redefined idata
224
225 2006-03-08 Borut Razem <borut.razem AT siol.net>
226
227         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
228           for pic16
229
230 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
231
232         * support/regression/tests/bug1409955.c: new, added
233         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
234         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
235           (aopForSym, aopOp): increment asmop.allocated if reused,
236           (freeAsmop): decrement asmop.allocated and check for zero instead of
237           using asmop.freed,
238           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
239           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
240            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
241            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
242            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
243            genSignedRightShift, genRightShift, genDataPointerGet,
244            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
245            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
246             in reverse order from allocation,
247           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
248             added swappedLR to keep track
249         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
250           pdata & code for GCC, z80, gbz80 & hc08
251         * support/regression/tests/zeropad.c: moved defines to testfwk.h
252
253 2006-03-08 Raphael Neider <rneider AT web.de>
254
255         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
256
257 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
258
259         * device/include/mcs51/c8051f410.h: new SiLabs mcu
260         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
261         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
262
263 2006-03-06 Borut Razem <borut.razem AT siol.net>
264
265         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
266           made the linker quiet
267
268 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
269
270         * src/pic16/gen.c (genPcall): fixed bug #1443644
271         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
272         which dumps before the function entry point a data byte which represents
273         the number of the local variables used by the specified function, added
274         'xinst' for initial support for Extended Instruction Support,
275         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
276         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
277         port->fun_prefix anymore (may change later),
278         (genFunction, genEndFunction): do not store/restore local registers for
279         _main (this should take care the --main-return command line option in
280         the future),
281         (genOr): removed some legacy pic-port instructions,
282         * src/pic16/genarith.c (genAddLit): re-enabled old code because
283         performing operations with SFR's causes data to be written more than
284         once to each SFR. Perhaps SFRs should be handled in special cases...
285         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
286         pcode.h
287         * src/pic16/main.c (_process_pragma): stack bound checking did not take
288         into account for stack starting position,
289         (struct OPTIONS pic16_optionsTable): added command line argument
290         --extended or -y for Extended Instruction Support,
291         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
292         (deassignLRs): *** perhaps the most important change, old 'for' code
293         (commented out for reference), didn't account for some registers which
294         were left marked 'not free' after a pointer operation. The change
295         reduces register usage a lot in some cases
296
297 2006-03-04 Borut Razem <borut.razem AT siol.net>
298
299         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
300           _clean
301         * support/regression/tests/bug-524697.c: decreased array size for
302           mcs51 to fit into the internal RAM
303         * support/regression/Makefile.in: a little bit more verbose
304
305 2006-03-03 Borut Razem <borut.razem AT siol.net>
306
307         * support/regression/fwk/lib/testfwk.c,
308           support/regression/fwk/include/testfwk.h: introduced function
309           _prints(), nonrecursive _printn(), call _initEmu() from main()
310         * support/regression/ports/gbz80/support.asm,
311           support/regression/ports/ucz80/support.asm,
312           support/regression/ports/z80/support.asm,
313           support/regression/ports/ds390/support.c,
314           support/regression/ports/hc08/support.c,
315           support/regression/ports/host/support.c,
316           support/regression/ports/mcs51/support.c,
317           support/regression/ports/xa51/support.c: added empty _initEmu()
318           function
319         * support/regression/ports/pic16/gpsim.cmd,
320           support/regression/ports/pic16/spec.mk,
321           support/regression/ports/pic16/support.c,
322           support/regression/Makefile.in: added pic16 regression test
323
324 2006-03-01 Raphael Neider <rneider AT web.de>
325
326         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
327           genConstPointerGet): use safe way of generating MOVFF to cover
328             literals as well as registers, fixes bug #1440527
329         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
330             dereference
331           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
332             more correctly, fixes bug #1232186
333           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
334         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
335             gplink guess the correct processor in more cases, applied patch
336             from Till Riedel attached to and fixing bug #1436552
337
338 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
339
340         * support/regression/tests/array.c: added, contains check for #1434401
341         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
342
343 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
344
345         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
346         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
347         * device/include/mcs51/c8051f326.h,
348         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
349         * device/include/mcs51/c8051f000.h,
350         * device/include/mcs51/c8051f018.h,
351         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
352           PCON_IDLE,PCON_STOP and added sfr16 definitions
353
354 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
355
356         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
357           genGetWord): fixed bug 1409955
358
359 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
360
361         * device/include/hc08/mc68hc908gp32.h,
362         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
363
364 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
365
366         * src/SDCCast.c (constExprValue): return NULL if not a value
367         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
368         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
369         * support/regression/tests/bitfields.c: enabled signed bitfield for all
370
371 2006-02-13 Borut Razem <borut.razem AT siol.net>
372
373         * src/regression/ptrarg.c: added, fails due to bug #1430967
374         * src/regression/Makefile: ptrarg.c added, ...
375
376 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
377
378         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
379         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
380
381 2006-02-11 Borut Razem <borut.razem AT siol.net>
382
383         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
384           print "Processor: xxx" message to stdout only if --verbose
385
386 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
387
388         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
389         * support/regression/tests/bug1426356.c: added
390         * support/regression/tests/bitfields.c: removed 2 tests
391
392 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
393
394         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
395         * device/include/mcs51/c8051f330.h,
396         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
397           PCON_IDLE,PCON_STOP and added sfr16 definitions
398         * device/lib/_divsint.c,
399         * device/lib/_divuint.c,
400         * device/lib/_divulong.c,
401         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
402           register bank bug for small stackauto
403
404 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
405
406         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
407
408 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
409
410         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
411         * all.dsp: corrected several bin paths
412         * device/include/mcs51/c8051f120.h,
413         * device/include/mcs51/c8051f300.h,
414         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
415           to PCON_IDLE,PCON_STOP
416         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
417         * device/lib/printf_large.c (output_float): fixed bug 1388703
418         * support/regression/tests/bug1057979.c: added test for bug 1388703
419
420 2006-02-08 Raphael Neider <rneider AT web.de>
421
422         * src/pic/pcode.c (pciTRIS): fixed typo,
423           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
424           (LinkFlow): fixed handling of flows that end in a call,
425           (ReuseReg): perform safety check earlier
426         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
427             to work with flows at the beginning of a pBlock,
428             fixes #1426557 (Symbol not previously defined),
429           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
430             usage information
431           (RemoveUnusedRegisters): update register usage info
432         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
433             created, reuse existing ones instead
434         * src/pic/gen.c (genPcall): fixed #1424719
435
436 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
437
438         * link/z80/lkmain.c,
439         * link/z80/lklex.c,
440         * link/z80/lkdata.c,
441         * link/z80/aslink.h: fixed build on current cygwin:
442         replaced getline() by lk_getline()
443
444 2006-02-01 Borut Razem <borut.razem AT siol.net>
445
446         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
447           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
448           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
449           src/regression/bool1.c, src/regression/bool2.c,
450           src/regression/bool3.c, src/regression/call1.c,
451           src/regression/compare.c, src/regression/compare10.c,
452           src/regression/compare2.c, src/regression/compare3.c,
453           src/regression/compare4.c, src/regression/compare5.c,
454           src/regression/compare6.c, src/regression/compare7.c,
455           src/regression/compare8.c, src/regression/compare9.c,
456           src/regression/configword.c, src/regression/for.c,
457           src/regression/inline.c, src/regression/mult1.c,
458           src/regression/nestfor.c, src/regression/or1.c,
459           src/regression/pointer1.c, src/regression/ptrfunc.c,
460           src/regression/rotate1.c, src/regression/rotate2.c,
461           src/regression/rotate3.c, src/regression/rotate4.c,
462           src/regression/rotate5.c, src/regression/rotate6.c,
463           src/regression/rotate7.c, src/regression/string1.c,
464           src/regression/struct1.c, src/regression/sub.c,
465           src/regression/sub2.c, src/regression/switch1.c,
466           src/regression/while.c, src/regression/xor.c,
467           src/regression/create_stc, src/regression/simulate,
468           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
469           regression tests
470         * src/regression/gpsim_assert.h: added
471
472 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
473
474         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
475         ((void (code *) (void)) 0) ();
476         * as/hc08/aslex.c,
477         * as/hc08/aslink.h,
478         * as/hc08/asm.h,
479         * as/hc08/asmain.c,
480         * as/hc08/lkdata.c,
481         * as/hc08/lklex.c,
482         * as/hc08/lkmain.c,
483         * as/mcs51/aslex.c,
484         * as/mcs51/aslink.h,
485         * as/mcs51/asm.h,
486         * as/mcs51/asmain.c,
487         * as/mcs51/lkdata.c,
488         * as/mcs51/lklex.c,
489         * as/mcs51/lkmain.c,
490         * as/z80/aslex.c,
491         * as/z80/asm.h,
492         * as/z80/asmain.c: fixed build on current cygwin:
493         replaced getline() by as_getline()
494
495 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
496
497         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
498         declarator in the symbol chain
499         * src/SDCCsymt.h,
500         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
501         parameter list for function pointers
502         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
503         * support/regression/tests/bug-716242.c: added
504
505 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
506
507         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
508         offset if possible
509         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
510
511 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
512
513         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
514         inifinitely recurseable, added static
515         * support/regression/tests/bug-1408066.c: added
516
517 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
518
519         * src/SDCCicode.h,
520         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
521         renamed, added possibility to create "postLoopLbl"-labels
522         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
523         newiTempLoopHeaderLabel
524         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
525         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
526         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
527         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
528         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
529         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
530         (basicInduction): fixed bug #136564, made static,
531         (loopInduction): changed parameter of basicInduction, made static,
532         (addPostLoopBlock): added
533         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
534         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
535         findLoopEndSeq
536         * support/regression/tests/bug-136564.c: added
537         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
538         --std-sdcc99 to LIBSDCCFLAGS
539
540 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
541
542         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
543         while loop
544         * support/regression/tests/bug-1406131.c: added
545
546 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
547
548         * src/SDCCast.c (decorateType): fix promotion of unary minus
549         * src/SDCCsymt.c (computeType): beautified
550         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
551         (valUnaryPM, valComplement): fix sign and promotion,
552         (valNot): ANSI: result type is int (SDCC: unsigned char)
553         * support/regression/tests/uminus.c: speedup by removing superflous
554         test case 'int'
555         * support/regression/tests/onebyte.c: added promotion and signedness
556         tests for unary minus
557         * support/regressions/tests/bug-477927.c: disable warning about
558         uninitialized variables
559         * support/regression/tests/not.c: added
560
561 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
562
563         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
564         * src/mcs51/gen.c (gen51Code): show final register usage after
565         fillGaps in asm with --i-code-in-asm
566         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
567         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
568         incUsed, rliveClear, adjustIChain): made static,
569         (setFromRange): excluded because it's unused,
570         (findPrevUseSym, markWholeLoop): added,
571         (findPrevUse): rewritten; fixes bug 895992; now a complete search
572         through all branches of predecessors enables sdcc to emit the warning
573         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
574         (rlivePoint): made static, added parameter emitWarnings which is only
575         true during the first run out of two,
576         (findRecursiveSucc, findRecursivePred): removed,
577         (computeLiveRanges): made static, added parameter emitWarnings,
578         (dumpIcRlive): added for debugging only
579         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
580         removed prototype of setFromRange()
581         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
582         in call of computeLiveRanges()
583         * support/regression/tests/bug-895992.c: added
584         * support/regression/tests/bug-971834.c: added
585         * support/valdiag/tests/bug-895992.c: added
586         * support/valdiag/tests/bug-971834.c: added
587
588 2005-12-18 Raphael Neider <rneider AT web.de>
589
590         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
591           (genUnpackBits): improved code for direct operands,
592           (genPackBits): improved code for literal assignment to bitfields
593             and for direct destination operands (no FSR indirection),
594             prevented redundant AND, fixes #1362800,
595           (AccLsh): added parameter to disable masking of the result
596         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
597           skip instructions with side-effects (like incfsz),
598           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
599         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
600         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
601           fixes #1375263
602
603 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
604
605         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
606         volatile variables as spill location
607
608 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
609
610         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
611         replacing literals
612         * support/regression/tests/bug-1376320.c: added
613
614 2005-12-08 Raphael Neider <rneider AT web.de>
615
616         * src/pic/device.c: renamed is_shared to pic14_is_shared
617         * src/pic/gen.c (genIfx): re-enabled handling of sbits
618         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
619           (is_valid_identifier): added for above workaround
620
621 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
622
623         * device/lib/Makefile.in: fixed to enable port-specific-objects
624         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
625           char, thanks Hubert Sack
626         * doc/sdccman.lyx: documented --xstack-loc,
627           elaborated a bit more on interrupts and pitfalls,
628           removed "setjmp/longjmp unsupported",
629           documented some unsupported C99 features
630         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
631         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
632           if, thanks Hubert Sack
633         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
634         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
635           make make_library
636         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
637           regression tests can report resource usage (rfe 700441)
638         * support/regression/collate-results.py: report resource usage
639         * support/regression/ports/ds390/spec.mk,
640         * support/regression/ports/hc08/spec.mk,
641         * support/regression/ports/mcs51/spec.mk,
642         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
643         * support/regression/ports/ds390/uCsim.cmd,
644         * support/regression/ports/hc08/uCsim.cmd,
645         * support/regression/ports/mcs51/uCsim.cmd,
646         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
647         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
648           library, use the default one
649         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
650           building the library
651
652 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
653
654         * config.dsp: added dependency on .version and configure_vc.awk
655         * device/include/setjmp.h: updated for --stack-auto and --xstack
656         * device/include/mcs51/at89c51snd1c.h: corrected line endings
657         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
658         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
659         * device/lib/libsdcc.lib: added _setjmp
660         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
661           (decorateType): fixed bug 1372851,
662           (optimizeGetHbit): fixed warning
663         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
664           array initialisation
665         * support/regression/tests/bug1057979.c: added test for bug 1358192
666         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
667
668 2005-12-03 Borut Razem <borut.razem AT siol.net>
669
670         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
671           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
672
673 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
674
675         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
676         createIval): implement symbol independant "flexible array member",
677         (createIvalCharPtr): implemented flexible array initialisation with a
678         string
679         * src/SDCCsymt.c (copyStruct): removed,
680         (getSize): fixed misleading comment,
681         (getAllocSize): removed, the additional allocation size is now in
682         sym->flexArrayLength,
683         (checkStructFlexArray): new, syntax checks for flexible array members,
684         (compStructSize): added syntax checks for "flexible array members"
685         (copyStruct): removed,
686         (copyLinkChain): removed inefficient fix for bug 770487
687         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
688         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
689         symbol->flexArrayLength
690         * src/SDCCerr.c,
691         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
692         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
693         * support/regression/tests/structflexarray.c: added
694         * support/valdiag/tests/structflexiblearray.c: added
695
696 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
697
698         * src/SDCCast.c (decorateType): fixed bug 1368489
699         * support/Util/SDCCerr.c,
700         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
701
702 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
703
704         * device/include/mcs51/at89c51snd1c.h: added file submitted by
705           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
706
707 2005-11-27 Borut Razem <borut.razem AT siol.net>
708
709         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
710           support/cpp2/mkdeps.h: added command line option
711           -obj-ext=<extension> to SDCPP to define object file externion, used
712           for generation of make dependencies (-M)
713         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
714
715 2005-11-26 Borut Razem <borut.razem AT siol.net>
716
717         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
718           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
719           added pic and pic16 libraries
720
721 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
722
723         * device/include/float.h: Corrected typo in prototype of __fsgt
724
725 2005-11-25 Borut Razem <borut.razem AT siol.net>
726
727         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
728           added creation of model-mcs51-stack-auto libraries
729
730 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
731
732         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
733         and fields-list too
734         * src/SDCCast.c (createIvalArray): removed obsolete comment
735
736 2005-11-24 Borut Razem <borut.razem AT siol.net>
737
738         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
739           added missing device/lib/mcs51/crt*.asm sources
740
741 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
742
743         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
744
745 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
746
747         * device/lib/_fs2schar.c,
748         * device/lib/_fs2sint.c,
749         * device/lib/_fs2slong.c: optimized inline asm
750
751 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
752
753         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
754           Better handling of floats between -1.0 and 0.0.
755
756 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
757
758         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
759           (the missing "if"s prohibited removal of redundant labels)
760
761 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
762
763         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
764           Properly convert floats between -1.0 and 0.0 to long, int, and char
765           types (max integer value of negative floats tends to zero).
766         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
767           Removed changes made so to work properly with floats between
768           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
769           and _fs2char.c
770
771 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
772
773         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
774         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
775         (genCast) cosmetic change
776         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
777         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
778         from mcs51
779         * support/regression/tests/bitfields (testSignedBitfields): added
780
781 2005-11-18 Borut Razem <borut.razem AT siol.net>
782
783         * sdcc/device/lib/Makefile.in: remove all unnecessary files
784         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
785           introduced SILENT option to make building of pic16 libraries less
786
787 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
788
789         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
790           Now they work properly with floats between -1.0 and 0.0
791         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
792
793 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
794
795         * src/SDCCicode.c (printOperand): added missing else
796
797 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
798
799         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
800         reformatted for better readability
801         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
802         signed bitfields
803
804 2005-11-17 Borut Razem <borut.razem AT siol.net>
805
806         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
807           introduced SILENT option to make building of pic16 libraries less
808           verbose - used for nightly snapshot build
809         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
810           available on Win32 platforms.
811         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
812           medium, large, pic and pic16
813
814 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
815
816         * device/lib/printf_large.c: Temporary patch for bug 1358192:
817           printf("%f"...) sets fraction to zero.
818
819 2005-11-16 Raphael Neider <rneider AT web.de>
820
821         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
822           fixes #1357221
823         * src/pic/gen.c (genIfx): implemented for CARRY bit
824         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
825           to generic pointers, fixes #1357332,
826           (pic16_movLit2f): NEW,
827           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
828
829 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
830
831         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
832
833 2005-11-11 Raphael Neider <rneider AT web.de>
834
835         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
836         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
837           compute pointer's type from operand,
838           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
839           improved single bit reads, fixes bug #1353379
840
841 2005-11-09 Borut Razem <borut.razem AT siol.net>
842
843         * support/scripts/sdcc.nsi: added lib/pic to the package
844
845 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
846
847         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
848
849 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
850
851         * support/regression/tests/bug1348008.c: added
852         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
853         * support/regression/tests/bug1337835.c: updated comment
854
855 2005-11-06 Borut Razem <borut.razem AT siol.net>
856
857         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
858           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
859           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
860           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
861           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
862           dynamic construction of cl_error_class and derivates - 2.nd try
863
864 2005-11-05 Borut Razem <borut.razem AT siol.net>
865
866         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
867           bug, which caused Bus Errors on sparc solaris
868
869 2005-11-04 Borut Razem <borut.razem AT siol.net>
870
871         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
872           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
873           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
874           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
875           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
876           and derivates to resolve the initialization problem on OSX
877
878 2005-11-02 Borut Razem <borut.razem AT siol.net>
879
880         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
881           corrected typo - #include <winsock2.h>
882
883 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
884
885         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
886           (_asxxxx_mapping): added org directive for future enhancements
887
888 2005-11-01 Borut Razem <borut.razem AT siol.net>
889
890         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
891           enabled sockets on WIN32
892         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
893
894 2005-10-31 Borut Razem <borut.razem AT siol.net>
895
896         * support/regression/generate-cases.py: escape backslashes in {testcase}:
897           WIN32 backslash path delimiters should be escaped when used in C strings
898         * support/regression/tests/bitfields.c: exclude failing assertions for
899           __CYGWIN32__ and __MINGW32__ hosts
900
901 2005-10-30 Borut Razem <borut.razem AT siol.net>
902
903         * src/SDCCutil.c: corrected double comparison typo
904
905 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
906
907         * device/lib/medium/Makefile: added for new memory model medium
908         * device/include/asm/mcs51/features.h: updated for medium/pdata
909         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
910           added Multiply & Accumulate sbit's and MAC0_PAGE define
911         * device/include/mcs51/c8051f300.h: added sfr16 definitions
912         * device/include/mcs51/c8051f310.h: added sfr16 definitions
913         * device/lib/_mullong.c: update for medium model
914         * device/lib/incl.mk: added medium model
915         * doc/sdccman.lyx: documented medium model
916         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
917         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
918         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
919         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
920           (allocParms): set SCLS and OCLS to pdata for medium model
921         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
922           for pdata,
923           (powof2): return <0 if not power of 2
924         * src/avr/gen.c (genBitWise): use updated powof2
925         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
926           (shiftR2Left2Result): small optimization in setup, save acc when storing,
927           (shiftLLeftOrResult): use B if necessary
928         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
929         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
930         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
931         * support/regression/Makefile.in: added test-mcs51-medium
932         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
933
934 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
935
936         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
937         specifier unsigned
938         * device/lib/time.c (mktime): fixed bug 1334315
939
940 2005-10-28 Raphael Neider <rneider AT web.de>
941
942         * device/include/pic/p16f_common.inc: added common declarations
943         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
944
945 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
946
947         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
948           (aopPutUsesAcc): added to predict accumulator use,
949           (assignResultValue): save acc if necessary,
950           (genMinusDec): store result if indirectly addressed,
951           (genDivOneByte):  save acc if necessary,
952           (movLeft2Result): bugfix if left already in acc,
953           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
954             attention to accumulator use (esp. pdata),
955           (genReceive): receive pdata correctly
956         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
957         * src/SDCCicode.h: added isOperandInPagedSpace prototype
958
959 2005-10-27 Raphael Neider <rneider AT web.de>
960
961         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
962
963 2005-10-27 Raphael Neider <rneider AT web.de>
964
965         * .version: changed version to 2.5.4
966         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
967         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
968           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
969             arithmetics support routines
970         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
971         * device/lib/Makefile.in: also create installdir for pic
972
973         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
974           pic14 port as well
975         * src/pic/device.c (dump_sfr): rewritten to delegate register
976           placement to the linker (use `extern sym' rather than sym EQU addr),
977           (validAddress): fixed to check last specified address
978         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
979           (popGetLit): truncate literal value to 8 bit,
980           (popGet): moved assert to more appropriate place
981           (popGetExternal): create pCode operand from and mark the according
982             symbol as being `extern'
983           (popGetAddr): added sanity check on immediate's offset, provide
984             GPOINTER tag on demand
985           (aopPut): fixed for immediates,
986           (mov2w_op): move operand's address or contents to WREG (depending on
987             operand type), safer variant of mov2w,
988           (movwf,call_libraryfunc): NEW, handy abbreviations,
989           (get_argument_pcop,get_return_val_pcop,pass_argument,
990           get_returnvalue): interface for accessing function parameters and
991             return values,
992           (assignResultValuei,genRet): use new parameter/return value interface
993           (pic14_getDataSize): back to old version handling generic pointers,
994           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
995             provided implementation and/or fixed old one,
996           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
997             calls, removed legacy 8051 reference code
998           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
999           (loadSignToC): NEW, move the operands sign bit to CARRY,
1000           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1001             genRightShiftSigned, accepts negative shift counts,
1002           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1003           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1004             generic pointers, __data pointers and __code pointers,
1005           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1006             and signed bitfields, limit bitfields to 8 bit,
1007           (genDataPointerGet): fixed number of bytes read,
1008           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1009           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1010             pointers to constant data are no longer assumed to point to __code
1011             space, removed invalid pointer types,
1012           (bitpatternFromVal): retrieve the PICs representation of an integer
1013             or float literal,
1014           (genDataPointerSet): fixed assigning to po_immediate operands,
1015           (genGenPointerSet): implemented as library call,
1016           (genIfx): fixed incorrect condition,
1017           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1018             provide GPOINTER tag according to destination's storage class,
1019           (genCast): added code to handle casting to generic pointers, added
1020             sign-/zero extension of the result
1021           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1022         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1023         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1024           extend the result
1025         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1026           address/register resides in the shared banks
1027           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1028             put all variables into separate sections (have the linker arrange
1029             them)
1030           (picglue): put init code and interrupt handlers in separate sections
1031         * src/pic/main.c: added port specific options table, modified to PORT
1032           structure to make GPOINTERs 3 byte, added pic14_options
1033           (_pic14_do_link): private linking routine (update paths to libraries,
1034             add libsdcc.lib by default)
1035         * src/pic/main.h: declare pic14_options
1036         * src/pic/pcode.c: fixed instructions i/o relations,
1037           (RegCond): reverted to correct version,
1038           (newpCodeOpLit): truncate literals to 8 bit,
1039           (genericPrint): added debug output,
1040           (getRegFromInstruction): fixed for various operand types, simplified
1041           (BuildFlow): fixed broken handling of isntructions with labels
1042           (LinkFlow): start at last instruction in flow (skip trailing comments),
1043             pass the flow on to the next instruction after CALL
1044           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1045           (insertPCodeInstruction): fixed inserting after a skip instruction,
1046           (DoBankSelect): fixed for labeled instructions
1047           (OptimizepBlock): honor --nopeep switch
1048           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1049         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1050         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1051           (pCodeOptime2pCodes): allow disabling this optimization via
1052             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1053             but is still buggy), started implementation of a dataflow based
1054             pCode optimization (CSE + dead code elimination)
1055           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1056         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1057           names are independant of the stack location and therefore portable across
1058           devices
1059
1060 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1061
1062         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1063           (selectSpil): fixed bug 1337835 by not spilling bit variables
1064         * support/regression/tests/bug1337835.c: added test for this bug
1065         * src/mcs51/peeph.def: restart after rule 3.c,
1066           addded rules 263.x to optimize loading constants
1067
1068 2005-10-26 Raphael Neider <rneider AT web.de>
1069
1070         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1071         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1072           (genAssign): emit warning when casting literals to generic pointer
1073             type, also applies when taking the address of a fixed variable,
1074           (genCast): improved casting to generic pointers
1075         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1076           extern variables, added verbose error message
1077         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1078
1079 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1080
1081         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1082         carry must be complemented too
1083         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1084         could be emitted by genMinus
1085         * src/SDCCval.c (constVal): fixed bug 1305065
1086
1087 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1088
1089         * src/SDCCast.c (addCast): added promotion for bit variables
1090         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1091         promotion casts + optimisation
1092         (optimizeGetWord): fix warning 'i' might be used uninitialized
1093         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1094         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1095
1096 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1097
1098         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1099         all chars are promoted to int; promotion should be handled in SDCCast.c
1100
1101 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1102
1103         * device/lib/_strcmp.c: Fixed bug 1326457
1104
1105 2005-10-11 Raphael Neider <rneider AT web.de>
1106
1107         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1108         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1109
1110 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1111
1112         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1113         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1114
1115 2005-10-04 Raphael Neider <rneider AT web.de>
1116
1117         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1118           device/lib/pic16/pics.all: added pic18f1320
1119         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1120
1121 2005-09-30 Raphael Neider <rneider AT web.de>
1122
1123         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1124         * src/pic16/devices.inc: NEW, provides device descriptions
1125         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1126
1127 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1128
1129         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1130           GETHBIT
1131
1132 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1133
1134         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1135           documented Any Order Bit, Higher Order Byte and Higher Order Word
1136         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1137         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1138           (optimizeGetAbit): new, to get any bit, not only the high bit,
1139           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1140           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1141           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1142           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1143             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1144             GETABIT, GETBYTE, GETWORD: decorate them,
1145           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1146           (ast_print): added GETABIT, GETBYTE, GETWORD
1147         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1148         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1149           (geniCodeBinary): new generic binary icode,
1150           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1151         * src/port.h: updated comment for PORT.hasExtBitOp
1152         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1153           (genGetByte): new, to get a single byte,
1154           (genGetWord): new, to get a word from a long,
1155           (gen51Code): added GETABIT, GETBYTE, GETWORD
1156         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1157
1158 2005-09-23 Raphael Neider <rneider AT web.de>
1159
1160         * configure.in, configure: have device/lib/pic configured
1161         * device/lib/Makefile.in: added model-pic14
1162         * device/lib/clean.mk: added pic/ to clean rule
1163         * device/lib/pic: added rudimentary pic14 library providing support
1164           functions for multiplication/division/generic pointer access
1165         * src/SDCCopt.c (convilong): mark support functions as extern
1166           for pic14 port as well
1167         * src/pic/gen.c (genMult): added assertions,
1168           (genpic14Code): emit warning on unhandled iCodes
1169         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1170         * src/pic/pcode.c (pCodeOpCopy),
1171         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1172           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1173           SFR_REGISTER}), made safe for future extensions
1174         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1175           instructions even if preceeded by SKIP instructions (also remove
1176           them); removed unused code
1177         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1178           prevents leaving parts of the structure uninitialized after copying
1179
1180 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1181
1182         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1183           ago by me
1184         * support/regression/tests/addsub.c: added test for the bug
1185
1186 2005-09-21 Raphael Neider <rneider AT web.de>
1187
1188         * device/include/pic16/pic18f1220.h,
1189           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1190         * device/lib/pic16/Makefile.rules: added missing opening paren
1191         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1192           are provided in genutils.c,
1193           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1194           operand/result sizes,
1195           (genCmp): assert on NULL pointers first, then check deref'ed values
1196         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1197           result size
1198
1199 2005-09-18 Raphael Neider <rneider AT web.de>
1200
1201         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1202           as these are now unused,
1203           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1204         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1205           local, avoids uninitialized pointer dereference on r->name
1206         * src/pic16/ralloc.c (newReg): fixed indentation
1207
1208 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1209
1210         * src/SDCCval.c (constVal): fixed bug 730366
1211         * support/Util/SDCCerr.c,
1212         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1213
1214 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1215
1216         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1217
1218 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1219
1220         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1221
1222 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1223
1224         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1225           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1226         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1227           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1228         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1229         * packihx/packihx.c (hexDigit): made c unsigned char
1230         * as/mcs51/lklibr.c (fndsym),
1231         * link/z80/lkgb.c (gb),
1232         * link/z80/lklibr.c (fndsym),
1233         * link/z80/lkrloc.c (relr),
1234         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1235         * src/SDCC.lex (checkCurrFile, process_pragma),
1236         * src/SDCCglue.c (spacesToUnderscores),
1237         * src/SDCCmain.c (setParseWithComma, processFile),
1238         * src/asm.c (tvsprintf, printCLine),
1239         * src/avr/gen.c (emitcode, aopPut),
1240         * src/ds390/gen.c (emitcode),
1241         * src/hc08/gen.c (emitcode, emitinline),
1242         * src/mcs51/gen.c (emitcode, genInline),
1243         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1244           tokenizeLineNode),
1245         * src/pic/ralloc.c (debugLog),
1246         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1247           tokenizeLineNode),
1248         * src/pic16/ralloc.c (debugLog),
1249         * src/z80/main.c (_process_pragma):
1250            made all ctype.h function calls safe
1251         * src/SDCCopt.c: include math.h for fabs
1252         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1253           and used them throughout the code to make ctype.h function calls safe
1254         * src/ds390/main.c (asmLineNodeFromLineNode),
1255         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1256         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1257            unsigned char*
1258         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1259           (newpCodeAsmDir): made ctype.h function calls safe
1260         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1261           pic16_emitcode):  made lbp unsigned char*
1262         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1263           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1264         * src/xa51/gen.c (emitcode),
1265         * src/z80/gen.c (_emit2): made lbp unsigned char*
1266         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1267            char*
1268
1269 2005-09-05 Raphael Neider <rneider AT web.de>
1270
1271         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1272           access bank splitpoint
1273
1274 2005-09-05 Raphael Neider <rneider AT web.de>
1275
1276         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1277
1278 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1279
1280         * .version: changed to version 2.5.3
1281         * doc/sdccman.lyx: changed version to 2.5.3,
1282           documented --codeseg and --constseg and pragma codeseg and constseg,
1283           documented bit parameters (reentrant) and bit returning
1284         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1285            currFunc->recvSize, but is this ok for all ports?
1286           (ast2iCode): result of ~ on unsigned char must be cast to int for
1287            bool to work
1288         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1289           function pointers in bit space
1290         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1291           (processFuncArgs): call port.reg_parm() with reentrancy info
1292         * src/port.h,
1293         * src/avr/main.c,
1294         * src/ds390/main.c,
1295         * src/hc08/main.c,
1296         * src/pic/main.c,
1297         * src/pic16/main.c,
1298         * src/xa51/main.c,
1299         * src/z80/main.c: port.reg_parm prototype extended with
1300           "bool reentrant" parameter
1301         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1302           options.stackAuto for allocating bit register parameters
1303         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1304           (genSend): set BitBankUsed if it is,
1305           (selectRegBank): factored out of genCall for use in genPcall,
1306           (genCall): removed redundant dtype assignmen, use selectRegBank,
1307           (genPcall): handle returning in Carry properly, save in F0 if needed,
1308           (genReceive): handle bit register parameters
1309         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1310           (mcs51_assignRegisters): enable bit registers for all reentrant
1311            functions and don't set BitBankUsed unconditionally
1312         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1313         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1314         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1315
1316 2005-08-27 Borut Razem <borut.razem AT siol.net>
1317
1318         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1319         ppc-osx (Darwin) does not support -u option. It seems that it is
1320         supported only on Linux - GNU cp
1321
1322 2005-08-25 Borut Razem <borut.razem AT siol.net>
1323
1324         * sim/ucsim/gui.src/serio.src/Makefile.in,
1325           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1326           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1327           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1328           install and strip, since the strip at /usr/ccs/bin should be used
1329           on solaris
1330
1331 2005-08-24 Borut Razem <borut.razem AT siol.net>
1332
1333         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1334
1335 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1336
1337         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1338         ffffffffu
1339
1340 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1341
1342         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1343         * as/mcs51/lkmain.c (link_main): fixed warning
1344         * device/include/stdbool.h: ds390 has no advanced bit support yet
1345         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1346         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1347         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1348           and updated their macros
1349         * src/SDCCval.c (constVal): updated comment for renamed b_long
1350
1351 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1352
1353         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1354         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1355           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1356           (oprio): set priority for '['
1357         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1358            and adb_24_bit
1359         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1360         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1361         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1362         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1363           added overlayable BIT_BANK area
1364         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1365           (summary2): explain 'T' in legenda
1366         * as/mcs51/lkrloc.c: replaced old K&R style,
1367           (relr): added R_BIT processing,
1368           (errmsg): added "Bit-addressable relocation error",
1369           (adb_bit): added for converting from byte- to bit-addressable space,
1370           (adb_24_bit): added for converting from byte- to bit-addressable space
1371         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1372            used in reentrant functions now even as return value
1373         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1374         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1375           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1376         * src/SDCCglobl.h: added indicator BitBankUsed
1377         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1378            the bit registers b0-b7
1379         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1380           (geniCodeCast): fixed bug 1263853,
1381           (geniCodeLogicAndOr): put result in bool or char,
1382           (geniCodeReceive): added parameter func for accessing the return type,
1383           (geniCodeFunctionBody): pass func to geniCodeReceive
1384         * src/SDCCmain.c: added indicator BitBankUsed
1385         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1386         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1387           (checkSClass): don't put automatic bool/bit on stack,
1388           (checkFunction): removed check on function cannot return bit
1389         * src/SDCCsymt.h: added newBoolLink prototype
1390         * src/mcs51/gen.c (rb1regs): added bit registers,
1391           (movc): created for assigning to carry,
1392           (pushReg, popReg): created for pushing registers,
1393           (sameRegs): check both AOP_REG and AOP_CRY types,
1394           (aopOp): handle bit registers,
1395           (aopPut): optimization no self-assign,
1396           (saveRegisters): push reg->base (bits) only once for bit registers,
1397            and use pushReg,
1398           (unsaveRegisters): pop reg->base only once and use popReg,
1399           (assignResultValue): added parameter func and return in carry for bits,
1400           (genIpush): optimization no reload in A if not changed,
1401           (genSend): bit parameters in reentrant functions are passed in bit
1402            registers by first assigning to bits in B, then save registers and
1403            copy B to bits,
1404           (genCall): handle returning in Carry properly, save it in F0 if needed,
1405           (genPcall): updated assignResultValue call, this is not safe yet for bit
1406            returning function !!!
1407           (genFunction): don't generate equ's for bit registers and use pushReg,
1408           (genEndFunction): take care of bit returning functions and use popReg,
1409           (genRet): return bit in Carry,
1410           (genIfx): optimize bit registers and other directly addressable bits,
1411           (genReceive): updated assignResultValue call
1412         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1413           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1414            registers when using stack-auto
1415         * src/mcs51/ralloc.c (_G): added allBitregs,
1416           (regs8051): added the bit registers,
1417           (createStackSpil): use macro IS_BIT,
1418           (getRegBit): added to allocate a bit register, else spill,
1419           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1420           (updateRegUsage): factored out to ease stepping while debugging,
1421           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1422            also allocate bit registers,
1423           (fillGaps): handle bit registers,
1424           (findAllBitregs): added to create bit vector with all bit registers,
1425           (mcs51_allBitregs): returns this bit vector,
1426           (mcs51_assignRegisters): when using stack-auto use bit registers for
1427            passing parameters and creating local variables
1428         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1429
1430 2005-08-22 Borut Razem <borut.razem AT siol.net>
1431
1432         * device/lib/Makefile.in: replaced find option -or with -o
1433           to make it run on solaris
1434
1435 2005-08-22 Raphael Neider <rneider AT web.de>
1436
1437         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1438           fixes #1265442 (crash on Solaris)
1439
1440 2005-08-20 Borut Razem <borut.razem AT siol.net>
1441
1442         * configure, configure.in: added tests for libsocket and libnsl libraries,
1443           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1444           from support/regression/Makefile.in
1445         * support/regression/Makefile.in: added
1446         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1447         * sim/ucsim/libtool: regenerated on sparc-solaris
1448         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1449           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1450           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1451           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1452           sparc-solaris, which doesn't use GNU ld linker
1453         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1454         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1455
1456 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1457
1458         * src/mcs51/peeph.def: updated comments
1459
1460 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1461
1462         * device/lib/_gptrget.c,
1463         * device/lib/_gptrput.c: slightly shorter
1464         * doc/sdccman.lyx: incremented version
1465         * src/mcs51/peeph.def: moved peephole comments to the line of first
1466           change to better keep line correlation, reanimated 186.e
1467         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1468
1469 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1470
1471         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1472           David Saxton with quotes around file name.
1473
1474 2005-08-15 Borut Razem <borut.razem AT siol.net>
1475
1476         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1477           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1478           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1479           make tests run on x86_64 platform
1480
1481 2005-08-13 Raphael Neider <rneider AT web.de>
1482
1483         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1484           as it might be executed DURING a build (parallel make is wonderful)
1485
1486 2005-08-13 Raphael Neider <rneider AT web.de>
1487
1488         * device/lib/Makefile.in (port-specific-objects-pic16):
1489           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1490         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1491           dependency
1492         * device/lib/pic16/Makefile.rules: build subdirs before creating
1493           the library, removed builddir rule, create $(builddir) early in
1494           recurse rule, use empty recurse rule for leaf directories
1495         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1496           mkdir errors (race condition), removed duplicate suffix "hex"
1497           from clean rules
1498         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1499         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1500           prevents mkdir -p from aborting on Alpha
1501
1502 2005-08-12 Raphael Neider <rneider AT web.de>
1503
1504         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1505           db-statements in order to allow for arrays of pointers in code
1506           sections to be placed without interspersed 0-padding, fixes
1507           bug #1256215
1508         * (emitStatistics): fixed division by zero for pic18f1220
1509         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1510           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1511         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1512         * (pic16_pCodeConstString): keep track of already emitted string
1513           literals to prevent "duplicate definitions of symbol _str_NR"
1514         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1515           debug message
1516         * device/lib/Makefile.in: ignore failing PIC16 library builds
1517         * device/lib/pic16/Makefile: do not build if gputils are missing
1518         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1519
1520 2005-08-10 Raphael Neider <rneider AT web.de>
1521
1522         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1523           my last commit)
1524
1525 2005-08-10 Raphael Neider <rneider AT web.de>
1526
1527         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1528           Rokas' patch to add the new fixed point type "__fixed16x16"
1529         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1530           functions for __fixed16x16 arithmetics
1531         * device/lib/pic16: reimplemented the build system to support
1532           a separate build directory, better handling of libio (create
1533           the library in a separate subdir for each architecture) and
1534           easier configuration (centralized in Makefile.common)
1535
1536 2005-08-07 Raphael Neider <rneider AT web.de>
1537
1538         * src/pic16/gen.c (genrshTwo): fixed sign extension
1539         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1540         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1541           added T0CONbits
1542         * device/include/pic16/pic18f4220.h: NEW, header for
1543           pic18f4220 and pic18f4320
1544         * device/include/pic16/pic18fregs.h: added new devices,
1545           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1546         * device/include/pic16/signal.h: resolved name clashes
1547           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1548           to also allow testing for interrupt enable bits, added
1549           comments on how to use the macros
1550         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1551         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1552           register definitions for the devices
1553         * device/lib/pic16/pics.all: added new devices
1554         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1555           allocated memory
1556         * device/lib/pic16/libc/stdlib/memfree: do not count
1557           the block header as free memory
1558         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1559           simplified and added missing end-of-blocklist-marker
1560           (reported by Peter Onion, fixes #1252814)
1561         * (_mergeHeapBlock): fixed loop condition
1562         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1563           len==0, restructured code
1564         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1565           up a bit, reduced bitfield accesses, prevent endless loops
1566           in case of heap corruption
1567         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1568           "unreferenced arguments/must return a value" warnings
1569         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1570           replaced BAUDREG with SPBRG
1571         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1572           device/lib/pic16/debug/gstack/gstack.c: replaced
1573           _naked, _asm, _endasm with __naked, __asm, __endasm
1574
1575 2005-08-05 Raphael Neider <rneider AT web.de>
1576
1577         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1578           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1579
1580 2005-08-05 Borut Razem <borut.razem AT siol.net>
1581
1582         * device/lib/Makefile.in: added missing ';'
1583         * configure: removed ^M characters
1584
1585 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1586
1587         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1588           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1589           License
1590
1591 2005-08-04 Borut Razem <borut.razem AT siol.net>
1592
1593         * configure.in: pic16 libraries build 2nd try - enable running
1594           configure in device/lib/pic16
1595         * configure: regenerated from configure.in
1596         * device/lib/Makefile.in: create $(PORT)/bin directory
1597
1598 2005-08-03 Raphael Neider <rneider AT web.de>
1599
1600         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1601           to get/set values via pointers
1602         * (genUnpackBits,genPackBits): changed detection of
1603           ptr->bitfield vs. sym.bitfield, fixed access via generic
1604           pointers, removed dead (wrong) code for multibyte bitfields
1605         * (genNearPointerGet, genGenPointerGet): removed useless code,
1606           fixed bitfield detection, fixes #1250594
1607         * (genNearPointerSet): removed useless code
1608         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1609           and introduced macro pic16_emitpcode that conditionally emits
1610           the origin of the following pCode (useful for debugging SDCC)
1611         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1612         * (createDefmap): fixed handling of LFSR for --optimize-df
1613
1614 2005-08-02 Borut Razem <borut.razem AT siol.net>
1615
1616         * device/lib/Makefile.in: pic16 libraries build enabled since
1617           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1618
1619 2005-08-02 Raphael Neider <rneider AT web.de>
1620
1621         * src/pic16/gen.c (genPackBits): removed deprecated warning
1622         * (genGenPointerSet): fixed bitfield detection
1623
1624 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1625
1626         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1627
1628 2005-07-31 Raphael Neider <rneider AT web.de>
1629
1630         * device/lib/pic16/libdev/pic18f458.c,
1631           device/include/pic16/pic18f458.h: added missing T0CONbits
1632
1633 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1634
1635         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1636
1637 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1638
1639         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1640
1641 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1642
1643         * device/include/mcs51/at89c51ed2.h: added.
1644
1645 2005-07-23 Raphael Neider <rneider AT web.de>
1646
1647         * src/pic/gen.h: added emitpcode macro for debugging
1648         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1649           and replace by macro adding debug information on demand
1650         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1651         * (gencjne): tried to fix; replaced with correct (slower) code
1652         * (gen{Unp,P}ackBits): fixed single bit access
1653         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1654         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1655           previous instruction
1656         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1657           register has to be handled with care (forbidding movement
1658           of assignments/uses, removing assignments completely, ...)
1659         * (pCodeOptime2pCodes): make use of regIsSpecial
1660         * added lots of debugging output (commented out)
1661         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1662           from being reused as result UNLESS it is known to work
1663
1664 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1665
1666         * support/Util/dbuf.h: include <stddef.h> for size_t
1667         * .version: changed to version 2.5.2
1668
1669 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1670
1671         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1672
1673 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1674
1675         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1676           (genModOneByte): removed needless psha/pula
1677
1678 2005-07-22 Raphael Neider <rneider AT web.de>
1679
1680         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1681           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1682         * src/pic/gen.c (resolveIfx): do not "invent" labels
1683         * (genSkipc): changed to positive logic
1684         * (genSkipCond): removed as no longer needed
1685         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1686           backport from PIC16
1687         * (genLeftShift): check operands are in different registers
1688         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1689           INCF does not update CARRY...
1690         * src/pic/main.c: fixed _linkCmd
1691         * src/pic/pcode.c (unlinkpCode): added inactive code
1692         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1693           alive (do not assign result and operand overlapping registers)
1694
1695 2005-07-22 Raphael Neider <rneider AT web.de>
1696
1697         * src/pic/device.c (dump_sfr): replaced register declaration with
1698           call to emitSymbolToFile() to avoid duplicate symbols
1699         * (assignRelocatableRegisters): do not declare external symbols
1700         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1701           right (take size of type, not etype)
1702         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1703         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1704         * (packRegsForAccUse): disabled assignment of WREG as
1705           the result reg to prevent occurence of just fixed #1235003,
1706           fixes #1242954
1707         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1708           symbols (avoids duplicate symbols in .asm file)
1709         * (pic14emitRegularMap): use emitSymbolToFile()
1710         * src/pic/gen.c (aopOp): fixed spillLocation handling
1711         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1712         * (genDataPointerSet): removed unneccessary variables/output
1713
1714 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1715
1716         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1717         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1718
1719 2005-07-21 Raphael Neider <rneider AT web.de>
1720
1721         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1722           architecture cannot handle them efficiently, fixes bug #1235003
1723         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1724           check for empty sets before using them (fixes bug #1232190)
1725
1726 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1727
1728         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1729           (lnksect2): generate warnings for memory overlap
1730         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1731           constseg to set the name of these segments so you can instruct the linker
1732           to place them in banks
1733         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1734         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1735           added code_seg and const_seg to options
1736         * src/SDCCglue.c (emitMaps): use options.const_seg,
1737           (createInterruptVect): put interrupt vectors in segment HOME,
1738           (glue): put HOME before static segment and put the main glue in HOME,
1739           (glue): use options.code_seg
1740         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1741         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1742           these segments so you can instruct the linker to place them in banks
1743           (linkEdit): use code_loc for HOME segment which should be the first
1744           segment in code memory now
1745         * src/SDCCmem.c: fixed more stuff like bug 1238386
1746         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1747           (changePointer): don't change function pointers to code pointers for
1748           banked functions,
1749           (compareType): added exceptional check for banked function pointers
1750         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1751         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1752           after static in code memory
1753         * src/mcs51/gen.c: added aopLiteralLong prototype,
1754           (aopForSym): use getSize for functions,
1755           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1756           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1757           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1758           the segment,
1759           (genPcall): use call for literal function pointers and generate banked
1760           calls over the one trampoline so there's only one place for the user to
1761           modify according to his/hers hardware,
1762           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1763           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1764         * src/mcs51/main.c: added keyword banked,
1765           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1766         * support/Util/SDCCerr.c,
1767         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1768           needed for passing the bank and address to the trampoline
1769         * device/lib/mcs51/crtbank.asm: added for bankswitching
1770         * device/lib/mcs51/Makefile: added crtbank
1771
1772 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1773
1774         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1775           for fields at offset 0 of a struct or union as reported
1776           on 2005-07-07 in the developer mailing list.
1777
1778 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1779
1780         * src/SDCCmem.c: fixed bug 1238386
1781
1782 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1783
1784         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1785           (patch #1144962), added peephole 300, enabled 259.x
1786         * doc/sdccman.lyx: removed screenshot and provided link instead
1787
1788 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1789
1790         * doc/sdccman.lyx: added section about debugging with ddd
1791         * doc/figures/ddd_example.eps: screenshot of debugging session
1792
1793 2005-07-04 Raphael Neider <rneider AT web.de>
1794
1795         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1796           like CODE pointers, fixes #1115683
1797         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1798           call, fixes bugs #1232211, #1228110,
1799           fixed wrong casts to pCodeFlow from pCodeInstructions
1800
1801 2005-07-04 Raphael Neider <rneider AT web.de>
1802
1803         * src/pic/gen.c (popGet): changed assert to allow for
1804           bit operands
1805         * (popGetAddr): changed signature to provide
1806           an additional index, patched all call sites
1807         * (genCmpEq): handle literal-like operands correctly
1808         * (genAddrOf): added sanity checks on __code/__data pointers
1809         * (genAssign): added handling of symbols from __code section
1810         * (gencjne): do not generate code for comparisons whose result
1811           is neither stored nor used, fixes bug #1171114
1812         * (AccLsh, AccRsh): operate on operand instead of WREG
1813         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1814           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1815           by known count
1816         * rewrote complete shift-by-literal logic, commented unused
1817           functions out
1818         * (genConstPointerGet): get multiple bytes (if result size > 1),
1819           fixed handling of non-immediate addresses
1820         * (genPointerGet): handle CODE pointers like CONST pointers
1821         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1822         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1823           operand is to be treated as a literal or not
1824         * (mov2w,genPcall,genCmpEq),
1825           src/pic/genarith.c: use aop_isLitLike() to decide between
1826           literal/register contents
1827         * (addSign): added missing offset
1828         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1829           only emit comment in debug-mode,
1830           use {aop,op}_isLitLike throughout the file
1831         * src/pic/glue.c: fix initializers for pointers (work in progress)
1832         * src/pic/pcode.c (get_op): honor index on _const symbols
1833         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1834         * (dumppBlock): added pCode size estimation
1835         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1836           check for IS_SYMOP before OP_SYMBOL'ing
1837         * fixed indentation, compacted switch-statements
1838         * (allocReg): find free register and allocate it instead of
1839           allocating new registers all the time
1840         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1841           registers as its operands (necessary only for multibyte GETs)
1842
1843 2005-07-01 Raphael Neider <rneider AT web.de>
1844
1845         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1846           debugging .asm-output macros FENTRY + FEXIT
1847         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1848           way... I wonder...
1849         * (emitpComment): NEW, printf to pCode
1850         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1851           offset handling
1852         * (popGetAddr): NEW, variant of popGet to access an immediates
1853           high(er) bytes instead of the n'th byte of memory they reference,
1854           replaced popGet with popGetAddr where neccessary
1855         * (genDataPointerGet): reactivated and fixed implementation
1856         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1857           accesses
1858         * (genDataPointerSet): fixed multibyte assignments
1859         * (genpic14Code): fixed --i-code-in-asm handling
1860         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1861         * (genPlus): fixed index-out-of-bounds error
1862         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1863         * src/pic/ralloc.c: added debugging output macro FENTRY2
1864         * (spillThis): fixed indentation, enbraced for-body for clarity
1865         * (rematStr): commented out as now unused
1866         * (regTypeNum): commented out special spill case (overwrites
1867           arbitrary values)
1868         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1869
1870 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1871
1872         * doc/sdccman.lyx: documented sfr16/sfr32,
1873           added example for using storage class with function pointers
1874         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1875
1876 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1877
1878         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1879         * device/lib/_itoa.c,
1880         * device/lib/_ltoa.c: optimized codesize
1881         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1882           but don't know how to suppress the double warning.
1883         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1884         * support/Util/SDCCerr.c,
1885         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1886
1887 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1888
1889         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1890           fixed old K&R prototypes
1891         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1892         * device/lib/_gptrget.c,
1893         * device/lib/_gptrgetc.c,
1894         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1895           also new versions for small generic pointers and banked generic pointers
1896         * src/port.h: added const_name
1897         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1898         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1899         * src/SDCCcse.c (findPrevIc): check all associative operators
1900         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1901         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1902         * src/SDCCmem.c: updated comments,
1903           set far-space to 0 for pdata, results in optimized code
1904         * src/SDCCmem.h: added macro CONST_NAME
1905         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1906           moving the info into the highest bits, see also gptrget/gptrput
1907         * src/src.dsp: added sdcc.ico to project files
1908         * src/avr/gen.c (genCast): fixed bug 0x%d
1909         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1910         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1911           relation between ptr_type and DCL_TYPE,
1912           (genCast): fixed bug 0x%d
1913         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1914           (CODE)" for const_name
1915         * src/hc08/gen.c (genCast): fixed bug 0x%d
1916         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1917           (hc08_port): added "CONST (CODE)" for const_name
1918         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1919           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1920           between ptr_type and DCL_TYPE,
1921           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1922           operand* and took AOP() inside function so sfr-ness can be checked,
1923           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1924           new prototype,
1925           (genFunction, genEndFunction): optimized stack setup,
1926           (genMinus): optimized for literals with ending zeroes (in bytes),
1927           (genCast): fixed bug 0x%d
1928         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1929           (mcs51_port): added "CONST (CODE)" for const_name
1930         * src/mcs51/peeph.def: made rule 226 more generic
1931         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1932         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1933         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1934         * src/z80/main.c (z80_port): added NULL for const_name,
1935           (gbz80_port): added NULL for const_name
1936         * support/regression/tests/bug663539.c,
1937         * support/regression/tests/sfr16.c: new tests
1938
1939 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1940
1941         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1942
1943 2005-06-24 Raphael Neider <rneider AT web.de>
1944
1945         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1946           corrected typos...
1947         * device/include/pic16/signal.h: added USBIF
1948           and SIG_USB
1949
1950 2005-06-24 Raphael Neider <rneider AT web.de>
1951
1952         * device/lib/pic16/libdev/pic18f2455.c,
1953           device/include/pic16/pic18f2455.h: NEW
1954         * device/include/pic16/pic18fregs.h,
1955           device/lib/pic16/pics.all,
1956           src/pic16/device.c: added 18f2455
1957         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1958           device/include/pic16/{pic18f[68][567].h,usart.h}:
1959           replaced MULTIPLE_USARTS define with more relaible
1960           compatibility sfrs (for USART access)
1961
1962 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1963
1964         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1965           and the output asm file line is printed on two lines.
1966
1967 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1968
1969         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1970           BGT, BLE, BHI, and BLS instructions
1971         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1972           genCmpEq): removed
1973         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1974           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1975           fixes bug #1216342
1976         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1977
1978 2005-06-15 Raphael Neider <rneider AT web.de>
1979
1980         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1981         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1982         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1983           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1984           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1985
1986 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1987
1988         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1989           Marcel Telka in bug #1215704
1990
1991 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1992
1993         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1994           located in shared memory bank.
1995
1996 2005-05-31 Raphael Neider <rneider AT web.de>
1997
1998         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1999           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2000           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2001
2002 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2003
2004         * device/lib/_strncpy.c: fixed the fix
2005
2006 2005-05-26 Raphael Neider <rneider AT web.de>
2007
2008         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2009           initializers with \0, bug #1208187
2010         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2011           intializers with \0, bug #1208187
2012
2013 2005-05-26 Raphael Neider <rneider AT web.de>
2014
2015         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2016           initializers with \0, bug #1208187
2017         * src/pic16/main.c (_process_pragma): added sanity checks
2018           for stack position and size, emit warnings when appropriate
2019
2020 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2021
2022         * device/lib/_strncpy.c: fixed not filling with \0
2023
2024 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2025
2026         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2027           createFunction),
2028         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2029           compound_statement),
2030         * src/SDCCsymt.h,
2031         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2032
2033 2005-05-24 Raphael Neider <rneider AT web.de>
2034
2035         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2036
2037 2005-05-24 Raphael Neider <rneider AT web.de>
2038
2039         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2040           TRISE definitions, closes bug #1162453
2041
2042 2005-05-22 Raphael Neider <rneider AT web.de>
2043
2044         * src/pic16/main.c (_process_pragma): check for missing
2045           arguments to pragmas code and udata
2046         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2047           consistency fixes to match other headers (thanks to Jim Paris)
2048         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2049
2050 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2051
2052         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2053
2054 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2055
2056         * support/regression/tests/bug1198642.c: new test
2057         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2058         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2059         * support/scripts/resource.h,
2060         * support/scripts/resource.rc,
2061         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2062         * support/scripts/sdcc.ico: added 32x32 icon
2063
2064 2005-05-18 Raphael Neider <rneider AT web.de>
2065
2066         * device/lib/pic16/libdev/pic18f*.c,
2067         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2068           keywords to "__sfr" and "__at (X)"
2069         * device/include/pic16/pic18fregs.h: added pic18f4520
2070         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2071           #1203088 (MPLAB compatibility)
2072
2073 2005-05-17 Raphael Neider <rneider AT web.de>
2074
2075         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2076         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2077         * device/lib/pic16/pics.all: added new devices
2078         * src/pic16/device.c: added support for pic18f4520
2079
2080 2005-05-16 Raphael Neider <rneider AT web.de>
2081         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2082         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2083         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2084           convenience function for bit access
2085
2086 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2087
2088         * device/lib/printf_large.c: fixed bug 1193299
2089         * support/regression/tests/bug1057979.c: added test %3.3s
2090
2091 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2092
2093         * device/include/mcs51/8051.h,
2094         * device/include/mcs51/8052.h: made parseable with lint
2095         * device/include/mcs51/lint.h: added include file for (sp)lint
2096         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2097         * doc/cdbfileformat.lyx,
2098         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2099
2100 2005-05-14 Raphael Neider <rneider AT web.de>
2101
2102         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2103         * device/lib/pic16/libc/stdlib/itoa.c (new)
2104         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2105         * device/lib/pic16/libio/Makefile: exclude subdir according to
2106           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2107         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2108         * src/pic16/gen.c (genFunction): prevent annoying warning
2109         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2110           nameclashes on BeOS
2111         * support/cpp2/cppmain.c (cpp_output_string): new
2112         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2113           fixes bug 1116802
2114
2115 2005-05-13 Borut Razem <borut.razem AT siol.net>
2116
2117         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2118
2119 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2120
2121         * .version: changed to version 2.5.1; back to bleeding edge development
2122
2123 2005-05-11 Borut Razem <borut.razem AT siol.net>
2124
2125         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2126           generate PDF version 1.3 documents
2127
2128 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2129
2130         * .version: changed to version 2.5.0
2131
2132 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2133
2134         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2135
2136 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2137
2138         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2139         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2140         well as many smaller updates.
2141         * .version: changed to version 2.5.0-pre1
2142
2143 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2144
2145         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2146
2147 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2148
2149         * support/regression/tests/bug1185672.c: added
2150         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2151           bug 1185672
2152         * src/mcs51/gen.c (genCall): added comments, made it look safer
2153         * src/mcs51/gen.c (genEndFunction): simplified
2154
2155 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2156
2157         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2158
2159 2005-04-14 Borut Razem <borut.razem AT siol.net>
2160
2161         * fixed bug 1045046 - SIGSEGV with really simple code?:
2162           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2163           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2164
2165 2005-04-14 Borut Razem <borut.razem AT siol.net>
2166
2167         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2168           src/pic16/device.h: temporarily disabled experimental #inline pragma
2169           for 2.5.0 release
2170
2171 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2172
2173         * device/include/z80/stdio.h,
2174         * device/include/z80/string.h: removed these highly incomplete files so
2175           SDCC can use the default ones in device/include/
2176
2177 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2178
2179         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2180         gcc warning.
2181         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2182         fix sdcpp warnings.
2183
2184 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2185
2186         * device/include/malloc.h: removed redundant __reentrant prototypes
2187         * device/lib/_mullong.c: added working xstack variant in asm (C version
2188           doesn't pass regression tests)
2189         * device/lib/bpx.c: used __data and made bpx char for mcs51
2190         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2191           (createFunction): fixed bug with xstackPtr
2192         * src/SDCCcse.c: corrected comments
2193         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2194           (killDeadCode, eBBlockFromiCode): removed unused code
2195         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2196           corrected comments
2197         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2198           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2199           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2200           (genModOneByte): fixed warning in MSVC
2201         * src/mcs51/main.c (): added comments
2202         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2203
2204 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2205
2206         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2207
2208 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2209
2210         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2211
2212 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2213
2214         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2215         characters arrays of larger size than the declared one.
2216
2217 2005-04-10 Borut Razem <borut.razem AT siol.net>
2218
2219         * src/pic/gen.c (genInline),
2220           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2221           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2222           (findNextInstruction), (findPrevInstruction),
2223           (findInstructionUsingLabel),
2224           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2225         * src/pic/pcode.c (findLabel): added missing '\n'
2226         * src/src.dsp: added SDCCdwarf2.c to the project
2227
2228 2005-04-09 Borut Razem <borut.razem AT siol.net>
2229
2230         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2231
2232 2005-04-08 Raphael Neider <rneider AT web.de>
2233
2234         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2235           into the chain after a given one) and mergeDefmapSymbols (combine
2236           defmap entries for each symbol per pcode)
2237         * (createDefmap): have defmap entries merged in the end
2238         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2239           a symbol before replacing one access type's symbol, merge symbols in
2240           the end (replacement symbol might already have an entry)
2241         * (assignValnums): keep reference to written WREG intact
2242
2243 2005-04-08 Raphael Neider <rneider AT web.de>
2244
2245         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2246           Alpha)
2247
2248 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2249
2250         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2251         bytes
2252
2253 2005-04-07 Raphael Neider <rneider AT web.de>
2254
2255         * device/include/pic16/usart.h: added compatibility defines for
2256           devices with more than one USART
2257         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2258
2259 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2260
2261         * device/lib/Makefile.in: updated for port specific include
2262
2263 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2264
2265         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2266
2267 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2268
2269         * device/include/8051.h,
2270         * device/include/8052.h,
2271         * device/include/at89S8252.h,
2272         * device/include/at89c55.h,
2273         * device/include/at89x051.h,
2274         * device/include/at89x51.h,
2275         * device/include/at89x52.h,
2276         * device/include/mcs51reg.h,
2277         * device/include/reg51.h,
2278         * device/include/reg764.h,
2279         * device/include/regc515c.h,
2280         * device/include/sab80515.h: (re)moved these 12 files
2281         * device/include/mcs51/8051.h,
2282         * device/include/mcs51/8052.h,
2283         * device/include/mcs51/at89S8252.h,
2284         * device/include/mcs51/at89c55.h,
2285         * device/include/mcs51/at89x051.h,
2286         * device/include/mcs51/at89x51.h,
2287         * device/include/mcs51/at89x52.h,
2288         * device/include/mcs51/mcs51reg.h,
2289         * device/include/mcs51/reg51.h,
2290         * device/include/mcs51/reg764.h,
2291         * device/include/mcs51/regc515c.h,
2292         * device/include/mcs51/sab80515.h: and added them here
2293
2294 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2295
2296         * device/include/stdarg.h: changed SDCC specific keywords to double
2297           underlined form.
2298         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2299           mcs51 and ds390.
2300         * device/include/hc08/mc68hc908gp32.h,
2301         * device/include/hc08/mc68hc908jb8.h,
2302         * device/include/hc08/mc68hc908jkjl.h,
2303         * device/include/hc08/mc68hc908qy.h: fixed comments
2304         * device/include/mcs51/README: updated
2305         * device/include/mcs51/c8051f120.h: added PINRSF
2306         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2307         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2308           amidst code. Also inline is not supported.
2309
2310 2005-04-06 Raphael Neider <rneider AT web.de>
2311
2312         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2313         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2314           callers stack/frame pointers
2315
2316 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2317
2318         * device/include/pic16/usart.h: added, missing in previous commit,
2319         * device/include/pic16/adc.h: fixed typo,
2320         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2321         commit,
2322         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2323         <p18fxxx.inc>
2324         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2325         uninitialized because a bug appears with gplink
2326         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2327         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2328         complains for unrecognised option
2329
2330 2005-04-05 Raphael Neider <rneider AT web.de>
2331
2332         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2333           structs as well (using memcpy)
2334         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2335           on ISRs (GOTO has no label)
2336         * src/pic16/device.h: added OF_OPTIMIZE_DF
2337         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2338           new data flow analysis/optimization
2339         * src/pic16/pcode.c: added (prototypes for and implementation of)
2340           dataflow analysis functions, fixed pCodeInstructions' inCond and
2341           outCond values, made RCALL a branch instruction
2342         * (pic16_unlinkpCode): keep C line if possible
2343         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2344           C line moved if possible
2345         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2346         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2347           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2348         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2349           new flow)
2350         * (pic16_getJumptabpCode): NEW, needed in...
2351         * (LinkFlow): fixed handling of jumptables, calls and conditional
2352           branches
2353         * (pic16_InsertCommentAfter): NEW
2354         * (pic16_pCodeReplace): made verbose and flow preserving
2355         * (AnalyzeFlow): added call to data flow analysis
2356         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2357         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2358         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2359
2360 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2361
2362         * src/SDCCast.c (decorateType): fixed bug #1105626
2363
2364 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2365
2366         * device/include/asm/pic16/features.h,
2367         * pic18f*.h headers,
2368         * device/include/pic16/adc.h,
2369         * device/include/pic16/delay.h,
2370         * device/include/pic16/i2c.h,
2371         * device/include/pic16/malloc.h,
2372         * device/include/pic16/stdio.h,
2373         * device/include/pic16/stdlib.h,
2374         * device/include/pic16/string.h,
2375         * device/lib/pic16/libc/stdio/printf_tiny.c,
2376         * device/lib/pic16/libc/stdio/printf_small.c,
2377         * device/lib/pic16/libc/stdio/strmgpsim.c,
2378         * device/lib/pic16/libc/stdio/strmmssp.c,
2379         * device/lib/pic16/libc/stdio/strmusart.c,
2380         * device/lib/pic16/libc/stdio/vfprintf.c,
2381         * device/lib/pic16/libc/stdlib/ltoa.c,
2382         * device/lib/pic16/libc/stdlib/putchar.c,
2383         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2384         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2385         * device/lib/pic16/libc/stdlib/memchrram.c,
2386         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2387         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2388         * device/lib/pic16/libio/adc/adcbusy.c,
2389         * device/lib/pic16/libio/adc/adcread.c,
2390         * device/lib/pic16/libio/adc/adcsetch.c,
2391         * device/lib/pic16/libio/usart/ubaud.c,
2392         * device/lib/pic16/libio/usart/ubusy.c,
2393         * device/lib/pic16/libio/usart/udrdy.c,
2394         * device/lib/pic16/libio/usart/uopen.c,
2395         * device/lib/pic16/libio/usart/uputc.c,
2396         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2397         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2398         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2399         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2400         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2401         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2402         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2403         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2404         specific keywords to double underlined form,
2405         * device/lib/pic16/libc/Makefile.rules,
2406         * device/lib/pic16/libsdcc/Makefile.rules,
2407         * device/lib/pic16/libm/Makefile,
2408         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2409         to compile with C standard set in Makefile.common
2410         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2411         rand.c and crc.c in compilation process,
2412         * device/lib/pic16/libsdcc/int/divuint.c,
2413         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2414         `c' from signed to unsigned,
2415         * device/lib/pic16/startup/crt0.c,
2416         * device/lib/pic16/startup/crt0i.c,
2417         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2418         keywords to double underlined form, bug fixes in _do_cinit function
2419         which prevented the correct initialization of the .idata segment,
2420         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2421         core to enter a infinite loop
2422         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2423
2424 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2425
2426         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2427
2428 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2429
2430         * device/include/Makefile.in: add support for hc08 subdirectory
2431         * device/include/hc08/: new subdirectory
2432         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2433         Lucas Loizaga, thanks!
2434         * device/include/hc08/mc68hc908qy.h,
2435         * device/include/hc08/mc68hc908gp32.h,
2436         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2437         their own directory. Changed internal macro names to use the compiler
2438         reserved namespace. Changed SDCC specific keywords to double
2439         underlined form.
2440         * device/include/math.h,
2441         * device/include/malloc.h,
2442         * device/include/stdarg.h,
2443         * device/include/stdbool.h
2444         * device/include/string.h,
2445         * device/include/tinibios.h,
2446         * device/include/ds400rom.h,
2447         * device/include/8051.h,
2448         * device/include/8052.h,
2449         * device/include/80c51xa.h,
2450         * device/include/at89c55.h,
2451         * device/include/at89S8252.h,
2452         * device/include/at89x51.h,
2453         * device/include/at89x52.h,
2454         * device/include/ds80c390.h,
2455         * device/include/reg764.h,
2456         * device/include/regc515c.h,
2457         * device/include/sab80515.h,
2458         * device/include/mcs51/c8051f000.h,
2459         * device/include/mcs51/c8051f018.h,
2460         * device/include/mcs51/c8051f020.h,
2461         * device/include/mcs51/c8051f040.h,
2462         * device/include/mcs51/c8051f060.h,
2463         * device/include/mcs51/c8051f120.h,
2464         * device/include/mcs51/c8051f300.h,
2465         * device/include/mcs51/c8051f310.h,
2466         * device/include/mcs51/c8051f320.h,
2467         * device/include/mcs51/c8051f330.h,
2468         * device/include/mcs51/c8051f350.h,
2469         * device/include/z180.h: Changed SDCC specific keywords to double
2470         underlined form.
2471
2472 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2473
2474         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2475         18F4455,
2476         * (pic16_assignConfigWordValue): disable testing of configuration
2477         register value with config mask,
2478         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2479         function with port->fun_prefix,
2480         * (genFunction): when generating a naked interrupt function never
2481         create an absolute segment placed in interrupt vector address, place
2482         the actual interrupt function at IVA instead, when an interrupt
2483         function is generated with unspecified interrupt then do not create
2484         the absolute section,
2485         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2486         code for generating a call to generic pointer get/put function with
2487         a call to function pic16_callGenericPointer(),
2488         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2489         the call to the generic pointer get/put functions with prefixing the
2490         function name with port->fun_prefix,
2491         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2492         * src/pic16/main.c (_process_pragma): prefix function with
2493         port->fun_prefix,
2494         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2495         calling assembler, old 18Fxxxx macro is deprecated,
2496         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2497         PC_ASMDIR in while condition,
2498         * (findInstruction): add PC_ASMDIR in while condition,
2499         * (buildCallTree): prefix main with port->fun_prefix,
2500         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2501         identifier for variable with banked access in instructions BTFSS,
2502         BTFSC, BCF, BSF, BTG
2503         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2504         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2505         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2506         perform optimization when enviroment variable NO_REG_OPT is set,
2507         * (insideLRBlock): NEW, return 1 if register is inside an
2508         INF_LOCALREGS block,
2509         * (RemoveRegFromLRBlock): remove a register that is completely
2510         eliminated by register optimization, but it is still left in local
2511         register store/restore in/from stack block,
2512         * (Remove2pcodes): after removing register, check to see if it
2513         should be removed from local register store/restore in/from stack
2514         block,
2515         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2516         DUMMY_READ_VOLATILE,
2517
2518         * device/include/pic16/adc.h: minor prototype modifications and
2519         update,
2520         * device/include/pic16/malloc.h: added GPL notice various
2521         modifications,
2522         * device/include/pic16/stdint.h: NEW, standard header for ints
2523         * device/include/pic16/delay.h: NEW, header for delay functions,
2524         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2525         delay1mtcy,
2526         * device/include/pic16/signal.h: NEW, header providing helper macros
2527         for implementing signal handlers,
2528         * device/include/pic16/stdio.h: added prototypes for functions,
2529         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2530         prototypes for stdin and stdout, added macro PUTCHAR to
2531         automatically implement putchar function prototype,
2532         * device/include/pic16/usart.h: modified and updated USART library,
2533         * device/lib/pic16/libio/adc/,
2534         * device/lib/pic16/libio/i2c: some modifications to improve library
2535         performance,
2536         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2537         family of functions,
2538         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2539         family of functions and other sources,
2540         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2541         of the PIC18Fxx[28] devices,
2542         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2543         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2544         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2545         _do_cinit function, because the previous failed when local variables
2546         where not placed in the same memory bank,
2547         * device/lib/pic16/libsdcc/char/: various modifications to improve
2548         library performance,
2549         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2550         information on the new functions of the c library and more...
2551
2552 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2553
2554         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2555
2556 2005-03-26 Raphael Neider <rneider AT web.de>
2557
2558         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2559           if condition == CARRY)
2560         * (genCmp): adapted to new genSkipc semantics
2561         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2562           on rIfx (genCmp was broken)
2563
2564 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2565
2566         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2567         * src/z80/main.c (_keywords[]),
2568         * src/SDCCglobal.h (struct options),
2569         * src/SDCC.y,
2570         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2571         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2572         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2573         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2574         always available in leading double underscore form. The C99 support is
2575         mostly missing, but it's a start.
2576         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2577         reserved identifier "__data".
2578
2579 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2580
2581         * src/mcs51/peeph.def: fixed bug 1170013
2582
2583 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2584
2585         * device/include/mcs51reg.h: fixed bug 842007
2586
2587 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2588
2589         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2590         last time.
2591
2592 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2593
2594         * src/port.h (struct PORT),
2595         * src/avr/ralloc.c (avr_assignRegisters),
2596         * src/avr/main.c,
2597         * src/ds390/ralloc.c (ds390_assignRegisters),
2598         * src/ds390/main.c,
2599         * src/hc08/ralloc.c (hc08_assignRegisters),
2600         * src/hc08/main.c,
2601         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2602         * src/mcs51/main.c,
2603         * src/pic/ralloc.c (pic14_assignRegisters),
2604         * src/pic/main.c,
2605         * src/pic16/ralloc.c (pic16_assignRegisters),
2606         * src/pic16/main.c,
2607         * src/xa51/ralloc.c (xa51_assignRegisters),
2608         * src/xa51/main.c,
2609         * src/z80/ralloc.c (z80_assignRegisters),
2610         * src/z80/ralloc.h,
2611         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2612         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2613         * src/SDCCcse.h,
2614         * src/SDCCdflow.c (computeDataFlow),
2615         * src/SDCCdflow.h,
2616         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2617         * src/SDCCloop.h,
2618         * src/SDCCcflow.c (*),
2619         * src/SDCCcflow.h,
2620         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2621         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2622         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2623         immedDom() returning wrong block; probably fixes bug #1160833)
2624
2625 2005-03-20 Borut Razem <borut.razem AT siol.net>
2626
2627         * support/scripts/inc2h.pl: WIN32 port
2628
2629 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2630
2631         * device/lib/makefile.in: added abs.c and labs.c
2632
2633 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2634
2635         * device/include/stdint.h: added
2636         * device/lib/abs.c: added
2637         * device/lib/labs.c: added
2638         * device/include/stdlib.h: added abs() and labs() prototypes
2639         * device/lib/libsdcc.lib: added abs and labs
2640         * device/include/float.h,
2641         * device/lib/_fsmul.c,
2642         * device/lib/printf_fast.c,
2643         * device/lib/printf_tiny.c: updated comments
2644
2645 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2646
2647         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2648         bug #1164313
2649
2650 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2651
2652         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2653         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2654
2655 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2656
2657         * device/lib/printf_large.c: removed inline assembly for portability and
2658           readability. Use printf_fast if speed or size are more important.
2659         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2660         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2661
2662 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2663
2664         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2665         prevent compiler warning
2666
2667 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2668
2669         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2670         moved to level 0 and declared as static. Also they are explicit
2671         placed in access bank. This was necessery because some times they
2672         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2673         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2674         optimizations. Currently only compare to unsigned char is implemented,
2675         * src/pic16/gen.c: added fReturnIdx array,
2676         * (struct resolvedIfx) is moved to gen.h and made public,
2677         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2678         * (aopForSym): added an optimization to directly store in stack of
2679         the operand of a SEND iCode,
2680         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2681         but as registers instead (AOP_REG) using the fReturnIdx array,
2682         * (pic16_freeAsmop): remove the freed register from the
2683         _G.sregsAlloc field,
2684         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2685         a compare of 'WREG',
2686         * (pic16_popGetTempRegCond): changed function prototype, now
2687         function takes also a bitVector argument v which holds the current
2688         set of registers that are allocated for stack access by aopForSym,
2689         registers allocated in aopForSym for accessing stack symbols are not
2690         any more part of the functions usedRegs field,
2691         * (genCall): some times aopOp is called for a stack variable to be
2692         send, aopForSym might perform the push, if this is true make sure
2693         that genCall doesn't push the variable twice by testing _G.resDirect,
2694         * (genFunction): changed testing for unspecified interrupt number
2695         from 256 to INTNO_UNSPEC,
2696         * modified selection scheme of frame pointer generation. Previously
2697         if function did use local registers a frame pointer was generated,
2698         now a frame pointer is generated only if function has arguments
2699         (that need PLUSW2 register access), or has stack arguments, or the
2700         compiler is not instructed to omit the frame pointer,
2701         * (genEndFunction): before restoring local registers that were saved
2702         in the function preamble, also restore the registers that *might*
2703         have been allocated for stack access,
2704         * (genRet): removed some old comments,
2705         * (genCmp, the active (RN's) version): added a call to the
2706         pic16_genCmp_special function to perform the compare with a more
2707         robust and optimized way,
2708         * (genInline): a feature has been added in inline code generation,
2709         which allows a wildcard variable substitution when writing inline
2710         assembly. Code is incomplete and experimental therefore undocumented,
2711         * (genCast): changed order of aopOp for result and right to allow
2712         aopForSym to directly load the result if possible,
2713         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2714         perform an optimized compare on some selected special occasions,
2715         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2716         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2717         generate an IVT any more,
2718         * src/pic16/main.c (pic16_optionsTable): added command line option
2719         --optimize-cmp,
2720         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2721         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2722         macros,
2723         * src/pic16/NOTES: Raphael Neider added in list of active developers
2724         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2725         jumptable_end to prevent bug #,
2726         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2727         inCond and outCond fields,
2728         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2729         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2730         turn off register spilling,
2731         * (packRegsForOneUse): synced with other ports' versions although it
2732         is not used currently,
2733         * (pic16_packRegisters): added an optimization while reading
2734         structure bitfields, some registers may be saved (malloc code is
2735         decreased by 80 bytes)
2736
2737 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2738
2739         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2740         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2741         this can be optimized more?
2742
2743 2005-03-10 Raphael Neider <rneider AT web.de>
2744
2745         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2746           genNearPointerGet): (hopefully) fixed access to bitfields via
2747           pointers (p->bitN = x; and x = p->bitN; failed)
2748
2749 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2750
2751         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2752
2753 2005-03-09 Raphael Neider <rneider AT web.de>
2754
2755         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2756
2757 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2758
2759         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2760         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2761           (regTypeNum): set REG_BIT type if necessary
2762         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2763         * support/regression/tests/critical.c: check bug 1144613
2764
2765 2005-03-02 Raphael Neider <rneider AT web.de>
2766
2767         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2768
2769 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2770
2771         * src/avr/ralloc.c (serialRegAssign),
2772         * src/ds390/ralloc.c (serialRegAssign),
2773         * src/hc08/ralloc.c (serialRegAssign),
2774         * src/mcs51/ralloc.c (serialRegAssign),
2775         * src/pic/ralloc.c (serialRegAssign),
2776         * src/pic16/ralloc.c (serialRegAssign),
2777         * src/xa51/ralloc.c (serialRegAssign),
2778         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2779
2780 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2781
2782         * src/SDCCast.c (decorateType): fixed bug 1124787
2783
2784 2005-02-20 Hubert Sack <sack AT digiplan.de>
2785         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2786
2787         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2788         patch #1121755
2789
2790 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2791
2792         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2793         to keep the correct label reference count when adding/removing references
2794         to labels. A peephole file using this is appended to patch #1144962.
2795
2796 2005-02-14 Raphael Neider <rneider AT web.de>
2797
2798         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2799         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2800         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2801           retrievals of result operand's value on assignment
2802
2803 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2804
2805         * device/include/pic16/string.h: modified prototype for memccpy()
2806         to memccpy(void *, void *, char, size_t)
2807         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2808         check whether to omit frame pointer or not,
2809         * (genInline): convert all occurences of "\n" to LF in inline
2810         assembler blocks, this helps formatting the inline text,
2811         * (pic16_loadFSR0): modified prototype,
2812         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2813         removed some 8051 legacy code,
2814         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2815         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2816         before allocating temporary registers in functions,
2817
2818 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2819
2820         * support/regression/tests/bitvars.c: corrected the "fix"
2821
2822 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2823
2824         * support/regression/tests/bitvars.c,
2825         * support/regression/tests/bitwise.c,
2826         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2827
2828 2005-02-10 Raphael Neider <rneider AT web.de>
2829
2830         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2831           different size for Alpha
2832         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2833
2834 2005-02-09 Raphael Neider <rneider AT web.de>
2835
2836         * src/SDCC.lex(doPragma) : save and restore warning options as well
2837           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2838         * have #pragma less_pedantic set the errorlevel to WARNING
2839           (fixes #1117001)
2840         * (cloneOptimize) : fixed wrong malloc's size
2841         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2842           facilitate correct handling of #pragma (save|restore)
2843
2844 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2845
2846         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2847
2848 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2849
2850         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2851
2852 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2853
2854         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2855
2856 2005-02-02 Raphael Neider <rneider AT web.de>
2857
2858         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2859         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2860         * (pic16_storeForReturn): fixed to allow returning function pointers
2861         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2862         * device/include/pic16/{stddef.h,stdbool.h}: added
2863
2864 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2865
2866         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2867
2868 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2869
2870         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2871         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2872          appeared to be required
2873
2874 2005-01-31 Borut Razem <borut.razem AT siol.net>
2875
2876         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2877           include/mcs51 and include/z80 directories to the package
2878
2879 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2880
2881         * src/hc08/gen.c (genFunction): fixed bug #1112752
2882
2883 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2884
2885         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2886
2887 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2888
2889         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2890
2891 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2892
2893         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2894
2895 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2896
2897         * device/include/c8051fxxx.h: removed these 6 files
2898         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2899
2900 2005-01-26 Raphael Neider <rneider AT web.de>
2901
2902         * src/pic16/gen.c (genAssign): fixed assignment from longs
2903           in codespace (were cut to three bytes)
2904         * (genDummyRead): implemented (except for CODESPACE...),
2905           fixed bug #1108575
2906         * src/pic16/glue.c (emitStatistics): beautified
2907         * device/lib/pic16/libm/Makefile: added include path
2908
2909 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2910
2911         * src/z80/gen.c (aopPut): fixed bug #1103902
2912
2913 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2914
2915         * device/lib/expf.c: fixed bug #1095792
2916
2917 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2918
2919         * device/lib/pic16/libm: added Math library sources
2920
2921 2005-01-24 Raphael Neider <rneider AT web.de>
2922
2923         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2924           to enable upcast to pCodeOpReg2 (there is no type tag to
2925           differenciate the two and pic16_popGet2p cast into PCOR2)
2926         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2927           (sizeof(sectNames) changed to sizeof(sectName))
2928           Both patches fix segfaults under MinGW.
2929
2930 2005-01-23 Raphael Neider <rneider AT web.de>
2931
2932         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2933           Safe_[mc]?alloc()'ed variables
2934         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2935           of (byte sized) temporaries (assign them to WREG for now)
2936         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2937           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2938           this might fix SIGSEGVs on MinGW...
2939         * src/SDCCopt.c (killDeadCode): restored original behaviour
2940           (volatile operands might get thrown away though)
2941
2942 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2943
2944         * src/pic16/gen.c: fixed bug #1106975,
2945         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2946         pointer update, INTCON is saved, global interrupts are disabled and
2947         restored after updateing TOS.
2948         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2949         * added function attribute 'shadowregs' to take advantage of shadow
2950         registers,
2951         * added function attribute 'wparam' as an alternative to the wparam
2952         pragma,
2953         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2954         user declares a non-ISR function as 'shadowregs',
2955         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2956
2957 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2958
2959         * .version: bumped version number to 2.4.8
2960         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2961         pic16 port,
2962         * device/lib/pic16/libio/i2c/: I2C module support library,
2963         * device/include/pic16/i2c.h: I2C support library header,
2964         * device/lib/pic16/libc/stdio/: standard IO support sources,
2965         * (printf_small.c): printf_small() source, supports float print,
2966         * (printf_tiny.c): printf_tiny() source, does not support floats,
2967         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2968         enable global optimizations for entire library source, other
2969         Makefiles in the source tree are also modified to reflect this,
2970         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2971         function,
2972         * doc/sdccman.lyx: updated to reflect new changes,
2973         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2974         sym->onStack if-case,
2975         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2976         sbit, idata, _idata, xdata, _xdata,
2977         * added pragma library, to link an external library, (see doc),
2978         * removed command line options, --pomit-config-words, --pomit-ivt,
2979         --pleave-reset-vector,
2980         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2981         when calling assembler to reflect memory model used, also define
2982         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2983         reflect stack model used,
2984         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2985         on stack return NULL,
2986
2987 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2988
2989         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2990           of the operands is volatile. Fixes #1020220
2991
2992 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2993
2994         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2995         * (OptimizeRegUsage): make sure that there is really no other flow where
2996           the first pCode is used
2997
2998 2005-01-22 Raphael Neider <rneider AT web.de>
2999
3000         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3001           to fix #1106967 (pCode->seq are not set up correctly)
3002
3003 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3004
3005         * src/SDCCglue.c (glue): make sure code area is declared before the
3006         static initialization area.
3007
3008 2005-01-21 Raphael Neider <rneider AT web.de>
3009
3010         * device/lib/Makefile.in: fixed test for pic16 install dir
3011         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3012           optimizations
3013         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3014           added --optimize-goto compiler switch and pragma wparam documentation
3015         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3016         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3017           and PRODH closing bug #1071770 (peephole optimizer)
3018
3019 2005-01-19 Raphael Neider <rneider AT web.de>
3020
3021         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3022           cmdLine buffers (used when calling sdcpp...) are large enough
3023           (MAX_PATH=256 truncates arguments leading to system halts when
3024           used in MinGW...)
3025         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3026         * (genUminus): rewritten to for efficiency
3027         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3028           used uninitialized in some cases)
3029         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3030           copy the third byte from the int -- now assumes 0x80 (data memory)
3031         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3032           operands (genAddLit expects the iCode's operands to swapped as
3033           well), fixed leftover bytes (crashed for short left operands)
3034         * (pic16_genMinusDec): performance improvements, removed false
3035           PIC14 emitSKPNCs
3036         * (pic16_genMinus): fixed to cope with differently sized operands
3037         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3038           for --obanksel > 1
3039         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3040         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3041           new banksel optimization
3042         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3043           analysis for temporary registers (segfaults...)
3044         * src/pic16/peeph.def: added rule
3045
3046 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3047
3048         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3049         which converts a float number to its ASCII representation
3050         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3051         functions to convert the fractional and integer part of a float to ASCII,
3052         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3053         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3054         ram
3055         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3056         _STATMEM macros,
3057         * device/include/pic16/adc.h: added GPL info,
3058         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3059         a pCodeOp as tested operand,
3060         * (genNearPointerGet): optimized bit testing, does not use
3061         intermediate register for bit value, test directly instead with
3062         BTFSS, BTFSC, works only for single bits,
3063         * (genpic16Code): dump the name of the iCode in the asm,
3064         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3065         renamed to pic16_decodeOp,
3066         * (serialRegAssign): do not allocate a temporary register for iCode
3067         sequences that test a single bit for 1/0
3068
3069 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3070
3071         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3072         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3073         access stack and frame pointers. They are initially assigned to
3074         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3075         accessing SFRs. Updated all occurences of modification of stack or
3076         frame pointer in gen.c and pcode.c,
3077         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3078         assigning of a literal value to pointers,
3079         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3080         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3081         selected
3082
3083 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3084
3085         * doc/sdccman.lyx: update documentation about stack pragma, added
3086         some info for stack memory models
3087
3088 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3089
3090         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3091
3092 2005-01-08 Raphael Neider <rneider AT web.de>
3093
3094         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3095           udata sections to fix bug #1097823
3096
3097 2005-01-05 Raphael Neider <rneider AT web.de>
3098
3099         * src/pic16/gen.c (genGenericShift): added handling of differently
3100           sized left operand and result
3101
3102 2005-01-04 Raphael Neider <rneider AT web.de>
3103
3104         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3105         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3106           to hold the condition bit)
3107         * added new version of genCmp (old code available via #define)
3108         * added new version of genShiftLeft/genShiftRight in a generic
3109           way, now supports shifting by negative values
3110         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3111           shiftCount (expected by genGenericShift)
3112         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3113         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3114           dump
3115         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3116           is an invalid literal too...)
3117
3118 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3119
3120         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3121         from Raphael Neider,
3122         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3123         for 8-bit literals. This fixes some literal operands which are sign
3124         extended to 16-bits ints when instruction needs only 8-bits.
3125
3126 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3127
3128         * device/lib/logf.c: added mcs51 assembly version
3129         * device/lib/expf.c: added mcs51 assembly version
3130         * device/lib/_logexpf.c: new shared asm code for expf and logf
3131         * device/include/math.h: add defines for assembly math library
3132         * device/lib/Makefile.in: build new _logexpf.c
3133         * device/lib/libfloat.lib: use new _logexpf.c
3134
3135 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3136
3137         * src/pic/device.c
3138         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3139           device types which have less than 0x7f registers.
3140
3141 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3142
3143         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3144
3145 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3146
3147         * device/lib/printf_fast.c: only build on supported arch.
3148         * device/lib/printf_tiny.c: only build on supported arch.
3149         * device/lib/printf_fast_f.c: only build if asm float lib
3150         * device/lib/_fsget1arg.c: only build if asm float lib
3151         * device/lib/_fsget2args.c: only build if asm float lib
3152         * device/lib/_fsnormalize.c: only build if asm float lib
3153         * device/lib/_fsreturnval.c: only build if asm float lib
3154         * device/lib/_fsrshift.c: only build if asm float lib
3155         * device/lib/_fsswapargs.c: only build if asm float lib
3156         * device/include/stdio.h: don't provide print_fast,
3157           print_fast_f, print_tiny prototypes if --xstack used
3158
3159 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3160
3161         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3162         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3163           to the SOURCES
3164
3165 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3166
3167         * device/lib/printf_fast_f.c: same as printf_fast, but
3168           with floating point enabled
3169         * device/lib/printf_fast.c: minor tweaks
3170         * device/include/stdio.h: add printf_fast_f
3171
3172 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3173
3174         * src/SDCCmain.c: make --float-reent default for mcs51
3175         * device/lib/_fsadd.c: added mcs51 assembly version
3176         * device/lib/_fssub.c: added mcs51 assembly version
3177         * device/lib/_fsmul.c: added mcs51 assembly version
3178         * device/lib/_fsdiv.c: added mcs51 assembly version
3179         * device/lib/_fseq.c: added mcs51 assembly version
3180         * device/lib/_fsneq.c: added mcs51 assembly version
3181         * device/lib/_fsgt.c: added mcs51 assembly version
3182         * device/lib/_fslt.c: added mcs51 assembly version
3183         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3184         * device/lib/Makefile.in: add _fscmp to build
3185         * device/lib/libfloat.lib: add _fscmp to build
3186
3187 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3188
3189         * device/lib/_fs2slong.c: added mcs51 assembly version
3190         * device/lib/_fs2sint.c: added mcs51 assembly version
3191         * device/lib/_fs2schar.c: added mcs51 assembly version
3192         * device/lib/_fs2ulong.c: added mcs51 assembly version
3193         * device/lib/_fs2uint.c: added mcs51 assembly version
3194         * device/lib/_fs2uchar.c: added mcs51 assembly version
3195         * device/lib/_slong2fs.c: added mcs51 assembly version
3196         * device/lib/_sint2fs.c: added mcs51 assembly version
3197         * device/lib/_schar2fs.c: added mcs51 assembly version
3198         * device/lib/_ulong2fs.c: added mcs51 assembly version
3199         * device/lib/_uint2fs.c: added mcs51 assembly version
3200         * device/lib/_uchar2fs.c: added mcs51 assembly version
3201         * device/include/float.h: added #define to select asm vs c
3202
3203 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3204
3205         * device/lib/printf_fast.c: improvements to float output
3206         * device/include/float.h: add defines for assembly float library
3207         * device/lib/_fsget1arg.c: receive 1 float arg
3208         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3209         * device/lib/_fsnormalize.c: normalize a float
3210         * device/lib/_fsreturnval.c: return float, various helper routines
3211         * device/lib/_fsrshift.c: right shift a float's mantissa
3212         * device/lib/_fsswapargs.c: swap 2 floats
3213         * device/lib/Makefile.in: build these 6 new files for mcs51
3214         * device/lib/libfloat.lib: add these 6 files to the library
3215
3216 2004-12-26 Borut Razem <borut.razem AT siol.net>
3217
3218         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3219           built by gcc 3.4.2
3220
3221 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3222
3223         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3224           and fully reentrant and register bank neutral.
3225         * device/lib/printf_fast.c: added float (not enabled by default),
3226           added compact/slower integer (also not enabled by default),
3227           improved size/speed of fast integer code, other minor changes
3228         * device/include/stdio.h, device/lib/Makefile.in,
3229           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3230
3231 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3232
3233         * src/pic16/pcode.c: declaring variables other than at the start of a
3234           block is not supported in C by VC6.
3235
3236 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3237
3238         * applied a previous patch from Raphael Neider that wasn't included
3239         in the previous commits, which fixes infinite loops within jumptable
3240         improvements,
3241         * made some fixes that previous patches introduced
3242
3243 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3244
3245         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3246         that fixes an issue with AOP_PCODE asmop's offset,
3247         * (pic16_popCopyReg): update instance field too,
3248         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3249         function of pic port,
3250         * (genCmp, genAnd, genAssign),
3251         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3252
3253 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3254
3255         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3256         variables initial values to idata section,
3257         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3258         variables in some functions. This utilizes parmBytes field of iCode
3259         structure to hold the offset of the variable in stack. (might be
3260         able to use the stack field too?)
3261         * applied patch from Raphael Neider # ### , # ###
3262         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3263         variable initial values in idata section,
3264         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3265         for static variables with initial value
3266         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3267         applied fix in while loop from Raphael Neider.
3268
3269 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3270
3271         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3272         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3273         * src/ds390/ralloc.c (serialRegAssign): spill bits
3274         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3275         * support/Util/SDCCerr.c,
3276         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3277         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3278         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3279
3280 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3281
3282         * device/include/sdcc-lib.h: inserted LGPL, added includes
3283           asm/ds390/features.h and asm/mcs51/features.h
3284         * device/include/asm/default/features.h,
3285         * device/include/asm/gbz80/features.h,
3286         * device/include/asm/z80/features.h: added empty _AUTOMEM
3287           and _STATMEM
3288         * device/include/asm/ds390/features.h,
3289         * device/include/asm/mcs51/features.h: added files with defines for
3290           _AUTOMEM and _STATMEM indicating automatic and static storage class
3291         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3292         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3293         * src/SDCCicode.c (geniCodeCast),
3294         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3295         * src/SDCCloop.c (loopInduction): removed unused variable lr
3296         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3297           to convertToFcall to include char modulo (RFE 1065037), added check
3298           if left operand is unsigned and use abs of literal value
3299         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3300           as it doesn't work after conversion from peephole.def to peephole.rul
3301         * src/mcs51/gen.c (toBoolean): added check for size,
3302           (genModOneByte): optimized code for signed char modulo a literal
3303           power of 2 (thanks to Hubert Sack),
3304           (genRRC): removed unnecessary "clr c",
3305           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3306         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3307           jump optimization,
3308           swapped rules 256.c and 256.d,
3309           extended 256.d by using new multiple checks (thanks Erik),
3310           added rules 256.e and 256.f,
3311           updated rule 261.a and 261.b to new generated code
3312         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3313
3314 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3315
3316         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3317           induction related bugs, including first part of bug #1074377
3318
3319 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3320
3321         * applied patch from bug-report #1076292,
3322         * applied patches for genAnd and Goto-optimizations for Raphael
3323         Neider,
3324         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3325         dump a less iCode information,
3326         * src/pic16/device.h (pic16_options_t): added field debgen,
3327         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3328         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3329         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3330         puclic,
3331         * (various functions): added macros FENTRY and FENTRY2 to functions,
3332         to emit function prologue,
3333         * (various functions): fixed indentation,
3334         * (genNearPointerGet): fixed loading of FSR0,
3335         * (genPackBits): applied patch from Raphael Neider to fix updating
3336         of FSR0 and touching only the modified bits,
3337         * src/pic16/genarith.c (various functions): added macros FENTRY to
3338         emit function prologue in comments,
3339         * src/pic16/pcode.h: added functions debugf2, debugf3,
3340         * src/pic16/ralloc.c: partial fix for packForPush caused
3341         segmentation fault,
3342
3343 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3344
3345         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3346           <stsp AT users.sourceforge.net> with reversed byte order
3347         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3348
3349 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3350
3351         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3352           bug #1074377
3353         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3354         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3355
3356 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3357
3358         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3359
3360 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3361
3362         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3363           conditions,
3364           (setFromConditionArgs): friendly operand parser for peephole rules,
3365           (operandBaseName, operandsNotRelated): new peephole condition
3366           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3367           architecture specific register naming into account, handles n-way
3368           comparisons, and supports quoted literals
3369         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3370
3371 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3372
3373         * src/mcs51/peeph.def: fixed bug #1076940
3374
3375 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3376
3377         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3378
3379 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3380
3381         Adding support for replacing ljmps with sjmps in jumptables
3382         generated for switch statements. For now you need to set the
3383         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3384         Now 4 algorithms for mcs51 jumptable generation are used:
3385         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3386         addresses loaded pc-relative for up to 112 cases and stack-pushing
3387         target addresses loaded with offset from dptr for up to 256 cases.
3388
3389         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3390         * src/mcs51/main.c: adapted constants for switch table generation
3391         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3392
3393 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3394
3395         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3396         * support/regression/tests/bug1057979.c: added test for bug 1073386
3397
3398 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3399
3400         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3401         compilers
3402
3403 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3404
3405         * src/pic16/device.h,
3406         * src/pic16/genarith.c,
3407         * src/pic16/glue.c,
3408         * src/pic16/main.c,
3409         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3410
3411 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3412
3413         Large cummulative patch for pic16 port.
3414         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3415         to call when a stack overflow occurs,
3416         * (malloc.h): added CVS Id tag,
3417         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3418         variable,
3419         * added libc directory. The current version of LibC contains string
3420         functions, ctype functions and macros and some functions of the
3421         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3422         be extensively tested in the future. Standard disclaimer here.
3423         Library is not automatically build yet. But one can build it by
3424         invoking 'make' inside the libc directory.
3425         * added ADC library under libio. Preliminary version yet.
3426
3427         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3428         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3429         aopForRemat() now and not by pic16_aopOp(),
3430         * (pic16_popGetTempReg): removed warning messgae when allocating
3431         temporary registers, its a buggy feature and will be removed,
3432         * (pic16_popGet): set register instance field in AOP_CRY,
3433         * (pic16_outBitC): fixed for results in size greater than 1,
3434         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3435         * (pic16_storeForReturn): optimized return of 0,
3436         * (genCmp): experimental code for new genCmp which uses PIC18's
3437         special compare&skip instructions. Initial tests fail some times
3438         with variables grater than 1 byte in size, so new code is disabled,
3439         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3440         a single bit,
3441         * (genCast): began a fix to optimize the casting of a bit to another
3442         bit, now assigning a bitfield to another bitfield will fail, sorry,
3443         * src/pic16/main.c: disabled the use of lr-support feature,
3444         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3445         * added some function prototypes, added function _debugf prototype,
3446         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3447         bits with offset (case PO_GPR_BIT),
3448         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3449         command line,
3450         * (isBankInstruction): modified to return 0 for no banking instruction,
3451         and 1 for banking instruction,
3452         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3453         caused stop processing pCodes after a inline assembly block,
3454         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3455         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3456         registers when it shouldn't,
3457         * src/pic16/ralloc.c (allocReg): add preliminary support for
3458         supporting a limited set of temporary registers,
3459
3460 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3461
3462         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3463           genDataPointerSet): ensure assignments always copy in MSB to LSB
3464           order,
3465           (loadRegFromAop): recognize CLRH optimization,
3466           (genFunction): optimize RECEIVE iCodes in reentrant functions
3467
3468 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3469
3470         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3471           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3472           selected.
3473         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3474         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3475           contiguous with data
3476
3477 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3478
3479         * device/lib/_gptrget.c (_gptrget),
3480         * device/lib/_gptrgetc.c (_gptrgetc),
3481         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3482           instead of sjmp to ret
3483         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3484           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3485
3486 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3487
3488         * .version: bumped version to 2.4.7
3489         * device/lib/_gptrget.c (_gptrget): is now _naked
3490         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3491         * device/lib/_gptrput.c (_gptrput): is now _naked
3492         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3493           (createFunction): fixed xstack
3494         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3495         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3496           or bit either,
3497           (geniCodeCritical): store original interrupt state in an iTemp bit
3498           var unless stack-auto
3499         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3500         * src/SDCCmain.c (setIncludePath): added include/target to search path
3501         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3502         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3503           prototype,
3504           (processFuncArgs): put bit vars in bit area
3505         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3506           unsaveRBank): fixed xstack,
3507           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3508           (genFunction, genEndFunction): fixed xstack,
3509           (genAssign): optimization don't walk backwards through mem
3510         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3511         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3512         * support/regression/Makefile: also make library (for stack-auto) when
3513           making "all" and added "test-mcs51-xstack-auto"
3514         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3515         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3516         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3517         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3518         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3519           make-library by MAKE_LIBRARY
3520         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3521           regression tests for xstack
3522         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3523         * support/regression/tests/critical.c: test for critical on mcs51
3524
3525 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3526
3527         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3528           built version of sdcc instead of installed version
3529
3530 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3531
3532         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3533         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3534           vprintf.c now
3535         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3536         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3537           WARNING: remove device/lib/build/z80/printf.o by hand when
3538           updating from previous build!
3539         * device/lib/z80/printf.c: updated comment
3540         * support/regression/tests/bug1057979.c: test all ports now
3541         * support/regression/tests/bug1065458.c: file added
3542
3543 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3544
3545         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3546           *_start and *_end symbols for static functions
3547
3548 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3549
3550         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3551           and search crt0.o in all library paths,
3552           (setIncludePath): proper handling of --nostdinc,
3553           (setLibPath): proper handling of --nostdlib
3554         * support/regression/Makefile,
3555         * support/regression/ports/ds390/spec.mk,
3556         * support/regression/ports/gbz80/spec.mk,
3557         * support/regression/ports/hc08/spec.mk,
3558         * support/regression/ports/mcs51/spec.mk,
3559         * support/regression/ports/mcs51-large/spec.mk,
3560         * support/regression/ports/mcs51-stack-auto/spec.mk,
3561         * support/regression/ports/z80/spec.mk: use include and lib files from
3562           built version of sdcc instead of installed version
3563         * doc/sdccman.lyx: fixed typo in --nostdinc
3564
3565 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3566
3567         * src/pic/pcode.c,
3568         * src/pic/device.c,
3569         * src/pic/ralloc.c,
3570         * src/pic/gen.c : added support to generate code for struct bit fields.
3571
3572 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3573
3574         * as/xa51/xa_version.h,
3575         * device/include/errno.h,
3576         * device/include/regc515c.h,
3577         * device/lib/_itoa.c,
3578         * device/lib/_ltoa.c,
3579         * device/lib/ser_ir_cts_rts.c,
3580         * sim/ucsim/xa.src/glob.cc,
3581         * sim/ucsim/xa.src/inst_gen.cc,
3582         * sim/ucsim/xa.src/xa_bit.cc,
3583         * sim/ucsim/xa.src/xa_sfr.cc,
3584         * sim/ucsim/z80.src/inst_dd.cc,
3585         * sim/ucsim/z80.src/inst_fdcb.cc,
3586         * support/scripts/keil2sdcc.pl,
3587         * src/pic16/pic16.dsp,
3588         * src/pic16/pic16a.dsp: corrected cvs line endings
3589         * device/lib/printf_large.c: fixed bug 1057979
3590         * src/pic16/gen.c: fixed non-C standard code
3591         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3592         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3593         * support/regression/ports/mcs51/support.c: reload T1 asap
3594         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3595           pdata use and clear idata startup behaviour
3596         * support/regression/tests/bug1057979.c: added
3597
3598 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3599
3600         * device/examples/ds390/ow390/ad26.h,
3601         * device/examples/ds390/ow390/cnt1d.h,
3602         * device/examples/ds390/ow390/crcutil.c,
3603         * device/examples/ds390/ow390/ownet.h,
3604         * device/examples/ds390/ow390/owsesu.c,
3605         * device/examples/ds390/ow390/swt12.h,
3606         * device/examples/ds390/ow390/swtoper.c,
3607         * device/examples/ds390/ow390/temp10.h,
3608         * device/examples/ds390/ow390/thermodl.c,
3609         * device/examples/ds390/tinitalk/tinitalk.dsp,
3610         * device/examples/ds390/tinitalk/tinitalk.dsw,
3611         * device/examples/mcs51/clock/hw.h,
3612         * device/examples/mcs51/simple2/go.bat,
3613         * device/examples/serialcomm/windows/serial.h,
3614         * device/examples/xa51/dummy.c,
3615         * device/examples/xa51/hello.c,
3616         * device/include/80c51xa.h,
3617         * device/include/at89x051.h: corrected cvs line endings
3618
3619 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3620
3621         * src/pic16/main.c (options): added command line --gstack, to trace
3622         stack over/under flows,
3623         * added pragma 'wparam' to allow passing first byte of function
3624         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3625         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3626         call to __gstack_test function and sets up the symbol as extern,
3627         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3628         * popaop): added call to pic16_testStackOverflow,
3629         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3630         wparamList list,
3631         * (genCall, genPcall): now all parameters are passed via stack
3632         except in functions that are pass to wparam pragma in which WREG is
3633         used too,
3634         * (genPcall): REENTRANT flag is checked to see if variable prototype
3635         contains reentrant keyword, don't call a non-reentrant function, via
3636         a reentrant function pointer or vice versa, functions are never
3637         passed via WREG,
3638         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3639         D.Winkler,
3640         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3641         SIGSEGV when accessing a NULL register stucture,
3642         * (pic16_printGPointerType): modified to handle UPPER modifier for
3643         function initializers, changed prototype of function to simpler one,
3644         * (pic16_printIvalFuncPtr): check to see if function is already
3645         added in externs list,
3646         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3647         optimized a move from W to SFR with a move to the same register
3648         later after a CALL,
3649         * device/lib/pic16/debug: NEW directory, contains debug features
3650         which are enabled when linking with libdebug.lib, currently command
3651         line option --gstack enables stack pointer tracing for over/under
3652         flow, corresponding sources are in debug/gstack
3653
3654 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3655
3656         * doc/sdccman.lyx: updated SDCC version,
3657         * (PIC16 port): update list of command line options,
3658         * src/pic16/device.h (structure pic16_options_t): added field gstack
3659         to enable stack overflow tracing on push/pops,
3660         * src/pic16/device.c (statistics structure): added statistics
3661         structure,
3662         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3663         pic16_dump_int_registers): increase statistics counters for each
3664         * variable which is encountered
3665         * (pic16_dump_usection): emit each .udata variable to its own udata
3666         section,
3667         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3668         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3669         parameters via stack, otherwise use old scheme,
3670         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3671         assembler output file,
3672         * src/pic16/main.c: added command line options --gstack to enable
3673         push/pop tracing for stack overflow,
3674         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3675         instructions): added size of each instruction,
3676         * (pic16_countInstruction): estimate size of instructions in
3677         the_pFile list, inline assembly blocks are not counted,
3678         * (pic16_FixRegisterBanking): trace previous register usage, when
3679         banksel optimizations is greater than 0, don't emit a redudant
3680         banksel directive,
3681
3682 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3683
3684         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3685         * src/pic16/ralloc.c : applied same fix for pic16.
3686         * src/pic/gen.c : tidied it up a little.
3687
3688 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3689
3690         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3691         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3692
3693 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3694
3695         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3696
3697 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3698
3699         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3700         non-reentrant function __modsint in the interrupt function (thus
3701         corrupting math operations during serial I/O)
3702         * device/lib/ser_ir.c: as above, changed buffersize
3703         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3704         256.c,d for zeroing
3705         * doc/Makefile: added option -t for rsync
3706
3707 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3708
3709         * src/SDCCast.h (struct ast),
3710         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3711
3712 2004-10-20 Borut Razem <borut.razem AT siol.net>
3713
3714         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3715         package
3716
3717 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3718
3719         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3720         makefile targets,
3721         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3722         support functions to replace long sequences of MOVFF's from access
3723         bank registers to stack and vice versa,
3724         * src/pic16/device.h: added new field opt_flags, where optimization
3725         flags can be set to enable certain features,
3726         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3727         * pBlock, (genFunction, genEndFunction): surroung loop for
3728         saving/loading used registers in stack with PC_INFO pCodes,
3729         INF_LREGS. Code in between can then be optimized by pCode optimizer
3730         to support function calls,
3731         * (genDataPointerSet): fixed bug which loaded float fields in
3732         structures with corrupt data,
3733         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3734         in a standard way debug info on stderr. Feature used for developing
3735         and debugging only,
3736         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3737         obsolete chunks of code,
3738         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3739         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3740         * pic16/src/pcode.c (pic16_newpCodeInfo,
3741         * (pic16_newpCodeOpLocalRegs),
3742         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3743         feature,
3744         * (pic16_pCodeConstString): printing of the initial value of a
3745         symbol as a comment is inhibited since parsing was already done by
3746         copyStr and output is corrupt,
3747         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3748
3749 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3750
3751         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3752
3753 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3754
3755         * as/mcs51/lkarea.c: removed old K&R style,
3756           (lnksect): changed check on boundary error,
3757           (lnksect2): changed check on boundary error,
3758           (lnksect2): extend XSTK to end of page if size = 1
3759         * as/mcs51/lkmain.c: removed old K&R style,
3760           (Areas51): create l_IRAM symbol
3761         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3762         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3763           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3764         * device/lib/_mullong.c: added version to be compiled with xstack
3765         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3766         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3767         * device/lib/mcs51/crtxstack.asm: fixed comment
3768         * src/SDCCglue.c: maxInterrupts defaults to 0,
3769           (emitMaps): added pdata,
3770           (createInterruptVect): (re)moved default,
3771           (glue): added pdata,
3772           (glue): moved __start__xstack to XSTK with default size 1
3773         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3774           and options.float_rent when options.stackAuto is set,
3775           (linkEdit): only write XDATA_NAME if provided on command line
3776         * src/SDCCmem.h,
3777         * src/SDCCmem.c: added pdata
3778         * src/port.h: added pdata_name to PORT
3779         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3780           (saveRegisters, unsaveRegisters): removed usage of B,
3781           (genMinus): fixed accumulator clash,
3782           (genJumpTab): added comment, this needs another look
3783         * src/mcs51/gen.c: added check for "B in use" paranoia,
3784           added pushB() and popB()
3785         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3786           chance
3787         * src/avr/main.c,
3788         * src/ds390/main.c,
3789         * src/hc08/main.c,
3790         * src/mcs51/main.c,
3791         * src/pic/main.c,
3792         * src/pic16/main.c,
3793         * src/xa51/main.c,
3794         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3795           added PSEG (PAG,XDATA) or NULL to port specifier
3796         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3797         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3798           (_mcs51_genInitStartup): removed __start__xstack equ,
3799           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3800         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3801         * src/z80/gen.c (_rleAppend): fixed warnings
3802         * support/regression/tests/zeropad.c: added pdata test
3803         * .version: bumped to 2.4.6
3804
3805 2004-10-17 Borut Razem <borut.razem AT siol.net>
3806
3807         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3808         as a part of nightly build
3809
3810 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3811
3812         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3813         WREG holds the first byte function parameters,
3814         * (aopForSym): take special case for symbols which are in FARSPACE
3815         but in CODESPACE too,
3816         * (assignResultValue): modified to take into account _G.useWreg,
3817         * (genCall): don't use wreg for parameter passing when function is
3818         declared as reentrant, too, added optimization INCF to stack
3819         pointer when stack parameter count is 1,
3820         * (genFunction, genEndFunction): refurnished and fixed to not using
3821         wreg for passing parameters when function has varargs or is
3822         reentrant, fixed bug with symbol name compare for generating
3823         functions in absolute address,
3824         * (pic16_storeForReturn): refurnished,
3825         * (genCmp): began writing a new version of the function, not ready
3826         yet, therefore it is disabled,
3827         * (genAssign): do not read code memory when assigning a function to
3828         a pointer function,
3829         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3830         array of characters, not pointer,
3831         * (pic16initialComments): in debug mode emit an .ident directive for
3832         the assembler,
3833         * (_process_pragma): emit a new warning type (internal to pic16)
3834         when setting stack to default length, emit a similar warning when
3835         placing a function at absolute address and address is not word aligned
3836         * (_pic16_parseOptions): added 'return TRUE' statement,
3837         * (_pic16_linkEdit): if compiling a source, then add the source's
3838         file object, first in the list of objects to link,
3839
3840 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3841
3842         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3843         * src/pic/main.c : removed VC warning.
3844         * src/pic/gen.c : changed comment.
3845
3846 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3847
3848         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3849         reference to a deprecated symbol _GPTRREG was causing failure to
3850         link. Thanks G. M. Gallant for the info.
3851
3852 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3853
3854         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3855         comments for Bugs item #954788.
3856
3857 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3858
3859         * src/pic16/device.c (pic16_dump_gsection,
3860         * pic16_groupRegistersInSection): handle symbols declared to be in
3861         access bank differently,
3862         * src/pic16/gen.c (struct _G): added field resDirect,
3863         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3864         send values read from stack directly to result and don't allocate
3865         temporary values,
3866         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3867         same registers,
3868         * (pic16_sameRegsOfs): NEW,
3869         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3870         free because they were not allocated from temporary pool,
3871         * pic16_popRegFromString): workaround to fix a problem with
3872         allocating variables twice or never,
3873         * (genGenPointerGet): using PRODL instead of FSR0H,
3874         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3875         instead of FSR0H,
3876         * (genAssign): take advantage of the _G.resDirect flag,
3877         * (genCast): around line 11844, use mov2f instead of directly
3878         MOVFF'ing between operands to account for literal values,
3879         * src/pic16/genutils.c: some new debug functions for gpsim have been
3880         added,
3881         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3882         float with integer part only,
3883         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3884         place variables in access bank
3885         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3886         updated sources to reflect recent changes in gen.c
3887
3888 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3889
3890         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3891         sources that searched for headers in installation path, now the
3892         device/include/pic16 is used,
3893         * src/pic16/glue.c (pic16glue),
3894         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3895         .line directives if not in debug mode, this suppresses assembler's
3896         warnings for ignored directives
3897
3898 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3899
3900         * src/port.h: made reset_regparms prototype void parameter explicit.
3901         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3902         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3903         * doc/sdccman.lyx: documented warning disabling and how to use
3904           printf_large to make it print floats.
3905         * device/include/stdbool.h: NEW
3906         * device/lib/_atof.c,
3907         * device/lib/_divuint.c,
3908         * device/lib/_divulong.c,
3909         * device/lib/expf.c,
3910         * device/lib/printf_large.c,
3911         * device/lib/sincosf.c,
3912         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3913         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3914           a completely reentrant lib.
3915
3916 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3917
3918         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3919         * device/include/pic16/stdio.h: fixed bug with colon
3920
3921 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3922
3923         * device/include/pic16/stdio.h,
3924         * device/include/pic16/stdlib.h,
3925         * device/include/pic16/math.h: NEW
3926         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3927         declared as _naked to reduce overhead
3928         * device/lib/Makefile.in (target port-specific-objects-pic16):
3929         changed * to *.* so to ignore the CVS directory,
3930         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3931         stacked variables back in stack,
3932         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3933         corruption
3934
3935 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3936
3937         * .version: bumped version number to 2.4.5
3938         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3939         * support/Util/SDCCerr.c (messages structure): added entry for
3940         W_POSSBUG2
3941
3942         Large cumulative patch for pic16 port and libraries.
3943         * device/include/pic16/sdcc-lib.h,
3944         * device/include/pic16/stdarg.h,
3945         * device/include/asm/pic16/features.h,
3946         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3947         * device/include/pic16/float.h: changes reentrant keyword with
3948         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3949         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3950         updated target build-libraries to include objects from gptr,
3951         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3952         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3953         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3954         all function headings,
3955         * src/SDCCmain.c: added global parameter userIncDirsSet,
3956         * (parseCmdLine): when option -I is encountered add directory to
3957         userIncDirsSet too,
3958         * src/version.awk: added space between control and long,
3959         * src/pic16/NOTES: added some notes for the port,
3960         * src/pic16/gen.c: added prototype for mov2fp function,
3961         * (fReturnpic16[]): properly named return value registers,
3962         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3963         * (aopForSym): added code to handle symbols with onStack flag set,
3964         symbols onStack are allocated PTRSIZE bytes,
3965         * (aopFreeAsmop): handles special case where asmops are stack objects,
3966         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3967         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3968         added argument lock to trace flaws in allocating temporary registers
3969         when developing port,
3970         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3971         * (pic16_popRegFromString): reenabled allocating a direct register
3972         from string,
3973         * (assignResultValue): various beautifications,
3974         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3975         referenced function argument,
3976         * (genIpush): reenabled to allow stacked arguments, handles only
3977         ic->parmPush iCodes,
3978         * (genCall, genPcall): major changes to allow for variable argument
3979         functions, fixed a bug with falsely restoring stack pointer after
3980         returning from call,
3981         * (genFunction): pending code for critical function,
3982         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3983         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3984         * (genNearPointerGet): fixed bug with indirect reading, was always
3985         reading from INDF0
3986         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3987         pointers,
3988         * (genAddrOf): rewrote code to take address of a stacked function parameter
3989         * (genCast): fixed casting to generic pointer type,
3990         * src/pic16/gen.h: added AOP_STA,
3991         * (struct asmop): added field stk,
3992         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3993         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3994         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3995         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3996         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3997         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3998         generic pointers,
3999         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4000         and library paths,
4001         * (pic16_port structure): generic pointer size is set to 3,
4002         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4003         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4004         compiler warning,
4005         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4006         operand is an iTemp,
4007
4008 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4009
4010         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4011         * debugger/mcs51/simi.c: addapt new syntax of s51
4012
4013 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4014
4015         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4016         * src/pic16/pcode.c: commented out some calls to free() in order to
4017         fix bug #989576,
4018
4019 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4020
4021         * src/SDCCicode.h,
4022         * src/SDCCicode.c (isiCodeInFunctionCall),
4023         * src/avr/ralloc.c (selectSpil),
4024         * src/pic/ralloc.c (selectSpil),
4025         * src/pic16/ralloc.c (selectSpil),
4026         * src/ds390/ralloc.c (selectSpil),
4027         * src/hc08/ralloc.c (selectSpil),
4028         * src/xa51/ralloc.c (selectSpil),
4029         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4030         stack in the middle of a function call sequence (fixes bug #1020268)
4031         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4032         costs associated with the minimum switch case.
4033
4034 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4035
4036         * src/SDCC.lex: fixed bug #1030549
4037
4038 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4039
4040         * src/SDCCcse.h (struct cseDef),
4041         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4042         over a function call if the CSE is derived from a symbol whose
4043         address has been taken (fixes bug #1029883)
4044         * support/regression/tests/bug-1029883: a new regression test for
4045         this bug
4046
4047 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4048
4049         * src/hc08/gen.c (emitinline): fixed bug #1029778
4050         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4051         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4052         and starts toward RFE #905167)
4053
4054 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4055
4056         * src/pic16/gen.c (mov2f): New function to move an operand to
4057         another without considering if it is a literal or a register,
4058         * (pic16_sameRegs): don't check if they are both AOP_REG,
4059         * (AccRsh): removed andmask=0 lines,
4060         * (genLeftShift): duplicated to be improved in future versions,
4061         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4062         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4063         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4064         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4065         * (insertBankSwitch): fixed inserting banksel directives algorithm
4066         for instructions that follow a skip instruction, this fixes a report
4067         for broken subtraction code generation,
4068         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4069         iCode is a left op, just in case result and right share the same
4070         registers
4071
4072 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4073
4074         * src/hc08/main.c,
4075         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4076         preservation of HX
4077         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4078         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4079         on 2004-09-12; it was buggy
4080
4081 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4082
4083         * src/SDCCsymt.h: removed RESULT_CHECK
4084         * src/SDCCast.c,
4085         * src/SDCCglue.c,
4086         * src/SDCCval.c,
4087         * src/pic/glue.c,
4088         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4089
4090 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4091
4092         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4093         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4094         configuration values no more rejected by compiler, they are assigned
4095         to configuration registers with a warning message instead,
4096         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4097         the for-loop so last conf register is emitted too,
4098         * (_pic16_initPaths): link library libsdcc.lib by default,
4099         * (_hasNativeMulFor): modified test for multiplication according to
4100         Raphael Neider's remarks. Integer multiplication is also done with
4101         support functions,
4102         * device/include/pic16/pic18fregs.h: corrected type error in while
4103         testing and including 18f6720 header file
4104
4105 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4106
4107         * src/pic16/device.h (pic16_options): removed field use_crt,
4108         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4109         until an optimization to handle single bits is added,
4110         * (pic16_loadFSR0): moved before genUnpackBits,
4111         * (genAnd): some white lines removed,
4112         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4113         leave_reset flags in pic16_options when using crt modules,
4114
4115 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4116
4117         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4118           for bugs 898889 & 979599. Also used some safer print instructions.
4119
4120 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4121
4122         * src/pic16/device.h (pic16_options_t): added field use_crt,
4123         crt_name, no_crt,
4124         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4125         catch a probable future bug,
4126         * src/pic16/gen.c: aopIdx function commented out,
4127         * (genAssign): commented out old code which used aopIdx,
4128         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4129         code, added if conditionals to take into account the --use-crt
4130         command line options,
4131         * src/pic16/main.c (pic16_optionsTable): added new command line
4132         options, --use-crt= and --no-crt,
4133         * (_pic16_linkEdit): now the proper crt object is added in the
4134         linker command line except than when --no-crt is specified,
4135         * src/pic16/pcode.c,
4136         * src/pic16/pcode.h: added some structures and functions for a new
4137         optimization scheme to compansate for instruction overhead between
4138         same iCodes, this scheme is currently under development and is not
4139         working in any way,
4140         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4141         to && operator,
4142         * device/lib/pic16/startup/crt0i.c,
4143         * device/lib/pic16/startup/crt0iz.c: added global char variable
4144         __uflags to force the generation of an idata section
4145
4146 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4147
4148         * doc/Makefile,
4149         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4150         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4151
4152 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4153
4154         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4155         Frieder) and clarified the default code optimization mode
4156
4157 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4158
4159         * src/SDCC.lex (doPragma, process_pragma),
4160         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4161         "opt_code_size", and "opt_code_balanced"
4162         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4163         regrouped options by category, added support for category headers
4164         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4165         and "--opt-code-size"
4166         * doc/sdccman.lyx: documented these new options and pragmas
4167         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4168         preference into account
4169
4170 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4171
4172         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4173           geniCodePreDec): Fixed bug 904237 by generating a warning
4174         * src/SDCCerr.h,
4175         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4176
4177 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4178
4179         * src/pic/device.c : When no max ram set validate full memory range.
4180         * src/pic/pcode.c,
4181         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4182
4183 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4184
4185         * device/lib/_gptrget.c,
4186         * device/lib/_gptrput.c: updated comment
4187         * device/lib/calloc.c,
4188         * device/lib/free.c,
4189         * device/lib/malloc.c,
4190         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4191         * src/SDCCcse.c (cseBBlock),
4192         * src/SDCCicode.c (printOperand, geniCodeArray),
4193         * src/SDCCicode.h (struct operand): fixed bug 868103
4194         * support/regression/tests/bug-868103.c: added
4195         * src/SDCCast.c (searchLitOp),
4196         * src/SDCCcse.h (struct cseDef),
4197         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4198         * src/SDCCicode.h (struct operand),
4199         * src/SDCCsymt.h (struct sym_link),
4200         * src/avr/gen.c (hasInc),
4201         * src/ds390/gen.c (hasInc),
4202         * src/hc08/gen.c (genPlusIncr, hasInc),
4203         * src/mcs51/gen.c (hasInc),
4204         * src/pic16/glue.c (pic16_printIvalChar),
4205         * src/pic16/ralloc.c (regWithIdx),
4206         * src/xa51/gen.c (hasInc) : removed warnings
4207         * src/SDCCast.c (createBlock): added comment ???
4208         * src/hc08/ralloc.c: updated comments
4209
4210 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4211
4212         * doc/sdccman.lyx: updated section on switch statements, added
4213         section about semaphore locking
4214         * doc/Makefile: added option -info for latex2html
4215         * device/lib/_gptrget.c,
4216         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4217
4218 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4219
4220         * src/pic/device.h,
4221         * src/pic/device.c,
4222         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4223          maxram is less than 0x100.
4224
4225 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4226
4227         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4228
4229 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4230
4231         * src/port.h,
4232         * src/mcs51/main.c,
4233         * src/ds390/main.c,
4234         * src/z80/main.c,
4235         * src/hc08/main.c,
4236         * src/pic/main.c,
4237         * src/pic16/main.c,
4238         * src/avr/main.c,
4239         * src/xa51/main.c
4240         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4241         a jump table is the best form for a switch statement, including
4242         automatic insertion of missing cases to make the case range
4243         continuous. Developed in collaboration with Frieder Ferlemann.
4244
4245 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4246
4247         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4248         accumulator result if it needs sign extension
4249
4250 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4251
4252         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4253
4254 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4255
4256         * device/lib/gbz80/printf.c,
4257         * device/lib/z80/printf.c: removed define for NULL
4258
4259 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4260
4261         * as/xa51/xa_link.c,
4262         * device/examples/ds390/ow390/ad26.c,
4263         * device/examples/ds390/ow390/cnt1d.c,
4264         * device/examples/ds390/ow390/counter.c,
4265         * device/examples/ds390/ow390/ds2480.h,
4266         * device/examples/ds390/ow390/ds2480ut.c,
4267         * device/examples/ds390/ow390/findtype.c,
4268         * device/examples/ds390/ow390/gethumd.c,
4269         * device/examples/ds390/ow390/owllu.c,
4270         * device/examples/ds390/ow390/ownetu.c,
4271         * device/examples/ds390/ow390/swt12.c,
4272         * device/examples/ds390/ow390/swtloop.c,
4273         * device/examples/ds390/ow390/temp.c,
4274         * device/examples/ds390/ow390/temp10.c,
4275         * device/examples/ds390/ow390/thermo21.c,
4276         * device/examples/ds390/ow390/tinilnk.c,
4277         * device/examples/ds390/ow390/tstfind.c,
4278         * device/examples/serialcomm/windows/serial.cpp,
4279         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4280         * device/include/reg51.h: fixed line endings for cvs
4281
4282 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4283
4284         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4285         packRegsForAccUse, packRegisters): new accumulator register
4286         packing algorithm
4287         * support/regression/ports/hc08/support.c (_putchar): suppress
4288         warning of unused variable
4289         * src/SDCCicode.c: added SWAP entry to codeTable
4290
4291 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4292
4293         * device/lib/sprintf.c: forgot to add this file before previous commit
4294
4295 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4296
4297         * src/pic16/gen.c (genPackBits): added operand right in function
4298         parameters, load result directly if p_type is POINTER (that is
4299         called by genNearPointerSet)
4300         * (genUnPackBits): added operand left in function parameters,
4301         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4302         FSR0 if accessing bitfields,
4303
4304 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4305
4306         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4307           _print_format; updated printf, sprintf, vsprintf
4308         * device/include/asm/default/features.h: corrected comment/define
4309         * device/lib/Makefile.in: added sprintf.c
4310         * device/lib/libsdcc.lib: added sprintf module
4311         * device/lib/printf_large.c,
4312         * device/lib/vprintf.c,
4313         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4314           into these 3 files
4315         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4316         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4317         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4318           hc08 test
4319         * support/regression/tests/zeropad.c: define idata as data for hc08
4320
4321 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4322
4323         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4324         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4325         labels are referenced at least once (even if a reference is not found)
4326         * src/hc08/gen.c (emitcode): set isComment flag for comments
4327         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4328         loads), rules 6a..6b (optimize jumps to return)
4329
4330 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4331
4332         * device/lib/acosf.c (acosf),
4333         * device/lib/asinf.c (asinf),
4334         * device/lib/atanf.c (atanf),
4335         * device/lib/ceilf.c (ceilf),
4336         * device/lib/cosf.c (cosf),
4337         * device/lib/coshf.c (coshf),
4338         * device/lib/cotf.c (cotf),
4339         * device/lib/fabsf.c (fabsf),
4340         * device/lib/floorf.c (floorf),
4341         * device/lib/log10f.c (log10f),
4342         * device/lib/logf.c (logf),
4343         * device/lib/sinf.c (sinf),
4344         * device/lib/sinhf.c (sinhf),
4345         * device/lib/sqrtf.c (sqrtf),
4346         * device/lib/tanf.c (tanf),
4347         * device/lib/tanhf.c (tanhf),
4348         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4349         replaced all instances of "reentrant" in the library functions
4350         defined in math.h with this macro.
4351         * support/regression/tests/float_trans.c: reenabled test for hc08
4352
4353 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4354
4355         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4356         erroneously deleted
4357
4358 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4359
4360         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4361         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4362         multi-byte volatile operands are used
4363         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4364         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4365         initialization to area GSINIT0 so that it would always precede
4366         any static initializers in GSINIT
4367         * support/regression/tests/zeropad.c: fixed idata define for hc08
4368         * support/regression/tests/bug-927659.c,
4369         * support/regression/tests/float_trans.c: disabled tests for hc08
4370         pending missing library routines
4371         * .version: increased version number to 2.4.4 - hc08 port now passes
4372         regression tests
4373
4374
4375 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4376
4377         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4378         * Makefile.common.in,
4379         * as/Makefile,
4380         * as/hc08/Makefile.in,
4381         * as/mcs51/Makefile.in,
4382         * as/z80/Makefile.in,
4383         * debugger/mcs51/Makefile.in,
4384         * device/include/Makefile.in,
4385         * device/lib/Makefile.in,
4386         * doc/Makefile,
4387         * link/Makefile,
4388         * link/z80/Makefile.in,
4389         * packihx/Makefile.in,
4390         * sim/ucsim/main_in.mk,
4391         * sim/ucsim/avr.src/Makefile.in,
4392         * sim/ucsim/doc/Makefile.in,
4393         * sim/ucsim/gui.src/serio.src/Makefile.in,
4394         * sim/ucsim/hc08.src/Makefile.in,
4395         * sim/ucsim/s51.src/Makefile.in,
4396         * sim/ucsim/xa.src/Makefile.in,
4397         * sim/ucsim/z80.src/Makefile.in,
4398         * src/Makefile.in,
4399         * support/cpp2/Makefile.in,
4400         * support/librarian/Makefile,
4401         * support/makebin/Makefile: added DESTDIR to the install path proposed
4402         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4403         * doc/sdccman.lyx: added DESTDIR documentation
4404
4405 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4406
4407         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4408         instruction for interrupt handlers, use fast returns when returning
4409         from high priority interrupts
4410
4411 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4412
4413         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4414         code generation
4415         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4416         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4417         bugs, ported much of Bernhard's code from mcs51
4418         * src/mcs51/gen.c (genSend),
4419         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4420         than one when calling a reentrant function
4421         * device/lib/_mullong.c: defined an alternate struct layout for big
4422         endian ports (hc08)
4423
4424 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4425
4426         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4427         test
4428
4429 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4430
4431         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4432         are sane and complete before asking the port its prefered parameter
4433         passing method (fixes bug #1017633)
4434         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4435         and _ret3
4436
4437 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4438
4439         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4440         problem in bitfields >= 8 bits.
4441
4442 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4443
4444         * src/SDCCsymt.c: undid changes that were not meant to be committed
4445
4446 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4447
4448         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4449
4450 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4451
4452         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4453           copied and wrong bit got inverted
4454
4455 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4456
4457         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4458         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4459         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4460         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4461         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4462         assignments to bitfields at known addresses
4463         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4464         reads from bitfields at known addresses
4465         * src/hc08/ralloc.c (packRegisters),
4466         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4467         genhc08Code): optimize pointer get values used as conditionals
4468         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4469         and branch
4470
4471 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4472
4473         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4474         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4475         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4476         as conditionals
4477
4478 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4479
4480         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4481
4482 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4483
4484         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4485         related problems
4486
4487 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4488
4489         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4490
4491 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4492
4493         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4494         mcs51 port
4495
4496 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4497
4498         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4499
4500 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4501
4502         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4503         cases use more compact code.
4504
4505 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4506
4507         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4508
4509 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4510
4511         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4512
4513 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4514
4515         * src/SDCCsymt.h,
4516         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4517         parameter of changePointer() from symbol* to sym_link*
4518         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4519         * src/SDCCsymt.c (compareType): void* type is castable to other
4520         pointers, but not necesarily an exact match.
4521         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4522         is no longer blindly treated as an exact match.
4523         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4524
4525 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4526
4527         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4528
4529 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4530
4531         * src/pic/gen.c,
4532         * src/pic/pcode.c,
4533         * src/pic/ralloc.h,
4534         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4535
4536 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4537
4538         * src/pic/device.c,
4539         * src/pic/device.h,
4540         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4541
4542 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4543
4544         * src/mcs51/gen.c (emitcode): fixed bug #992819
4545
4546 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4547
4548         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4549           there's no need to make it worse
4550
4551 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4552
4553         * src/mcs51/ralloc.c (deassignLR),
4554         * src/ds390/ralloc.c (deassignLR),
4555         * src/hc08/ralloc.c (deassignLR),
4556         * src/z80/ralloc.c (deassignLR),
4557         * src/pic/ralloc.c (deassignLR),
4558         * src/pic16/ralloc.c (deassignLR),
4559         * src/avr/ralloc.c (deassignLR),
4560         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4561         rlivePoint): fixed another part of bug #971834
4562
4563 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4564
4565         * src/z80/main.c: enabled "critical" keyword
4566         * src/z80/mappings.i,
4567         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4568         functions (fixes bug #979646)
4569         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4570
4571 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4572
4573         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4574           such as c:\mydir.
4575
4576 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4577
4578         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4579           doesn't disable too much optimizations
4580
4581 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4582
4583         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4584
4585 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4586
4587         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4588
4589 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4590
4591         * src/pic/gen.c tidied up tabs
4592         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4593         * src/pic/main.c tidied up tabs
4594         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4595         * src/pic/pcoderegs.c tidied up tabs
4596         * src/pic/ralloc.c tidied up tabs
4597
4598 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4599
4600         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4601         to S_FIXED for pic16 port and when symbol is not in level 0,
4602         allocate for S_REGISTER storage class and pic16 port, too,
4603         * src/pic16/device.h: prototype for checkSym,
4604         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4605         * (pic16_assignConfigWordValue): test the value and the mask to
4606         validate that the value is suitable for the configuration word,
4607         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4608         collect extern declared symbols, don't emit symbol twice, check
4609         first if symbol is in publics set first,
4610         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4611         * added command line '--fstack' which enables an experimental
4612         feature for stack access, too buggy to be used yet...
4613         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4614         * (pic16_allocDirReg): when register has storage class S_REGISTER
4615         allocate in pic16_dynAccessRegs,
4616         * device/include/pic16/pic18f????.h: modified configuration word
4617         naming convention, words started as CONFIG0H but should be CONFIG1H
4618
4619 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4620
4621         * device/include/mcs51reg.h: fixed bug 970993
4622
4623 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4624
4625         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4626         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4627         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4628         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4629         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4630         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4631           error/warning numbers,
4632           added function setWarningDisabled()
4633         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4634         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4635           _memcmp.c _memmove.c calloc.c realloc.c free.c
4636         * support/regression/tests/malloc.c: added tests for new functionality
4637         * support/regression/tests/zeropad.c: added tests for truncated initializers
4638           and initialized char arrays starting with '\x0'
4639         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4640
4641 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4642
4643         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4644
4645 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4646
4647         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4648         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4649         peephole 177.e. Thanks to anonymous
4650
4651 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4652
4653         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4654         function isn't used in the source but referenced as a
4655         variable initializer then declare it as extern in .asm file
4656
4657 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4658
4659         * .version: increased version number to 2.4.3
4660
4661         Adding version extension according to ChangeLog CVS revision
4662         * src/Makefile.in (target all): added dependency 'version.h'
4663         * (rule version.h): added rule to create version.h from ChangeLog,
4664         * (rule dep): added dependency version.h,
4665         * src/version.awk: AWK script to create version.h
4666         * src/SDCCdwarf2.c (dwWriteModule),
4667         * src/SDCCglue.c (initialComments),
4668         * src/SDCCmain.c (printVersionInfo): modified to write after
4669         version string the version extension number,
4670         * src/SDCCutil.c: included "version.h"
4671         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4672         number,
4673         * src/SDCCutil.h: added prototype for getBuildNumber
4674
4675         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4676         includeDirsSet, too,
4677         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4678         const char [] is found in function prototype...
4679
4680         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4681         moving to WREG with source is already in WREG,
4682         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4683         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4684         * (aopForSym): stack'ed symbols are partially supported, added
4685         if-clause to support symbols in FARSPACE,
4686         * (sameRegs): added test for AOP_ACC to see if registers are same,
4687         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4688         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4689         * (pic16_popRegFromString): will not allocate a new register if it
4690         doesn't find one by name, bug may have introduced...
4691         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4692         * (genIpush): revived to use pic16 port's stack,
4693         * (genAddrOf): added incomplete case for stack'ed operand,
4694         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4695         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4696         can handle multibyte operands,
4697         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4698         * (pic16initialComments): added message for MPLAB compatibility
4699         mode enabled,
4700         * src/pic16/main.h: prototype for pic16_mplab_comp,
4701         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4702         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4703         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4704         because of increased complexity of procedure,
4705         * (_process_pragma): stack pragma changed to format 'stack pos len',
4706         emit symbol '_stack_end' to conform with gplink,
4707         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4708         to search for register,
4709         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4710         PO_GPR_REGISTER,
4711         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4712         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4713         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4714         case for PO_GPR_REGISTER,
4715         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4716         dies, the new era is ahead !...
4717         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4718         pic16_dynInternalRegs,
4719         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4720         * (pic16_allocDirReg): minor optimizations and bug fixes,
4721         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4722
4723         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4724         load stack and frame pointer with address of 'stack_end' symbol
4725
4726 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4727
4728         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4729         without source code but only variable initializers
4730
4731 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4732
4733         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4734         external are not declared as extern to reduce overhead while linking
4735
4736 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4737
4738         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4739
4740 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4741
4742         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4743           Yee Keat for the patch
4744         * src/SDCCast.c (decorateType): fixed bug #979599
4745         * src/ds390/gen.h: removed local fReturnSizeDS390
4746         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4747         * src/ds390/gen.c (genAnd, genOr, genXor),
4748         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4749
4750 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4751
4752         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4753         add relFilesSet to $3, manipulate $2 to handle linking of object
4754         files without source files in command line,
4755         * device/include/pic16 (all headers): added ID location macros,
4756         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4757         entries for ID location bytes,
4758         * (pic16_assignIdByteValue): NEW,
4759         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4760         added field dumpcalltree to pic16_options_t,
4761         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4762         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4763         emitting rFalseIfx label after check_carry label,
4764         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4765         pic16_emitDIRegs), NEW
4766         * (pic16glue): dump .calltree file when option --calltree found,
4767         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4768         * (_pic16_genAssemblerPreamble): emit ID locations after
4769         configuration registers,
4770         * (pic16_linkCmd): modifications of the link command,
4771         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4772         * (pic16_pCodeInitRegisters): don't init stack registers,
4773         * (pic16_findPrevInstruction): fixed bug,
4774         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4775         bug with immediate registers,
4776         * (buildCallTree): traces stack push and pop,
4777         * (pct2): dump also stack usage for each function,
4778         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4779         * (pic16_allocDirReg): various modifications,
4780         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4781         fixed to 1,
4782
4783 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4784
4785         * src/pic16/pcode.c: removed buggy double colon
4786
4787 2004-07-01 Borut Razem <borut.razem AT siol.net>
4788
4789         * support/scripts/sdcc.nsi: added include/pic16 to setup
4790
4791 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4792
4793         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4794         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4795         target 'clean',
4796         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4797         specific command line arguments. Also added sample lkr script
4798         for placing a variable at a specific memory bank.
4799         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4800         at a specific memory bank,
4801         * (pic16_dump_isection): fixed bug which caused string literals to
4802         be omitted when dumping idata section,
4803         * (pic16_groupRegistersInSection): added code to handle registers
4804         in specific memory banks,
4805         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4806         public, all references are renamed too,
4807         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4808         AOP_DPTR2,
4809         * (pic16_storeForReturn): added case to handle when dest is WREG,
4810         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4811         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4812         pic16_rel_udata, check to see if that register is marked as being
4813         a member of a specific memory bank,
4814         * (pic16_printIvalCharPtr): added code to add string literals either
4815         to code or the idata sections,
4816         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4817         also accept the 'udata' pragma,
4818         * src/pic16/main.h: new structure types sectName and sectSym
4819         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4820         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4821         * (pic16_findPrevInstruction): fixed, it returned nothing,
4822         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4823         instruction combinations,
4824         * (pic16_FixRegisterBanking): heavily reorganised,
4825         * (pic16_AnalyzeBanking): if generating banksel directives is
4826         disabled, then don't call FixRegisterBanking at all,
4827         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4828         completely removed,
4829         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4830
4831 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4832
4833         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4834         Phuah Yee Keat <yk.phuah AT nestac.com>
4835
4836 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4837
4838         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4839         correctly the IVT even if it is relocated to some other location
4840
4841 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4842
4843         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4844         * device/include/pic16/pic18f2220.h: NEW,
4845         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4846         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4847         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4848         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4849         nodefaultlibs, ivt_loc is the location of the interrupt vector
4850         table, and nodefaultlibs signs that default libraries should not be
4851         linked in link stage,
4852         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4853         according to --ivt-loc argument,
4854         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4855         when pragma stack is found,
4856
4857 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4858
4859         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4860         256 (range check), 257 (do while), 258.a-f (bit banging
4861         f.e. on 3-wire SPI bus)
4862
4863 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4864
4865         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4866         variables used exclusively within a loop
4867
4868 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4869
4870         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4871
4872 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4873
4874         * src/SDCClrange.c (computeClash): fixed bug #971834
4875
4876 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4877
4878         * src/mcs51/gen.c (genCmp): fixed bug #975903
4879         * src/hc08/gen.c (operandsEqu),
4880         * src/ds390/gen.c (operandsEqu),
4881         * src/z80/gen.c (operandsEqu),
4882         * src/pic/gen.c (operandsEqu),
4883         * src/pic16/gen.c (operandsEqu),
4884         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4885         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4886
4887 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4888
4889         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4890
4891 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4892
4893         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4894         default case in switch statement,
4895         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4896         to eliminate problem with initialisation of pointers, but problem
4897         still exists,
4898         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4899         * (emitStaticSegment): removed various lines emitting debug info,
4900         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4901         added processor registers for utilizing EEPROM,
4902         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4903         configurable and set 8
4904
4905 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4906
4907         * .version: increased version number to 2.4.2,
4908
4909         Cumulative patch for pic16 port
4910         * src/pic16/device.c: changed scheme to dump initial values for
4911         variables in idata segment, all print_idata* functions were removed,
4912         now the pic16_printIval* will be called,
4913         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4914         * _pic16_printPointerType, pic16_printPointerType,
4915         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4916         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4917         NEW, similar to the respective functions in SDCCglue.c,
4918         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4919         way, emitting hex bytes,
4920         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4921
4922 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4923
4924         * src/avr/ralloc.c (serialRegAssign),
4925         * src/xa51/ralloc.c (serialRegAssign),
4926         * src/pic/ralloc.c (serialRegAssign),
4927         * src/pic16/ralloc.c (serialRegAssign),
4928         * src/hc08/ralloc.c (serialRegAssign),
4929         * src/z80/ralloc.c (serialRegAssign),
4930         * src/ds390/ralloc.c (serialRegAssign),
4931         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4932
4933 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4934
4935         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4936         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4937
4938 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4939
4940         Cumulative patch for pic16 port:
4941         * src/pic16/device.h (typedef PIC16_device) modified fields for
4942         defining microcontrollers,
4943         * src/pic16/device.c: added new info for all devices in Pics16 array,
4944         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4945         to be optimised out by the pCode optimiser,
4946         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4947         specially, bug reported by G.M. Gallant,
4948         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4949         as force'd so that cannot be optimised out by pCode optimiser,
4950         * src/pic16/pcode.c,
4951         * src/pic16/pcodepeeph.c,
4952         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4953         they are disabled by default, but can be enabled explicit with
4954         command argument --denable-peeps, for testing,
4955         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4956         --pomit-ivt in COMPILE_FLAGS
4957
4958 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4959
4960         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4961           compilation on MSVC
4962
4963 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4964
4965         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4966
4967 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4968
4969         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4970         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4971
4972 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4973
4974         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4975         would only assign 0x300001 register.
4976
4977 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4978
4979         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4980         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4981
4982 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4983
4984         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4985         for ds80c400
4986         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4987         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4988         added peephole 254 (left shift), 255 (jump table)
4989
4990 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4991
4992         * device/lib/Makefile.in: removed comment line with model-pic16,
4993         * (target port-specific-objects-pic16): the libraries and objects
4994         are copied to the build directory form the device/lib/pic16/bin
4995         directory
4996
4997         Cumulative patch concerning pic16 port:
4998         * library directory has been re-organized,
4999         * added support for PIC18F1220,
5000         * added headers and library sources for chips 18f1220,18f6520,
5001         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5002
5003         * configuration registers setting has changed, now each supported
5004         device has a complete description of the registers it uses,
5005         * all initialisations are moved to idata sections, these section
5006         can be absolute or relocatable,
5007         * fixed initialisation of codespace variables,
5008         * fixed warning about PCLATU and gpsim,
5009         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5010         * (genAssign): use table reads when assigning from variables in codespace,
5011         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5012         char/int variables placed in codespace,
5013         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5014         registers set in .asm file, no need for --pomit-config-words anymore,
5015         * (pic16glue): some 8051 legacy segments are commented out
5016         (to be removed completely),
5017         * added support for alternative assembler and linker with --asm=
5018         and --link= command line arguments,
5019         * peepholes are disabled automatically in the port, no need to
5020         specify on command line,
5021         * port supports natively char/int/long multiplication, but converts
5022         all divisions to support functions,
5023         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5024         to the file set in variable $2,
5025         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5026         strings in ASCII format and not in hex,
5027         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5028         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5029         allocate proper register if iCodes aren't temporary,
5030
5031 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5032
5033         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5034
5035 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5036
5037         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5038         is commented out
5039
5040 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5041
5042         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5043         computed address is reused
5044         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5045         multi-byte bitfields
5046
5047 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5048
5049         * src/z80/gen.c: (genArrayInit): must check for pointers too
5050
5051 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5052
5053         * support/regression/tests/zeropad.c: never meant to commit the
5054           nestedstruct test: removed, added check for GCC version
5055
5056 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5057
5058         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5059         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5060         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5061           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5062           bugs 928906 and 954082 half-empty initializers
5063         * src/SDCCsymt.h,
5064         * src/SDCCsymt.c (getAllocSize): added for above fix
5065         * src/z80/gen.c (genArrayInit): fixed bug 741044
5066         * support/regression/tests/zeropad.c: added tests
5067
5068 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5069
5070         * src/pic16/device.c (pic16_dump_section): corrected bug which
5071         caused some symbols of the libraries to be misplaced
5072
5073 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5074
5075         * src/pic16/glue.c,
5076         * src/pic16/ralloc.h,
5077         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5078         to fix conflict with pic port
5079
5080 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5081
5082         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5083         externs configuration variables,
5084         * src/pic16/ralloc.h,
5085         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5086         prototype in header, commented out some debug messages
5087
5088 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5089
5090         * src/pic16/glue.c,
5091         * src/pic16/main.c,
5092         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5093         for gpasm COFF object generation. Thanks to D. Hawkins for
5094         his patch info
5095
5096 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5097
5098         * src/ds390/main.c,
5099         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5100         Brock for spotting this)
5101         * src/ds390/gen.c (genEndFunction),
5102         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5103         interrupt handler and critical. Disable push/pop optimizations when
5104         peephole optimizations disabled.
5105
5106 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5107
5108         Updated pic16 library sources and headers.
5109         * device/lib/pic16/pic18f*/ ,
5110         * device/include/pic16/*.h: modified to handle structured SFR
5111         definitions
5112
5113 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5114
5115         * src/port.h (PORT structure): added hook initPaths, now each
5116         port can declare its own default search paths,
5117         which can been seen with the --print-search-dirs option,
5118         see pic16 port for example,
5119         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5120         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5121         * (doPrintSearchDirs): NEW, replaces in a central manner the
5122         printing of search dirs which was split in set*Paths functions,
5123         * (main): added call to port->initPaths and doPrintSearchDirs,
5124         * src/avr/main.c,
5125         * src/ds390/main.c,
5126         * src/hc08/main.c,
5127         * src/izt/i186.c,
5128         * src/izt/tlcs900h.c,
5129         * src/mcs51/main.c,
5130         * src/pic/main.c,
5131         * src/pic16/main.c: modified port structures to reflect addition of
5132         initPaths hook,
5133
5134         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5135         * (pic16_dump_section): for registers in same address reserve memory once,
5136         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5137         to no_banksel,
5138         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5139         result is greater in size than right or left,
5140         * (pic16_genUMult8X8_8): there are some cases where the result can
5141         be 16 bits size, so handle these,
5142         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5143         * (pic16_outBitC): modified to emit pcodes,
5144         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5145         or not,
5146         * (genDivOneByte): implemented algorithm to divide 8-bits,
5147         * (genCmp): uncommented goto, but issues still exist,
5148         * (genAnd): fixed a bug with variables >8bits,
5149         * (genPackBits): optimization added that uses BCF/BSF to change a
5150         single bit,
5151         * (genAssign): fixed bug when assigning floating point literals,
5152         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5153         __sdcc_gsinit_startup label,
5154         * src/pic16/main.c (_pic16_init): removed search directory
5155         initialisations,
5156         * (_pic16_initPaths): NEW, used to initialise search directories,
5157         * (_hasNativeMulFor): support functions for all except char/int
5158         multiplication, and char division,
5159         * (PIC16_port struct): modified entry for native mul support,
5160         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5161         no_banksel option,
5162         * (buildCallTree): call to register_usage is ifdef'ed out,
5163
5164 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5165
5166         * device/include/string.h: applied Stas Sergeev's patch to make this
5167         header file compatible with the preprocessor -Wundef option
5168         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5169         failure (fixes bug #941458)
5170
5171 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5172
5173         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5174         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5175         that the variable, not the function, should be static
5176         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5177         to be consistent with non-literal case
5178
5179 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5180
5181         * src/SDCCast.c (isConformingBody): fixed bug #949967
5182         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5183         convilong): fixed bug #952086
5184
5185 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5186
5187         * src/SDCCmem.c (allocVariables): fixed bug #955321
5188
5189 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5190
5191         * src/hc08/main.c (_hc08_genAssemblerEnd),
5192         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5193         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5194         completely eliminated the use of a temporary file
5195         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5196         when more than one file linked
5197         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5198
5199 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5200
5201         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5202         which fixes bug #543481
5203         * support/regression/tests/bug-751703.c: fixed comments left from a
5204         cut and paste error
5205         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5206         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5207         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5208         scopes
5209         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5210         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5211         are now changed to underscores in moduleName
5212
5213 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5214
5215         * as/mcs51/lkmem.c: better fix for bug #954173
5216
5217 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5218         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5219
5220         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5221         * device/include/c8051f000.h,
5222         * device/include/c8051f120.h,
5223         * device/include/c8051f300.h,
5224         * device/include/c8051f310.h,
5225         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5226         PWM16) and detab'ed
5227
5228 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5229
5230         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5231         and mailing lists, doc'ed --no-peep-comments, removed reference
5232         to knoppix (newest version has no LyX/LaTeX), other minor changes
5233         * src/SDCCglue.c (glue): save 2 bytes stack space with
5234         option --main-return. The ljmp could probably be avoided too
5235
5236 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5237
5238         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5239
5240 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5241
5242         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5243         * src/SDCCopt.c (isLocalWithoutDef),
5244         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5245         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5246         (credit to Maarten Brock for patch #949363, on which this is based)
5247         * support/regression/tests/bug-751703.c: some test cases of extern used
5248         within inner scopes.
5249
5250 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5251
5252         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5253         SPEC_STRUCT
5254         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5255         struct definitions
5256         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5257         dwWriteLabel): fix to create valid debugger symbols even when
5258         the module name has non-alphanumeric symbols in it
5259         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5260         when a variable's allocation has been optimized away
5261
5262
5263 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5264
5265         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5266         * src/hc08/main.c,
5267         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5268         * src/mcs51/main.c,
5269         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5270         * src/ds390/main.c,
5271         * src/z80/gen.c (z80_emitDebuggerSymbol),
5272         * src/z80/main.c,
5273         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5274         * src/pic/main.c,
5275         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5276         * src/pic16/main.c,
5277         * src/avr/gen.c (avr_emitDebuggerSymbol),
5278         * src/avr/main.c,
5279         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5280         * src/xa51/main.c,
5281         * src/SDCCdebug.c (emitDebuggerSymbol),
5282         * src/SDCCdebug.h,
5283         * src/port.h: added a debugger struct to the port struct. Added a
5284         callback for defining debugger symbols
5285
5286         * src/SDCCast.c (createLabel),
5287         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5288         with isitmp = 1
5289         * src/SDCCicode.h,
5290         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5291         iCode back to the ast for the function
5292
5293         * src/hc08/ralloc.c (hc08_assignRegisters),
5294         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5295         unneeded fields from the regs struct.
5296         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5297         pushReg() & pullReg() functions instead of emitcode()
5298
5299         * src/hc08/gen.c (genLabel, genhc08Code),
5300         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5301
5302         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5303         debugger hooks
5304
5305         * src/hc08/gen.c (genEndFunction, genhc08Code),
5306         * src/hc08/gen.h,
5307         * src/mcs51/gen.c (genEndFunction, gen51Code),
5308         * src/mcs51/gen.h,
5309         * src/ds390/gen.c (genEndFunction, gen390Code),
5310         * src/ds390/gen.h,
5311         * src/z80/gen.c (genEndFunction, genZ80Code),
5312         * src/z80/gen.h,
5313         * src/z80/z80.h,
5314         * src/pic/gen.c (genEndFunction, genpic14Code),
5315         * src/pic/gen.h,
5316         * src/pic16/gen.c (genEndFunction, genpic16Code),
5317         * src/pic16/gen.h,
5318         * src/avr/gen.c (genEndFunction, genAVRCode),
5319         * src/avr/gen.h,
5320         * src/xa51/gen.c (genEndFunction, genXA51Code),
5321         * src/xa51/gen.h,
5322         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5323         specific code to cdbFile.c and out of the backend code generators
5324
5325         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5326         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5327         starting address is now 0
5328
5329         * as/hc08/asm.h,
5330         * as/hc08/m08pst.c,
5331         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5332         assembler directive for DWARF support
5333         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5334
5335         * src/src.dsp,
5336         * src/Makefile.in,
5337         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5338
5339 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5340
5341         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5342         and inappropriate peephole optimization in jump tables
5343
5344 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5345
5346         * as/hc08/m08pst.c,
5347         * src/SDCCglue.c: sdccopt works for the hc08 port now
5348
5349 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5350
5351         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5352
5353 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5354
5355         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5356
5357 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5358
5359         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5360         rules
5361         * src/SDCCmain.c,
5362         * src/SDCCglobl.h,
5363         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5364         comments from the peephole optimizer replacement rules
5365         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5366         symbols
5367         * src/SDCCcse.c (updateSpillLocation),
5368         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5369         equivalents
5370         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5371         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5372         objects far pointers
5373
5374 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5375
5376         * src/SDCCsymt.h: a missing part of my last change
5377         * src/pic/ralloc.c (regTypeNum),
5378         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5379
5380 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5381
5382         * src/SDCCicode.h,
5383         * src/SDCCicode.c (aggrToPtrDclType),
5384         * src/SDCCptropt.h,
5385         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5386         ptrPseudoSymConvert),
5387         * src/pic/ralloc.c (regTypeNum),
5388         * src/pic16/ralloc.c (regTypeNum),
5389         * src/hc08/ralloc.c (regTypeNum),
5390         * src/ds390/ralloc.c (regTypeNum),
5391         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5392         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5393
5394 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5395
5396         * link/z80/lkmain.c (afile),
5397         * as/hc08/lkmain.c (afile),
5398         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5399         prevent a pointer problem when a filename has no directory and
5400         no extension specified.
5401
5402 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5403
5404         * link/z80/lkmain.c (afile): allow periods in directory names
5405         * link/z80/lkmain.c (afile),
5406         * as/mcs51/lkmain.c (afile),
5407         * as/hc08/lkmain.c (afile): allow linker script file to have an
5408         extension other than ".lnk"
5409         * link/z80/lklex.c (getfid),
5410         * link/z80/lkmain.c (parse),
5411         * as/mcs51/lklex.c (getfid),
5412         * as/mcs51/lkmain.c (parse),
5413         * as/hc08/lklex.c (getfid),
5414         * as/hc08/lkmain.c (parse): Support comments in the linker script
5415         file on lines by themselves and after filenames
5416
5417 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5418
5419         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5420
5421 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5422
5423         * src/z80/peeph-z80.def: removed some peephole rules that don't
5424         work with multibyte arithmetic (fixed bug #937126)
5425         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5426         to registers and not global variables
5427         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5428         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5429         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5430         checking for assignments not internally generated (fixed bug #931895)
5431         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5432         structure member (fixed bug #930072)
5433
5434 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5435
5436         * src/SDCCmain.c (linkEdit),
5437         * src/hc08/main.c (_hc08_parseOptions),
5438         * as/hc08/Makefile.in,
5439         * as/hc08/aslink.h,
5440         * as/hc08/asm.h,
5441         * as/hc08/m08pst.c,
5442         * as/hc08/lkrloc.c (relr, rele),
5443         * as/hc08/lkarea.c (lnkarea)
5444         * as/hc08/lkmain.c (afile, parse),
5445         * as/hc08/lkelf.c: support for ELF output
5446         * as/hc08/lks19.c (s19),
5447         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5448
5449 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5450
5451         * as/mcs51/lkihx.c: Fixed bug #899105.
5452
5453 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5454
5455         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5456         .dsp files from Unix to DOS.
5457
5458 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5459
5460         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5461         function pointers; we have been compliant for several months now.
5462         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5463         change that was accidently commented out
5464         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5465         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5466         bug #922319
5467
5468 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5469
5470         * src/hc08/gen.c: output of all of the internal debugging information
5471         is now controlled by the D() macro; it is disabled by default
5472
5473 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5474
5475         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5476         harder to keep the same registers during a CAST iCode
5477         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5478         long via int can be done in a single cast, if the signedness is
5479         correct.
5480         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5481         putchar() in tinibios.c in ds390's library
5482
5483 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5484
5485         * src/SDCCast.c (decorateType): fixed bug #898889,
5486         cast result of a literal complement too
5487         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5488         fixed check for bitfields
5489
5490 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5491
5492         * src/SDCCicode.c (geniCodeLogic): made it static,
5493         (geniCodeLogicAndOr): added in order to fix bug #905492,
5494         (ast2iCode): fixed bug #905492
5495         * support/regression/tests/bug-905492.c: added
5496         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5497         (processParms): fixed bug #927659: don't copy parms, this will clear
5498         decorated flag
5499         * support/regression/tests/bug-927659.c: added
5500
5501 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5502
5503         * src/SDCCast.c (addCast): don't cast float to char
5504         * device/lib/libsdcc.lib: added _memmove
5505
5506 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5507
5508         * device/lib/large/Makefile: fixed parallel execution by
5509         replacing `make` by `$(MAKE)`
5510
5511 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5512
5513         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5514         offsets (fixes bug #923936)
5515
5516 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5517
5518         * device/lib/small/Makefile: fixed parallel execution by
5519         replacing `make` by `$(MAKE)`
5520
5521 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5522
5523         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5524
5525 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5526
5527         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5528         * src/regression/Makefile: Regression test was not running.
5529
5530 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5531
5532         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5533         complement if possible
5534         * src/SDCCval.c (valComplement),
5535         * src/SDCCicode.c (operandOperation): fixed complement of literal
5536         * support/regression/tests/onebyte.c (testComplement): added
5537
5538 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5539
5540         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5541         return an optimized tree; actually replace actParm with the new tree
5542         * src/SDCCast.h: added some parantheses to remove side effects
5543         * support/regression/tests/bug-920866.c
5544
5545 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5546         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5547         Bit operands were not being handled properly in the pic14 port.
5548         (now src/regression/add.c passes again).
5549
5550 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5551
5552         * src/SDCC.y (labeled_statement): case and default no longer require
5553         a following statement (RFE #893037)
5554
5555 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5556
5557         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5558         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5559         disabled (fixes bug #916294)
5560         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5561         "mov a,acc"; patch provided by Lenny Story
5562         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5563
5564 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5565
5566         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5567         functions
5568         * src/ds390/gen.c (genFunction, genEndFunction),
5569         * src/ds390/ralloc.c (ds390_assignRegisters),
5570         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5571         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5572         pushed if there are parameters passed on the stack. Also, a cleaner
5573         way to decide if r0/r1 should be pushed/popped. (Together they fix
5574         bug #918693)
5575
5576 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5577
5578         * doc/sdccman.lyx,
5579         * device/lib/mcs51/crtpagesfr.asm,
5580         * device/lib/mcs51/crtxinit.asm,
5581         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5582         to avoid confusion with Si Lab's SFRPAGE register.
5583
5584 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5585
5586         * src/SDCCglue.c (emitMaps): allow public sfr variables
5587         * src/SDCCglue.c (initialComments): include compiler build date
5588         with compiler version and put the timestamp of the generated
5589         assembly file on a serperate line to be less confusing.
5590         * src/port.h: added genInitStartup hook
5591         * src/avr/main.c,
5592         * src/ds390/main.c,
5593         * src/hc08/main.c,
5594         * src/pic/main.c,
5595         * src/pic16/main.c,
5596         * src/xa51/main.c,
5597         * src/z80/main.c: genInitStartup initialize as NULL (default to
5598         historical behaviour)
5599         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5600         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5601         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5602         library instead of hard coding it into the compiler.
5603         * support/regression/ports/mcs51-stack-auto/spec.mk,
5604         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5605         * device/lib/mcs51/Makefile,
5606         * device/lib/small/Makefile,
5607         * device/lib/large/Makefile,
5608         * device/lib/mcs51/crtpagesfr.asm,
5609         * device/lib/mcs51/crtstart.asm,
5610         * device/lib/mcs51/crtxclear.asm,
5611         * device/lib/mcs51/crtxinit.asm,
5612         * device/lib/mcs51/crtclear.asm,
5613         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5614         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5615         and into user configurable files.
5616         * device/lib/clean.mk: clean mcs51 directory too
5617         * support/regression/tests/longlit.c: added static to T1 declaration
5618         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5619         accesses in the initialization code
5620
5621 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5622
5623         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5624         OSCTRIMVAL as noted in bug #916008
5625
5626 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5627
5628         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5629         in loops with multiple exits (reported as incorrect registers
5630         used by Martin Helmling in Sdcc-user list)
5631
5632 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5633
5634         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5635         made ds390 register extensions look less like error messages
5636
5637 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5638
5639         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5640         reported by Adam Wozniak in Sdcc-user list
5641
5642 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5643
5644         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5645         arithmetic optimizations, added debug output
5646
5647 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5648
5649         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5650         * sdcc.spec: updated and split sdcc into 3 rpms
5651         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5652         needed for literals of LEFT_OP and '+'
5653         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5654         introduced RESULT_TYPE_NOPROM
5655         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5656         left shift
5657         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5658         limited promotion to int only for '*'
5659         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5660
5661 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5662
5663         * src/pic16/gen.c (genSkip),
5664         (genc16bit2lit), (gencjneshort): commented out
5665         (is_LitOp): new helper function, checks operand type
5666         (genCmpEq): rewritten
5667
5668 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5669
5670         * support/regression/tests/bug-908454.c: added
5671
5672 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5673
5674         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5675         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5676         (geniCodeCast): cosmetic, don't preserve bit storage class
5677         (geniCodeLeftShift): added promotion
5678         (geniCodeLogic): fixed regression
5679         * src/SDCCsymt.c (computeTypeOr): accept bits too
5680         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5681
5682 2004-03-07  Borut Razem <borut.razem AT siol.net>
5683
5684         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5685
5686 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5687
5688         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5689         version of pic16_genPackRegisters which does not check if ic is a
5690         CAST operator,
5691         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5692         function cause string1.c regression test fails
5693
5694 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5695
5696         * sim/ucsim/configure.in,
5697         * sim/ucsim/configure,
5698         * sim/ucsim/doc/Makefile.in: use docdir
5699         * src/SDCC.y: fixed sbit atrributes
5700         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5701         * src/SDCCast.c (decorateType): |^& need special promotion handling
5702         * src/SDCCast.h,
5703         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5704         * src/SDCCsymt.h (computeType),
5705         * src/SDCCicode.c: computeType() needs op
5706         * src/SDCCsymt.c (checkTypeSanity),
5707         * doc/sddman.lyx: "plain" bitfields are unsigned
5708         * src/SDCCsymt.c (computeTypeOr): added
5709         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5710         |^& ops
5711         * src/SDCCval.c (val*): computeType() needs op
5712         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5713         * support/regression/tests/onebyte.c: added tests for |^&
5714
5715 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5716
5717         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5718         for writing icode into asm output.
5719
5720 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5721
5722         * src/pic16/device.c: added some debug lines enabled
5723         with macro DEBUG_CHECK,
5724         * src/pic16/genarith.c: more debug in genPlus,
5725         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5726         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5727         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5728         * (aopForSym): onStack symbols are re-placed in data memspace,
5729         and onStack flag is cleared,
5730         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5731         copy temporary pcodeop,
5732         * (genPcall): added warning for not updating PCLATU,
5733         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5734         always true for pic16 port,
5735         * (genMultOneWord): NEW, supports integer multiplication,
5736         * (genMult): modified to call genMultOneWord,
5737         * (ifxForOp): added warning when return NULL,
5738         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5739         flag is set before call to operandFromSymbol for implicit
5740         added structures,
5741         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5742         options.intlong_rent are set by default,
5743         * (_hasNativeMulFor): modified to allow port generation of integer
5744         multiplication,
5745         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5746         set regtype to REG_SFR for all registers, restricting seting the
5747         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5748
5749 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5750
5751         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5752         more than 500 times in the regression tests
5753
5754 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5755
5756         * support/Util/SDCCerr.h,
5757         * support/Util/SDCCerr.c,
5758         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5759         enumerator_list),
5760         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5761         for symbol conflicts.
5762         * support/valdiags/tests/enum.c,
5763         * support/valdiags/tests/tentdecl.c,
5764         * support/valdiags/tests/struct.c: expect possible error messages
5765         referring to original symbol definitions.
5766         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5767         * src/SDCCsymt.h,
5768         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5769
5770 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5771
5772         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5773
5774 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5775
5776         * src/pic16/ralloc.c (newReg): fixed bug #908929
5777
5778 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5779
5780         * src/ds390/gen.c: added missing #include "main.h"
5781
5782 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5783
5784         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5785         checking if symbol is already in set,
5786         * src/pic16/device.h: prototype for checkAddSym,
5787         * src/pic16/gen.c: (_G): added entry interruptvector,
5788         * (assignResultValue): removed some commented out lines,
5789         * (genFunction): check for ISR via sym->type, absolute section for
5790         interrupt code is created via a new pBlock, the goto instruction is
5791         placed now correctly at the interrupt vector position, changed all
5792         references from ivec to _G.interruptvector,
5793         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5794         is the interrupt is a high priority one, same for return from ISR,
5795         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5796         externs to calls of checkAddSym,
5797         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5798         pic16_pcode_verbose flag is set,
5799         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5800         * src/pic16/pcoderegs.c: message about how many registers are saved
5801         will only be emitted if pic16_pcode_verbose flag is set,
5802
5803 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5804
5805         * src/ds390/ralloc.h,
5806         * src/ds390/ralloc.c (ds390_regWithIdx),
5807         * src/ds390/gen.c (emitcode),
5808         * src/ds390/main.h,
5809         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5810         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5811         ds390operandCompare, getRegsRead, getRegsWritten,
5812         initializeAsmLineNode): customized instruction size calculation for
5813         ds390, started basis for some register optimizations
5814         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5815         corresponding assembly output
5816         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5817         missing push/pop of r0/r1. Optimized push/pops
5818
5819 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5820
5821         * src/mcs51/main.c (instructionSize): fixed ACALL size
5822         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5823
5824 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5825
5826         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5827         the sorting of rlist with NULL elements
5828         * (print_idataType, print_idata): NEW to create idata sections
5829         * src/pic16/device.h: idataSymSet new variable
5830         * src/pic16/gen.c (genFunction): fixed some bugs in string
5831         comparing, improved the absolute section creation for ISRs,
5832         added FSR0L/FSR0H in registers that are saved in an ISR,
5833         * (genInline): fixed the processing of inline snippets,
5834         now they undergo no process by the peephole optimizer
5835         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5836         are placed in idataSymSet,
5837         * (pic16emitStaticSeg): extern symbols are added in externs,
5838         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5839         switching when aboslute variables are placed in access bank memory
5840         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5841         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5842         commented out with #if,
5843         * (pic16_packRegisters): reintroduce the check for CAST because some
5844         symbols are not correctly handled,
5845         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5846         pCodeInstruction instead of pCode,
5847         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5848         pCodeAsmDir definition,
5849         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5850         directive, then the argument directive is emitted without the leading
5851         tab, hack for inline labels which must be in the first column,
5852         * (compareLabel,pic16_findNextInstruction),
5853         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5854         * (insertBankSwitch): modified for the new pCodeAsmDir,
5855
5856 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5857         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5858
5859         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5860         instance,
5861         * (pushSide): commented out with #if,
5862         * (assignResultValue): fixed some typos in saving
5863         registers,
5864         * (genPcall): FIXED and sync'ed with genCall,
5865         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5866         * (genNearPointerGet): fixed to handle some more cases,
5867         implementation scheme via table reads,
5868         * (genConstPointerGet): modified to access code memory correct,
5869         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5870         and improved to handle some cases
5871         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5872         instead of "RETLW" for init data
5873         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5874         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5875         variables are placed in access bank memory (<0x80 and >=0xf80),
5876         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5877         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5878         TBLWT_POSTDEC,TBLWT_PREINC
5879         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5880         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5881         directives
5882         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5883         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5884         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5885         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5886
5887 2004-02-29  Borut Razem <borut.razem AT siol.net>
5888
5889         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5890         support/Util/findme.h, support/Util/system.h: enhance binary relative
5891         search for lib and include by using findProgramPath()
5892
5893 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5894
5895         * src/SDCCpeeph.h,
5896         * src/SDCCpeeph.c (pcDistance),
5897         * src/port.h,
5898         * src/mcs51/ralloc.h,
5899         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5900         * src/mcs51/main.h,
5901         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5902         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5903         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5904         size calculation port specific, started basis for some register
5905         optimizations
5906         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5907         missing push/pop of r0/r1. Optimized push/pops
5908         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5909         * device/lib/_modsint.c (_modsint),
5910         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5911         and stack version so regression tests pass
5912
5913 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5914
5915         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5916         * src/SDCCast.c (decorateType): catch another small optimization
5917         with '?' operator
5918         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5919         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5920         modified to finally use computeType() all over SDCC,
5921         see Feature Request #877103
5922         * src/SDCCval.h: cosmetic
5923         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5924         valCompare(); regression tested in muldiv.c
5925         * support/regression/tests/muldiv.c (testMod): mod sign follows
5926         dividend only
5927
5928 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5929
5930         * src/SDCCast.c (decorateType): fixed bug #902362
5931         * doc/INSTALL.txt: fixed install instructions for win32
5932
5933 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5934
5935         * device/include/Makefile.in (install): fixed by replacing spaces
5936         by tabs
5937         * doc/README.txt,
5938         * doc/INSTALL.txt: updated for release
5939         * doc/sdccman.lyx: added warning for --xstack being buggy
5940
5941 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5942
5943         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5944         to eliminate build warnings.
5945         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5946
5947 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5948            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5949
5950         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5951         removed -penable-stack, added comment for stack pragma, added
5952         warning for not initializing the stack/frame registers, removed
5953         comment at interrupts section
5954
5955         Stack is made permanent, there is no ability to disable stack usage.
5956         * src/pic16/device.h,
5957         * src/pic16/device.c: removed all references to USE_STACK macro,
5958         * src/pic16/device.c (pic16_dump_section): when no elements in
5959         rlist, free rlist before return,
5960         * (pic16_dump_int_registers): NEW, internal registers are a new set
5961         of general purpose registers reused by each function,
5962         * (checkAddReg): returns 1 if registers is added to set,
5963         * (pic16_groupRegistersInSection): when a registers is of type
5964         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5965         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5966         SRCASECMP macro is moved here from device.c
5967         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5968         PO_PCLATU, PO_PRODL, PO_PRODH,
5969         * (pic16_pCodeOpType, genMinus,
5970         changed compares to "a" register, with AOP_ACC,
5971         * (pic16_genPlus): fixed some bugs and indented properly,
5972         * (pic16_addSign): changed size to size+offset in the MOVWF
5973         instruction,
5974         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5975         multiply 8-bit operand by literal, result is 8-bit,
5976         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5977         multiply 2 8-bit operand, result is 8-bit,
5978         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5979         genUMult8X*_16,
5980         * src/pic16/gen.c: changed accUse to contain WREG only,
5981         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5982         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5983         true, do not use immediate addressing any more unless sym is a
5984         pointer in codespace,
5985         * (aopForRemat): do not use immediate addressing when symbol not in
5986         codespace and when symbol's address is requested,
5987         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5988         accUse size (= 1),
5989         * (aopGet): added case for AOP_ACC and don't return "accumulator
5990         bug" but WREG instead,
5991         * (popGetTempReg): pushes contents of temporary register in stack,
5992         * (popReleaseTempReg): pops contents of temporary register from
5993         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5994         * (pic16_popGet): separated case AOP_ACC to return register WREG
5995         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5996         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5997         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5998         the use of immediate pointers to certain cases only.
5999
6000         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6001         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6002         * (assignResultValue, genCall, genRet): modified to use the new
6003         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6004         genPcall is still broken,
6005         * (genFunction): added code to create 'A' type pBlocks when
6006         interrupt functions are generated, code not extensively tested yet,
6007         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6008         * (genEndFunction): modified so ISRs pop stored registers from stack,
6009         * (genMultOneByte): cleanup,
6010         * (AccRsh): added flag andmask, to and result with appropriate mask,
6011         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6012         * (genDataPointerGet): fixed and reenabled its use,
6013         * (genNearDataPointerGet): bugs fixed,
6014         * (genDataPointerSet): bugs fixed,
6015         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6016         pic16_DumpSymbol, pic16_DumpOp,
6017         * src/pic16/genutils.h: function prototypes for the above functions,
6018         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6019         pointers,
6020         * (pic16emitRegularMap): many many many improvements, but needs a
6021         major cleanup,
6022         * src/pic16/main.c: enable_stack in pic16_options is removed,
6023         * (_pic16_parseOptions): removed command line options -penable-stack,
6024         * (_process_pragma): emit stack symbol only when stack pragma is
6025         processed,
6026         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6027         redirected to FSR0L/FSR0H pair,
6028         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6029         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6030         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6031         for immediates,
6032         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6033         * (dumpPicOptype): NEW,
6034         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6035         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6036         with movff instruction,
6037         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6038         added pic16_int_regs, some packRegsFor* functions are commented out,
6039         because produce errors,
6040         * src/pic16/NOTES: minor modifications
6041
6042 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6043
6044         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6045         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6046         --pack-iram.
6047         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6048         * as/mcs51/lkaomf51.c: fixed bug #895763
6049
6050 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6051
6052         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6053
6054 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6055
6056         * doc/sdccman.lyx: added details about the HC08 storage classes and
6057         interrupts, fixed the register usage info for z80 & gbz80
6058
6059 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6060
6061         * doc/sdccman.lyx: added more pic16 port documentation
6062         * device/include/pic16/: added header pic18fregs.h
6063
6064 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6065
6066         * doc/sdccman.lyx: added Vangelis' contribution
6067
6068 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6069
6070         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6071         extend to the next CALL or PCALL, not just to the next CALL.
6072
6073 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6074
6075         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6076
6077 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6078
6079         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6080         bug #895752 and a better fix for bug #716790
6081
6082 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6083
6084         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6085
6086 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6087
6088         * doc/sdccman.lyx: minor changes, minor changed
6089
6090 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6091
6092         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6093         which can't handle SDCC_NEWONEBYTEOPS,
6094         (geniCodeMultiply): removed conversion from mult to shift for pic14
6095         and pic16
6096
6097 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6098
6099         * src/hc08/gen.h,
6100         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6101         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6102         thus fixing bug #895406
6103
6104 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6105
6106         * device/lib/_modsint.c,
6107         * device/lib/_modslong.c: sign follows divisor only
6108         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6109         signs or signedness can be ignored
6110         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6111         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6112         added optimization for IFX,
6113         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6114         arguments;
6115         reenabled optimization for IFX, which was removed on 2004-01-11
6116         * src/SDCCast.h: added return type IFX
6117         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6118         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6119         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6120         SDCC_OLDONEBYTEOPS selects the old behaviour
6121         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6122         changed again and commented promotion rule
6123         * src/SDCCval.c (valDiv): promotion no longer necessary
6124         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6125         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6126         rewritten
6127         * support/regression/tests/onebyte.c: added
6128
6129 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6130
6131         * gen.c (genInline): reverted to old code for assemnling inline
6132         code because of bug reported James Chadd
6133
6134 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6135
6136         * ralloc.h: missing declarations from previous patch,
6137         seems that patch for ralloc.h was never applied, fixed
6138
6139 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6140            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6141
6142         * pcode.c,
6143         * pcode.h,
6144         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6145         indirect addressing. Marked FSR0 as deprecated
6146         * gen.c (pointerCode): commented out, not needed now
6147         (pic16_popGet2p): new MOVFF helper function
6148         (genGenPointerGet),
6149         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6150         (shiftRLong): removed duplicate debugging info
6151
6152 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6153
6154         * src/ds390/gen.c (genNearPointerGet),
6155         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6156         optimization with bits, but not bitfields.
6157         * src/ds390/ralloc.c (packRegisters),
6158         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6159
6160 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6161
6162         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6163
6164 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6165
6166         * src/SDCCsymt.h,
6167         * src/SDCCicode.c (operandFromSymbol),
6168         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6169         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6170         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6171         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6172         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6173         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6174         bug #892038
6175         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6176         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6177         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6178         * src/SDCCsymt.c (newSymbol),
6179         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6180         enumerator_list),
6181         * src/SDCCval.h,
6182         * src/SDCCval.c (newiList): fixed bug #885705
6183
6184 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6185
6186         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6187         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6188
6189 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6190
6191         * device/include/c8051f120.h,
6192         * device/include/c8051f300.h,
6193         * device/include/c8051f310.h: added/updated header files for Silicon
6194         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6195         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6196         in new section Submitting patches
6197
6198 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6199
6200         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6201         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6202         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6203         genGenPointerSet),
6204         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6205         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6206         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6207         genGenPointerSet),
6208         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6209         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6210         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6211         genGenPointerSet),
6212         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6213         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6214         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6215         genGenPointerSet): fixed bug #892400
6216         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6217         to eliminate build warnings.
6218         * src/SDCCast.c (processParms),
6219         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6220         fixed bug 751859
6221         * support/valdiag/valdiag.py: added GCC to the list of defines active
6222         when compiling with gcc
6223
6224 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6225
6226         * support/Util/SDCCerr.h,
6227         * support/Util/SDCCerr.c,
6228         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6229         with an incomplete type (fixed bug #883734)
6230         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6231
6232 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6233
6234         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6235
6236 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6237
6238         * src/SDCCast.c (decorateType),
6239         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6240         function pointer implementation
6241         * support/regression/tests/funptrs.c: added tests to verify both forms
6242         of function pointers work correctly. Added tests to verify parameters
6243         are passed in the correct order.
6244
6245 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6246
6247         * device.c (regCompare): registers are sorted by ascending
6248         address and increasing size,
6249         * main.c (_pic16_finaliseOptions): removed the declaration
6250         of compiler macro MCU. Now a macro of the format pic18fxxxx
6251         will be defined from the command line
6252
6253 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6254             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6255
6256         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6257         PCOP_RLCF was overwritten!
6258         * gen.c (genSkip): commented out calls to pic16_emitcode,
6259         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6260         * (genlshTwo),
6261         * (genRRC): added debugging info,
6262         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6263         overwritten while shifting,
6264         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6265         overwritten while shifting,
6266         * (AccLsh),
6267         * (AccRsh),
6268         * (shiftLLeftOrResult),
6269         * (shiftRLeftOrResult),
6270         * (shiftRLong),
6271         * (shiftLLong): Implemented with pic16_emitpcode
6272         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6273         * (genLeftShift): Fixed bug, operand for shift by variable always
6274         was "and"ed with 0x0f,
6275         * (genLeftShiftLiteral),
6276         * (genrshTwo),
6277         * (genRightShiftLiteral): added debugging info,
6278         * (genrshFour): added comment,
6279         * (genRightShift): determined signedness from operand "left"
6280         instead of "result"
6281
6282 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6283
6284         * src/SDCCicode.c (geniCodeParms),
6285         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6286         function pointers, fixed function pointer bugs #861242 and #861896
6287
6288 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6289
6290         * device/include/c8051f000.h,
6291         * device/include/c8051f120.h,
6292         * device/include/c8051f300.h: added header files for Silicon
6293         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6294
6295 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6296
6297         * src/SDCCast.c (processParams): added new type flow and restructured
6298         (gatherAutoInit): added new type flow
6299         (addCast): cosmetic changes
6300         (getLeftResultType): added new type flow for array indices, patch
6301         provided by Stas, see FR #877103
6302         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6303         array index patch by Stas
6304         * src/SDCCast.h: added prototype getResultTypeFromType()
6305         * src/SDCCval.h,
6306         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6307         * src/pic/glue.c (pic14emitStaticSeg),
6308         * src/pic16/glue.c (pic16emitStaticSeg),
6309         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6310         for initialization of symbols
6311         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6312         * support/Util/SDCCerr.h:
6313         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6314         * .version: bumped version number to 2.3.8
6315         * device/include/Makefile.in (install),
6316         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6317         avoid warnings
6318
6319 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6320
6321         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6322         Slade Rich fixed an optimization bug
6323         * src/pic/pcodepeep.c,
6324         * src/pic/pcoderegs.c
6325         * doc/Makefile (install): added test for directory
6326
6327 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6328
6329         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6330         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6331         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6332         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6333         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6334         * as/mcs51/asexpr.c (term),
6335         * as/hc08/asexpr.c (term): fixed bug #887146
6336
6337 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6338
6339         * src/z80/gen.c (genMult): handle single byte result product
6340         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6341         DUMMY_READ_VOLATILE (fixed bug #886367)
6342
6343 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6344
6345         * support/regression/tests/libmullong.c: fixed logic, on little endian
6346         hosts we ended without a mullong_wrapper()
6347
6348 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6349
6350         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6351         virus/worm forged address usage.
6352
6353 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6354
6355         Fixed promotion, it should be done on AST level:
6356         * src/SDCCast.c (addCast): added promotion to int
6357         (decorateType): updated call to upCast()
6358         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6359         usualUnaryConversions()
6360
6361 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6362
6363         * support/regression/tests/literalop.c (mulWrapper): Added a
6364         wrapper to remove integer overflow warnings.
6365
6366         * support/regression/tests/float_trans.c: Made work on host.
6367
6368         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6369         location of sz80.
6370
6371         * support/regression/generate-cases.py (main): Changed from inline
6372         to a main method.
6373
6374         * doc/Makefile (install): Changed to depth first to get rid of
6375         missing directory install warning.
6376
6377         * as/Makefile (install-doc): Made work on Mac.
6378
6379 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6380
6381         * src/SDCCast.c: added an additional type flow in decorateType() of
6382         opposite direction, see feature request #860006; it's enabled at runtime
6383         by setting the environment variable SDCC_NEWTYPEFLOW
6384         * src/SDCCast.h: changed prototype of decorateType()
6385         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6386         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6387         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6388         see feature request #877103
6389         * src/SDCCval.c: updated call of decorateType()
6390         (valBitwise): fixed bug #882876
6391         (valMinus): added promotion
6392         (valLogicAndOr): result is unsigned
6393         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6394         * src/SDCCsymt.c (computeType),
6395         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6396         must not cause an unsigned operation
6397         * src/pic/glue (pic14emitRegularMap),
6398         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6399
6400 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6401
6402         * src/pic/pcode.c (PCodeID): commented out left over debug code
6403
6404 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6405
6406         * support/valdiag/tests/overflow.c: added shift tests
6407         * src/pic/device.c,
6408         * src/pic/gen.c,
6409         * src/pic/gen.h,
6410         * src/pic/glue.c,
6411         * src/pic/main.c,
6412         * src/pic/pcode.c,
6413         * src/pic/pcode.h,
6414         * src/pic/pcodepeep.c,
6415         * src/pic/pcoderegs.c,
6416         * src/pic/ralloc.c,
6417         * src/pic/ralloc.h: applied patch from Slade Rich;
6418         added support for multiple code pages and multiple RAM banks on the
6419         PIC 14 port. The ASM files now no longer simply assume all the
6420         code / RAM are in the same page / bank. This means the linker can
6421         safely allocate code/RAM of separate ASM files to different pages/banks.
6422         * doc/sdccman.lyx: added Slade's tips
6423         * src/mcs51/peeph.def: fixed bug #880768
6424
6425 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6426
6427         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6428         * src/SDCCast.c (decorateType): fixed bug #880197
6429
6430 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6431
6432         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6433         getopt.h.
6434
6435         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6436         strtof is not part of C89 and isn't included with Mac OS X.
6437
6438 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6439
6440         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6441         shiftL2Left2Result): fixed bug #879326
6442         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6443         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6444         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6445         address fetch for clr instruction
6446         * device/lib/hc08/_mulint.c: created optimized assembly version
6447         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6448
6449 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6450
6451         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6452         proposed in FR #877103
6453
6454 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6455
6456         * src/SDCCval.c (cheapestVal): added missing checks
6457         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6458         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6459
6460 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6461
6462         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6463         equal operands
6464
6465 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6466
6467         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6468         loaded with the linker search paths (-L arguments) and the libraries
6469         to be linked with the current source (-l arguments). Changes
6470         currently will affect only the pic16 port.
6471         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6472         include path the port specific paths and port specific libraries,
6473         * gplink command now contains the $3 argument,
6474         * src/pic16/device.h,
6475         * src/pic16/device.c,: structure PIC_device is made public and
6476         renamed to PIC16_device, the same for variable Pics which is renamed
6477         to Pics16. Updated all references to them.
6478         * src/pic16/glue.c (pic16glue): corrected bug with code
6479         initialization which bypassed the variable initializations block.
6480
6481         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6482         COMPILE_FLAGS and added the --nostdinc option
6483
6484 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6485
6486         * device/include/mc68hc908jb8.h: Register defs for another member
6487         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6488
6489 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6490
6491         Documenting changes from previous commits.
6492         * configure.in (version 1.56),
6493         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6494         when generating output files to configure the pic16 library,
6495         but now I've commented it out, since gputils aren't installed in the
6496         SF compile farm, so library won't compile
6497
6498         * device/lib/Makefile.in (version 1.56): initially I've added in
6499         target 'all' the prerequestive 'model-pic16' so it compiled the
6500         pic16 library, but now I've commented it out for the same reasons
6501         above,
6502         * added targets 'model-pic16' and 'objects-pic16' to compile the
6503         library
6504         * added target 'port-specific-objects-pic16' to handle the
6505         generated libraries and copy them into the build/ directory
6506         * added target 'clean-intermediate-pic16' to clean intermediate
6507         files into pic16 directory
6508         * in target 'installdirs' added line to create directory pic16 in
6509         the installation path
6510
6511         * device/include/Makefile.in (version 1.11): in target 'install'
6512         added lines to copy all header files to installation path,
6513         * in target 'installdirs' added line create directory for pic16
6514         headers in the installation path
6515
6516 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6517
6518         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6519          a function call
6520
6521 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6522
6523         * configure,
6524         * device/lib/configure.in,
6525         * device/lib/configure: fixed for autoconf 2.57
6526
6527 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6528
6529         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6530         option so that it actually works. Made it specific to the z80, since
6531         the gbz80 doesn't have these kinds of I/O ports.
6532
6533 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6534
6535         * device/include/z180.h,
6536         * device/lib/_memcpy.c,
6537         * device/lib/_memmove.c,
6538         * device/lib/_mulint.c,
6539         * device/lib/ser_ir.c,
6540         * device/lib/ser_ir_cts_rts.c,
6541         * device/lib/_strcmp.c,
6542         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6543         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6544         portmode; added deprecation warning for bank= and protmode= forms.
6545         Also, guard against buffer overflow.
6546         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6547
6548 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6549
6550         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6551         changed interrupt vector table generation to only emit declared vectors.
6552         * device/include/Makefile.in: added missing backslash
6553         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6554
6555 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6556
6557         Mainly changes to support compilation of the device libraries
6558         * src/pic16/device.c: stack is allocated via symbol and not
6559         via literal number. The symbol is placed in the corresponding
6560         position of the data ram
6561         * (pic16_dump_section): relocatable and absolute uninitialized
6562         data are now emitted in sorted order to reduce section naming,
6563         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6564         weren't marked as being in the access bank,
6565
6566 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6567
6568         Added portion of GNU PIC Library under the directory
6569         device/include/pic16 and device/lib/pic16. These files
6570         contain the declarations of SFRs for the PIC18Fxx2 devices.
6571         The directory is initialized via configure from toplevel.
6572
6573 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6574
6575         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6576         the spilllocations to be compared correctly
6577
6578 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6579
6580         * src/SDCCast.c (decorateType): fixed bug introduced today
6581
6582 2004-01-12  Borut Razem <borut.razem AT siol.net>
6583
6584         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6585         doc/sdccman.lyx: upper case pragmas are deprecated
6586
6587 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6588
6589         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6590         in simpler and even better code
6591
6592 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6593
6594         * src/SDCCicode.c (operandOperation): fixed bug #874819
6595         * src/SDCCast.c (decorateType): fixed
6596         char foo (unsigned long ul) { return ul > 0; }
6597
6598 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6599
6600         * doc/sdccman.lyx: Moved and added some sections, small changes
6601         all over. Telling LaTeX to be less strict with word spacing
6602         to better keep the right margin. Changed some notes about
6603         maintainance of the ports in section 3.2.1 - is it OK like this?
6604
6605 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6606
6607         SDCC source changes:
6608         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6609         convilong): modified to inform the pic16 port that builtin functions
6610         are external
6611
6612         PIC16 PORT specific changes:
6613         * src/pic16/device.c pic16_dump_equates() added,
6614         processor registers declared internally by the port are emitted in
6615         the translation as equates,
6616         * src/pic16/gen.c: inline code is passed unprocessed to the
6617         translation,
6618         * (pic16_popGetLit2): fnuction modified to take second operand as
6619         pCodeOp pointer and not as literal,
6620         * (popRegFromIdx): prefixed with pic16_,
6621         * (pic16_popCombine2): modified to receive already allocated pCode
6622         operands,
6623         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6624         * (genFunction): initializes local stack frame and pushes on stack
6625         all the registers used by this function,
6626         * (genEndFunction): restores all registers from stack and restores
6627         stack frame,
6628         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6629         improvements,
6630         * (pic16glue): changed the program startup sequence,
6631         * added new dbName code 'A' for functions placed in absolute section
6632         * src/pic16/main.c: added function attribute _naked,
6633         * added pragma 'code' to place a fnuction at an absolute address,
6634         * added command line arguments --debug-ralloc and --pcode-verbose,
6635         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6636         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6637         * (pic16_newpCodeOpLit2): modified to take the second operand as
6638         pCodeOp pointer,
6639         * (pic16_printpBlock): modified to emit each function in a separate
6640         section,
6641         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6642         UPPER for immediate operands,
6643         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6644         instruction,
6645         * src/pic16/peeph.def: all peepholes with movff are commented out,
6646         because there is a problem in the pcode peep optimizer,
6647         * src/pic16/ralloc.c: the register allocator can now reuse local
6648         function symbols for another function. This saves register usage.
6649         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6650
6651         Added file src/pic16/NOTES with information about program writing on
6652         the current port version.
6653
6654 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6655
6656         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6657         and peephole 252 (array access)
6658
6659 2004-01-09  Borut Razem <borut.razem AT siol.net>
6660
6661         * src/SDCCmain.c : fixed #872250: -l command line defined library
6662           files are scanned before standard library files
6663
6664 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6665
6666         * src/SDCCast.c (decorateType): fixed bug #874046
6667
6668 2004-01-09  Borut Razem <borut.razem AT siol.net>
6669
6670         * support/scripts/sdcc.nsi: remove previous installation
6671
6672 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6673
6674         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6675         bytes for last interrupt vector (mcs51)
6676         * sdcc.spec: fixed typo
6677
6678 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6679
6680         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6681         gen51Code): more efficient parameter receive for --model-large
6682         ("bug" #845294)
6683
6684 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6685
6686         * src/ds390/main.c,
6687         * src/z80/main.c: added missed needLinkerScript flags (more than
6688         one port structure defined in these file)
6689         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6690         bug #795325
6691
6692 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6693
6694         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6695         * src/port.h: added flag needLinkerScript in port->linker
6696         structure to inform whether to create a .lnk file or not,
6697         * src/avr/main.c,
6698         * src/ds390/main.c,
6699         * src/hc08/main.c,
6700         * src/mcs51/main.c,
6701         * src/pic/main.c,
6702         * src/pic16/main.c,
6703         * src/xa51/main.c,
6704         * src/z80/main.c: changed appropriately to configure
6705         needLinkerScript flag
6706         * src/pic/gen.c,
6707         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6708         * src/pic/glue.c: added variable udata_section_name to
6709         override default uninitialized data segment definition for
6710         devices only with SHAREBANK memory (reported from Erik Epetrich)
6711         * (pic14emitOverlay): modified to emit a commented overlay segment
6712         directive when no overlay data exist
6713         * (picglue): modified to emit uninitialized data segment
6714         according to udata_section_name
6715         * src/pic/main.c (_pic14_parseOptions): added command line
6716         options --udata-section-name=[name] to override default
6717         udata definition name
6718         * modified _linkCmd and _asmCmd to include compiler passed
6719         arguments via -W option
6720         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6721         object file from '.rel' to '.o' in port->linker structure,
6722         changed size of fptr from 2 to 3 in port structure
6723
6724 2004-01-07  Borut Razem <borut.razem AT siol.net>
6725
6726         * support/scripts/sdcc.nsi: update PATH
6727         * support/scripts/sdcc.ico: craeted
6728
6729 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6730
6731         * device/include/Makefile.in: fix install
6732         * doc/Makefile: fix install
6733
6734 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6735
6736         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6737         in bug #860505
6738         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6739         how the function variable allocation summary is displayed; also
6740         include information about variables allocated to the overlay
6741         segment
6742
6743 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6744
6745         * as/mcs51/lkmain.c: Help about -Y option
6746         * as/mcs51/lkarea.c: Fixed gcc warnings
6747
6748 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6749
6750         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6751         fixed warning
6752         * support/valdiag/tests/overflow.c: added
6753         * src/SDCCast.c (decorateType),
6754         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6755         LEFT_OP (left shift)
6756
6757 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6758
6759         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6760         (default behaviour).
6761
6762 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6763
6764         A python script to validate compiler diagnostic messages. It can be
6765         used to verify that sdcc complains about bad c source code and
6766         gives a good location of the error.
6767         * support/valdiag/Makefile,
6768         * support/valdiag/valdiag.py,
6769         * support/valdiag/tests/*
6770
6771 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6772
6773         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6774         * src/SDCCsymt.c (newEnumType),
6775         * src/SDCCsymt.h
6776         * support/Util/SDCCerr.c,
6777         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6778         enum related bugs.
6779         * support/regression/tests/enum.c: added test for enum values that
6780         require at least 2 bytes of storage.
6781
6782 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6783
6784         * src/common.h: added ifndef/define/endif macros
6785         around the header file.
6786         Bug reported from Jesus Calvino-Fraga
6787
6788 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6789
6790         * sdcc.spec: updated
6791         * device/include/Makefile.in: don't install CVS directories
6792         * device/lib/Makefile.in: added removal of CVS directories after install
6793         * doc/Makefile: fixed install, added local_icons
6794         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6795         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6796         * src/ds390/gen.c (genRightShift): fixed bug #870788
6797         * src/SDCCast.c (decorateType): fixed bug #870781
6798
6799 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6800
6801         PIC16 port related changes:
6802         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6803         added variable stackPos,
6804
6805         * gen.c: genCall, assignResultValue: added support for
6806         pushing/retrieving function parameters to/from stack,
6807         genFunction,genEndFunction: setup stack frame for the
6808         generated function,
6809         genAddrOf: will be changed according to bug 863624
6810
6811         * added files genutils.c and genutils.h which contain gen*
6812         debugged and optimised functions extracted from gen.c
6813
6814         * glue.c: added variable 'externs' which holds extern symbols,
6815         pic16emitRegularMap: is modified to properly handle relocatable
6816          symbols under the new scheme,
6817         pic16createInterruptVect: is modified
6818         pic16printPublics: is modified to emit 'global' assembler directives,
6819         added pic16_printExterns to print extern symbols,
6820         pic16glue: initializes stack/frame pointer in the beginning of
6821         the assembly output. Temporary hack, will be corrected later,
6822         because gplink yet does not support stack and SDCC does not
6823         yet support a type of crt0.o object to create the final binary.
6824
6825         * Removed many lines that contain 8051 legacy code.
6826         * The code is finally placed under a 'code' directive.
6827         * Added port specific options.
6828
6829         * _process_pragma: simplified since now we do not need *special*
6830         include file to define SFR registers. But a separate header
6831         will be needed. This will be developed later.
6832         * _pic16_parseOptions: added, parses port specific options:
6833         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6834         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6835         --preplace-udata-with=
6836
6837         * _pic16_setDefaultOptions: modified to initialize section names,
6838         but hack is temporarly out of order since it needs improvement.
6839         * _pic16_genAssemblerPreamble: configuration words are emitted by
6840         their address instead of their name. This part is incomplete and
6841         supports only the 18Fxx2 devices. Other devices will emit an error
6842         during assembly since they do not contain the same set of config
6843         registers
6844         * _pic16_genIVT: is modified,
6845
6846         * pcode.c: added definitions for some hardware registers that are needed
6847         for stack support
6848         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6849         All PCI entries are updated. Now LFSR is supported.
6850         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6851         * added pic16_newpCodeOpLit2 to support instructions with
6852         two literal arguments
6853         * pic16_pCode2str: corrected code that emits assembler instructions
6854         with two literal operands and those that have an access bit modifier
6855         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6856         this fixes a bug which caused some labels to be lost, when an
6857         assembler directive was added, i.e. banksel,
6858         * pic16_FixRegisterBanking: improved logic that causes the insertion
6859         of bank switching,
6860         * InlineFunction: functions that are called once, are not any more
6861         inlined. This can be a port option in the future,
6862
6863         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6864
6865         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6866         hold the corresponding uninitialized symbols,
6867         * pic16_allocProcessorRegister: registers have explicit marked the
6868         accessBank field,
6869         * pic16_allocInternalRegister: registers are explicit marked as
6870         not used,
6871         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6872         processing list, so bit registers were lost,
6873         *
6874
6875         * ralloc.h: added field 'accessBank' and original symbol operand
6876         in register definition,
6877         * removed the field isMapped from register definition,
6878
6879         ** Several functions have been removed from various sources:
6880         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6881         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6882         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6883         pic16_assignRelocatableRegisters
6884
6885         ** others have been introduced:
6886         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6887         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6888
6889 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6890
6891         * support/scripts/inc2h.pl: changed definition of BIT_AT
6892         to emit 'sbit at' instead of 'bit at'. This was a request.
6893
6894         PIC16 port related preliminary changes:
6895         * gen.c: prefixed function popRegFromString with
6896         pic16_ and all references to it corrected
6897         * pcode.c: all pic16_pc_* hardware registers prefixed
6898         with underscore (_),
6899         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6900         * ralloc.c: newReg(): when register is REG_SFR then
6901         set address to rIdx,
6902         pic16_allocProcessorRegister(): marks register wasUsed=0
6903         pic16_writeUsedRegs(): added a call to assign processor
6904         registers via pic16_assignFixedRegisters
6905
6906 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6907
6908         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6909         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6910         variables in unused register banks.  Also the SSEG is placed
6911         wherever there is enough space for it, and IDATA can be anywhere
6912         in internal RAM.  For now compile using -Wl-Y[stack_size].
6913         The mem file is different for this option as well, since it
6914         makes no sense of talking about DSEG lenght.
6915
6916 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6917
6918         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6919         in certain cases, e.g. when ROM assignment, patch provided
6920         from Albert den Haan.
6921
6922 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6923
6924         Many signedness and type propagation fixes:
6925         * src/SDCCicode.c: made geniCodeCast() static
6926         replaced SPEC_ by IS_ (cosmetic)
6927         (operandOperation): fixed div and mod operation
6928         (usualBinaryConversions): added support for promotion of char
6929         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6930         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6931         (geniCodeAdd): an array index will stay unsigned, even if promoted
6932         from char to int
6933         (geniCodeArray): ditto
6934         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6935         * src/SDCCsymt.c (computeType): added more support for char;
6936         promotion of char is selectable by promoteCharToInt, fixed signedness
6937         for all cases
6938         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6939         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6940         * src/SDCCval (val*): replaced signedness calculation by
6941         computeType()
6942         rearranged if-branches (cosmetic)
6943         (valShift): added warning W_SHIFT_CHANGED
6944         (valCompare): fixed problem with different types
6945         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6946         * support/regression/tests/literalop.c: added many cases
6947         * support/regression/tests/ast_constant_folding.c: changed finally to
6948         'unsigned int'
6949         * .version: new year, new version: 2.3.7
6950         * src/SDCCmain.c (main): applied patch #866468
6951         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6952         provided by Scott Bronson
6953         * doc/sdccman.lyx: updated documentation for sdcdb
6954         updated and added chapter tips
6955
6956 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6957
6958         * src/SDCCsymt.h: missing from yesterday's commits
6959
6960 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6961
6962         * src/SDCC.y (struct_or_union_specifier),
6963         * support/Util/SDCCerr.c,
6964         * support/Util/SDCCerr.h: verify that struct & union tags are used
6965         as declared.
6966
6967 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6968
6969         * src/SDCCglobl.h: missing from yesterday's commits
6970
6971 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6972
6973         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6974         sft_attributes, struct_declaration, parameter_declaration,
6975         type_name, start_block, declaration_list),
6976         * src/SDCC.lex (check_type): support redefinition of typedef names
6977
6978 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6979
6980         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6981         aligned xdata arrays. Erik helped me with the if clause.
6982
6983 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6984
6985         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6986         warning
6987
6988 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6989
6990         * src/SDCCast.h,
6991         * src/SDCCast.c (newAst_),
6992         * src/SDCCicode.h,
6993         * src/SDCCicode.c (ast2iCode, newiCode),
6994         * src/SDCCglobl.h,
6995         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6996         expr, statement, expression_statement, selection_statement,
6997         iteration_statement, expr_opt, jump_statement): foundation for tracking
6998         sequence points
6999         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7000         point code too)
7001
7002 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7003
7004         * support/Util/SDCCerr.c,
7005         * src/SDCCast.h,
7006         * src/SDCCast.c (createCase, createDefault, decorateType),
7007         * src/SDCClabel.c (labelUnreach),
7008         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7009         to error messages.
7010         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7011         (with thanks to Stas Sergeev)
7012         * device/include/time.h,
7013         * device/lib/time.c (CheckTime): suppress unreachable code warning
7014
7015 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7016
7017         * src/SDCCast.c (createIvalCharPtr),
7018         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7019         bug #753752)
7020         * support/regression/tests/nullstring.c: tests for these two bugs
7021
7022 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7023
7024         * support/Util/SDCCerr.h,
7025         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7026         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7027         about storage class and 'at' used inside struct or union
7028         * src/SDCCBBlock.c (iCodeFromeBBlock),
7029         * src/SDCCcse.c (ifxOptimize),
7030         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7031         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7032         printIval, emitStaticSeg, emitOverlay),
7033         * src/SDCClabel.c (deleteIfx),
7034         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7035         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7036         gatherAutoInit, processParms),
7037         * support/Util/SDCCerr.h,
7038         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7039         reporting for post-parse errors.
7040
7041 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7042
7043         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7044         implicit casts via union; they don't work on big endian systems
7045         (possible fix for bug #861138)
7046
7047 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7048
7049         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7050         * src/mcs51/main.c: fixed the fix for bug #737001
7051
7052 2003-12-15  Borut Razem <borut.razem AT siol.net>
7053
7054         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7055
7056 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7057
7058         * support/makebin/makebin.c: put output in binary mode
7059
7060 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7061
7062         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7063         xdata and data memory on startup. Set the environment variable
7064         SDCC_NOGENRAMCLEAR to disable this.
7065         * src/mcs51/peephole.def,
7066         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7067         (allows non-interrupt and interrupt code to safely compete for a resource
7068         without the non-interrupt code having to disable interrupts)
7069
7070 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7071
7072         * src/SDCCicode.c (geniCodeAdd),
7073         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7074         with valFromType if type might be a pointer and host is big endian).
7075         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7076         types, not just integer types.
7077         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7078         multiply defined with mismatching "at" address.
7079
7080 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7081
7082         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7083         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7084         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7085         with embedded nulls (fixed bug #753752)
7086
7087 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7088
7089         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7090         Apparently this did not see much testing (endless loop)
7091
7092 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7093
7094         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7095
7096 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7097
7098         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7099         gracefully handle NULL memmap pointers
7100
7101 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7102
7103         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7104         instead of deleting the iCode when an operand is volatile
7105         * src/z80/gen.c (genDummyRead),
7106         * src/mcs51/gen.c (genDummyRead),
7107         * src/ds390/gen.c (genDummyRead),
7108         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7109         not just IC_RIGHT
7110         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7111         * src/SDCC.y: fixed bug #850420
7112
7113 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7114
7115         Applied z80 i/o port patch from Peter Townson and fixed some operators
7116         to better handle operands in A register.
7117         * device/include/z180.h
7118         * src/SDCC.y
7119         * src/SDCCglue.c
7120         * src/z80/gen.c
7121         * src/z80/gen.h
7122         * src/z80/main.c
7123         * src/z80/peeph-z80.def
7124         * src/z80/peeph.def
7125         * src/z80/z80.h
7126
7127 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7128
7129         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7130
7131 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7132
7133         * device/lib/hc08/_mullong.c: Removed extra #endif
7134
7135 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7136
7137         * sim/ucsim/hc08.src/inst.cc,
7138         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7139         carries from x to h
7140         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7141         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7142         * device/include/stdarg.h: fixed varargs for hc08
7143         * device/lib/Makefile.in,
7144         * device/lib/hc08/Makefile,
7145         * device/lib/hc08/_mulint.c,
7146         * device/lib/hc08/_mullong.c: fixed some endian problems
7147
7148 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7149
7150         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7151         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7152         * device/lib/_gptrget.c,
7153         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7154
7155 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7156
7157         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7158         * src/SDCCast.c (astErrors): fixed bug #846007
7159         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7160
7161 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7162
7163         * src/SDCCast.c (decorateType): disabled a transformation I added in
7164         revision 1.188 (access to fields of a structure at an absolute address);
7165         it breaks with bitfields, extern declarations, and gcse analysis.
7166         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7167         could be assigned through a pointer, so don't complain.
7168         * src/SDCCast.c (astErrors),
7169         * src/SDCCast.h,
7170         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7171
7172 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7173
7174         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7175         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7176         output of __config directives, since gpasm now supports them
7177         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7178         pre-processor macro, i.e. -DMCU=p18f452
7179         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7180         and modified to handle 'cast' icode similarly to '=' icode
7181         * src/pic16/device.h (typedef struct PIC_device): added field
7182         'extMIface' to indicate that chip has external memory interface
7183         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7184         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7185         18F8720
7186
7187 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7188
7189         * src/SDCC.y (pointer): fixed bug #846006
7190         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7191         * src/SDCCast.c (decorateType): fixed bug #846009
7192         * src/ds390/peeph.def,
7193         * src/ds390/gen.c (genAnd, genOr),
7194         * src/mcs51/peeph.def,
7195         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7196
7197 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7198
7199         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7200         * src/SDCCdflow.c
7201         * src/SDCCcse.c
7202         * src/SDCCcse.h
7203         * src/SDCCBBlock.h
7204         * src/SDCCBBlock.c
7205
7206 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7207
7208         fixed bug #845089
7209         * src/SDCCbitv.h,
7210         * src/SDCCbitv.c: added function to free a bitvector
7211         * src/SDCClrange.h,
7212         * src/SDCClrange.c: added function to recompute the liveranges
7213         * src/avr/ralloc.c,
7214         * src/ds390/ralloc.c,
7215         * src/hc08/ralloc.c,
7216         * src/mcs51/ralloc.c,
7217         * src/pic/ralloc.c,
7218         * src/pic16/ralloc.c,
7219         * src/xa51/ralloc.c,
7220         * src/z80/ralloc.c: recompute the liveranges after register packing
7221
7222 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7223
7224         * src/SDCCloop.c (newInduction): fixed bug #845630
7225
7226 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7227
7228         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7229         inadvertantly left behind from my 2003-11-12 change
7230
7231 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7232
7233         Updated headers I neglected to commit yesterday.
7234         * src/SDCClrange.h,
7235         * src/SDCCicode.h
7236
7237 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7238
7239         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7240         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7241         * src/SDCCopt.c (eBBlockFromiCode),
7242         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7243         the creation of the key hash table from the sequencing so it can be used
7244         earlier (for some GCSE bug fixes still pending)
7245
7246 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7247
7248         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7249         * support/regression/tests/addsub.c: testing genPlus shortcut
7250
7251 2003-11-15  Borut Razem <borut.razem AT siol.net>
7252
7253         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7254
7255 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7256
7257         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7258         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7259         ordering is immaterial.
7260         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7261
7262 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7263
7264         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7265         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7266         (SIGSEV) of bug #840381
7267         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7268         unlink new file before rename if new and old filenames are the same)
7269
7270 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7271
7272         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7273         uninitialized variables) for the mcs51. Set environment variable
7274         SDCC_GENRAMCLEAR to test.
7275         xdata initialization slightly shorter
7276
7277 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7278
7279         * src/SDCCsymt.h,
7280         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7281         #838241 & 780691 (basicly the same bug)
7282         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7283         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7284
7285 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7286
7287         * src/SDCCmain.c (linkEdit): "fix" #834252
7288
7289 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7290
7291         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7292         * src/SDCCast.h,
7293         * src/SDCC.y: fixed bug #819403
7294
7295 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7296
7297         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7298         the reentrant attribute.
7299         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7300         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7301         simulation
7302         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7303         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7304         erroneously reduced to a literal.
7305         * src/hc08/ralloc.c (packRegisters, rematStr),
7306         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7307         some cases
7308
7309 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7310
7311         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7312         * doc/sdccman.lyx: changed from 'article' to 'book'
7313         * doc/Makefile: readded test_suite_spec and cdbfileformat
7314
7315 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7316
7317         * device/include/stdlib.h: include malloc.h to comply with ANSI
7318         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7319
7320 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7321
7322         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7323         * doc/clean.mk: also remove *.out files
7324         * doc/sdccman.lyx: some additions, larger top/bottom margins
7325
7326 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7327
7328         * src/SDCC.y: fixed bug #837365
7329         * support/regression/tests/bitopcse.c
7330         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7331         a symbol (might be valop instead)
7332         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7333         * device/lib/clean.mk: added hc08 to the cleaning list
7334
7335 2003-11-04  Borut Razem <borut.razem AT siol.net>
7336
7337         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7338           made 2003-11-04
7339         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7340           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7341           malloc is declared in standard stdlib.h
7342
7343 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7344
7345         * device/lib/hc08/Makefile: need to clean .rel not .o files
7346         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7347
7348 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7349
7350         * src/port.h,
7351         * src/hc08/main.c,
7352         * src/mcs51/main.c,
7353         * src/ds390/main.c,
7354         * src/z80/main.c,
7355         * src/avr/main.c,
7356         * src/pic/main.c,
7357         * src/pic16/main.c,
7358         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7359         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7360         tests (which uses the port's oclsExpense function)
7361         * src/SDCC.y,
7362         * src/SDCCast.c,
7363         * src/SDCCicode.c,
7364         * src/hc08/gen.c,
7365         * src/ds390/gen.c,
7366         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7367
7368 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7369
7370         * src/SDCCcse.c (ifxOptimize),
7371         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7372         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7373         deleting the IFX iCode.
7374         * src/hc08/ralloc.c: reduced unneeded slocs
7375         * src/hc08/gen.c: fixed bug in asmopToBoolean
7376
7377 2003-11-04  Borut Razem <borut.razem AT siol.net>
7378
7379         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7380           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7381           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7382           transferred to configure
7383
7384 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7385
7386         Use headers defined in the C[++] standards:
7387         * sim/ucsim/gui.src/serio.src/fileio.cc
7388         * sim/ucsim/gui.src/serio.src/frontend.cc
7389         * sim/ucsim/gui.src/serio.src/main.cc
7390         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7391         * support/Util/NewAlloc.c
7392         * as/hc08/lklibr.c
7393         * as/mcs51/lklibr.c
7394         * as/z80/aslist.c
7395         * as/z80/assym.c
7396
7397 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7398
7399         * Added MSVC projects for hc08 assembler and linker:
7400         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7401         /as/hc08/link_hc08.dsp
7402
7403 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7404
7405         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7406
7407 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7408
7409         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7410
7411 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7412
7413         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7414
7415 2003-10-31  Borut Razem <borut.razem AT siol.net>
7416
7417         * support/cpp2/cpplib.h,
7418           support/cpp2/cpplib.c,
7419           support/cpp2/cpplex.c,
7420           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7421           to switch _asm block preprocessing on / off. Default is
7422           #pragma preproc_asm +
7423
7424 2003-10-31  Borut Razem <borut.razem AT siol.net>
7425
7426         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7427           when outputting comment blocks (when executed with -C option) and
7428           _asm (SDCPP specific) blocks
7429
7430 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7431
7432         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7433
7434 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7435
7436         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7437
7438 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7439
7440         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7441         * src/SDCCast.c (decorateType): fixed bug #832664
7442
7443 2003-10-31  Borut Razem <borut.razem AT siol.net>
7444
7445         * support\cpp2\cpplex.c: fixed for SDCPP:
7446           comments(when executed with -C option) and _asm blocks
7447           were included even if they where in skipped #if block.
7448           Applied solution from GCC cpp 3.3.2
7449
7450 2003-10-31  Borut Razem <borut.razem AT siol.net>
7451
7452         * src/SDCC.lex: sdcc now understands both formats:
7453           '# <line_number> <file_name>' and
7454           '#line <line_number> <file_name>'
7455         * support/cpp2/cppmain.c: sdcpp now generates the standard
7456           '# <line_number> <file_name>' instead of former
7457           '#line <line_number> <file_name>'
7458
7459 2003-10-30  Borut Razem <borut.razem AT siol.net>
7460
7461         * support/cpp2/cpphash.h,
7462         * support/cpp2/cpplib.h
7463         * support/cpp2/cpplex.c,
7464         * support/cpp2/cppmain.c,
7465         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7466
7467 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7468
7469         Fixed a number of problems revealed by bug #827883.
7470         * src/SDCCloop.c (loopInvariants): Spill location of the
7471         result operand should be recomputed if extracted from
7472         a loop. Also, don't extract assignments of an iTemp
7473         from a literal.
7474         * src/SDCCast.c (isConformingBody): loop reversal should
7475         not occur if the control variable is involved with a
7476         relational operator.
7477
7478 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7479
7480         * .version: bumped to 2.3.6 to reflect the big improvements
7481         made by Erik and Klaus. Thanks!
7482
7483 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7484
7485         Replaced the livrange code.
7486         * src/SDCClrange.c: added new LR code
7487         * src/SDCCloop.c,
7488         * src/SDCCBBlock.h: removed remainig parts from old LR code
7489         * src/ds390/ralloc.c,
7490         * src/ds390/gen.c: minor fixes to make it work with new code
7491
7492 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7493
7494         * as/hc08/asm.h,
7495         * as/hc08/lkrloc.c,
7496         * src/hc08/gen.c,
7497         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7498         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7499         (tweaked fix for bug #818696)
7500
7501 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7502
7503         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7504
7505 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7506
7507         * src/SDCCmain.c,
7508         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7509         * src/mcs51/gen.c (gencjneshort),
7510         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7511         more efficient (per Scott Bronson's suggestion)
7512
7513 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7514
7515         Extended the semantics of the critical keyword to include
7516         individual statements. See RFE #827755 and #799831
7517         * src/SDCC.y
7518         * src/SDCCicode.c
7519         * src/SDCCopt.c
7520         * src/SDCCast.c
7521         * support/Util/SDCCerr.c
7522         * support/Util/SDCCerr.h
7523         * src/mcs51/gen.c
7524         * src/ds390/gen.c
7525         * src/hc08/gen.c
7526
7527 2003-10-19  Borut Razem <borut.razem AT siol.net>
7528
7529         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7530
7531 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7532
7533         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7534         Fixed bug #818696
7535         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7536         and predecrement operand is displayed
7537
7538 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7539
7540         * src/SDCCval.c (valMinus): fixed bug #826041
7541
7542 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7543
7544         Some hc08 related updates that I missed earlier
7545         * sim/ucsim/stypes.h
7546         * support/regression/ports/hc08/spec.mk
7547
7548 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7549
7550         New target "hc08" for the Motorola 68hc08 family of micros
7551
7552         * configure
7553         * configure.in
7554         * Makefile
7555         * src/hc08/*
7556         * src/SDCCmain.c
7557         * src/port.h
7558         * sim/ucsim/hc08.src/*
7559         * sim/ucsim/configure.in
7560         * src/ucsim/configure
7561         * sim/ucsim/packages_in.mk
7562         * as/hc08/*
7563         * as/Makefile
7564         * device/include/mc68hc908qy.h
7565         * device/lib/hc08/*
7566         * device/lib/Makefile.in
7567         * support/regression/ports/hc08/*
7568         * support/regression/Makefile
7569
7570 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7571
7572         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7573         regression test
7574         * src/ds390/gen.c (genCast): fixed bug #821957
7575
7576 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7577
7578         * device/lib/logf.c: "fixed" overlay bug
7579         * support/regression/ports/host/spec.mk: added m library
7580         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7581         * support/regression/tests/float_trans: added (for Eric)
7582
7583 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7584
7585         * src/mcs51/gen.c (genCpl): fixed bug
7586         http://sf.net/mailarchive/message.php?msg_id=6263915
7587
7588 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7589
7590         * src/SDCCast.c (decorateType): added extended constant folding
7591         * src/SDCCsymt.c (computeType): cleanup
7592         * src/SDCCval.c (valShift): minor optimization
7593         * support/regression/tests/ast_constant_folding.c: added
7594
7595 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7596
7597         * src/SDCCmain.c: removed some unintended changes
7598
7599 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7600
7601         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7602         * src/z80/gen.c: fixed part of bug #817589
7603         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7604
7605 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7606
7607         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7608         * src/SDCCcflow.c
7609         * src/SDCCcse.c
7610         * src/SDCCdflow.c
7611         * src/SDCClabel.c
7612         * src/SDCClrange.c
7613         * src/SDCCmem.c
7614         * src/SDCCopt.c
7615         * src/SDCCpeeph.c
7616         * src/SDCCset.c
7617         * src/avr/ralloc.c
7618         * src/ds390/ralloc.c
7619         * src/izt/ralloc.c
7620         * src/mcs51/ralloc.c
7621         * src/pic/ralloc.c
7622         * src/pic16/ralloc.c
7623         * src/xa51/ralloc.c
7624         * src/z80/ralloc.c
7625         * src/z80/gen.c: removed unused label "release:"
7626
7627 2003-10-06  Borut Razem <borut.razem AT siol.net>
7628
7629         * src/SDCC.lex: removed definition of unused variables
7630           save_optimize and save_options
7631
7632 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7633
7634         * clean.mk: removed '=' in "-maxdepth=1"
7635         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7636         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7637
7638 2003-10-06  Borut Razem <borut.razem AT siol.net>
7639
7640         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7641           my_unput() replaced by unput()
7642
7643 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7644
7645         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7646         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7647         type-punned pointer will break strict-aliasing rules"
7648         Old LR behaviour is again default; Klaus' LR can be choosen by
7649         defining the environment variable LRKLAUS
7650         * src/SDCCBBlock.h
7651         * src/SDCCloop.c
7652         * src/SDCClrange.c
7653         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7654         * clean.mk: fixed removal of files in bin/CVS/
7655         * device/lib/clean.mk: fixed removal of directories small and large
7656         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7657         * src/SDCCicode.c,
7658         * src/SDCCval.c: removed superflous test for pedantic
7659
7660 2003-10-05  Borut Razem <borut.razem AT siol.net>
7661
7662         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7663           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7664           message "unmatched #pragma SAVE and #pragma RESTORE"
7665
7666 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7667
7668         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7669           assembly, critical functions, atomic, nojtbound)
7670
7671 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7672
7673         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7674         * src/SDCCBBlock.h
7675         * src/SDCCloop.c
7676         * src/SDCCloop.h
7677         * src/SDCClrange.c
7678
7679 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7680
7681         * src/z80/gen.h,
7682         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7683         * src/mcs51/gen.h
7684         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7685         * src/ds390/gen.h
7686         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7687         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7688         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7689
7690 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7691
7692         * src/z80/gen.c (genRet): fixed bug #524753
7693         * src/z80/gen.c (genCast): fixed internal error on cast from
7694         pointer to long
7695         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7696         fix for bug #477835 to the z80
7697         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7698         for tracking iCodes in the peephole optimizer for z80
7699
7700 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7701
7702         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7703         the other part of bug #814548
7704         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7705
7706 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7707
7708         * src/SDCCcse.c: fixed part of bug #814548
7709
7710 2003-09-28  Borut Razem <borut.razem AT siol.net>
7711
7712         * src/asm.c: rewrite of printILine() to use temporary file instead
7713           a pipe
7714         * src/xa51/main.c: commented out declaration of int rewinds
7715
7716 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7717
7718         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7719
7720 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7721
7722         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7723         * src/asm.c (printILine): Fixed bug #811015
7724
7725 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7726
7727         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7728         freeing.
7729
7730 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7731
7732         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7733         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7734         to correctly handle general case of AOP_PAIRPTR
7735         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7736
7737 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7738
7739         * src/mcs51/ralloc.c (fillGaps),
7740         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7741         register positioning bug)
7742
7743 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7744
7745         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7746
7747 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7748
7749         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7750         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7751         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7752         (ralloc doesn't intentionally do this now, but perhaps later)
7753         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7754         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7755         register positioning bugs (Fixed bug #762602 and #795325)
7756         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7757         (Fixed bug #808779)
7758         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7759         lines that --i-code-in-asm generates
7760
7761 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7762
7763         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7764         trying to fclose a FILE* that was already closed.
7765
7766 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7767
7768         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7769         of const struct should be treated as if const themselves)
7770
7771 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7772
7773         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7774
7775 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7776
7777         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7778         Unix (/n) and DOS (/r/n) line terminations.
7779
7780 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7781
7782         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7783         bug #613775
7784
7785 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7786
7787         * src/mcs51/gen.c (genFunction, genEndFunction),
7788         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7789         and restore of EA so that stack offsets to parameters are
7790         correct when using both critical and reentrant/stack-auto.
7791         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7792         size (can be triggered in error if sloc is shared between
7793         different sized objects)
7794         * device/include/float.h: fixed macros to explicitly use
7795         unsigned long where needed
7796
7797 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7798
7799         Feature req. 799831: added code to allow nesting of critical functions
7800         * src/mcs51/gen.c (genFunction, genEndFunction)
7801         * src/ds390/gen.c (genFunction, genEndFunction)
7802
7803 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7804
7805         * src/SDCCsymt.c (sclsFromPtr),
7806         * src/SDCCsymt.h,
7807         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7808         support for standard C idiom of memory mapped variables; for
7809         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7810         to xdata int at 0x1234 tempvar = 1.
7811         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7812         provided by Akiya ISHIDA
7813
7814 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7815
7816         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7817         * src/SDCCval.c (constVal): added reduction from int to char
7818         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7819         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7820         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7821         to ignore the sign
7822         * support/regression/tests/shifts.c: fixed
7823
7824 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7825
7826         * src/z80/gen.c (genXor): Fixed bug #805445
7827
7828 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7829
7830         Fixed bug #621531 (const & volatile confusion in the type chain).
7831         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7832         refer to the const or volatile state of the pointer itself.
7833
7834         * src/SDCCast.c
7835         * src/SDCCglue.c
7836         * src/SDCCicode.c
7837         * src/SDCCsymt.c
7838         * src/SDCCval.c
7839         * src/SDCC.y
7840         * src/SDCCsymt.h
7841         * src/pic/gen.c
7842         * src/pic/ralloc.c
7843         * src/pic16/gen.c
7844         * src/pic16/ralloc.c
7845         * support/regression/tests/const.c
7846
7847 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7848
7849         When checking for duplicated modules, use absolute paths
7850         instead of relative paths.  Files changed:
7851
7852         * as/mcs51/lklib.c
7853         * link/z80/lklib.c
7854
7855 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7856
7857         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7858
7859 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7860
7861         * device/include/string.h: added size_t typedef, changed
7862         prototypes to use size_t, eliminated separate reentrant and
7863         non-reentrant declarations, added _memmove declaration
7864         * device/lib/_memcpy.c: changed to use size_t instead of int,
7865         changed /4 to >>2 to avoid division library call
7866         * device/lib/_memcmp.c,
7867         * device/lib/_memset.c,
7868         * device/lib/_strncat.c,
7869         * device/lib/_strncpy.c,
7870         * device/lib/_strncmp.c: changed to use size_t instead of int
7871         * device/lib/_memmove.c: new file (fixed bug #772294)
7872         * device/lib/Makefile.in: added _memmove.c
7873         * device/lib/z80/asm_strings.s: fixed bug #772290
7874         * support/regression/tests/bitfields.c: attempt to fix host assertion
7875         failure on amd64-unknown-linux2.2
7876
7877 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7878
7879         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7880         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7881         * as/z80/asmain.c (main): fixed bug #801766
7882
7883 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7884
7885         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7886         compilers
7887
7888 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7889
7890         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7891         reported in bug #800609
7892
7893 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7894
7895         * Top header beautifications in src/pic16 directory:
7896           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7897           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7898           pcoderegs.h, ralloc.c, ralloc.h
7899         * main.c: added top header and GPL license notice
7900         * pcode.c: fixed the if-conditional warning
7901
7902 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7903
7904         * device/lib/_mullong.c: replaced int by short for gcc
7905
7906 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7907
7908         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7909         and JUMPTABLE iCodes properly now (worked by accident before)
7910         * src/mcs51/gen.c (leftRightUseAcc),
7911         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7912         iCode properly now. Use getSize instead of nRegs since a & b
7913         aren't part of the nRegs tally.
7914
7915 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7916
7917         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7918         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7919           before instructions that use the _STATUS register
7920
7921 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7922
7923         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7924         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7925         fetching of the pointer
7926         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7927         copied from genNearPointerSet()
7928         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7929         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7930         If they pop r0/r1 they must be called in the opposite order than aopOp().
7931         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7932         (resp. --stack-auto), prepared for --xstack
7933
7934 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7935
7936         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7937
7938 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7939
7940         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7941         these ports have their own __sdcc_external_start()
7942
7943 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7944
7945         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7946         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7947         type for bits was changed. It resulted in bit variables becoming
7948         global, which is not permitted in PIC 14 assembly output.
7949
7950 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7951
7952         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7953
7954 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7955
7956         Z80 and MCS51 linkers complaint if a public symbol is defined
7957         in more than one library module:
7958
7959         * as/mcs51/lklib.c
7960         * link/z80/lklib.c
7961         * as/mcs51/Makefile.in
7962
7963 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7964
7965         A few small changes that speed up the peephole optimizer.
7966
7967         * src/SDCCpeeph.c
7968
7969 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7970
7971         Try to make the peephole optimizer smarter by maintaining
7972         an association between the assembly source code and the
7973         iCodes that originated them. Put this information to use
7974         with a new peephole rule condition "notVolatile" so that
7975         the rules can be aggressive yet still safe.
7976
7977         * src/SDCCpeeph.c
7978         * src/SDCCpeeph.h
7979         * src/mcs51/gen.c
7980         * src/mcs51/peeph.def
7981
7982 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7983
7984         Fixed bug #741761
7985
7986         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7987         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7988         if the left or right operand symbols have the accuse flag set.
7989
7990 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7991
7992         Changed the type of the result of the ! (NOT) operator to char;
7993         previously it returned the same type as the source. This allows
7994         us to eliminate all the genFloatNot functions (all of its target
7995         implementations were very buggy) since !float can use the same
7996         code as !long now.
7997
7998         * src/SDCCicode.c (ast2iCode): ! returns char
7999         * src/mcs51/gen.c (genNot, genNotFloat),
8000         * src/ds390/gen.c (genNot, genNotFloat),
8001         * src/z80/gen.c (genNot, genNotFloat),
8002         * src/pic/gen.c (genNot, genNotFloat),
8003         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8004
8005 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8006
8007         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8008         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8009            during interrupts. Ensure WSAVE is located at a shared bank address.
8010         2. Fixed page selection in some places
8011         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8012            the registers name strings.
8013         4. Fixed "signed / unsigned compare" compiler warnings.
8014         5. The PIC port manages its own allocation of the general purpose
8015            registers, but makes no attempt to reuse them. As a result when
8016            compiling it soon runs out of general purpose registers. Some
8017            additional code was added to the files pcode.c and device.c to walk
8018            through the function call tree and rename the registers so that they
8019            get reused.
8020
8021         * src/pic/device.c
8022         * src/pic/gen.c
8023         * src/pic/glue.c
8024         * src/pic/pcode.c
8025         * src/pic/pcode.h
8026         * src/pic/ralloc.c
8027         * src/pic/ralloc.h
8028         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8029         genPlus() & genMinus() when the result is the same as left or right
8030
8031 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8032
8033         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8034
8035 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8036
8037         Made bitfield a distinct type from bit so that bitfields
8038         convert as per ANSI C and bits retain their traditional
8039         boolean style behaviour. Implemented bitfield support in
8040         the z80 port.
8041
8042         * src/SDCCsymt.h,
8043         * src/SDCCsymt.c,
8044         * src/SDCCast.c,
8045         * src/cdbFile.c,
8046         * src/mcs51/gen.c,
8047         * src/ds390/gen.c: bit v bitfield split
8048         * src/z80/gen.c: New support for bitfields
8049         * support/regression/tests/bitfields.c: reenabled z80,
8050         added more tests
8051
8052 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8053
8054         Rules 246.x, 247.x relate to bitfields, the others speed up
8055         access to xdata mapped I/O devices.
8056
8057         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8058
8059 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8060
8061         Cleaned up genPackBits and genUnpackBits and added two helper
8062         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8063         for literal assignments in genPackBits (thanks to Frieder for
8064         reminding me).
8065
8066         * src/mcs51/gen.c
8067         * src/ds390/gen.c
8068
8069 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8070
8071         Fixed bug #748310 (pointer to function type mishandled when the
8072         function name is omitted). Also fixed a SIGSEGV when a function
8073         attribute (reentrant, etc) is used on a non-function or on a
8074         function but misplaced before the parameter list.
8075
8076         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8077         bug #748310
8078         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8079         * support/Util/SDCCerr.h,
8080         * support/Util/SDCCerr.c: Added func attr misuse error msg
8081
8082 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8083
8084         Fixed bug #787649 by anonymous
8085         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8086         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8087
8088 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8089
8090         Fixed numerous bitfield problems.
8091
8092         * src/SDCC.y: More bitfield related error checking
8093         * src/SDCCsymt.h,
8094         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8095         * support/Util/SDCCerr.h,
8096         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8097         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8098         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8099         * support/regression/tests/bitfields.c: tests added
8100
8101 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8102
8103         Made the constant following the "interrupt" keyword optional. If
8104         omitted, the function will not automatically be given an entry
8105         in the interrupt vector table (similar to #pragma NOIV, but
8106         less syntacticly kludgy). The interrupt number is also now
8107         range checked. Also fixed a bug in the high order bit example
8108         in the manual.
8109
8110         * src/SDCC.y
8111         * src/SDCCmem.c
8112         * src/SDCCglue.c
8113         * src/SDCCsymt.h
8114         * support/Util/SDCCerr.c
8115         * support/Util/SDCCerr.h
8116         * doc/sdccman.lyx
8117
8118 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8119
8120         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8121         * src/SDCCicode.c (operandOperation): rewritten some ops
8122         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8123         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8124         other type
8125         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8126         be re-activated by defining REDUCE_LITERALS)
8127         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8128         unsigned, but are signed by default
8129         * src/SDCCval.c (constVal): rearranged
8130         * src/SDCCval.c (valMod): preliminary fix
8131         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8132         * support/regression/literalop.c: added, work in progress
8133
8134 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8135
8136         Generate warnings for useless declarations like "char data;"
8137         that don't do what new users expect.
8138
8139         * src/SDCC.y
8140         * support/Util/SDCCerr.h
8141         * support/Util/SDCCerr.c
8142
8143 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8144
8145         * src/SDCCval.c (valMult): fix overflow detection of negative int
8146
8147 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8148
8149         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8150
8151         Changes to support big endian targets:
8152
8153         * src/ports.h
8154         * src/SDCCglue.c
8155         * src/avr/main.c
8156         * src/ds390/main.c
8157         * src/izt/i186.c
8158         * src/mcs51/main.c
8159         * src/pic/main.c
8160         * src/pic16/main.c
8161         * src/xa51/main.c
8162         * src/z80/main.c
8163
8164 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8165
8166         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8167         * device/lib/time.c: fixed warning "integer overflow in expression"
8168
8169 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8170
8171         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8172         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8173         constants are unsigned; added recognition of "u" flag for unsigned
8174         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8175         * src/SDCCval.c (valDiv, valMod): fixed signdness
8176         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8177         signedness of modulo, left and right shift
8178         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8179         * support/Util/SDCCerr.h: added warning W_INT_OVL
8180         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8181         * src/SDCCast.c (ast_print): improved output of constants
8182
8183 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8184
8185         Fixed some warnings when building with MSVC:
8186
8187         * as\mcs51\asdata.c
8188         * as\z80\asdata.c
8189         * as\mcs51\asm.h
8190         * as\z80\asm.h
8191         * link\z80\aslink.h
8192         * link\z80\lkdata.c
8193         * link\z80\lkeval.c
8194         * link\z80\lkgb.c
8195         * link\z80\lkihx.c
8196         * link\z80\lks19.c
8197         * link\z80\lksym.c
8198         * support\cpp2\cpplib.c
8199         * src\ds390\gen.c
8200         * src\mcs51\gen.c
8201
8202 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8203
8204         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8205
8206 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8207
8208         * support\librarian\clean.mk: Do not remove Makefile.
8209         * support\librarian\Makefile: added.
8210
8211 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8212
8213         Added librarian to MSVC build:
8214         * all.dsp
8215         * sdcc.dsw
8216         * support\librarian\librarian.dsp
8217
8218         'configure' not needed for librarian, removed:
8219         * support\librarian\configure
8220         * support\librarian\configure.in
8221         * support\librarian\config_in.h
8222         * support\librarian\Makefile.in
8223
8224         Hopefully these ones built the librarian and the rest of sdcc properly:
8225         * Makefile
8226         * Makefile.common.in
8227
8228         Messed up 'configure', so revert to previous version:
8229         * configure
8230         * configure.in
8231
8232 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8233
8234         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8235         there, while the mantissa of a double is "only" 53 bits wide.
8236
8237 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8238
8239         Adding sdcclib to the build.  MSVC project coming soon.
8240         Files added/changed:
8241
8242         * support\librarian\clean.mk
8243         * support\librarian\configure
8244         * support\librarian\configure.in
8245         * support\librarian\config_in.h
8246         * support\librarian\Makefile.bcc
8247         * support\librarian\Makefile.in
8248         * support\librarian\sdcclib.c
8249         * Makefile.bcc
8250         * Makefile
8251         * Makefile.common.in
8252         * configure
8253         * configure.in
8254
8255 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8256
8257         Linker now complaints if linked modules have conflicting options, for
8258         example, one compiled using --model-large and another one compiled with
8259         --model-small.  The following files were modified:
8260
8261         * as\mcs51\asdata.c
8262         * as\mcs51\aslink.h
8263         * as\mcs51\asm.h
8264         * as\mcs51\asmain.c
8265         * as\mcs51\asout.c
8266         * as\mcs51\i51pst.c
8267         * as\mcs51\lkdata.c
8268         * as\mcs51\lklibr.c
8269         * as\mcs51\lkmain.c
8270         * as\z80\asdata.c
8271         * as\z80\asm.h
8272         * as\z80\asmain.c
8273         * as\z80\asout.c
8274         * as\z80\z80pst.c
8275         * link\z80\aslink.h
8276         * link\z80\lkdata.c
8277         * link\z80\lklibr.c
8278         * link\z80\lkmain.c
8279         * src\SDCCglue.c
8280
8281 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8282
8283         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8284         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8285
8286 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8287
8288         * src/z80/mappings.i: fix _mul[us][int,long] entries
8289
8290 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8291
8292         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8293
8294 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8295
8296         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8297         * support/regression/tests/bitopcse.c: added
8298         fixed warning:
8299         * src/avr/gen.c:
8300         * src/pic/gen.c:
8301         * src/pic16/gen.c:
8302         * src/z80/gen.c:
8303         * src/xa51/gen.c:
8304
8305 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8306
8307         added support for new library format to z80, gbz80 linkers:
8308         *link/z80/aslink.h
8309         *link/z80/lklex.c
8310         *link/z80/lklib.c
8311         *link/z80/lklist.c
8312
8313 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8314
8315         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8316         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8317
8318 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8319
8320         added DUMMY_READ_VOLATILE:
8321         * src/SDCC.y:
8322         * src/avr/gen.c:
8323         * src/xa51/gen.c:
8324         * src/z80/gen.c:
8325         * src/pic/gen.c:
8326         * src/pic16/gen.c:
8327         * src/mcs51/gen.c:
8328         * src/ds390/gen.c:
8329         * src/SDCCcse.c (algebraicOpts): many improvements
8330         * src/SDCCcse.h: removed algebraicOpts()
8331         * src/SDCCicode.c (picDummyRead): added
8332
8333 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8334
8335         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8336         "Insufficient space in data memory".
8337
8338 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8339
8340         * src/mcs51/gen.c: fixed bug #771358
8341         * src/z80/gen.c: fixed bug #759087
8342
8343 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8344
8345         * src/pic16/glue.c: minor cleanup by Vangelis
8346
8347 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8348
8349         * device/include/regc515c.h: fixed #758477
8350         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8351         * device/lib/_gptrput.c: saved a few bytes
8352         * my tab spacing is 8, yours too?)
8353         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8354         * device/lib/serial.c: process RX bytes earlier than TX bytes
8355         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8356
8357 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8358
8359         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8360
8361 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8362
8363     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8364
8365 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8366
8367         * device/lib/Makefile.in: bad fix, reverted to 1.43
8368
8369 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8370
8371         * device/lib/Makefile.in: added missing z80 object files
8372
8373 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8374
8375         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8376         pic16 progress by Vangelis:
8377         * src/SDCCglobl.h:
8378         * src/SDCCmain.c:
8379         * src/pic/Makefile:
8380         * src/pic:
8381         * pic/Makefile:
8382         * pic16/device.c:
8383         * pic16/device.h:
8384         * pic16/gen.c:
8385         * pic16/gen.h:
8386         * pic16/genarith.c:
8387         * pic16/glue.c:
8388         * pic16/main.c:
8389         * pic16/pcode.c:
8390         * pic16/pcode.h:
8391         * pic16/pcodepeep.c:
8392         * pic16/peeph.def:
8393
8394 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8395
8396     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8397
8398 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8399
8400     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8401     added gbz80 build to MSVC project.
8402     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8403     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8404     from 8051 stuff and setup so it links using a .lnk file.
8405
8406 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8407
8408     * support/librarian/sdcclib.c: sdcc librarian.
8409     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8410     with sdcclib.
8411
8412 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8413
8414     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8415
8416 2003-07-02  Borut Razem <borut.razem AT siol.net>
8417
8418         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8419         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8420         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8421         src/xa51/main.c, src/z80/main.c:
8422         virtualization of glue() function: each port has it's own glue function,
8423         which is accessed by do_glue function pointer in PORT.general structure
8424
8425 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8426
8427         * DS800C400 fun, improved ROM interface and tinibios.
8428
8429 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8430
8431         * More support for DS80C400. Now includes beginning of interface to ROM.
8432
8433 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8434
8435         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8436
8437 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8438
8439         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8440
8441 2003-06-19  Borut Razem <borut.razem AT siol.net>
8442
8443         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8444
8445 2003-06-19  Borut Razem <borut.razem AT siol.net>
8446
8447         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8448         fixed Z80 port - crt0.o: cannot open.
8449
8450 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8451
8452         * support/Util/MySystem.c (merge_command): revert bad fix
8453
8454 2003-06-18  Borut Razem <borut.razem AT siol.net>
8455
8456         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8457
8458 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8459
8460         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8461         option --use-stdout sends errors to stdout instead of stderr.
8462
8463 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8464
8465         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8466
8467 2003-06-15  Borut Razem <borut.razem AT siol.net>
8468
8469         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8470         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8471         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8472         fixed width array of pointers replaced with sets;
8473         multiple include and lib paths ared transferred to preprocessor and linker
8474         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8475         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8476         fixed width array of pointers
8477         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8478         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8479         fixupPath(), getPathDifference()
8480         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8481         fixed width array of pointers
8482
8483 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8484
8485         * src/pic16/ralloc.c: fix warnings
8486         * src/pic16/pcode.c: fix warning
8487
8488 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8489
8490          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8491         know all the details, but essentially this set of changes enable
8492         the pic16 port to generate movff instructions and generate assembler
8493         directives,
8494         * src/SDCCmain.c:
8495         * src/pic16/gen.c:
8496         * src/pic16/glue.c:
8497         * src/pic16/pcode.c:
8498         * src/pic16/device.c:
8499         * src/pic16/main.c:
8500         * src/pic16/pcode.h:
8501         * src/pic16/pcoderegs.c:
8502         * src/pic16/ralloc.c:
8503         * src/pic16/ralloc.h:
8504
8505 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8506
8507         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8508         added option --vc, so sdcc errors and warnings are compatible with
8509         Microsoft Visual Studio.
8510
8511 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8512
8513         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8514           device/lib/libfloat.lib: added atof function.
8515
8516 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8517
8518         * doc/sdccman.lyx: updated to Lyx 1.3
8519         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8520         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8521         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8522
8523 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8524
8525         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8526
8527 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8528
8529         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8530           additions to the "related tools/documentation" section
8531
8532 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8533
8534         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8535
8536 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8537
8538         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8539         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8540
8541 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8542
8543         * doc/sdccman.lyx: fix double dash and other minor things
8544         * doc/Makefile: fix double dash
8545
8546 2003-05-28  Karl Bongers(patches from Martin Helmling)
8547         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8548           condition and ignore commands.
8549
8550 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8551
8552         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8553           is in parts still quite out of date, I did changes as far as I felt makes sense
8554           for a non-native english speaker.
8555           Please feel free to add to the manual or to correct my changes.
8556         * doc/Makefile: undid touching the date of intermediate tex files.
8557
8558 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8559
8560         * doc/sdccman.lyx: Manual has an index now
8561
8562 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8563
8564         Finalize muluint/mulsint and mululong/mulslong merging:
8565         * device/lib/_mulint.c
8566         * device/lib/_mullong.c
8567         * device/lib/gbz80/mul.s
8568         * device/lib/gbz80/stubs.s
8569         * device/lib/z80/mul.s
8570         * device/lib/z80/stubs.s
8571         * src/SDCCsymt.c (initCSupport)
8572
8573 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8574
8575         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8576         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8577           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8578           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8579           instead of /Zm500.
8580
8581 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8582
8583         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8584           the regression tests I'm not brave enough to enable 245.b, 245.c
8585         * doc/sdccman.lyx: added latex preamble for hyperref package.
8586           Using pdflatex this will give you a hyperlinked pdf file with
8587           bookmarks. (prepend '%' before /usepackage if this breaks something)
8588
8589 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8590
8591          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8592
8593 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8594
8595         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8596
8597 2003-05-21    <johan AT balder>
8598
8599         * src/SDCCglue.c (printIval): fixed bug #739934
8600
8601 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8602
8603         Applied patch from bug 737905 (renamed yylineo to mylineno):
8604         * src/altlex.c
8605         * src/SDCCast.c
8606         * src/SDCglobl.h
8607         * src/SDCC.lex
8608         * src/SDCCsymt.c
8609         * src/SDCCval.c
8610         * src/pic16/pcode.c: Cleaned warnings
8611         * src/pic16/pcodeflow.c: Cleaned warnings
8612         * src/pic16/pcoderegs.c: Cleaned warnings
8613
8614 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8615
8616         * src/pic16/pcode.c: Cleaned warnings
8617         * src/pic16/pcodepeep.c: Cleaned warnings
8618         * src/pic16/ralloc.c: Cleaned warnings
8619
8620 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8621
8622         * doc/sdccman.lyx: fixed bug 739745
8623         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8624
8625 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8626
8627         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8628         it can be defined with CFLAGS when running configure
8629         * src/SDCCmain.c: fixed compiling + linking with object files
8630
8631 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8632
8633         * configure.in: configure for pic16 port,
8634             added --disable-pic16-port
8635         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8636         * src/SDCCmain.c: linkOptions is changed to set *,
8637             added if/endif conditional macros to remove options help
8638             messages from optionsTable when a port is not configured, added
8639             support for the PIc16 port in the ports table, when executing
8640             the compiler with no port specified on command line, a default
8641             port is selected with the new macro DEFAULT_PORT which is
8642             defined in port.h, in setDefaultOptions() linkOptions is removed
8643             from initialization assignment, since now it is a set,
8644             parseCmdLine uses setParseWithComma for linkOptions, in
8645             linkEdit() linkOptions are accessed with new function indexSet()
8646             which returns the i'th item of a set variable. See SDCCset.c, in
8647             linkEdit() when calling buildCmdLine(), added linkOptions as
8648             last argument. Now users can pass arguments to gplink via the
8649             -Wl option, main() uses pic16glue() to glue up pic16 programs
8650         * src/SDCCpeeph.c: various changes to support pic16
8651         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8652             return the i'th item of the set
8653         * src/SDCCset.h: added function prototype for indexSet()
8654         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8655         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8656         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8657             added macro DEFAULT_PORT
8658         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8659         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8660             generated
8661         * src/pic16/glue.c: commented out some error producing lines
8662         * src/pic16/main.c: __config directives are commented out to stop
8663             gpasm complaining and test the linkage with gplink, _linkCmd and
8664             _asmCmd changed to be more gplink and gpasm friendly
8665         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8666             produced an error when parsed, peep rule 12 is added to utilize
8667             movff, but it is commented out since the pCode does not support
8668             yet a command with 2 address arguments
8669
8670 2003-05-18    <johan AT balder>
8671
8672         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8673         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8674 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8675
8676         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8677   Added feature to script commands from file.
8678
8679 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8680
8681         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8682         * src/SDCCutil.c: include ctype.h for win32
8683
8684 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8685
8686         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8687
8688 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8689
8690         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8691   Fixed so you can set breakpoints prior to run, run does not stop
8692   on entry now.  Add tbreak.  Other enhancements and fixes for use
8693   with ddd.
8694
8695 2003-05-12  Borut Razem <borut.razem AT siol.net>
8696
8697         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8698
8699 2003-05-11  Borut Razem <borut.razem AT siol.net>
8700
8701         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8702         the path of bin directory, so that PATH is the only env. variable, which has to be set
8703         in case of standard installation.
8704         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8705         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8706         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8707
8708 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8709
8710         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8711         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8712         temp files are in the port dir; clean the gen/test directory when
8713         generating new test.c
8714         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8715         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8716         * support/regression/tests/zeropad.c: added
8717
8718 2003-05-09    <johan AT balder>
8719
8720         * src/SDCCglue.c: fixed bug #597940
8721
8722 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8723
8724         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8725   cache sfr, optimize next,step, fix off by one sourceline,
8726   support ddd list function.
8727         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8728
8729 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8730
8731         * support/regression/HTMLgen.py: added compare_s2f()
8732         * support/regression/Makefile: redo 1.27
8733         * support/regression/generate-cases.py: redo 1.5
8734
8735 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8736
8737         * support/regression/tests/float.c: workaround 33 bit hex constant
8738         * support/regression/tests/simplefloat.c: fix division for host
8739
8740 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8741
8742         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8743         that tame's the PIC's over-aggressive optimizer.
8744
8745 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8746
8747          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8748          support for MSVC.
8749
8750 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8751
8752         Initial support for DS80C400. "Hello world" runs on TINIm400
8753         (with polled I/O).
8754
8755 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8756
8757          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8758          * Some notes on ddd usage added in debugger/README
8759          Martin Helmling adding more features and fixes for ddd GUI debugger.
8760          Code added for nexti, stepi, up, down, and other adjustments.
8761
8762 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8763
8764         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8765         * src/pic/peeph.def Added two rules to optimize carry manipulation
8766         * src/pic/* removed debug printfs
8767
8768 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8769
8770         * debugger/mcs51/cmd.c: added header newalloc.h
8771
8772 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8773
8774         * as/Makefile: new EXEEXT
8775         * as/z80/Makefile: remove trailing slash of BUILDIR
8776         * as/z80/clean.mk: new EXEEXT
8777         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8778         * support/cpp2/Makefile.in: new EXEEXT
8779         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8780
8781 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8782
8783         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8784         EXEEXT was introduced to fix all related problems with targets
8785         "clean", "install" and "uninstall"; a couple of further flaws
8786         especially with "clean" have been fixed too
8787         * as/mcs51/Makefile.in
8788         * as/mcs51/clean.mk
8789         * as/z80/Makefile
8790         * Makefile
8791         * clean.mk
8792         * debugger/mcs51/Makefile.in
8793         * debugger/mcs51/clean.mk
8794         * link/z80/Makefile
8795         * link/z80/Makefile.in
8796         * link/z80/clean.mk
8797         * link/Makefile
8798         * packihx/Makefile.in
8799         * packihx/clean.mk
8800         * sim/ucsim/Makefile
8801         * sim/ucsim/clean.mk
8802         * sim/ucsim/avr.src/Makefile.in
8803         * sim/ucsim/avr.src/clean.mk
8804         * sim/ucsim/s51.src/Makefile.in
8805         * sim/ucsim/s51.src/clean.mk
8806         * sim/ucsim/xa.src/Makefile.in
8807         * sim/ucsim/xa.src/clean.mk
8808         * sim/ucsim/z80.src/Makefile.in
8809         * sim/ucsim/z80.src/clean.mk
8810         * sim/ucsim/main_in.mk
8811         * sim/ucsim/packages_in.mk
8812         * sim/ucsim/gui.src/Makefile.in
8813         * sim/ucsim/gui.src/serio.src/Makefile.in
8814         * sim/ucsim/gui.src/serio.src/clean.mk
8815         * src/Makefile.in
8816         * src/clean.mk
8817         * support/cpp2/Makefile.in
8818         * support/cpp2/clean.mk
8819         * support/makebin/Makefile
8820         * support/makebin/clean.mk
8821         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8822         * doc/sdccman.lyx: --program-suffix no longer needed
8823
8824 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8825
8826          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8827          Martin Helmling added support for ddd GUI debugger.
8828          Code added to display assembly, set variables, and other commands
8829          to interface to ddd.
8830
8831 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8832
8833         * as/Makefile: fix target clean
8834         * as/clean.mk: fix target clean
8835         * as/z80/clean.mk: fix target clean
8836
8837 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8838
8839         * Makefile.common.in: added  AT EXEEXT AT
8840         * configure.in: removed all mingw32 stuff
8841         * configure: rebuilt from configure.in
8842         * doc/sdccman.lyx: updated section "installation"
8843         * support/scripts/sdcc_mingw32: adapted to configure
8844         * support/scripts/sdcc_cygwin_mingw32: added
8845
8846 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8847
8848         * src/pic Added object file support for the PIC port
8849         * src/pic Applied patch from Craig Franklin (this started the object file support)
8850         * src/regression Updated the PIC regression tests for object files
8851
8852 2003-04-20  Borut Razem <borut.razem AT siol.net>
8853
8854         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8855           lklex.c: In function `getfid':
8856           lklex.c:203: warning: array subscript has type `char'
8857         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8858           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8859         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8860           stack handling macros
8861
8862 2003-04-19  Borut Razem <borut.razem AT siol.net>
8863
8864         * "handling space characters in file path" task:
8865         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8866         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8867         * support/Util/MySystem.h: make it self-sufficient
8868         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8869           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8870           handling space characters in file path
8871         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8872           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8873         * support/Util/MySystem.c: handling space characters in executable's path
8874
8875 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8876
8877         * as/z80/Makefile: fix permanent rebuild of z80
8878         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8879         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8880
8881 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8882
8883         * src/SDCCopt.c: add special case optimization to replace modulo by
8884           a power of two with a bitwise AND.
8885
8886 2003-04-18    <johan AT balder>
8887
8888         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8889
8890 2003-04-17    <johan AT balder>
8891
8892         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8893         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8894
8895 2003-04-13  Borut Razem <borut.razem AT siol.net>
8896
8897         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8898         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8899           fixed mingw problem in adl_NORMALIZE_PATH
8900
8901 2003-04-12  Borut Razem <borut.razem AT siol.net>
8902
8903         * fixed "#pragma SAVE/RESTORE can not be nested":
8904         * src/SDCC.lex: reworked pragma handling functions
8905         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8906         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8907
8908 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8909
8910         * src/SDCCutil.c (pathEquivalent): defined but not used
8911         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8912         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8913         * configure: rebuilt from configure.in
8914         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8915         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8916         * device/include/Makefile.in: replace sdcc_datadir
8917         * device/lib/Makefile.in: replace sdcc_datadir
8918         * Makefile.common.in: add LDFLAGS from configure
8919         * packihx/Makefile.in: use LDFLAGS
8920         * src/Makefile.in: use LDFLAGS
8921         * support/cpp2/Makefile.in: add LDFLAGS from configure
8922         * support/makebin/Makefile: use LDFLAGS
8923         * .version: bumped version number to 2.3.5
8924
8925 2003-04-12  Borut Razem <borut.razem AT siol.net>
8926
8927         * completed "different paths" task:
8928         * src/SDCCmacro.c: fixed bug in handling quotes
8929         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8930         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8931
8932 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8933
8934         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8935
8936 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8937
8938         * ds390/gen.c ds390/peeph.def: fix bug 706781
8939
8940 2003-04-11  Borut Razem <borut.razem AT siol.net>
8941
8942         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8943
8944 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8945
8946         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8947         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8948          set - this bit used to not be set...).
8949         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8950           bad code in PIC Port
8951         * src/regression/and2.c added to test bug 609268
8952         * src/regression/Makefile added and2.c to regression test
8953
8954
8955 2003-04-08    <johan AT CP255758-A>
8956
8957         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8958         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8959         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8960
8961 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8962
8963         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8964         fix bug #487815
8965         * support/cpp2/Makefile.in: fix bug #487815
8966         * configure: rebuilt from configure.in
8967         * Makefile.common.in: docdir changed, new path suffixes
8968         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8969         * sdcc_vc_in.h: reflect changes from sdccconf.h
8970         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8971         * src/SDCCutil.h: remove BINDIR hack
8972         * doc/sdccman.lyx: update new path hierarchy
8973
8974 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8975
8976         * src/SDCCpeeph.c: added okToRemoveSLOC test
8977
8978 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8979
8980         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8981
8982 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8983
8984         * src/SDCCpeeph.c: added labelIsReturnOnly test
8985         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8986
8987 2003-04-05    <johan AT balder>
8988
8989         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8990         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8991         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8992         * src/SDCCast.c: fixed a warning
8993         * src/SDCCast.h: fixed a warning
8994         * src/SDCCicode.c (operandFromAst): fixed a warning
8995
8996 2003-04-04    <johan AT balder>
8997
8998         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8999         * src/SDCCast.c (decorateType): fixed bug #715076
9000         * src/SDCC.y: fixed bug #702907
9001
9002 2003-04-03    <johan AT balder>
9003
9004         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9005         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9006         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9007         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9008         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9009
9010 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9011
9012         * _decdptr.c: fix return values
9013         * _gptrget.c: fix return values
9014         * _gptrgetc.c: fix return values
9015         * _gptrput.c: fix return values
9016         * _mulint.c: fix return values
9017         * as/z80/Makefile: fix 'make -j' problem
9018
9019 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9020
9021         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9022         * configure.in: big cleanup, updated to autoconf 2.5x
9023         * configure: rebuilt from configure.in
9024         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9025         * sdcc_vc_in.h: reflect changes from sdccconf.h
9026         * doc/Makefile: fixed a flaw in "make install"
9027
9028 2003-04-02    <johan AT balder>
9029
9030         * src/ds390/gen.c (genCmp): no comments
9031         * src/mcs51/gen.c (genCmp): no comments
9032         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9033         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9034
9035 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9036
9037         * support/regression/generate-cases.py: place generated file in given sub directory
9038         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9039         * support/regression/Makefile: improvements for 'make -j';
9040         side effect: it's simpler and faster now
9041
9042 2003-03-31  Borut Razem <borut.razem AT siol.net>
9043
9044         * src/z80/main.c: link-{port} and as-{port} defined without path
9045         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9046
9047 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9048
9049         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9050
9051 2003-03-30  Borut Razem <borut.razem AT siol.net>
9052
9053         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9054           changed type of list parameter to set
9055         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9056         * src/port.h: changed type of do_assemble() parameter to set
9057         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9058           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9059           definition of "cppoutfilename" macro with NULL value in preProcess()
9060         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9061         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9062         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9063           replaced with set *binPathSet
9064         * shash_add() deallocates the item, if allready exsists, before adding the new one
9065         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9066
9067 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9068
9069         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9070           a nested for loop bug in the PIC port
9071         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9072           for loops
9073
9074 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9075
9076         * support/Util/dbuf.h: remove C++ stuff to make it portable
9077
9078 2003-03-28  Borut Razem <borut.razem AT siol.net>
9079
9080         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9081           literal strings in stringLiteral()
9082         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9083         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9084           to the project
9085
9086 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9087
9088         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9089
9090 2003-03-26    <johan AT balder>
9091
9092         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9093         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9094         * src/SDCCast.c (decorateType): fixed " -v < 3"
9095
9096 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9097
9098         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9099         Added Lenny Story's debug infrastructure changes:
9100         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9101         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9102         * src/cdbFile.c: added
9103         * src/SDCCdebug.c: added
9104         * src/SDCCdebug.h: added
9105         * src/SDCCast.c (createFunction)
9106         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9107         * src/SDCCmain.c (parseCmdLine, main)
9108         * src/SDCCmem.c (redoStackOffsets)
9109         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9110         * src/SDCCsymt.h
9111         * src/common.h
9112         * src/avr/gen.c (genAVRCode)
9113         * src/ds390/gen.c (gen390Code)
9114         * src/mcs51/gen.c (gen51Code)
9115         * src/pic/gen.c (genpic14Code)
9116         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9117         * src/xa51/gen.c (genXA51Code)
9118         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9119
9120 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9121
9122         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9123         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9124
9125 2003-03-22    <johan AT balder>
9126
9127         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9128
9129 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9130
9131         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9132         * doc/cdbfileformat.lyx: added, written by Lenny Story
9133         * doc/Makefile: added cdbfileformat.lyx
9134         * doc/clean.mk: added cdbfileformat.lyx
9135
9136 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9137
9138         * src/mcs51/peeph.def: fix bug #705773
9139
9140 2003-03-20    <johan AT balder>
9141
9142         An sfr/sbit can have an "at #" AND an initializer
9143         * src/SDCCsymt.c (checkSClass):
9144         * src/SDCCmem.c (allocGlobal):
9145         * src/SDCCmem.c (allocLocal):
9146         * src/SDCCast.c (createBlock):
9147
9148 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9149
9150         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9151
9152 2003-03-16    <johan AT balder>
9153
9154         Undid the hackup of const and volatile, the problem is much bigger
9155         * src/SDCC.y:1.65
9156         * src/SDCCast.c:1.171
9157         * src/SDCCglue.c:1.138
9158         * src/SDCCicode.c:1.146
9159         * src/SDCCsymt.c:1.150
9160         * src/SDCCval.c:1.65
9161
9162 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9163
9164         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9165         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9166
9167 2003-03-13    <johan AT balder>
9168
9169         Hackup const and volatile modifiers in type chains a bit:
9170         * src/SDCC.y:1.63
9171         * src/SDCCast.c:1.169
9172         * src/SDCCglue.c:1.136
9173         * src/SDCCicode.c:1.143
9174         * src/SDCCsymt.c1.146
9175         * src/SDCCsymt.h1.59
9176         * src/SDCCval.c:1.63
9177
9178 2003-03-12    <johan AT balder>
9179
9180         * src/SDCCBBlock.h: more LRH debugging junk
9181         * src/SDCCcflow.h: more LRH debugging junk
9182         * src/SDCCloop.c: more LRH debugging junk
9183         * src/SDCC.y (struct_declaration): fixed bug #697590
9184         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9185         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9186         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9187
9188 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9189         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9190         test function names must now match exactly).
9191         * src/SDCCcse.c: added special case in findCheaperOp to allow
9192         extending a short integer. Makes less awful code for bug 700121 test case.
9193
9194 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9195
9196         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9197         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9198
9199 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9200
9201         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9202         actually called (operandsNotEqual() was called for all
9203         operandsNotEqualX tests).
9204
9205 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9206
9207         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9208         with shorter literals. Fixes bug 700121.
9209
9210 2003-03-11    <johan AT balder>
9211
9212         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9213
9214 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9215
9216         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9217         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9218
9219 2003-03-10  Borut Razem <borut.razem AT siol.net>
9220
9221         * src/SDCCmain.c: pipe preprocessor's output
9222         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9223         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9224         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9225         which closes all pipes in pipeSet set
9226         * src/SDCCset.c: free deleted item in function deleteSetItem()
9227         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9228         moved from z80 to src subproject
9229         * .version: increased version number to 2.3.4
9230
9231 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9232
9233         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9234         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9235         * support/regression/ports/xa51/spec.mk: fix typo
9236
9237 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9238
9239         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9240
9241 2003-03-09  Borut Razem <borut.razem AT siol.net>
9242
9243         * src/SDCCmain.c: pipe preprocessor's output
9244         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9245         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9246         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9247         which closes all pipes in pipeSet set
9248         * src/SDCCset.c: free deleted item in function deleteSetItem()
9249         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9250         moved from z80 to src subproject
9251
9252 2003-03-09  Borut Razem <borut.razem AT siol.net>
9253
9254         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9255         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9256         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9257         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9258         * src/SDCCglobl.h: unification of WIN32 native definitions
9259
9260 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9261
9262         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9263
9264 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9265
9266         * src/configure.in:   check for endianess (even while cross-compiling)
9267         * src/configure:      check for endianess (even while cross-compiling)
9268         * src/configure_in.h: check for endianess (even while cross-compiling)
9269         * src/avr/gen.c:        remove old endianess stuff
9270         * src/mcs51/gen.c:      remove old endianess stuff
9271         * src/ds390/gen.c:      remove old endianess stuff
9272         * src/pic/gen.c:        remove old endianess stuff
9273         * src/pic/genarith.c:   remove old endianess stuff
9274         * src/pic/glue.c:       fix endianess check
9275         * src/pic16/gen.c:      remove old endianess stuff
9276         * src/pic16/genarith.c: remove old endianess stuff
9277         * src/pic16/glue.c:     fix endianess check
9278         * src/xa51/gen.c:       remove old endianess stuff
9279         * src/z80/gen.c:        fix endianess check
9280         * src/SDCCglue.c:       fix endianess check
9281         * src/ds390/peeph.def: fix bug 700036
9282
9283 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9284
9285         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9286         * src/configure: find appropriate data-types on host for SDCC's int and long
9287         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9288         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9289         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9290
9291 2003-03-07    <johan AT balder>
9292
9293         Just a big NOOP:
9294                 some minor cleanups before the big shot
9295                 OP_DEFS and OP_USES now use Kevin's protection
9296                 new option --nolabelopt
9297
9298         * src/SDCCBBlock.c:
9299         * src/SDCCast.c,:
9300         * src/SDCCcflow.c:
9301         * src/SDCCcse.c:
9302         * src/SDCCicode.c:
9303         * src/SDCCicode.h:
9304         * src/SDCClabel.c:
9305         * src/SDCCloop.c:
9306         * src/SDCCmain.c:
9307         * src/ds390/ralloc.c:
9308         * src/mcs51/ralloc.c:
9309         * src/pic/ralloc.c:
9310         * src/xa51/ralloc.c:
9311         * src/z80/ralloc.c:
9312
9313 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9314
9315         * src/pic/pcode.c (get_op): fix 64 bit warnings
9316         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9317         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9318         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9319         * support/regression/tests/malloc.c: fix 64 bit warnings
9320
9321 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9322
9323         * src/mcs51/gen.c (genMinus): fixed bug 696436
9324
9325 2003-03-02  Borut Razem <borut.razem AT siol.net>
9326
9327         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9328
9329 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9330
9331         * configure.in: test for mkstemp
9332         * sdccconf_in.h: add HAVE_MKSTEMP
9333
9334 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9335
9336         * device/include/ctype.h: removed warning while using --stack-auto
9337         * device/include/malloc.h: removed warning while using --stack-auto
9338         * device/include/string.h: removed warning while using --stack-auto
9339
9340 2003-02-23  Borut Razem <borut.razem AT siol.net>
9341
9342         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9343         because NDEBUG is defined (see man assert)
9344         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9345
9346 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9347
9348         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9349         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9350
9351 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9352
9353         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9354         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9355
9356 2003-02-18    <johan AT balder>
9357
9358         * as/mcs51/asmain.c (asmbl): module can start with a digit
9359         * as/z80/asmain.c (asmbl): module can start with a digit
9360
9361 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9362
9363         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9364         * src/asm.c: fix pipe() for Mingw32
9365
9366 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9367
9368         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9369         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9370         make -V work again; --c1mode reads now from stdin
9371         * doc/sdccman.lyx: added --c1mode
9372         * support/Util/SDCCerr.c: new messages for c1 mode
9373         * support/Util/SDCCerr.h: new messages for c1 mode
9374         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9375
9376 2003-02-15    <johan AT balder>
9377
9378         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9379
9380 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9381
9382         * doc/sdccman.lyx: Environment variables, -o and other minor things
9383
9384 2003-02-14    <johan AT balder>
9385
9386         * src/xa51/main.c: before anyone really tries to use it :)
9387
9388         * Install doc's in share/sdcc/doc
9389         * removed some obsolete files
9390         * Do a proper make distclean and uninstall
9391         M Makefile.common.in
9392         R sdccbuild.sh
9393         M as/Makefile
9394         M device/include/Makefile.in
9395         M device/lib/Makefile.in
9396         M doc/sdccman.lyx
9397         M link/Makefile
9398         M sim/ucsim/doc/Makefile.in
9399         M src/clean.mk
9400         R src/avr/peeph.rul
9401         R src/xa51/peeph.rul
9402         M support/cpp2/Makefile.in
9403         M support/makebin/Makefile
9404
9405
9406 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9407
9408         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9409
9410 2003-02-10  Borut Razem <borut.razem AT siol.net>
9411
9412         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9413         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9414         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9415         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9416         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9417         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9418         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9419         src/z80/Makefile.bcc: Borland Makefile cleanup
9420         * as/z80/Makefile.bcc: Added Borland Makefile
9421         * support/cpp2/borland.h: Removed
9422
9423 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9424
9425         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9426         * src/SDCC.lex: new pragma NOIV
9427         * src/SDCCglobl.h: new pragma NOIV
9428         * src/SDCCmem.c: new pragma NOIV
9429
9430 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9431
9432         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9433
9434 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9435
9436         * src/SDCCmain.c: signal handling is switched off by --debug
9437         * doc/Makefile: small fix for install; use clean.mk again
9438         * doc/clean.mk: clean *.pdf and *.html too
9439
9440 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9441
9442         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9443         * device/lib/printfl.c: fix a ds390 bug by making it portable
9444         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9445         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9446         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9447         * debugger/mcs51/cmd.c: converted multi-line string literals
9448         * sim/ucsim/globals.cc: converted multi-line string literals
9449         * src/SDCCmain.c: introduced signal handler to remove temp files
9450         * doc/Makefile: small tweaks, implement clean
9451         * doc: removed generated files
9452
9453 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9454
9455         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9456         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9457         Address Record is not correctly generated for DS390."
9458
9459 2003-02-02  Borut Razem <borut.razem AT siol.net>
9460
9461         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9462         * as/mcs51/asm.h: fixed compilation with Borland C
9463         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9464         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9465         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9466         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9467         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9468         src/z80/Makefile.bcc: delete $(LIB) only if exist
9469         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9470
9471 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9472
9473         * device/include/malloc.h: introduced NULL
9474         * device/include/string.h: introduced NULL
9475         * device/include/stdlib.h: introduced NULL
9476         * device/lib/_memcpy.c: removed NULL
9477         * device/lib/_strcat.c: removed NULL
9478         * device/lib/_strchr.c: removed NULL
9479         * device/lib/_strcmp.c: removed NULL
9480         * device/lib/_strcpy.c: removed NULL
9481         * device/lib/_strcspn.c: removed NULL
9482         * device/lib/_strlen.c: removed NULL
9483         * device/lib/_strncat.c: removed NULL
9484         * device/lib/_strncmp.c: removed NULL
9485         * device/lib/_strncpy.c: removed NULL
9486         * device/lib/_strpbrk.c: removed NULL
9487         * device/lib/_strrchr.c: removed NULL
9488         * device/lib/_strspn.c: removed NULL
9489         * device/lib/_strstr.c: removed NULL
9490         * device/lib/_strtok.c: removed NULL
9491         * device/lib/malloc.c: removed NULL, include own header
9492
9493 2003-02-02    <johan AT balder>
9494
9495         * 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
9496         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9497         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9498         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9499         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9500         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9501
9502 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9503
9504         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9505         area 'DATA'"
9506
9507 2003-02-01    <johan AT balder>
9508
9509         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9510
9511 2003-01-31    <johan AT CP255758-A>
9512
9513         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9514
9515 2003-01-30    <johan AT balder>
9516
9517         * src/SDCCBBlock.c: automatic bug detection
9518         * src/SDCCicode.c: automatic bug detection
9519
9520 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9521
9522         * src/SDCCglobl.h:   now --xram-size 0 works
9523         * src/SDCCmain.c:    now --xram-size 0 works
9524
9525 2003-01-29    <johan AT balder>
9526
9527         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9528
9529 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9530
9531         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9532         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9533         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9534         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9535         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9536         * src/SDCCmain.c:    Added options --xram-size and --code-size
9537
9538 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9539
9540         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9541         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9542
9543 2003-01-27    <johan AT balder>
9544
9545         * src/SDCC.y: fixed bug #613764
9546
9547 2003-01-26    <johan AT balder>
9548
9549         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9550         * src/SDCCsymt.h: fixed bug #673374
9551         * src/SDCCglue.c: fixed bug #661910
9552         * src/SDCCast.c: fixed bug #458099 and 673374
9553
9554 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9555
9556         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9557         * as/mcs51/strcmpi.h: added
9558         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9559         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9560         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9561         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9562         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9563         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9564         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9565         * as/mcs51/Makefile.aslink: new module strcmpi
9566         * as/mcs51/Makefile.asx8051: new module strcmpi
9567         * as/mcs51/Makefil.bcc: new module strcmpi
9568         * as/mcs51/Makefile.in: new module strcmpi
9569         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9570
9571 2003-01-26    <johan AT balder>
9572
9573         * src/SDCCglue.c: reverted back to 1.124
9574         * src/SDCCast.c: reverted back to 1.156
9575         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9576
9577 2003-01-25    <johan AT balder>
9578
9579         * src/SDCCglue.c: A better fix for bug #661910
9580         * src/SDCCast.c: A better fix for bug #661910
9581         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9582
9583 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9584
9585         * src/Makefile.in: remove spawn.o
9586         * src/SDCCmain.c: remove spawn.h
9587         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9588         * src/spawn.c: removed
9589         * src/spawn.h: removed
9590         * support/regression/ports/ds390/spec.mk: link with -r
9591
9592 2003-01-24    <johan AT CP255758-A>
9593
9594         * src/ds390/gen.c (aopOp): fixed bug #667458
9595         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9596         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9597         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9598
9599 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9600
9601         * src/mcs51/peeph.def: better assembler identation by Frieder
9602         * src/mcs51/gen.c: better assembler identation by Frieder
9603
9604 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9605
9606         * as/z80/string.h: removed for gcc 3.2
9607         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9608         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9609
9610 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9611
9612         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9613         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9614         * support/regression/Makefile: separate temp files for ports
9615         * support/regression/generate-cases.py: separate temp files for ports
9616         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9617         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9618
9619 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9620
9621         * moved tinitalk to device/examples/ds390
9622
9623 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9624
9625         * as/mcs51/lkmem.c: rflag is for DS390
9626         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9627         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9628                          (linkEdit): move mem- and map-files the same way as ihx-files
9629         * src/z80/main.c (_setDefaultOptions): removed --generic
9630         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9631         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9632         * src/pic/glue.c (picglue): --c1mode works again
9633         * src/pic16/glue.c (pic16glue): --c1mode works again
9634         * src/asm.c (printCLine): fix #660034
9635
9636 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9637
9638         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9639         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9640         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9641         * as/mcs51/lkmem (summary): better fix for sp problem
9642         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9643         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9644         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9645                                               remove --stack-after-data
9646
9647 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9648
9649         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9650         * src/SDCCutil.c (join): ugly bug: missing '\0'
9651         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9652
9653 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9654
9655         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9656         * src/port.h: typo
9657         * src/pic/main.c (_asmCmd): gpasm supports -o
9658         * src/z80/main.c: more general macros
9659         * device/lib/Makefile.in: remove intermediate files
9660
9661 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9662
9663         * .version: Bumped version number to 2.3.3
9664         * src/SDCCBBlock.c: new option -o
9665         * src/SDCCglobl.h: new option -o
9666         * src/SDCCglue.c: new option -o
9667         * src/SDCCmain.c: new option -o
9668         * src/asm.c: new option -o
9669         * src/ds390/main.c: new option -o
9670         * src/pic/glue.c: new option -o
9671         * src/pic/pcode.c: new option -o
9672         * src/pic/ralloc.c: new option -o
9673         * src/pic16/glue.c: new option -o
9674         * src/pic16/pcode.c: new option -o
9675         * src/pic16/ralloc.c: new option -o
9676         * src/z80/main.c: new option -o
9677         * device/lib/Makefile.in: use -o
9678         * support/regression/ports/ds390/spec.mk: use -o
9679         * support/regression/ports/gbz80/spec.mk: use -o
9680         * support/regression/ports/mcs51/spec.mk: use -o
9681         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9682         * support/regression/ports/z80/spec.mk: use -o
9683         * support/regression/ports/ucz80/spec.mk: use -o
9684         * support/regression/ports/xa51/spec.mk: use -o
9685         * support/regression/fwk/lib/timeout.c: fix usage string
9686
9687 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9688         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9689
9690 2003-01-07    <johan AT balder>
9691
9692         * src/SDCCast.c (decorateType): fixed bug #600035
9693
9694 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9695         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9696         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9697         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9698         * src/pic/pcode.c: outcommented unused variable to remove warnings
9699         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9700
9701 2003-01-06    <karl AT turbobit.com>
9702         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9703    regression tests.
9704
9705 2003-01-06    <johan AT balder>
9706
9707         * src/SDCCicode.c: fixed array add
9708
9709 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9710         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9711         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9712
9713 2003-01-04    <johan AT balder>
9714
9715         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9716
9717 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9718         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9719
9720 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9721         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9722         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9723
9724 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9725         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9726
9727 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9728         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9729
9730 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9731         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9732
9733 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9734
9735     * in \sdcc\as\mcs51\ changed these files in order to create an
9736     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9737     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9738     following files to include the previous two files: aslink.dsp,
9739     Makefile.aslink, Makefile.bcc, and Makefile.in.
9740
9741     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9742     .adb instead of .cdb
9743
9744 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9745
9746         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9747         value from option --iram-size.
9748
9749 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9750
9751         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9752         dram[] array.
9753
9754 2002-09-18    <wiml AT hhhh.org>
9755
9756         * SDCClrange.h: exposed setFromRange() and setToRange()
9757         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9758           packRegsForAccUse() (bug 542397)
9759         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9760           multiple times and emitting the fetch operations more than once
9761           added aopGetUsesAcc() function to allow binary operators to
9762           fetch their operands in the correct order; made genMinus() emit
9763           compact code for X = LITERAL - Y
9764
9765 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9766         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9767         sprintf() in line 1267.
9768
9769 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9770         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9771         like ports.
9772
9773 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9774         Changes to aslink (All the changes are marked with 'JCF'):
9775
9776         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9777         summary().
9778
9779         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9780         area BSEG.  Also moves, if possible, the DATA area down into the internal
9781         ram so more space is available.
9782
9783         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9784         sflag.
9785
9786         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9787         not bytes.  Function summary() which creates a memory usage summary
9788         file with extension .mem.  Reports of overlaping stack and small stack
9789         size.  If the space for the stack is less than 16 bytes aslink trows a
9790         warning.
9791
9792         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9793         the 8051.  Option 'y' for memory summary output file.
9794
9795         Changes to sdcc (All the changes are marked with 'JCF'):
9796
9797         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9798
9799         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9800         overlaying area for it (uses RegBankUsed[4]).
9801
9802         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9803         bank zero as used by default.  By default aslink locates the stack
9804         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9805         the creation of the .mem file.  Delegates the allocation of data area
9806         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9807         the begining of the stack area to aslink.
9808
9809         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9810         glue() in SDCCglue.c creates an area for it.
9811
9812 2002-09-03  Borut Razem <borut.razem AT siol.net>
9813         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9814         sdcc/src/pic/glue.c:
9815         introduced atexit() handler for teporay files removal in case of
9816         errors, assertions, ...
9817
9818 2002-08-29  Borut Razem <borut.razem AT siol.net>
9819         * sdcc/support/cpp2/auto-host_vc_in.h:
9820         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9821         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9822         Maybe there is a similar problem with BORLANDC? It should be checked!
9823
9824         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9825         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9826         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9827         was not executed, and the compiler (cl) launched a warning:
9828         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9829
9830 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9831         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9832
9833 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9834         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9835
9836         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9837           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9838           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9839           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9840           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9841           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9842           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9843         - added Release configuration in VS projects
9844         - review of compiler an linker options
9845         - VC .exe files are generated in bin_vc directory, not to interfere
9846           with binaries generated from other projects (cygwin, mingw, bcc ...)
9847
9848         * sdcc/src/yacc.dsp: added
9849
9850         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9851         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9852         and insert the version number definitions from .version
9853
9854         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9855
9856         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9857         added - genarate auto-host.h using auto-host_vc_in.h as template
9858
9859         * sdcc/sdcc_vc.h,
9860         removed from CVS, generated automatically
9861
9862 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9863         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9864
9865 2002-08-11  Borut Razem <borut.razem AT siol.net>
9866         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9867
9868 2002-08-10  Borut Razem <borut.razem AT siol.net>
9869         * src/SDCCmain.c (main):
9870         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9871         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9872         The consequence was that some temporary files were not removed.
9873
9874         * src/SDCCglue.c:
9875         unification of code in functions tempfilename() and tempfile():
9876         function tempnam() is defined in Visual Studio 6.0 and .NET
9877
9878         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9879
9880         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9881           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9882         - removed compiler command line option /WX: Treats all warnings as errors
9883         - update a list of source files, included into the project
9884
9885         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9886           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9887         changed project type to Generic Project so that can be correcly converted to VS.NET project
9888
9889         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9890
9891         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9892
9893         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9894
9895         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9896         added return 0 statements after assert() to make compiler happy
9897
9898         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9899         added newline in the def file to keep MSC compiler satisfied
9900
9901         * sdcc/src/z80/gen.c:
9902         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9903           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9904         - solved MSC error in function aopDump()
9905
9906         * sdcc_vc.h: define PREFIX as "\\sdcc"
9907
9908 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9909         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9910
9911 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9912         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9913         - Rewrote the register banking algorithm.
9914         - Added pCode live-range analysis to registers (for now, only non-used and
9915         singly-used registers optimized away)
9916
9917         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9918
9919         * 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.
9920
9921 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9922         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9923
9924 2002-04-22  Michael Hope  <michaelh AT vroom>
9925
9926         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9927
9928         * configure.in (DD_COPT): Added include support required for gbdk.
9929
9930         * .version: Bumped version number just to increase it.
9931
9932         * src/SDCCmain.c: Added -nostdinc to the default options.
9933
9934 2002-04-15  Michael Hope  <michaelh AT vroom>
9935
9936         * device/lib/z80/printf.c (sprintf): Added.
9937
9938         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9939
9940         * src/z80/peeph.def: Added transpose redundent load rule.
9941
9942         * src/z80/main.c: Added force callee saves for jaune.
9943
9944         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9945
9946         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9947
9948 2002-03-28  Johan Knol  <johan AT balder>
9949
9950         * src/SDCCval.c: fixed bug #532436
9951
9952 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9953         * /src/port.h:
9954         Added "char *Processor" field to the port structure.
9955
9956         * /src/SDCCmain.c:
9957         Added -p option. Allows port dependent processor to be specified.
9958
9959         * all ports:
9960         Initialized the new field char *Processor field to NULL in all ports
9961
9962         * /src/pic/*:
9963         Compiler generated registers for interrupt context saving
9964         were not getting allocated.
9965
9966 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9967
9968         * /src/SDCCast.c:
9969         Fixed left shift. Will promote the left side of a left shift
9970         if a) left shifting more than size of operand or b) when assigned
9971         to something size > size of left side
9972
9973 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9974         * src/pic/*
9975         tons of changes. Register allocation has been
9976         rewritten. Added customization for the various PICs. Flow
9977         analysis is restructured. ...
9978
9979         * src/pic/device.h:
9980         Added
9981
9982         * src/pic/device.c:
9983         Added. device.c is a PIC port hack to accomodate variations
9984         in PIC devices.
9985
9986 2002-03-13  Michael Hope  <michaelh AT vroom>
9987
9988         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9989
9990 2002-03-04  johanknol  <johanknol AT manik>
9991
9992         * /src/SDCCval.c: fixed
9993
9994         const unsigned char arr[][2] = { { 0, 1 } };
9995         t18.c:1: error: Initializer element is not constant
9996
9997 2002-03-04  bela  <bela AT manik>
9998
9999         * /device/include/mcs51reg.h:
10000         ds89c420 register definition update
10001
10002 2002-03-03    <johan AT FRIJA>
10003
10004         * support/Util/SDCCerr.c: did something, but don't no why anymore
10005
10006         * support/regression/tests/bug-524691.c: made it a little less shy
10007
10008         * src/SDCCast.c (decorateType): fixed bug #524697
10009
10010         * src/SDCCast.c: made some lineno improvements
10011
10012         * src/SDCCval.c (getNelements): changed warning to error
10013
10014         * src/SDCCglue.c (printIvalArray): changed warning to error
10015
10016         * src/SDCCicode.c: fixed a warning for mingw
10017
10018         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10019
10020         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10021
10022 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10023
10024         * src/ds390/peeph.def:
10025         Added some more peephole rules
10026
10027         * src/ds390/gen.c: Various fixes & enhancements
10028
10029         * src/SDCClrange.c, src/SDCClrange.h:
10030         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10031
10032         * src/ds390/ralloc.c:
10033         various fixes & enhancements (ds390) specific
10034
10035         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10036         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10037         from rallocs.
10038
10039         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10040
10041 2002-03-02    <johan AT FRIJA>
10042
10043         * src/SDCCast.c (decorateType): fixed bug #524708
10044
10045         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10046
10047         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10048
10049 2002-03-01  Michael Hope  <michaelh AT vroom>
10050
10051         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10052
10053         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10054
10055 2002-03-01    <johan AT FRIJA>
10056
10057         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10058
10059         * src/SDCCast.c (decorateType): fixed bug #524209
10060
10061         * src/SDCCval.c (valNot): fixed bug #524195
10062
10063 2002-02-26    <johan AT balder>
10064
10065         * src/xa51/gen.c: fixed a warning
10066
10067         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10068
10069         * src/SDCCast.c (decorateType): fixed bug #522534
10070
10071 2002-02-23    <johan AT balder>
10072
10073         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10074
10075 2002-02-22    <johan AT balder>
10076
10077         * src/SDCCast.c: fixed bug #514865
10078
10079         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10080
10081 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10082
10083         * sdcc/src/SDCCloop.c:
10084         Previous fix was not good. basic blocks that have "break" or "return" are
10085         not really partof a loop , but live ranges used in these blocks should
10086         be live thru the entire loop, so set partOfLoop but don't add them to
10087         loop region
10088
10089 2002-02-21    <johan AT FRIJA>
10090
10091         * src/SDCCcse.c: fixed bug #514308
10092
10093 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10094
10095         * src/SDCCloop.c:
10096         Fixed BUG #519583. If a conditional block ended in a return/break
10097         statement inside a loop, it was not being considered part of the loop.
10098
10099         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10100
10101 2002-02-10  Karl Bongers <karl AT turbobit.com>
10102
10103         * debugger/*:
10104         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10105         with lots of comments and notes.
10106
10107         * device/examples/test2.c:
10108         Fix bug, "red" variable not being initialized(compiler complained).
10109
10110         * device/examples/Makefile, examples/test3.c:
10111         Add Makefile in device/examples folder, compiles test3.c
10112         for use as a multiple module SDCDB test case.
10113
10114         * sim/ucsim/cmd.src/cmdset.cc:
10115         Took out debug printfs in ucsim "next" command.
10116
10117         * sim/ucsim/xa.src:
10118         Karl and Johan start ucsim XA support.  Most dissassembly working,
10119         about 75% emulation done(plenty of work remaining).
10120
10121         * sim/ucsim/z80.src:
10122         Add Z80 support to ucsim, add test-ucz80 regression test,
10123         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10124         Notice z80 compiler fails on examples/test3.c/crc code.
10125
10126 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10127
10128         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10129         Added support for --parms-in-bank1
10130
10131         * src/ds390/peeph.def:
10132         added a few more peephole optimzations
10133
10134         * src/ds390/main.c:
10135         1) added __builtin_inp & __builtin_outp used to read in data of given length
10136            from a memory mapped port
10137         2) added __builtin_memcmp
10138         3) added __builtin_swapw swap bytes of a short
10139
10140         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10141         1) handle multiple send & receives from register bank1
10142         2) ralloc can now allocate DPTR1 to some liveRanges
10143
10144         * src/SDCCsymt.c, src/SDCCsymt.h:
10145         changes to handle multiple sends & receives
10146
10147         * src/SDCCptropt.h:
10148         added some pointer arithmetic optimization
10149
10150         * src/SDCCptropt.c:
10151         added some pointer arithmetic optimizations but not stable yet so not
10152         called from anywhere (will get this working shortly)
10153
10154         * src/SDCCopt.c: fixed for multiple sends & receives
10155
10156         * src/SDCCmain.c:
10157         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10158         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10159            set preprocessor defines (depending on options)
10160
10161         * src/SDCCicode.c, src/SDCCicode.h:
10162         changes made to handle multiple sends & receives
10163
10164         * src/SDCCglobl.h:
10165         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10166
10167         * src/SDCCcse.c, src/SDCCcse.h:
10168         added function findbackward def (to be used in upcoming optimization)
10169
10170         * src/SDCCcflow.c, src/SDCCcflow.h:
10171         added function returnAtEnd - to determine if a basic block terminates with
10172         a RETURN iCode
10173
10174         * src/SDCCast.c, src/SDCCast.h:
10175         added option parms-in-bank1
10176
10177         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10178         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10179         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10180         adjusted for --parms-in-bank1 option
10181
10182         * device/include/string.h:
10183         donot redefine "reentrant" keyword
10184
10185         * device/include/ds80c390.h: Added some more SFRs
10186
10187 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10188
10189         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10190
10191 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10192
10193         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10194
10195 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10196
10197         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10198
10199 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10200
10201         * Added --xram-movc option
10202
10203 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10204
10205         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10206
10207 2002-01-11  Johan Knol
10208
10209         * Added math lib of Jesus Calvino-Fraga
10210
10211 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10212
10213         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10214         * support/regression/Makefile: new target test-mcs51-stack-auto
10215         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10216
10217 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10218
10219         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10220
10221 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10222
10223         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10224
10225 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10226
10227         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10228
10229         * src/SDCCglue.h: add definition for printIvalChar()
10230
10231 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10232
10233         * src/SDCCast.c: fix #498138 by Johan
10234
10235         * src/SDCCglue.c: fix #498138 by Johan
10236
10237 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10238
10239         * support/regression/Makefile: fix clean
10240
10241         * support/regression/ports/ds390/support.c: fix transmission of last character
10242
10243 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10244
10245         * /sdcc/src/ds390/gen.c:
10246         a) improved computing address of stack variable
10247         b) took out some #if 0 code
10248         c) improved parmBytes adjustment
10249         d) improved genPlusIncr & genMinusIncr
10250         e) genCmp could generate bad code (when left assigned to DPTR)
10251         f) Fixed bug in hasInc
10252
10253         * /sdcc/src/ds390/ralloc.c:
10254         a) packRegsForSupport could mess up live information (Fixed)
10255         b) packRegsDPTRuse could be incorrect for left & right shift
10256
10257         * /sdcc/src/mcs51/ralloc.c:
10258         packRegsForSupport could mess up the live information (Fixed)
10259
10260         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10261
10262         * /sdcc/src/SDCCast.c:
10263         can reverse a loop even if function call is present as long
10264         as the loop control variable is local & is not passed as parameter
10265
10266 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10267
10268         * /sdcc/ChangeLog: *** empty log message ***
10269
10270         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10271         More builtin function additions for TININative
10272
10273         * /sdcc/src/ds390/ralloc.c:
10274         Had broken the regression testsuite
10275
10276         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10277
10278         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10279         Added funcattr hasStackParms will be set for reentrant functions when there
10280         are paramteres on the stack, this helps in minimizing frame pointer generation
10281         typeFromStr can handle function pointers now
10282
10283         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10284         *** empty log message ***
10285
10286 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10287
10288         * /src/ds390/gen.c, /src/ds390/main.c:
10289         More builtin function additions for TININative
10290
10291         * /src/ds390/ralloc.c:
10292         Had broken the regression testsuite
10293
10294         * /src/SDCCast.c: Fixed a bug in dumptree
10295
10296         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10297         Added funcattr hasStackParms will be set for reentrant functions when there
10298         are paramteres on the stack, this helps in minimizing frame pointer generation
10299         typeFromStr can handle function pointers now
10300
10301         * /doc/builtins.txt, /doc/TININative.txt:
10302         *** empty log message ***
10303
10304
10305 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10306
10307         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10308         ALPHA version for -mTININative
10309
10310         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10311         updated to reflect changes in the port structure
10312
10313         * /src/port.h:
10314         added function do_assemble (similar to do_link) if non-null this function
10315         will be called to do assembly (-mTININative) requires a multi command
10316         assembly
10317         added function genAssemblerEnd will be called to generate assembler Epilogue
10318
10319         * /src/SDCCsymt.c:
10320         added _JavaNative to debug info printing
10321
10322         * /src/SDCCmain.c: added option --tini-libid
10323         added port->do_assemble function (-mTININative) has a multi command assemble
10324
10325         * /src/SDCCglue.c: Disabled "constExpr" check
10326         added port->genAssemblerEnd function
10327
10328         * /src/SDCCglobl.h: Added option --tini-libid value
10329
10330         * /src/SDCCast.h:
10331         tookout optimizeCompare from the header (has no external references)
10332
10333         * /src/SDCCast.c: made one more function "static"
10334
10335 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10336
10337         * src/z80/mappings.i: Added z80asm support.
10338
10339         * src/z80/main.c: Added z80asm support on --asm=z80asm
10340
10341         * src/z80/gen.c: Fixed asm portability issues.
10342
10343         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10344
10345         * src/SDCCglue.c (printExterns): Added global/extern split.
10346
10347 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10348
10349         * support/regression/Makefile: added test for mcs51 model large
10350
10351         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10352
10353         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10354
10355 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10356
10357         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10358
10359 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10360
10361         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10362
10363         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10364
10365 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10366
10367         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10368
10369         * support/regression/tests/simplefloat.c: Port to mcs51.
10370
10371 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10372         * support/regression/tests/bug-485362.c: Added.
10373
10374         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10375
10376         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10377
10378         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10379
10380         * src/z80/gen.c (aopDump): Added a dump function.
10381
10382 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10383         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10384
10385         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10386
10387         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10388
10389         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10390
10391         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10392
10393         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10394
10395         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10396
10397         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10398
10399         * support/regression/ports/ds390/support.c: Use tinibios.
10400
10401         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10402
10403 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10404
10405         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10406         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10407
10408         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10409
10410         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10411
10412 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10413
10414         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10415
10416         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10417         (packRegsForIYUse): Created and optimised.
10418
10419 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10420
10421         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10422 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10423
10424         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10425
10426         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10427
10428         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10429
10430 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10431
10432         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10433
10434         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10435
10436 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10437
10438         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10439
10440         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10441
10442         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10443
10444 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10445
10446         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10447         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10448         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10449
10450         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10451
10452         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10453         (genNotFloat): Added.
10454         (genUminusFloat): Added.
10455
10456         * device/lib/z80/Makefile: Added floating pt stubs.
10457
10458         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10459
10460         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10461
10462         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10463
10464 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10465
10466         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10467
10468         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10469
10470         * sdcc/support/regression/Makefile: Add port ds390.
10471
10472         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10473
10474         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10475
10476         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10477
10478         * sdcc/support/regression/ports/ds390/support.c: Added.
10479
10480         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10481
10482         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10483
10484         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10485
10486 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10487
10488         * device/include/malloc.h: Added z80 and gbz80 support.
10489
10490         * device/lib/gbz80/heap.s: Added.
10491
10492         * device/lib/z80/heap.s: Added.
10493
10494         * device/lib/malloc.c: Added z80 and gbz80 support.
10495
10496         * support/regression/tests/malloc.c (testMalloc): Added.
10497
10498         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10499
10500         * support/regression/tests/bug-478094.c: Added.
10501
10502         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10503
10504 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10505
10506         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10507
10508         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10509
10510         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10511
10512         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10513
10514         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10515
10516 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10517
10518         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10519
10520 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10521
10522         * support/regression/tests/bug-477927.c: Added.
10523
10524         * src/z80/peeph.def: Added minor rules.
10525
10526         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10527
10528         * src/z80/peeph.def: Added jump optimisation modification.
10529
10530 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10531
10532         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10533
10534 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10535
10536         * support/regression/tests/funptrs.c: Added.
10537
10538 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10539
10540         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10541
10542 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10543
10544         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10545
10546         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10547
10548         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10549         (movLeft2ResultLong): Created.
10550
10551         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10552         (joinPushes): Added.  Joins two char pushes into a word push.
10553
10554 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10555
10556         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10557
10558         * support/makebin/Makefile (install): Added creation of dest dir.
10559
10560 2001-10-24 Karl Bongers <karl AT turbobit.com>
10561
10562         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10563
10564 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10565
10566         * src/z80/ralloc.c: Turned off faulty pack for one use.
10567
10568         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10569
10570         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10571
10572 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10573
10574         * support/regression/Makefile: Improved clean
10575
10576         * support/regression/ports/gbz80/spec.mk: Added clean
10577
10578         * support/regression/ports/host/spec.mk: Added clean
10579
10580         * support/regression/ports/z80/spec.mk: Added clean
10581
10582         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10583
10584         * support/regression/ports/mcs51/timeout.c: little improvements
10585
10586 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10587
10588         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10589
10590         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10591
10592         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10593
10594 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10595
10596         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10597
10598         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10599
10600 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10601         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10602
10603         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10604
10605         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10606
10607         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10608
10609         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10610
10611         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10612
10613         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10614
10615         * support/regression/tests/longor.c: Added.
10616
10617 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10618
10619         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10620
10621         * as/mcs51/aslink.h: define PATH_MAX
10622
10623         * as/mcs51/asm.h: define PATH_MAX
10624
10625         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10626
10627         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10628
10629         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10630
10631         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10632
10633         * src/SDCCglobl.h: define PATH_MAX
10634
10635         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10636
10637         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10638
10639 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10640
10641         * src/z80/gen.c (gencjneshort): Fixed
10642
10643         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10644
10645 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10646
10647         * support/regression/tests/bug-469671.c: Added.
10648
10649         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10650
10651 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10652
10653         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10654
10655         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10656
10657 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10658
10659         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10660
10661         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10662
10663         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10664
10665         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10666
10667         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10668
10669         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10670
10671         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10672
10673 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10674
10675         * 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.
10676
10677         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10678
10679         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10680
10681 2001-10-07    <johan AT FRIJA>
10682
10683         * device/lib/gets.c (gets): fixed the return value.
10684
10685 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10686         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10687
10688         * 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.
10689
10690         * 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.
10691
10692         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10693
10694         * src/pic/gen.c: Removed Safe_strdup.
10695
10696         * configure.in: Added option to enable libgc support.
10697
10698         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10699         (bitVectUnion): Optimised.
10700         (bitVectIntersect): Optimised.
10701         (bitVectBitsInCommon): Optimised.
10702         (bitVectCplAnd): Optimised.
10703
10704         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10705
10706 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10707
10708         * src/SDCCmain.c: distinguish between assembler debug and plain options
10709
10710         * src/avr/main.c:   remove standard assembler options
10711
10712         * src/ds390/main.c: remove standard assembler options
10713
10714         * src/mcs51/main.c: remove standard assembler options
10715
10716         * src/port.h: removed "PENDING" comment
10717
10718 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10719
10720         * src/device/lib/_mulint.c  : new, with assember functions
10721
10722         * src/device/lib/_mullong.c : new, with assember functions
10723
10724         * src/device/lib/_divuint.c : with assember functions
10725
10726         * src/device/lib/_divsint.c : with assember functions
10727
10728         * src/device/lib/_divulong.c: with assember functions
10729
10730         * src/device/lib/_divslong.c: with assember functions
10731
10732         * src/device/lib/_moduint.c : with assember functions
10733
10734         * src/device/lib/_modsint.c : with assember functions
10735
10736         * src/device/lib/_modulong.c: with assember functions
10737
10738         * src/device/lib/_modslong.c: with assember functions
10739
10740         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10741
10742         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10743
10744         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10745                                       replaced _mululong.c and _mulslong.c by _mullong.c
10746
10747 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10748
10749         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10750
10751 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10752
10753         * src/SDCCglue.c: test, if win32api is available for MINGW
10754
10755 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10756
10757         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10758         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10759         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10760         * support/regression/ports/host/spec.mk: removed GENERIC
10761         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10762         * support/regression/ports/z80/spec.mk: removed GENERIC
10763
10764 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10765
10766         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10767
10768         * support/regression/tests/bug-467035.c: Created.
10769
10770 2001-10-01    <johan AT FRIJA>
10771
10772         * src/SDCC.y: fixed bug #466586 part 1
10773
10774 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10775
10776         * SDCCicode.c: z80 has no generic pointers
10777         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10778
10779 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10780
10781         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10782
10783 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10784
10785         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10786
10787         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10788
10789 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10790
10791         * configure.in: Fixed up so that ucsim is only configured once.
10792
10793         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10794
10795         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10796         (getPathDifference): As above.
10797
10798         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10799
10800         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10801
10802 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10803         * .version: Updated to 2.3.1
10804
10805         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10806         Added copyright header.
10807
10808         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10809         (assemble): Added support for macro based assembler commands.
10810         (linkEdit): Added support for macro based linker commands.
10811         (preProcess): Changed the pre-processor to use macros.
10812         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10813         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10814
10815         * device/lib/z80/crt0.s: Added module name for debugging.
10816
10817 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10818
10819         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10820
10821         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10822
10823         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10824
10825         * src/Makefile.in: Added SDCCmacro and SDCCutil
10826
10827 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10828
10829         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10830
10831 2001-09-16    <johan AT FRIJA>
10832
10833         * 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.
10834
10835 2001-09-15    <johan AT FRIJA>
10836
10837         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10838         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10839
10840 2001-09-11    <johan AT FRIJA>
10841
10842         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10843
10844 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10845
10846         * support/regression/tests/bug-460444.c: Added test case.
10847
10848         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10849         (genCast): Added justification for all of the asserts.
10850
10851 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10852
10853         * support/regression/support.c: _xdata replaced by xdata
10854
10855         * support/regression/spec.mk: removed _generic
10856
10857 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10858
10859         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10860
10861         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10862         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10863
10864         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10865
10866         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10867
10868         * support/regression/tests/bug-460010.c: Added test case.
10869
10870         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10871
10872 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10873
10874         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10875
10876         * support/regression/testfwk.c: removed workaround for bug #436344
10877
10878         * support/regression/tests/bp.c: use less memory with mcs51
10879
10880         * support/regression/tests/bug-441448.c: use less memory
10881
10882         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10883
10884         * support/regression/collate-results.py: typo
10885
10886 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10887
10888         * support/regression/tests/fetchoverlap.c: Added new test case.
10889
10890         * support/regression/tests/bp.c: Added new test case.
10891
10892         * support/regression/tests/bug-448984.c: Added new test case.
10893
10894         * support/regression/tests/pow2shifts.c: Added new test case.
10895
10896         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10897         (genlshTwo): Fixed right shift for count > 8.
10898
10899         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10900
10901 2001-09-08    <johan AT FRIJA>
10902
10903         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10904
10905 2001-09-07    <johan AT FRIJA>
10906
10907         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10908
10909         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10910
10911 2001-09-06    <johan AT FRIJA>
10912
10913         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10914         * bernhard noted me at this: "() equals to (void)" (1.38)
10915
10916 2001-09-05    <johan AT FRIJA>
10917
10918         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10919
10920 2001-09-04    <johan AT FRIJA>
10921
10922         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10923
10924
10925 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10926
10927         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10928
10929 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10930
10931         * link/z80/aslink.h: Fixed path for PATH_MAX
10932
10933 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10934
10935         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10936
10937         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10938
10939         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10940
10941         * 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.
10942
10943 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10944
10945         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10946         (genCmp): Fixed up genCmp for the GB with longs.
10947
10948         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10949
10950         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10951
10952         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10953
10954         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10955
10956 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10957
10958         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10959
10960 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10961
10962         * 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.
10963
10964         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10965
10966 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10967
10968         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10969
10970         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10971
10972 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10973
10974   * sim/ucsim/configure:    little improvement of Cygwin-detection
10975   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10976   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10977   * support/regression/tests/bug-221100.c: small changes for mcs51
10978   * support/regression/tests/bug-221168.c: small changes for mcs51
10979   * support/regression/tests/bug-227710.c: small changes for mcs51
10980   * support/regression/tests/staticinit.c: small changes for mcs51
10981   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10982   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10983   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10984
10985 $Revision$