61221c161167d783c81b213d8126c1fba0ddbcf1
[fw/sdcc] / ChangeLog
1 2006-04-19 Borut Razem <borut.razem AT siol.net>
2
3         * src/version.awk: adapted for svn
4         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
5           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
6           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
7           /binutils-avr/etc/*.vi, *.jin: removed all properties
8           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
9
10 2006-04-19 Borut Razem <borut.razem AT siol.net>
11
12         * CVS to Subversion migration completed
13
14 2006-04-18 Borut Razem <borut.razem AT siol.net>
15
16         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
17           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
18
19 2006-04-17 Borut Razem <borut.razem AT siol.net>
20
21         * device/include/Makefile.in: added pic/*.inc to the installation
22
23 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
24
25         * support/regression/collate-results.py: fixed output in case of
26         a valdiag error
27         * support/regression/generate-cases.py: fixed splitting of pathnames
28         with dots
29         * as/hc08/lklibr.c (addfile),
30         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
31
32 2006-04-11 Raphael Neider <rneider AT web.de>
33
34         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
35         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
36         * src/pic16/pcode.c (assignValnums): fixed #1460578
37
38 2006-04-11 Raphael Neider <rneider AT web.de>
39
40         * device/lib/pic/libdev/*.c,
41         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
42           fixes #1468739, enables compilation in --std-c99 mode
43         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
44
45 2006-04-11 Raphael Neider <rneider AT web.de>
46
47         * src/pic/device.c (find_device): removed debug output
48           (list_valid_pics): enabled verbose listing of supported devices
49         * device/include/stdbool.h: define bool as char for pic14/16 as well
50
51 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
52
53         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
54
55 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
56
57         * .version: bumped version to 2.5.6
58         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
59
60 2006-04-06 Raphael Neider <rneider AT web.de>
61
62         * .version: bumped version to 2.5.6 (pic14 ABI changed)
63         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
64         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
65           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
66             pic14_constructAbsMap
67           (pic14printPublics): declare absolute global symbols as global
68           (pic14createInterruptVect),
69         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
70           (newReg): assume new registers unused, use correct name in
71             hashtable (reg->name instead of name), more debugLog output
72         * src/pic/device.h (PIC_device): added fields for verbose output
73         * src/pic/device.c: moved device definition to pic14devices.txt,
74             added routines for runtime parsing of pic14devices.txt,
75             added support for second config word
76         * src/pic/main.c (_process_pragma): removed #pragma maxram,
77           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
78           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
79           (_pic14_parseOptions): moved pCodeInitRegisters here
80           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
81         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
82           (pCodeInitRegisters): rewrapped comments, perpared new approach to
83             handling the pseudo stack
84         * device/lib/Makefile.in: ignore failures in objects-pic16,
85         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
86         * device/lib/pic/NEWS: document new dependency on picXXX.lib
87         * device/lib/pic/Makefile.subdir,
88         * device/lib/pic16/Makefile.subdir: improved clean rules
89         * device/lib/pic/libdev/: NEW, pic14 device libraries
90         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
91         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
92         * device/include/Makefile.in: create subdir and install pic14 headers
93         * device/include/pic/p16f_common.inc: removed unused declarations
94         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
95             PICs from inc2h.pl v1.6,
96             replaced BIT_AT macros with struct declarations
97         * device/include/pic/pic14devices.txt: definition of supported devices,
98             all above improvements contributed by Zik Saleeba, thanks
99         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
100         * support/scripts/sdcc.nsi: also install pic14 device libraries and
101             headers
102
103 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
104
105         * device/include/mcs51/c8051f410.h: added interrupt numbers,
106         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
107           thanks to Charles Olds
108
109 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
110
111         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
112
113 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
114
115         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
116         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
117         * support/regression/bug1464657.c: added, new test
118
119 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
120
121         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
122           version number
123
124 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
125
126         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
127           --no-peep and --peep-file <file> are used don't use default rules but
128           do use the <file>
129
130 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
131
132         * src/mcs51/gen.c (genCall): fixed bug 1457608
133
134 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
135
136         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
137         changes seem to cause (trigger?) problems with the build system.
138
139 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
140
141         * src/SDCCpeeph.c (operandsLiteral): new, added,
142           (callFuncByName): inserted operandsLiteral
143         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
144
145 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
146
147         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
148         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
149
150 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
151
152         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
153           implemented patch 1120823 Thanks to Willy De la Court (normal
154           interrupts need an interrupt number now if they are made critical),
155           and enabled nesting of critical functions though not for gbz80
156           (genCritical, genEndCritical): added functions
157           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
158         * src/z80/mappings.i: added "ei" to all mappings
159
160 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
161
162         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
163         submitted by the Debian SDCC maintainer Aurelien Jarno:
164         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
165         archive with gcc 4.1 on mips and wrote the patch"
166
167 2006-03-16 Raphael Neider <rneider AT web.de>
168
169         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
170           the left operand is shorter than the result (c* = lit-c* + int),
171           fixes bug #1450796
172         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
173           OP_SYMBOL
174
175 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
176
177         * src/.version: increased version number to 2.5.5
178         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
179         linking is done manually in pic16 port's _linkEdit,
180         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
181         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
182         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
183         allocate asmop as AOP_ACC,
184         (aopForRemat): added parameter 'bool result' in function declaration,
185         (pic16_aopGet): return AOP_ACC when accessing WREG,
186         (pic16_popGetTempReg): minor modification,
187         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
188         'pic16_allocWithIdx',
189         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
190         calling function in absolute addresses,
191         (genAssign): take into account AOP_ACC asmop,
192         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
193         * src/pic16/pcoderegs.c: some debug functions and lines added,
194         * src/pic16/ralloc.c (decodeRegType): added but commented out,
195         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
196         register too,
197         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
198         call to allocReg, not by manually allocating a new one,
199         (pic16_assignRegisters): now before going through the register
200         allocating functions mark all registers as free. This eliminates some
201         side effects resulting from peephole parser done earlier in the backbone
202
203 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
204
205         * src/SDCCicode.c (geniCodeLogic),
206         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
207
208 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
209
210         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
211           (genSend): bugfix, do not allocate and free twice,
212           (shiftRLong): handle partially overlapping aops
213         * support/regression/tests/bitopcse.c: fixed warning redefined idata
214
215 2006-03-08 Borut Razem <borut.razem AT siol.net>
216
217         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
218           for pic16
219
220 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
221
222         * support/regression/tests/bug1409955.c: new, added
223         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
224         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
225           (aopForSym, aopOp): increment asmop.allocated if reused,
226           (freeAsmop): decrement asmop.allocated and check for zero instead of
227           using asmop.freed,
228           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
229           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
230            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
231            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
232            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
233            genSignedRightShift, genRightShift, genDataPointerGet,
234            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
235            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
236             in reverse order from allocation,
237           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
238             added swappedLR to keep track
239         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
240           pdata & code for GCC, z80, gbz80 & hc08
241         * support/regression/tests/zeropad.c: moved defines to testfwk.h
242
243 2006-03-08 Raphael Neider <rneider AT web.de>
244
245         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
246
247 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
248
249         * device/include/mcs51/c8051f410.h: new SiLabs mcu
250         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
251         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
252
253 2006-03-06 Borut Razem <borut.razem AT siol.net>
254
255         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
256           made the linker quiet
257
258 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
259
260         * src/pic16/gen.c (genPcall): fixed bug #1443644
261         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
262         which dumps before the function entry point a data byte which represents
263         the number of the local variables used by the specified function, added
264         'xinst' for initial support for Extended Instruction Support,
265         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
266         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
267         port->fun_prefix anymore (may change later),
268         (genFunction, genEndFunction): do not store/restore local registers for
269         _main (this should take care the --main-return command line option in
270         the future),
271         (genOr): removed some legacy pic-port instructions,
272         * src/pic16/genarith.c (genAddLit): re-enabled old code because
273         performing operations with SFR's causes data to be written more than
274         once to each SFR. Perhaps SFRs should be handled in special cases...
275         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
276         pcode.h
277         * src/pic16/main.c (_process_pragma): stack bound checking did not take
278         into account for stack starting position,
279         (struct OPTIONS pic16_optionsTable): added command line argument
280         --extended or -y for Extended Instruction Support,
281         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
282         (deassignLRs): *** perhaps the most important change, old 'for' code
283         (commented out for reference), didn't account for some registers which
284         were left marked 'not free' after a pointer operation. The change
285         reduces register usage a lot in some cases
286
287 2006-03-04 Borut Razem <borut.razem AT siol.net>
288
289         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
290           _clean
291         * support/regression/tests/bug-524697.c: decreased array size for
292           mcs51 to fit into the internal RAM
293         * support/regression/Makefile.in: a little bit more verbose
294
295 2006-03-03 Borut Razem <borut.razem AT siol.net>
296
297         * support/regression/fwk/lib/testfwk.c,
298           support/regression/fwk/include/testfwk.h: introduced function
299           _prints(), nonrecursive _printn(), call _initEmu() from main()
300         * support/regression/ports/gbz80/support.asm,
301           support/regression/ports/ucz80/support.asm,
302           support/regression/ports/z80/support.asm,
303           support/regression/ports/ds390/support.c,
304           support/regression/ports/hc08/support.c,
305           support/regression/ports/host/support.c,
306           support/regression/ports/mcs51/support.c,
307           support/regression/ports/xa51/support.c: added empty _initEmu()
308           function
309         * support/regression/ports/pic16/gpsim.cmd,
310           support/regression/ports/pic16/spec.mk,
311           support/regression/ports/pic16/support.c,
312           support/regression/Makefile.in: added pic16 regression test
313
314 2006-03-01 Raphael Neider <rneider AT web.de>
315
316         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
317           genConstPointerGet): use safe way of generating MOVFF to cover
318             literals as well as registers, fixes bug #1440527
319         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
320             dereference
321           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
322             more correctly, fixes bug #1232186
323           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
324         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
325             gplink guess the correct processor in more cases, applied patch
326             from Till Riedel attached to and fixing bug #1436552
327
328 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
329
330         * support/regression/tests/array.c: added, contains check for #1434401
331         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
332
333 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
334
335         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
336         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
337         * device/include/mcs51/c8051f326.h,
338         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
339         * device/include/mcs51/c8051f000.h,
340         * device/include/mcs51/c8051f018.h,
341         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
342           PCON_IDLE,PCON_STOP and added sfr16 definitions
343
344 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
345
346         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
347           genGetWord): fixed bug 1409955
348
349 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
350
351         * device/include/hc08/mc68hc908gp32.h,
352         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
353
354 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
355
356         * src/SDCCast.c (constExprValue): return NULL if not a value
357         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
358         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
359         * support/regression/tests/bitfields.c: enabled signed bitfield for all
360
361 2006-02-13 Borut Razem <borut.razem AT siol.net>
362
363         * src/regression/ptrarg.c: added, fails due to bug #1430967
364         * src/regression/Makefile: ptrarg.c added, ...
365
366 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
367
368         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
369         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
370
371 2006-02-11 Borut Razem <borut.razem AT siol.net>
372
373         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
374           print "Processor: xxx" message to stdout only if --verbose
375
376 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
377
378         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
379         * support/regression/tests/bug1426356.c: added
380         * support/regression/tests/bitfields.c: removed 2 tests
381
382 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
383
384         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
385         * device/include/mcs51/c8051f330.h,
386         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
387           PCON_IDLE,PCON_STOP and added sfr16 definitions
388         * device/lib/_divsint.c,
389         * device/lib/_divuint.c,
390         * device/lib/_divulong.c,
391         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
392           register bank bug for small stackauto
393
394 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
395
396         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
397
398 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
399
400         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
401         * all.dsp: corrected several bin paths
402         * device/include/mcs51/c8051f120.h,
403         * device/include/mcs51/c8051f300.h,
404         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
405           to PCON_IDLE,PCON_STOP
406         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
407         * device/lib/printf_large.c (output_float): fixed bug 1388703
408         * support/regression/tests/bug1057979.c: added test for bug 1388703
409
410 2006-02-08 Raphael Neider <rneider AT web.de>
411
412         * src/pic/pcode.c (pciTRIS): fixed typo,
413           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
414           (LinkFlow): fixed handling of flows that end in a call,
415           (ReuseReg): perform safety check earlier
416         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
417             to work with flows at the beginning of a pBlock,
418             fixes #1426557 (Symbol not previously defined),
419           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
420             usage information
421           (RemoveUnusedRegisters): update register usage info
422         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
423             created, reuse existing ones instead
424         * src/pic/gen.c (genPcall): fixed #1424719
425
426 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
427
428         * link/z80/lkmain.c,
429         * link/z80/lklex.c,
430         * link/z80/lkdata.c,
431         * link/z80/aslink.h: fixed build on current cygwin:
432         replaced getline() by lk_getline()
433
434 2006-02-01 Borut Razem <borut.razem AT siol.net>
435
436         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
437           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
438           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
439           src/regression/bool1.c, src/regression/bool2.c,
440           src/regression/bool3.c, src/regression/call1.c,
441           src/regression/compare.c, src/regression/compare10.c,
442           src/regression/compare2.c, src/regression/compare3.c,
443           src/regression/compare4.c, src/regression/compare5.c,
444           src/regression/compare6.c, src/regression/compare7.c,
445           src/regression/compare8.c, src/regression/compare9.c,
446           src/regression/configword.c, src/regression/for.c,
447           src/regression/inline.c, src/regression/mult1.c,
448           src/regression/nestfor.c, src/regression/or1.c,
449           src/regression/pointer1.c, src/regression/ptrfunc.c,
450           src/regression/rotate1.c, src/regression/rotate2.c,
451           src/regression/rotate3.c, src/regression/rotate4.c,
452           src/regression/rotate5.c, src/regression/rotate6.c,
453           src/regression/rotate7.c, src/regression/string1.c,
454           src/regression/struct1.c, src/regression/sub.c,
455           src/regression/sub2.c, src/regression/switch1.c,
456           src/regression/while.c, src/regression/xor.c,
457           src/regression/create_stc, src/regression/simulate,
458           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
459           regression tests
460         * src/regression/gpsim_assert.h: added
461
462 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
463
464         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
465         ((void (code *) (void)) 0) ();
466         * as/hc08/aslex.c,
467         * as/hc08/aslink.h,
468         * as/hc08/asm.h,
469         * as/hc08/asmain.c,
470         * as/hc08/lkdata.c,
471         * as/hc08/lklex.c,
472         * as/hc08/lkmain.c,
473         * as/mcs51/aslex.c,
474         * as/mcs51/aslink.h,
475         * as/mcs51/asm.h,
476         * as/mcs51/asmain.c,
477         * as/mcs51/lkdata.c,
478         * as/mcs51/lklex.c,
479         * as/mcs51/lkmain.c,
480         * as/z80/aslex.c,
481         * as/z80/asm.h,
482         * as/z80/asmain.c: fixed build on current cygwin:
483         replaced getline() by as_getline()
484
485 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
486
487         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
488         declarator in the symbol chain
489         * src/SDCCsymt.h,
490         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
491         parameter list for function pointers
492         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
493         * support/regression/tests/bug-716242.c: added
494
495 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
496
497         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
498         offset if possible
499         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
500
501 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
502
503         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
504         inifinitely recurseable, added static
505         * support/regression/tests/bug-1408066.c: added
506
507 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
508
509         * src/SDCCicode.h,
510         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
511         renamed, added possibility to create "postLoopLbl"-labels
512         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
513         newiTempLoopHeaderLabel
514         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
515         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
516         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
517         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
518         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
519         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
520         (basicInduction): fixed bug #136564, made static,
521         (loopInduction): changed parameter of basicInduction, made static,
522         (addPostLoopBlock): added
523         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
524         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
525         findLoopEndSeq
526         * support/regression/tests/bug-136564.c: added
527         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
528         --std-sdcc99 to LIBSDCCFLAGS
529
530 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
531
532         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
533         while loop
534         * support/regression/tests/bug-1406131.c: added
535
536 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
537
538         * src/SDCCast.c (decorateType): fix promotion of unary minus
539         * src/SDCCsymt.c (computeType): beautified
540         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
541         (valUnaryPM, valComplement): fix sign and promotion,
542         (valNot): ANSI: result type is int (SDCC: unsigned char)
543         * support/regression/tests/uminus.c: speedup by removing superflous
544         test case 'int'
545         * support/regression/tests/onebyte.c: added promotion and signedness
546         tests for unary minus
547         * support/regressions/tests/bug-477927.c: disable warning about
548         uninitialized variables
549         * support/regression/tests/not.c: added
550
551 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
552
553         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
554         * src/mcs51/gen.c (gen51Code): show final register usage after
555         fillGaps in asm with --i-code-in-asm
556         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
557         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
558         incUsed, rliveClear, adjustIChain): made static,
559         (setFromRange): excluded because it's unused,
560         (findPrevUseSym, markWholeLoop): added,
561         (findPrevUse): rewritten; fixes bug 895992; now a complete search
562         through all branches of predecessors enables sdcc to emit the warning
563         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
564         (rlivePoint): made static, added parameter emitWarnings which is only
565         true during the first run out of two,
566         (findRecursiveSucc, findRecursivePred): removed,
567         (computeLiveRanges): made static, added parameter emitWarnings,
568         (dumpIcRlive): added for debugging only
569         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
570         removed prototype of setFromRange()
571         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
572         in call of computeLiveRanges()
573         * support/regression/tests/bug-895992.c: added
574         * support/regression/tests/bug-971834.c: added
575         * support/valdiag/tests/bug-895992.c: added
576         * support/valdiag/tests/bug-971834.c: added
577
578 2005-12-18 Raphael Neider <rneider AT web.de>
579
580         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
581           (genUnpackBits): improved code for direct operands,
582           (genPackBits): improved code for literal assignment to bitfields
583             and for direct destination operands (no FSR indirection),
584             prevented redundant AND, fixes #1362800,
585           (AccLsh): added parameter to disable masking of the result
586         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
587           skip instructions with side-effects (like incfsz),
588           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
589         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
590         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
591           fixes #1375263
592
593 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
594
595         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
596         volatile variables as spill location
597
598 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
599
600         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
601         replacing literals
602         * support/regression/tests/bug-1376320.c: added
603
604 2005-12-08 Raphael Neider <rneider AT web.de>
605
606         * src/pic/device.c: renamed is_shared to pic14_is_shared
607         * src/pic/gen.c (genIfx): re-enabled handling of sbits
608         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
609           (is_valid_identifier): added for above workaround
610
611 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
612
613         * device/lib/Makefile.in: fixed to enable port-specific-objects
614         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
615           char, thanks Hubert Sack
616         * doc/sdccman.lyx: documented --xstack-loc,
617           elaborated a bit more on interrupts and pitfalls,
618           removed "setjmp/longjmp unsupported",
619           documented some unsupported C99 features
620         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
621         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
622           if, thanks Hubert Sack
623         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
624         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
625           make make_library
626         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
627           regression tests can report resource usage (rfe 700441)
628         * support/regression/collate-results.py: report resource usage
629         * support/regression/ports/ds390/spec.mk,
630         * support/regression/ports/hc08/spec.mk,
631         * support/regression/ports/mcs51/spec.mk,
632         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
633         * support/regression/ports/ds390/uCsim.cmd,
634         * support/regression/ports/hc08/uCsim.cmd,
635         * support/regression/ports/mcs51/uCsim.cmd,
636         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
637         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
638           library, use the default one
639         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
640           building the library
641
642 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
643
644         * config.dsp: added dependency on .version and configure_vc.awk
645         * device/include/setjmp.h: updated for --stack-auto and --xstack
646         * device/include/mcs51/at89c51snd1c.h: corrected line endings
647         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
648         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
649         * device/lib/libsdcc.lib: added _setjmp
650         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
651           (decorateType): fixed bug 1372851,
652           (optimizeGetHbit): fixed warning
653         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
654           array initialisation
655         * support/regression/tests/bug1057979.c: added test for bug 1358192
656         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
657
658 2005-12-03 Borut Razem <borut.razem AT siol.net>
659
660         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
661           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
662
663 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
664
665         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
666         createIval): implement symbol independant "flexible array member",
667         (createIvalCharPtr): implemented flexible array initialisation with a
668         string
669         * src/SDCCsymt.c (copyStruct): removed,
670         (getSize): fixed misleading comment,
671         (getAllocSize): removed, the additional allocation size is now in
672         sym->flexArrayLength,
673         (checkStructFlexArray): new, syntax checks for flexible array members,
674         (compStructSize): added syntax checks for "flexible array members"
675         (copyStruct): removed,
676         (copyLinkChain): removed inefficient fix for bug 770487
677         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
678         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
679         symbol->flexArrayLength
680         * src/SDCCerr.c,
681         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
682         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
683         * support/regression/tests/structflexarray.c: added
684         * support/valdiag/tests/structflexiblearray.c: added
685
686 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
687
688         * src/SDCCast.c (decorateType): fixed bug 1368489
689         * support/Util/SDCCerr.c,
690         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
691
692 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
693
694         * device/include/mcs51/at89c51snd1c.h: added file submitted by
695           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
696
697 2005-11-27 Borut Razem <borut.razem AT siol.net>
698
699         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
700           support/cpp2/mkdeps.h: added command line option
701           -obj-ext=<extension> to SDCPP to define object file externion, used
702           for generation of make dependencies (-M)
703         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
704
705 2005-11-26 Borut Razem <borut.razem AT siol.net>
706
707         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
708           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
709           added pic and pic16 libraries
710
711 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
712
713         * device/include/float.h: Corrected typo in prototype of __fsgt
714
715 2005-11-25 Borut Razem <borut.razem AT siol.net>
716
717         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
718           added creation of model-mcs51-stack-auto libraries
719
720 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
721
722         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
723         and fields-list too
724         * src/SDCCast.c (createIvalArray): removed obsolete comment
725
726 2005-11-24 Borut Razem <borut.razem AT siol.net>
727
728         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
729           added missing device/lib/mcs51/crt*.asm sources
730
731 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
732
733         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
734
735 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
736
737         * device/lib/_fs2schar.c,
738         * device/lib/_fs2sint.c,
739         * device/lib/_fs2slong.c: optimized inline asm
740
741 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
742
743         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
744           Better handling of floats between -1.0 and 0.0.
745
746 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
747
748         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
749           (the missing "if"s prohibited removal of redundant labels)
750
751 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
752
753         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
754           Properly convert floats between -1.0 and 0.0 to long, int, and char
755           types (max integer value of negative floats tends to zero).
756         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
757           Removed changes made so to work properly with floats between
758           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
759           and _fs2char.c
760
761 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
762
763         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
764         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
765         (genCast) cosmetic change
766         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
767         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
768         from mcs51
769         * support/regression/tests/bitfields (testSignedBitfields): added
770
771 2005-11-18 Borut Razem <borut.razem AT siol.net>
772
773         * sdcc/device/lib/Makefile.in: remove all unnecessary files
774         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
775           introduced SILENT option to make building of pic16 libraries less
776
777 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
778
779         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
780           Now they work properly with floats between -1.0 and 0.0
781         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
782
783 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
784
785         * src/SDCCicode.c (printOperand): added missing else
786
787 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
788
789         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
790         reformatted for better readability
791         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
792         signed bitfields
793
794 2005-11-17 Borut Razem <borut.razem AT siol.net>
795
796         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
797           introduced SILENT option to make building of pic16 libraries less
798           verbose - used for nightly snapshot build
799         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
800           available on Win32 platforms.
801         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
802           medium, large, pic and pic16
803
804 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
805
806         * device/lib/printf_large.c: Temporary patch for bug 1358192:
807           printf("%f"...) sets fraction to zero.
808
809 2005-11-16 Raphael Neider <rneider AT web.de>
810
811         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
812           fixes #1357221
813         * src/pic/gen.c (genIfx): implemented for CARRY bit
814         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
815           to generic pointers, fixes #1357332,
816           (pic16_movLit2f): NEW,
817           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
818
819 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
820
821         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
822
823 2005-11-11 Raphael Neider <rneider AT web.de>
824
825         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
826         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
827           compute pointer's type from operand,
828           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
829           improved single bit reads, fixes bug #1353379
830
831 2005-11-09 Borut Razem <borut.razem AT siol.net>
832
833         * support/scripts/sdcc.nsi: added lib/pic to the package
834
835 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
836
837         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
838
839 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
840
841         * support/regression/tests/bug1348008.c: added
842         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
843         * support/regression/tests/bug1337835.c: updated comment
844
845 2005-11-06 Borut Razem <borut.razem AT siol.net>
846
847         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
848           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
849           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
850           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
851           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
852           dynamic construction of cl_error_class and derivates - 2.nd try
853
854 2005-11-05 Borut Razem <borut.razem AT siol.net>
855
856         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
857           bug, which caused Bus Errors on sparc solaris
858
859 2005-11-04 Borut Razem <borut.razem AT siol.net>
860
861         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
862           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
863           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
864           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
865           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
866           and derivates to resolve the initialization problem on OSX
867
868 2005-11-02 Borut Razem <borut.razem AT siol.net>
869
870         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
871           corrected typo - #include <winsock2.h>
872
873 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
874
875         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
876           (_asxxxx_mapping): added org directive for future enhancements
877
878 2005-11-01 Borut Razem <borut.razem AT siol.net>
879
880         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
881           enabled sockets on WIN32
882         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
883
884 2005-10-31 Borut Razem <borut.razem AT siol.net>
885
886         * support/regression/generate-cases.py: escape backslashes in {testcase}:
887           WIN32 backslash path delimiters should be escaped when used in C strings
888         * support/regression/tests/bitfields.c: exclude failing assertions for
889           __CYGWIN32__ and __MINGW32__ hosts
890
891 2005-10-30 Borut Razem <borut.razem AT siol.net>
892
893         * src/SDCCutil.c: corrected double comparison typo
894
895 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
896
897         * device/lib/medium/Makefile: added for new memory model medium
898         * device/include/asm/mcs51/features.h: updated for medium/pdata
899         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
900           added Multiply & Accumulate sbit's and MAC0_PAGE define
901         * device/include/mcs51/c8051f300.h: added sfr16 definitions
902         * device/include/mcs51/c8051f310.h: added sfr16 definitions
903         * device/lib/_mullong.c: update for medium model
904         * device/lib/incl.mk: added medium model
905         * doc/sdccman.lyx: documented medium model
906         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
907         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
908         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
909         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
910           (allocParms): set SCLS and OCLS to pdata for medium model
911         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
912           for pdata,
913           (powof2): return <0 if not power of 2
914         * src/avr/gen.c (genBitWise): use updated powof2
915         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
916           (shiftR2Left2Result): small optimization in setup, save acc when storing,
917           (shiftLLeftOrResult): use B if necessary
918         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
919         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
920         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
921         * support/regression/Makefile.in: added test-mcs51-medium
922         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
923
924 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
925
926         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
927         specifier unsigned
928         * device/lib/time.c (mktime): fixed bug 1334315
929
930 2005-10-28 Raphael Neider <rneider AT web.de>
931
932         * device/include/pic/p16f_common.inc: added common declarations
933         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
934
935 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
936
937         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
938           (aopPutUsesAcc): added to predict accumulator use,
939           (assignResultValue): save acc if necessary,
940           (genMinusDec): store result if indirectly addressed,
941           (genDivOneByte):  save acc if necessary,
942           (movLeft2Result): bugfix if left already in acc,
943           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
944             attention to accumulator use (esp. pdata),
945           (genReceive): receive pdata correctly
946         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
947         * src/SDCCicode.h: added isOperandInPagedSpace prototype
948
949 2005-10-27 Raphael Neider <rneider AT web.de>
950
951         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
952
953 2005-10-27 Raphael Neider <rneider AT web.de>
954
955         * .version: changed version to 2.5.4
956         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
957         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
958           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
959             arithmetics support routines
960         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
961         * device/lib/Makefile.in: also create installdir for pic
962
963         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
964           pic14 port as well
965         * src/pic/device.c (dump_sfr): rewritten to delegate register
966           placement to the linker (use `extern sym' rather than sym EQU addr),
967           (validAddress): fixed to check last specified address
968         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
969           (popGetLit): truncate literal value to 8 bit,
970           (popGet): moved assert to more appropriate place
971           (popGetExternal): create pCode operand from and mark the according
972             symbol as being `extern'
973           (popGetAddr): added sanity check on immediate's offset, provide
974             GPOINTER tag on demand
975           (aopPut): fixed for immediates,
976           (mov2w_op): move operand's address or contents to WREG (depending on
977             operand type), safer variant of mov2w,
978           (movwf,call_libraryfunc): NEW, handy abbreviations,
979           (get_argument_pcop,get_return_val_pcop,pass_argument,
980           get_returnvalue): interface for accessing function parameters and
981             return values,
982           (assignResultValuei,genRet): use new parameter/return value interface
983           (pic14_getDataSize): back to old version handling generic pointers,
984           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
985             provided implementation and/or fixed old one,
986           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
987             calls, removed legacy 8051 reference code
988           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
989           (loadSignToC): NEW, move the operands sign bit to CARRY,
990           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
991             genRightShiftSigned, accepts negative shift counts,
992           (setup_fsr): load FSR and adjust IRP (indirect memory access),
993           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
994             generic pointers, __data pointers and __code pointers,
995           (genUnpackBits,genPackBits): rewritten to work with generic pointers
996             and signed bitfields, limit bitfields to 8 bit,
997           (genDataPointerGet): fixed number of bytes read,
998           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
999           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1000             pointers to constant data are no longer assumed to point to __code
1001             space, removed invalid pointer types,
1002           (bitpatternFromVal): retrieve the PICs representation of an integer
1003             or float literal,
1004           (genDataPointerSet): fixed assigning to po_immediate operands,
1005           (genGenPointerSet): implemented as library call,
1006           (genIfx): fixed incorrect condition,
1007           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1008             provide GPOINTER tag according to destination's storage class,
1009           (genCast): added code to handle casting to generic pointers, added
1010             sign-/zero extension of the result
1011           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1012         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1013         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1014           extend the result
1015         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1016           address/register resides in the shared banks
1017           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1018             put all variables into separate sections (have the linker arrange
1019             them)
1020           (picglue): put init code and interrupt handlers in separate sections
1021         * src/pic/main.c: added port specific options table, modified to PORT
1022           structure to make GPOINTERs 3 byte, added pic14_options
1023           (_pic14_do_link): private linking routine (update paths to libraries,
1024             add libsdcc.lib by default)
1025         * src/pic/main.h: declare pic14_options
1026         * src/pic/pcode.c: fixed instructions i/o relations,
1027           (RegCond): reverted to correct version,
1028           (newpCodeOpLit): truncate literals to 8 bit,
1029           (genericPrint): added debug output,
1030           (getRegFromInstruction): fixed for various operand types, simplified
1031           (BuildFlow): fixed broken handling of isntructions with labels
1032           (LinkFlow): start at last instruction in flow (skip trailing comments),
1033             pass the flow on to the next instruction after CALL
1034           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1035           (insertPCodeInstruction): fixed inserting after a skip instruction,
1036           (DoBankSelect): fixed for labeled instructions
1037           (OptimizepBlock): honor --nopeep switch
1038           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1039         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1040         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1041           (pCodeOptime2pCodes): allow disabling this optimization via
1042             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1043             but is still buggy), started implementation of a dataflow based
1044             pCode optimization (CSE + dead code elimination)
1045           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1046         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1047           names are independant of the stack location and therefore portable across
1048           devices
1049
1050 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1051
1052         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1053           (selectSpil): fixed bug 1337835 by not spilling bit variables
1054         * support/regression/tests/bug1337835.c: added test for this bug
1055         * src/mcs51/peeph.def: restart after rule 3.c,
1056           addded rules 263.x to optimize loading constants
1057
1058 2005-10-26 Raphael Neider <rneider AT web.de>
1059
1060         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1061         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1062           (genAssign): emit warning when casting literals to generic pointer
1063             type, also applies when taking the address of a fixed variable,
1064           (genCast): improved casting to generic pointers
1065         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1066           extern variables, added verbose error message
1067         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1068
1069 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1070
1071         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1072         carry must be complemented too
1073         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1074         could be emitted by genMinus
1075         * src/SDCCval.c (constVal): fixed bug 1305065
1076
1077 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1078
1079         * src/SDCCast.c (addCast): added promotion for bit variables
1080         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1081         promotion casts + optimisation
1082         (optimizeGetWord): fix warning 'i' might be used uninitialized
1083         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1084         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1085
1086 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1087
1088         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1089         all chars are promoted to int; promotion should be handled in SDCCast.c
1090
1091 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1092
1093         * device/lib/_strcmp.c: Fixed bug 1326457
1094
1095 2005-10-11 Raphael Neider <rneider AT web.de>
1096
1097         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1098         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1099
1100 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1101
1102         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1103         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1104
1105 2005-10-04 Raphael Neider <rneider AT web.de>
1106
1107         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1108           device/lib/pic16/pics.all: added pic18f1320
1109         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1110
1111 2005-09-30 Raphael Neider <rneider AT web.de>
1112
1113         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1114         * src/pic16/devices.inc: NEW, provides device descriptions
1115         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1116
1117 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1118
1119         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1120           GETHBIT
1121
1122 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1123
1124         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1125           documented Any Order Bit, Higher Order Byte and Higher Order Word
1126         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1127         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1128           (optimizeGetAbit): new, to get any bit, not only the high bit,
1129           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1130           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1131           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1132           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1133             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1134             GETABIT, GETBYTE, GETWORD: decorate them,
1135           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1136           (ast_print): added GETABIT, GETBYTE, GETWORD
1137         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1138         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1139           (geniCodeBinary): new generic binary icode,
1140           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1141         * src/port.h: updated comment for PORT.hasExtBitOp
1142         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1143           (genGetByte): new, to get a single byte,
1144           (genGetWord): new, to get a word from a long,
1145           (gen51Code): added GETABIT, GETBYTE, GETWORD
1146         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1147
1148 2005-09-23 Raphael Neider <rneider AT web.de>
1149
1150         * configure.in, configure: have device/lib/pic configured
1151         * device/lib/Makefile.in: added model-pic14
1152         * device/lib/clean.mk: added pic/ to clean rule
1153         * device/lib/pic: added rudimentary pic14 library providing support
1154           functions for multiplication/division/generic pointer access
1155         * src/SDCCopt.c (convilong): mark support functions as extern
1156           for pic14 port as well
1157         * src/pic/gen.c (genMult): added assertions,
1158           (genpic14Code): emit warning on unhandled iCodes
1159         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1160         * src/pic/pcode.c (pCodeOpCopy),
1161         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1162           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1163           SFR_REGISTER}), made safe for future extensions
1164         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1165           instructions even if preceeded by SKIP instructions (also remove
1166           them); removed unused code
1167         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1168           prevents leaving parts of the structure uninitialized after copying
1169
1170 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1171
1172         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1173           ago by me
1174         * support/regression/tests/addsub.c: added test for the bug
1175
1176 2005-09-21 Raphael Neider <rneider AT web.de>
1177
1178         * device/include/pic16/pic18f1220.h,
1179           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1180         * device/lib/pic16/Makefile.rules: added missing opening paren
1181         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1182           are provided in genutils.c,
1183           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1184           operand/result sizes,
1185           (genCmp): assert on NULL pointers first, then check deref'ed values
1186         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1187           result size
1188
1189 2005-09-18 Raphael Neider <rneider AT web.de>
1190
1191         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1192           as these are now unused,
1193           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1194         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1195           local, avoids uninitialized pointer dereference on r->name
1196         * src/pic16/ralloc.c (newReg): fixed indentation
1197
1198 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1199
1200         * src/SDCCval.c (constVal): fixed bug 730366
1201         * support/Util/SDCCerr.c,
1202         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1203
1204 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1205
1206         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1207
1208 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1209
1210         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1211
1212 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1213
1214         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1215           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1216         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1217           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1218         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1219         * packihx/packihx.c (hexDigit): made c unsigned char
1220         * as/mcs51/lklibr.c (fndsym),
1221         * link/z80/lkgb.c (gb),
1222         * link/z80/lklibr.c (fndsym),
1223         * link/z80/lkrloc.c (relr),
1224         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1225         * src/SDCC.lex (checkCurrFile, process_pragma),
1226         * src/SDCCglue.c (spacesToUnderscores),
1227         * src/SDCCmain.c (setParseWithComma, processFile),
1228         * src/asm.c (tvsprintf, printCLine),
1229         * src/avr/gen.c (emitcode, aopPut),
1230         * src/ds390/gen.c (emitcode),
1231         * src/hc08/gen.c (emitcode, emitinline),
1232         * src/mcs51/gen.c (emitcode, genInline),
1233         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1234           tokenizeLineNode),
1235         * src/pic/ralloc.c (debugLog),
1236         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1237           tokenizeLineNode),
1238         * src/pic16/ralloc.c (debugLog),
1239         * src/z80/main.c (_process_pragma):
1240            made all ctype.h function calls safe
1241         * src/SDCCopt.c: include math.h for fabs
1242         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1243           and used them throughout the code to make ctype.h function calls safe
1244         * src/ds390/main.c (asmLineNodeFromLineNode),
1245         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1246         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1247            unsigned char*
1248         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1249           (newpCodeAsmDir): made ctype.h function calls safe
1250         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1251           pic16_emitcode):  made lbp unsigned char*
1252         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1253           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1254         * src/xa51/gen.c (emitcode),
1255         * src/z80/gen.c (_emit2): made lbp unsigned char*
1256         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1257            char*
1258
1259 2005-09-05 Raphael Neider <rneider AT web.de>
1260
1261         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1262           access bank splitpoint
1263
1264 2005-09-05 Raphael Neider <rneider AT web.de>
1265
1266         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1267
1268 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1269
1270         * .version: changed to version 2.5.3
1271         * doc/sdccman.lyx: changed version to 2.5.3,
1272           documented --codeseg and --constseg and pragma codeseg and constseg,
1273           documented bit parameters (reentrant) and bit returning
1274         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1275            currFunc->recvSize, but is this ok for all ports?
1276           (ast2iCode): result of ~ on unsigned char must be cast to int for
1277            bool to work
1278         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1279           function pointers in bit space
1280         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1281           (processFuncArgs): call port.reg_parm() with reentrancy info
1282         * src/port.h,
1283         * src/avr/main.c,
1284         * src/ds390/main.c,
1285         * src/hc08/main.c,
1286         * src/pic/main.c,
1287         * src/pic16/main.c,
1288         * src/xa51/main.c,
1289         * src/z80/main.c: port.reg_parm prototype extended with
1290           "bool reentrant" parameter
1291         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1292           options.stackAuto for allocating bit register parameters
1293         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1294           (genSend): set BitBankUsed if it is,
1295           (selectRegBank): factored out of genCall for use in genPcall,
1296           (genCall): removed redundant dtype assignmen, use selectRegBank,
1297           (genPcall): handle returning in Carry properly, save in F0 if needed,
1298           (genReceive): handle bit register parameters
1299         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1300           (mcs51_assignRegisters): enable bit registers for all reentrant
1301            functions and don't set BitBankUsed unconditionally
1302         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1303         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1304         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1305
1306 2005-08-27 Borut Razem <borut.razem AT siol.net>
1307
1308         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1309         ppc-osx (Darwin) does not support -u option. It seems that it is
1310         supported only on Linux - GNU cp
1311
1312 2005-08-25 Borut Razem <borut.razem AT siol.net>
1313
1314         * sim/ucsim/gui.src/serio.src/Makefile.in,
1315           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1316           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1317           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1318           install and strip, since the strip at /usr/ccs/bin should be used
1319           on solaris
1320
1321 2005-08-24 Borut Razem <borut.razem AT siol.net>
1322
1323         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1324
1325 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1326
1327         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1328         ffffffffu
1329
1330 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1331
1332         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1333         * as/mcs51/lkmain.c (link_main): fixed warning
1334         * device/include/stdbool.h: ds390 has no advanced bit support yet
1335         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1336         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1337         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1338           and updated their macros
1339         * src/SDCCval.c (constVal): updated comment for renamed b_long
1340
1341 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1342
1343         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1344         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1345           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1346           (oprio): set priority for '['
1347         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1348            and adb_24_bit
1349         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1350         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1351         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1352         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1353           added overlayable BIT_BANK area
1354         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1355           (summary2): explain 'T' in legenda
1356         * as/mcs51/lkrloc.c: replaced old K&R style,
1357           (relr): added R_BIT processing,
1358           (errmsg): added "Bit-addressable relocation error",
1359           (adb_bit): added for converting from byte- to bit-addressable space,
1360           (adb_24_bit): added for converting from byte- to bit-addressable space
1361         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1362            used in reentrant functions now even as return value
1363         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1364         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1365           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1366         * src/SDCCglobl.h: added indicator BitBankUsed
1367         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1368            the bit registers b0-b7
1369         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1370           (geniCodeCast): fixed bug 1263853,
1371           (geniCodeLogicAndOr): put result in bool or char,
1372           (geniCodeReceive): added parameter func for accessing the return type,
1373           (geniCodeFunctionBody): pass func to geniCodeReceive
1374         * src/SDCCmain.c: added indicator BitBankUsed
1375         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1376         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1377           (checkSClass): don't put automatic bool/bit on stack,
1378           (checkFunction): removed check on function cannot return bit
1379         * src/SDCCsymt.h: added newBoolLink prototype
1380         * src/mcs51/gen.c (rb1regs): added bit registers,
1381           (movc): created for assigning to carry,
1382           (pushReg, popReg): created for pushing registers,
1383           (sameRegs): check both AOP_REG and AOP_CRY types,
1384           (aopOp): handle bit registers,
1385           (aopPut): optimization no self-assign,
1386           (saveRegisters): push reg->base (bits) only once for bit registers,
1387            and use pushReg,
1388           (unsaveRegisters): pop reg->base only once and use popReg,
1389           (assignResultValue): added parameter func and return in carry for bits,
1390           (genIpush): optimization no reload in A if not changed,
1391           (genSend): bit parameters in reentrant functions are passed in bit
1392            registers by first assigning to bits in B, then save registers and
1393            copy B to bits,
1394           (genCall): handle returning in Carry properly, save it in F0 if needed,
1395           (genPcall): updated assignResultValue call, this is not safe yet for bit
1396            returning function !!!
1397           (genFunction): don't generate equ's for bit registers and use pushReg,
1398           (genEndFunction): take care of bit returning functions and use popReg,
1399           (genRet): return bit in Carry,
1400           (genIfx): optimize bit registers and other directly addressable bits,
1401           (genReceive): updated assignResultValue call
1402         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1403           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1404            registers when using stack-auto
1405         * src/mcs51/ralloc.c (_G): added allBitregs,
1406           (regs8051): added the bit registers,
1407           (createStackSpil): use macro IS_BIT,
1408           (getRegBit): added to allocate a bit register, else spill,
1409           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1410           (updateRegUsage): factored out to ease stepping while debugging,
1411           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1412            also allocate bit registers,
1413           (fillGaps): handle bit registers,
1414           (findAllBitregs): added to create bit vector with all bit registers,
1415           (mcs51_allBitregs): returns this bit vector,
1416           (mcs51_assignRegisters): when using stack-auto use bit registers for
1417            passing parameters and creating local variables
1418         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1419
1420 2005-08-22 Borut Razem <borut.razem AT siol.net>
1421
1422         * device/lib/Makefile.in: replaced find option -or with -o
1423           to make it run on solaris
1424
1425 2005-08-22 Raphael Neider <rneider AT web.de>
1426
1427         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1428           fixes #1265442 (crash on Solaris)
1429
1430 2005-08-20 Borut Razem <borut.razem AT siol.net>
1431
1432         * configure, configure.in: added tests for libsocket and libnsl libraries,
1433           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1434           from support/regression/Makefile.in
1435         * support/regression/Makefile.in: added
1436         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1437         * sim/ucsim/libtool: regenerated on sparc-solaris
1438         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1439           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1440           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1441           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1442           sparc-solaris, which doesn't use GNU ld linker
1443         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1444         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1445
1446 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1447
1448         * src/mcs51/peeph.def: updated comments
1449
1450 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1451
1452         * device/lib/_gptrget.c,
1453         * device/lib/_gptrput.c: slightly shorter
1454         * doc/sdccman.lyx: incremented version
1455         * src/mcs51/peeph.def: moved peephole comments to the line of first
1456           change to better keep line correlation, reanimated 186.e
1457         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1458
1459 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1460
1461         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1462           David Saxton with quotes around file name.
1463
1464 2005-08-15 Borut Razem <borut.razem AT siol.net>
1465
1466         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1467           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1468           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1469           make tests run on x86_64 platform
1470
1471 2005-08-13 Raphael Neider <rneider AT web.de>
1472
1473         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1474           as it might be executed DURING a build (parallel make is wonderful)
1475
1476 2005-08-13 Raphael Neider <rneider AT web.de>
1477
1478         * device/lib/Makefile.in (port-specific-objects-pic16):
1479           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1480         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1481           dependency
1482         * device/lib/pic16/Makefile.rules: build subdirs before creating
1483           the library, removed builddir rule, create $(builddir) early in
1484           recurse rule, use empty recurse rule for leaf directories
1485         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1486           mkdir errors (race condition), removed duplicate suffix "hex"
1487           from clean rules
1488         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1489         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1490           prevents mkdir -p from aborting on Alpha
1491
1492 2005-08-12 Raphael Neider <rneider AT web.de>
1493
1494         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1495           db-statements in order to allow for arrays of pointers in code
1496           sections to be placed without interspersed 0-padding, fixes
1497           bug #1256215
1498         * (emitStatistics): fixed division by zero for pic18f1220
1499         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1500           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1501         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1502         * (pic16_pCodeConstString): keep track of already emitted string
1503           literals to prevent "duplicate definitions of symbol _str_NR"
1504         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1505           debug message
1506         * device/lib/Makefile.in: ignore failing PIC16 library builds
1507         * device/lib/pic16/Makefile: do not build if gputils are missing
1508         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1509
1510 2005-08-10 Raphael Neider <rneider AT web.de>
1511
1512         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1513           my last commit)
1514
1515 2005-08-10 Raphael Neider <rneider AT web.de>
1516
1517         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1518           Rokas' patch to add the new fixed point type "__fixed16x16"
1519         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1520           functions for __fixed16x16 arithmetics
1521         * device/lib/pic16: reimplemented the build system to support
1522           a separate build directory, better handling of libio (create
1523           the library in a separate subdir for each architecture) and
1524           easier configuration (centralized in Makefile.common)
1525
1526 2005-08-07 Raphael Neider <rneider AT web.de>
1527
1528         * src/pic16/gen.c (genrshTwo): fixed sign extension
1529         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1530         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1531           added T0CONbits
1532         * device/include/pic16/pic18f4220.h: NEW, header for
1533           pic18f4220 and pic18f4320
1534         * device/include/pic16/pic18fregs.h: added new devices,
1535           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1536         * device/include/pic16/signal.h: resolved name clashes
1537           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1538           to also allow testing for interrupt enable bits, added
1539           comments on how to use the macros
1540         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1541         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1542           register definitions for the devices
1543         * device/lib/pic16/pics.all: added new devices
1544         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1545           allocated memory
1546         * device/lib/pic16/libc/stdlib/memfree: do not count
1547           the block header as free memory
1548         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1549           simplified and added missing end-of-blocklist-marker
1550           (reported by Peter Onion, fixes #1252814)
1551         * (_mergeHeapBlock): fixed loop condition
1552         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1553           len==0, restructured code
1554         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1555           up a bit, reduced bitfield accesses, prevent endless loops
1556           in case of heap corruption
1557         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1558           "unreferenced arguments/must return a value" warnings
1559         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1560           replaced BAUDREG with SPBRG
1561         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1562           device/lib/pic16/debug/gstack/gstack.c: replaced
1563           _naked, _asm, _endasm with __naked, __asm, __endasm
1564
1565 2005-08-05 Raphael Neider <rneider AT web.de>
1566
1567         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1568           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1569
1570 2005-08-05 Borut Razem <borut.razem AT siol.net>
1571
1572         * device/lib/Makefile.in: added missing ';'
1573         * configure: removed ^M characters
1574
1575 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1576
1577         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1578           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1579           License
1580
1581 2005-08-04 Borut Razem <borut.razem AT siol.net>
1582
1583         * configure.in: pic16 libraries build 2nd try - enable running
1584           configure in device/lib/pic16
1585         * configure: regenerated from configure.in
1586         * device/lib/Makefile.in: create $(PORT)/bin directory
1587
1588 2005-08-03 Raphael Neider <rneider AT web.de>
1589
1590         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1591           to get/set values via pointers
1592         * (genUnpackBits,genPackBits): changed detection of
1593           ptr->bitfield vs. sym.bitfield, fixed access via generic
1594           pointers, removed dead (wrong) code for multibyte bitfields
1595         * (genNearPointerGet, genGenPointerGet): removed useless code,
1596           fixed bitfield detection, fixes #1250594
1597         * (genNearPointerSet): removed useless code
1598         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1599           and introduced macro pic16_emitpcode that conditionally emits
1600           the origin of the following pCode (useful for debugging SDCC)
1601         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1602         * (createDefmap): fixed handling of LFSR for --optimize-df
1603
1604 2005-08-02 Borut Razem <borut.razem AT siol.net>
1605
1606         * device/lib/Makefile.in: pic16 libraries build enabled since
1607           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1608
1609 2005-08-02 Raphael Neider <rneider AT web.de>
1610
1611         * src/pic16/gen.c (genPackBits): removed deprecated warning
1612         * (genGenPointerSet): fixed bitfield detection
1613
1614 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1615
1616         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1617
1618 2005-07-31 Raphael Neider <rneider AT web.de>
1619
1620         * device/lib/pic16/libdev/pic18f458.c,
1621           device/include/pic16/pic18f458.h: added missing T0CONbits
1622
1623 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1624
1625         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1626
1627 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1628
1629         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1630
1631 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1632
1633         * device/include/mcs51/at89c51ed2.h: added.
1634
1635 2005-07-23 Raphael Neider <rneider AT web.de>
1636
1637         * src/pic/gen.h: added emitpcode macro for debugging
1638         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1639           and replace by macro adding debug information on demand
1640         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1641         * (gencjne): tried to fix; replaced with correct (slower) code
1642         * (gen{Unp,P}ackBits): fixed single bit access
1643         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1644         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1645           previous instruction
1646         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1647           register has to be handled with care (forbidding movement
1648           of assignments/uses, removing assignments completely, ...)
1649         * (pCodeOptime2pCodes): make use of regIsSpecial
1650         * added lots of debugging output (commented out)
1651         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1652           from being reused as result UNLESS it is known to work
1653
1654 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1655
1656         * support/Util/dbuf.h: include <stddef.h> for size_t
1657         * .version: changed to version 2.5.2
1658
1659 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1660
1661         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1662
1663 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1664
1665         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1666           (genModOneByte): removed needless psha/pula
1667
1668 2005-07-22 Raphael Neider <rneider AT web.de>
1669
1670         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1671           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1672         * src/pic/gen.c (resolveIfx): do not "invent" labels
1673         * (genSkipc): changed to positive logic
1674         * (genSkipCond): removed as no longer needed
1675         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1676           backport from PIC16
1677         * (genLeftShift): check operands are in different registers
1678         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1679           INCF does not update CARRY...
1680         * src/pic/main.c: fixed _linkCmd
1681         * src/pic/pcode.c (unlinkpCode): added inactive code
1682         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1683           alive (do not assign result and operand overlapping registers)
1684
1685 2005-07-22 Raphael Neider <rneider AT web.de>
1686
1687         * src/pic/device.c (dump_sfr): replaced register declaration with
1688           call to emitSymbolToFile() to avoid duplicate symbols
1689         * (assignRelocatableRegisters): do not declare external symbols
1690         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1691           right (take size of type, not etype)
1692         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1693         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1694         * (packRegsForAccUse): disabled assignment of WREG as
1695           the result reg to prevent occurence of just fixed #1235003,
1696           fixes #1242954
1697         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1698           symbols (avoids duplicate symbols in .asm file)
1699         * (pic14emitRegularMap): use emitSymbolToFile()
1700         * src/pic/gen.c (aopOp): fixed spillLocation handling
1701         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1702         * (genDataPointerSet): removed unneccessary variables/output
1703
1704 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1705
1706         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1707         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1708
1709 2005-07-21 Raphael Neider <rneider AT web.de>
1710
1711         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1712           architecture cannot handle them efficiently, fixes bug #1235003
1713         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1714           check for empty sets before using them (fixes bug #1232190)
1715
1716 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1717
1718         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1719           (lnksect2): generate warnings for memory overlap
1720         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1721           constseg to set the name of these segments so you can instruct the linker
1722           to place them in banks
1723         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1724         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1725           added code_seg and const_seg to options
1726         * src/SDCCglue.c (emitMaps): use options.const_seg,
1727           (createInterruptVect): put interrupt vectors in segment HOME,
1728           (glue): put HOME before static segment and put the main glue in HOME,
1729           (glue): use options.code_seg
1730         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1731         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1732           these segments so you can instruct the linker to place them in banks
1733           (linkEdit): use code_loc for HOME segment which should be the first
1734           segment in code memory now
1735         * src/SDCCmem.c: fixed more stuff like bug 1238386
1736         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1737           (changePointer): don't change function pointers to code pointers for
1738           banked functions,
1739           (compareType): added exceptional check for banked function pointers
1740         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1741         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1742           after static in code memory
1743         * src/mcs51/gen.c: added aopLiteralLong prototype,
1744           (aopForSym): use getSize for functions,
1745           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1746           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1747           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1748           the segment,
1749           (genPcall): use call for literal function pointers and generate banked
1750           calls over the one trampoline so there's only one place for the user to
1751           modify according to his/hers hardware,
1752           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1753           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1754         * src/mcs51/main.c: added keyword banked,
1755           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1756         * support/Util/SDCCerr.c,
1757         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1758           needed for passing the bank and address to the trampoline
1759         * device/lib/mcs51/crtbank.asm: added for bankswitching
1760         * device/lib/mcs51/Makefile: added crtbank
1761
1762 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1763
1764         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1765           for fields at offset 0 of a struct or union as reported
1766           on 2005-07-07 in the developer mailing list.
1767
1768 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1769
1770         * src/SDCCmem.c: fixed bug 1238386
1771
1772 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1773
1774         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1775           (patch #1144962), added peephole 300, enabled 259.x
1776         * doc/sdccman.lyx: removed screenshot and provided link instead
1777
1778 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1779
1780         * doc/sdccman.lyx: added section about debugging with ddd
1781         * doc/figures/ddd_example.eps: screenshot of debugging session
1782
1783 2005-07-04 Raphael Neider <rneider AT web.de>
1784
1785         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1786           like CODE pointers, fixes #1115683
1787         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1788           call, fixes bugs #1232211, #1228110,
1789           fixed wrong casts to pCodeFlow from pCodeInstructions
1790
1791 2005-07-04 Raphael Neider <rneider AT web.de>
1792
1793         * src/pic/gen.c (popGet): changed assert to allow for
1794           bit operands
1795         * (popGetAddr): changed signature to provide
1796           an additional index, patched all call sites
1797         * (genCmpEq): handle literal-like operands correctly
1798         * (genAddrOf): added sanity checks on __code/__data pointers
1799         * (genAssign): added handling of symbols from __code section
1800         * (gencjne): do not generate code for comparisons whose result
1801           is neither stored nor used, fixes bug #1171114
1802         * (AccLsh, AccRsh): operate on operand instead of WREG
1803         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1804           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1805           by known count
1806         * rewrote complete shift-by-literal logic, commented unused
1807           functions out
1808         * (genConstPointerGet): get multiple bytes (if result size > 1),
1809           fixed handling of non-immediate addresses
1810         * (genPointerGet): handle CODE pointers like CONST pointers
1811         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1812         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1813           operand is to be treated as a literal or not
1814         * (mov2w,genPcall,genCmpEq),
1815           src/pic/genarith.c: use aop_isLitLike() to decide between
1816           literal/register contents
1817         * (addSign): added missing offset
1818         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1819           only emit comment in debug-mode,
1820           use {aop,op}_isLitLike throughout the file
1821         * src/pic/glue.c: fix initializers for pointers (work in progress)
1822         * src/pic/pcode.c (get_op): honor index on _const symbols
1823         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1824         * (dumppBlock): added pCode size estimation
1825         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1826           check for IS_SYMOP before OP_SYMBOL'ing
1827         * fixed indentation, compacted switch-statements
1828         * (allocReg): find free register and allocate it instead of
1829           allocating new registers all the time
1830         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1831           registers as its operands (necessary only for multibyte GETs)
1832
1833 2005-07-01 Raphael Neider <rneider AT web.de>
1834
1835         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1836           debugging .asm-output macros FENTRY + FEXIT
1837         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1838           way... I wonder...
1839         * (emitpComment): NEW, printf to pCode
1840         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1841           offset handling
1842         * (popGetAddr): NEW, variant of popGet to access an immediates
1843           high(er) bytes instead of the n'th byte of memory they reference,
1844           replaced popGet with popGetAddr where neccessary
1845         * (genDataPointerGet): reactivated and fixed implementation
1846         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1847           accesses
1848         * (genDataPointerSet): fixed multibyte assignments
1849         * (genpic14Code): fixed --i-code-in-asm handling
1850         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1851         * (genPlus): fixed index-out-of-bounds error
1852         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1853         * src/pic/ralloc.c: added debugging output macro FENTRY2
1854         * (spillThis): fixed indentation, enbraced for-body for clarity
1855         * (rematStr): commented out as now unused
1856         * (regTypeNum): commented out special spill case (overwrites
1857           arbitrary values)
1858         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1859
1860 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1861
1862         * doc/sdccman.lyx: documented sfr16/sfr32,
1863           added example for using storage class with function pointers
1864         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1865
1866 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1867
1868         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1869         * device/lib/_itoa.c,
1870         * device/lib/_ltoa.c: optimized codesize
1871         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1872           but don't know how to suppress the double warning.
1873         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1874         * support/Util/SDCCerr.c,
1875         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1876
1877 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1878
1879         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1880           fixed old K&R prototypes
1881         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1882         * device/lib/_gptrget.c,
1883         * device/lib/_gptrgetc.c,
1884         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1885           also new versions for small generic pointers and banked generic pointers
1886         * src/port.h: added const_name
1887         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1888         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1889         * src/SDCCcse.c (findPrevIc): check all associative operators
1890         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1891         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1892         * src/SDCCmem.c: updated comments,
1893           set far-space to 0 for pdata, results in optimized code
1894         * src/SDCCmem.h: added macro CONST_NAME
1895         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1896           moving the info into the highest bits, see also gptrget/gptrput
1897         * src/src.dsp: added sdcc.ico to project files
1898         * src/avr/gen.c (genCast): fixed bug 0x%d
1899         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1900         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1901           relation between ptr_type and DCL_TYPE,
1902           (genCast): fixed bug 0x%d
1903         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1904           (CODE)" for const_name
1905         * src/hc08/gen.c (genCast): fixed bug 0x%d
1906         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1907           (hc08_port): added "CONST (CODE)" for const_name
1908         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1909           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1910           between ptr_type and DCL_TYPE,
1911           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1912           operand* and took AOP() inside function so sfr-ness can be checked,
1913           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1914           new prototype,
1915           (genFunction, genEndFunction): optimized stack setup,
1916           (genMinus): optimized for literals with ending zeroes (in bytes),
1917           (genCast): fixed bug 0x%d
1918         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1919           (mcs51_port): added "CONST (CODE)" for const_name
1920         * src/mcs51/peeph.def: made rule 226 more generic
1921         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1922         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1923         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1924         * src/z80/main.c (z80_port): added NULL for const_name,
1925           (gbz80_port): added NULL for const_name
1926         * support/regression/tests/bug663539.c,
1927         * support/regression/tests/sfr16.c: new tests
1928
1929 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1930
1931         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1932
1933 2005-06-24 Raphael Neider <rneider AT web.de>
1934
1935         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1936           corrected typos...
1937         * device/include/pic16/signal.h: added USBIF
1938           and SIG_USB
1939
1940 2005-06-24 Raphael Neider <rneider AT web.de>
1941
1942         * device/lib/pic16/libdev/pic18f2455.c,
1943           device/include/pic16/pic18f2455.h: NEW
1944         * device/include/pic16/pic18fregs.h,
1945           device/lib/pic16/pics.all,
1946           src/pic16/device.c: added 18f2455
1947         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1948           device/include/pic16/{pic18f[68][567].h,usart.h}:
1949           replaced MULTIPLE_USARTS define with more relaible
1950           compatibility sfrs (for USART access)
1951
1952 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1953
1954         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1955           and the output asm file line is printed on two lines.
1956
1957 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1958
1959         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1960           BGT, BLE, BHI, and BLS instructions
1961         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1962           genCmpEq): removed
1963         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1964           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1965           fixes bug #1216342
1966         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1967
1968 2005-06-15 Raphael Neider <rneider AT web.de>
1969
1970         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1971         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1972         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1973           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1974           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1975
1976 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1977
1978         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1979           Marcel Telka in bug #1215704
1980
1981 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1982
1983         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1984           located in shared memory bank.
1985
1986 2005-05-31 Raphael Neider <rneider AT web.de>
1987
1988         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1989           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1990           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1991
1992 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1993
1994         * device/lib/_strncpy.c: fixed the fix
1995
1996 2005-05-26 Raphael Neider <rneider AT web.de>
1997
1998         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
1999           initializers with \0, bug #1208187
2000         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2001           intializers with \0, bug #1208187
2002
2003 2005-05-26 Raphael Neider <rneider AT web.de>
2004
2005         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2006           initializers with \0, bug #1208187
2007         * src/pic16/main.c (_process_pragma): added sanity checks
2008           for stack position and size, emit warnings when appropriate
2009
2010 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2011
2012         * device/lib/_strncpy.c: fixed not filling with \0
2013
2014 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2015
2016         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2017           createFunction),
2018         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2019           compound_statement),
2020         * src/SDCCsymt.h,
2021         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2022
2023 2005-05-24 Raphael Neider <rneider AT web.de>
2024
2025         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2026
2027 2005-05-24 Raphael Neider <rneider AT web.de>
2028
2029         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2030           TRISE definitions, closes bug #1162453
2031
2032 2005-05-22 Raphael Neider <rneider AT web.de>
2033
2034         * src/pic16/main.c (_process_pragma): check for missing
2035           arguments to pragmas code and udata
2036         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2037           consistency fixes to match other headers (thanks to Jim Paris)
2038         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2039
2040 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2041
2042         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2043
2044 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2045
2046         * support/regression/tests/bug1198642.c: new test
2047         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2048         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2049         * support/scripts/resource.h,
2050         * support/scripts/resource.rc,
2051         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2052         * support/scripts/sdcc.ico: added 32x32 icon
2053
2054 2005-05-18 Raphael Neider <rneider AT web.de>
2055
2056         * device/lib/pic16/libdev/pic18f*.c,
2057         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2058           keywords to "__sfr" and "__at (X)"
2059         * device/include/pic16/pic18fregs.h: added pic18f4520
2060         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2061           #1203088 (MPLAB compatibility)
2062
2063 2005-05-17 Raphael Neider <rneider AT web.de>
2064
2065         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2066         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2067         * device/lib/pic16/pics.all: added new devices
2068         * src/pic16/device.c: added support for pic18f4520
2069
2070 2005-05-16 Raphael Neider <rneider AT web.de>
2071         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2072         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2073         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2074           convenience function for bit access
2075
2076 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2077
2078         * device/lib/printf_large.c: fixed bug 1193299
2079         * support/regression/tests/bug1057979.c: added test %3.3s
2080
2081 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2082
2083         * device/include/mcs51/8051.h,
2084         * device/include/mcs51/8052.h: made parseable with lint
2085         * device/include/mcs51/lint.h: added include file for (sp)lint
2086         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2087         * doc/cdbfileformat.lyx,
2088         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2089
2090 2005-05-14 Raphael Neider <rneider AT web.de>
2091
2092         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2093         * device/lib/pic16/libc/stdlib/itoa.c (new)
2094         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2095         * device/lib/pic16/libio/Makefile: exclude subdir according to
2096           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2097         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2098         * src/pic16/gen.c (genFunction): prevent annoying warning
2099         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2100           nameclashes on BeOS
2101         * support/cpp2/cppmain.c (cpp_output_string): new
2102         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2103           fixes bug 1116802
2104
2105 2005-05-13 Borut Razem <borut.razem AT siol.net>
2106
2107         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2108
2109 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2110
2111         * .version: changed to version 2.5.1; back to bleeding edge development
2112
2113 2005-05-11 Borut Razem <borut.razem AT siol.net>
2114
2115         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2116           generate PDF version 1.3 documents
2117
2118 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2119
2120         * .version: changed to version 2.5.0
2121
2122 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2123
2124         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2125
2126 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2127
2128         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2129         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2130         well as many smaller updates.
2131         * .version: changed to version 2.5.0-pre1
2132
2133 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2134
2135         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2136
2137 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2138
2139         * support/regression/tests/bug1185672.c: added
2140         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2141           bug 1185672
2142         * src/mcs51/gen.c (genCall): added comments, made it look safer
2143         * src/mcs51/gen.c (genEndFunction): simplified
2144
2145 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2146
2147         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2148
2149 2005-04-14 Borut Razem <borut.razem AT siol.net>
2150
2151         * fixed bug 1045046 - SIGSEGV with really simple code?:
2152           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2153           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2154
2155 2005-04-14 Borut Razem <borut.razem AT siol.net>
2156
2157         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2158           src/pic16/device.h: temporarily disabled experimental #inline pragma
2159           for 2.5.0 release
2160
2161 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2162
2163         * device/include/z80/stdio.h,
2164         * device/include/z80/string.h: removed these highly incomplete files so
2165           SDCC can use the default ones in device/include/
2166
2167 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2168
2169         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2170         gcc warning.
2171         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2172         fix sdcpp warnings.
2173
2174 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2175
2176         * device/include/malloc.h: removed redundant __reentrant prototypes
2177         * device/lib/_mullong.c: added working xstack variant in asm (C version
2178           doesn't pass regression tests)
2179         * device/lib/bpx.c: used __data and made bpx char for mcs51
2180         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2181           (createFunction): fixed bug with xstackPtr
2182         * src/SDCCcse.c: corrected comments
2183         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2184           (killDeadCode, eBBlockFromiCode): removed unused code
2185         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2186           corrected comments
2187         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2188           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2189           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2190           (genModOneByte): fixed warning in MSVC
2191         * src/mcs51/main.c (): added comments
2192         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2193
2194 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2195
2196         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2197
2198 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2199
2200         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2201
2202 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2203
2204         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2205         characters arrays of larger size than the declared one.
2206
2207 2005-04-10 Borut Razem <borut.razem AT siol.net>
2208
2209         * src/pic/gen.c (genInline),
2210           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2211           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2212           (findNextInstruction), (findPrevInstruction),
2213           (findInstructionUsingLabel),
2214           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2215         * src/pic/pcode.c (findLabel): added missing '\n'
2216         * src/src.dsp: added SDCCdwarf2.c to the project
2217
2218 2005-04-09 Borut Razem <borut.razem AT siol.net>
2219
2220         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2221
2222 2005-04-08 Raphael Neider <rneider AT web.de>
2223
2224         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2225           into the chain after a given one) and mergeDefmapSymbols (combine
2226           defmap entries for each symbol per pcode)
2227         * (createDefmap): have defmap entries merged in the end
2228         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2229           a symbol before replacing one access type's symbol, merge symbols in
2230           the end (replacement symbol might already have an entry)
2231         * (assignValnums): keep reference to written WREG intact
2232
2233 2005-04-08 Raphael Neider <rneider AT web.de>
2234
2235         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2236           Alpha)
2237
2238 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2239
2240         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2241         bytes
2242
2243 2005-04-07 Raphael Neider <rneider AT web.de>
2244
2245         * device/include/pic16/usart.h: added compatibility defines for
2246           devices with more than one USART
2247         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2248
2249 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2250
2251         * device/lib/Makefile.in: updated for port specific include
2252
2253 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2254
2255         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2256
2257 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2258
2259         * device/include/8051.h,
2260         * device/include/8052.h,
2261         * device/include/at89S8252.h,
2262         * device/include/at89c55.h,
2263         * device/include/at89x051.h,
2264         * device/include/at89x51.h,
2265         * device/include/at89x52.h,
2266         * device/include/mcs51reg.h,
2267         * device/include/reg51.h,
2268         * device/include/reg764.h,
2269         * device/include/regc515c.h,
2270         * device/include/sab80515.h: (re)moved these 12 files
2271         * device/include/mcs51/8051.h,
2272         * device/include/mcs51/8052.h,
2273         * device/include/mcs51/at89S8252.h,
2274         * device/include/mcs51/at89c55.h,
2275         * device/include/mcs51/at89x051.h,
2276         * device/include/mcs51/at89x51.h,
2277         * device/include/mcs51/at89x52.h,
2278         * device/include/mcs51/mcs51reg.h,
2279         * device/include/mcs51/reg51.h,
2280         * device/include/mcs51/reg764.h,
2281         * device/include/mcs51/regc515c.h,
2282         * device/include/mcs51/sab80515.h: and added them here
2283
2284 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2285
2286         * device/include/stdarg.h: changed SDCC specific keywords to double
2287           underlined form.
2288         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2289           mcs51 and ds390.
2290         * device/include/hc08/mc68hc908gp32.h,
2291         * device/include/hc08/mc68hc908jb8.h,
2292         * device/include/hc08/mc68hc908jkjl.h,
2293         * device/include/hc08/mc68hc908qy.h: fixed comments
2294         * device/include/mcs51/README: updated
2295         * device/include/mcs51/c8051f120.h: added PINRSF
2296         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2297         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2298           amidst code. Also inline is not supported.
2299
2300 2005-04-06 Raphael Neider <rneider AT web.de>
2301
2302         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2303         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2304           callers stack/frame pointers
2305
2306 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2307
2308         * device/include/pic16/usart.h: added, missing in previous commit,
2309         * device/include/pic16/adc.h: fixed typo,
2310         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2311         commit,
2312         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2313         <p18fxxx.inc>
2314         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2315         uninitialized because a bug appears with gplink
2316         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2317         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2318         complains for unrecognised option
2319
2320 2005-04-05 Raphael Neider <rneider AT web.de>
2321
2322         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2323           structs as well (using memcpy)
2324         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2325           on ISRs (GOTO has no label)
2326         * src/pic16/device.h: added OF_OPTIMIZE_DF
2327         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2328           new data flow analysis/optimization
2329         * src/pic16/pcode.c: added (prototypes for and implementation of)
2330           dataflow analysis functions, fixed pCodeInstructions' inCond and
2331           outCond values, made RCALL a branch instruction
2332         * (pic16_unlinkpCode): keep C line if possible
2333         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2334           C line moved if possible
2335         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2336         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2337           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2338         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2339           new flow)
2340         * (pic16_getJumptabpCode): NEW, needed in...
2341         * (LinkFlow): fixed handling of jumptables, calls and conditional
2342           branches
2343         * (pic16_InsertCommentAfter): NEW
2344         * (pic16_pCodeReplace): made verbose and flow preserving
2345         * (AnalyzeFlow): added call to data flow analysis
2346         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2347         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2348         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2349
2350 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2351
2352         * src/SDCCast.c (decorateType): fixed bug #1105626
2353
2354 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2355
2356         * device/include/asm/pic16/features.h,
2357         * pic18f*.h headers,
2358         * device/include/pic16/adc.h,
2359         * device/include/pic16/delay.h,
2360         * device/include/pic16/i2c.h,
2361         * device/include/pic16/malloc.h,
2362         * device/include/pic16/stdio.h,
2363         * device/include/pic16/stdlib.h,
2364         * device/include/pic16/string.h,
2365         * device/lib/pic16/libc/stdio/printf_tiny.c,
2366         * device/lib/pic16/libc/stdio/printf_small.c,
2367         * device/lib/pic16/libc/stdio/strmgpsim.c,
2368         * device/lib/pic16/libc/stdio/strmmssp.c,
2369         * device/lib/pic16/libc/stdio/strmusart.c,
2370         * device/lib/pic16/libc/stdio/vfprintf.c,
2371         * device/lib/pic16/libc/stdlib/ltoa.c,
2372         * device/lib/pic16/libc/stdlib/putchar.c,
2373         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2374         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2375         * device/lib/pic16/libc/stdlib/memchrram.c,
2376         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2377         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2378         * device/lib/pic16/libio/adc/adcbusy.c,
2379         * device/lib/pic16/libio/adc/adcread.c,
2380         * device/lib/pic16/libio/adc/adcsetch.c,
2381         * device/lib/pic16/libio/usart/ubaud.c,
2382         * device/lib/pic16/libio/usart/ubusy.c,
2383         * device/lib/pic16/libio/usart/udrdy.c,
2384         * device/lib/pic16/libio/usart/uopen.c,
2385         * device/lib/pic16/libio/usart/uputc.c,
2386         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2387         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2388         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2389         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2390         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2391         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2392         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2393         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2394         specific keywords to double underlined form,
2395         * device/lib/pic16/libc/Makefile.rules,
2396         * device/lib/pic16/libsdcc/Makefile.rules,
2397         * device/lib/pic16/libm/Makefile,
2398         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2399         to compile with C standard set in Makefile.common
2400         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2401         rand.c and crc.c in compilation process,
2402         * device/lib/pic16/libsdcc/int/divuint.c,
2403         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2404         `c' from signed to unsigned,
2405         * device/lib/pic16/startup/crt0.c,
2406         * device/lib/pic16/startup/crt0i.c,
2407         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2408         keywords to double underlined form, bug fixes in _do_cinit function
2409         which prevented the correct initialization of the .idata segment,
2410         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2411         core to enter a infinite loop
2412         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2413
2414 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2415
2416         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2417
2418 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2419
2420         * device/include/Makefile.in: add support for hc08 subdirectory
2421         * device/include/hc08/: new subdirectory
2422         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2423         Lucas Loizaga, thanks!
2424         * device/include/hc08/mc68hc908qy.h,
2425         * device/include/hc08/mc68hc908gp32.h,
2426         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2427         their own directory. Changed internal macro names to use the compiler
2428         reserved namespace. Changed SDCC specific keywords to double
2429         underlined form.
2430         * device/include/math.h,
2431         * device/include/malloc.h,
2432         * device/include/stdarg.h,
2433         * device/include/stdbool.h
2434         * device/include/string.h,
2435         * device/include/tinibios.h,
2436         * device/include/ds400rom.h,
2437         * device/include/8051.h,
2438         * device/include/8052.h,
2439         * device/include/80c51xa.h,
2440         * device/include/at89c55.h,
2441         * device/include/at89S8252.h,
2442         * device/include/at89x51.h,
2443         * device/include/at89x52.h,
2444         * device/include/ds80c390.h,
2445         * device/include/reg764.h,
2446         * device/include/regc515c.h,
2447         * device/include/sab80515.h,
2448         * device/include/mcs51/c8051f000.h,
2449         * device/include/mcs51/c8051f018.h,
2450         * device/include/mcs51/c8051f020.h,
2451         * device/include/mcs51/c8051f040.h,
2452         * device/include/mcs51/c8051f060.h,
2453         * device/include/mcs51/c8051f120.h,
2454         * device/include/mcs51/c8051f300.h,
2455         * device/include/mcs51/c8051f310.h,
2456         * device/include/mcs51/c8051f320.h,
2457         * device/include/mcs51/c8051f330.h,
2458         * device/include/mcs51/c8051f350.h,
2459         * device/include/z180.h: Changed SDCC specific keywords to double
2460         underlined form.
2461
2462 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2463
2464         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2465         18F4455,
2466         * (pic16_assignConfigWordValue): disable testing of configuration
2467         register value with config mask,
2468         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2469         function with port->fun_prefix,
2470         * (genFunction): when generating a naked interrupt function never
2471         create an absolute segment placed in interrupt vector address, place
2472         the actual interrupt function at IVA instead, when an interrupt
2473         function is generated with unspecified interrupt then do not create
2474         the absolute section,
2475         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2476         code for generating a call to generic pointer get/put function with
2477         a call to function pic16_callGenericPointer(),
2478         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2479         the call to the generic pointer get/put functions with prefixing the
2480         function name with port->fun_prefix,
2481         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2482         * src/pic16/main.c (_process_pragma): prefix function with
2483         port->fun_prefix,
2484         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2485         calling assembler, old 18Fxxxx macro is deprecated,
2486         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2487         PC_ASMDIR in while condition,
2488         * (findInstruction): add PC_ASMDIR in while condition,
2489         * (buildCallTree): prefix main with port->fun_prefix,
2490         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2491         identifier for variable with banked access in instructions BTFSS,
2492         BTFSC, BCF, BSF, BTG
2493         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2494         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2495         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2496         perform optimization when enviroment variable NO_REG_OPT is set,
2497         * (insideLRBlock): NEW, return 1 if register is inside an
2498         INF_LOCALREGS block,
2499         * (RemoveRegFromLRBlock): remove a register that is completely
2500         eliminated by register optimization, but it is still left in local
2501         register store/restore in/from stack block,
2502         * (Remove2pcodes): after removing register, check to see if it
2503         should be removed from local register store/restore in/from stack
2504         block,
2505         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2506         DUMMY_READ_VOLATILE,
2507
2508         * device/include/pic16/adc.h: minor prototype modifications and
2509         update,
2510         * device/include/pic16/malloc.h: added GPL notice various
2511         modifications,
2512         * device/include/pic16/stdint.h: NEW, standard header for ints
2513         * device/include/pic16/delay.h: NEW, header for delay functions,
2514         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2515         delay1mtcy,
2516         * device/include/pic16/signal.h: NEW, header providing helper macros
2517         for implementing signal handlers,
2518         * device/include/pic16/stdio.h: added prototypes for functions,
2519         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2520         prototypes for stdin and stdout, added macro PUTCHAR to
2521         automatically implement putchar function prototype,
2522         * device/include/pic16/usart.h: modified and updated USART library,
2523         * device/lib/pic16/libio/adc/,
2524         * device/lib/pic16/libio/i2c: some modifications to improve library
2525         performance,
2526         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2527         family of functions,
2528         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2529         family of functions and other sources,
2530         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2531         of the PIC18Fxx[28] devices,
2532         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2533         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2534         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2535         _do_cinit function, because the previous failed when local variables
2536         where not placed in the same memory bank,
2537         * device/lib/pic16/libsdcc/char/: various modifications to improve
2538         library performance,
2539         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2540         information on the new functions of the c library and more...
2541
2542 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2543
2544         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2545
2546 2005-03-26 Raphael Neider <rneider AT web.de>
2547
2548         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2549           if condition == CARRY)
2550         * (genCmp): adapted to new genSkipc semantics
2551         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2552           on rIfx (genCmp was broken)
2553
2554 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2555
2556         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2557         * src/z80/main.c (_keywords[]),
2558         * src/SDCCglobal.h (struct options),
2559         * src/SDCC.y,
2560         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2561         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2562         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2563         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2564         always available in leading double underscore form. The C99 support is
2565         mostly missing, but it's a start.
2566         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2567         reserved identifier "__data".
2568
2569 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2570
2571         * src/mcs51/peeph.def: fixed bug 1170013
2572
2573 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2574
2575         * device/include/mcs51reg.h: fixed bug 842007
2576
2577 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2578
2579         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2580         last time.
2581
2582 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2583
2584         * src/port.h (struct PORT),
2585         * src/avr/ralloc.c (avr_assignRegisters),
2586         * src/avr/main.c,
2587         * src/ds390/ralloc.c (ds390_assignRegisters),
2588         * src/ds390/main.c,
2589         * src/hc08/ralloc.c (hc08_assignRegisters),
2590         * src/hc08/main.c,
2591         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2592         * src/mcs51/main.c,
2593         * src/pic/ralloc.c (pic14_assignRegisters),
2594         * src/pic/main.c,
2595         * src/pic16/ralloc.c (pic16_assignRegisters),
2596         * src/pic16/main.c,
2597         * src/xa51/ralloc.c (xa51_assignRegisters),
2598         * src/xa51/main.c,
2599         * src/z80/ralloc.c (z80_assignRegisters),
2600         * src/z80/ralloc.h,
2601         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2602         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2603         * src/SDCCcse.h,
2604         * src/SDCCdflow.c (computeDataFlow),
2605         * src/SDCCdflow.h,
2606         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2607         * src/SDCCloop.h,
2608         * src/SDCCcflow.c (*),
2609         * src/SDCCcflow.h,
2610         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2611         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2612         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2613         immedDom() returning wrong block; probably fixes bug #1160833)
2614
2615 2005-03-20 Borut Razem <borut.razem AT siol.net>
2616
2617         * support/scripts/inc2h.pl: WIN32 port
2618
2619 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2620
2621         * device/lib/makefile.in: added abs.c and labs.c
2622
2623 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2624
2625         * device/include/stdint.h: added
2626         * device/lib/abs.c: added
2627         * device/lib/labs.c: added
2628         * device/include/stdlib.h: added abs() and labs() prototypes
2629         * device/lib/libsdcc.lib: added abs and labs
2630         * device/include/float.h,
2631         * device/lib/_fsmul.c,
2632         * device/lib/printf_fast.c,
2633         * device/lib/printf_tiny.c: updated comments
2634
2635 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2636
2637         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2638         bug #1164313
2639
2640 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2641
2642         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2643         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2644
2645 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2646
2647         * device/lib/printf_large.c: removed inline assembly for portability and
2648           readability. Use printf_fast if speed or size are more important.
2649         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2650         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2651
2652 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2653
2654         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2655         prevent compiler warning
2656
2657 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2658
2659         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2660         moved to level 0 and declared as static. Also they are explicit
2661         placed in access bank. This was necessery because some times they
2662         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2663         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2664         optimizations. Currently only compare to unsigned char is implemented,
2665         * src/pic16/gen.c: added fReturnIdx array,
2666         * (struct resolvedIfx) is moved to gen.h and made public,
2667         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2668         * (aopForSym): added an optimization to directly store in stack of
2669         the operand of a SEND iCode,
2670         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2671         but as registers instead (AOP_REG) using the fReturnIdx array,
2672         * (pic16_freeAsmop): remove the freed register from the
2673         _G.sregsAlloc field,
2674         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2675         a compare of 'WREG',
2676         * (pic16_popGetTempRegCond): changed function prototype, now
2677         function takes also a bitVector argument v which holds the current
2678         set of registers that are allocated for stack access by aopForSym,
2679         registers allocated in aopForSym for accessing stack symbols are not
2680         any more part of the functions usedRegs field,
2681         * (genCall): some times aopOp is called for a stack variable to be
2682         send, aopForSym might perform the push, if this is true make sure
2683         that genCall doesn't push the variable twice by testing _G.resDirect,
2684         * (genFunction): changed testing for unspecified interrupt number
2685         from 256 to INTNO_UNSPEC,
2686         * modified selection scheme of frame pointer generation. Previously
2687         if function did use local registers a frame pointer was generated,
2688         now a frame pointer is generated only if function has arguments
2689         (that need PLUSW2 register access), or has stack arguments, or the
2690         compiler is not instructed to omit the frame pointer,
2691         * (genEndFunction): before restoring local registers that were saved
2692         in the function preamble, also restore the registers that *might*
2693         have been allocated for stack access,
2694         * (genRet): removed some old comments,
2695         * (genCmp, the active (RN's) version): added a call to the
2696         pic16_genCmp_special function to perform the compare with a more
2697         robust and optimized way,
2698         * (genInline): a feature has been added in inline code generation,
2699         which allows a wildcard variable substitution when writing inline
2700         assembly. Code is incomplete and experimental therefore undocumented,
2701         * (genCast): changed order of aopOp for result and right to allow
2702         aopForSym to directly load the result if possible,
2703         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2704         perform an optimized compare on some selected special occasions,
2705         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2706         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2707         generate an IVT any more,
2708         * src/pic16/main.c (pic16_optionsTable): added command line option
2709         --optimize-cmp,
2710         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2711         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2712         macros,
2713         * src/pic16/NOTES: Raphael Neider added in list of active developers
2714         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2715         jumptable_end to prevent bug #,
2716         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2717         inCond and outCond fields,
2718         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2719         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2720         turn off register spilling,
2721         * (packRegsForOneUse): synced with other ports' versions although it
2722         is not used currently,
2723         * (pic16_packRegisters): added an optimization while reading
2724         structure bitfields, some registers may be saved (malloc code is
2725         decreased by 80 bytes)
2726
2727 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2728
2729         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2730         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2731         this can be optimized more?
2732
2733 2005-03-10 Raphael Neider <rneider AT web.de>
2734
2735         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2736           genNearPointerGet): (hopefully) fixed access to bitfields via
2737           pointers (p->bitN = x; and x = p->bitN; failed)
2738
2739 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2740
2741         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2742
2743 2005-03-09 Raphael Neider <rneider AT web.de>
2744
2745         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2746
2747 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2748
2749         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2750         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2751           (regTypeNum): set REG_BIT type if necessary
2752         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2753         * support/regression/tests/critical.c: check bug 1144613
2754
2755 2005-03-02 Raphael Neider <rneider AT web.de>
2756
2757         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2758
2759 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2760
2761         * src/avr/ralloc.c (serialRegAssign),
2762         * src/ds390/ralloc.c (serialRegAssign),
2763         * src/hc08/ralloc.c (serialRegAssign),
2764         * src/mcs51/ralloc.c (serialRegAssign),
2765         * src/pic/ralloc.c (serialRegAssign),
2766         * src/pic16/ralloc.c (serialRegAssign),
2767         * src/xa51/ralloc.c (serialRegAssign),
2768         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2769
2770 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2771
2772         * src/SDCCast.c (decorateType): fixed bug 1124787
2773
2774 2005-02-20 Hubert Sack <sack AT digiplan.de>
2775         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2776
2777         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2778         patch #1121755
2779
2780 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2781
2782         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2783         to keep the correct label reference count when adding/removing references
2784         to labels. A peephole file using this is appended to patch #1144962.
2785
2786 2005-02-14 Raphael Neider <rneider AT web.de>
2787
2788         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2789         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2790         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2791           retrievals of result operand's value on assignment
2792
2793 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2794
2795         * device/include/pic16/string.h: modified prototype for memccpy()
2796         to memccpy(void *, void *, char, size_t)
2797         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2798         check whether to omit frame pointer or not,
2799         * (genInline): convert all occurences of "\n" to LF in inline
2800         assembler blocks, this helps formatting the inline text,
2801         * (pic16_loadFSR0): modified prototype,
2802         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2803         removed some 8051 legacy code,
2804         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2805         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2806         before allocating temporary registers in functions,
2807
2808 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2809
2810         * support/regression/tests/bitvars.c: corrected the "fix"
2811
2812 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2813
2814         * support/regression/tests/bitvars.c,
2815         * support/regression/tests/bitwise.c,
2816         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2817
2818 2005-02-10 Raphael Neider <rneider AT web.de>
2819
2820         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2821           different size for Alpha
2822         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2823
2824 2005-02-09 Raphael Neider <rneider AT web.de>
2825
2826         * src/SDCC.lex(doPragma) : save and restore warning options as well
2827           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2828         * have #pragma less_pedantic set the errorlevel to WARNING
2829           (fixes #1117001)
2830         * (cloneOptimize) : fixed wrong malloc's size
2831         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2832           facilitate correct handling of #pragma (save|restore)
2833
2834 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2835
2836         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2837
2838 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2839
2840         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2841
2842 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2843
2844         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2845
2846 2005-02-02 Raphael Neider <rneider AT web.de>
2847
2848         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2849         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2850         * (pic16_storeForReturn): fixed to allow returning function pointers
2851         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2852         * device/include/pic16/{stddef.h,stdbool.h}: added
2853
2854 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2855
2856         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2857
2858 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2859
2860         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2861         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2862          appeared to be required
2863
2864 2005-01-31 Borut Razem <borut.razem AT siol.net>
2865
2866         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2867           include/mcs51 and include/z80 directories to the package
2868
2869 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2870
2871         * src/hc08/gen.c (genFunction): fixed bug #1112752
2872
2873 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2874
2875         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2876
2877 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2878
2879         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2880
2881 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2882
2883         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2884
2885 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2886
2887         * device/include/c8051fxxx.h: removed these 6 files
2888         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2889
2890 2005-01-26 Raphael Neider <rneider AT web.de>
2891
2892         * src/pic16/gen.c (genAssign): fixed assignment from longs
2893           in codespace (were cut to three bytes)
2894         * (genDummyRead): implemented (except for CODESPACE...),
2895           fixed bug #1108575
2896         * src/pic16/glue.c (emitStatistics): beautified
2897         * device/lib/pic16/libm/Makefile: added include path
2898
2899 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2900
2901         * src/z80/gen.c (aopPut): fixed bug #1103902
2902
2903 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2904
2905         * device/lib/expf.c: fixed bug #1095792
2906
2907 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2908
2909         * device/lib/pic16/libm: added Math library sources
2910
2911 2005-01-24 Raphael Neider <rneider AT web.de>
2912
2913         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2914           to enable upcast to pCodeOpReg2 (there is no type tag to
2915           differenciate the two and pic16_popGet2p cast into PCOR2)
2916         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2917           (sizeof(sectNames) changed to sizeof(sectName))
2918           Both patches fix segfaults under MinGW.
2919
2920 2005-01-23 Raphael Neider <rneider AT web.de>
2921
2922         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2923           Safe_[mc]?alloc()'ed variables
2924         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2925           of (byte sized) temporaries (assign them to WREG for now)
2926         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2927           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2928           this might fix SIGSEGVs on MinGW...
2929         * src/SDCCopt.c (killDeadCode): restored original behaviour
2930           (volatile operands might get thrown away though)
2931
2932 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2933
2934         * src/pic16/gen.c: fixed bug #1106975,
2935         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2936         pointer update, INTCON is saved, global interrupts are disabled and
2937         restored after updateing TOS.
2938         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2939         * added function attribute 'shadowregs' to take advantage of shadow
2940         registers,
2941         * added function attribute 'wparam' as an alternative to the wparam
2942         pragma,
2943         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2944         user declares a non-ISR function as 'shadowregs',
2945         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2946
2947 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2948
2949         * .version: bumped version number to 2.4.8
2950         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2951         pic16 port,
2952         * device/lib/pic16/libio/i2c/: I2C module support library,
2953         * device/include/pic16/i2c.h: I2C support library header,
2954         * device/lib/pic16/libc/stdio/: standard IO support sources,
2955         * (printf_small.c): printf_small() source, supports float print,
2956         * (printf_tiny.c): printf_tiny() source, does not support floats,
2957         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2958         enable global optimizations for entire library source, other
2959         Makefiles in the source tree are also modified to reflect this,
2960         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2961         function,
2962         * doc/sdccman.lyx: updated to reflect new changes,
2963         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2964         sym->onStack if-case,
2965         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2966         sbit, idata, _idata, xdata, _xdata,
2967         * added pragma library, to link an external library, (see doc),
2968         * removed command line options, --pomit-config-words, --pomit-ivt,
2969         --pleave-reset-vector,
2970         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2971         when calling assembler to reflect memory model used, also define
2972         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2973         reflect stack model used,
2974         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2975         on stack return NULL,
2976
2977 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2978
2979         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2980           of the operands is volatile. Fixes #1020220
2981
2982 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2983
2984         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2985         * (OptimizeRegUsage): make sure that there is really no other flow where
2986           the first pCode is used
2987
2988 2005-01-22 Raphael Neider <rneider AT web.de>
2989
2990         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2991           to fix #1106967 (pCode->seq are not set up correctly)
2992
2993 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2994
2995         * src/SDCCglue.c (glue): make sure code area is declared before the
2996         static initialization area.
2997
2998 2005-01-21 Raphael Neider <rneider AT web.de>
2999
3000         * device/lib/Makefile.in: fixed test for pic16 install dir
3001         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3002           optimizations
3003         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3004           added --optimize-goto compiler switch and pragma wparam documentation
3005         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3006         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3007           and PRODH closing bug #1071770 (peephole optimizer)
3008
3009 2005-01-19 Raphael Neider <rneider AT web.de>
3010
3011         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3012           cmdLine buffers (used when calling sdcpp...) are large enough
3013           (MAX_PATH=256 truncates arguments leading to system halts when
3014           used in MinGW...)
3015         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3016         * (genUminus): rewritten to for efficiency
3017         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3018           used uninitialized in some cases)
3019         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3020           copy the third byte from the int -- now assumes 0x80 (data memory)
3021         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3022           operands (genAddLit expects the iCode's operands to swapped as
3023           well), fixed leftover bytes (crashed for short left operands)
3024         * (pic16_genMinusDec): performance improvements, removed false
3025           PIC14 emitSKPNCs
3026         * (pic16_genMinus): fixed to cope with differently sized operands
3027         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3028           for --obanksel > 1
3029         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3030         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3031           new banksel optimization
3032         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3033           analysis for temporary registers (segfaults...)
3034         * src/pic16/peeph.def: added rule
3035
3036 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3037
3038         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3039         which converts a float number to its ASCII representation
3040         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3041         functions to convert the fractional and integer part of a float to ASCII,
3042         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3043         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3044         ram
3045         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3046         _STATMEM macros,
3047         * device/include/pic16/adc.h: added GPL info,
3048         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3049         a pCodeOp as tested operand,
3050         * (genNearPointerGet): optimized bit testing, does not use
3051         intermediate register for bit value, test directly instead with
3052         BTFSS, BTFSC, works only for single bits,
3053         * (genpic16Code): dump the name of the iCode in the asm,
3054         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3055         renamed to pic16_decodeOp,
3056         * (serialRegAssign): do not allocate a temporary register for iCode
3057         sequences that test a single bit for 1/0
3058
3059 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3060
3061         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3062         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3063         access stack and frame pointers. They are initially assigned to
3064         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3065         accessing SFRs. Updated all occurences of modification of stack or
3066         frame pointer in gen.c and pcode.c,
3067         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3068         assigning of a literal value to pointers,
3069         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3070         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3071         selected
3072
3073 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3074
3075         * doc/sdccman.lyx: update documentation about stack pragma, added
3076         some info for stack memory models
3077
3078 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3079
3080         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3081
3082 2005-01-08 Raphael Neider <rneider AT web.de>
3083
3084         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3085           udata sections to fix bug #1097823
3086
3087 2005-01-05 Raphael Neider <rneider AT web.de>
3088
3089         * src/pic16/gen.c (genGenericShift): added handling of differently
3090           sized left operand and result
3091
3092 2005-01-04 Raphael Neider <rneider AT web.de>
3093
3094         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3095         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3096           to hold the condition bit)
3097         * added new version of genCmp (old code available via #define)
3098         * added new version of genShiftLeft/genShiftRight in a generic
3099           way, now supports shifting by negative values
3100         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3101           shiftCount (expected by genGenericShift)
3102         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3103         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3104           dump
3105         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3106           is an invalid literal too...)
3107
3108 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3109
3110         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3111         from Raphael Neider,
3112         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3113         for 8-bit literals. This fixes some literal operands which are sign
3114         extended to 16-bits ints when instruction needs only 8-bits.
3115
3116 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3117
3118         * device/lib/logf.c: added mcs51 assembly version
3119         * device/lib/expf.c: added mcs51 assembly version
3120         * device/lib/_logexpf.c: new shared asm code for expf and logf
3121         * device/include/math.h: add defines for assembly math library
3122         * device/lib/Makefile.in: build new _logexpf.c
3123         * device/lib/libfloat.lib: use new _logexpf.c
3124
3125 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3126
3127         * src/pic/device.c
3128         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3129           device types which have less than 0x7f registers.
3130
3131 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3132
3133         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3134
3135 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3136
3137         * device/lib/printf_fast.c: only build on supported arch.
3138         * device/lib/printf_tiny.c: only build on supported arch.
3139         * device/lib/printf_fast_f.c: only build if asm float lib
3140         * device/lib/_fsget1arg.c: only build if asm float lib
3141         * device/lib/_fsget2args.c: only build if asm float lib
3142         * device/lib/_fsnormalize.c: only build if asm float lib
3143         * device/lib/_fsreturnval.c: only build if asm float lib
3144         * device/lib/_fsrshift.c: only build if asm float lib
3145         * device/lib/_fsswapargs.c: only build if asm float lib
3146         * device/include/stdio.h: don't provide print_fast,
3147           print_fast_f, print_tiny prototypes if --xstack used
3148
3149 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3150
3151         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3152         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3153           to the SOURCES
3154
3155 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3156
3157         * device/lib/printf_fast_f.c: same as printf_fast, but
3158           with floating point enabled
3159         * device/lib/printf_fast.c: minor tweaks
3160         * device/include/stdio.h: add printf_fast_f
3161
3162 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3163
3164         * src/SDCCmain.c: make --float-reent default for mcs51
3165         * device/lib/_fsadd.c: added mcs51 assembly version
3166         * device/lib/_fssub.c: added mcs51 assembly version
3167         * device/lib/_fsmul.c: added mcs51 assembly version
3168         * device/lib/_fsdiv.c: added mcs51 assembly version
3169         * device/lib/_fseq.c: added mcs51 assembly version
3170         * device/lib/_fsneq.c: added mcs51 assembly version
3171         * device/lib/_fsgt.c: added mcs51 assembly version
3172         * device/lib/_fslt.c: added mcs51 assembly version
3173         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3174         * device/lib/Makefile.in: add _fscmp to build
3175         * device/lib/libfloat.lib: add _fscmp to build
3176
3177 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3178
3179         * device/lib/_fs2slong.c: added mcs51 assembly version
3180         * device/lib/_fs2sint.c: added mcs51 assembly version
3181         * device/lib/_fs2schar.c: added mcs51 assembly version
3182         * device/lib/_fs2ulong.c: added mcs51 assembly version
3183         * device/lib/_fs2uint.c: added mcs51 assembly version
3184         * device/lib/_fs2uchar.c: added mcs51 assembly version
3185         * device/lib/_slong2fs.c: added mcs51 assembly version
3186         * device/lib/_sint2fs.c: added mcs51 assembly version
3187         * device/lib/_schar2fs.c: added mcs51 assembly version
3188         * device/lib/_ulong2fs.c: added mcs51 assembly version
3189         * device/lib/_uint2fs.c: added mcs51 assembly version
3190         * device/lib/_uchar2fs.c: added mcs51 assembly version
3191         * device/include/float.h: added #define to select asm vs c
3192
3193 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3194
3195         * device/lib/printf_fast.c: improvements to float output
3196         * device/include/float.h: add defines for assembly float library
3197         * device/lib/_fsget1arg.c: receive 1 float arg
3198         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3199         * device/lib/_fsnormalize.c: normalize a float
3200         * device/lib/_fsreturnval.c: return float, various helper routines
3201         * device/lib/_fsrshift.c: right shift a float's mantissa
3202         * device/lib/_fsswapargs.c: swap 2 floats
3203         * device/lib/Makefile.in: build these 6 new files for mcs51
3204         * device/lib/libfloat.lib: add these 6 files to the library
3205
3206 2004-12-26 Borut Razem <borut.razem AT siol.net>
3207
3208         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3209           built by gcc 3.4.2
3210
3211 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3212
3213         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3214           and fully reentrant and register bank neutral.
3215         * device/lib/printf_fast.c: added float (not enabled by default),
3216           added compact/slower integer (also not enabled by default),
3217           improved size/speed of fast integer code, other minor changes
3218         * device/include/stdio.h, device/lib/Makefile.in,
3219           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3220
3221 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3222
3223         * src/pic16/pcode.c: declaring variables other than at the start of a
3224           block is not supported in C by VC6.
3225
3226 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3227
3228         * applied a previous patch from Raphael Neider that wasn't included
3229         in the previous commits, which fixes infinite loops within jumptable
3230         improvements,
3231         * made some fixes that previous patches introduced
3232
3233 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3234
3235         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3236         that fixes an issue with AOP_PCODE asmop's offset,
3237         * (pic16_popCopyReg): update instance field too,
3238         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3239         function of pic port,
3240         * (genCmp, genAnd, genAssign),
3241         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3242
3243 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3244
3245         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3246         variables initial values to idata section,
3247         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3248         variables in some functions. This utilizes parmBytes field of iCode
3249         structure to hold the offset of the variable in stack. (might be
3250         able to use the stack field too?)
3251         * applied patch from Raphael Neider # ### , # ###
3252         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3253         variable initial values in idata section,
3254         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3255         for static variables with initial value
3256         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3257         applied fix in while loop from Raphael Neider.
3258
3259 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3260
3261         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3262         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3263         * src/ds390/ralloc.c (serialRegAssign): spill bits
3264         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3265         * support/Util/SDCCerr.c,
3266         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3267         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3268         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3269
3270 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3271
3272         * device/include/sdcc-lib.h: inserted LGPL, added includes
3273           asm/ds390/features.h and asm/mcs51/features.h
3274         * device/include/asm/default/features.h,
3275         * device/include/asm/gbz80/features.h,
3276         * device/include/asm/z80/features.h: added empty _AUTOMEM
3277           and _STATMEM
3278         * device/include/asm/ds390/features.h,
3279         * device/include/asm/mcs51/features.h: added files with defines for
3280           _AUTOMEM and _STATMEM indicating automatic and static storage class
3281         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3282         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3283         * src/SDCCicode.c (geniCodeCast),
3284         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3285         * src/SDCCloop.c (loopInduction): removed unused variable lr
3286         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3287           to convertToFcall to include char modulo (RFE 1065037), added check
3288           if left operand is unsigned and use abs of literal value
3289         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3290           as it doesn't work after conversion from peephole.def to peephole.rul
3291         * src/mcs51/gen.c (toBoolean): added check for size,
3292           (genModOneByte): optimized code for signed char modulo a literal
3293           power of 2 (thanks to Hubert Sack),
3294           (genRRC): removed unnecessary "clr c",
3295           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3296         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3297           jump optimization,
3298           swapped rules 256.c and 256.d,
3299           extended 256.d by using new multiple checks (thanks Erik),
3300           added rules 256.e and 256.f,
3301           updated rule 261.a and 261.b to new generated code
3302         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3303
3304 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3305
3306         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3307           induction related bugs, including first part of bug #1074377
3308
3309 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3310
3311         * applied patch from bug-report #1076292,
3312         * applied patches for genAnd and Goto-optimizations for Raphael
3313         Neider,
3314         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3315         dump a less iCode information,
3316         * src/pic16/device.h (pic16_options_t): added field debgen,
3317         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3318         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3319         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3320         puclic,
3321         * (various functions): added macros FENTRY and FENTRY2 to functions,
3322         to emit function prologue,
3323         * (various functions): fixed indentation,
3324         * (genNearPointerGet): fixed loading of FSR0,
3325         * (genPackBits): applied patch from Raphael Neider to fix updating
3326         of FSR0 and touching only the modified bits,
3327         * src/pic16/genarith.c (various functions): added macros FENTRY to
3328         emit function prologue in comments,
3329         * src/pic16/pcode.h: added functions debugf2, debugf3,
3330         * src/pic16/ralloc.c: partial fix for packForPush caused
3331         segmentation fault,
3332
3333 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3334
3335         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3336           <stsp AT users.sourceforge.net> with reversed byte order
3337         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3338
3339 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3340
3341         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3342           bug #1074377
3343         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3344         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3345
3346 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3347
3348         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3349
3350 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3351
3352         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3353           conditions,
3354           (setFromConditionArgs): friendly operand parser for peephole rules,
3355           (operandBaseName, operandsNotRelated): new peephole condition
3356           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3357           architecture specific register naming into account, handles n-way
3358           comparisons, and supports quoted literals
3359         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3360
3361 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3362
3363         * src/mcs51/peeph.def: fixed bug #1076940
3364
3365 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3366
3367         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3368
3369 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3370
3371         Adding support for replacing ljmps with sjmps in jumptables
3372         generated for switch statements. For now you need to set the
3373         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3374         Now 4 algorithms for mcs51 jumptable generation are used:
3375         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3376         addresses loaded pc-relative for up to 112 cases and stack-pushing
3377         target addresses loaded with offset from dptr for up to 256 cases.
3378
3379         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3380         * src/mcs51/main.c: adapted constants for switch table generation
3381         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3382
3383 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3384
3385         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3386         * support/regression/tests/bug1057979.c: added test for bug 1073386
3387
3388 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3389
3390         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3391         compilers
3392
3393 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3394
3395         * src/pic16/device.h,
3396         * src/pic16/genarith.c,
3397         * src/pic16/glue.c,
3398         * src/pic16/main.c,
3399         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3400
3401 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3402
3403         Large cummulative patch for pic16 port.
3404         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3405         to call when a stack overflow occurs,
3406         * (malloc.h): added CVS Id tag,
3407         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3408         variable,
3409         * added libc directory. The current version of LibC contains string
3410         functions, ctype functions and macros and some functions of the
3411         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3412         be extensively tested in the future. Standard disclaimer here.
3413         Library is not automatically build yet. But one can build it by
3414         invoking 'make' inside the libc directory.
3415         * added ADC library under libio. Preliminary version yet.
3416
3417         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3418         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3419         aopForRemat() now and not by pic16_aopOp(),
3420         * (pic16_popGetTempReg): removed warning messgae when allocating
3421         temporary registers, its a buggy feature and will be removed,
3422         * (pic16_popGet): set register instance field in AOP_CRY,
3423         * (pic16_outBitC): fixed for results in size greater than 1,
3424         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3425         * (pic16_storeForReturn): optimized return of 0,
3426         * (genCmp): experimental code for new genCmp which uses PIC18's
3427         special compare&skip instructions. Initial tests fail some times
3428         with variables grater than 1 byte in size, so new code is disabled,
3429         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3430         a single bit,
3431         * (genCast): began a fix to optimize the casting of a bit to another
3432         bit, now assigning a bitfield to another bitfield will fail, sorry,
3433         * src/pic16/main.c: disabled the use of lr-support feature,
3434         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3435         * added some function prototypes, added function _debugf prototype,
3436         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3437         bits with offset (case PO_GPR_BIT),
3438         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3439         command line,
3440         * (isBankInstruction): modified to return 0 for no banking instruction,
3441         and 1 for banking instruction,
3442         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3443         caused stop processing pCodes after a inline assembly block,
3444         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3445         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3446         registers when it shouldn't,
3447         * src/pic16/ralloc.c (allocReg): add preliminary support for
3448         supporting a limited set of temporary registers,
3449
3450 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3451
3452         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3453           genDataPointerSet): ensure assignments always copy in MSB to LSB
3454           order,
3455           (loadRegFromAop): recognize CLRH optimization,
3456           (genFunction): optimize RECEIVE iCodes in reentrant functions
3457
3458 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3459
3460         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3461           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3462           selected.
3463         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3464         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3465           contiguous with data
3466
3467 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3468
3469         * device/lib/_gptrget.c (_gptrget),
3470         * device/lib/_gptrgetc.c (_gptrgetc),
3471         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3472           instead of sjmp to ret
3473         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3474           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3475
3476 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3477
3478         * .version: bumped version to 2.4.7
3479         * device/lib/_gptrget.c (_gptrget): is now _naked
3480         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3481         * device/lib/_gptrput.c (_gptrput): is now _naked
3482         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3483           (createFunction): fixed xstack
3484         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3485         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3486           or bit either,
3487           (geniCodeCritical): store original interrupt state in an iTemp bit
3488           var unless stack-auto
3489         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3490         * src/SDCCmain.c (setIncludePath): added include/target to search path
3491         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3492         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3493           prototype,
3494           (processFuncArgs): put bit vars in bit area
3495         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3496           unsaveRBank): fixed xstack,
3497           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3498           (genFunction, genEndFunction): fixed xstack,
3499           (genAssign): optimization don't walk backwards through mem
3500         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3501         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3502         * support/regression/Makefile: also make library (for stack-auto) when
3503           making "all" and added "test-mcs51-xstack-auto"
3504         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3505         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3506         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3507         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3508         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3509           make-library by MAKE_LIBRARY
3510         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3511           regression tests for xstack
3512         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3513         * support/regression/tests/critical.c: test for critical on mcs51
3514
3515 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3516
3517         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3518           built version of sdcc instead of installed version
3519
3520 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3521
3522         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3523         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3524           vprintf.c now
3525         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3526         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3527           WARNING: remove device/lib/build/z80/printf.o by hand when
3528           updating from previous build!
3529         * device/lib/z80/printf.c: updated comment
3530         * support/regression/tests/bug1057979.c: test all ports now
3531         * support/regression/tests/bug1065458.c: file added
3532
3533 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3534
3535         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3536           *_start and *_end symbols for static functions
3537
3538 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3539
3540         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3541           and search crt0.o in all library paths,
3542           (setIncludePath): proper handling of --nostdinc,
3543           (setLibPath): proper handling of --nostdlib
3544         * support/regression/Makefile,
3545         * support/regression/ports/ds390/spec.mk,
3546         * support/regression/ports/gbz80/spec.mk,
3547         * support/regression/ports/hc08/spec.mk,
3548         * support/regression/ports/mcs51/spec.mk,
3549         * support/regression/ports/mcs51-large/spec.mk,
3550         * support/regression/ports/mcs51-stack-auto/spec.mk,
3551         * support/regression/ports/z80/spec.mk: use include and lib files from
3552           built version of sdcc instead of installed version
3553         * doc/sdccman.lyx: fixed typo in --nostdinc
3554
3555 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3556
3557         * src/pic/pcode.c,
3558         * src/pic/device.c,
3559         * src/pic/ralloc.c,
3560         * src/pic/gen.c : added support to generate code for struct bit fields.
3561
3562 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3563
3564         * as/xa51/xa_version.h,
3565         * device/include/errno.h,
3566         * device/include/regc515c.h,
3567         * device/lib/_itoa.c,
3568         * device/lib/_ltoa.c,
3569         * device/lib/ser_ir_cts_rts.c,
3570         * sim/ucsim/xa.src/glob.cc,
3571         * sim/ucsim/xa.src/inst_gen.cc,
3572         * sim/ucsim/xa.src/xa_bit.cc,
3573         * sim/ucsim/xa.src/xa_sfr.cc,
3574         * sim/ucsim/z80.src/inst_dd.cc,
3575         * sim/ucsim/z80.src/inst_fdcb.cc,
3576         * support/scripts/keil2sdcc.pl,
3577         * src/pic16/pic16.dsp,
3578         * src/pic16/pic16a.dsp: corrected cvs line endings
3579         * device/lib/printf_large.c: fixed bug 1057979
3580         * src/pic16/gen.c: fixed non-C standard code
3581         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3582         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3583         * support/regression/ports/mcs51/support.c: reload T1 asap
3584         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3585           pdata use and clear idata startup behaviour
3586         * support/regression/tests/bug1057979.c: added
3587
3588 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3589
3590         * device/examples/ds390/ow390/ad26.h,
3591         * device/examples/ds390/ow390/cnt1d.h,
3592         * device/examples/ds390/ow390/crcutil.c,
3593         * device/examples/ds390/ow390/ownet.h,
3594         * device/examples/ds390/ow390/owsesu.c,
3595         * device/examples/ds390/ow390/swt12.h,
3596         * device/examples/ds390/ow390/swtoper.c,
3597         * device/examples/ds390/ow390/temp10.h,
3598         * device/examples/ds390/ow390/thermodl.c,
3599         * device/examples/ds390/tinitalk/tinitalk.dsp,
3600         * device/examples/ds390/tinitalk/tinitalk.dsw,
3601         * device/examples/mcs51/clock/hw.h,
3602         * device/examples/mcs51/simple2/go.bat,
3603         * device/examples/serialcomm/windows/serial.h,
3604         * device/examples/xa51/dummy.c,
3605         * device/examples/xa51/hello.c,
3606         * device/include/80c51xa.h,
3607         * device/include/at89x051.h: corrected cvs line endings
3608
3609 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3610
3611         * src/pic16/main.c (options): added command line --gstack, to trace
3612         stack over/under flows,
3613         * added pragma 'wparam' to allow passing first byte of function
3614         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3615         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3616         call to __gstack_test function and sets up the symbol as extern,
3617         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3618         * popaop): added call to pic16_testStackOverflow,
3619         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3620         wparamList list,
3621         * (genCall, genPcall): now all parameters are passed via stack
3622         except in functions that are pass to wparam pragma in which WREG is
3623         used too,
3624         * (genPcall): REENTRANT flag is checked to see if variable prototype
3625         contains reentrant keyword, don't call a non-reentrant function, via
3626         a reentrant function pointer or vice versa, functions are never
3627         passed via WREG,
3628         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3629         D.Winkler,
3630         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3631         SIGSEGV when accessing a NULL register stucture,
3632         * (pic16_printGPointerType): modified to handle UPPER modifier for
3633         function initializers, changed prototype of function to simpler one,
3634         * (pic16_printIvalFuncPtr): check to see if function is already
3635         added in externs list,
3636         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3637         optimized a move from W to SFR with a move to the same register
3638         later after a CALL,
3639         * device/lib/pic16/debug: NEW directory, contains debug features
3640         which are enabled when linking with libdebug.lib, currently command
3641         line option --gstack enables stack pointer tracing for over/under
3642         flow, corresponding sources are in debug/gstack
3643
3644 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3645
3646         * doc/sdccman.lyx: updated SDCC version,
3647         * (PIC16 port): update list of command line options,
3648         * src/pic16/device.h (structure pic16_options_t): added field gstack
3649         to enable stack overflow tracing on push/pops,
3650         * src/pic16/device.c (statistics structure): added statistics
3651         structure,
3652         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3653         pic16_dump_int_registers): increase statistics counters for each
3654         * variable which is encountered
3655         * (pic16_dump_usection): emit each .udata variable to its own udata
3656         section,
3657         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3658         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3659         parameters via stack, otherwise use old scheme,
3660         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3661         assembler output file,
3662         * src/pic16/main.c: added command line options --gstack to enable
3663         push/pop tracing for stack overflow,
3664         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3665         instructions): added size of each instruction,
3666         * (pic16_countInstruction): estimate size of instructions in
3667         the_pFile list, inline assembly blocks are not counted,
3668         * (pic16_FixRegisterBanking): trace previous register usage, when
3669         banksel optimizations is greater than 0, don't emit a redudant
3670         banksel directive,
3671
3672 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3673
3674         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3675         * src/pic16/ralloc.c : applied same fix for pic16.
3676         * src/pic/gen.c : tidied it up a little.
3677
3678 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3679
3680         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3681         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3682
3683 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3684
3685         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3686
3687 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3688
3689         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3690         non-reentrant function __modsint in the interrupt function (thus
3691         corrupting math operations during serial I/O)
3692         * device/lib/ser_ir.c: as above, changed buffersize
3693         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3694         256.c,d for zeroing
3695         * doc/Makefile: added option -t for rsync
3696
3697 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3698
3699         * src/SDCCast.h (struct ast),
3700         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3701
3702 2004-10-20 Borut Razem <borut.razem AT siol.net>
3703
3704         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3705         package
3706
3707 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3708
3709         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3710         makefile targets,
3711         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3712         support functions to replace long sequences of MOVFF's from access
3713         bank registers to stack and vice versa,
3714         * src/pic16/device.h: added new field opt_flags, where optimization
3715         flags can be set to enable certain features,
3716         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3717         * pBlock, (genFunction, genEndFunction): surroung loop for
3718         saving/loading used registers in stack with PC_INFO pCodes,
3719         INF_LREGS. Code in between can then be optimized by pCode optimizer
3720         to support function calls,
3721         * (genDataPointerSet): fixed bug which loaded float fields in
3722         structures with corrupt data,
3723         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3724         in a standard way debug info on stderr. Feature used for developing
3725         and debugging only,
3726         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3727         obsolete chunks of code,
3728         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3729         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3730         * pic16/src/pcode.c (pic16_newpCodeInfo,
3731         * (pic16_newpCodeOpLocalRegs),
3732         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3733         feature,
3734         * (pic16_pCodeConstString): printing of the initial value of a
3735         symbol as a comment is inhibited since parsing was already done by
3736         copyStr and output is corrupt,
3737         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3738
3739 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3740
3741         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3742
3743 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3744
3745         * as/mcs51/lkarea.c: removed old K&R style,
3746           (lnksect): changed check on boundary error,
3747           (lnksect2): changed check on boundary error,
3748           (lnksect2): extend XSTK to end of page if size = 1
3749         * as/mcs51/lkmain.c: removed old K&R style,
3750           (Areas51): create l_IRAM symbol
3751         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3752         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3753           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3754         * device/lib/_mullong.c: added version to be compiled with xstack
3755         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3756         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3757         * device/lib/mcs51/crtxstack.asm: fixed comment
3758         * src/SDCCglue.c: maxInterrupts defaults to 0,
3759           (emitMaps): added pdata,
3760           (createInterruptVect): (re)moved default,
3761           (glue): added pdata,
3762           (glue): moved __start__xstack to XSTK with default size 1
3763         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3764           and options.float_rent when options.stackAuto is set,
3765           (linkEdit): only write XDATA_NAME if provided on command line
3766         * src/SDCCmem.h,
3767         * src/SDCCmem.c: added pdata
3768         * src/port.h: added pdata_name to PORT
3769         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3770           (saveRegisters, unsaveRegisters): removed usage of B,
3771           (genMinus): fixed accumulator clash,
3772           (genJumpTab): added comment, this needs another look
3773         * src/mcs51/gen.c: added check for "B in use" paranoia,
3774           added pushB() and popB()
3775         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3776           chance
3777         * src/avr/main.c,
3778         * src/ds390/main.c,
3779         * src/hc08/main.c,
3780         * src/mcs51/main.c,
3781         * src/pic/main.c,
3782         * src/pic16/main.c,
3783         * src/xa51/main.c,
3784         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3785           added PSEG (PAG,XDATA) or NULL to port specifier
3786         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3787         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3788           (_mcs51_genInitStartup): removed __start__xstack equ,
3789           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3790         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3791         * src/z80/gen.c (_rleAppend): fixed warnings
3792         * support/regression/tests/zeropad.c: added pdata test
3793         * .version: bumped to 2.4.6
3794
3795 2004-10-17 Borut Razem <borut.razem AT siol.net>
3796
3797         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3798         as a part of nightly build
3799
3800 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3801
3802         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3803         WREG holds the first byte function parameters,
3804         * (aopForSym): take special case for symbols which are in FARSPACE
3805         but in CODESPACE too,
3806         * (assignResultValue): modified to take into account _G.useWreg,
3807         * (genCall): don't use wreg for parameter passing when function is
3808         declared as reentrant, too, added optimization INCF to stack
3809         pointer when stack parameter count is 1,
3810         * (genFunction, genEndFunction): refurnished and fixed to not using
3811         wreg for passing parameters when function has varargs or is
3812         reentrant, fixed bug with symbol name compare for generating
3813         functions in absolute address,
3814         * (pic16_storeForReturn): refurnished,
3815         * (genCmp): began writing a new version of the function, not ready
3816         yet, therefore it is disabled,
3817         * (genAssign): do not read code memory when assigning a function to
3818         a pointer function,
3819         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3820         array of characters, not pointer,
3821         * (pic16initialComments): in debug mode emit an .ident directive for
3822         the assembler,
3823         * (_process_pragma): emit a new warning type (internal to pic16)
3824         when setting stack to default length, emit a similar warning when
3825         placing a function at absolute address and address is not word aligned
3826         * (_pic16_parseOptions): added 'return TRUE' statement,
3827         * (_pic16_linkEdit): if compiling a source, then add the source's
3828         file object, first in the list of objects to link,
3829
3830 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3831
3832         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3833         * src/pic/main.c : removed VC warning.
3834         * src/pic/gen.c : changed comment.
3835
3836 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3837
3838         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3839         reference to a deprecated symbol _GPTRREG was causing failure to
3840         link. Thanks G. M. Gallant for the info.
3841
3842 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3843
3844         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3845         comments for Bugs item #954788.
3846
3847 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3848
3849         * src/pic16/device.c (pic16_dump_gsection,
3850         * pic16_groupRegistersInSection): handle symbols declared to be in
3851         access bank differently,
3852         * src/pic16/gen.c (struct _G): added field resDirect,
3853         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3854         send values read from stack directly to result and don't allocate
3855         temporary values,
3856         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3857         same registers,
3858         * (pic16_sameRegsOfs): NEW,
3859         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3860         free because they were not allocated from temporary pool,
3861         * pic16_popRegFromString): workaround to fix a problem with
3862         allocating variables twice or never,
3863         * (genGenPointerGet): using PRODL instead of FSR0H,
3864         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3865         instead of FSR0H,
3866         * (genAssign): take advantage of the _G.resDirect flag,
3867         * (genCast): around line 11844, use mov2f instead of directly
3868         MOVFF'ing between operands to account for literal values,
3869         * src/pic16/genutils.c: some new debug functions for gpsim have been
3870         added,
3871         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3872         float with integer part only,
3873         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3874         place variables in access bank
3875         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3876         updated sources to reflect recent changes in gen.c
3877
3878 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3879
3880         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3881         sources that searched for headers in installation path, now the
3882         device/include/pic16 is used,
3883         * src/pic16/glue.c (pic16glue),
3884         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3885         .line directives if not in debug mode, this suppresses assembler's
3886         warnings for ignored directives
3887
3888 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3889
3890         * src/port.h: made reset_regparms prototype void parameter explicit.
3891         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3892         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3893         * doc/sdccman.lyx: documented warning disabling and how to use
3894           printf_large to make it print floats.
3895         * device/include/stdbool.h: NEW
3896         * device/lib/_atof.c,
3897         * device/lib/_divuint.c,
3898         * device/lib/_divulong.c,
3899         * device/lib/expf.c,
3900         * device/lib/printf_large.c,
3901         * device/lib/sincosf.c,
3902         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3903         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3904           a completely reentrant lib.
3905
3906 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3907
3908         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3909         * device/include/pic16/stdio.h: fixed bug with colon
3910
3911 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3912
3913         * device/include/pic16/stdio.h,
3914         * device/include/pic16/stdlib.h,
3915         * device/include/pic16/math.h: NEW
3916         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3917         declared as _naked to reduce overhead
3918         * device/lib/Makefile.in (target port-specific-objects-pic16):
3919         changed * to *.* so to ignore the CVS directory,
3920         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3921         stacked variables back in stack,
3922         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3923         corruption
3924
3925 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3926
3927         * .version: bumped version number to 2.4.5
3928         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3929         * support/Util/SDCCerr.c (messages structure): added entry for
3930         W_POSSBUG2
3931
3932         Large cumulative patch for pic16 port and libraries.
3933         * device/include/pic16/sdcc-lib.h,
3934         * device/include/pic16/stdarg.h,
3935         * device/include/asm/pic16/features.h,
3936         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3937         * device/include/pic16/float.h: changes reentrant keyword with
3938         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3939         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3940         updated target build-libraries to include objects from gptr,
3941         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3942         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3943         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3944         all function headings,
3945         * src/SDCCmain.c: added global parameter userIncDirsSet,
3946         * (parseCmdLine): when option -I is encountered add directory to
3947         userIncDirsSet too,
3948         * src/version.awk: added space between control and long,
3949         * src/pic16/NOTES: added some notes for the port,
3950         * src/pic16/gen.c: added prototype for mov2fp function,
3951         * (fReturnpic16[]): properly named return value registers,
3952         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3953         * (aopForSym): added code to handle symbols with onStack flag set,
3954         symbols onStack are allocated PTRSIZE bytes,
3955         * (aopFreeAsmop): handles special case where asmops are stack objects,
3956         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3957         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3958         added argument lock to trace flaws in allocating temporary registers
3959         when developing port,
3960         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3961         * (pic16_popRegFromString): reenabled allocating a direct register
3962         from string,
3963         * (assignResultValue): various beautifications,
3964         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3965         referenced function argument,
3966         * (genIpush): reenabled to allow stacked arguments, handles only
3967         ic->parmPush iCodes,
3968         * (genCall, genPcall): major changes to allow for variable argument
3969         functions, fixed a bug with falsely restoring stack pointer after
3970         returning from call,
3971         * (genFunction): pending code for critical function,
3972         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3973         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3974         * (genNearPointerGet): fixed bug with indirect reading, was always
3975         reading from INDF0
3976         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3977         pointers,
3978         * (genAddrOf): rewrote code to take address of a stacked function parameter
3979         * (genCast): fixed casting to generic pointer type,
3980         * src/pic16/gen.h: added AOP_STA,
3981         * (struct asmop): added field stk,
3982         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3983         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3984         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3985         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3986         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3987         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3988         generic pointers,
3989         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3990         and library paths,
3991         * (pic16_port structure): generic pointer size is set to 3,
3992         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3993         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3994         compiler warning,
3995         * src/pic16/ralloc.c (allocReg): prevent allocating register when
3996         operand is an iTemp,
3997
3998 2004-09-24 Martin Helmling <mh AT octo-soft.de>
3999
4000         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4001         * debugger/mcs51/simi.c: addapt new syntax of s51
4002
4003 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4004
4005         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4006         * src/pic16/pcode.c: commented out some calls to free() in order to
4007         fix bug #989576,
4008
4009 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4010
4011         * src/SDCCicode.h,
4012         * src/SDCCicode.c (isiCodeInFunctionCall),
4013         * src/avr/ralloc.c (selectSpil),
4014         * src/pic/ralloc.c (selectSpil),
4015         * src/pic16/ralloc.c (selectSpil),
4016         * src/ds390/ralloc.c (selectSpil),
4017         * src/hc08/ralloc.c (selectSpil),
4018         * src/xa51/ralloc.c (selectSpil),
4019         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4020         stack in the middle of a function call sequence (fixes bug #1020268)
4021         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4022         costs associated with the minimum switch case.
4023
4024 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4025
4026         * src/SDCC.lex: fixed bug #1030549
4027
4028 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4029
4030         * src/SDCCcse.h (struct cseDef),
4031         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4032         over a function call if the CSE is derived from a symbol whose
4033         address has been taken (fixes bug #1029883)
4034         * support/regression/tests/bug-1029883: a new regression test for
4035         this bug
4036
4037 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4038
4039         * src/hc08/gen.c (emitinline): fixed bug #1029778
4040         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4041         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4042         and starts toward RFE #905167)
4043
4044 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4045
4046         * src/pic16/gen.c (mov2f): New function to move an operand to
4047         another without considering if it is a literal or a register,
4048         * (pic16_sameRegs): don't check if they are both AOP_REG,
4049         * (AccRsh): removed andmask=0 lines,
4050         * (genLeftShift): duplicated to be improved in future versions,
4051         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4052         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4053         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4054         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4055         * (insertBankSwitch): fixed inserting banksel directives algorithm
4056         for instructions that follow a skip instruction, this fixes a report
4057         for broken subtraction code generation,
4058         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4059         iCode is a left op, just in case result and right share the same
4060         registers
4061
4062 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4063
4064         * src/hc08/main.c,
4065         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4066         preservation of HX
4067         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4068         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4069         on 2004-09-12; it was buggy
4070
4071 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4072
4073         * src/SDCCsymt.h: removed RESULT_CHECK
4074         * src/SDCCast.c,
4075         * src/SDCCglue.c,
4076         * src/SDCCval.c,
4077         * src/pic/glue.c,
4078         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4079
4080 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4081
4082         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4083         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4084         configuration values no more rejected by compiler, they are assigned
4085         to configuration registers with a warning message instead,
4086         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4087         the for-loop so last conf register is emitted too,
4088         * (_pic16_initPaths): link library libsdcc.lib by default,
4089         * (_hasNativeMulFor): modified test for multiplication according to
4090         Raphael Neider's remarks. Integer multiplication is also done with
4091         support functions,
4092         * device/include/pic16/pic18fregs.h: corrected type error in while
4093         testing and including 18f6720 header file
4094
4095 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4096
4097         * src/pic16/device.h (pic16_options): removed field use_crt,
4098         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4099         until an optimization to handle single bits is added,
4100         * (pic16_loadFSR0): moved before genUnpackBits,
4101         * (genAnd): some white lines removed,
4102         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4103         leave_reset flags in pic16_options when using crt modules,
4104
4105 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4106
4107         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4108           for bugs 898889 & 979599. Also used some safer print instructions.
4109
4110 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4111
4112         * src/pic16/device.h (pic16_options_t): added field use_crt,
4113         crt_name, no_crt,
4114         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4115         catch a probable future bug,
4116         * src/pic16/gen.c: aopIdx function commented out,
4117         * (genAssign): commented out old code which used aopIdx,
4118         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4119         code, added if conditionals to take into account the --use-crt
4120         command line options,
4121         * src/pic16/main.c (pic16_optionsTable): added new command line
4122         options, --use-crt= and --no-crt,
4123         * (_pic16_linkEdit): now the proper crt object is added in the
4124         linker command line except than when --no-crt is specified,
4125         * src/pic16/pcode.c,
4126         * src/pic16/pcode.h: added some structures and functions for a new
4127         optimization scheme to compansate for instruction overhead between
4128         same iCodes, this scheme is currently under development and is not
4129         working in any way,
4130         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4131         to && operator,
4132         * device/lib/pic16/startup/crt0i.c,
4133         * device/lib/pic16/startup/crt0iz.c: added global char variable
4134         __uflags to force the generation of an idata section
4135
4136 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4137
4138         * doc/Makefile,
4139         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4140         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4141
4142 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4143
4144         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4145         Frieder) and clarified the default code optimization mode
4146
4147 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4148
4149         * src/SDCC.lex (doPragma, process_pragma),
4150         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4151         "opt_code_size", and "opt_code_balanced"
4152         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4153         regrouped options by category, added support for category headers
4154         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4155         and "--opt-code-size"
4156         * doc/sdccman.lyx: documented these new options and pragmas
4157         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4158         preference into account
4159
4160 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4161
4162         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4163           geniCodePreDec): Fixed bug 904237 by generating a warning
4164         * src/SDCCerr.h,
4165         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4166
4167 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4168
4169         * src/pic/device.c : When no max ram set validate full memory range.
4170         * src/pic/pcode.c,
4171         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4172
4173 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4174
4175         * device/lib/_gptrget.c,
4176         * device/lib/_gptrput.c: updated comment
4177         * device/lib/calloc.c,
4178         * device/lib/free.c,
4179         * device/lib/malloc.c,
4180         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4181         * src/SDCCcse.c (cseBBlock),
4182         * src/SDCCicode.c (printOperand, geniCodeArray),
4183         * src/SDCCicode.h (struct operand): fixed bug 868103
4184         * support/regression/tests/bug-868103.c: added
4185         * src/SDCCast.c (searchLitOp),
4186         * src/SDCCcse.h (struct cseDef),
4187         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4188         * src/SDCCicode.h (struct operand),
4189         * src/SDCCsymt.h (struct sym_link),
4190         * src/avr/gen.c (hasInc),
4191         * src/ds390/gen.c (hasInc),
4192         * src/hc08/gen.c (genPlusIncr, hasInc),
4193         * src/mcs51/gen.c (hasInc),
4194         * src/pic16/glue.c (pic16_printIvalChar),
4195         * src/pic16/ralloc.c (regWithIdx),
4196         * src/xa51/gen.c (hasInc) : removed warnings
4197         * src/SDCCast.c (createBlock): added comment ???
4198         * src/hc08/ralloc.c: updated comments
4199
4200 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4201
4202         * doc/sdccman.lyx: updated section on switch statements, added
4203         section about semaphore locking
4204         * doc/Makefile: added option -info for latex2html
4205         * device/lib/_gptrget.c,
4206         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4207
4208 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4209
4210         * src/pic/device.h,
4211         * src/pic/device.c,
4212         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4213          maxram is less than 0x100.
4214
4215 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4216
4217         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4218
4219 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4220
4221         * src/port.h,
4222         * src/mcs51/main.c,
4223         * src/ds390/main.c,
4224         * src/z80/main.c,
4225         * src/hc08/main.c,
4226         * src/pic/main.c,
4227         * src/pic16/main.c,
4228         * src/avr/main.c,
4229         * src/xa51/main.c
4230         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4231         a jump table is the best form for a switch statement, including
4232         automatic insertion of missing cases to make the case range
4233         continuous. Developed in collaboration with Frieder Ferlemann.
4234
4235 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4236
4237         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4238         accumulator result if it needs sign extension
4239
4240 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4241
4242         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4243
4244 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4245
4246         * device/lib/gbz80/printf.c,
4247         * device/lib/z80/printf.c: removed define for NULL
4248
4249 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4250
4251         * as/xa51/xa_link.c,
4252         * device/examples/ds390/ow390/ad26.c,
4253         * device/examples/ds390/ow390/cnt1d.c,
4254         * device/examples/ds390/ow390/counter.c,
4255         * device/examples/ds390/ow390/ds2480.h,
4256         * device/examples/ds390/ow390/ds2480ut.c,
4257         * device/examples/ds390/ow390/findtype.c,
4258         * device/examples/ds390/ow390/gethumd.c,
4259         * device/examples/ds390/ow390/owllu.c,
4260         * device/examples/ds390/ow390/ownetu.c,
4261         * device/examples/ds390/ow390/swt12.c,
4262         * device/examples/ds390/ow390/swtloop.c,
4263         * device/examples/ds390/ow390/temp.c,
4264         * device/examples/ds390/ow390/temp10.c,
4265         * device/examples/ds390/ow390/thermo21.c,
4266         * device/examples/ds390/ow390/tinilnk.c,
4267         * device/examples/ds390/ow390/tstfind.c,
4268         * device/examples/serialcomm/windows/serial.cpp,
4269         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4270         * device/include/reg51.h: fixed line endings for cvs
4271
4272 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4273
4274         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4275         packRegsForAccUse, packRegisters): new accumulator register
4276         packing algorithm
4277         * support/regression/ports/hc08/support.c (_putchar): suppress
4278         warning of unused variable
4279         * src/SDCCicode.c: added SWAP entry to codeTable
4280
4281 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4282
4283         * device/lib/sprintf.c: forgot to add this file before previous commit
4284
4285 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4286
4287         * src/pic16/gen.c (genPackBits): added operand right in function
4288         parameters, load result directly if p_type is POINTER (that is
4289         called by genNearPointerSet)
4290         * (genUnPackBits): added operand left in function parameters,
4291         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4292         FSR0 if accessing bitfields,
4293
4294 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4295
4296         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4297           _print_format; updated printf, sprintf, vsprintf
4298         * device/include/asm/default/features.h: corrected comment/define
4299         * device/lib/Makefile.in: added sprintf.c
4300         * device/lib/libsdcc.lib: added sprintf module
4301         * device/lib/printf_large.c,
4302         * device/lib/vprintf.c,
4303         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4304           into these 3 files
4305         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4306         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4307         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4308           hc08 test
4309         * support/regression/tests/zeropad.c: define idata as data for hc08
4310
4311 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4312
4313         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4314         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4315         labels are referenced at least once (even if a reference is not found)
4316         * src/hc08/gen.c (emitcode): set isComment flag for comments
4317         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4318         loads), rules 6a..6b (optimize jumps to return)
4319
4320 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4321
4322         * device/lib/acosf.c (acosf),
4323         * device/lib/asinf.c (asinf),
4324         * device/lib/atanf.c (atanf),
4325         * device/lib/ceilf.c (ceilf),
4326         * device/lib/cosf.c (cosf),
4327         * device/lib/coshf.c (coshf),
4328         * device/lib/cotf.c (cotf),
4329         * device/lib/fabsf.c (fabsf),
4330         * device/lib/floorf.c (floorf),
4331         * device/lib/log10f.c (log10f),
4332         * device/lib/logf.c (logf),
4333         * device/lib/sinf.c (sinf),
4334         * device/lib/sinhf.c (sinhf),
4335         * device/lib/sqrtf.c (sqrtf),
4336         * device/lib/tanf.c (tanf),
4337         * device/lib/tanhf.c (tanhf),
4338         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4339         replaced all instances of "reentrant" in the library functions
4340         defined in math.h with this macro.
4341         * support/regression/tests/float_trans.c: reenabled test for hc08
4342
4343 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4344
4345         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4346         erroneously deleted
4347
4348 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4349
4350         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4351         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4352         multi-byte volatile operands are used
4353         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4354         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4355         initialization to area GSINIT0 so that it would always precede
4356         any static initializers in GSINIT
4357         * support/regression/tests/zeropad.c: fixed idata define for hc08
4358         * support/regression/tests/bug-927659.c,
4359         * support/regression/tests/float_trans.c: disabled tests for hc08
4360         pending missing library routines
4361         * .version: increased version number to 2.4.4 - hc08 port now passes
4362         regression tests
4363
4364
4365 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4366
4367         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4368         * Makefile.common.in,
4369         * as/Makefile,
4370         * as/hc08/Makefile.in,
4371         * as/mcs51/Makefile.in,
4372         * as/z80/Makefile.in,
4373         * debugger/mcs51/Makefile.in,
4374         * device/include/Makefile.in,
4375         * device/lib/Makefile.in,
4376         * doc/Makefile,
4377         * link/Makefile,
4378         * link/z80/Makefile.in,
4379         * packihx/Makefile.in,
4380         * sim/ucsim/main_in.mk,
4381         * sim/ucsim/avr.src/Makefile.in,
4382         * sim/ucsim/doc/Makefile.in,
4383         * sim/ucsim/gui.src/serio.src/Makefile.in,
4384         * sim/ucsim/hc08.src/Makefile.in,
4385         * sim/ucsim/s51.src/Makefile.in,
4386         * sim/ucsim/xa.src/Makefile.in,
4387         * sim/ucsim/z80.src/Makefile.in,
4388         * src/Makefile.in,
4389         * support/cpp2/Makefile.in,
4390         * support/librarian/Makefile,
4391         * support/makebin/Makefile: added DESTDIR to the install path proposed
4392         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4393         * doc/sdccman.lyx: added DESTDIR documentation
4394
4395 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4396
4397         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4398         instruction for interrupt handlers, use fast returns when returning
4399         from high priority interrupts
4400
4401 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4402
4403         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4404         code generation
4405         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4406         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4407         bugs, ported much of Bernhard's code from mcs51
4408         * src/mcs51/gen.c (genSend),
4409         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4410         than one when calling a reentrant function
4411         * device/lib/_mullong.c: defined an alternate struct layout for big
4412         endian ports (hc08)
4413
4414 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4415
4416         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4417         test
4418
4419 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4420
4421         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4422         are sane and complete before asking the port its prefered parameter
4423         passing method (fixes bug #1017633)
4424         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4425         and _ret3
4426
4427 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4428
4429         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4430         problem in bitfields >= 8 bits.
4431
4432 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4433
4434         * src/SDCCsymt.c: undid changes that were not meant to be committed
4435
4436 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4437
4438         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4439
4440 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4441
4442         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4443           copied and wrong bit got inverted
4444
4445 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4446
4447         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4448         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4449         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4450         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4451         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4452         assignments to bitfields at known addresses
4453         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4454         reads from bitfields at known addresses
4455         * src/hc08/ralloc.c (packRegisters),
4456         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4457         genhc08Code): optimize pointer get values used as conditionals
4458         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4459         and branch
4460
4461 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4462
4463         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4464         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4465         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4466         as conditionals
4467
4468 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4469
4470         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4471
4472 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4473
4474         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4475         related problems
4476
4477 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4478
4479         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4480
4481 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4482
4483         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4484         mcs51 port
4485
4486 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4487
4488         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4489
4490 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4491
4492         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4493         cases use more compact code.
4494
4495 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4496
4497         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4498
4499 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4500
4501         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4502
4503 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4504
4505         * src/SDCCsymt.h,
4506         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4507         parameter of changePointer() from symbol* to sym_link*
4508         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4509         * src/SDCCsymt.c (compareType): void* type is castable to other
4510         pointers, but not necesarily an exact match.
4511         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4512         is no longer blindly treated as an exact match.
4513         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4514
4515 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4516
4517         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4518
4519 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4520
4521         * src/pic/gen.c,
4522         * src/pic/pcode.c,
4523         * src/pic/ralloc.h,
4524         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4525
4526 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4527
4528         * src/pic/device.c,
4529         * src/pic/device.h,
4530         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4531
4532 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4533
4534         * src/mcs51/gen.c (emitcode): fixed bug #992819
4535
4536 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4537
4538         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4539           there's no need to make it worse
4540
4541 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4542
4543         * src/mcs51/ralloc.c (deassignLR),
4544         * src/ds390/ralloc.c (deassignLR),
4545         * src/hc08/ralloc.c (deassignLR),
4546         * src/z80/ralloc.c (deassignLR),
4547         * src/pic/ralloc.c (deassignLR),
4548         * src/pic16/ralloc.c (deassignLR),
4549         * src/avr/ralloc.c (deassignLR),
4550         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4551         rlivePoint): fixed another part of bug #971834
4552
4553 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4554
4555         * src/z80/main.c: enabled "critical" keyword
4556         * src/z80/mappings.i,
4557         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4558         functions (fixes bug #979646)
4559         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4560
4561 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4562
4563         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4564           such as c:\mydir.
4565
4566 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4567
4568         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4569           doesn't disable too much optimizations
4570
4571 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4572
4573         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4574
4575 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4576
4577         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4578
4579 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4580
4581         * src/pic/gen.c tidied up tabs
4582         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4583         * src/pic/main.c tidied up tabs
4584         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4585         * src/pic/pcoderegs.c tidied up tabs
4586         * src/pic/ralloc.c tidied up tabs
4587
4588 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4589
4590         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4591         to S_FIXED for pic16 port and when symbol is not in level 0,
4592         allocate for S_REGISTER storage class and pic16 port, too,
4593         * src/pic16/device.h: prototype for checkSym,
4594         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4595         * (pic16_assignConfigWordValue): test the value and the mask to
4596         validate that the value is suitable for the configuration word,
4597         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4598         collect extern declared symbols, don't emit symbol twice, check
4599         first if symbol is in publics set first,
4600         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4601         * added command line '--fstack' which enables an experimental
4602         feature for stack access, too buggy to be used yet...
4603         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4604         * (pic16_allocDirReg): when register has storage class S_REGISTER
4605         allocate in pic16_dynAccessRegs,
4606         * device/include/pic16/pic18f????.h: modified configuration word
4607         naming convention, words started as CONFIG0H but should be CONFIG1H
4608
4609 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4610
4611         * device/include/mcs51reg.h: fixed bug 970993
4612
4613 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4614
4615         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4616         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4617         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4618         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4619         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4620         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4621           error/warning numbers,
4622           added function setWarningDisabled()
4623         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4624         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4625           _memcmp.c _memmove.c calloc.c realloc.c free.c
4626         * support/regression/tests/malloc.c: added tests for new functionality
4627         * support/regression/tests/zeropad.c: added tests for truncated initializers
4628           and initialized char arrays starting with '\x0'
4629         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4630
4631 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4632
4633         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4634
4635 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4636
4637         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4638         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4639         peephole 177.e. Thanks to anonymous
4640
4641 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4642
4643         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4644         function isn't used in the source but referenced as a
4645         variable initializer then declare it as extern in .asm file
4646
4647 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4648
4649         * .version: increased version number to 2.4.3
4650
4651         Adding version extension according to ChangeLog CVS revision
4652         * src/Makefile.in (target all): added dependency 'version.h'
4653         * (rule version.h): added rule to create version.h from ChangeLog,
4654         * (rule dep): added dependency version.h,
4655         * src/version.awk: AWK script to create version.h
4656         * src/SDCCdwarf2.c (dwWriteModule),
4657         * src/SDCCglue.c (initialComments),
4658         * src/SDCCmain.c (printVersionInfo): modified to write after
4659         version string the version extension number,
4660         * src/SDCCutil.c: included "version.h"
4661         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4662         number,
4663         * src/SDCCutil.h: added prototype for getBuildNumber
4664
4665         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4666         includeDirsSet, too,
4667         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4668         const char [] is found in function prototype...
4669
4670         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4671         moving to WREG with source is already in WREG,
4672         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4673         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4674         * (aopForSym): stack'ed symbols are partially supported, added
4675         if-clause to support symbols in FARSPACE,
4676         * (sameRegs): added test for AOP_ACC to see if registers are same,
4677         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4678         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4679         * (pic16_popRegFromString): will not allocate a new register if it
4680         doesn't find one by name, bug may have introduced...
4681         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4682         * (genIpush): revived to use pic16 port's stack,
4683         * (genAddrOf): added incomplete case for stack'ed operand,
4684         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4685         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4686         can handle multibyte operands,
4687         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4688         * (pic16initialComments): added message for MPLAB compatibility
4689         mode enabled,
4690         * src/pic16/main.h: prototype for pic16_mplab_comp,
4691         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4692         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4693         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4694         because of increased complexity of procedure,
4695         * (_process_pragma): stack pragma changed to format 'stack pos len',
4696         emit symbol '_stack_end' to conform with gplink,
4697         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4698         to search for register,
4699         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4700         PO_GPR_REGISTER,
4701         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4702         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4703         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4704         case for PO_GPR_REGISTER,
4705         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4706         dies, the new era is ahead !...
4707         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4708         pic16_dynInternalRegs,
4709         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4710         * (pic16_allocDirReg): minor optimizations and bug fixes,
4711         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4712
4713         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4714         load stack and frame pointer with address of 'stack_end' symbol
4715
4716 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4717
4718         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4719         without source code but only variable initializers
4720
4721 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4722
4723         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4724         external are not declared as extern to reduce overhead while linking
4725
4726 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4727
4728         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4729
4730 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4731
4732         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4733           Yee Keat for the patch
4734         * src/SDCCast.c (decorateType): fixed bug #979599
4735         * src/ds390/gen.h: removed local fReturnSizeDS390
4736         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4737         * src/ds390/gen.c (genAnd, genOr, genXor),
4738         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4739
4740 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4741
4742         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4743         add relFilesSet to $3, manipulate $2 to handle linking of object
4744         files without source files in command line,
4745         * device/include/pic16 (all headers): added ID location macros,
4746         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4747         entries for ID location bytes,
4748         * (pic16_assignIdByteValue): NEW,
4749         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4750         added field dumpcalltree to pic16_options_t,
4751         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4752         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4753         emitting rFalseIfx label after check_carry label,
4754         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4755         pic16_emitDIRegs), NEW
4756         * (pic16glue): dump .calltree file when option --calltree found,
4757         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4758         * (_pic16_genAssemblerPreamble): emit ID locations after
4759         configuration registers,
4760         * (pic16_linkCmd): modifications of the link command,
4761         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4762         * (pic16_pCodeInitRegisters): don't init stack registers,
4763         * (pic16_findPrevInstruction): fixed bug,
4764         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4765         bug with immediate registers,
4766         * (buildCallTree): traces stack push and pop,
4767         * (pct2): dump also stack usage for each function,
4768         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4769         * (pic16_allocDirReg): various modifications,
4770         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4771         fixed to 1,
4772
4773 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4774
4775         * src/pic16/pcode.c: removed buggy double colon
4776
4777 2004-07-01 Borut Razem <borut.razem AT siol.net>
4778
4779         * support/scripts/sdcc.nsi: added include/pic16 to setup
4780
4781 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4782
4783         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4784         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4785         target 'clean',
4786         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4787         specific command line arguments. Also added sample lkr script
4788         for placing a variable at a specific memory bank.
4789         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4790         at a specific memory bank,
4791         * (pic16_dump_isection): fixed bug which caused string literals to
4792         be omitted when dumping idata section,
4793         * (pic16_groupRegistersInSection): added code to handle registers
4794         in specific memory banks,
4795         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4796         public, all references are renamed too,
4797         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4798         AOP_DPTR2,
4799         * (pic16_storeForReturn): added case to handle when dest is WREG,
4800         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4801         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4802         pic16_rel_udata, check to see if that register is marked as being
4803         a member of a specific memory bank,
4804         * (pic16_printIvalCharPtr): added code to add string literals either
4805         to code or the idata sections,
4806         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4807         also accept the 'udata' pragma,
4808         * src/pic16/main.h: new structure types sectName and sectSym
4809         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4810         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4811         * (pic16_findPrevInstruction): fixed, it returned nothing,
4812         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4813         instruction combinations,
4814         * (pic16_FixRegisterBanking): heavily reorganised,
4815         * (pic16_AnalyzeBanking): if generating banksel directives is
4816         disabled, then don't call FixRegisterBanking at all,
4817         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4818         completely removed,
4819         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4820
4821 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4822
4823         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4824         Phuah Yee Keat <yk.phuah AT nestac.com>
4825
4826 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4827
4828         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4829         correctly the IVT even if it is relocated to some other location
4830
4831 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4832
4833         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4834         * device/include/pic16/pic18f2220.h: NEW,
4835         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4836         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4837         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4838         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4839         nodefaultlibs, ivt_loc is the location of the interrupt vector
4840         table, and nodefaultlibs signs that default libraries should not be
4841         linked in link stage,
4842         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4843         according to --ivt-loc argument,
4844         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4845         when pragma stack is found,
4846
4847 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4848
4849         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4850         256 (range check), 257 (do while), 258.a-f (bit banging
4851         f.e. on 3-wire SPI bus)
4852
4853 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4854
4855         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4856         variables used exclusively within a loop
4857
4858 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4859
4860         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4861
4862 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4863
4864         * src/SDCClrange.c (computeClash): fixed bug #971834
4865
4866 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4867
4868         * src/mcs51/gen.c (genCmp): fixed bug #975903
4869         * src/hc08/gen.c (operandsEqu),
4870         * src/ds390/gen.c (operandsEqu),
4871         * src/z80/gen.c (operandsEqu),
4872         * src/pic/gen.c (operandsEqu),
4873         * src/pic16/gen.c (operandsEqu),
4874         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4875         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4876
4877 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4878
4879         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4880
4881 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4882
4883         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4884         default case in switch statement,
4885         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4886         to eliminate problem with initialisation of pointers, but problem
4887         still exists,
4888         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4889         * (emitStaticSegment): removed various lines emitting debug info,
4890         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4891         added processor registers for utilizing EEPROM,
4892         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4893         configurable and set 8
4894
4895 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4896
4897         * .version: increased version number to 2.4.2,
4898
4899         Cumulative patch for pic16 port
4900         * src/pic16/device.c: changed scheme to dump initial values for
4901         variables in idata segment, all print_idata* functions were removed,
4902         now the pic16_printIval* will be called,
4903         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4904         * _pic16_printPointerType, pic16_printPointerType,
4905         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4906         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4907         NEW, similar to the respective functions in SDCCglue.c,
4908         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4909         way, emitting hex bytes,
4910         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4911
4912 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4913
4914         * src/avr/ralloc.c (serialRegAssign),
4915         * src/xa51/ralloc.c (serialRegAssign),
4916         * src/pic/ralloc.c (serialRegAssign),
4917         * src/pic16/ralloc.c (serialRegAssign),
4918         * src/hc08/ralloc.c (serialRegAssign),
4919         * src/z80/ralloc.c (serialRegAssign),
4920         * src/ds390/ralloc.c (serialRegAssign),
4921         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4922
4923 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4924
4925         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4926         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4927
4928 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4929
4930         Cumulative patch for pic16 port:
4931         * src/pic16/device.h (typedef PIC16_device) modified fields for
4932         defining microcontrollers,
4933         * src/pic16/device.c: added new info for all devices in Pics16 array,
4934         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4935         to be optimised out by the pCode optimiser,
4936         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4937         specially, bug reported by G.M. Gallant,
4938         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4939         as force'd so that cannot be optimised out by pCode optimiser,
4940         * src/pic16/pcode.c,
4941         * src/pic16/pcodepeeph.c,
4942         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4943         they are disabled by default, but can be enabled explicit with
4944         command argument --denable-peeps, for testing,
4945         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4946         --pomit-ivt in COMPILE_FLAGS
4947
4948 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4949
4950         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4951           compilation on MSVC
4952
4953 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4954
4955         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4956
4957 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4958
4959         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4960         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4961
4962 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4963
4964         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4965         would only assign 0x300001 register.
4966
4967 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4968
4969         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4970         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4971
4972 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4973
4974         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4975         for ds80c400
4976         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4977         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4978         added peephole 254 (left shift), 255 (jump table)
4979
4980 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4981
4982         * device/lib/Makefile.in: removed comment line with model-pic16,
4983         * (target port-specific-objects-pic16): the libraries and objects
4984         are copied to the build directory form the device/lib/pic16/bin
4985         directory
4986
4987         Cumulative patch concerning pic16 port:
4988         * library directory has been re-organized,
4989         * added support for PIC18F1220,
4990         * added headers and library sources for chips 18f1220,18f6520,
4991         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4992
4993         * configuration registers setting has changed, now each supported
4994         device has a complete description of the registers it uses,
4995         * all initialisations are moved to idata sections, these section
4996         can be absolute or relocatable,
4997         * fixed initialisation of codespace variables,
4998         * fixed warning about PCLATU and gpsim,
4999         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5000         * (genAssign): use table reads when assigning from variables in codespace,
5001         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5002         char/int variables placed in codespace,
5003         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5004         registers set in .asm file, no need for --pomit-config-words anymore,
5005         * (pic16glue): some 8051 legacy segments are commented out
5006         (to be removed completely),
5007         * added support for alternative assembler and linker with --asm=
5008         and --link= command line arguments,
5009         * peepholes are disabled automatically in the port, no need to
5010         specify on command line,
5011         * port supports natively char/int/long multiplication, but converts
5012         all divisions to support functions,
5013         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5014         to the file set in variable $2,
5015         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5016         strings in ASCII format and not in hex,
5017         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5018         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5019         allocate proper register if iCodes aren't temporary,
5020
5021 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5022
5023         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5024
5025 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5026
5027         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5028         is commented out
5029
5030 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5031
5032         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5033         computed address is reused
5034         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5035         multi-byte bitfields
5036
5037 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5038
5039         * src/z80/gen.c: (genArrayInit): must check for pointers too
5040
5041 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5042
5043         * support/regression/tests/zeropad.c: never meant to commit the
5044           nestedstruct test: removed, added check for GCC version
5045
5046 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5047
5048         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5049         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5050         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5051           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5052           bugs 928906 and 954082 half-empty initializers
5053         * src/SDCCsymt.h,
5054         * src/SDCCsymt.c (getAllocSize): added for above fix
5055         * src/z80/gen.c (genArrayInit): fixed bug 741044
5056         * support/regression/tests/zeropad.c: added tests
5057
5058 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5059
5060         * src/pic16/device.c (pic16_dump_section): corrected bug which
5061         caused some symbols of the libraries to be misplaced
5062
5063 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5064
5065         * src/pic16/glue.c,
5066         * src/pic16/ralloc.h,
5067         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5068         to fix conflict with pic port
5069
5070 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5071
5072         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5073         externs configuration variables,
5074         * src/pic16/ralloc.h,
5075         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5076         prototype in header, commented out some debug messages
5077
5078 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5079
5080         * src/pic16/glue.c,
5081         * src/pic16/main.c,
5082         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5083         for gpasm COFF object generation. Thanks to D. Hawkins for
5084         his patch info
5085
5086 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5087
5088         * src/ds390/main.c,
5089         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5090         Brock for spotting this)
5091         * src/ds390/gen.c (genEndFunction),
5092         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5093         interrupt handler and critical. Disable push/pop optimizations when
5094         peephole optimizations disabled.
5095
5096 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5097
5098         Updated pic16 library sources and headers.
5099         * device/lib/pic16/pic18f*/ ,
5100         * device/include/pic16/*.h: modified to handle structured SFR
5101         definitions
5102
5103 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5104
5105         * src/port.h (PORT structure): added hook initPaths, now each
5106         port can declare its own default search paths,
5107         which can been seen with the --print-search-dirs option,
5108         see pic16 port for example,
5109         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5110         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5111         * (doPrintSearchDirs): NEW, replaces in a central manner the
5112         printing of search dirs which was split in set*Paths functions,
5113         * (main): added call to port->initPaths and doPrintSearchDirs,
5114         * src/avr/main.c,
5115         * src/ds390/main.c,
5116         * src/hc08/main.c,
5117         * src/izt/i186.c,
5118         * src/izt/tlcs900h.c,
5119         * src/mcs51/main.c,
5120         * src/pic/main.c,
5121         * src/pic16/main.c: modified port structures to reflect addition of
5122         initPaths hook,
5123
5124         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5125         * (pic16_dump_section): for registers in same address reserve memory once,
5126         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5127         to no_banksel,
5128         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5129         result is greater in size than right or left,
5130         * (pic16_genUMult8X8_8): there are some cases where the result can
5131         be 16 bits size, so handle these,
5132         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5133         * (pic16_outBitC): modified to emit pcodes,
5134         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5135         or not,
5136         * (genDivOneByte): implemented algorithm to divide 8-bits,
5137         * (genCmp): uncommented goto, but issues still exist,
5138         * (genAnd): fixed a bug with variables >8bits,
5139         * (genPackBits): optimization added that uses BCF/BSF to change a
5140         single bit,
5141         * (genAssign): fixed bug when assigning floating point literals,
5142         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5143         __sdcc_gsinit_startup label,
5144         * src/pic16/main.c (_pic16_init): removed search directory
5145         initialisations,
5146         * (_pic16_initPaths): NEW, used to initialise search directories,
5147         * (_hasNativeMulFor): support functions for all except char/int
5148         multiplication, and char division,
5149         * (PIC16_port struct): modified entry for native mul support,
5150         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5151         no_banksel option,
5152         * (buildCallTree): call to register_usage is ifdef'ed out,
5153
5154 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5155
5156         * device/include/string.h: applied Stas Sergeev's patch to make this
5157         header file compatible with the preprocessor -Wundef option
5158         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5159         failure (fixes bug #941458)
5160
5161 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5162
5163         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5164         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5165         that the variable, not the function, should be static
5166         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5167         to be consistent with non-literal case
5168
5169 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5170
5171         * src/SDCCast.c (isConformingBody): fixed bug #949967
5172         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5173         convilong): fixed bug #952086
5174
5175 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5176
5177         * src/SDCCmem.c (allocVariables): fixed bug #955321
5178
5179 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5180
5181         * src/hc08/main.c (_hc08_genAssemblerEnd),
5182         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5183         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5184         completely eliminated the use of a temporary file
5185         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5186         when more than one file linked
5187         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5188
5189 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5190
5191         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5192         which fixes bug #543481
5193         * support/regression/tests/bug-751703.c: fixed comments left from a
5194         cut and paste error
5195         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5196         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5197         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5198         scopes
5199         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5200         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5201         are now changed to underscores in moduleName
5202
5203 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5204
5205         * as/mcs51/lkmem.c: better fix for bug #954173
5206
5207 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5208         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5209
5210         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5211         * device/include/c8051f000.h,
5212         * device/include/c8051f120.h,
5213         * device/include/c8051f300.h,
5214         * device/include/c8051f310.h,
5215         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5216         PWM16) and detab'ed
5217
5218 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5219
5220         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5221         and mailing lists, doc'ed --no-peep-comments, removed reference
5222         to knoppix (newest version has no LyX/LaTeX), other minor changes
5223         * src/SDCCglue.c (glue): save 2 bytes stack space with
5224         option --main-return. The ljmp could probably be avoided too
5225
5226 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5227
5228         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5229
5230 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5231
5232         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5233         * src/SDCCopt.c (isLocalWithoutDef),
5234         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5235         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5236         (credit to Maarten Brock for patch #949363, on which this is based)
5237         * support/regression/tests/bug-751703.c: some test cases of extern used
5238         within inner scopes.
5239
5240 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5241
5242         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5243         SPEC_STRUCT
5244         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5245         struct definitions
5246         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5247         dwWriteLabel): fix to create valid debugger symbols even when
5248         the module name has non-alphanumeric symbols in it
5249         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5250         when a variable's allocation has been optimized away
5251
5252
5253 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5254
5255         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5256         * src/hc08/main.c,
5257         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5258         * src/mcs51/main.c,
5259         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5260         * src/ds390/main.c,
5261         * src/z80/gen.c (z80_emitDebuggerSymbol),
5262         * src/z80/main.c,
5263         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5264         * src/pic/main.c,
5265         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5266         * src/pic16/main.c,
5267         * src/avr/gen.c (avr_emitDebuggerSymbol),
5268         * src/avr/main.c,
5269         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5270         * src/xa51/main.c,
5271         * src/SDCCdebug.c (emitDebuggerSymbol),
5272         * src/SDCCdebug.h,
5273         * src/port.h: added a debugger struct to the port struct. Added a
5274         callback for defining debugger symbols
5275
5276         * src/SDCCast.c (createLabel),
5277         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5278         with isitmp = 1
5279         * src/SDCCicode.h,
5280         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5281         iCode back to the ast for the function
5282
5283         * src/hc08/ralloc.c (hc08_assignRegisters),
5284         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5285         unneeded fields from the regs struct.
5286         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5287         pushReg() & pullReg() functions instead of emitcode()
5288
5289         * src/hc08/gen.c (genLabel, genhc08Code),
5290         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5291
5292         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5293         debugger hooks
5294
5295         * src/hc08/gen.c (genEndFunction, genhc08Code),
5296         * src/hc08/gen.h,
5297         * src/mcs51/gen.c (genEndFunction, gen51Code),
5298         * src/mcs51/gen.h,
5299         * src/ds390/gen.c (genEndFunction, gen390Code),
5300         * src/ds390/gen.h,
5301         * src/z80/gen.c (genEndFunction, genZ80Code),
5302         * src/z80/gen.h,
5303         * src/z80/z80.h,
5304         * src/pic/gen.c (genEndFunction, genpic14Code),
5305         * src/pic/gen.h,
5306         * src/pic16/gen.c (genEndFunction, genpic16Code),
5307         * src/pic16/gen.h,
5308         * src/avr/gen.c (genEndFunction, genAVRCode),
5309         * src/avr/gen.h,
5310         * src/xa51/gen.c (genEndFunction, genXA51Code),
5311         * src/xa51/gen.h,
5312         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5313         specific code to cdbFile.c and out of the backend code generators
5314
5315         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5316         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5317         starting address is now 0
5318
5319         * as/hc08/asm.h,
5320         * as/hc08/m08pst.c,
5321         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5322         assembler directive for DWARF support
5323         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5324
5325         * src/src.dsp,
5326         * src/Makefile.in,
5327         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5328
5329 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5330
5331         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5332         and inappropriate peephole optimization in jump tables
5333
5334 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5335
5336         * as/hc08/m08pst.c,
5337         * src/SDCCglue.c: sdccopt works for the hc08 port now
5338
5339 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5340
5341         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5342
5343 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5344
5345         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5346
5347 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5348
5349         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5350         rules
5351         * src/SDCCmain.c,
5352         * src/SDCCglobl.h,
5353         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5354         comments from the peephole optimizer replacement rules
5355         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5356         symbols
5357         * src/SDCCcse.c (updateSpillLocation),
5358         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5359         equivalents
5360         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5361         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5362         objects far pointers
5363
5364 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5365
5366         * src/SDCCsymt.h: a missing part of my last change
5367         * src/pic/ralloc.c (regTypeNum),
5368         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5369
5370 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5371
5372         * src/SDCCicode.h,
5373         * src/SDCCicode.c (aggrToPtrDclType),
5374         * src/SDCCptropt.h,
5375         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5376         ptrPseudoSymConvert),
5377         * src/pic/ralloc.c (regTypeNum),
5378         * src/pic16/ralloc.c (regTypeNum),
5379         * src/hc08/ralloc.c (regTypeNum),
5380         * src/ds390/ralloc.c (regTypeNum),
5381         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5382         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5383
5384 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5385
5386         * link/z80/lkmain.c (afile),
5387         * as/hc08/lkmain.c (afile),
5388         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5389         prevent a pointer problem when a filename has no directory and
5390         no extension specified.
5391
5392 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5393
5394         * link/z80/lkmain.c (afile): allow periods in directory names
5395         * link/z80/lkmain.c (afile),
5396         * as/mcs51/lkmain.c (afile),
5397         * as/hc08/lkmain.c (afile): allow linker script file to have an
5398         extension other than ".lnk"
5399         * link/z80/lklex.c (getfid),
5400         * link/z80/lkmain.c (parse),
5401         * as/mcs51/lklex.c (getfid),
5402         * as/mcs51/lkmain.c (parse),
5403         * as/hc08/lklex.c (getfid),
5404         * as/hc08/lkmain.c (parse): Support comments in the linker script
5405         file on lines by themselves and after filenames
5406
5407 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5408
5409         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5410
5411 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5412
5413         * src/z80/peeph-z80.def: removed some peephole rules that don't
5414         work with multibyte arithmetic (fixed bug #937126)
5415         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5416         to registers and not global variables
5417         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5418         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5419         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5420         checking for assignments not internally generated (fixed bug #931895)
5421         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5422         structure member (fixed bug #930072)
5423
5424 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5425
5426         * src/SDCCmain.c (linkEdit),
5427         * src/hc08/main.c (_hc08_parseOptions),
5428         * as/hc08/Makefile.in,
5429         * as/hc08/aslink.h,
5430         * as/hc08/asm.h,
5431         * as/hc08/m08pst.c,
5432         * as/hc08/lkrloc.c (relr, rele),
5433         * as/hc08/lkarea.c (lnkarea)
5434         * as/hc08/lkmain.c (afile, parse),
5435         * as/hc08/lkelf.c: support for ELF output
5436         * as/hc08/lks19.c (s19),
5437         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5438
5439 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5440
5441         * as/mcs51/lkihx.c: Fixed bug #899105.
5442
5443 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5444
5445         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5446         .dsp files from Unix to DOS.
5447
5448 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5449
5450         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5451         function pointers; we have been compliant for several months now.
5452         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5453         change that was accidently commented out
5454         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5455         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5456         bug #922319
5457
5458 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5459
5460         * src/hc08/gen.c: output of all of the internal debugging information
5461         is now controlled by the D() macro; it is disabled by default
5462
5463 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5464
5465         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5466         harder to keep the same registers during a CAST iCode
5467         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5468         long via int can be done in a single cast, if the signedness is
5469         correct.
5470         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5471         putchar() in tinibios.c in ds390's library
5472
5473 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5474
5475         * src/SDCCast.c (decorateType): fixed bug #898889,
5476         cast result of a literal complement too
5477         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5478         fixed check for bitfields
5479
5480 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5481
5482         * src/SDCCicode.c (geniCodeLogic): made it static,
5483         (geniCodeLogicAndOr): added in order to fix bug #905492,
5484         (ast2iCode): fixed bug #905492
5485         * support/regression/tests/bug-905492.c: added
5486         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5487         (processParms): fixed bug #927659: don't copy parms, this will clear
5488         decorated flag
5489         * support/regression/tests/bug-927659.c: added
5490
5491 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5492
5493         * src/SDCCast.c (addCast): don't cast float to char
5494         * device/lib/libsdcc.lib: added _memmove
5495
5496 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5497
5498         * device/lib/large/Makefile: fixed parallel execution by
5499         replacing `make` by `$(MAKE)`
5500
5501 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5502
5503         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5504         offsets (fixes bug #923936)
5505
5506 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5507
5508         * device/lib/small/Makefile: fixed parallel execution by
5509         replacing `make` by `$(MAKE)`
5510
5511 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5512
5513         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5514
5515 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5516
5517         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5518         * src/regression/Makefile: Regression test was not running.
5519
5520 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5521
5522         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5523         complement if possible
5524         * src/SDCCval.c (valComplement),
5525         * src/SDCCicode.c (operandOperation): fixed complement of literal
5526         * support/regression/tests/onebyte.c (testComplement): added
5527
5528 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5529
5530         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5531         return an optimized tree; actually replace actParm with the new tree
5532         * src/SDCCast.h: added some parantheses to remove side effects
5533         * support/regression/tests/bug-920866.c
5534
5535 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5536         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5537         Bit operands were not being handled properly in the pic14 port.
5538         (now src/regression/add.c passes again).
5539
5540 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5541
5542         * src/SDCC.y (labeled_statement): case and default no longer require
5543         a following statement (RFE #893037)
5544
5545 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5546
5547         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5548         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5549         disabled (fixes bug #916294)
5550         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5551         "mov a,acc"; patch provided by Lenny Story
5552         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5553
5554 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5555
5556         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5557         functions
5558         * src/ds390/gen.c (genFunction, genEndFunction),
5559         * src/ds390/ralloc.c (ds390_assignRegisters),
5560         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5561         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5562         pushed if there are parameters passed on the stack. Also, a cleaner
5563         way to decide if r0/r1 should be pushed/popped. (Together they fix
5564         bug #918693)
5565
5566 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5567
5568         * doc/sdccman.lyx,
5569         * device/lib/mcs51/crtpagesfr.asm,
5570         * device/lib/mcs51/crtxinit.asm,
5571         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5572         to avoid confusion with Si Lab's SFRPAGE register.
5573
5574 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5575
5576         * src/SDCCglue.c (emitMaps): allow public sfr variables
5577         * src/SDCCglue.c (initialComments): include compiler build date
5578         with compiler version and put the timestamp of the generated
5579         assembly file on a serperate line to be less confusing.
5580         * src/port.h: added genInitStartup hook
5581         * src/avr/main.c,
5582         * src/ds390/main.c,
5583         * src/hc08/main.c,
5584         * src/pic/main.c,
5585         * src/pic16/main.c,
5586         * src/xa51/main.c,
5587         * src/z80/main.c: genInitStartup initialize as NULL (default to
5588         historical behaviour)
5589         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5590         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5591         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5592         library instead of hard coding it into the compiler.
5593         * support/regression/ports/mcs51-stack-auto/spec.mk,
5594         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5595         * device/lib/mcs51/Makefile,
5596         * device/lib/small/Makefile,
5597         * device/lib/large/Makefile,
5598         * device/lib/mcs51/crtpagesfr.asm,
5599         * device/lib/mcs51/crtstart.asm,
5600         * device/lib/mcs51/crtxclear.asm,
5601         * device/lib/mcs51/crtxinit.asm,
5602         * device/lib/mcs51/crtclear.asm,
5603         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5604         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5605         and into user configurable files.
5606         * device/lib/clean.mk: clean mcs51 directory too
5607         * support/regression/tests/longlit.c: added static to T1 declaration
5608         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5609         accesses in the initialization code
5610
5611 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5612
5613         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5614         OSCTRIMVAL as noted in bug #916008
5615
5616 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5617
5618         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5619         in loops with multiple exits (reported as incorrect registers
5620         used by Martin Helmling in Sdcc-user list)
5621
5622 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5623
5624         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5625         made ds390 register extensions look less like error messages
5626
5627 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5628
5629         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5630         reported by Adam Wozniak in Sdcc-user list
5631
5632 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5633
5634         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5635         arithmetic optimizations, added debug output
5636
5637 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5638
5639         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5640         * sdcc.spec: updated and split sdcc into 3 rpms
5641         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5642         needed for literals of LEFT_OP and '+'
5643         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5644         introduced RESULT_TYPE_NOPROM
5645         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5646         left shift
5647         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5648         limited promotion to int only for '*'
5649         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5650
5651 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5652
5653         * src/pic16/gen.c (genSkip),
5654         (genc16bit2lit), (gencjneshort): commented out
5655         (is_LitOp): new helper function, checks operand type
5656         (genCmpEq): rewritten
5657
5658 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5659
5660         * support/regression/tests/bug-908454.c: added
5661
5662 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5663
5664         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5665         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5666         (geniCodeCast): cosmetic, don't preserve bit storage class
5667         (geniCodeLeftShift): added promotion
5668         (geniCodeLogic): fixed regression
5669         * src/SDCCsymt.c (computeTypeOr): accept bits too
5670         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5671
5672 2004-03-07  Borut Razem <borut.razem AT siol.net>
5673
5674         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5675
5676 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5677
5678         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5679         version of pic16_genPackRegisters which does not check if ic is a
5680         CAST operator,
5681         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5682         function cause string1.c regression test fails
5683
5684 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5685
5686         * sim/ucsim/configure.in,
5687         * sim/ucsim/configure,
5688         * sim/ucsim/doc/Makefile.in: use docdir
5689         * src/SDCC.y: fixed sbit atrributes
5690         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5691         * src/SDCCast.c (decorateType): |^& need special promotion handling
5692         * src/SDCCast.h,
5693         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5694         * src/SDCCsymt.h (computeType),
5695         * src/SDCCicode.c: computeType() needs op
5696         * src/SDCCsymt.c (checkTypeSanity),
5697         * doc/sddman.lyx: "plain" bitfields are unsigned
5698         * src/SDCCsymt.c (computeTypeOr): added
5699         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5700         |^& ops
5701         * src/SDCCval.c (val*): computeType() needs op
5702         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5703         * support/regression/tests/onebyte.c: added tests for |^&
5704
5705 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5706
5707         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5708         for writing icode into asm output.
5709
5710 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5711
5712         * src/pic16/device.c: added some debug lines enabled
5713         with macro DEBUG_CHECK,
5714         * src/pic16/genarith.c: more debug in genPlus,
5715         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5716         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5717         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5718         * (aopForSym): onStack symbols are re-placed in data memspace,
5719         and onStack flag is cleared,
5720         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5721         copy temporary pcodeop,
5722         * (genPcall): added warning for not updating PCLATU,
5723         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5724         always true for pic16 port,
5725         * (genMultOneWord): NEW, supports integer multiplication,
5726         * (genMult): modified to call genMultOneWord,
5727         * (ifxForOp): added warning when return NULL,
5728         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5729         flag is set before call to operandFromSymbol for implicit
5730         added structures,
5731         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5732         options.intlong_rent are set by default,
5733         * (_hasNativeMulFor): modified to allow port generation of integer
5734         multiplication,
5735         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5736         set regtype to REG_SFR for all registers, restricting seting the
5737         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5738
5739 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5740
5741         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5742         more than 500 times in the regression tests
5743
5744 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5745
5746         * support/Util/SDCCerr.h,
5747         * support/Util/SDCCerr.c,
5748         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5749         enumerator_list),
5750         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5751         for symbol conflicts.
5752         * support/valdiags/tests/enum.c,
5753         * support/valdiags/tests/tentdecl.c,
5754         * support/valdiags/tests/struct.c: expect possible error messages
5755         referring to original symbol definitions.
5756         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5757         * src/SDCCsymt.h,
5758         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5759
5760 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5761
5762         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5763
5764 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5765
5766         * src/pic16/ralloc.c (newReg): fixed bug #908929
5767
5768 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5769
5770         * src/ds390/gen.c: added missing #include "main.h"
5771
5772 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5773
5774         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5775         checking if symbol is already in set,
5776         * src/pic16/device.h: prototype for checkAddSym,
5777         * src/pic16/gen.c: (_G): added entry interruptvector,
5778         * (assignResultValue): removed some commented out lines,
5779         * (genFunction): check for ISR via sym->type, absolute section for
5780         interrupt code is created via a new pBlock, the goto instruction is
5781         placed now correctly at the interrupt vector position, changed all
5782         references from ivec to _G.interruptvector,
5783         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5784         is the interrupt is a high priority one, same for return from ISR,
5785         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5786         externs to calls of checkAddSym,
5787         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5788         pic16_pcode_verbose flag is set,
5789         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5790         * src/pic16/pcoderegs.c: message about how many registers are saved
5791         will only be emitted if pic16_pcode_verbose flag is set,
5792
5793 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5794
5795         * src/ds390/ralloc.h,
5796         * src/ds390/ralloc.c (ds390_regWithIdx),
5797         * src/ds390/gen.c (emitcode),
5798         * src/ds390/main.h,
5799         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5800         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5801         ds390operandCompare, getRegsRead, getRegsWritten,
5802         initializeAsmLineNode): customized instruction size calculation for
5803         ds390, started basis for some register optimizations
5804         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5805         corresponding assembly output
5806         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5807         missing push/pop of r0/r1. Optimized push/pops
5808
5809 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5810
5811         * src/mcs51/main.c (instructionSize): fixed ACALL size
5812         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5813
5814 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5815
5816         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5817         the sorting of rlist with NULL elements
5818         * (print_idataType, print_idata): NEW to create idata sections
5819         * src/pic16/device.h: idataSymSet new variable
5820         * src/pic16/gen.c (genFunction): fixed some bugs in string
5821         comparing, improved the absolute section creation for ISRs,
5822         added FSR0L/FSR0H in registers that are saved in an ISR,
5823         * (genInline): fixed the processing of inline snippets,
5824         now they undergo no process by the peephole optimizer
5825         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5826         are placed in idataSymSet,
5827         * (pic16emitStaticSeg): extern symbols are added in externs,
5828         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5829         switching when aboslute variables are placed in access bank memory
5830         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5831         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5832         commented out with #if,
5833         * (pic16_packRegisters): reintroduce the check for CAST because some
5834         symbols are not correctly handled,
5835         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5836         pCodeInstruction instead of pCode,
5837         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5838         pCodeAsmDir definition,
5839         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5840         directive, then the argument directive is emitted without the leading
5841         tab, hack for inline labels which must be in the first column,
5842         * (compareLabel,pic16_findNextInstruction),
5843         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5844         * (insertBankSwitch): modified for the new pCodeAsmDir,
5845
5846 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5847         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5848
5849         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5850         instance,
5851         * (pushSide): commented out with #if,
5852         * (assignResultValue): fixed some typos in saving
5853         registers,
5854         * (genPcall): FIXED and sync'ed with genCall,
5855         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5856         * (genNearPointerGet): fixed to handle some more cases,
5857         implementation scheme via table reads,
5858         * (genConstPointerGet): modified to access code memory correct,
5859         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5860         and improved to handle some cases
5861         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5862         instead of "RETLW" for init data
5863         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5864         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5865         variables are placed in access bank memory (<0x80 and >=0xf80),
5866         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5867         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5868         TBLWT_POSTDEC,TBLWT_PREINC
5869         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5870         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5871         directives
5872         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5873         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5874         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5875         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5876
5877 2004-02-29  Borut Razem <borut.razem AT siol.net>
5878
5879         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5880         support/Util/findme.h, support/Util/system.h: enhance binary relative
5881         search for lib and include by using findProgramPath()
5882
5883 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5884
5885         * src/SDCCpeeph.h,
5886         * src/SDCCpeeph.c (pcDistance),
5887         * src/port.h,
5888         * src/mcs51/ralloc.h,
5889         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5890         * src/mcs51/main.h,
5891         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5892         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5893         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5894         size calculation port specific, started basis for some register
5895         optimizations
5896         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5897         missing push/pop of r0/r1. Optimized push/pops
5898         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5899         * device/lib/_modsint.c (_modsint),
5900         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5901         and stack version so regression tests pass
5902
5903 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5904
5905         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5906         * src/SDCCast.c (decorateType): catch another small optimization
5907         with '?' operator
5908         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5909         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5910         modified to finally use computeType() all over SDCC,
5911         see Feature Request #877103
5912         * src/SDCCval.h: cosmetic
5913         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5914         valCompare(); regression tested in muldiv.c
5915         * support/regression/tests/muldiv.c (testMod): mod sign follows
5916         dividend only
5917
5918 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5919
5920         * src/SDCCast.c (decorateType): fixed bug #902362
5921         * doc/INSTALL.txt: fixed install instructions for win32
5922
5923 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5924
5925         * device/include/Makefile.in (install): fixed by replacing spaces
5926         by tabs
5927         * doc/README.txt,
5928         * doc/INSTALL.txt: updated for release
5929         * doc/sdccman.lyx: added warning for --xstack being buggy
5930
5931 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5932
5933         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5934         to eliminate build warnings.
5935         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5936
5937 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5938            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5939
5940         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5941         removed -penable-stack, added comment for stack pragma, added
5942         warning for not initializing the stack/frame registers, removed
5943         comment at interrupts section
5944
5945         Stack is made permanent, there is no ability to disable stack usage.
5946         * src/pic16/device.h,
5947         * src/pic16/device.c: removed all references to USE_STACK macro,
5948         * src/pic16/device.c (pic16_dump_section): when no elements in
5949         rlist, free rlist before return,
5950         * (pic16_dump_int_registers): NEW, internal registers are a new set
5951         of general purpose registers reused by each function,
5952         * (checkAddReg): returns 1 if registers is added to set,
5953         * (pic16_groupRegistersInSection): when a registers is of type
5954         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5955         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5956         SRCASECMP macro is moved here from device.c
5957         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5958         PO_PCLATU, PO_PRODL, PO_PRODH,
5959         * (pic16_pCodeOpType, genMinus,
5960         changed compares to "a" register, with AOP_ACC,
5961         * (pic16_genPlus): fixed some bugs and indented properly,
5962         * (pic16_addSign): changed size to size+offset in the MOVWF
5963         instruction,
5964         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5965         multiply 8-bit operand by literal, result is 8-bit,
5966         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5967         multiply 2 8-bit operand, result is 8-bit,
5968         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5969         genUMult8X*_16,
5970         * src/pic16/gen.c: changed accUse to contain WREG only,
5971         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5972         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5973         true, do not use immediate addressing any more unless sym is a
5974         pointer in codespace,
5975         * (aopForRemat): do not use immediate addressing when symbol not in
5976         codespace and when symbol's address is requested,
5977         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5978         accUse size (= 1),
5979         * (aopGet): added case for AOP_ACC and don't return "accumulator
5980         bug" but WREG instead,
5981         * (popGetTempReg): pushes contents of temporary register in stack,
5982         * (popReleaseTempReg): pops contents of temporary register from
5983         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5984         * (pic16_popGet): separated case AOP_ACC to return register WREG
5985         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5986         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5987         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5988         the use of immediate pointers to certain cases only.
5989
5990         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5991         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5992         * (assignResultValue, genCall, genRet): modified to use the new
5993         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5994         genPcall is still broken,
5995         * (genFunction): added code to create 'A' type pBlocks when
5996         interrupt functions are generated, code not extensively tested yet,
5997         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
5998         * (genEndFunction): modified so ISRs pop stored registers from stack,
5999         * (genMultOneByte): cleanup,
6000         * (AccRsh): added flag andmask, to and result with appropriate mask,
6001         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6002         * (genDataPointerGet): fixed and reenabled its use,
6003         * (genNearDataPointerGet): bugs fixed,
6004         * (genDataPointerSet): bugs fixed,
6005         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6006         pic16_DumpSymbol, pic16_DumpOp,
6007         * src/pic16/genutils.h: function prototypes for the above functions,
6008         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6009         pointers,
6010         * (pic16emitRegularMap): many many many improvements, but needs a
6011         major cleanup,
6012         * src/pic16/main.c: enable_stack in pic16_options is removed,
6013         * (_pic16_parseOptions): removed command line options -penable-stack,
6014         * (_process_pragma): emit stack symbol only when stack pragma is
6015         processed,
6016         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6017         redirected to FSR0L/FSR0H pair,
6018         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6019         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6020         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6021         for immediates,
6022         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6023         * (dumpPicOptype): NEW,
6024         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6025         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6026         with movff instruction,
6027         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6028         added pic16_int_regs, some packRegsFor* functions are commented out,
6029         because produce errors,
6030         * src/pic16/NOTES: minor modifications
6031
6032 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6033
6034         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6035         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6036         --pack-iram.
6037         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6038         * as/mcs51/lkaomf51.c: fixed bug #895763
6039
6040 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6041
6042         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6043
6044 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6045
6046         * doc/sdccman.lyx: added details about the HC08 storage classes and
6047         interrupts, fixed the register usage info for z80 & gbz80
6048
6049 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6050
6051         * doc/sdccman.lyx: added more pic16 port documentation
6052         * device/include/pic16/: added header pic18fregs.h
6053
6054 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6055
6056         * doc/sdccman.lyx: added Vangelis' contribution
6057
6058 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6059
6060         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6061         extend to the next CALL or PCALL, not just to the next CALL.
6062
6063 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6064
6065         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6066
6067 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6068
6069         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6070         bug #895752 and a better fix for bug #716790
6071
6072 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6073
6074         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6075
6076 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6077
6078         * doc/sdccman.lyx: minor changes, minor changed
6079
6080 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6081
6082         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6083         which can't handle SDCC_NEWONEBYTEOPS,
6084         (geniCodeMultiply): removed conversion from mult to shift for pic14
6085         and pic16
6086
6087 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6088
6089         * src/hc08/gen.h,
6090         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6091         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6092         thus fixing bug #895406
6093
6094 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6095
6096         * device/lib/_modsint.c,
6097         * device/lib/_modslong.c: sign follows divisor only
6098         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6099         signs or signedness can be ignored
6100         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6101         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6102         added optimization for IFX,
6103         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6104         arguments;
6105         reenabled optimization for IFX, which was removed on 2004-01-11
6106         * src/SDCCast.h: added return type IFX
6107         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6108         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6109         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6110         SDCC_OLDONEBYTEOPS selects the old behaviour
6111         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6112         changed again and commented promotion rule
6113         * src/SDCCval.c (valDiv): promotion no longer necessary
6114         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6115         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6116         rewritten
6117         * support/regression/tests/onebyte.c: added
6118
6119 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6120
6121         * gen.c (genInline): reverted to old code for assemnling inline
6122         code because of bug reported James Chadd
6123
6124 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6125
6126         * ralloc.h: missing declarations from previous patch,
6127         seems that patch for ralloc.h was never applied, fixed
6128
6129 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6130            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6131
6132         * pcode.c,
6133         * pcode.h,
6134         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6135         indirect addressing. Marked FSR0 as deprecated
6136         * gen.c (pointerCode): commented out, not needed now
6137         (pic16_popGet2p): new MOVFF helper function
6138         (genGenPointerGet),
6139         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6140         (shiftRLong): removed duplicate debugging info
6141
6142 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6143
6144         * src/ds390/gen.c (genNearPointerGet),
6145         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6146         optimization with bits, but not bitfields.
6147         * src/ds390/ralloc.c (packRegisters),
6148         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6149
6150 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6151
6152         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6153
6154 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6155
6156         * src/SDCCsymt.h,
6157         * src/SDCCicode.c (operandFromSymbol),
6158         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6159         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6160         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6161         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6162         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6163         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6164         bug #892038
6165         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6166         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6167         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6168         * src/SDCCsymt.c (newSymbol),
6169         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6170         enumerator_list),
6171         * src/SDCCval.h,
6172         * src/SDCCval.c (newiList): fixed bug #885705
6173
6174 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6175
6176         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6177         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6178
6179 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6180
6181         * device/include/c8051f120.h,
6182         * device/include/c8051f300.h,
6183         * device/include/c8051f310.h: added/updated header files for Silicon
6184         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6185         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6186         in new section Submitting patches
6187
6188 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6189
6190         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6191         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6192         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6193         genGenPointerSet),
6194         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6195         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6196         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6197         genGenPointerSet),
6198         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6199         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6200         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6201         genGenPointerSet),
6202         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6203         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6204         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6205         genGenPointerSet): fixed bug #892400
6206         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6207         to eliminate build warnings.
6208         * src/SDCCast.c (processParms),
6209         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6210         fixed bug 751859
6211         * support/valdiag/valdiag.py: added GCC to the list of defines active
6212         when compiling with gcc
6213
6214 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6215
6216         * support/Util/SDCCerr.h,
6217         * support/Util/SDCCerr.c,
6218         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6219         with an incomplete type (fixed bug #883734)
6220         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6221
6222 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6223
6224         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6225
6226 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6227
6228         * src/SDCCast.c (decorateType),
6229         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6230         function pointer implementation
6231         * support/regression/tests/funptrs.c: added tests to verify both forms
6232         of function pointers work correctly. Added tests to verify parameters
6233         are passed in the correct order.
6234
6235 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6236
6237         * device.c (regCompare): registers are sorted by ascending
6238         address and increasing size,
6239         * main.c (_pic16_finaliseOptions): removed the declaration
6240         of compiler macro MCU. Now a macro of the format pic18fxxxx
6241         will be defined from the command line
6242
6243 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6244             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6245
6246         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6247         PCOP_RLCF was overwritten!
6248         * gen.c (genSkip): commented out calls to pic16_emitcode,
6249         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6250         * (genlshTwo),
6251         * (genRRC): added debugging info,
6252         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6253         overwritten while shifting,
6254         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6255         overwritten while shifting,
6256         * (AccLsh),
6257         * (AccRsh),
6258         * (shiftLLeftOrResult),
6259         * (shiftRLeftOrResult),
6260         * (shiftRLong),
6261         * (shiftLLong): Implemented with pic16_emitpcode
6262         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6263         * (genLeftShift): Fixed bug, operand for shift by variable always
6264         was "and"ed with 0x0f,
6265         * (genLeftShiftLiteral),
6266         * (genrshTwo),
6267         * (genRightShiftLiteral): added debugging info,
6268         * (genrshFour): added comment,
6269         * (genRightShift): determined signedness from operand "left"
6270         instead of "result"
6271
6272 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6273
6274         * src/SDCCicode.c (geniCodeParms),
6275         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6276         function pointers, fixed function pointer bugs #861242 and #861896
6277
6278 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6279
6280         * device/include/c8051f000.h,
6281         * device/include/c8051f120.h,
6282         * device/include/c8051f300.h: added header files for Silicon
6283         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6284
6285 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6286
6287         * src/SDCCast.c (processParams): added new type flow and restructured
6288         (gatherAutoInit): added new type flow
6289         (addCast): cosmetic changes
6290         (getLeftResultType): added new type flow for array indices, patch
6291         provided by Stas, see FR #877103
6292         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6293         array index patch by Stas
6294         * src/SDCCast.h: added prototype getResultTypeFromType()
6295         * src/SDCCval.h,
6296         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6297         * src/pic/glue.c (pic14emitStaticSeg),
6298         * src/pic16/glue.c (pic16emitStaticSeg),
6299         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6300         for initialization of symbols
6301         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6302         * support/Util/SDCCerr.h:
6303         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6304         * .version: bumped version number to 2.3.8
6305         * device/include/Makefile.in (install),
6306         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6307         avoid warnings
6308
6309 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6310
6311         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6312         Slade Rich fixed an optimization bug
6313         * src/pic/pcodepeep.c,
6314         * src/pic/pcoderegs.c
6315         * doc/Makefile (install): added test for directory
6316
6317 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6318
6319         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6320         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6321         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6322         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6323         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6324         * as/mcs51/asexpr.c (term),
6325         * as/hc08/asexpr.c (term): fixed bug #887146
6326
6327 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6328
6329         * src/z80/gen.c (genMult): handle single byte result product
6330         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6331         DUMMY_READ_VOLATILE (fixed bug #886367)
6332
6333 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6334
6335         * support/regression/tests/libmullong.c: fixed logic, on little endian
6336         hosts we ended without a mullong_wrapper()
6337
6338 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6339
6340         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6341         virus/worm forged address usage.
6342
6343 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6344
6345         Fixed promotion, it should be done on AST level:
6346         * src/SDCCast.c (addCast): added promotion to int
6347         (decorateType): updated call to upCast()
6348         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6349         usualUnaryConversions()
6350
6351 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6352
6353         * support/regression/tests/literalop.c (mulWrapper): Added a
6354         wrapper to remove integer overflow warnings.
6355
6356         * support/regression/tests/float_trans.c: Made work on host.
6357
6358         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6359         location of sz80.
6360
6361         * support/regression/generate-cases.py (main): Changed from inline
6362         to a main method.
6363
6364         * doc/Makefile (install): Changed to depth first to get rid of
6365         missing directory install warning.
6366
6367         * as/Makefile (install-doc): Made work on Mac.
6368
6369 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6370
6371         * src/SDCCast.c: added an additional type flow in decorateType() of
6372         opposite direction, see feature request #860006; it's enabled at runtime
6373         by setting the environment variable SDCC_NEWTYPEFLOW
6374         * src/SDCCast.h: changed prototype of decorateType()
6375         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6376         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6377         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6378         see feature request #877103
6379         * src/SDCCval.c: updated call of decorateType()
6380         (valBitwise): fixed bug #882876
6381         (valMinus): added promotion
6382         (valLogicAndOr): result is unsigned
6383         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6384         * src/SDCCsymt.c (computeType),
6385         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6386         must not cause an unsigned operation
6387         * src/pic/glue (pic14emitRegularMap),
6388         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6389
6390 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6391
6392         * src/pic/pcode.c (PCodeID): commented out left over debug code
6393
6394 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6395
6396         * support/valdiag/tests/overflow.c: added shift tests
6397         * src/pic/device.c,
6398         * src/pic/gen.c,
6399         * src/pic/gen.h,
6400         * src/pic/glue.c,
6401         * src/pic/main.c,
6402         * src/pic/pcode.c,
6403         * src/pic/pcode.h,
6404         * src/pic/pcodepeep.c,
6405         * src/pic/pcoderegs.c,
6406         * src/pic/ralloc.c,
6407         * src/pic/ralloc.h: applied patch from Slade Rich;
6408         added support for multiple code pages and multiple RAM banks on the
6409         PIC 14 port. The ASM files now no longer simply assume all the
6410         code / RAM are in the same page / bank. This means the linker can
6411         safely allocate code/RAM of separate ASM files to different pages/banks.
6412         * doc/sdccman.lyx: added Slade's tips
6413         * src/mcs51/peeph.def: fixed bug #880768
6414
6415 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6416
6417         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6418         * src/SDCCast.c (decorateType): fixed bug #880197
6419
6420 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6421
6422         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6423         getopt.h.
6424
6425         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6426         strtof is not part of C89 and isn't included with Mac OS X.
6427
6428 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6429
6430         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6431         shiftL2Left2Result): fixed bug #879326
6432         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6433         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6434         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6435         address fetch for clr instruction
6436         * device/lib/hc08/_mulint.c: created optimized assembly version
6437         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6438
6439 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6440
6441         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6442         proposed in FR #877103
6443
6444 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6445
6446         * src/SDCCval.c (cheapestVal): added missing checks
6447         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6448         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6449
6450 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6451
6452         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6453         equal operands
6454
6455 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6456
6457         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6458         loaded with the linker search paths (-L arguments) and the libraries
6459         to be linked with the current source (-l arguments). Changes
6460         currently will affect only the pic16 port.
6461         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6462         include path the port specific paths and port specific libraries,
6463         * gplink command now contains the $3 argument,
6464         * src/pic16/device.h,
6465         * src/pic16/device.c,: structure PIC_device is made public and
6466         renamed to PIC16_device, the same for variable Pics which is renamed
6467         to Pics16. Updated all references to them.
6468         * src/pic16/glue.c (pic16glue): corrected bug with code
6469         initialization which bypassed the variable initializations block.
6470
6471         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6472         COMPILE_FLAGS and added the --nostdinc option
6473
6474 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6475
6476         * device/include/mc68hc908jb8.h: Register defs for another member
6477         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6478
6479 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6480
6481         Documenting changes from previous commits.
6482         * configure.in (version 1.56),
6483         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6484         when generating output files to configure the pic16 library,
6485         but now I've commented it out, since gputils aren't installed in the
6486         SF compile farm, so library won't compile
6487
6488         * device/lib/Makefile.in (version 1.56): initially I've added in
6489         target 'all' the prerequestive 'model-pic16' so it compiled the
6490         pic16 library, but now I've commented it out for the same reasons
6491         above,
6492         * added targets 'model-pic16' and 'objects-pic16' to compile the
6493         library
6494         * added target 'port-specific-objects-pic16' to handle the
6495         generated libraries and copy them into the build/ directory
6496         * added target 'clean-intermediate-pic16' to clean intermediate
6497         files into pic16 directory
6498         * in target 'installdirs' added line to create directory pic16 in
6499         the installation path
6500
6501         * device/include/Makefile.in (version 1.11): in target 'install'
6502         added lines to copy all header files to installation path,
6503         * in target 'installdirs' added line create directory for pic16
6504         headers in the installation path
6505
6506 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6507
6508         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6509          a function call
6510
6511 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6512
6513         * configure,
6514         * device/lib/configure.in,
6515         * device/lib/configure: fixed for autoconf 2.57
6516
6517 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6518
6519         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6520         option so that it actually works. Made it specific to the z80, since
6521         the gbz80 doesn't have these kinds of I/O ports.
6522
6523 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6524
6525         * device/include/z180.h,
6526         * device/lib/_memcpy.c,
6527         * device/lib/_memmove.c,
6528         * device/lib/_mulint.c,
6529         * device/lib/ser_ir.c,
6530         * device/lib/ser_ir_cts_rts.c,
6531         * device/lib/_strcmp.c,
6532         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6533         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6534         portmode; added deprecation warning for bank= and protmode= forms.
6535         Also, guard against buffer overflow.
6536         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6537
6538 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6539
6540         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6541         changed interrupt vector table generation to only emit declared vectors.
6542         * device/include/Makefile.in: added missing backslash
6543         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6544
6545 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6546
6547         Mainly changes to support compilation of the device libraries
6548         * src/pic16/device.c: stack is allocated via symbol and not
6549         via literal number. The symbol is placed in the corresponding
6550         position of the data ram
6551         * (pic16_dump_section): relocatable and absolute uninitialized
6552         data are now emitted in sorted order to reduce section naming,
6553         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6554         weren't marked as being in the access bank,
6555
6556 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6557
6558         Added portion of GNU PIC Library under the directory
6559         device/include/pic16 and device/lib/pic16. These files
6560         contain the declarations of SFRs for the PIC18Fxx2 devices.
6561         The directory is initialized via configure from toplevel.
6562
6563 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6564
6565         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6566         the spilllocations to be compared correctly
6567
6568 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6569
6570         * src/SDCCast.c (decorateType): fixed bug introduced today
6571
6572 2004-01-12  Borut Razem <borut.razem AT siol.net>
6573
6574         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6575         doc/sdccman.lyx: upper case pragmas are deprecated
6576
6577 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6578
6579         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6580         in simpler and even better code
6581
6582 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6583
6584         * src/SDCCicode.c (operandOperation): fixed bug #874819
6585         * src/SDCCast.c (decorateType): fixed
6586         char foo (unsigned long ul) { return ul > 0; }
6587
6588 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6589
6590         * doc/sdccman.lyx: Moved and added some sections, small changes
6591         all over. Telling LaTeX to be less strict with word spacing
6592         to better keep the right margin. Changed some notes about
6593         maintainance of the ports in section 3.2.1 - is it OK like this?
6594
6595 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6596
6597         SDCC source changes:
6598         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6599         convilong): modified to inform the pic16 port that builtin functions
6600         are external
6601
6602         PIC16 PORT specific changes:
6603         * src/pic16/device.c pic16_dump_equates() added,
6604         processor registers declared internally by the port are emitted in
6605         the translation as equates,
6606         * src/pic16/gen.c: inline code is passed unprocessed to the
6607         translation,
6608         * (pic16_popGetLit2): fnuction modified to take second operand as
6609         pCodeOp pointer and not as literal,
6610         * (popRegFromIdx): prefixed with pic16_,
6611         * (pic16_popCombine2): modified to receive already allocated pCode
6612         operands,
6613         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6614         * (genFunction): initializes local stack frame and pushes on stack
6615         all the registers used by this function,
6616         * (genEndFunction): restores all registers from stack and restores
6617         stack frame,
6618         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6619         improvements,
6620         * (pic16glue): changed the program startup sequence,
6621         * added new dbName code 'A' for functions placed in absolute section
6622         * src/pic16/main.c: added function attribute _naked,
6623         * added pragma 'code' to place a fnuction at an absolute address,
6624         * added command line arguments --debug-ralloc and --pcode-verbose,
6625         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6626         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6627         * (pic16_newpCodeOpLit2): modified to take the second operand as
6628         pCodeOp pointer,
6629         * (pic16_printpBlock): modified to emit each function in a separate
6630         section,
6631         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6632         UPPER for immediate operands,
6633         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6634         instruction,
6635         * src/pic16/peeph.def: all peepholes with movff are commented out,
6636         because there is a problem in the pcode peep optimizer,
6637         * src/pic16/ralloc.c: the register allocator can now reuse local
6638         function symbols for another function. This saves register usage.
6639         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6640
6641         Added file src/pic16/NOTES with information about program writing on
6642         the current port version.
6643
6644 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6645
6646         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6647         and peephole 252 (array access)
6648
6649 2004-01-09  Borut Razem <borut.razem AT siol.net>
6650
6651         * src/SDCCmain.c : fixed #872250: -l command line defined library
6652           files are scanned before standard library files
6653
6654 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6655
6656         * src/SDCCast.c (decorateType): fixed bug #874046
6657
6658 2004-01-09  Borut Razem <borut.razem AT siol.net>
6659
6660         * support/scripts/sdcc.nsi: remove previous installation
6661
6662 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6663
6664         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6665         bytes for last interrupt vector (mcs51)
6666         * sdcc.spec: fixed typo
6667
6668 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6669
6670         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6671         gen51Code): more efficient parameter receive for --model-large
6672         ("bug" #845294)
6673
6674 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6675
6676         * src/ds390/main.c,
6677         * src/z80/main.c: added missed needLinkerScript flags (more than
6678         one port structure defined in these file)
6679         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6680         bug #795325
6681
6682 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6683
6684         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6685         * src/port.h: added flag needLinkerScript in port->linker
6686         structure to inform whether to create a .lnk file or not,
6687         * src/avr/main.c,
6688         * src/ds390/main.c,
6689         * src/hc08/main.c,
6690         * src/mcs51/main.c,
6691         * src/pic/main.c,
6692         * src/pic16/main.c,
6693         * src/xa51/main.c,
6694         * src/z80/main.c: changed appropriately to configure
6695         needLinkerScript flag
6696         * src/pic/gen.c,
6697         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6698         * src/pic/glue.c: added variable udata_section_name to
6699         override default uninitialized data segment definition for
6700         devices only with SHAREBANK memory (reported from Erik Epetrich)
6701         * (pic14emitOverlay): modified to emit a commented overlay segment
6702         directive when no overlay data exist
6703         * (picglue): modified to emit uninitialized data segment
6704         according to udata_section_name
6705         * src/pic/main.c (_pic14_parseOptions): added command line
6706         options --udata-section-name=[name] to override default
6707         udata definition name
6708         * modified _linkCmd and _asmCmd to include compiler passed
6709         arguments via -W option
6710         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6711         object file from '.rel' to '.o' in port->linker structure,
6712         changed size of fptr from 2 to 3 in port structure
6713
6714 2004-01-07  Borut Razem <borut.razem AT siol.net>
6715
6716         * support/scripts/sdcc.nsi: update PATH
6717         * support/scripts/sdcc.ico: craeted
6718
6719 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6720
6721         * device/include/Makefile.in: fix install
6722         * doc/Makefile: fix install
6723
6724 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6725
6726         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6727         in bug #860505
6728         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6729         how the function variable allocation summary is displayed; also
6730         include information about variables allocated to the overlay
6731         segment
6732
6733 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6734
6735         * as/mcs51/lkmain.c: Help about -Y option
6736         * as/mcs51/lkarea.c: Fixed gcc warnings
6737
6738 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6739
6740         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6741         fixed warning
6742         * support/valdiag/tests/overflow.c: added
6743         * src/SDCCast.c (decorateType),
6744         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6745         LEFT_OP (left shift)
6746
6747 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6748
6749         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6750         (default behaviour).
6751
6752 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6753
6754         A python script to validate compiler diagnostic messages. It can be
6755         used to verify that sdcc complains about bad c source code and
6756         gives a good location of the error.
6757         * support/valdiag/Makefile,
6758         * support/valdiag/valdiag.py,
6759         * support/valdiag/tests/*
6760
6761 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6762
6763         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6764         * src/SDCCsymt.c (newEnumType),
6765         * src/SDCCsymt.h
6766         * support/Util/SDCCerr.c,
6767         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6768         enum related bugs.
6769         * support/regression/tests/enum.c: added test for enum values that
6770         require at least 2 bytes of storage.
6771
6772 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6773
6774         * src/common.h: added ifndef/define/endif macros
6775         around the header file.
6776         Bug reported from Jesus Calvino-Fraga
6777
6778 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6779
6780         * sdcc.spec: updated
6781         * device/include/Makefile.in: don't install CVS directories
6782         * device/lib/Makefile.in: added removal of CVS directories after install
6783         * doc/Makefile: fixed install, added local_icons
6784         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6785         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6786         * src/ds390/gen.c (genRightShift): fixed bug #870788
6787         * src/SDCCast.c (decorateType): fixed bug #870781
6788
6789 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6790
6791         PIC16 port related changes:
6792         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6793         added variable stackPos,
6794
6795         * gen.c: genCall, assignResultValue: added support for
6796         pushing/retrieving function parameters to/from stack,
6797         genFunction,genEndFunction: setup stack frame for the
6798         generated function,
6799         genAddrOf: will be changed according to bug 863624
6800
6801         * added files genutils.c and genutils.h which contain gen*
6802         debugged and optimised functions extracted from gen.c
6803
6804         * glue.c: added variable 'externs' which holds extern symbols,
6805         pic16emitRegularMap: is modified to properly handle relocatable
6806          symbols under the new scheme,
6807         pic16createInterruptVect: is modified
6808         pic16printPublics: is modified to emit 'global' assembler directives,
6809         added pic16_printExterns to print extern symbols,
6810         pic16glue: initializes stack/frame pointer in the beginning of
6811         the assembly output. Temporary hack, will be corrected later,
6812         because gplink yet does not support stack and SDCC does not
6813         yet support a type of crt0.o object to create the final binary.
6814
6815         * Removed many lines that contain 8051 legacy code.
6816         * The code is finally placed under a 'code' directive.
6817         * Added port specific options.
6818
6819         * _process_pragma: simplified since now we do not need *special*
6820         include file to define SFR registers. But a separate header
6821         will be needed. This will be developed later.
6822         * _pic16_parseOptions: added, parses port specific options:
6823         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6824         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6825         --preplace-udata-with=
6826
6827         * _pic16_setDefaultOptions: modified to initialize section names,
6828         but hack is temporarly out of order since it needs improvement.
6829         * _pic16_genAssemblerPreamble: configuration words are emitted by
6830         their address instead of their name. This part is incomplete and
6831         supports only the 18Fxx2 devices. Other devices will emit an error
6832         during assembly since they do not contain the same set of config
6833         registers
6834         * _pic16_genIVT: is modified,
6835
6836         * pcode.c: added definitions for some hardware registers that are needed
6837         for stack support
6838         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6839         All PCI entries are updated. Now LFSR is supported.
6840         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6841         * added pic16_newpCodeOpLit2 to support instructions with
6842         two literal arguments
6843         * pic16_pCode2str: corrected code that emits assembler instructions
6844         with two literal operands and those that have an access bit modifier
6845         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6846         this fixes a bug which caused some labels to be lost, when an
6847         assembler directive was added, i.e. banksel,
6848         * pic16_FixRegisterBanking: improved logic that causes the insertion
6849         of bank switching,
6850         * InlineFunction: functions that are called once, are not any more
6851         inlined. This can be a port option in the future,
6852
6853         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6854
6855         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6856         hold the corresponding uninitialized symbols,
6857         * pic16_allocProcessorRegister: registers have explicit marked the
6858         accessBank field,
6859         * pic16_allocInternalRegister: registers are explicit marked as
6860         not used,
6861         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6862         processing list, so bit registers were lost,
6863         *
6864
6865         * ralloc.h: added field 'accessBank' and original symbol operand
6866         in register definition,
6867         * removed the field isMapped from register definition,
6868
6869         ** Several functions have been removed from various sources:
6870         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6871         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6872         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6873         pic16_assignRelocatableRegisters
6874
6875         ** others have been introduced:
6876         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6877         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6878
6879 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6880
6881         * support/scripts/inc2h.pl: changed definition of BIT_AT
6882         to emit 'sbit at' instead of 'bit at'. This was a request.
6883
6884         PIC16 port related preliminary changes:
6885         * gen.c: prefixed function popRegFromString with
6886         pic16_ and all references to it corrected
6887         * pcode.c: all pic16_pc_* hardware registers prefixed
6888         with underscore (_),
6889         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6890         * ralloc.c: newReg(): when register is REG_SFR then
6891         set address to rIdx,
6892         pic16_allocProcessorRegister(): marks register wasUsed=0
6893         pic16_writeUsedRegs(): added a call to assign processor
6894         registers via pic16_assignFixedRegisters
6895
6896 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6897
6898         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6899         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6900         variables in unused register banks.  Also the SSEG is placed
6901         wherever there is enough space for it, and IDATA can be anywhere
6902         in internal RAM.  For now compile using -Wl-Y[stack_size].
6903         The mem file is different for this option as well, since it
6904         makes no sense of talking about DSEG lenght.
6905
6906 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6907
6908         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6909         in certain cases, e.g. when ROM assignment, patch provided
6910         from Albert den Haan.
6911
6912 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6913
6914         Many signedness and type propagation fixes:
6915         * src/SDCCicode.c: made geniCodeCast() static
6916         replaced SPEC_ by IS_ (cosmetic)
6917         (operandOperation): fixed div and mod operation
6918         (usualBinaryConversions): added support for promotion of char
6919         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6920         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6921         (geniCodeAdd): an array index will stay unsigned, even if promoted
6922         from char to int
6923         (geniCodeArray): ditto
6924         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6925         * src/SDCCsymt.c (computeType): added more support for char;
6926         promotion of char is selectable by promoteCharToInt, fixed signedness
6927         for all cases
6928         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6929         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6930         * src/SDCCval (val*): replaced signedness calculation by
6931         computeType()
6932         rearranged if-branches (cosmetic)
6933         (valShift): added warning W_SHIFT_CHANGED
6934         (valCompare): fixed problem with different types
6935         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6936         * support/regression/tests/literalop.c: added many cases
6937         * support/regression/tests/ast_constant_folding.c: changed finally to
6938         'unsigned int'
6939         * .version: new year, new version: 2.3.7
6940         * src/SDCCmain.c (main): applied patch #866468
6941         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6942         provided by Scott Bronson
6943         * doc/sdccman.lyx: updated documentation for sdcdb
6944         updated and added chapter tips
6945
6946 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6947
6948         * src/SDCCsymt.h: missing from yesterday's commits
6949
6950 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6951
6952         * src/SDCC.y (struct_or_union_specifier),
6953         * support/Util/SDCCerr.c,
6954         * support/Util/SDCCerr.h: verify that struct & union tags are used
6955         as declared.
6956
6957 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6958
6959         * src/SDCCglobl.h: missing from yesterday's commits
6960
6961 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6962
6963         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6964         sft_attributes, struct_declaration, parameter_declaration,
6965         type_name, start_block, declaration_list),
6966         * src/SDCC.lex (check_type): support redefinition of typedef names
6967
6968 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6969
6970         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6971         aligned xdata arrays. Erik helped me with the if clause.
6972
6973 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6974
6975         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6976         warning
6977
6978 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6979
6980         * src/SDCCast.h,
6981         * src/SDCCast.c (newAst_),
6982         * src/SDCCicode.h,
6983         * src/SDCCicode.c (ast2iCode, newiCode),
6984         * src/SDCCglobl.h,
6985         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6986         expr, statement, expression_statement, selection_statement,
6987         iteration_statement, expr_opt, jump_statement): foundation for tracking
6988         sequence points
6989         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6990         point code too)
6991
6992 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6993
6994         * support/Util/SDCCerr.c,
6995         * src/SDCCast.h,
6996         * src/SDCCast.c (createCase, createDefault, decorateType),
6997         * src/SDCClabel.c (labelUnreach),
6998         * src/SDCC.y (labeled_statement, jump_statement): More improvements
6999         to error messages.
7000         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7001         (with thanks to Stas Sergeev)
7002         * device/include/time.h,
7003         * device/lib/time.c (CheckTime): suppress unreachable code warning
7004
7005 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7006
7007         * src/SDCCast.c (createIvalCharPtr),
7008         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7009         bug #753752)
7010         * support/regression/tests/nullstring.c: tests for these two bugs
7011
7012 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7013
7014         * support/Util/SDCCerr.h,
7015         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7016         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7017         about storage class and 'at' used inside struct or union
7018         * src/SDCCBBlock.c (iCodeFromeBBlock),
7019         * src/SDCCcse.c (ifxOptimize),
7020         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7021         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7022         printIval, emitStaticSeg, emitOverlay),
7023         * src/SDCClabel.c (deleteIfx),
7024         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7025         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7026         gatherAutoInit, processParms),
7027         * support/Util/SDCCerr.h,
7028         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7029         reporting for post-parse errors.
7030
7031 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7032
7033         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7034         implicit casts via union; they don't work on big endian systems
7035         (possible fix for bug #861138)
7036
7037 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7038
7039         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7040         * src/mcs51/main.c: fixed the fix for bug #737001
7041
7042 2003-12-15  Borut Razem <borut.razem AT siol.net>
7043
7044         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7045
7046 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7047
7048         * support/makebin/makebin.c: put output in binary mode
7049
7050 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7051
7052         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7053         xdata and data memory on startup. Set the environment variable
7054         SDCC_NOGENRAMCLEAR to disable this.
7055         * src/mcs51/peephole.def,
7056         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7057         (allows non-interrupt and interrupt code to safely compete for a resource
7058         without the non-interrupt code having to disable interrupts)
7059
7060 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7061
7062         * src/SDCCicode.c (geniCodeAdd),
7063         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7064         with valFromType if type might be a pointer and host is big endian).
7065         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7066         types, not just integer types.
7067         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7068         multiply defined with mismatching "at" address.
7069
7070 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7071
7072         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7073         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7074         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7075         with embedded nulls (fixed bug #753752)
7076
7077 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7078
7079         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7080         Apparently this did not see much testing (endless loop)
7081
7082 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7083
7084         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7085
7086 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7087
7088         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7089         gracefully handle NULL memmap pointers
7090
7091 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7092
7093         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7094         instead of deleting the iCode when an operand is volatile
7095         * src/z80/gen.c (genDummyRead),
7096         * src/mcs51/gen.c (genDummyRead),
7097         * src/ds390/gen.c (genDummyRead),
7098         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7099         not just IC_RIGHT
7100         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7101         * src/SDCC.y: fixed bug #850420
7102
7103 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7104
7105         Applied z80 i/o port patch from Peter Townson and fixed some operators
7106         to better handle operands in A register.
7107         * device/include/z180.h
7108         * src/SDCC.y
7109         * src/SDCCglue.c
7110         * src/z80/gen.c
7111         * src/z80/gen.h
7112         * src/z80/main.c
7113         * src/z80/peeph-z80.def
7114         * src/z80/peeph.def
7115         * src/z80/z80.h
7116
7117 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7118
7119         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7120
7121 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7122
7123         * device/lib/hc08/_mullong.c: Removed extra #endif
7124
7125 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7126
7127         * sim/ucsim/hc08.src/inst.cc,
7128         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7129         carries from x to h
7130         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7131         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7132         * device/include/stdarg.h: fixed varargs for hc08
7133         * device/lib/Makefile.in,
7134         * device/lib/hc08/Makefile,
7135         * device/lib/hc08/_mulint.c,
7136         * device/lib/hc08/_mullong.c: fixed some endian problems
7137
7138 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7139
7140         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7141         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7142         * device/lib/_gptrget.c,
7143         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7144
7145 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7146
7147         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7148         * src/SDCCast.c (astErrors): fixed bug #846007
7149         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7150
7151 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7152
7153         * src/SDCCast.c (decorateType): disabled a transformation I added in
7154         revision 1.188 (access to fields of a structure at an absolute address);
7155         it breaks with bitfields, extern declarations, and gcse analysis.
7156         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7157         could be assigned through a pointer, so don't complain.
7158         * src/SDCCast.c (astErrors),
7159         * src/SDCCast.h,
7160         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7161
7162 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7163
7164         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7165         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7166         output of __config directives, since gpasm now supports them
7167         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7168         pre-processor macro, i.e. -DMCU=p18f452
7169         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7170         and modified to handle 'cast' icode similarly to '=' icode
7171         * src/pic16/device.h (typedef struct PIC_device): added field
7172         'extMIface' to indicate that chip has external memory interface
7173         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7174         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7175         18F8720
7176
7177 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7178
7179         * src/SDCC.y (pointer): fixed bug #846006
7180         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7181         * src/SDCCast.c (decorateType): fixed bug #846009
7182         * src/ds390/peeph.def,
7183         * src/ds390/gen.c (genAnd, genOr),
7184         * src/mcs51/peeph.def,
7185         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7186
7187 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7188
7189         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7190         * src/SDCCdflow.c
7191         * src/SDCCcse.c
7192         * src/SDCCcse.h
7193         * src/SDCCBBlock.h
7194         * src/SDCCBBlock.c
7195
7196 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7197
7198         fixed bug #845089
7199         * src/SDCCbitv.h,
7200         * src/SDCCbitv.c: added function to free a bitvector
7201         * src/SDCClrange.h,
7202         * src/SDCClrange.c: added function to recompute the liveranges
7203         * src/avr/ralloc.c,
7204         * src/ds390/ralloc.c,
7205         * src/hc08/ralloc.c,
7206         * src/mcs51/ralloc.c,
7207         * src/pic/ralloc.c,
7208         * src/pic16/ralloc.c,
7209         * src/xa51/ralloc.c,
7210         * src/z80/ralloc.c: recompute the liveranges after register packing
7211
7212 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7213
7214         * src/SDCCloop.c (newInduction): fixed bug #845630
7215
7216 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7217
7218         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7219         inadvertantly left behind from my 2003-11-12 change
7220
7221 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7222
7223         Updated headers I neglected to commit yesterday.
7224         * src/SDCClrange.h,
7225         * src/SDCCicode.h
7226
7227 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7228
7229         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7230         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7231         * src/SDCCopt.c (eBBlockFromiCode),
7232         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7233         the creation of the key hash table from the sequencing so it can be used
7234         earlier (for some GCSE bug fixes still pending)
7235
7236 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7237
7238         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7239         * support/regression/tests/addsub.c: testing genPlus shortcut
7240
7241 2003-11-15  Borut Razem <borut.razem AT siol.net>
7242
7243         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7244
7245 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7246
7247         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7248         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7249         ordering is immaterial.
7250         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7251
7252 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7253
7254         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7255         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7256         (SIGSEV) of bug #840381
7257         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7258         unlink new file before rename if new and old filenames are the same)
7259
7260 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7261
7262         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7263         uninitialized variables) for the mcs51. Set environment variable
7264         SDCC_GENRAMCLEAR to test.
7265         xdata initialization slightly shorter
7266
7267 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7268
7269         * src/SDCCsymt.h,
7270         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7271         #838241 & 780691 (basicly the same bug)
7272         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7273         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7274
7275 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7276
7277         * src/SDCCmain.c (linkEdit): "fix" #834252
7278
7279 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7280
7281         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7282         * src/SDCCast.h,
7283         * src/SDCC.y: fixed bug #819403
7284
7285 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7286
7287         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7288         the reentrant attribute.
7289         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7290         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7291         simulation
7292         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7293         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7294         erroneously reduced to a literal.
7295         * src/hc08/ralloc.c (packRegisters, rematStr),
7296         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7297         some cases
7298
7299 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7300
7301         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7302         * doc/sdccman.lyx: changed from 'article' to 'book'
7303         * doc/Makefile: readded test_suite_spec and cdbfileformat
7304
7305 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7306
7307         * device/include/stdlib.h: include malloc.h to comply with ANSI
7308         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7309
7310 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7311
7312         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7313         * doc/clean.mk: also remove *.out files
7314         * doc/sdccman.lyx: some additions, larger top/bottom margins
7315
7316 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7317
7318         * src/SDCC.y: fixed bug #837365
7319         * support/regression/tests/bitopcse.c
7320         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7321         a symbol (might be valop instead)
7322         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7323         * device/lib/clean.mk: added hc08 to the cleaning list
7324
7325 2003-11-04  Borut Razem <borut.razem AT siol.net>
7326
7327         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7328           made 2003-11-04
7329         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7330           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7331           malloc is declared in standard stdlib.h
7332
7333 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7334
7335         * device/lib/hc08/Makefile: need to clean .rel not .o files
7336         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7337
7338 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7339
7340         * src/port.h,
7341         * src/hc08/main.c,
7342         * src/mcs51/main.c,
7343         * src/ds390/main.c,
7344         * src/z80/main.c,
7345         * src/avr/main.c,
7346         * src/pic/main.c,
7347         * src/pic16/main.c,
7348         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7349         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7350         tests (which uses the port's oclsExpense function)
7351         * src/SDCC.y,
7352         * src/SDCCast.c,
7353         * src/SDCCicode.c,
7354         * src/hc08/gen.c,
7355         * src/ds390/gen.c,
7356         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7357
7358 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7359
7360         * src/SDCCcse.c (ifxOptimize),
7361         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7362         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7363         deleting the IFX iCode.
7364         * src/hc08/ralloc.c: reduced unneeded slocs
7365         * src/hc08/gen.c: fixed bug in asmopToBoolean
7366
7367 2003-11-04  Borut Razem <borut.razem AT siol.net>
7368
7369         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7370           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7371           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7372           transferred to configure
7373
7374 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7375
7376         Use headers defined in the C[++] standards:
7377         * sim/ucsim/gui.src/serio.src/fileio.cc
7378         * sim/ucsim/gui.src/serio.src/frontend.cc
7379         * sim/ucsim/gui.src/serio.src/main.cc
7380         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7381         * support/Util/NewAlloc.c
7382         * as/hc08/lklibr.c
7383         * as/mcs51/lklibr.c
7384         * as/z80/aslist.c
7385         * as/z80/assym.c
7386
7387 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7388
7389         * Added MSVC projects for hc08 assembler and linker:
7390         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7391         /as/hc08/link_hc08.dsp
7392
7393 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7394
7395         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7396
7397 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7398
7399         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7400
7401 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7402
7403         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7404
7405 2003-10-31  Borut Razem <borut.razem AT siol.net>
7406
7407         * support/cpp2/cpplib.h,
7408           support/cpp2/cpplib.c,
7409           support/cpp2/cpplex.c,
7410           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7411           to switch _asm block preprocessing on / off. Default is
7412           #pragma preproc_asm +
7413
7414 2003-10-31  Borut Razem <borut.razem AT siol.net>
7415
7416         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7417           when outputting comment blocks (when executed with -C option) and
7418           _asm (SDCPP specific) blocks
7419
7420 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7421
7422         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7423
7424 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7425
7426         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7427
7428 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7429
7430         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7431         * src/SDCCast.c (decorateType): fixed bug #832664
7432
7433 2003-10-31  Borut Razem <borut.razem AT siol.net>
7434
7435         * support\cpp2\cpplex.c: fixed for SDCPP:
7436           comments(when executed with -C option) and _asm blocks
7437           were included even if they where in skipped #if block.
7438           Applied solution from GCC cpp 3.3.2
7439
7440 2003-10-31  Borut Razem <borut.razem AT siol.net>
7441
7442         * src/SDCC.lex: sdcc now understands both formats:
7443           '# <line_number> <file_name>' and
7444           '#line <line_number> <file_name>'
7445         * support/cpp2/cppmain.c: sdcpp now generates the standard
7446           '# <line_number> <file_name>' instead of former
7447           '#line <line_number> <file_name>'
7448
7449 2003-10-30  Borut Razem <borut.razem AT siol.net>
7450
7451         * support/cpp2/cpphash.h,
7452         * support/cpp2/cpplib.h
7453         * support/cpp2/cpplex.c,
7454         * support/cpp2/cppmain.c,
7455         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7456
7457 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7458
7459         Fixed a number of problems revealed by bug #827883.
7460         * src/SDCCloop.c (loopInvariants): Spill location of the
7461         result operand should be recomputed if extracted from
7462         a loop. Also, don't extract assignments of an iTemp
7463         from a literal.
7464         * src/SDCCast.c (isConformingBody): loop reversal should
7465         not occur if the control variable is involved with a
7466         relational operator.
7467
7468 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7469
7470         * .version: bumped to 2.3.6 to reflect the big improvements
7471         made by Erik and Klaus. Thanks!
7472
7473 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7474
7475         Replaced the livrange code.
7476         * src/SDCClrange.c: added new LR code
7477         * src/SDCCloop.c,
7478         * src/SDCCBBlock.h: removed remainig parts from old LR code
7479         * src/ds390/ralloc.c,
7480         * src/ds390/gen.c: minor fixes to make it work with new code
7481
7482 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7483
7484         * as/hc08/asm.h,
7485         * as/hc08/lkrloc.c,
7486         * src/hc08/gen.c,
7487         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7488         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7489         (tweaked fix for bug #818696)
7490
7491 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7492
7493         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7494
7495 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7496
7497         * src/SDCCmain.c,
7498         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7499         * src/mcs51/gen.c (gencjneshort),
7500         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7501         more efficient (per Scott Bronson's suggestion)
7502
7503 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7504
7505         Extended the semantics of the critical keyword to include
7506         individual statements. See RFE #827755 and #799831
7507         * src/SDCC.y
7508         * src/SDCCicode.c
7509         * src/SDCCopt.c
7510         * src/SDCCast.c
7511         * support/Util/SDCCerr.c
7512         * support/Util/SDCCerr.h
7513         * src/mcs51/gen.c
7514         * src/ds390/gen.c
7515         * src/hc08/gen.c
7516
7517 2003-10-19  Borut Razem <borut.razem AT siol.net>
7518
7519         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7520
7521 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7522
7523         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7524         Fixed bug #818696
7525         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7526         and predecrement operand is displayed
7527
7528 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7529
7530         * src/SDCCval.c (valMinus): fixed bug #826041
7531
7532 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7533
7534         Some hc08 related updates that I missed earlier
7535         * sim/ucsim/stypes.h
7536         * support/regression/ports/hc08/spec.mk
7537
7538 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7539
7540         New target "hc08" for the Motorola 68hc08 family of micros
7541
7542         * configure
7543         * configure.in
7544         * Makefile
7545         * src/hc08/*
7546         * src/SDCCmain.c
7547         * src/port.h
7548         * sim/ucsim/hc08.src/*
7549         * sim/ucsim/configure.in
7550         * src/ucsim/configure
7551         * sim/ucsim/packages_in.mk
7552         * as/hc08/*
7553         * as/Makefile
7554         * device/include/mc68hc908qy.h
7555         * device/lib/hc08/*
7556         * device/lib/Makefile.in
7557         * support/regression/ports/hc08/*
7558         * support/regression/Makefile
7559
7560 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7561
7562         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7563         regression test
7564         * src/ds390/gen.c (genCast): fixed bug #821957
7565
7566 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7567
7568         * device/lib/logf.c: "fixed" overlay bug
7569         * support/regression/ports/host/spec.mk: added m library
7570         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7571         * support/regression/tests/float_trans: added (for Eric)
7572
7573 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7574
7575         * src/mcs51/gen.c (genCpl): fixed bug
7576         http://sf.net/mailarchive/message.php?msg_id=6263915
7577
7578 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7579
7580         * src/SDCCast.c (decorateType): added extended constant folding
7581         * src/SDCCsymt.c (computeType): cleanup
7582         * src/SDCCval.c (valShift): minor optimization
7583         * support/regression/tests/ast_constant_folding.c: added
7584
7585 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7586
7587         * src/SDCCmain.c: removed some unintended changes
7588
7589 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7590
7591         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7592         * src/z80/gen.c: fixed part of bug #817589
7593         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7594
7595 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7596
7597         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7598         * src/SDCCcflow.c
7599         * src/SDCCcse.c
7600         * src/SDCCdflow.c
7601         * src/SDCClabel.c
7602         * src/SDCClrange.c
7603         * src/SDCCmem.c
7604         * src/SDCCopt.c
7605         * src/SDCCpeeph.c
7606         * src/SDCCset.c
7607         * src/avr/ralloc.c
7608         * src/ds390/ralloc.c
7609         * src/izt/ralloc.c
7610         * src/mcs51/ralloc.c
7611         * src/pic/ralloc.c
7612         * src/pic16/ralloc.c
7613         * src/xa51/ralloc.c
7614         * src/z80/ralloc.c
7615         * src/z80/gen.c: removed unused label "release:"
7616
7617 2003-10-06  Borut Razem <borut.razem AT siol.net>
7618
7619         * src/SDCC.lex: removed definition of unused variables
7620           save_optimize and save_options
7621
7622 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7623
7624         * clean.mk: removed '=' in "-maxdepth=1"
7625         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7626         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7627
7628 2003-10-06  Borut Razem <borut.razem AT siol.net>
7629
7630         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7631           my_unput() replaced by unput()
7632
7633 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7634
7635         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7636         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7637         type-punned pointer will break strict-aliasing rules"
7638         Old LR behaviour is again default; Klaus' LR can be choosen by
7639         defining the environment variable LRKLAUS
7640         * src/SDCCBBlock.h
7641         * src/SDCCloop.c
7642         * src/SDCClrange.c
7643         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7644         * clean.mk: fixed removal of files in bin/CVS/
7645         * device/lib/clean.mk: fixed removal of directories small and large
7646         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7647         * src/SDCCicode.c,
7648         * src/SDCCval.c: removed superflous test for pedantic
7649
7650 2003-10-05  Borut Razem <borut.razem AT siol.net>
7651
7652         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7653           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7654           message "unmatched #pragma SAVE and #pragma RESTORE"
7655
7656 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7657
7658         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7659           assembly, critical functions, atomic, nojtbound)
7660
7661 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7662
7663         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7664         * src/SDCCBBlock.h
7665         * src/SDCCloop.c
7666         * src/SDCCloop.h
7667         * src/SDCClrange.c
7668
7669 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7670
7671         * src/z80/gen.h,
7672         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7673         * src/mcs51/gen.h
7674         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7675         * src/ds390/gen.h
7676         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7677         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7678         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7679
7680 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7681
7682         * src/z80/gen.c (genRet): fixed bug #524753
7683         * src/z80/gen.c (genCast): fixed internal error on cast from
7684         pointer to long
7685         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7686         fix for bug #477835 to the z80
7687         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7688         for tracking iCodes in the peephole optimizer for z80
7689
7690 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7691
7692         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7693         the other part of bug #814548
7694         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7695
7696 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7697
7698         * src/SDCCcse.c: fixed part of bug #814548
7699
7700 2003-09-28  Borut Razem <borut.razem AT siol.net>
7701
7702         * src/asm.c: rewrite of printILine() to use temporary file instead
7703           a pipe
7704         * src/xa51/main.c: commented out declaration of int rewinds
7705
7706 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7707
7708         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7709
7710 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7711
7712         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7713         * src/asm.c (printILine): Fixed bug #811015
7714
7715 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7716
7717         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7718         freeing.
7719
7720 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7721
7722         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7723         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7724         to correctly handle general case of AOP_PAIRPTR
7725         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7726
7727 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7728
7729         * src/mcs51/ralloc.c (fillGaps),
7730         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7731         register positioning bug)
7732
7733 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7734
7735         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7736
7737 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7738
7739         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7740         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7741         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7742         (ralloc doesn't intentionally do this now, but perhaps later)
7743         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7744         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7745         register positioning bugs (Fixed bug #762602 and #795325)
7746         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7747         (Fixed bug #808779)
7748         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7749         lines that --i-code-in-asm generates
7750
7751 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7752
7753         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7754         trying to fclose a FILE* that was already closed.
7755
7756 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7757
7758         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7759         of const struct should be treated as if const themselves)
7760
7761 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7762
7763         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7764
7765 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7766
7767         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7768         Unix (/n) and DOS (/r/n) line terminations.
7769
7770 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7771
7772         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7773         bug #613775
7774
7775 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7776
7777         * src/mcs51/gen.c (genFunction, genEndFunction),
7778         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7779         and restore of EA so that stack offsets to parameters are
7780         correct when using both critical and reentrant/stack-auto.
7781         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7782         size (can be triggered in error if sloc is shared between
7783         different sized objects)
7784         * device/include/float.h: fixed macros to explicitly use
7785         unsigned long where needed
7786
7787 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7788
7789         Feature req. 799831: added code to allow nesting of critical functions
7790         * src/mcs51/gen.c (genFunction, genEndFunction)
7791         * src/ds390/gen.c (genFunction, genEndFunction)
7792
7793 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7794
7795         * src/SDCCsymt.c (sclsFromPtr),
7796         * src/SDCCsymt.h,
7797         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7798         support for standard C idiom of memory mapped variables; for
7799         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7800         to xdata int at 0x1234 tempvar = 1.
7801         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7802         provided by Akiya ISHIDA
7803
7804 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7805
7806         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7807         * src/SDCCval.c (constVal): added reduction from int to char
7808         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7809         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7810         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7811         to ignore the sign
7812         * support/regression/tests/shifts.c: fixed
7813
7814 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7815
7816         * src/z80/gen.c (genXor): Fixed bug #805445
7817
7818 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7819
7820         Fixed bug #621531 (const & volatile confusion in the type chain).
7821         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7822         refer to the const or volatile state of the pointer itself.
7823
7824         * src/SDCCast.c
7825         * src/SDCCglue.c
7826         * src/SDCCicode.c
7827         * src/SDCCsymt.c
7828         * src/SDCCval.c
7829         * src/SDCC.y
7830         * src/SDCCsymt.h
7831         * src/pic/gen.c
7832         * src/pic/ralloc.c
7833         * src/pic16/gen.c
7834         * src/pic16/ralloc.c
7835         * support/regression/tests/const.c
7836
7837 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7838
7839         When checking for duplicated modules, use absolute paths
7840         instead of relative paths.  Files changed:
7841
7842         * as/mcs51/lklib.c
7843         * link/z80/lklib.c
7844
7845 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7846
7847         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7848
7849 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7850
7851         * device/include/string.h: added size_t typedef, changed
7852         prototypes to use size_t, eliminated separate reentrant and
7853         non-reentrant declarations, added _memmove declaration
7854         * device/lib/_memcpy.c: changed to use size_t instead of int,
7855         changed /4 to >>2 to avoid division library call
7856         * device/lib/_memcmp.c,
7857         * device/lib/_memset.c,
7858         * device/lib/_strncat.c,
7859         * device/lib/_strncpy.c,
7860         * device/lib/_strncmp.c: changed to use size_t instead of int
7861         * device/lib/_memmove.c: new file (fixed bug #772294)
7862         * device/lib/Makefile.in: added _memmove.c
7863         * device/lib/z80/asm_strings.s: fixed bug #772290
7864         * support/regression/tests/bitfields.c: attempt to fix host assertion
7865         failure on amd64-unknown-linux2.2
7866
7867 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7868
7869         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7870         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7871         * as/z80/asmain.c (main): fixed bug #801766
7872
7873 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7874
7875         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7876         compilers
7877
7878 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7879
7880         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7881         reported in bug #800609
7882
7883 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7884
7885         * Top header beautifications in src/pic16 directory:
7886           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7887           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7888           pcoderegs.h, ralloc.c, ralloc.h
7889         * main.c: added top header and GPL license notice
7890         * pcode.c: fixed the if-conditional warning
7891
7892 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7893
7894         * device/lib/_mullong.c: replaced int by short for gcc
7895
7896 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7897
7898         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7899         and JUMPTABLE iCodes properly now (worked by accident before)
7900         * src/mcs51/gen.c (leftRightUseAcc),
7901         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7902         iCode properly now. Use getSize instead of nRegs since a & b
7903         aren't part of the nRegs tally.
7904
7905 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7906
7907         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7908         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7909           before instructions that use the _STATUS register
7910
7911 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7912
7913         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7914         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7915         fetching of the pointer
7916         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7917         copied from genNearPointerSet()
7918         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7919         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7920         If they pop r0/r1 they must be called in the opposite order than aopOp().
7921         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7922         (resp. --stack-auto), prepared for --xstack
7923
7924 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7925
7926         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7927
7928 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7929
7930         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7931         these ports have their own __sdcc_external_start()
7932
7933 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7934
7935         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7936         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7937         type for bits was changed. It resulted in bit variables becoming
7938         global, which is not permitted in PIC 14 assembly output.
7939
7940 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7941
7942         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7943
7944 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7945
7946         Z80 and MCS51 linkers complaint if a public symbol is defined
7947         in more than one library module:
7948
7949         * as/mcs51/lklib.c
7950         * link/z80/lklib.c
7951         * as/mcs51/Makefile.in
7952
7953 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7954
7955         A few small changes that speed up the peephole optimizer.
7956
7957         * src/SDCCpeeph.c
7958
7959 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7960
7961         Try to make the peephole optimizer smarter by maintaining
7962         an association between the assembly source code and the
7963         iCodes that originated them. Put this information to use
7964         with a new peephole rule condition "notVolatile" so that
7965         the rules can be aggressive yet still safe.
7966
7967         * src/SDCCpeeph.c
7968         * src/SDCCpeeph.h
7969         * src/mcs51/gen.c
7970         * src/mcs51/peeph.def
7971
7972 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7973
7974         Fixed bug #741761
7975
7976         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7977         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7978         if the left or right operand symbols have the accuse flag set.
7979
7980 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7981
7982         Changed the type of the result of the ! (NOT) operator to char;
7983         previously it returned the same type as the source. This allows
7984         us to eliminate all the genFloatNot functions (all of its target
7985         implementations were very buggy) since !float can use the same
7986         code as !long now.
7987
7988         * src/SDCCicode.c (ast2iCode): ! returns char
7989         * src/mcs51/gen.c (genNot, genNotFloat),
7990         * src/ds390/gen.c (genNot, genNotFloat),
7991         * src/z80/gen.c (genNot, genNotFloat),
7992         * src/pic/gen.c (genNot, genNotFloat),
7993         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7994
7995 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
7996
7997         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7998         1. Interrupt would not compile properly. Ensure PCLATH register is saved
7999            during interrupts. Ensure WSAVE is located at a shared bank address.
8000         2. Fixed page selection in some places
8001         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8002            the registers name strings.
8003         4. Fixed "signed / unsigned compare" compiler warnings.
8004         5. The PIC port manages its own allocation of the general purpose
8005            registers, but makes no attempt to reuse them. As a result when
8006            compiling it soon runs out of general purpose registers. Some
8007            additional code was added to the files pcode.c and device.c to walk
8008            through the function call tree and rename the registers so that they
8009            get reused.
8010
8011         * src/pic/device.c
8012         * src/pic/gen.c
8013         * src/pic/glue.c
8014         * src/pic/pcode.c
8015         * src/pic/pcode.h
8016         * src/pic/ralloc.c
8017         * src/pic/ralloc.h
8018         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8019         genPlus() & genMinus() when the result is the same as left or right
8020
8021 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8022
8023         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8024
8025 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8026
8027         Made bitfield a distinct type from bit so that bitfields
8028         convert as per ANSI C and bits retain their traditional
8029         boolean style behaviour. Implemented bitfield support in
8030         the z80 port.
8031
8032         * src/SDCCsymt.h,
8033         * src/SDCCsymt.c,
8034         * src/SDCCast.c,
8035         * src/cdbFile.c,
8036         * src/mcs51/gen.c,
8037         * src/ds390/gen.c: bit v bitfield split
8038         * src/z80/gen.c: New support for bitfields
8039         * support/regression/tests/bitfields.c: reenabled z80,
8040         added more tests
8041
8042 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8043
8044         Rules 246.x, 247.x relate to bitfields, the others speed up
8045         access to xdata mapped I/O devices.
8046
8047         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8048
8049 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8050
8051         Cleaned up genPackBits and genUnpackBits and added two helper
8052         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8053         for literal assignments in genPackBits (thanks to Frieder for
8054         reminding me).
8055
8056         * src/mcs51/gen.c
8057         * src/ds390/gen.c
8058
8059 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8060
8061         Fixed bug #748310 (pointer to function type mishandled when the
8062         function name is omitted). Also fixed a SIGSEGV when a function
8063         attribute (reentrant, etc) is used on a non-function or on a
8064         function but misplaced before the parameter list.
8065
8066         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8067         bug #748310
8068         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8069         * support/Util/SDCCerr.h,
8070         * support/Util/SDCCerr.c: Added func attr misuse error msg
8071
8072 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8073
8074         Fixed bug #787649 by anonymous
8075         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8076         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8077
8078 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8079
8080         Fixed numerous bitfield problems.
8081
8082         * src/SDCC.y: More bitfield related error checking
8083         * src/SDCCsymt.h,
8084         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8085         * support/Util/SDCCerr.h,
8086         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8087         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8088         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8089         * support/regression/tests/bitfields.c: tests added
8090
8091 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8092
8093         Made the constant following the "interrupt" keyword optional. If
8094         omitted, the function will not automatically be given an entry
8095         in the interrupt vector table (similar to #pragma NOIV, but
8096         less syntacticly kludgy). The interrupt number is also now
8097         range checked. Also fixed a bug in the high order bit example
8098         in the manual.
8099
8100         * src/SDCC.y
8101         * src/SDCCmem.c
8102         * src/SDCCglue.c
8103         * src/SDCCsymt.h
8104         * support/Util/SDCCerr.c
8105         * support/Util/SDCCerr.h
8106         * doc/sdccman.lyx
8107
8108 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8109
8110         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8111         * src/SDCCicode.c (operandOperation): rewritten some ops
8112         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8113         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8114         other type
8115         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8116         be re-activated by defining REDUCE_LITERALS)
8117         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8118         unsigned, but are signed by default
8119         * src/SDCCval.c (constVal): rearranged
8120         * src/SDCCval.c (valMod): preliminary fix
8121         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8122         * support/regression/literalop.c: added, work in progress
8123
8124 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8125
8126         Generate warnings for useless declarations like "char data;"
8127         that don't do what new users expect.
8128
8129         * src/SDCC.y
8130         * support/Util/SDCCerr.h
8131         * support/Util/SDCCerr.c
8132
8133 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8134
8135         * src/SDCCval.c (valMult): fix overflow detection of negative int
8136
8137 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8138
8139         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8140
8141         Changes to support big endian targets:
8142
8143         * src/ports.h
8144         * src/SDCCglue.c
8145         * src/avr/main.c
8146         * src/ds390/main.c
8147         * src/izt/i186.c
8148         * src/mcs51/main.c
8149         * src/pic/main.c
8150         * src/pic16/main.c
8151         * src/xa51/main.c
8152         * src/z80/main.c
8153
8154 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8155
8156         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8157         * device/lib/time.c: fixed warning "integer overflow in expression"
8158
8159 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8160
8161         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8162         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8163         constants are unsigned; added recognition of "u" flag for unsigned
8164         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8165         * src/SDCCval.c (valDiv, valMod): fixed signdness
8166         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8167         signedness of modulo, left and right shift
8168         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8169         * support/Util/SDCCerr.h: added warning W_INT_OVL
8170         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8171         * src/SDCCast.c (ast_print): improved output of constants
8172
8173 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8174
8175         Fixed some warnings when building with MSVC:
8176
8177         * as\mcs51\asdata.c
8178         * as\z80\asdata.c
8179         * as\mcs51\asm.h
8180         * as\z80\asm.h
8181         * link\z80\aslink.h
8182         * link\z80\lkdata.c
8183         * link\z80\lkeval.c
8184         * link\z80\lkgb.c
8185         * link\z80\lkihx.c
8186         * link\z80\lks19.c
8187         * link\z80\lksym.c
8188         * support\cpp2\cpplib.c
8189         * src\ds390\gen.c
8190         * src\mcs51\gen.c
8191
8192 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8193
8194         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8195
8196 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8197
8198         * support\librarian\clean.mk: Do not remove Makefile.
8199         * support\librarian\Makefile: added.
8200
8201 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8202
8203         Added librarian to MSVC build:
8204         * all.dsp
8205         * sdcc.dsw
8206         * support\librarian\librarian.dsp
8207
8208         'configure' not needed for librarian, removed:
8209         * support\librarian\configure
8210         * support\librarian\configure.in
8211         * support\librarian\config_in.h
8212         * support\librarian\Makefile.in
8213
8214         Hopefully these ones built the librarian and the rest of sdcc properly:
8215         * Makefile
8216         * Makefile.common.in
8217
8218         Messed up 'configure', so revert to previous version:
8219         * configure
8220         * configure.in
8221
8222 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8223
8224         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8225         there, while the mantissa of a double is "only" 53 bits wide.
8226
8227 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8228
8229         Adding sdcclib to the build.  MSVC project coming soon.
8230         Files added/changed:
8231
8232         * support\librarian\clean.mk
8233         * support\librarian\configure
8234         * support\librarian\configure.in
8235         * support\librarian\config_in.h
8236         * support\librarian\Makefile.bcc
8237         * support\librarian\Makefile.in
8238         * support\librarian\sdcclib.c
8239         * Makefile.bcc
8240         * Makefile
8241         * Makefile.common.in
8242         * configure
8243         * configure.in
8244
8245 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8246
8247         Linker now complaints if linked modules have conflicting options, for
8248         example, one compiled using --model-large and another one compiled with
8249         --model-small.  The following files were modified:
8250
8251         * as\mcs51\asdata.c
8252         * as\mcs51\aslink.h
8253         * as\mcs51\asm.h
8254         * as\mcs51\asmain.c
8255         * as\mcs51\asout.c
8256         * as\mcs51\i51pst.c
8257         * as\mcs51\lkdata.c
8258         * as\mcs51\lklibr.c
8259         * as\mcs51\lkmain.c
8260         * as\z80\asdata.c
8261         * as\z80\asm.h
8262         * as\z80\asmain.c
8263         * as\z80\asout.c
8264         * as\z80\z80pst.c
8265         * link\z80\aslink.h
8266         * link\z80\lkdata.c
8267         * link\z80\lklibr.c
8268         * link\z80\lkmain.c
8269         * src\SDCCglue.c
8270
8271 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8272
8273         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8274         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8275
8276 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8277
8278         * src/z80/mappings.i: fix _mul[us][int,long] entries
8279
8280 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8281
8282         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8283
8284 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8285
8286         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8287         * support/regression/tests/bitopcse.c: added
8288         fixed warning:
8289         * src/avr/gen.c:
8290         * src/pic/gen.c:
8291         * src/pic16/gen.c:
8292         * src/z80/gen.c:
8293         * src/xa51/gen.c:
8294
8295 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8296
8297         added support for new library format to z80, gbz80 linkers:
8298         *link/z80/aslink.h
8299         *link/z80/lklex.c
8300         *link/z80/lklib.c
8301         *link/z80/lklist.c
8302
8303 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8304
8305         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8306         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8307
8308 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8309
8310         added DUMMY_READ_VOLATILE:
8311         * src/SDCC.y:
8312         * src/avr/gen.c:
8313         * src/xa51/gen.c:
8314         * src/z80/gen.c:
8315         * src/pic/gen.c:
8316         * src/pic16/gen.c:
8317         * src/mcs51/gen.c:
8318         * src/ds390/gen.c:
8319         * src/SDCCcse.c (algebraicOpts): many improvements
8320         * src/SDCCcse.h: removed algebraicOpts()
8321         * src/SDCCicode.c (picDummyRead): added
8322
8323 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8324
8325         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8326         "Insufficient space in data memory".
8327
8328 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8329
8330         * src/mcs51/gen.c: fixed bug #771358
8331         * src/z80/gen.c: fixed bug #759087
8332
8333 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8334
8335         * src/pic16/glue.c: minor cleanup by Vangelis
8336
8337 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8338
8339         * device/include/regc515c.h: fixed #758477
8340         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8341         * device/lib/_gptrput.c: saved a few bytes
8342         * my tab spacing is 8, yours too?)
8343         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8344         * device/lib/serial.c: process RX bytes earlier than TX bytes
8345         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8346
8347 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8348
8349         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8350
8351 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8352
8353     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8354
8355 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8356
8357         * device/lib/Makefile.in: bad fix, reverted to 1.43
8358
8359 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8360
8361         * device/lib/Makefile.in: added missing z80 object files
8362
8363 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8364
8365         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8366         pic16 progress by Vangelis:
8367         * src/SDCCglobl.h:
8368         * src/SDCCmain.c:
8369         * src/pic/Makefile:
8370         * src/pic:
8371         * pic/Makefile:
8372         * pic16/device.c:
8373         * pic16/device.h:
8374         * pic16/gen.c:
8375         * pic16/gen.h:
8376         * pic16/genarith.c:
8377         * pic16/glue.c:
8378         * pic16/main.c:
8379         * pic16/pcode.c:
8380         * pic16/pcode.h:
8381         * pic16/pcodepeep.c:
8382         * pic16/peeph.def:
8383
8384 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8385
8386     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8387
8388 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8389
8390     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8391     added gbz80 build to MSVC project.
8392     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8393     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8394     from 8051 stuff and setup so it links using a .lnk file.
8395
8396 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8397
8398     * support/librarian/sdcclib.c: sdcc librarian.
8399     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8400     with sdcclib.
8401
8402 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8403
8404     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8405
8406 2003-07-02  Borut Razem <borut.razem AT siol.net>
8407
8408         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8409         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8410         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8411         src/xa51/main.c, src/z80/main.c:
8412         virtualization of glue() function: each port has it's own glue function,
8413         which is accessed by do_glue function pointer in PORT.general structure
8414
8415 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8416
8417         * DS800C400 fun, improved ROM interface and tinibios.
8418
8419 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8420
8421         * More support for DS80C400. Now includes beginning of interface to ROM.
8422
8423 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8424
8425         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8426
8427 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8428
8429         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8430
8431 2003-06-19  Borut Razem <borut.razem AT siol.net>
8432
8433         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8434
8435 2003-06-19  Borut Razem <borut.razem AT siol.net>
8436
8437         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8438         fixed Z80 port - crt0.o: cannot open.
8439
8440 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8441
8442         * support/Util/MySystem.c (merge_command): revert bad fix
8443
8444 2003-06-18  Borut Razem <borut.razem AT siol.net>
8445
8446         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8447
8448 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8449
8450         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8451         option --use-stdout sends errors to stdout instead of stderr.
8452
8453 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8454
8455         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8456
8457 2003-06-15  Borut Razem <borut.razem AT siol.net>
8458
8459         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8460         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8461         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8462         fixed width array of pointers replaced with sets;
8463         multiple include and lib paths ared transferred to preprocessor and linker
8464         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8465         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8466         fixed width array of pointers
8467         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8468         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8469         fixupPath(), getPathDifference()
8470         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8471         fixed width array of pointers
8472
8473 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8474
8475         * src/pic16/ralloc.c: fix warnings
8476         * src/pic16/pcode.c: fix warning
8477
8478 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8479
8480          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8481         know all the details, but essentially this set of changes enable
8482         the pic16 port to generate movff instructions and generate assembler
8483         directives,
8484         * src/SDCCmain.c:
8485         * src/pic16/gen.c:
8486         * src/pic16/glue.c:
8487         * src/pic16/pcode.c:
8488         * src/pic16/device.c:
8489         * src/pic16/main.c:
8490         * src/pic16/pcode.h:
8491         * src/pic16/pcoderegs.c:
8492         * src/pic16/ralloc.c:
8493         * src/pic16/ralloc.h:
8494
8495 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8496
8497         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8498         added option --vc, so sdcc errors and warnings are compatible with
8499         Microsoft Visual Studio.
8500
8501 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8502
8503         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8504           device/lib/libfloat.lib: added atof function.
8505
8506 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8507
8508         * doc/sdccman.lyx: updated to Lyx 1.3
8509         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8510         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8511         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8512
8513 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8514
8515         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8516
8517 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8518
8519         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8520           additions to the "related tools/documentation" section
8521
8522 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8523
8524         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8525
8526 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8527
8528         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8529         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8530
8531 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8532
8533         * doc/sdccman.lyx: fix double dash and other minor things
8534         * doc/Makefile: fix double dash
8535
8536 2003-05-28  Karl Bongers(patches from Martin Helmling)
8537         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8538           condition and ignore commands.
8539
8540 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8541
8542         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8543           is in parts still quite out of date, I did changes as far as I felt makes sense
8544           for a non-native english speaker.
8545           Please feel free to add to the manual or to correct my changes.
8546         * doc/Makefile: undid touching the date of intermediate tex files.
8547
8548 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8549
8550         * doc/sdccman.lyx: Manual has an index now
8551
8552 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8553
8554         Finalize muluint/mulsint and mululong/mulslong merging:
8555         * device/lib/_mulint.c
8556         * device/lib/_mullong.c
8557         * device/lib/gbz80/mul.s
8558         * device/lib/gbz80/stubs.s
8559         * device/lib/z80/mul.s
8560         * device/lib/z80/stubs.s
8561         * src/SDCCsymt.c (initCSupport)
8562
8563 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8564
8565         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8566         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8567           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8568           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8569           instead of /Zm500.
8570
8571 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8572
8573         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8574           the regression tests I'm not brave enough to enable 245.b, 245.c
8575         * doc/sdccman.lyx: added latex preamble for hyperref package.
8576           Using pdflatex this will give you a hyperlinked pdf file with
8577           bookmarks. (prepend '%' before /usepackage if this breaks something)
8578
8579 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8580
8581          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8582
8583 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8584
8585         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8586
8587 2003-05-21    <johan AT balder>
8588
8589         * src/SDCCglue.c (printIval): fixed bug #739934
8590
8591 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8592
8593         Applied patch from bug 737905 (renamed yylineo to mylineno):
8594         * src/altlex.c
8595         * src/SDCCast.c
8596         * src/SDCglobl.h
8597         * src/SDCC.lex
8598         * src/SDCCsymt.c
8599         * src/SDCCval.c
8600         * src/pic16/pcode.c: Cleaned warnings
8601         * src/pic16/pcodeflow.c: Cleaned warnings
8602         * src/pic16/pcoderegs.c: Cleaned warnings
8603
8604 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8605
8606         * src/pic16/pcode.c: Cleaned warnings
8607         * src/pic16/pcodepeep.c: Cleaned warnings
8608         * src/pic16/ralloc.c: Cleaned warnings
8609
8610 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8611
8612         * doc/sdccman.lyx: fixed bug 739745
8613         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8614
8615 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8616
8617         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8618         it can be defined with CFLAGS when running configure
8619         * src/SDCCmain.c: fixed compiling + linking with object files
8620
8621 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8622
8623         * configure.in: configure for pic16 port,
8624             added --disable-pic16-port
8625         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8626         * src/SDCCmain.c: linkOptions is changed to set *,
8627             added if/endif conditional macros to remove options help
8628             messages from optionsTable when a port is not configured, added
8629             support for the PIc16 port in the ports table, when executing
8630             the compiler with no port specified on command line, a default
8631             port is selected with the new macro DEFAULT_PORT which is
8632             defined in port.h, in setDefaultOptions() linkOptions is removed
8633             from initialization assignment, since now it is a set,
8634             parseCmdLine uses setParseWithComma for linkOptions, in
8635             linkEdit() linkOptions are accessed with new function indexSet()
8636             which returns the i'th item of a set variable. See SDCCset.c, in
8637             linkEdit() when calling buildCmdLine(), added linkOptions as
8638             last argument. Now users can pass arguments to gplink via the
8639             -Wl option, main() uses pic16glue() to glue up pic16 programs
8640         * src/SDCCpeeph.c: various changes to support pic16
8641         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8642             return the i'th item of the set
8643         * src/SDCCset.h: added function prototype for indexSet()
8644         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8645         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8646         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8647             added macro DEFAULT_PORT
8648         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8649         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8650             generated
8651         * src/pic16/glue.c: commented out some error producing lines
8652         * src/pic16/main.c: __config directives are commented out to stop
8653             gpasm complaining and test the linkage with gplink, _linkCmd and
8654             _asmCmd changed to be more gplink and gpasm friendly
8655         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8656             produced an error when parsed, peep rule 12 is added to utilize
8657             movff, but it is commented out since the pCode does not support
8658             yet a command with 2 address arguments
8659
8660 2003-05-18    <johan AT balder>
8661
8662         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8663         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8664 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8665
8666         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8667   Added feature to script commands from file.
8668
8669 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8670
8671         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8672         * src/SDCCutil.c: include ctype.h for win32
8673
8674 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8675
8676         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8677
8678 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8679
8680         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8681   Fixed so you can set breakpoints prior to run, run does not stop
8682   on entry now.  Add tbreak.  Other enhancements and fixes for use
8683   with ddd.
8684
8685 2003-05-12  Borut Razem <borut.razem AT siol.net>
8686
8687         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8688
8689 2003-05-11  Borut Razem <borut.razem AT siol.net>
8690
8691         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8692         the path of bin directory, so that PATH is the only env. variable, which has to be set
8693         in case of standard installation.
8694         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8695         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8696         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8697
8698 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8699
8700         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8701         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8702         temp files are in the port dir; clean the gen/test directory when
8703         generating new test.c
8704         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8705         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8706         * support/regression/tests/zeropad.c: added
8707
8708 2003-05-09    <johan AT balder>
8709
8710         * src/SDCCglue.c: fixed bug #597940
8711
8712 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8713
8714         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8715   cache sfr, optimize next,step, fix off by one sourceline,
8716   support ddd list function.
8717         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8718
8719 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8720
8721         * support/regression/HTMLgen.py: added compare_s2f()
8722         * support/regression/Makefile: redo 1.27
8723         * support/regression/generate-cases.py: redo 1.5
8724
8725 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8726
8727         * support/regression/tests/float.c: workaround 33 bit hex constant
8728         * support/regression/tests/simplefloat.c: fix division for host
8729
8730 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8731
8732         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8733         that tame's the PIC's over-aggressive optimizer.
8734
8735 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8736
8737          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8738          support for MSVC.
8739
8740 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8741
8742         Initial support for DS80C400. "Hello world" runs on TINIm400
8743         (with polled I/O).
8744
8745 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8746
8747          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8748          * Some notes on ddd usage added in debugger/README
8749          Martin Helmling adding more features and fixes for ddd GUI debugger.
8750          Code added for nexti, stepi, up, down, and other adjustments.
8751
8752 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8753
8754         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8755         * src/pic/peeph.def Added two rules to optimize carry manipulation
8756         * src/pic/* removed debug printfs
8757
8758 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8759
8760         * debugger/mcs51/cmd.c: added header newalloc.h
8761
8762 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8763
8764         * as/Makefile: new EXEEXT
8765         * as/z80/Makefile: remove trailing slash of BUILDIR
8766         * as/z80/clean.mk: new EXEEXT
8767         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8768         * support/cpp2/Makefile.in: new EXEEXT
8769         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8770
8771 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8772
8773         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8774         EXEEXT was introduced to fix all related problems with targets
8775         "clean", "install" and "uninstall"; a couple of further flaws
8776         especially with "clean" have been fixed too
8777         * as/mcs51/Makefile.in
8778         * as/mcs51/clean.mk
8779         * as/z80/Makefile
8780         * Makefile
8781         * clean.mk
8782         * debugger/mcs51/Makefile.in
8783         * debugger/mcs51/clean.mk
8784         * link/z80/Makefile
8785         * link/z80/Makefile.in
8786         * link/z80/clean.mk
8787         * link/Makefile
8788         * packihx/Makefile.in
8789         * packihx/clean.mk
8790         * sim/ucsim/Makefile
8791         * sim/ucsim/clean.mk
8792         * sim/ucsim/avr.src/Makefile.in
8793         * sim/ucsim/avr.src/clean.mk
8794         * sim/ucsim/s51.src/Makefile.in
8795         * sim/ucsim/s51.src/clean.mk
8796         * sim/ucsim/xa.src/Makefile.in
8797         * sim/ucsim/xa.src/clean.mk
8798         * sim/ucsim/z80.src/Makefile.in
8799         * sim/ucsim/z80.src/clean.mk
8800         * sim/ucsim/main_in.mk
8801         * sim/ucsim/packages_in.mk
8802         * sim/ucsim/gui.src/Makefile.in
8803         * sim/ucsim/gui.src/serio.src/Makefile.in
8804         * sim/ucsim/gui.src/serio.src/clean.mk
8805         * src/Makefile.in
8806         * src/clean.mk
8807         * support/cpp2/Makefile.in
8808         * support/cpp2/clean.mk
8809         * support/makebin/Makefile
8810         * support/makebin/clean.mk
8811         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8812         * doc/sdccman.lyx: --program-suffix no longer needed
8813
8814 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8815
8816          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8817          Martin Helmling added support for ddd GUI debugger.
8818          Code added to display assembly, set variables, and other commands
8819          to interface to ddd.
8820
8821 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8822
8823         * as/Makefile: fix target clean
8824         * as/clean.mk: fix target clean
8825         * as/z80/clean.mk: fix target clean
8826
8827 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8828
8829         * Makefile.common.in: added  AT EXEEXT AT
8830         * configure.in: removed all mingw32 stuff
8831         * configure: rebuilt from configure.in
8832         * doc/sdccman.lyx: updated section "installation"
8833         * support/scripts/sdcc_mingw32: adapted to configure
8834         * support/scripts/sdcc_cygwin_mingw32: added
8835
8836 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8837
8838         * src/pic Added object file support for the PIC port
8839         * src/pic Applied patch from Craig Franklin (this started the object file support)
8840         * src/regression Updated the PIC regression tests for object files
8841
8842 2003-04-20  Borut Razem <borut.razem AT siol.net>
8843
8844         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8845           lklex.c: In function `getfid':
8846           lklex.c:203: warning: array subscript has type `char'
8847         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8848           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8849         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8850           stack handling macros
8851
8852 2003-04-19  Borut Razem <borut.razem AT siol.net>
8853
8854         * "handling space characters in file path" task:
8855         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8856         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8857         * support/Util/MySystem.h: make it self-sufficient
8858         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8859           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8860           handling space characters in file path
8861         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8862           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8863         * support/Util/MySystem.c: handling space characters in executable's path
8864
8865 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8866
8867         * as/z80/Makefile: fix permanent rebuild of z80
8868         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8869         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8870
8871 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8872
8873         * src/SDCCopt.c: add special case optimization to replace modulo by
8874           a power of two with a bitwise AND.
8875
8876 2003-04-18    <johan AT balder>
8877
8878         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8879
8880 2003-04-17    <johan AT balder>
8881
8882         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8883         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8884
8885 2003-04-13  Borut Razem <borut.razem AT siol.net>
8886
8887         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8888         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8889           fixed mingw problem in adl_NORMALIZE_PATH
8890
8891 2003-04-12  Borut Razem <borut.razem AT siol.net>
8892
8893         * fixed "#pragma SAVE/RESTORE can not be nested":
8894         * src/SDCC.lex: reworked pragma handling functions
8895         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8896         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8897
8898 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8899
8900         * src/SDCCutil.c (pathEquivalent): defined but not used
8901         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8902         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8903         * configure: rebuilt from configure.in
8904         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8905         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8906         * device/include/Makefile.in: replace sdcc_datadir
8907         * device/lib/Makefile.in: replace sdcc_datadir
8908         * Makefile.common.in: add LDFLAGS from configure
8909         * packihx/Makefile.in: use LDFLAGS
8910         * src/Makefile.in: use LDFLAGS
8911         * support/cpp2/Makefile.in: add LDFLAGS from configure
8912         * support/makebin/Makefile: use LDFLAGS
8913         * .version: bumped version number to 2.3.5
8914
8915 2003-04-12  Borut Razem <borut.razem AT siol.net>
8916
8917         * completed "different paths" task:
8918         * src/SDCCmacro.c: fixed bug in handling quotes
8919         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8920         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8921
8922 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8923
8924         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8925
8926 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8927
8928         * ds390/gen.c ds390/peeph.def: fix bug 706781
8929
8930 2003-04-11  Borut Razem <borut.razem AT siol.net>
8931
8932         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8933
8934 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8935
8936         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8937         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8938          set - this bit used to not be set...).
8939         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8940           bad code in PIC Port
8941         * src/regression/and2.c added to test bug 609268
8942         * src/regression/Makefile added and2.c to regression test
8943
8944
8945 2003-04-08    <johan AT CP255758-A>
8946
8947         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8948         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8949         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8950
8951 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8952
8953         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8954         fix bug #487815
8955         * support/cpp2/Makefile.in: fix bug #487815
8956         * configure: rebuilt from configure.in
8957         * Makefile.common.in: docdir changed, new path suffixes
8958         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8959         * sdcc_vc_in.h: reflect changes from sdccconf.h
8960         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8961         * src/SDCCutil.h: remove BINDIR hack
8962         * doc/sdccman.lyx: update new path hierarchy
8963
8964 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8965
8966         * src/SDCCpeeph.c: added okToRemoveSLOC test
8967
8968 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8969
8970         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8971
8972 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8973
8974         * src/SDCCpeeph.c: added labelIsReturnOnly test
8975         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8976
8977 2003-04-05    <johan AT balder>
8978
8979         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8980         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8981         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8982         * src/SDCCast.c: fixed a warning
8983         * src/SDCCast.h: fixed a warning
8984         * src/SDCCicode.c (operandFromAst): fixed a warning
8985
8986 2003-04-04    <johan AT balder>
8987
8988         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8989         * src/SDCCast.c (decorateType): fixed bug #715076
8990         * src/SDCC.y: fixed bug #702907
8991
8992 2003-04-03    <johan AT balder>
8993
8994         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
8995         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
8996         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
8997         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
8998         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
8999
9000 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9001
9002         * _decdptr.c: fix return values
9003         * _gptrget.c: fix return values
9004         * _gptrgetc.c: fix return values
9005         * _gptrput.c: fix return values
9006         * _mulint.c: fix return values
9007         * as/z80/Makefile: fix 'make -j' problem
9008
9009 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9010
9011         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9012         * configure.in: big cleanup, updated to autoconf 2.5x
9013         * configure: rebuilt from configure.in
9014         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9015         * sdcc_vc_in.h: reflect changes from sdccconf.h
9016         * doc/Makefile: fixed a flaw in "make install"
9017
9018 2003-04-02    <johan AT balder>
9019
9020         * src/ds390/gen.c (genCmp): no comments
9021         * src/mcs51/gen.c (genCmp): no comments
9022         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9023         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9024
9025 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9026
9027         * support/regression/generate-cases.py: place generated file in given sub directory
9028         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9029         * support/regression/Makefile: improvements for 'make -j';
9030         side effect: it's simpler and faster now
9031
9032 2003-03-31  Borut Razem <borut.razem AT siol.net>
9033
9034         * src/z80/main.c: link-{port} and as-{port} defined without path
9035         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9036
9037 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9038
9039         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9040
9041 2003-03-30  Borut Razem <borut.razem AT siol.net>
9042
9043         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9044           changed type of list parameter to set
9045         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9046         * src/port.h: changed type of do_assemble() parameter to set
9047         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9048           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9049           definition of "cppoutfilename" macro with NULL value in preProcess()
9050         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9051         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9052         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9053           replaced with set *binPathSet
9054         * shash_add() deallocates the item, if allready exsists, before adding the new one
9055         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9056
9057 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9058
9059         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9060           a nested for loop bug in the PIC port
9061         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9062           for loops
9063
9064 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9065
9066         * support/Util/dbuf.h: remove C++ stuff to make it portable
9067
9068 2003-03-28  Borut Razem <borut.razem AT siol.net>
9069
9070         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9071           literal strings in stringLiteral()
9072         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9073         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9074           to the project
9075
9076 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9077
9078         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9079
9080 2003-03-26    <johan AT balder>
9081
9082         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9083         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9084         * src/SDCCast.c (decorateType): fixed " -v < 3"
9085
9086 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9087
9088         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9089         Added Lenny Story's debug infrastructure changes:
9090         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9091         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9092         * src/cdbFile.c: added
9093         * src/SDCCdebug.c: added
9094         * src/SDCCdebug.h: added
9095         * src/SDCCast.c (createFunction)
9096         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9097         * src/SDCCmain.c (parseCmdLine, main)
9098         * src/SDCCmem.c (redoStackOffsets)
9099         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9100         * src/SDCCsymt.h
9101         * src/common.h
9102         * src/avr/gen.c (genAVRCode)
9103         * src/ds390/gen.c (gen390Code)
9104         * src/mcs51/gen.c (gen51Code)
9105         * src/pic/gen.c (genpic14Code)
9106         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9107         * src/xa51/gen.c (genXA51Code)
9108         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9109
9110 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9111
9112         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9113         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9114
9115 2003-03-22    <johan AT balder>
9116
9117         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9118
9119 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9120
9121         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9122         * doc/cdbfileformat.lyx: added, written by Lenny Story
9123         * doc/Makefile: added cdbfileformat.lyx
9124         * doc/clean.mk: added cdbfileformat.lyx
9125
9126 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9127
9128         * src/mcs51/peeph.def: fix bug #705773
9129
9130 2003-03-20    <johan AT balder>
9131
9132         An sfr/sbit can have an "at #" AND an initializer
9133         * src/SDCCsymt.c (checkSClass):
9134         * src/SDCCmem.c (allocGlobal):
9135         * src/SDCCmem.c (allocLocal):
9136         * src/SDCCast.c (createBlock):
9137
9138 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9139
9140         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9141
9142 2003-03-16    <johan AT balder>
9143
9144         Undid the hackup of const and volatile, the problem is much bigger
9145         * src/SDCC.y:1.65
9146         * src/SDCCast.c:1.171
9147         * src/SDCCglue.c:1.138
9148         * src/SDCCicode.c:1.146
9149         * src/SDCCsymt.c:1.150
9150         * src/SDCCval.c:1.65
9151
9152 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9153
9154         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9155         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9156
9157 2003-03-13    <johan AT balder>
9158
9159         Hackup const and volatile modifiers in type chains a bit:
9160         * src/SDCC.y:1.63
9161         * src/SDCCast.c:1.169
9162         * src/SDCCglue.c:1.136
9163         * src/SDCCicode.c:1.143
9164         * src/SDCCsymt.c1.146
9165         * src/SDCCsymt.h1.59
9166         * src/SDCCval.c:1.63
9167
9168 2003-03-12    <johan AT balder>
9169
9170         * src/SDCCBBlock.h: more LRH debugging junk
9171         * src/SDCCcflow.h: more LRH debugging junk
9172         * src/SDCCloop.c: more LRH debugging junk
9173         * src/SDCC.y (struct_declaration): fixed bug #697590
9174         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9175         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9176         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9177
9178 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9179         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9180         test function names must now match exactly).
9181         * src/SDCCcse.c: added special case in findCheaperOp to allow
9182         extending a short integer. Makes less awful code for bug 700121 test case.
9183
9184 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9185
9186         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9187         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9188
9189 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9190
9191         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9192         actually called (operandsNotEqual() was called for all
9193         operandsNotEqualX tests).
9194
9195 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9196
9197         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9198         with shorter literals. Fixes bug 700121.
9199
9200 2003-03-11    <johan AT balder>
9201
9202         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9203
9204 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9205
9206         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9207         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9208
9209 2003-03-10  Borut Razem <borut.razem AT siol.net>
9210
9211         * src/SDCCmain.c: pipe preprocessor's output
9212         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9213         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9214         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9215         which closes all pipes in pipeSet set
9216         * src/SDCCset.c: free deleted item in function deleteSetItem()
9217         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9218         moved from z80 to src subproject
9219         * .version: increased version number to 2.3.4
9220
9221 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9222
9223         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9224         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9225         * support/regression/ports/xa51/spec.mk: fix typo
9226
9227 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9228
9229         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9230
9231 2003-03-09  Borut Razem <borut.razem AT siol.net>
9232
9233         * src/SDCCmain.c: pipe preprocessor's output
9234         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9235         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9236         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9237         which closes all pipes in pipeSet set
9238         * src/SDCCset.c: free deleted item in function deleteSetItem()
9239         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9240         moved from z80 to src subproject
9241
9242 2003-03-09  Borut Razem <borut.razem AT siol.net>
9243
9244         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9245         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9246         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9247         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9248         * src/SDCCglobl.h: unification of WIN32 native definitions
9249
9250 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9251
9252         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9253
9254 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9255
9256         * src/configure.in:   check for endianess (even while cross-compiling)
9257         * src/configure:      check for endianess (even while cross-compiling)
9258         * src/configure_in.h: check for endianess (even while cross-compiling)
9259         * src/avr/gen.c:        remove old endianess stuff
9260         * src/mcs51/gen.c:      remove old endianess stuff
9261         * src/ds390/gen.c:      remove old endianess stuff
9262         * src/pic/gen.c:        remove old endianess stuff
9263         * src/pic/genarith.c:   remove old endianess stuff
9264         * src/pic/glue.c:       fix endianess check
9265         * src/pic16/gen.c:      remove old endianess stuff
9266         * src/pic16/genarith.c: remove old endianess stuff
9267         * src/pic16/glue.c:     fix endianess check
9268         * src/xa51/gen.c:       remove old endianess stuff
9269         * src/z80/gen.c:        fix endianess check
9270         * src/SDCCglue.c:       fix endianess check
9271         * src/ds390/peeph.def: fix bug 700036
9272
9273 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9274
9275         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9276         * src/configure: find appropriate data-types on host for SDCC's int and long
9277         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9278         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9279         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9280
9281 2003-03-07    <johan AT balder>
9282
9283         Just a big NOOP:
9284                 some minor cleanups before the big shot
9285                 OP_DEFS and OP_USES now use Kevin's protection
9286                 new option --nolabelopt
9287
9288         * src/SDCCBBlock.c:
9289         * src/SDCCast.c,:
9290         * src/SDCCcflow.c:
9291         * src/SDCCcse.c:
9292         * src/SDCCicode.c:
9293         * src/SDCCicode.h:
9294         * src/SDCClabel.c:
9295         * src/SDCCloop.c:
9296         * src/SDCCmain.c:
9297         * src/ds390/ralloc.c:
9298         * src/mcs51/ralloc.c:
9299         * src/pic/ralloc.c:
9300         * src/xa51/ralloc.c:
9301         * src/z80/ralloc.c:
9302
9303 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9304
9305         * src/pic/pcode.c (get_op): fix 64 bit warnings
9306         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9307         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9308         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9309         * support/regression/tests/malloc.c: fix 64 bit warnings
9310
9311 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9312
9313         * src/mcs51/gen.c (genMinus): fixed bug 696436
9314
9315 2003-03-02  Borut Razem <borut.razem AT siol.net>
9316
9317         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9318
9319 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9320
9321         * configure.in: test for mkstemp
9322         * sdccconf_in.h: add HAVE_MKSTEMP
9323
9324 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9325
9326         * device/include/ctype.h: removed warning while using --stack-auto
9327         * device/include/malloc.h: removed warning while using --stack-auto
9328         * device/include/string.h: removed warning while using --stack-auto
9329
9330 2003-02-23  Borut Razem <borut.razem AT siol.net>
9331
9332         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9333         because NDEBUG is defined (see man assert)
9334         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9335
9336 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9337
9338         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9339         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9340
9341 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9342
9343         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9344         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9345
9346 2003-02-18    <johan AT balder>
9347
9348         * as/mcs51/asmain.c (asmbl): module can start with a digit
9349         * as/z80/asmain.c (asmbl): module can start with a digit
9350
9351 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9352
9353         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9354         * src/asm.c: fix pipe() for Mingw32
9355
9356 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9357
9358         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9359         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9360         make -V work again; --c1mode reads now from stdin
9361         * doc/sdccman.lyx: added --c1mode
9362         * support/Util/SDCCerr.c: new messages for c1 mode
9363         * support/Util/SDCCerr.h: new messages for c1 mode
9364         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9365
9366 2003-02-15    <johan AT balder>
9367
9368         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9369
9370 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9371
9372         * doc/sdccman.lyx: Environment variables, -o and other minor things
9373
9374 2003-02-14    <johan AT balder>
9375
9376         * src/xa51/main.c: before anyone really tries to use it :)
9377
9378         * Install doc's in share/sdcc/doc
9379         * removed some obsolete files
9380         * Do a proper make distclean and uninstall
9381         M Makefile.common.in
9382         R sdccbuild.sh
9383         M as/Makefile
9384         M device/include/Makefile.in
9385         M device/lib/Makefile.in
9386         M doc/sdccman.lyx
9387         M link/Makefile
9388         M sim/ucsim/doc/Makefile.in
9389         M src/clean.mk
9390         R src/avr/peeph.rul
9391         R src/xa51/peeph.rul
9392         M support/cpp2/Makefile.in
9393         M support/makebin/Makefile
9394
9395
9396 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9397
9398         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9399
9400 2003-02-10  Borut Razem <borut.razem AT siol.net>
9401
9402         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9403         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9404         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9405         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9406         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9407         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9408         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9409         src/z80/Makefile.bcc: Borland Makefile cleanup
9410         * as/z80/Makefile.bcc: Added Borland Makefile
9411         * support/cpp2/borland.h: Removed
9412
9413 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9414
9415         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9416         * src/SDCC.lex: new pragma NOIV
9417         * src/SDCCglobl.h: new pragma NOIV
9418         * src/SDCCmem.c: new pragma NOIV
9419
9420 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9421
9422         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9423
9424 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9425
9426         * src/SDCCmain.c: signal handling is switched off by --debug
9427         * doc/Makefile: small fix for install; use clean.mk again
9428         * doc/clean.mk: clean *.pdf and *.html too
9429
9430 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9431
9432         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9433         * device/lib/printfl.c: fix a ds390 bug by making it portable
9434         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9435         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9436         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9437         * debugger/mcs51/cmd.c: converted multi-line string literals
9438         * sim/ucsim/globals.cc: converted multi-line string literals
9439         * src/SDCCmain.c: introduced signal handler to remove temp files
9440         * doc/Makefile: small tweaks, implement clean
9441         * doc: removed generated files
9442
9443 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9444
9445         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9446         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9447         Address Record is not correctly generated for DS390."
9448
9449 2003-02-02  Borut Razem <borut.razem AT siol.net>
9450
9451         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9452         * as/mcs51/asm.h: fixed compilation with Borland C
9453         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9454         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9455         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9456         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9457         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9458         src/z80/Makefile.bcc: delete $(LIB) only if exist
9459         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9460
9461 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9462
9463         * device/include/malloc.h: introduced NULL
9464         * device/include/string.h: introduced NULL
9465         * device/include/stdlib.h: introduced NULL
9466         * device/lib/_memcpy.c: removed NULL
9467         * device/lib/_strcat.c: removed NULL
9468         * device/lib/_strchr.c: removed NULL
9469         * device/lib/_strcmp.c: removed NULL
9470         * device/lib/_strcpy.c: removed NULL
9471         * device/lib/_strcspn.c: removed NULL
9472         * device/lib/_strlen.c: removed NULL
9473         * device/lib/_strncat.c: removed NULL
9474         * device/lib/_strncmp.c: removed NULL
9475         * device/lib/_strncpy.c: removed NULL
9476         * device/lib/_strpbrk.c: removed NULL
9477         * device/lib/_strrchr.c: removed NULL
9478         * device/lib/_strspn.c: removed NULL
9479         * device/lib/_strstr.c: removed NULL
9480         * device/lib/_strtok.c: removed NULL
9481         * device/lib/malloc.c: removed NULL, include own header
9482
9483 2003-02-02    <johan AT balder>
9484
9485         * 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
9486         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9487         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9488         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9489         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9490         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9491
9492 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9493
9494         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9495         area 'DATA'"
9496
9497 2003-02-01    <johan AT balder>
9498
9499         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9500
9501 2003-01-31    <johan AT CP255758-A>
9502
9503         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9504
9505 2003-01-30    <johan AT balder>
9506
9507         * src/SDCCBBlock.c: automatic bug detection
9508         * src/SDCCicode.c: automatic bug detection
9509
9510 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9511
9512         * src/SDCCglobl.h:   now --xram-size 0 works
9513         * src/SDCCmain.c:    now --xram-size 0 works
9514
9515 2003-01-29    <johan AT balder>
9516
9517         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9518
9519 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9520
9521         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9522         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9523         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9524         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9525         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9526         * src/SDCCmain.c:    Added options --xram-size and --code-size
9527
9528 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9529
9530         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9531         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9532
9533 2003-01-27    <johan AT balder>
9534
9535         * src/SDCC.y: fixed bug #613764
9536
9537 2003-01-26    <johan AT balder>
9538
9539         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9540         * src/SDCCsymt.h: fixed bug #673374
9541         * src/SDCCglue.c: fixed bug #661910
9542         * src/SDCCast.c: fixed bug #458099 and 673374
9543
9544 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9545
9546         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9547         * as/mcs51/strcmpi.h: added
9548         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9549         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9550         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9551         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9552         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9553         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9554         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9555         * as/mcs51/Makefile.aslink: new module strcmpi
9556         * as/mcs51/Makefile.asx8051: new module strcmpi
9557         * as/mcs51/Makefil.bcc: new module strcmpi
9558         * as/mcs51/Makefile.in: new module strcmpi
9559         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9560
9561 2003-01-26    <johan AT balder>
9562
9563         * src/SDCCglue.c: reverted back to 1.124
9564         * src/SDCCast.c: reverted back to 1.156
9565         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9566
9567 2003-01-25    <johan AT balder>
9568
9569         * src/SDCCglue.c: A better fix for bug #661910
9570         * src/SDCCast.c: A better fix for bug #661910
9571         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9572
9573 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9574
9575         * src/Makefile.in: remove spawn.o
9576         * src/SDCCmain.c: remove spawn.h
9577         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9578         * src/spawn.c: removed
9579         * src/spawn.h: removed
9580         * support/regression/ports/ds390/spec.mk: link with -r
9581
9582 2003-01-24    <johan AT CP255758-A>
9583
9584         * src/ds390/gen.c (aopOp): fixed bug #667458
9585         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9586         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9587         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9588
9589 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9590
9591         * src/mcs51/peeph.def: better assembler identation by Frieder
9592         * src/mcs51/gen.c: better assembler identation by Frieder
9593
9594 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9595
9596         * as/z80/string.h: removed for gcc 3.2
9597         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9598         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9599
9600 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9601
9602         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9603         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9604         * support/regression/Makefile: separate temp files for ports
9605         * support/regression/generate-cases.py: separate temp files for ports
9606         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9607         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9608
9609 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9610
9611         * moved tinitalk to device/examples/ds390
9612
9613 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9614
9615         * as/mcs51/lkmem.c: rflag is for DS390
9616         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9617         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9618                          (linkEdit): move mem- and map-files the same way as ihx-files
9619         * src/z80/main.c (_setDefaultOptions): removed --generic
9620         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9621         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9622         * src/pic/glue.c (picglue): --c1mode works again
9623         * src/pic16/glue.c (pic16glue): --c1mode works again
9624         * src/asm.c (printCLine): fix #660034
9625
9626 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9627
9628         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9629         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9630         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9631         * as/mcs51/lkmem (summary): better fix for sp problem
9632         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9633         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9634         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9635                                               remove --stack-after-data
9636
9637 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9638
9639         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9640         * src/SDCCutil.c (join): ugly bug: missing '\0'
9641         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9642
9643 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9644
9645         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9646         * src/port.h: typo
9647         * src/pic/main.c (_asmCmd): gpasm supports -o
9648         * src/z80/main.c: more general macros
9649         * device/lib/Makefile.in: remove intermediate files
9650
9651 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9652
9653         * .version: Bumped version number to 2.3.3
9654         * src/SDCCBBlock.c: new option -o
9655         * src/SDCCglobl.h: new option -o
9656         * src/SDCCglue.c: new option -o
9657         * src/SDCCmain.c: new option -o
9658         * src/asm.c: new option -o
9659         * src/ds390/main.c: new option -o
9660         * src/pic/glue.c: new option -o
9661         * src/pic/pcode.c: new option -o
9662         * src/pic/ralloc.c: new option -o
9663         * src/pic16/glue.c: new option -o
9664         * src/pic16/pcode.c: new option -o
9665         * src/pic16/ralloc.c: new option -o
9666         * src/z80/main.c: new option -o
9667         * device/lib/Makefile.in: use -o
9668         * support/regression/ports/ds390/spec.mk: use -o
9669         * support/regression/ports/gbz80/spec.mk: use -o
9670         * support/regression/ports/mcs51/spec.mk: use -o
9671         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9672         * support/regression/ports/z80/spec.mk: use -o
9673         * support/regression/ports/ucz80/spec.mk: use -o
9674         * support/regression/ports/xa51/spec.mk: use -o
9675         * support/regression/fwk/lib/timeout.c: fix usage string
9676
9677 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9678         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9679
9680 2003-01-07    <johan AT balder>
9681
9682         * src/SDCCast.c (decorateType): fixed bug #600035
9683
9684 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9685         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9686         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9687         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9688         * src/pic/pcode.c: outcommented unused variable to remove warnings
9689         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9690
9691 2003-01-06    <karl AT turbobit.com>
9692         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9693    regression tests.
9694
9695 2003-01-06    <johan AT balder>
9696
9697         * src/SDCCicode.c: fixed array add
9698
9699 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9700         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9701         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9702
9703 2003-01-04    <johan AT balder>
9704
9705         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9706
9707 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9708         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9709
9710 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9711         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9712         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9713
9714 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9715         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9716
9717 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9718         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9719
9720 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9721         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9722
9723 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9724
9725     * in \sdcc\as\mcs51\ changed these files in order to create an
9726     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9727     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9728     following files to include the previous two files: aslink.dsp,
9729     Makefile.aslink, Makefile.bcc, and Makefile.in.
9730
9731     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9732     .adb instead of .cdb
9733
9734 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9735
9736         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9737         value from option --iram-size.
9738
9739 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9740
9741         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9742         dram[] array.
9743
9744 2002-09-18    <wiml AT hhhh.org>
9745
9746         * SDCClrange.h: exposed setFromRange() and setToRange()
9747         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9748           packRegsForAccUse() (bug 542397)
9749         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9750           multiple times and emitting the fetch operations more than once
9751           added aopGetUsesAcc() function to allow binary operators to
9752           fetch their operands in the correct order; made genMinus() emit
9753           compact code for X = LITERAL - Y
9754
9755 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9756         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9757         sprintf() in line 1267.
9758
9759 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9760         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9761         like ports.
9762
9763 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9764         Changes to aslink (All the changes are marked with 'JCF'):
9765
9766         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9767         summary().
9768
9769         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9770         area BSEG.  Also moves, if possible, the DATA area down into the internal
9771         ram so more space is available.
9772
9773         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9774         sflag.
9775
9776         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9777         not bytes.  Function summary() which creates a memory usage summary
9778         file with extension .mem.  Reports of overlaping stack and small stack
9779         size.  If the space for the stack is less than 16 bytes aslink trows a
9780         warning.
9781
9782         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9783         the 8051.  Option 'y' for memory summary output file.
9784
9785         Changes to sdcc (All the changes are marked with 'JCF'):
9786
9787         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9788
9789         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9790         overlaying area for it (uses RegBankUsed[4]).
9791
9792         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9793         bank zero as used by default.  By default aslink locates the stack
9794         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9795         the creation of the .mem file.  Delegates the allocation of data area
9796         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9797         the begining of the stack area to aslink.
9798
9799         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9800         glue() in SDCCglue.c creates an area for it.
9801
9802 2002-09-03  Borut Razem <borut.razem AT siol.net>
9803         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9804         sdcc/src/pic/glue.c:
9805         introduced atexit() handler for teporay files removal in case of
9806         errors, assertions, ...
9807
9808 2002-08-29  Borut Razem <borut.razem AT siol.net>
9809         * sdcc/support/cpp2/auto-host_vc_in.h:
9810         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9811         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9812         Maybe there is a similar problem with BORLANDC? It should be checked!
9813
9814         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9815         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9816         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9817         was not executed, and the compiler (cl) launched a warning:
9818         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9819
9820 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9821         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9822
9823 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9824         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9825
9826         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9827           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9828           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9829           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9830           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9831           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9832           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9833         - added Release configuration in VS projects
9834         - review of compiler an linker options
9835         - VC .exe files are generated in bin_vc directory, not to interfere
9836           with binaries generated from other projects (cygwin, mingw, bcc ...)
9837
9838         * sdcc/src/yacc.dsp: added
9839
9840         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9841         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9842         and insert the version number definitions from .version
9843
9844         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9845
9846         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9847         added - genarate auto-host.h using auto-host_vc_in.h as template
9848
9849         * sdcc/sdcc_vc.h,
9850         removed from CVS, generated automatically
9851
9852 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9853         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9854
9855 2002-08-11  Borut Razem <borut.razem AT siol.net>
9856         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9857
9858 2002-08-10  Borut Razem <borut.razem AT siol.net>
9859         * src/SDCCmain.c (main):
9860         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9861         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9862         The consequence was that some temporary files were not removed.
9863
9864         * src/SDCCglue.c:
9865         unification of code in functions tempfilename() and tempfile():
9866         function tempnam() is defined in Visual Studio 6.0 and .NET
9867
9868         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9869
9870         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9871           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9872         - removed compiler command line option /WX: Treats all warnings as errors
9873         - update a list of source files, included into the project
9874
9875         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9876           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9877         changed project type to Generic Project so that can be correcly converted to VS.NET project
9878
9879         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9880
9881         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9882
9883         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9884
9885         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9886         added return 0 statements after assert() to make compiler happy
9887
9888         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9889         added newline in the def file to keep MSC compiler satisfied
9890
9891         * sdcc/src/z80/gen.c:
9892         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9893           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9894         - solved MSC error in function aopDump()
9895
9896         * sdcc_vc.h: define PREFIX as "\\sdcc"
9897
9898 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9899         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9900
9901 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9902         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9903         - Rewrote the register banking algorithm.
9904         - Added pCode live-range analysis to registers (for now, only non-used and
9905         singly-used registers optimized away)
9906
9907         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9908
9909         * 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.
9910
9911 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9912         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9913
9914 2002-04-22  Michael Hope  <michaelh AT vroom>
9915
9916         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9917
9918         * configure.in (DD_COPT): Added include support required for gbdk.
9919
9920         * .version: Bumped version number just to increase it.
9921
9922         * src/SDCCmain.c: Added -nostdinc to the default options.
9923
9924 2002-04-15  Michael Hope  <michaelh AT vroom>
9925
9926         * device/lib/z80/printf.c (sprintf): Added.
9927
9928         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9929
9930         * src/z80/peeph.def: Added transpose redundent load rule.
9931
9932         * src/z80/main.c: Added force callee saves for jaune.
9933
9934         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9935
9936         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9937
9938 2002-03-28  Johan Knol  <johan AT balder>
9939
9940         * src/SDCCval.c: fixed bug #532436
9941
9942 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9943         * /src/port.h:
9944         Added "char *Processor" field to the port structure.
9945
9946         * /src/SDCCmain.c:
9947         Added -p option. Allows port dependent processor to be specified.
9948
9949         * all ports:
9950         Initialized the new field char *Processor field to NULL in all ports
9951
9952         * /src/pic/*:
9953         Compiler generated registers for interrupt context saving
9954         were not getting allocated.
9955
9956 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9957
9958         * /src/SDCCast.c:
9959         Fixed left shift. Will promote the left side of a left shift
9960         if a) left shifting more than size of operand or b) when assigned
9961         to something size > size of left side
9962
9963 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9964         * src/pic/*
9965         tons of changes. Register allocation has been
9966         rewritten. Added customization for the various PICs. Flow
9967         analysis is restructured. ...
9968
9969         * src/pic/device.h:
9970         Added
9971
9972         * src/pic/device.c:
9973         Added. device.c is a PIC port hack to accomodate variations
9974         in PIC devices.
9975
9976 2002-03-13  Michael Hope  <michaelh AT vroom>
9977
9978         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9979
9980 2002-03-04  johanknol  <johanknol AT manik>
9981
9982         * /src/SDCCval.c: fixed
9983
9984         const unsigned char arr[][2] = { { 0, 1 } };
9985         t18.c:1: error: Initializer element is not constant
9986
9987 2002-03-04  bela  <bela AT manik>
9988
9989         * /device/include/mcs51reg.h:
9990         ds89c420 register definition update
9991
9992 2002-03-03    <johan AT FRIJA>
9993
9994         * support/Util/SDCCerr.c: did something, but don't no why anymore
9995
9996         * support/regression/tests/bug-524691.c: made it a little less shy
9997
9998         * src/SDCCast.c (decorateType): fixed bug #524697
9999
10000         * src/SDCCast.c: made some lineno improvements
10001
10002         * src/SDCCval.c (getNelements): changed warning to error
10003
10004         * src/SDCCglue.c (printIvalArray): changed warning to error
10005
10006         * src/SDCCicode.c: fixed a warning for mingw
10007
10008         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10009
10010         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10011
10012 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10013
10014         * src/ds390/peeph.def:
10015         Added some more peephole rules
10016
10017         * src/ds390/gen.c: Various fixes & enhancements
10018
10019         * src/SDCClrange.c, src/SDCClrange.h:
10020         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10021
10022         * src/ds390/ralloc.c:
10023         various fixes & enhancements (ds390) specific
10024
10025         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10026         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10027         from rallocs.
10028
10029         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10030
10031 2002-03-02    <johan AT FRIJA>
10032
10033         * src/SDCCast.c (decorateType): fixed bug #524708
10034
10035         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10036
10037         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10038
10039 2002-03-01  Michael Hope  <michaelh AT vroom>
10040
10041         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10042
10043         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10044
10045 2002-03-01    <johan AT FRIJA>
10046
10047         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10048
10049         * src/SDCCast.c (decorateType): fixed bug #524209
10050
10051         * src/SDCCval.c (valNot): fixed bug #524195
10052
10053 2002-02-26    <johan AT balder>
10054
10055         * src/xa51/gen.c: fixed a warning
10056
10057         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10058
10059         * src/SDCCast.c (decorateType): fixed bug #522534
10060
10061 2002-02-23    <johan AT balder>
10062
10063         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10064
10065 2002-02-22    <johan AT balder>
10066
10067         * src/SDCCast.c: fixed bug #514865
10068
10069         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10070
10071 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10072
10073         * sdcc/src/SDCCloop.c:
10074         Previous fix was not good. basic blocks that have "break" or "return" are
10075         not really partof a loop , but live ranges used in these blocks should
10076         be live thru the entire loop, so set partOfLoop but don't add them to
10077         loop region
10078
10079 2002-02-21    <johan AT FRIJA>
10080
10081         * src/SDCCcse.c: fixed bug #514308
10082
10083 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10084
10085         * src/SDCCloop.c:
10086         Fixed BUG #519583. If a conditional block ended in a return/break
10087         statement inside a loop, it was not being considered part of the loop.
10088
10089         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10090
10091 2002-02-10  Karl Bongers <karl AT turbobit.com>
10092
10093         * debugger/*:
10094         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10095         with lots of comments and notes.
10096
10097         * device/examples/test2.c:
10098         Fix bug, "red" variable not being initialized(compiler complained).
10099
10100         * device/examples/Makefile, examples/test3.c:
10101         Add Makefile in device/examples folder, compiles test3.c
10102         for use as a multiple module SDCDB test case.
10103
10104         * sim/ucsim/cmd.src/cmdset.cc:
10105         Took out debug printfs in ucsim "next" command.
10106
10107         * sim/ucsim/xa.src:
10108         Karl and Johan start ucsim XA support.  Most dissassembly working,
10109         about 75% emulation done(plenty of work remaining).
10110
10111         * sim/ucsim/z80.src:
10112         Add Z80 support to ucsim, add test-ucz80 regression test,
10113         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10114         Notice z80 compiler fails on examples/test3.c/crc code.
10115
10116 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10117
10118         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10119         Added support for --parms-in-bank1
10120
10121         * src/ds390/peeph.def:
10122         added a few more peephole optimzations
10123
10124         * src/ds390/main.c:
10125         1) added __builtin_inp & __builtin_outp used to read in data of given length
10126            from a memory mapped port
10127         2) added __builtin_memcmp
10128         3) added __builtin_swapw swap bytes of a short
10129
10130         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10131         1) handle multiple send & receives from register bank1
10132         2) ralloc can now allocate DPTR1 to some liveRanges
10133
10134         * src/SDCCsymt.c, src/SDCCsymt.h:
10135         changes to handle multiple sends & receives
10136
10137         * src/SDCCptropt.h:
10138         added some pointer arithmetic optimization
10139
10140         * src/SDCCptropt.c:
10141         added some pointer arithmetic optimizations but not stable yet so not
10142         called from anywhere (will get this working shortly)
10143
10144         * src/SDCCopt.c: fixed for multiple sends & receives
10145
10146         * src/SDCCmain.c:
10147         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10148         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10149            set preprocessor defines (depending on options)
10150
10151         * src/SDCCicode.c, src/SDCCicode.h:
10152         changes made to handle multiple sends & receives
10153
10154         * src/SDCCglobl.h:
10155         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10156
10157         * src/SDCCcse.c, src/SDCCcse.h:
10158         added function findbackward def (to be used in upcoming optimization)
10159
10160         * src/SDCCcflow.c, src/SDCCcflow.h:
10161         added function returnAtEnd - to determine if a basic block terminates with
10162         a RETURN iCode
10163
10164         * src/SDCCast.c, src/SDCCast.h:
10165         added option parms-in-bank1
10166
10167         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10168         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10169         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10170         adjusted for --parms-in-bank1 option
10171
10172         * device/include/string.h:
10173         donot redefine "reentrant" keyword
10174
10175         * device/include/ds80c390.h: Added some more SFRs
10176
10177 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10178
10179         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10180
10181 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10182
10183         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10184
10185 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10186
10187         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10188
10189 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10190
10191         * Added --xram-movc option
10192
10193 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10194
10195         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10196
10197 2002-01-11  Johan Knol
10198
10199         * Added math lib of Jesus Calvino-Fraga
10200
10201 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10202
10203         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10204         * support/regression/Makefile: new target test-mcs51-stack-auto
10205         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10206
10207 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10208
10209         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10210
10211 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10212
10213         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10214
10215 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10216
10217         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10218
10219         * src/SDCCglue.h: add definition for printIvalChar()
10220
10221 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10222
10223         * src/SDCCast.c: fix #498138 by Johan
10224
10225         * src/SDCCglue.c: fix #498138 by Johan
10226
10227 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10228
10229         * support/regression/Makefile: fix clean
10230
10231         * support/regression/ports/ds390/support.c: fix transmission of last character
10232
10233 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10234
10235         * /sdcc/src/ds390/gen.c:
10236         a) improved computing address of stack variable
10237         b) took out some #if 0 code
10238         c) improved parmBytes adjustment
10239         d) improved genPlusIncr & genMinusIncr
10240         e) genCmp could generate bad code (when left assigned to DPTR)
10241         f) Fixed bug in hasInc
10242
10243         * /sdcc/src/ds390/ralloc.c:
10244         a) packRegsForSupport could mess up live information (Fixed)
10245         b) packRegsDPTRuse could be incorrect for left & right shift
10246
10247         * /sdcc/src/mcs51/ralloc.c:
10248         packRegsForSupport could mess up the live information (Fixed)
10249
10250         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10251
10252         * /sdcc/src/SDCCast.c:
10253         can reverse a loop even if function call is present as long
10254         as the loop control variable is local & is not passed as parameter
10255
10256 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10257
10258         * /sdcc/ChangeLog: *** empty log message ***
10259
10260         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10261         More builtin function additions for TININative
10262
10263         * /sdcc/src/ds390/ralloc.c:
10264         Had broken the regression testsuite
10265
10266         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10267
10268         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10269         Added funcattr hasStackParms will be set for reentrant functions when there
10270         are paramteres on the stack, this helps in minimizing frame pointer generation
10271         typeFromStr can handle function pointers now
10272
10273         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10274         *** empty log message ***
10275
10276 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10277
10278         * /src/ds390/gen.c, /src/ds390/main.c:
10279         More builtin function additions for TININative
10280
10281         * /src/ds390/ralloc.c:
10282         Had broken the regression testsuite
10283
10284         * /src/SDCCast.c: Fixed a bug in dumptree
10285
10286         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10287         Added funcattr hasStackParms will be set for reentrant functions when there
10288         are paramteres on the stack, this helps in minimizing frame pointer generation
10289         typeFromStr can handle function pointers now
10290
10291         * /doc/builtins.txt, /doc/TININative.txt:
10292         *** empty log message ***
10293
10294
10295 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10296
10297         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10298         ALPHA version for -mTININative
10299
10300         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10301         updated to reflect changes in the port structure
10302
10303         * /src/port.h:
10304         added function do_assemble (similar to do_link) if non-null this function
10305         will be called to do assembly (-mTININative) requires a multi command
10306         assembly
10307         added function genAssemblerEnd will be called to generate assembler Epilogue
10308
10309         * /src/SDCCsymt.c:
10310         added _JavaNative to debug info printing
10311
10312         * /src/SDCCmain.c: added option --tini-libid
10313         added port->do_assemble function (-mTININative) has a multi command assemble
10314
10315         * /src/SDCCglue.c: Disabled "constExpr" check
10316         added port->genAssemblerEnd function
10317
10318         * /src/SDCCglobl.h: Added option --tini-libid value
10319
10320         * /src/SDCCast.h:
10321         tookout optimizeCompare from the header (has no external references)
10322
10323         * /src/SDCCast.c: made one more function "static"
10324
10325 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10326
10327         * src/z80/mappings.i: Added z80asm support.
10328
10329         * src/z80/main.c: Added z80asm support on --asm=z80asm
10330
10331         * src/z80/gen.c: Fixed asm portability issues.
10332
10333         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10334
10335         * src/SDCCglue.c (printExterns): Added global/extern split.
10336
10337 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10338
10339         * support/regression/Makefile: added test for mcs51 model large
10340
10341         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10342
10343         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10344
10345 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10346
10347         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10348
10349 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10350
10351         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10352
10353         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10354
10355 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10356
10357         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10358
10359         * support/regression/tests/simplefloat.c: Port to mcs51.
10360
10361 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10362         * support/regression/tests/bug-485362.c: Added.
10363
10364         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10365
10366         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10367
10368         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10369
10370         * src/z80/gen.c (aopDump): Added a dump function.
10371
10372 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10373         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10374
10375         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10376
10377         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10378
10379         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10380
10381         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10382
10383         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10384
10385         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10386
10387         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10388
10389         * support/regression/ports/ds390/support.c: Use tinibios.
10390
10391         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10392
10393 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10394
10395         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10396         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10397
10398         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10399
10400         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10401
10402 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10403
10404         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10405
10406         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10407         (packRegsForIYUse): Created and optimised.
10408
10409 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10410
10411         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10412 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10413
10414         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10415
10416         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10417
10418         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10419
10420 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10421
10422         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10423
10424         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10425
10426 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10427
10428         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10429
10430         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10431
10432         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10433
10434 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10435
10436         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10437         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10438         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10439
10440         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10441
10442         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10443         (genNotFloat): Added.
10444         (genUminusFloat): Added.
10445
10446         * device/lib/z80/Makefile: Added floating pt stubs.
10447
10448         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10449
10450         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10451
10452         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10453
10454 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10455
10456         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10457
10458         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10459
10460         * sdcc/support/regression/Makefile: Add port ds390.
10461
10462         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10463
10464         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10465
10466         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10467
10468         * sdcc/support/regression/ports/ds390/support.c: Added.
10469
10470         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10471
10472         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10473
10474         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10475
10476 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10477
10478         * device/include/malloc.h: Added z80 and gbz80 support.
10479
10480         * device/lib/gbz80/heap.s: Added.
10481
10482         * device/lib/z80/heap.s: Added.
10483
10484         * device/lib/malloc.c: Added z80 and gbz80 support.
10485
10486         * support/regression/tests/malloc.c (testMalloc): Added.
10487
10488         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10489
10490         * support/regression/tests/bug-478094.c: Added.
10491
10492         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10493
10494 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10495
10496         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10497
10498         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10499
10500         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10501
10502         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10503
10504         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10505
10506 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10507
10508         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10509
10510 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10511
10512         * support/regression/tests/bug-477927.c: Added.
10513
10514         * src/z80/peeph.def: Added minor rules.
10515
10516         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10517
10518         * src/z80/peeph.def: Added jump optimisation modification.
10519
10520 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10521
10522         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10523
10524 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10525
10526         * support/regression/tests/funptrs.c: Added.
10527
10528 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10529
10530         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10531
10532 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10533
10534         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10535
10536         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10537
10538         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10539         (movLeft2ResultLong): Created.
10540
10541         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10542         (joinPushes): Added.  Joins two char pushes into a word push.
10543
10544 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10545
10546         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10547
10548         * support/makebin/Makefile (install): Added creation of dest dir.
10549
10550 2001-10-24 Karl Bongers <karl AT turbobit.com>
10551
10552         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10553
10554 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10555
10556         * src/z80/ralloc.c: Turned off faulty pack for one use.
10557
10558         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10559
10560         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10561
10562 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10563
10564         * support/regression/Makefile: Improved clean
10565
10566         * support/regression/ports/gbz80/spec.mk: Added clean
10567
10568         * support/regression/ports/host/spec.mk: Added clean
10569
10570         * support/regression/ports/z80/spec.mk: Added clean
10571
10572         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10573
10574         * support/regression/ports/mcs51/timeout.c: little improvements
10575
10576 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10577
10578         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10579
10580         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10581
10582         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10583
10584 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10585
10586         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10587
10588         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10589
10590 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10591         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10592
10593         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10594
10595         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10596
10597         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10598
10599         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10600
10601         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10602
10603         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10604
10605         * support/regression/tests/longor.c: Added.
10606
10607 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10608
10609         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10610
10611         * as/mcs51/aslink.h: define PATH_MAX
10612
10613         * as/mcs51/asm.h: define PATH_MAX
10614
10615         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10616
10617         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10618
10619         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10620
10621         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10622
10623         * src/SDCCglobl.h: define PATH_MAX
10624
10625         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10626
10627         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10628
10629 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10630
10631         * src/z80/gen.c (gencjneshort): Fixed
10632
10633         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10634
10635 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10636
10637         * support/regression/tests/bug-469671.c: Added.
10638
10639         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10640
10641 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10642
10643         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10644
10645         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10646
10647 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10648
10649         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10650
10651         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10652
10653         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10654
10655         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10656
10657         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10658
10659         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10660
10661         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10662
10663 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10664
10665         * 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.
10666
10667         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10668
10669         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10670
10671 2001-10-07    <johan AT FRIJA>
10672
10673         * device/lib/gets.c (gets): fixed the return value.
10674
10675 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10676         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10677
10678         * 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.
10679
10680         * 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.
10681
10682         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10683
10684         * src/pic/gen.c: Removed Safe_strdup.
10685
10686         * configure.in: Added option to enable libgc support.
10687
10688         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10689         (bitVectUnion): Optimised.
10690         (bitVectIntersect): Optimised.
10691         (bitVectBitsInCommon): Optimised.
10692         (bitVectCplAnd): Optimised.
10693
10694         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10695
10696 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10697
10698         * src/SDCCmain.c: distinguish between assembler debug and plain options
10699
10700         * src/avr/main.c:   remove standard assembler options
10701
10702         * src/ds390/main.c: remove standard assembler options
10703
10704         * src/mcs51/main.c: remove standard assembler options
10705
10706         * src/port.h: removed "PENDING" comment
10707
10708 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10709
10710         * src/device/lib/_mulint.c  : new, with assember functions
10711
10712         * src/device/lib/_mullong.c : new, with assember functions
10713
10714         * src/device/lib/_divuint.c : with assember functions
10715
10716         * src/device/lib/_divsint.c : with assember functions
10717
10718         * src/device/lib/_divulong.c: with assember functions
10719
10720         * src/device/lib/_divslong.c: with assember functions
10721
10722         * src/device/lib/_moduint.c : with assember functions
10723
10724         * src/device/lib/_modsint.c : with assember functions
10725
10726         * src/device/lib/_modulong.c: with assember functions
10727
10728         * src/device/lib/_modslong.c: with assember functions
10729
10730         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10731
10732         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10733
10734         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10735                                       replaced _mululong.c and _mulslong.c by _mullong.c
10736
10737 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10738
10739         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10740
10741 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10742
10743         * src/SDCCglue.c: test, if win32api is available for MINGW
10744
10745 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10746
10747         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10748         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10749         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10750         * support/regression/ports/host/spec.mk: removed GENERIC
10751         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10752         * support/regression/ports/z80/spec.mk: removed GENERIC
10753
10754 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10755
10756         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10757
10758         * support/regression/tests/bug-467035.c: Created.
10759
10760 2001-10-01    <johan AT FRIJA>
10761
10762         * src/SDCC.y: fixed bug #466586 part 1
10763
10764 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10765
10766         * SDCCicode.c: z80 has no generic pointers
10767         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10768
10769 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10770
10771         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10772
10773 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10774
10775         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10776
10777         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10778
10779 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10780
10781         * configure.in: Fixed up so that ucsim is only configured once.
10782
10783         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10784
10785         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10786         (getPathDifference): As above.
10787
10788         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10789
10790         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10791
10792 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10793         * .version: Updated to 2.3.1
10794
10795         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10796         Added copyright header.
10797
10798         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10799         (assemble): Added support for macro based assembler commands.
10800         (linkEdit): Added support for macro based linker commands.
10801         (preProcess): Changed the pre-processor to use macros.
10802         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10803         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10804
10805         * device/lib/z80/crt0.s: Added module name for debugging.
10806
10807 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10808
10809         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10810
10811         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10812
10813         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10814
10815         * src/Makefile.in: Added SDCCmacro and SDCCutil
10816
10817 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10818
10819         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10820
10821 2001-09-16    <johan AT FRIJA>
10822
10823         * 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.
10824
10825 2001-09-15    <johan AT FRIJA>
10826
10827         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10828         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10829
10830 2001-09-11    <johan AT FRIJA>
10831
10832         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10833
10834 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10835
10836         * support/regression/tests/bug-460444.c: Added test case.
10837
10838         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10839         (genCast): Added justification for all of the asserts.
10840
10841 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10842
10843         * support/regression/support.c: _xdata replaced by xdata
10844
10845         * support/regression/spec.mk: removed _generic
10846
10847 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10848
10849         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10850
10851         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10852         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10853
10854         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10855
10856         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10857
10858         * support/regression/tests/bug-460010.c: Added test case.
10859
10860         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10861
10862 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10863
10864         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10865
10866         * support/regression/testfwk.c: removed workaround for bug #436344
10867
10868         * support/regression/tests/bp.c: use less memory with mcs51
10869
10870         * support/regression/tests/bug-441448.c: use less memory
10871
10872         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10873
10874         * support/regression/collate-results.py: typo
10875
10876 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10877
10878         * support/regression/tests/fetchoverlap.c: Added new test case.
10879
10880         * support/regression/tests/bp.c: Added new test case.
10881
10882         * support/regression/tests/bug-448984.c: Added new test case.
10883
10884         * support/regression/tests/pow2shifts.c: Added new test case.
10885
10886         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10887         (genlshTwo): Fixed right shift for count > 8.
10888
10889         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10890
10891 2001-09-08    <johan AT FRIJA>
10892
10893         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10894
10895 2001-09-07    <johan AT FRIJA>
10896
10897         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10898
10899         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10900
10901 2001-09-06    <johan AT FRIJA>
10902
10903         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10904         * bernhard noted me at this: "() equals to (void)" (1.38)
10905
10906 2001-09-05    <johan AT FRIJA>
10907
10908         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10909
10910 2001-09-04    <johan AT FRIJA>
10911
10912         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10913
10914
10915 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10916
10917         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10918
10919 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10920
10921         * link/z80/aslink.h: Fixed path for PATH_MAX
10922
10923 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10924
10925         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10926
10927         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10928
10929         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10930
10931         * 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.
10932
10933 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10934
10935         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10936         (genCmp): Fixed up genCmp for the GB with longs.
10937
10938         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10939
10940         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10941
10942         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10943
10944         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10945
10946 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10947
10948         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10949
10950 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10951
10952         * 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.
10953
10954         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10955
10956 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10957
10958         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10959
10960         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10961
10962 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10963
10964   * sim/ucsim/configure:    little improvement of Cygwin-detection
10965   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10966   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10967   * support/regression/tests/bug-221100.c: small changes for mcs51
10968   * support/regression/tests/bug-221168.c: small changes for mcs51
10969   * support/regression/tests/bug-227710.c: small changes for mcs51
10970   * support/regression/tests/staticinit.c: small changes for mcs51
10971   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10972   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10973   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10974
10975 $Revision$