e82bf58b8ed4f0c36389166418975ca3575425b9
[fw/sdcc] / ChangeLog
1 2006-04-19 Borut Razem <borut.razem AT siol.net>
2
3         * doc/sdccman.lyx, */Makefile, */Makefile.in:
4           references to CVS replaced with Subversion
5
6 2006-04-19 Borut Razem <borut.razem AT siol.net>
7
8         * src/version.awk: adapted for svn
9         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
10           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
11           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
12           /binutils-avr/etc/*.vi, *.jin: removed all properties
13           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
14
15 2006-04-19 Borut Razem <borut.razem AT siol.net>
16
17         * CVS to Subversion migration completed
18
19 2006-04-18 Borut Razem <borut.razem AT siol.net>
20
21         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
22           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
23
24 2006-04-17 Borut Razem <borut.razem AT siol.net>
25
26         * device/include/Makefile.in: added pic/*.inc to the installation
27
28 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
29
30         * support/regression/collate-results.py: fixed output in case of
31         a valdiag error
32         * support/regression/generate-cases.py: fixed splitting of pathnames
33         with dots
34         * as/hc08/lklibr.c (addfile),
35         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
36
37 2006-04-11 Raphael Neider <rneider AT web.de>
38
39         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
40         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
41         * src/pic16/pcode.c (assignValnums): fixed #1460578
42
43 2006-04-11 Raphael Neider <rneider AT web.de>
44
45         * device/lib/pic/libdev/*.c,
46         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
47           fixes #1468739, enables compilation in --std-c99 mode
48         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
49
50 2006-04-11 Raphael Neider <rneider AT web.de>
51
52         * src/pic/device.c (find_device): removed debug output
53           (list_valid_pics): enabled verbose listing of supported devices
54         * device/include/stdbool.h: define bool as char for pic14/16 as well
55
56 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
57
58         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
59
60 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
61
62         * .version: bumped version to 2.5.6
63         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
64
65 2006-04-06 Raphael Neider <rneider AT web.de>
66
67         * .version: bumped version to 2.5.6 (pic14 ABI changed)
68         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
69         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
70           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
71             pic14_constructAbsMap
72           (pic14printPublics): declare absolute global symbols as global
73           (pic14createInterruptVect),
74         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
75           (newReg): assume new registers unused, use correct name in
76             hashtable (reg->name instead of name), more debugLog output
77         * src/pic/device.h (PIC_device): added fields for verbose output
78         * src/pic/device.c: moved device definition to pic14devices.txt,
79             added routines for runtime parsing of pic14devices.txt,
80             added support for second config word
81         * src/pic/main.c (_process_pragma): removed #pragma maxram,
82           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
83           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
84           (_pic14_parseOptions): moved pCodeInitRegisters here
85           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
86         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
87           (pCodeInitRegisters): rewrapped comments, perpared new approach to
88             handling the pseudo stack
89         * device/lib/Makefile.in: ignore failures in objects-pic16,
90         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
91         * device/lib/pic/NEWS: document new dependency on picXXX.lib
92         * device/lib/pic/Makefile.subdir,
93         * device/lib/pic16/Makefile.subdir: improved clean rules
94         * device/lib/pic/libdev/: NEW, pic14 device libraries
95         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
96         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
97         * device/include/Makefile.in: create subdir and install pic14 headers
98         * device/include/pic/p16f_common.inc: removed unused declarations
99         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
100             PICs from inc2h.pl v1.6,
101             replaced BIT_AT macros with struct declarations
102         * device/include/pic/pic14devices.txt: definition of supported devices,
103             all above improvements contributed by Zik Saleeba, thanks
104         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
105         * support/scripts/sdcc.nsi: also install pic14 device libraries and
106             headers
107
108 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
109
110         * device/include/mcs51/c8051f410.h: added interrupt numbers,
111         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
112           thanks to Charles Olds
113
114 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
115
116         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
117
118 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
119
120         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
121         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
122         * support/regression/bug1464657.c: added, new test
123
124 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
125
126         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
127           version number
128
129 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
130
131         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
132           --no-peep and --peep-file <file> are used don't use default rules but
133           do use the <file>
134
135 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
136
137         * src/mcs51/gen.c (genCall): fixed bug 1457608
138
139 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
140
141         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
142         changes seem to cause (trigger?) problems with the build system.
143
144 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
145
146         * src/SDCCpeeph.c (operandsLiteral): new, added,
147           (callFuncByName): inserted operandsLiteral
148         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
149
150 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
151
152         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
153         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
154
155 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
156
157         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
158           implemented patch 1120823 Thanks to Willy De la Court (normal
159           interrupts need an interrupt number now if they are made critical),
160           and enabled nesting of critical functions though not for gbz80
161           (genCritical, genEndCritical): added functions
162           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
163         * src/z80/mappings.i: added "ei" to all mappings
164
165 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
166
167         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
168         submitted by the Debian SDCC maintainer Aurelien Jarno:
169         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
170         archive with gcc 4.1 on mips and wrote the patch"
171
172 2006-03-16 Raphael Neider <rneider AT web.de>
173
174         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
175           the left operand is shorter than the result (c* = lit-c* + int),
176           fixes bug #1450796
177         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
178           OP_SYMBOL
179
180 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
181
182         * src/.version: increased version number to 2.5.5
183         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
184         linking is done manually in pic16 port's _linkEdit,
185         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
186         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
187         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
188         allocate asmop as AOP_ACC,
189         (aopForRemat): added parameter 'bool result' in function declaration,
190         (pic16_aopGet): return AOP_ACC when accessing WREG,
191         (pic16_popGetTempReg): minor modification,
192         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
193         'pic16_allocWithIdx',
194         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
195         calling function in absolute addresses,
196         (genAssign): take into account AOP_ACC asmop,
197         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
198         * src/pic16/pcoderegs.c: some debug functions and lines added,
199         * src/pic16/ralloc.c (decodeRegType): added but commented out,
200         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
201         register too,
202         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
203         call to allocReg, not by manually allocating a new one,
204         (pic16_assignRegisters): now before going through the register
205         allocating functions mark all registers as free. This eliminates some
206         side effects resulting from peephole parser done earlier in the backbone
207
208 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
209
210         * src/SDCCicode.c (geniCodeLogic),
211         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
212
213 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
214
215         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
216           (genSend): bugfix, do not allocate and free twice,
217           (shiftRLong): handle partially overlapping aops
218         * support/regression/tests/bitopcse.c: fixed warning redefined idata
219
220 2006-03-08 Borut Razem <borut.razem AT siol.net>
221
222         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
223           for pic16
224
225 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
226
227         * support/regression/tests/bug1409955.c: new, added
228         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
229         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
230           (aopForSym, aopOp): increment asmop.allocated if reused,
231           (freeAsmop): decrement asmop.allocated and check for zero instead of
232           using asmop.freed,
233           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
234           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
235            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
236            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
237            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
238            genSignedRightShift, genRightShift, genDataPointerGet,
239            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
240            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
241             in reverse order from allocation,
242           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
243             added swappedLR to keep track
244         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
245           pdata & code for GCC, z80, gbz80 & hc08
246         * support/regression/tests/zeropad.c: moved defines to testfwk.h
247
248 2006-03-08 Raphael Neider <rneider AT web.de>
249
250         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
251
252 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
253
254         * device/include/mcs51/c8051f410.h: new SiLabs mcu
255         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
256         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
257
258 2006-03-06 Borut Razem <borut.razem AT siol.net>
259
260         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
261           made the linker quiet
262
263 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
264
265         * src/pic16/gen.c (genPcall): fixed bug #1443644
266         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
267         which dumps before the function entry point a data byte which represents
268         the number of the local variables used by the specified function, added
269         'xinst' for initial support for Extended Instruction Support,
270         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
271         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
272         port->fun_prefix anymore (may change later),
273         (genFunction, genEndFunction): do not store/restore local registers for
274         _main (this should take care the --main-return command line option in
275         the future),
276         (genOr): removed some legacy pic-port instructions,
277         * src/pic16/genarith.c (genAddLit): re-enabled old code because
278         performing operations with SFR's causes data to be written more than
279         once to each SFR. Perhaps SFRs should be handled in special cases...
280         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
281         pcode.h
282         * src/pic16/main.c (_process_pragma): stack bound checking did not take
283         into account for stack starting position,
284         (struct OPTIONS pic16_optionsTable): added command line argument
285         --extended or -y for Extended Instruction Support,
286         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
287         (deassignLRs): *** perhaps the most important change, old 'for' code
288         (commented out for reference), didn't account for some registers which
289         were left marked 'not free' after a pointer operation. The change
290         reduces register usage a lot in some cases
291
292 2006-03-04 Borut Razem <borut.razem AT siol.net>
293
294         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
295           _clean
296         * support/regression/tests/bug-524697.c: decreased array size for
297           mcs51 to fit into the internal RAM
298         * support/regression/Makefile.in: a little bit more verbose
299
300 2006-03-03 Borut Razem <borut.razem AT siol.net>
301
302         * support/regression/fwk/lib/testfwk.c,
303           support/regression/fwk/include/testfwk.h: introduced function
304           _prints(), nonrecursive _printn(), call _initEmu() from main()
305         * support/regression/ports/gbz80/support.asm,
306           support/regression/ports/ucz80/support.asm,
307           support/regression/ports/z80/support.asm,
308           support/regression/ports/ds390/support.c,
309           support/regression/ports/hc08/support.c,
310           support/regression/ports/host/support.c,
311           support/regression/ports/mcs51/support.c,
312           support/regression/ports/xa51/support.c: added empty _initEmu()
313           function
314         * support/regression/ports/pic16/gpsim.cmd,
315           support/regression/ports/pic16/spec.mk,
316           support/regression/ports/pic16/support.c,
317           support/regression/Makefile.in: added pic16 regression test
318
319 2006-03-01 Raphael Neider <rneider AT web.de>
320
321         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
322           genConstPointerGet): use safe way of generating MOVFF to cover
323             literals as well as registers, fixes bug #1440527
324         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
325             dereference
326           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
327             more correctly, fixes bug #1232186
328           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
329         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
330             gplink guess the correct processor in more cases, applied patch
331             from Till Riedel attached to and fixing bug #1436552
332
333 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
334
335         * support/regression/tests/array.c: added, contains check for #1434401
336         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
337
338 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
339
340         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
341         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
342         * device/include/mcs51/c8051f326.h,
343         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
344         * device/include/mcs51/c8051f000.h,
345         * device/include/mcs51/c8051f018.h,
346         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
347           PCON_IDLE,PCON_STOP and added sfr16 definitions
348
349 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
350
351         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
352           genGetWord): fixed bug 1409955
353
354 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
355
356         * device/include/hc08/mc68hc908gp32.h,
357         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
358
359 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
360
361         * src/SDCCast.c (constExprValue): return NULL if not a value
362         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
363         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
364         * support/regression/tests/bitfields.c: enabled signed bitfield for all
365
366 2006-02-13 Borut Razem <borut.razem AT siol.net>
367
368         * src/regression/ptrarg.c: added, fails due to bug #1430967
369         * src/regression/Makefile: ptrarg.c added, ...
370
371 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
372
373         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
374         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
375
376 2006-02-11 Borut Razem <borut.razem AT siol.net>
377
378         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
379           print "Processor: xxx" message to stdout only if --verbose
380
381 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
382
383         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
384         * support/regression/tests/bug1426356.c: added
385         * support/regression/tests/bitfields.c: removed 2 tests
386
387 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
388
389         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
390         * device/include/mcs51/c8051f330.h,
391         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
392           PCON_IDLE,PCON_STOP and added sfr16 definitions
393         * device/lib/_divsint.c,
394         * device/lib/_divuint.c,
395         * device/lib/_divulong.c,
396         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
397           register bank bug for small stackauto
398
399 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
400
401         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
402
403 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
404
405         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
406         * all.dsp: corrected several bin paths
407         * device/include/mcs51/c8051f120.h,
408         * device/include/mcs51/c8051f300.h,
409         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
410           to PCON_IDLE,PCON_STOP
411         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
412         * device/lib/printf_large.c (output_float): fixed bug 1388703
413         * support/regression/tests/bug1057979.c: added test for bug 1388703
414
415 2006-02-08 Raphael Neider <rneider AT web.de>
416
417         * src/pic/pcode.c (pciTRIS): fixed typo,
418           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
419           (LinkFlow): fixed handling of flows that end in a call,
420           (ReuseReg): perform safety check earlier
421         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
422             to work with flows at the beginning of a pBlock,
423             fixes #1426557 (Symbol not previously defined),
424           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
425             usage information
426           (RemoveUnusedRegisters): update register usage info
427         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
428             created, reuse existing ones instead
429         * src/pic/gen.c (genPcall): fixed #1424719
430
431 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
432
433         * link/z80/lkmain.c,
434         * link/z80/lklex.c,
435         * link/z80/lkdata.c,
436         * link/z80/aslink.h: fixed build on current cygwin:
437         replaced getline() by lk_getline()
438
439 2006-02-01 Borut Razem <borut.razem AT siol.net>
440
441         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
442           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
443           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
444           src/regression/bool1.c, src/regression/bool2.c,
445           src/regression/bool3.c, src/regression/call1.c,
446           src/regression/compare.c, src/regression/compare10.c,
447           src/regression/compare2.c, src/regression/compare3.c,
448           src/regression/compare4.c, src/regression/compare5.c,
449           src/regression/compare6.c, src/regression/compare7.c,
450           src/regression/compare8.c, src/regression/compare9.c,
451           src/regression/configword.c, src/regression/for.c,
452           src/regression/inline.c, src/regression/mult1.c,
453           src/regression/nestfor.c, src/regression/or1.c,
454           src/regression/pointer1.c, src/regression/ptrfunc.c,
455           src/regression/rotate1.c, src/regression/rotate2.c,
456           src/regression/rotate3.c, src/regression/rotate4.c,
457           src/regression/rotate5.c, src/regression/rotate6.c,
458           src/regression/rotate7.c, src/regression/string1.c,
459           src/regression/struct1.c, src/regression/sub.c,
460           src/regression/sub2.c, src/regression/switch1.c,
461           src/regression/while.c, src/regression/xor.c,
462           src/regression/create_stc, src/regression/simulate,
463           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
464           regression tests
465         * src/regression/gpsim_assert.h: added
466
467 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
468
469         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
470         ((void (code *) (void)) 0) ();
471         * as/hc08/aslex.c,
472         * as/hc08/aslink.h,
473         * as/hc08/asm.h,
474         * as/hc08/asmain.c,
475         * as/hc08/lkdata.c,
476         * as/hc08/lklex.c,
477         * as/hc08/lkmain.c,
478         * as/mcs51/aslex.c,
479         * as/mcs51/aslink.h,
480         * as/mcs51/asm.h,
481         * as/mcs51/asmain.c,
482         * as/mcs51/lkdata.c,
483         * as/mcs51/lklex.c,
484         * as/mcs51/lkmain.c,
485         * as/z80/aslex.c,
486         * as/z80/asm.h,
487         * as/z80/asmain.c: fixed build on current cygwin:
488         replaced getline() by as_getline()
489
490 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
491
492         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
493         declarator in the symbol chain
494         * src/SDCCsymt.h,
495         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
496         parameter list for function pointers
497         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
498         * support/regression/tests/bug-716242.c: added
499
500 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
501
502         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
503         offset if possible
504         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
505
506 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
507
508         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
509         inifinitely recurseable, added static
510         * support/regression/tests/bug-1408066.c: added
511
512 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
513
514         * src/SDCCicode.h,
515         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
516         renamed, added possibility to create "postLoopLbl"-labels
517         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
518         newiTempLoopHeaderLabel
519         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
520         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
521         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
522         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
523         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
524         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
525         (basicInduction): fixed bug #136564, made static,
526         (loopInduction): changed parameter of basicInduction, made static,
527         (addPostLoopBlock): added
528         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
529         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
530         findLoopEndSeq
531         * support/regression/tests/bug-136564.c: added
532         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
533         --std-sdcc99 to LIBSDCCFLAGS
534
535 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
536
537         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
538         while loop
539         * support/regression/tests/bug-1406131.c: added
540
541 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
542
543         * src/SDCCast.c (decorateType): fix promotion of unary minus
544         * src/SDCCsymt.c (computeType): beautified
545         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
546         (valUnaryPM, valComplement): fix sign and promotion,
547         (valNot): ANSI: result type is int (SDCC: unsigned char)
548         * support/regression/tests/uminus.c: speedup by removing superflous
549         test case 'int'
550         * support/regression/tests/onebyte.c: added promotion and signedness
551         tests for unary minus
552         * support/regressions/tests/bug-477927.c: disable warning about
553         uninitialized variables
554         * support/regression/tests/not.c: added
555
556 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
557
558         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
559         * src/mcs51/gen.c (gen51Code): show final register usage after
560         fillGaps in asm with --i-code-in-asm
561         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
562         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
563         incUsed, rliveClear, adjustIChain): made static,
564         (setFromRange): excluded because it's unused,
565         (findPrevUseSym, markWholeLoop): added,
566         (findPrevUse): rewritten; fixes bug 895992; now a complete search
567         through all branches of predecessors enables sdcc to emit the warning
568         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
569         (rlivePoint): made static, added parameter emitWarnings which is only
570         true during the first run out of two,
571         (findRecursiveSucc, findRecursivePred): removed,
572         (computeLiveRanges): made static, added parameter emitWarnings,
573         (dumpIcRlive): added for debugging only
574         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
575         removed prototype of setFromRange()
576         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
577         in call of computeLiveRanges()
578         * support/regression/tests/bug-895992.c: added
579         * support/regression/tests/bug-971834.c: added
580         * support/valdiag/tests/bug-895992.c: added
581         * support/valdiag/tests/bug-971834.c: added
582
583 2005-12-18 Raphael Neider <rneider AT web.de>
584
585         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
586           (genUnpackBits): improved code for direct operands,
587           (genPackBits): improved code for literal assignment to bitfields
588             and for direct destination operands (no FSR indirection),
589             prevented redundant AND, fixes #1362800,
590           (AccLsh): added parameter to disable masking of the result
591         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
592           skip instructions with side-effects (like incfsz),
593           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
594         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
595         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
596           fixes #1375263
597
598 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
599
600         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
601         volatile variables as spill location
602
603 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
604
605         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
606         replacing literals
607         * support/regression/tests/bug-1376320.c: added
608
609 2005-12-08 Raphael Neider <rneider AT web.de>
610
611         * src/pic/device.c: renamed is_shared to pic14_is_shared
612         * src/pic/gen.c (genIfx): re-enabled handling of sbits
613         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
614           (is_valid_identifier): added for above workaround
615
616 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
617
618         * device/lib/Makefile.in: fixed to enable port-specific-objects
619         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
620           char, thanks Hubert Sack
621         * doc/sdccman.lyx: documented --xstack-loc,
622           elaborated a bit more on interrupts and pitfalls,
623           removed "setjmp/longjmp unsupported",
624           documented some unsupported C99 features
625         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
626         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
627           if, thanks Hubert Sack
628         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
629         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
630           make make_library
631         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
632           regression tests can report resource usage (rfe 700441)
633         * support/regression/collate-results.py: report resource usage
634         * support/regression/ports/ds390/spec.mk,
635         * support/regression/ports/hc08/spec.mk,
636         * support/regression/ports/mcs51/spec.mk,
637         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
638         * support/regression/ports/ds390/uCsim.cmd,
639         * support/regression/ports/hc08/uCsim.cmd,
640         * support/regression/ports/mcs51/uCsim.cmd,
641         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
642         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
643           library, use the default one
644         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
645           building the library
646
647 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
648
649         * config.dsp: added dependency on .version and configure_vc.awk
650         * device/include/setjmp.h: updated for --stack-auto and --xstack
651         * device/include/mcs51/at89c51snd1c.h: corrected line endings
652         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
653         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
654         * device/lib/libsdcc.lib: added _setjmp
655         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
656           (decorateType): fixed bug 1372851,
657           (optimizeGetHbit): fixed warning
658         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
659           array initialisation
660         * support/regression/tests/bug1057979.c: added test for bug 1358192
661         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
662
663 2005-12-03 Borut Razem <borut.razem AT siol.net>
664
665         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
666           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
667
668 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
669
670         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
671         createIval): implement symbol independant "flexible array member",
672         (createIvalCharPtr): implemented flexible array initialisation with a
673         string
674         * src/SDCCsymt.c (copyStruct): removed,
675         (getSize): fixed misleading comment,
676         (getAllocSize): removed, the additional allocation size is now in
677         sym->flexArrayLength,
678         (checkStructFlexArray): new, syntax checks for flexible array members,
679         (compStructSize): added syntax checks for "flexible array members"
680         (copyStruct): removed,
681         (copyLinkChain): removed inefficient fix for bug 770487
682         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
683         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
684         symbol->flexArrayLength
685         * src/SDCCerr.c,
686         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
687         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
688         * support/regression/tests/structflexarray.c: added
689         * support/valdiag/tests/structflexiblearray.c: added
690
691 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
692
693         * src/SDCCast.c (decorateType): fixed bug 1368489
694         * support/Util/SDCCerr.c,
695         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
696
697 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
698
699         * device/include/mcs51/at89c51snd1c.h: added file submitted by
700           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
701
702 2005-11-27 Borut Razem <borut.razem AT siol.net>
703
704         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
705           support/cpp2/mkdeps.h: added command line option
706           -obj-ext=<extension> to SDCPP to define object file externion, used
707           for generation of make dependencies (-M)
708         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
709
710 2005-11-26 Borut Razem <borut.razem AT siol.net>
711
712         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
713           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
714           added pic and pic16 libraries
715
716 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
717
718         * device/include/float.h: Corrected typo in prototype of __fsgt
719
720 2005-11-25 Borut Razem <borut.razem AT siol.net>
721
722         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
723           added creation of model-mcs51-stack-auto libraries
724
725 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
726
727         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
728         and fields-list too
729         * src/SDCCast.c (createIvalArray): removed obsolete comment
730
731 2005-11-24 Borut Razem <borut.razem AT siol.net>
732
733         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
734           added missing device/lib/mcs51/crt*.asm sources
735
736 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
737
738         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
739
740 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
741
742         * device/lib/_fs2schar.c,
743         * device/lib/_fs2sint.c,
744         * device/lib/_fs2slong.c: optimized inline asm
745
746 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
747
748         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
749           Better handling of floats between -1.0 and 0.0.
750
751 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
752
753         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
754           (the missing "if"s prohibited removal of redundant labels)
755
756 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
757
758         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
759           Properly convert floats between -1.0 and 0.0 to long, int, and char
760           types (max integer value of negative floats tends to zero).
761         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
762           Removed changes made so to work properly with floats between
763           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
764           and _fs2char.c
765
766 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
767
768         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
769         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
770         (genCast) cosmetic change
771         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
772         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
773         from mcs51
774         * support/regression/tests/bitfields (testSignedBitfields): added
775
776 2005-11-18 Borut Razem <borut.razem AT siol.net>
777
778         * sdcc/device/lib/Makefile.in: remove all unnecessary files
779         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
780           introduced SILENT option to make building of pic16 libraries less
781
782 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
783
784         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
785           Now they work properly with floats between -1.0 and 0.0
786         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
787
788 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
789
790         * src/SDCCicode.c (printOperand): added missing else
791
792 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
793
794         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
795         reformatted for better readability
796         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
797         signed bitfields
798
799 2005-11-17 Borut Razem <borut.razem AT siol.net>
800
801         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
802           introduced SILENT option to make building of pic16 libraries less
803           verbose - used for nightly snapshot build
804         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
805           available on Win32 platforms.
806         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
807           medium, large, pic and pic16
808
809 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
810
811         * device/lib/printf_large.c: Temporary patch for bug 1358192:
812           printf("%f"...) sets fraction to zero.
813
814 2005-11-16 Raphael Neider <rneider AT web.de>
815
816         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
817           fixes #1357221
818         * src/pic/gen.c (genIfx): implemented for CARRY bit
819         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
820           to generic pointers, fixes #1357332,
821           (pic16_movLit2f): NEW,
822           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
823
824 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
825
826         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
827
828 2005-11-11 Raphael Neider <rneider AT web.de>
829
830         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
831         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
832           compute pointer's type from operand,
833           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
834           improved single bit reads, fixes bug #1353379
835
836 2005-11-09 Borut Razem <borut.razem AT siol.net>
837
838         * support/scripts/sdcc.nsi: added lib/pic to the package
839
840 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
841
842         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
843
844 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
845
846         * support/regression/tests/bug1348008.c: added
847         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
848         * support/regression/tests/bug1337835.c: updated comment
849
850 2005-11-06 Borut Razem <borut.razem AT siol.net>
851
852         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
853           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
854           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
855           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
856           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
857           dynamic construction of cl_error_class and derivates - 2.nd try
858
859 2005-11-05 Borut Razem <borut.razem AT siol.net>
860
861         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
862           bug, which caused Bus Errors on sparc solaris
863
864 2005-11-04 Borut Razem <borut.razem AT siol.net>
865
866         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
867           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
868           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
869           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
870           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
871           and derivates to resolve the initialization problem on OSX
872
873 2005-11-02 Borut Razem <borut.razem AT siol.net>
874
875         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
876           corrected typo - #include <winsock2.h>
877
878 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
879
880         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
881           (_asxxxx_mapping): added org directive for future enhancements
882
883 2005-11-01 Borut Razem <borut.razem AT siol.net>
884
885         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
886           enabled sockets on WIN32
887         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
888
889 2005-10-31 Borut Razem <borut.razem AT siol.net>
890
891         * support/regression/generate-cases.py: escape backslashes in {testcase}:
892           WIN32 backslash path delimiters should be escaped when used in C strings
893         * support/regression/tests/bitfields.c: exclude failing assertions for
894           __CYGWIN32__ and __MINGW32__ hosts
895
896 2005-10-30 Borut Razem <borut.razem AT siol.net>
897
898         * src/SDCCutil.c: corrected double comparison typo
899
900 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
901
902         * device/lib/medium/Makefile: added for new memory model medium
903         * device/include/asm/mcs51/features.h: updated for medium/pdata
904         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
905           added Multiply & Accumulate sbit's and MAC0_PAGE define
906         * device/include/mcs51/c8051f300.h: added sfr16 definitions
907         * device/include/mcs51/c8051f310.h: added sfr16 definitions
908         * device/lib/_mullong.c: update for medium model
909         * device/lib/incl.mk: added medium model
910         * doc/sdccman.lyx: documented medium model
911         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
912         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
913         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
914         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
915           (allocParms): set SCLS and OCLS to pdata for medium model
916         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
917           for pdata,
918           (powof2): return <0 if not power of 2
919         * src/avr/gen.c (genBitWise): use updated powof2
920         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
921           (shiftR2Left2Result): small optimization in setup, save acc when storing,
922           (shiftLLeftOrResult): use B if necessary
923         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
924         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
925         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
926         * support/regression/Makefile.in: added test-mcs51-medium
927         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
928
929 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
930
931         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
932         specifier unsigned
933         * device/lib/time.c (mktime): fixed bug 1334315
934
935 2005-10-28 Raphael Neider <rneider AT web.de>
936
937         * device/include/pic/p16f_common.inc: added common declarations
938         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
939
940 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
941
942         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
943           (aopPutUsesAcc): added to predict accumulator use,
944           (assignResultValue): save acc if necessary,
945           (genMinusDec): store result if indirectly addressed,
946           (genDivOneByte):  save acc if necessary,
947           (movLeft2Result): bugfix if left already in acc,
948           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
949             attention to accumulator use (esp. pdata),
950           (genReceive): receive pdata correctly
951         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
952         * src/SDCCicode.h: added isOperandInPagedSpace prototype
953
954 2005-10-27 Raphael Neider <rneider AT web.de>
955
956         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
957
958 2005-10-27 Raphael Neider <rneider AT web.de>
959
960         * .version: changed version to 2.5.4
961         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
962         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
963           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
964             arithmetics support routines
965         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
966         * device/lib/Makefile.in: also create installdir for pic
967
968         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
969           pic14 port as well
970         * src/pic/device.c (dump_sfr): rewritten to delegate register
971           placement to the linker (use `extern sym' rather than sym EQU addr),
972           (validAddress): fixed to check last specified address
973         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
974           (popGetLit): truncate literal value to 8 bit,
975           (popGet): moved assert to more appropriate place
976           (popGetExternal): create pCode operand from and mark the according
977             symbol as being `extern'
978           (popGetAddr): added sanity check on immediate's offset, provide
979             GPOINTER tag on demand
980           (aopPut): fixed for immediates,
981           (mov2w_op): move operand's address or contents to WREG (depending on
982             operand type), safer variant of mov2w,
983           (movwf,call_libraryfunc): NEW, handy abbreviations,
984           (get_argument_pcop,get_return_val_pcop,pass_argument,
985           get_returnvalue): interface for accessing function parameters and
986             return values,
987           (assignResultValuei,genRet): use new parameter/return value interface
988           (pic14_getDataSize): back to old version handling generic pointers,
989           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
990             provided implementation and/or fixed old one,
991           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
992             calls, removed legacy 8051 reference code
993           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
994           (loadSignToC): NEW, move the operands sign bit to CARRY,
995           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
996             genRightShiftSigned, accepts negative shift counts,
997           (setup_fsr): load FSR and adjust IRP (indirect memory access),
998           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
999             generic pointers, __data pointers and __code pointers,
1000           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1001             and signed bitfields, limit bitfields to 8 bit,
1002           (genDataPointerGet): fixed number of bytes read,
1003           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1004           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1005             pointers to constant data are no longer assumed to point to __code
1006             space, removed invalid pointer types,
1007           (bitpatternFromVal): retrieve the PICs representation of an integer
1008             or float literal,
1009           (genDataPointerSet): fixed assigning to po_immediate operands,
1010           (genGenPointerSet): implemented as library call,
1011           (genIfx): fixed incorrect condition,
1012           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1013             provide GPOINTER tag according to destination's storage class,
1014           (genCast): added code to handle casting to generic pointers, added
1015             sign-/zero extension of the result
1016           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1017         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1018         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1019           extend the result
1020         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1021           address/register resides in the shared banks
1022           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1023             put all variables into separate sections (have the linker arrange
1024             them)
1025           (picglue): put init code and interrupt handlers in separate sections
1026         * src/pic/main.c: added port specific options table, modified to PORT
1027           structure to make GPOINTERs 3 byte, added pic14_options
1028           (_pic14_do_link): private linking routine (update paths to libraries,
1029             add libsdcc.lib by default)
1030         * src/pic/main.h: declare pic14_options
1031         * src/pic/pcode.c: fixed instructions i/o relations,
1032           (RegCond): reverted to correct version,
1033           (newpCodeOpLit): truncate literals to 8 bit,
1034           (genericPrint): added debug output,
1035           (getRegFromInstruction): fixed for various operand types, simplified
1036           (BuildFlow): fixed broken handling of isntructions with labels
1037           (LinkFlow): start at last instruction in flow (skip trailing comments),
1038             pass the flow on to the next instruction after CALL
1039           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1040           (insertPCodeInstruction): fixed inserting after a skip instruction,
1041           (DoBankSelect): fixed for labeled instructions
1042           (OptimizepBlock): honor --nopeep switch
1043           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1044         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1045         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1046           (pCodeOptime2pCodes): allow disabling this optimization via
1047             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1048             but is still buggy), started implementation of a dataflow based
1049             pCode optimization (CSE + dead code elimination)
1050           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1051         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1052           names are independant of the stack location and therefore portable across
1053           devices
1054
1055 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1056
1057         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1058           (selectSpil): fixed bug 1337835 by not spilling bit variables
1059         * support/regression/tests/bug1337835.c: added test for this bug
1060         * src/mcs51/peeph.def: restart after rule 3.c,
1061           addded rules 263.x to optimize loading constants
1062
1063 2005-10-26 Raphael Neider <rneider AT web.de>
1064
1065         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1066         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1067           (genAssign): emit warning when casting literals to generic pointer
1068             type, also applies when taking the address of a fixed variable,
1069           (genCast): improved casting to generic pointers
1070         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1071           extern variables, added verbose error message
1072         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1073
1074 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1075
1076         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1077         carry must be complemented too
1078         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1079         could be emitted by genMinus
1080         * src/SDCCval.c (constVal): fixed bug 1305065
1081
1082 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1083
1084         * src/SDCCast.c (addCast): added promotion for bit variables
1085         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1086         promotion casts + optimisation
1087         (optimizeGetWord): fix warning 'i' might be used uninitialized
1088         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1089         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1090
1091 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1092
1093         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1094         all chars are promoted to int; promotion should be handled in SDCCast.c
1095
1096 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1097
1098         * device/lib/_strcmp.c: Fixed bug 1326457
1099
1100 2005-10-11 Raphael Neider <rneider AT web.de>
1101
1102         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1103         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1104
1105 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1106
1107         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1108         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1109
1110 2005-10-04 Raphael Neider <rneider AT web.de>
1111
1112         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1113           device/lib/pic16/pics.all: added pic18f1320
1114         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1115
1116 2005-09-30 Raphael Neider <rneider AT web.de>
1117
1118         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1119         * src/pic16/devices.inc: NEW, provides device descriptions
1120         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1121
1122 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1123
1124         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1125           GETHBIT
1126
1127 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1128
1129         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1130           documented Any Order Bit, Higher Order Byte and Higher Order Word
1131         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1132         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1133           (optimizeGetAbit): new, to get any bit, not only the high bit,
1134           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1135           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1136           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1137           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1138             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1139             GETABIT, GETBYTE, GETWORD: decorate them,
1140           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1141           (ast_print): added GETABIT, GETBYTE, GETWORD
1142         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1143         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1144           (geniCodeBinary): new generic binary icode,
1145           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1146         * src/port.h: updated comment for PORT.hasExtBitOp
1147         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1148           (genGetByte): new, to get a single byte,
1149           (genGetWord): new, to get a word from a long,
1150           (gen51Code): added GETABIT, GETBYTE, GETWORD
1151         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1152
1153 2005-09-23 Raphael Neider <rneider AT web.de>
1154
1155         * configure.in, configure: have device/lib/pic configured
1156         * device/lib/Makefile.in: added model-pic14
1157         * device/lib/clean.mk: added pic/ to clean rule
1158         * device/lib/pic: added rudimentary pic14 library providing support
1159           functions for multiplication/division/generic pointer access
1160         * src/SDCCopt.c (convilong): mark support functions as extern
1161           for pic14 port as well
1162         * src/pic/gen.c (genMult): added assertions,
1163           (genpic14Code): emit warning on unhandled iCodes
1164         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1165         * src/pic/pcode.c (pCodeOpCopy),
1166         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1167           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1168           SFR_REGISTER}), made safe for future extensions
1169         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1170           instructions even if preceeded by SKIP instructions (also remove
1171           them); removed unused code
1172         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1173           prevents leaving parts of the structure uninitialized after copying
1174
1175 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1176
1177         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1178           ago by me
1179         * support/regression/tests/addsub.c: added test for the bug
1180
1181 2005-09-21 Raphael Neider <rneider AT web.de>
1182
1183         * device/include/pic16/pic18f1220.h,
1184           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1185         * device/lib/pic16/Makefile.rules: added missing opening paren
1186         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1187           are provided in genutils.c,
1188           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1189           operand/result sizes,
1190           (genCmp): assert on NULL pointers first, then check deref'ed values
1191         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1192           result size
1193
1194 2005-09-18 Raphael Neider <rneider AT web.de>
1195
1196         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1197           as these are now unused,
1198           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1199         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1200           local, avoids uninitialized pointer dereference on r->name
1201         * src/pic16/ralloc.c (newReg): fixed indentation
1202
1203 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1204
1205         * src/SDCCval.c (constVal): fixed bug 730366
1206         * support/Util/SDCCerr.c,
1207         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1208
1209 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1210
1211         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1212
1213 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1214
1215         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1216
1217 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1218
1219         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1220           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1221         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1222           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1223         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1224         * packihx/packihx.c (hexDigit): made c unsigned char
1225         * as/mcs51/lklibr.c (fndsym),
1226         * link/z80/lkgb.c (gb),
1227         * link/z80/lklibr.c (fndsym),
1228         * link/z80/lkrloc.c (relr),
1229         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1230         * src/SDCC.lex (checkCurrFile, process_pragma),
1231         * src/SDCCglue.c (spacesToUnderscores),
1232         * src/SDCCmain.c (setParseWithComma, processFile),
1233         * src/asm.c (tvsprintf, printCLine),
1234         * src/avr/gen.c (emitcode, aopPut),
1235         * src/ds390/gen.c (emitcode),
1236         * src/hc08/gen.c (emitcode, emitinline),
1237         * src/mcs51/gen.c (emitcode, genInline),
1238         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1239           tokenizeLineNode),
1240         * src/pic/ralloc.c (debugLog),
1241         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1242           tokenizeLineNode),
1243         * src/pic16/ralloc.c (debugLog),
1244         * src/z80/main.c (_process_pragma):
1245            made all ctype.h function calls safe
1246         * src/SDCCopt.c: include math.h for fabs
1247         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1248           and used them throughout the code to make ctype.h function calls safe
1249         * src/ds390/main.c (asmLineNodeFromLineNode),
1250         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1251         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1252            unsigned char*
1253         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1254           (newpCodeAsmDir): made ctype.h function calls safe
1255         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1256           pic16_emitcode):  made lbp unsigned char*
1257         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1258           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1259         * src/xa51/gen.c (emitcode),
1260         * src/z80/gen.c (_emit2): made lbp unsigned char*
1261         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1262            char*
1263
1264 2005-09-05 Raphael Neider <rneider AT web.de>
1265
1266         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1267           access bank splitpoint
1268
1269 2005-09-05 Raphael Neider <rneider AT web.de>
1270
1271         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1272
1273 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1274
1275         * .version: changed to version 2.5.3
1276         * doc/sdccman.lyx: changed version to 2.5.3,
1277           documented --codeseg and --constseg and pragma codeseg and constseg,
1278           documented bit parameters (reentrant) and bit returning
1279         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1280            currFunc->recvSize, but is this ok for all ports?
1281           (ast2iCode): result of ~ on unsigned char must be cast to int for
1282            bool to work
1283         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1284           function pointers in bit space
1285         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1286           (processFuncArgs): call port.reg_parm() with reentrancy info
1287         * src/port.h,
1288         * src/avr/main.c,
1289         * src/ds390/main.c,
1290         * src/hc08/main.c,
1291         * src/pic/main.c,
1292         * src/pic16/main.c,
1293         * src/xa51/main.c,
1294         * src/z80/main.c: port.reg_parm prototype extended with
1295           "bool reentrant" parameter
1296         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1297           options.stackAuto for allocating bit register parameters
1298         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1299           (genSend): set BitBankUsed if it is,
1300           (selectRegBank): factored out of genCall for use in genPcall,
1301           (genCall): removed redundant dtype assignmen, use selectRegBank,
1302           (genPcall): handle returning in Carry properly, save in F0 if needed,
1303           (genReceive): handle bit register parameters
1304         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1305           (mcs51_assignRegisters): enable bit registers for all reentrant
1306            functions and don't set BitBankUsed unconditionally
1307         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1308         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1309         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1310
1311 2005-08-27 Borut Razem <borut.razem AT siol.net>
1312
1313         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1314         ppc-osx (Darwin) does not support -u option. It seems that it is
1315         supported only on Linux - GNU cp
1316
1317 2005-08-25 Borut Razem <borut.razem AT siol.net>
1318
1319         * sim/ucsim/gui.src/serio.src/Makefile.in,
1320           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1321           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1322           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1323           install and strip, since the strip at /usr/ccs/bin should be used
1324           on solaris
1325
1326 2005-08-24 Borut Razem <borut.razem AT siol.net>
1327
1328         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1329
1330 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1331
1332         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1333         ffffffffu
1334
1335 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1336
1337         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1338         * as/mcs51/lkmain.c (link_main): fixed warning
1339         * device/include/stdbool.h: ds390 has no advanced bit support yet
1340         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1341         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1342         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1343           and updated their macros
1344         * src/SDCCval.c (constVal): updated comment for renamed b_long
1345
1346 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1347
1348         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1349         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1350           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1351           (oprio): set priority for '['
1352         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1353            and adb_24_bit
1354         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1355         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1356         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1357         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1358           added overlayable BIT_BANK area
1359         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1360           (summary2): explain 'T' in legenda
1361         * as/mcs51/lkrloc.c: replaced old K&R style,
1362           (relr): added R_BIT processing,
1363           (errmsg): added "Bit-addressable relocation error",
1364           (adb_bit): added for converting from byte- to bit-addressable space,
1365           (adb_24_bit): added for converting from byte- to bit-addressable space
1366         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1367            used in reentrant functions now even as return value
1368         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1369         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1370           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1371         * src/SDCCglobl.h: added indicator BitBankUsed
1372         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1373            the bit registers b0-b7
1374         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1375           (geniCodeCast): fixed bug 1263853,
1376           (geniCodeLogicAndOr): put result in bool or char,
1377           (geniCodeReceive): added parameter func for accessing the return type,
1378           (geniCodeFunctionBody): pass func to geniCodeReceive
1379         * src/SDCCmain.c: added indicator BitBankUsed
1380         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1381         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1382           (checkSClass): don't put automatic bool/bit on stack,
1383           (checkFunction): removed check on function cannot return bit
1384         * src/SDCCsymt.h: added newBoolLink prototype
1385         * src/mcs51/gen.c (rb1regs): added bit registers,
1386           (movc): created for assigning to carry,
1387           (pushReg, popReg): created for pushing registers,
1388           (sameRegs): check both AOP_REG and AOP_CRY types,
1389           (aopOp): handle bit registers,
1390           (aopPut): optimization no self-assign,
1391           (saveRegisters): push reg->base (bits) only once for bit registers,
1392            and use pushReg,
1393           (unsaveRegisters): pop reg->base only once and use popReg,
1394           (assignResultValue): added parameter func and return in carry for bits,
1395           (genIpush): optimization no reload in A if not changed,
1396           (genSend): bit parameters in reentrant functions are passed in bit
1397            registers by first assigning to bits in B, then save registers and
1398            copy B to bits,
1399           (genCall): handle returning in Carry properly, save it in F0 if needed,
1400           (genPcall): updated assignResultValue call, this is not safe yet for bit
1401            returning function !!!
1402           (genFunction): don't generate equ's for bit registers and use pushReg,
1403           (genEndFunction): take care of bit returning functions and use popReg,
1404           (genRet): return bit in Carry,
1405           (genIfx): optimize bit registers and other directly addressable bits,
1406           (genReceive): updated assignResultValue call
1407         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1408           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1409            registers when using stack-auto
1410         * src/mcs51/ralloc.c (_G): added allBitregs,
1411           (regs8051): added the bit registers,
1412           (createStackSpil): use macro IS_BIT,
1413           (getRegBit): added to allocate a bit register, else spill,
1414           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1415           (updateRegUsage): factored out to ease stepping while debugging,
1416           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1417            also allocate bit registers,
1418           (fillGaps): handle bit registers,
1419           (findAllBitregs): added to create bit vector with all bit registers,
1420           (mcs51_allBitregs): returns this bit vector,
1421           (mcs51_assignRegisters): when using stack-auto use bit registers for
1422            passing parameters and creating local variables
1423         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1424
1425 2005-08-22 Borut Razem <borut.razem AT siol.net>
1426
1427         * device/lib/Makefile.in: replaced find option -or with -o
1428           to make it run on solaris
1429
1430 2005-08-22 Raphael Neider <rneider AT web.de>
1431
1432         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1433           fixes #1265442 (crash on Solaris)
1434
1435 2005-08-20 Borut Razem <borut.razem AT siol.net>
1436
1437         * configure, configure.in: added tests for libsocket and libnsl libraries,
1438           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1439           from support/regression/Makefile.in
1440         * support/regression/Makefile.in: added
1441         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1442         * sim/ucsim/libtool: regenerated on sparc-solaris
1443         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1444           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1445           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1446           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1447           sparc-solaris, which doesn't use GNU ld linker
1448         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1449         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1450
1451 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1452
1453         * src/mcs51/peeph.def: updated comments
1454
1455 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1456
1457         * device/lib/_gptrget.c,
1458         * device/lib/_gptrput.c: slightly shorter
1459         * doc/sdccman.lyx: incremented version
1460         * src/mcs51/peeph.def: moved peephole comments to the line of first
1461           change to better keep line correlation, reanimated 186.e
1462         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1463
1464 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1465
1466         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1467           David Saxton with quotes around file name.
1468
1469 2005-08-15 Borut Razem <borut.razem AT siol.net>
1470
1471         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1472           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1473           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1474           make tests run on x86_64 platform
1475
1476 2005-08-13 Raphael Neider <rneider AT web.de>
1477
1478         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1479           as it might be executed DURING a build (parallel make is wonderful)
1480
1481 2005-08-13 Raphael Neider <rneider AT web.de>
1482
1483         * device/lib/Makefile.in (port-specific-objects-pic16):
1484           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1485         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1486           dependency
1487         * device/lib/pic16/Makefile.rules: build subdirs before creating
1488           the library, removed builddir rule, create $(builddir) early in
1489           recurse rule, use empty recurse rule for leaf directories
1490         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1491           mkdir errors (race condition), removed duplicate suffix "hex"
1492           from clean rules
1493         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1494         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1495           prevents mkdir -p from aborting on Alpha
1496
1497 2005-08-12 Raphael Neider <rneider AT web.de>
1498
1499         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1500           db-statements in order to allow for arrays of pointers in code
1501           sections to be placed without interspersed 0-padding, fixes
1502           bug #1256215
1503         * (emitStatistics): fixed division by zero for pic18f1220
1504         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1505           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1506         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1507         * (pic16_pCodeConstString): keep track of already emitted string
1508           literals to prevent "duplicate definitions of symbol _str_NR"
1509         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1510           debug message
1511         * device/lib/Makefile.in: ignore failing PIC16 library builds
1512         * device/lib/pic16/Makefile: do not build if gputils are missing
1513         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1514
1515 2005-08-10 Raphael Neider <rneider AT web.de>
1516
1517         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1518           my last commit)
1519
1520 2005-08-10 Raphael Neider <rneider AT web.de>
1521
1522         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1523           Rokas' patch to add the new fixed point type "__fixed16x16"
1524         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1525           functions for __fixed16x16 arithmetics
1526         * device/lib/pic16: reimplemented the build system to support
1527           a separate build directory, better handling of libio (create
1528           the library in a separate subdir for each architecture) and
1529           easier configuration (centralized in Makefile.common)
1530
1531 2005-08-07 Raphael Neider <rneider AT web.de>
1532
1533         * src/pic16/gen.c (genrshTwo): fixed sign extension
1534         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1535         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1536           added T0CONbits
1537         * device/include/pic16/pic18f4220.h: NEW, header for
1538           pic18f4220 and pic18f4320
1539         * device/include/pic16/pic18fregs.h: added new devices,
1540           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1541         * device/include/pic16/signal.h: resolved name clashes
1542           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1543           to also allow testing for interrupt enable bits, added
1544           comments on how to use the macros
1545         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1546         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1547           register definitions for the devices
1548         * device/lib/pic16/pics.all: added new devices
1549         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1550           allocated memory
1551         * device/lib/pic16/libc/stdlib/memfree: do not count
1552           the block header as free memory
1553         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1554           simplified and added missing end-of-blocklist-marker
1555           (reported by Peter Onion, fixes #1252814)
1556         * (_mergeHeapBlock): fixed loop condition
1557         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1558           len==0, restructured code
1559         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1560           up a bit, reduced bitfield accesses, prevent endless loops
1561           in case of heap corruption
1562         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1563           "unreferenced arguments/must return a value" warnings
1564         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1565           replaced BAUDREG with SPBRG
1566         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1567           device/lib/pic16/debug/gstack/gstack.c: replaced
1568           _naked, _asm, _endasm with __naked, __asm, __endasm
1569
1570 2005-08-05 Raphael Neider <rneider AT web.de>
1571
1572         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1573           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1574
1575 2005-08-05 Borut Razem <borut.razem AT siol.net>
1576
1577         * device/lib/Makefile.in: added missing ';'
1578         * configure: removed ^M characters
1579
1580 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1581
1582         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1583           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1584           License
1585
1586 2005-08-04 Borut Razem <borut.razem AT siol.net>
1587
1588         * configure.in: pic16 libraries build 2nd try - enable running
1589           configure in device/lib/pic16
1590         * configure: regenerated from configure.in
1591         * device/lib/Makefile.in: create $(PORT)/bin directory
1592
1593 2005-08-03 Raphael Neider <rneider AT web.de>
1594
1595         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1596           to get/set values via pointers
1597         * (genUnpackBits,genPackBits): changed detection of
1598           ptr->bitfield vs. sym.bitfield, fixed access via generic
1599           pointers, removed dead (wrong) code for multibyte bitfields
1600         * (genNearPointerGet, genGenPointerGet): removed useless code,
1601           fixed bitfield detection, fixes #1250594
1602         * (genNearPointerSet): removed useless code
1603         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1604           and introduced macro pic16_emitpcode that conditionally emits
1605           the origin of the following pCode (useful for debugging SDCC)
1606         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1607         * (createDefmap): fixed handling of LFSR for --optimize-df
1608
1609 2005-08-02 Borut Razem <borut.razem AT siol.net>
1610
1611         * device/lib/Makefile.in: pic16 libraries build enabled since
1612           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1613
1614 2005-08-02 Raphael Neider <rneider AT web.de>
1615
1616         * src/pic16/gen.c (genPackBits): removed deprecated warning
1617         * (genGenPointerSet): fixed bitfield detection
1618
1619 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1620
1621         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1622
1623 2005-07-31 Raphael Neider <rneider AT web.de>
1624
1625         * device/lib/pic16/libdev/pic18f458.c,
1626           device/include/pic16/pic18f458.h: added missing T0CONbits
1627
1628 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1629
1630         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1631
1632 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1633
1634         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1635
1636 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1637
1638         * device/include/mcs51/at89c51ed2.h: added.
1639
1640 2005-07-23 Raphael Neider <rneider AT web.de>
1641
1642         * src/pic/gen.h: added emitpcode macro for debugging
1643         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1644           and replace by macro adding debug information on demand
1645         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1646         * (gencjne): tried to fix; replaced with correct (slower) code
1647         * (gen{Unp,P}ackBits): fixed single bit access
1648         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1649         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1650           previous instruction
1651         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1652           register has to be handled with care (forbidding movement
1653           of assignments/uses, removing assignments completely, ...)
1654         * (pCodeOptime2pCodes): make use of regIsSpecial
1655         * added lots of debugging output (commented out)
1656         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1657           from being reused as result UNLESS it is known to work
1658
1659 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1660
1661         * support/Util/dbuf.h: include <stddef.h> for size_t
1662         * .version: changed to version 2.5.2
1663
1664 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1665
1666         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1667
1668 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1669
1670         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1671           (genModOneByte): removed needless psha/pula
1672
1673 2005-07-22 Raphael Neider <rneider AT web.de>
1674
1675         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1676           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1677         * src/pic/gen.c (resolveIfx): do not "invent" labels
1678         * (genSkipc): changed to positive logic
1679         * (genSkipCond): removed as no longer needed
1680         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1681           backport from PIC16
1682         * (genLeftShift): check operands are in different registers
1683         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1684           INCF does not update CARRY...
1685         * src/pic/main.c: fixed _linkCmd
1686         * src/pic/pcode.c (unlinkpCode): added inactive code
1687         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1688           alive (do not assign result and operand overlapping registers)
1689
1690 2005-07-22 Raphael Neider <rneider AT web.de>
1691
1692         * src/pic/device.c (dump_sfr): replaced register declaration with
1693           call to emitSymbolToFile() to avoid duplicate symbols
1694         * (assignRelocatableRegisters): do not declare external symbols
1695         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1696           right (take size of type, not etype)
1697         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1698         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1699         * (packRegsForAccUse): disabled assignment of WREG as
1700           the result reg to prevent occurence of just fixed #1235003,
1701           fixes #1242954
1702         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1703           symbols (avoids duplicate symbols in .asm file)
1704         * (pic14emitRegularMap): use emitSymbolToFile()
1705         * src/pic/gen.c (aopOp): fixed spillLocation handling
1706         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1707         * (genDataPointerSet): removed unneccessary variables/output
1708
1709 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1710
1711         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1712         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1713
1714 2005-07-21 Raphael Neider <rneider AT web.de>
1715
1716         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1717           architecture cannot handle them efficiently, fixes bug #1235003
1718         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1719           check for empty sets before using them (fixes bug #1232190)
1720
1721 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1722
1723         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1724           (lnksect2): generate warnings for memory overlap
1725         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1726           constseg to set the name of these segments so you can instruct the linker
1727           to place them in banks
1728         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1729         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1730           added code_seg and const_seg to options
1731         * src/SDCCglue.c (emitMaps): use options.const_seg,
1732           (createInterruptVect): put interrupt vectors in segment HOME,
1733           (glue): put HOME before static segment and put the main glue in HOME,
1734           (glue): use options.code_seg
1735         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1736         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1737           these segments so you can instruct the linker to place them in banks
1738           (linkEdit): use code_loc for HOME segment which should be the first
1739           segment in code memory now
1740         * src/SDCCmem.c: fixed more stuff like bug 1238386
1741         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1742           (changePointer): don't change function pointers to code pointers for
1743           banked functions,
1744           (compareType): added exceptional check for banked function pointers
1745         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1746         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1747           after static in code memory
1748         * src/mcs51/gen.c: added aopLiteralLong prototype,
1749           (aopForSym): use getSize for functions,
1750           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1751           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1752           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1753           the segment,
1754           (genPcall): use call for literal function pointers and generate banked
1755           calls over the one trampoline so there's only one place for the user to
1756           modify according to his/hers hardware,
1757           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1758           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1759         * src/mcs51/main.c: added keyword banked,
1760           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1761         * support/Util/SDCCerr.c,
1762         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1763           needed for passing the bank and address to the trampoline
1764         * device/lib/mcs51/crtbank.asm: added for bankswitching
1765         * device/lib/mcs51/Makefile: added crtbank
1766
1767 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1768
1769         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1770           for fields at offset 0 of a struct or union as reported
1771           on 2005-07-07 in the developer mailing list.
1772
1773 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1774
1775         * src/SDCCmem.c: fixed bug 1238386
1776
1777 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1778
1779         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1780           (patch #1144962), added peephole 300, enabled 259.x
1781         * doc/sdccman.lyx: removed screenshot and provided link instead
1782
1783 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1784
1785         * doc/sdccman.lyx: added section about debugging with ddd
1786         * doc/figures/ddd_example.eps: screenshot of debugging session
1787
1788 2005-07-04 Raphael Neider <rneider AT web.de>
1789
1790         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1791           like CODE pointers, fixes #1115683
1792         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1793           call, fixes bugs #1232211, #1228110,
1794           fixed wrong casts to pCodeFlow from pCodeInstructions
1795
1796 2005-07-04 Raphael Neider <rneider AT web.de>
1797
1798         * src/pic/gen.c (popGet): changed assert to allow for
1799           bit operands
1800         * (popGetAddr): changed signature to provide
1801           an additional index, patched all call sites
1802         * (genCmpEq): handle literal-like operands correctly
1803         * (genAddrOf): added sanity checks on __code/__data pointers
1804         * (genAssign): added handling of symbols from __code section
1805         * (gencjne): do not generate code for comparisons whose result
1806           is neither stored nor used, fixes bug #1171114
1807         * (AccLsh, AccRsh): operate on operand instead of WREG
1808         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1809           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1810           by known count
1811         * rewrote complete shift-by-literal logic, commented unused
1812           functions out
1813         * (genConstPointerGet): get multiple bytes (if result size > 1),
1814           fixed handling of non-immediate addresses
1815         * (genPointerGet): handle CODE pointers like CONST pointers
1816         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1817         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1818           operand is to be treated as a literal or not
1819         * (mov2w,genPcall,genCmpEq),
1820           src/pic/genarith.c: use aop_isLitLike() to decide between
1821           literal/register contents
1822         * (addSign): added missing offset
1823         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1824           only emit comment in debug-mode,
1825           use {aop,op}_isLitLike throughout the file
1826         * src/pic/glue.c: fix initializers for pointers (work in progress)
1827         * src/pic/pcode.c (get_op): honor index on _const symbols
1828         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1829         * (dumppBlock): added pCode size estimation
1830         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1831           check for IS_SYMOP before OP_SYMBOL'ing
1832         * fixed indentation, compacted switch-statements
1833         * (allocReg): find free register and allocate it instead of
1834           allocating new registers all the time
1835         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1836           registers as its operands (necessary only for multibyte GETs)
1837
1838 2005-07-01 Raphael Neider <rneider AT web.de>
1839
1840         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1841           debugging .asm-output macros FENTRY + FEXIT
1842         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1843           way... I wonder...
1844         * (emitpComment): NEW, printf to pCode
1845         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1846           offset handling
1847         * (popGetAddr): NEW, variant of popGet to access an immediates
1848           high(er) bytes instead of the n'th byte of memory they reference,
1849           replaced popGet with popGetAddr where neccessary
1850         * (genDataPointerGet): reactivated and fixed implementation
1851         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1852           accesses
1853         * (genDataPointerSet): fixed multibyte assignments
1854         * (genpic14Code): fixed --i-code-in-asm handling
1855         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1856         * (genPlus): fixed index-out-of-bounds error
1857         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1858         * src/pic/ralloc.c: added debugging output macro FENTRY2
1859         * (spillThis): fixed indentation, enbraced for-body for clarity
1860         * (rematStr): commented out as now unused
1861         * (regTypeNum): commented out special spill case (overwrites
1862           arbitrary values)
1863         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1864
1865 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1866
1867         * doc/sdccman.lyx: documented sfr16/sfr32,
1868           added example for using storage class with function pointers
1869         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1870
1871 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1872
1873         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1874         * device/lib/_itoa.c,
1875         * device/lib/_ltoa.c: optimized codesize
1876         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1877           but don't know how to suppress the double warning.
1878         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1879         * support/Util/SDCCerr.c,
1880         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1881
1882 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1883
1884         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1885           fixed old K&R prototypes
1886         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1887         * device/lib/_gptrget.c,
1888         * device/lib/_gptrgetc.c,
1889         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1890           also new versions for small generic pointers and banked generic pointers
1891         * src/port.h: added const_name
1892         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1893         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1894         * src/SDCCcse.c (findPrevIc): check all associative operators
1895         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1896         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1897         * src/SDCCmem.c: updated comments,
1898           set far-space to 0 for pdata, results in optimized code
1899         * src/SDCCmem.h: added macro CONST_NAME
1900         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1901           moving the info into the highest bits, see also gptrget/gptrput
1902         * src/src.dsp: added sdcc.ico to project files
1903         * src/avr/gen.c (genCast): fixed bug 0x%d
1904         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1905         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1906           relation between ptr_type and DCL_TYPE,
1907           (genCast): fixed bug 0x%d
1908         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1909           (CODE)" for const_name
1910         * src/hc08/gen.c (genCast): fixed bug 0x%d
1911         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1912           (hc08_port): added "CONST (CODE)" for const_name
1913         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1914           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1915           between ptr_type and DCL_TYPE,
1916           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1917           operand* and took AOP() inside function so sfr-ness can be checked,
1918           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1919           new prototype,
1920           (genFunction, genEndFunction): optimized stack setup,
1921           (genMinus): optimized for literals with ending zeroes (in bytes),
1922           (genCast): fixed bug 0x%d
1923         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1924           (mcs51_port): added "CONST (CODE)" for const_name
1925         * src/mcs51/peeph.def: made rule 226 more generic
1926         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
1927         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
1928         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
1929         * src/z80/main.c (z80_port): added NULL for const_name,
1930           (gbz80_port): added NULL for const_name
1931         * support/regression/tests/bug663539.c,
1932         * support/regression/tests/sfr16.c: new tests
1933
1934 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1935
1936         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
1937
1938 2005-06-24 Raphael Neider <rneider AT web.de>
1939
1940         * device/lib/pic16/libdev/pic18f[68][567]20.c:
1941           corrected typos...
1942         * device/include/pic16/signal.h: added USBIF
1943           and SIG_USB
1944
1945 2005-06-24 Raphael Neider <rneider AT web.de>
1946
1947         * device/lib/pic16/libdev/pic18f2455.c,
1948           device/include/pic16/pic18f2455.h: NEW
1949         * device/include/pic16/pic18fregs.h,
1950           device/lib/pic16/pics.all,
1951           src/pic16/device.c: added 18f2455
1952         * device/lib/pic16/libdev/pic18f[68][567]20.c,
1953           device/include/pic16/{pic18f[68][567].h,usart.h}:
1954           replaced MULTIPLE_USARTS define with more relaible
1955           compatibility sfrs (for USART access)
1956
1957 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
1958
1959         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
1960           and the output asm file line is printed on two lines.
1961
1962 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1963
1964         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
1965           BGT, BLE, BHI, and BLS instructions
1966         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
1967           genCmpEq): removed
1968         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
1969           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
1970           fixes bug #1216342
1971         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
1972
1973 2005-06-15 Raphael Neider <rneider AT web.de>
1974
1975         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
1976         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
1977         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
1978           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
1979           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
1980
1981 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1982
1983         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
1984           Marcel Telka in bug #1215704
1985
1986 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
1987
1988         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
1989           located in shared memory bank.
1990
1991 2005-05-31 Raphael Neider <rneider AT web.de>
1992
1993         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
1994           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
1995           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
1996
1997 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
1998
1999         * device/lib/_strncpy.c: fixed the fix
2000
2001 2005-05-26 Raphael Neider <rneider AT web.de>
2002
2003         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2004           initializers with \0, bug #1208187
2005         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2006           intializers with \0, bug #1208187
2007
2008 2005-05-26 Raphael Neider <rneider AT web.de>
2009
2010         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2011           initializers with \0, bug #1208187
2012         * src/pic16/main.c (_process_pragma): added sanity checks
2013           for stack position and size, emit warnings when appropriate
2014
2015 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2016
2017         * device/lib/_strncpy.c: fixed not filling with \0
2018
2019 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2020
2021         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2022           createFunction),
2023         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2024           compound_statement),
2025         * src/SDCCsymt.h,
2026         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2027
2028 2005-05-24 Raphael Neider <rneider AT web.de>
2029
2030         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2031
2032 2005-05-24 Raphael Neider <rneider AT web.de>
2033
2034         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2035           TRISE definitions, closes bug #1162453
2036
2037 2005-05-22 Raphael Neider <rneider AT web.de>
2038
2039         * src/pic16/main.c (_process_pragma): check for missing
2040           arguments to pragmas code and udata
2041         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2042           consistency fixes to match other headers (thanks to Jim Paris)
2043         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2044
2045 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2046
2047         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2048
2049 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2050
2051         * support/regression/tests/bug1198642.c: new test
2052         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2053         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2054         * support/scripts/resource.h,
2055         * support/scripts/resource.rc,
2056         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2057         * support/scripts/sdcc.ico: added 32x32 icon
2058
2059 2005-05-18 Raphael Neider <rneider AT web.de>
2060
2061         * device/lib/pic16/libdev/pic18f*.c,
2062         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2063           keywords to "__sfr" and "__at (X)"
2064         * device/include/pic16/pic18fregs.h: added pic18f4520
2065         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2066           #1203088 (MPLAB compatibility)
2067
2068 2005-05-17 Raphael Neider <rneider AT web.de>
2069
2070         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2071         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2072         * device/lib/pic16/pics.all: added new devices
2073         * src/pic16/device.c: added support for pic18f4520
2074
2075 2005-05-16 Raphael Neider <rneider AT web.de>
2076         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2077         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2078         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2079           convenience function for bit access
2080
2081 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2082
2083         * device/lib/printf_large.c: fixed bug 1193299
2084         * support/regression/tests/bug1057979.c: added test %3.3s
2085
2086 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2087
2088         * device/include/mcs51/8051.h,
2089         * device/include/mcs51/8052.h: made parseable with lint
2090         * device/include/mcs51/lint.h: added include file for (sp)lint
2091         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2092         * doc/cdbfileformat.lyx,
2093         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2094
2095 2005-05-14 Raphael Neider <rneider AT web.de>
2096
2097         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2098         * device/lib/pic16/libc/stdlib/itoa.c (new)
2099         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2100         * device/lib/pic16/libio/Makefile: exclude subdir according to
2101           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2102         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2103         * src/pic16/gen.c (genFunction): prevent annoying warning
2104         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2105           nameclashes on BeOS
2106         * support/cpp2/cppmain.c (cpp_output_string): new
2107         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2108           fixes bug 1116802
2109
2110 2005-05-13 Borut Razem <borut.razem AT siol.net>
2111
2112         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2113
2114 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2115
2116         * .version: changed to version 2.5.1; back to bleeding edge development
2117
2118 2005-05-11 Borut Razem <borut.razem AT siol.net>
2119
2120         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2121           generate PDF version 1.3 documents
2122
2123 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2124
2125         * .version: changed to version 2.5.0
2126
2127 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2128
2129         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2130
2131 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2132
2133         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2134         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2135         well as many smaller updates.
2136         * .version: changed to version 2.5.0-pre1
2137
2138 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2139
2140         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2141
2142 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2143
2144         * support/regression/tests/bug1185672.c: added
2145         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2146           bug 1185672
2147         * src/mcs51/gen.c (genCall): added comments, made it look safer
2148         * src/mcs51/gen.c (genEndFunction): simplified
2149
2150 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2151
2152         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2153
2154 2005-04-14 Borut Razem <borut.razem AT siol.net>
2155
2156         * fixed bug 1045046 - SIGSEGV with really simple code?:
2157           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2158           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2159
2160 2005-04-14 Borut Razem <borut.razem AT siol.net>
2161
2162         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2163           src/pic16/device.h: temporarily disabled experimental #inline pragma
2164           for 2.5.0 release
2165
2166 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2167
2168         * device/include/z80/stdio.h,
2169         * device/include/z80/string.h: removed these highly incomplete files so
2170           SDCC can use the default ones in device/include/
2171
2172 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2173
2174         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2175         gcc warning.
2176         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2177         fix sdcpp warnings.
2178
2179 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2180
2181         * device/include/malloc.h: removed redundant __reentrant prototypes
2182         * device/lib/_mullong.c: added working xstack variant in asm (C version
2183           doesn't pass regression tests)
2184         * device/lib/bpx.c: used __data and made bpx char for mcs51
2185         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2186           (createFunction): fixed bug with xstackPtr
2187         * src/SDCCcse.c: corrected comments
2188         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2189           (killDeadCode, eBBlockFromiCode): removed unused code
2190         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2191           corrected comments
2192         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2193           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2194           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2195           (genModOneByte): fixed warning in MSVC
2196         * src/mcs51/main.c (): added comments
2197         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2198
2199 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2200
2201         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2202
2203 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2204
2205         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2206
2207 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2208
2209         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2210         characters arrays of larger size than the declared one.
2211
2212 2005-04-10 Borut Razem <borut.razem AT siol.net>
2213
2214         * src/pic/gen.c (genInline),
2215           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2216           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2217           (findNextInstruction), (findPrevInstruction),
2218           (findInstructionUsingLabel),
2219           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2220         * src/pic/pcode.c (findLabel): added missing '\n'
2221         * src/src.dsp: added SDCCdwarf2.c to the project
2222
2223 2005-04-09 Borut Razem <borut.razem AT siol.net>
2224
2225         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2226
2227 2005-04-08 Raphael Neider <rneider AT web.de>
2228
2229         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2230           into the chain after a given one) and mergeDefmapSymbols (combine
2231           defmap entries for each symbol per pcode)
2232         * (createDefmap): have defmap entries merged in the end
2233         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2234           a symbol before replacing one access type's symbol, merge symbols in
2235           the end (replacement symbol might already have an entry)
2236         * (assignValnums): keep reference to written WREG intact
2237
2238 2005-04-08 Raphael Neider <rneider AT web.de>
2239
2240         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2241           Alpha)
2242
2243 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2244
2245         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2246         bytes
2247
2248 2005-04-07 Raphael Neider <rneider AT web.de>
2249
2250         * device/include/pic16/usart.h: added compatibility defines for
2251           devices with more than one USART
2252         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2253
2254 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2255
2256         * device/lib/Makefile.in: updated for port specific include
2257
2258 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2259
2260         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2261
2262 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2263
2264         * device/include/8051.h,
2265         * device/include/8052.h,
2266         * device/include/at89S8252.h,
2267         * device/include/at89c55.h,
2268         * device/include/at89x051.h,
2269         * device/include/at89x51.h,
2270         * device/include/at89x52.h,
2271         * device/include/mcs51reg.h,
2272         * device/include/reg51.h,
2273         * device/include/reg764.h,
2274         * device/include/regc515c.h,
2275         * device/include/sab80515.h: (re)moved these 12 files
2276         * device/include/mcs51/8051.h,
2277         * device/include/mcs51/8052.h,
2278         * device/include/mcs51/at89S8252.h,
2279         * device/include/mcs51/at89c55.h,
2280         * device/include/mcs51/at89x051.h,
2281         * device/include/mcs51/at89x51.h,
2282         * device/include/mcs51/at89x52.h,
2283         * device/include/mcs51/mcs51reg.h,
2284         * device/include/mcs51/reg51.h,
2285         * device/include/mcs51/reg764.h,
2286         * device/include/mcs51/regc515c.h,
2287         * device/include/mcs51/sab80515.h: and added them here
2288
2289 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2290
2291         * device/include/stdarg.h: changed SDCC specific keywords to double
2292           underlined form.
2293         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2294           mcs51 and ds390.
2295         * device/include/hc08/mc68hc908gp32.h,
2296         * device/include/hc08/mc68hc908jb8.h,
2297         * device/include/hc08/mc68hc908jkjl.h,
2298         * device/include/hc08/mc68hc908qy.h: fixed comments
2299         * device/include/mcs51/README: updated
2300         * device/include/mcs51/c8051f120.h: added PINRSF
2301         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2302         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2303           amidst code. Also inline is not supported.
2304
2305 2005-04-06 Raphael Neider <rneider AT web.de>
2306
2307         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2308         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2309           callers stack/frame pointers
2310
2311 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2312
2313         * device/include/pic16/usart.h: added, missing in previous commit,
2314         * device/include/pic16/adc.h: fixed typo,
2315         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2316         commit,
2317         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2318         <p18fxxx.inc>
2319         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2320         uninitialized because a bug appears with gplink
2321         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2322         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2323         complains for unrecognised option
2324
2325 2005-04-05 Raphael Neider <rneider AT web.de>
2326
2327         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2328           structs as well (using memcpy)
2329         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2330           on ISRs (GOTO has no label)
2331         * src/pic16/device.h: added OF_OPTIMIZE_DF
2332         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2333           new data flow analysis/optimization
2334         * src/pic16/pcode.c: added (prototypes for and implementation of)
2335           dataflow analysis functions, fixed pCodeInstructions' inCond and
2336           outCond values, made RCALL a branch instruction
2337         * (pic16_unlinkpCode): keep C line if possible
2338         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2339           C line moved if possible
2340         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2341         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2342           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2343         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2344           new flow)
2345         * (pic16_getJumptabpCode): NEW, needed in...
2346         * (LinkFlow): fixed handling of jumptables, calls and conditional
2347           branches
2348         * (pic16_InsertCommentAfter): NEW
2349         * (pic16_pCodeReplace): made verbose and flow preserving
2350         * (AnalyzeFlow): added call to data flow analysis
2351         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2352         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2353         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2354
2355 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2356
2357         * src/SDCCast.c (decorateType): fixed bug #1105626
2358
2359 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2360
2361         * device/include/asm/pic16/features.h,
2362         * pic18f*.h headers,
2363         * device/include/pic16/adc.h,
2364         * device/include/pic16/delay.h,
2365         * device/include/pic16/i2c.h,
2366         * device/include/pic16/malloc.h,
2367         * device/include/pic16/stdio.h,
2368         * device/include/pic16/stdlib.h,
2369         * device/include/pic16/string.h,
2370         * device/lib/pic16/libc/stdio/printf_tiny.c,
2371         * device/lib/pic16/libc/stdio/printf_small.c,
2372         * device/lib/pic16/libc/stdio/strmgpsim.c,
2373         * device/lib/pic16/libc/stdio/strmmssp.c,
2374         * device/lib/pic16/libc/stdio/strmusart.c,
2375         * device/lib/pic16/libc/stdio/vfprintf.c,
2376         * device/lib/pic16/libc/stdlib/ltoa.c,
2377         * device/lib/pic16/libc/stdlib/putchar.c,
2378         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2379         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2380         * device/lib/pic16/libc/stdlib/memchrram.c,
2381         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2382         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2383         * device/lib/pic16/libio/adc/adcbusy.c,
2384         * device/lib/pic16/libio/adc/adcread.c,
2385         * device/lib/pic16/libio/adc/adcsetch.c,
2386         * device/lib/pic16/libio/usart/ubaud.c,
2387         * device/lib/pic16/libio/usart/ubusy.c,
2388         * device/lib/pic16/libio/usart/udrdy.c,
2389         * device/lib/pic16/libio/usart/uopen.c,
2390         * device/lib/pic16/libio/usart/uputc.c,
2391         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2392         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2393         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2394         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2395         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2396         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2397         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2398         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2399         specific keywords to double underlined form,
2400         * device/lib/pic16/libc/Makefile.rules,
2401         * device/lib/pic16/libsdcc/Makefile.rules,
2402         * device/lib/pic16/libm/Makefile,
2403         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2404         to compile with C standard set in Makefile.common
2405         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2406         rand.c and crc.c in compilation process,
2407         * device/lib/pic16/libsdcc/int/divuint.c,
2408         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2409         `c' from signed to unsigned,
2410         * device/lib/pic16/startup/crt0.c,
2411         * device/lib/pic16/startup/crt0i.c,
2412         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2413         keywords to double underlined form, bug fixes in _do_cinit function
2414         which prevented the correct initialization of the .idata segment,
2415         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2416         core to enter a infinite loop
2417         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2418
2419 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2420
2421         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2422
2423 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2424
2425         * device/include/Makefile.in: add support for hc08 subdirectory
2426         * device/include/hc08/: new subdirectory
2427         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2428         Lucas Loizaga, thanks!
2429         * device/include/hc08/mc68hc908qy.h,
2430         * device/include/hc08/mc68hc908gp32.h,
2431         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2432         their own directory. Changed internal macro names to use the compiler
2433         reserved namespace. Changed SDCC specific keywords to double
2434         underlined form.
2435         * device/include/math.h,
2436         * device/include/malloc.h,
2437         * device/include/stdarg.h,
2438         * device/include/stdbool.h
2439         * device/include/string.h,
2440         * device/include/tinibios.h,
2441         * device/include/ds400rom.h,
2442         * device/include/8051.h,
2443         * device/include/8052.h,
2444         * device/include/80c51xa.h,
2445         * device/include/at89c55.h,
2446         * device/include/at89S8252.h,
2447         * device/include/at89x51.h,
2448         * device/include/at89x52.h,
2449         * device/include/ds80c390.h,
2450         * device/include/reg764.h,
2451         * device/include/regc515c.h,
2452         * device/include/sab80515.h,
2453         * device/include/mcs51/c8051f000.h,
2454         * device/include/mcs51/c8051f018.h,
2455         * device/include/mcs51/c8051f020.h,
2456         * device/include/mcs51/c8051f040.h,
2457         * device/include/mcs51/c8051f060.h,
2458         * device/include/mcs51/c8051f120.h,
2459         * device/include/mcs51/c8051f300.h,
2460         * device/include/mcs51/c8051f310.h,
2461         * device/include/mcs51/c8051f320.h,
2462         * device/include/mcs51/c8051f330.h,
2463         * device/include/mcs51/c8051f350.h,
2464         * device/include/z180.h: Changed SDCC specific keywords to double
2465         underlined form.
2466
2467 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2468
2469         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2470         18F4455,
2471         * (pic16_assignConfigWordValue): disable testing of configuration
2472         register value with config mask,
2473         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2474         function with port->fun_prefix,
2475         * (genFunction): when generating a naked interrupt function never
2476         create an absolute segment placed in interrupt vector address, place
2477         the actual interrupt function at IVA instead, when an interrupt
2478         function is generated with unspecified interrupt then do not create
2479         the absolute section,
2480         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2481         code for generating a call to generic pointer get/put function with
2482         a call to function pic16_callGenericPointer(),
2483         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2484         the call to the generic pointer get/put functions with prefixing the
2485         function name with port->fun_prefix,
2486         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2487         * src/pic16/main.c (_process_pragma): prefix function with
2488         port->fun_prefix,
2489         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2490         calling assembler, old 18Fxxxx macro is deprecated,
2491         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2492         PC_ASMDIR in while condition,
2493         * (findInstruction): add PC_ASMDIR in while condition,
2494         * (buildCallTree): prefix main with port->fun_prefix,
2495         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2496         identifier for variable with banked access in instructions BTFSS,
2497         BTFSC, BCF, BSF, BTG
2498         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2499         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2500         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2501         perform optimization when enviroment variable NO_REG_OPT is set,
2502         * (insideLRBlock): NEW, return 1 if register is inside an
2503         INF_LOCALREGS block,
2504         * (RemoveRegFromLRBlock): remove a register that is completely
2505         eliminated by register optimization, but it is still left in local
2506         register store/restore in/from stack block,
2507         * (Remove2pcodes): after removing register, check to see if it
2508         should be removed from local register store/restore in/from stack
2509         block,
2510         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2511         DUMMY_READ_VOLATILE,
2512
2513         * device/include/pic16/adc.h: minor prototype modifications and
2514         update,
2515         * device/include/pic16/malloc.h: added GPL notice various
2516         modifications,
2517         * device/include/pic16/stdint.h: NEW, standard header for ints
2518         * device/include/pic16/delay.h: NEW, header for delay functions,
2519         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2520         delay1mtcy,
2521         * device/include/pic16/signal.h: NEW, header providing helper macros
2522         for implementing signal handlers,
2523         * device/include/pic16/stdio.h: added prototypes for functions,
2524         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2525         prototypes for stdin and stdout, added macro PUTCHAR to
2526         automatically implement putchar function prototype,
2527         * device/include/pic16/usart.h: modified and updated USART library,
2528         * device/lib/pic16/libio/adc/,
2529         * device/lib/pic16/libio/i2c: some modifications to improve library
2530         performance,
2531         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2532         family of functions,
2533         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2534         family of functions and other sources,
2535         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2536         of the PIC18Fxx[28] devices,
2537         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2538         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2539         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2540         _do_cinit function, because the previous failed when local variables
2541         where not placed in the same memory bank,
2542         * device/lib/pic16/libsdcc/char/: various modifications to improve
2543         library performance,
2544         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2545         information on the new functions of the c library and more...
2546
2547 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2548
2549         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2550
2551 2005-03-26 Raphael Neider <rneider AT web.de>
2552
2553         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2554           if condition == CARRY)
2555         * (genCmp): adapted to new genSkipc semantics
2556         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2557           on rIfx (genCmp was broken)
2558
2559 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2560
2561         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2562         * src/z80/main.c (_keywords[]),
2563         * src/SDCCglobal.h (struct options),
2564         * src/SDCC.y,
2565         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2566         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2567         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2568         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2569         always available in leading double underscore form. The C99 support is
2570         mostly missing, but it's a start.
2571         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2572         reserved identifier "__data".
2573
2574 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2575
2576         * src/mcs51/peeph.def: fixed bug 1170013
2577
2578 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2579
2580         * device/include/mcs51reg.h: fixed bug 842007
2581
2582 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2583
2584         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2585         last time.
2586
2587 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2588
2589         * src/port.h (struct PORT),
2590         * src/avr/ralloc.c (avr_assignRegisters),
2591         * src/avr/main.c,
2592         * src/ds390/ralloc.c (ds390_assignRegisters),
2593         * src/ds390/main.c,
2594         * src/hc08/ralloc.c (hc08_assignRegisters),
2595         * src/hc08/main.c,
2596         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2597         * src/mcs51/main.c,
2598         * src/pic/ralloc.c (pic14_assignRegisters),
2599         * src/pic/main.c,
2600         * src/pic16/ralloc.c (pic16_assignRegisters),
2601         * src/pic16/main.c,
2602         * src/xa51/ralloc.c (xa51_assignRegisters),
2603         * src/xa51/main.c,
2604         * src/z80/ralloc.c (z80_assignRegisters),
2605         * src/z80/ralloc.h,
2606         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2607         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2608         * src/SDCCcse.h,
2609         * src/SDCCdflow.c (computeDataFlow),
2610         * src/SDCCdflow.h,
2611         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2612         * src/SDCCloop.h,
2613         * src/SDCCcflow.c (*),
2614         * src/SDCCcflow.h,
2615         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2616         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2617         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2618         immedDom() returning wrong block; probably fixes bug #1160833)
2619
2620 2005-03-20 Borut Razem <borut.razem AT siol.net>
2621
2622         * support/scripts/inc2h.pl: WIN32 port
2623
2624 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2625
2626         * device/lib/makefile.in: added abs.c and labs.c
2627
2628 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2629
2630         * device/include/stdint.h: added
2631         * device/lib/abs.c: added
2632         * device/lib/labs.c: added
2633         * device/include/stdlib.h: added abs() and labs() prototypes
2634         * device/lib/libsdcc.lib: added abs and labs
2635         * device/include/float.h,
2636         * device/lib/_fsmul.c,
2637         * device/lib/printf_fast.c,
2638         * device/lib/printf_tiny.c: updated comments
2639
2640 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2641
2642         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2643         bug #1164313
2644
2645 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2646
2647         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2648         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2649
2650 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2651
2652         * device/lib/printf_large.c: removed inline assembly for portability and
2653           readability. Use printf_fast if speed or size are more important.
2654         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2655         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2656
2657 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2658
2659         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2660         prevent compiler warning
2661
2662 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2663
2664         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2665         moved to level 0 and declared as static. Also they are explicit
2666         placed in access bank. This was necessery because some times they
2667         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2668         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2669         optimizations. Currently only compare to unsigned char is implemented,
2670         * src/pic16/gen.c: added fReturnIdx array,
2671         * (struct resolvedIfx) is moved to gen.h and made public,
2672         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2673         * (aopForSym): added an optimization to directly store in stack of
2674         the operand of a SEND iCode,
2675         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2676         but as registers instead (AOP_REG) using the fReturnIdx array,
2677         * (pic16_freeAsmop): remove the freed register from the
2678         _G.sregsAlloc field,
2679         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2680         a compare of 'WREG',
2681         * (pic16_popGetTempRegCond): changed function prototype, now
2682         function takes also a bitVector argument v which holds the current
2683         set of registers that are allocated for stack access by aopForSym,
2684         registers allocated in aopForSym for accessing stack symbols are not
2685         any more part of the functions usedRegs field,
2686         * (genCall): some times aopOp is called for a stack variable to be
2687         send, aopForSym might perform the push, if this is true make sure
2688         that genCall doesn't push the variable twice by testing _G.resDirect,
2689         * (genFunction): changed testing for unspecified interrupt number
2690         from 256 to INTNO_UNSPEC,
2691         * modified selection scheme of frame pointer generation. Previously
2692         if function did use local registers a frame pointer was generated,
2693         now a frame pointer is generated only if function has arguments
2694         (that need PLUSW2 register access), or has stack arguments, or the
2695         compiler is not instructed to omit the frame pointer,
2696         * (genEndFunction): before restoring local registers that were saved
2697         in the function preamble, also restore the registers that *might*
2698         have been allocated for stack access,
2699         * (genRet): removed some old comments,
2700         * (genCmp, the active (RN's) version): added a call to the
2701         pic16_genCmp_special function to perform the compare with a more
2702         robust and optimized way,
2703         * (genInline): a feature has been added in inline code generation,
2704         which allows a wildcard variable substitution when writing inline
2705         assembly. Code is incomplete and experimental therefore undocumented,
2706         * (genCast): changed order of aopOp for result and right to allow
2707         aopForSym to directly load the result if possible,
2708         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2709         perform an optimized compare on some selected special occasions,
2710         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2711         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2712         generate an IVT any more,
2713         * src/pic16/main.c (pic16_optionsTable): added command line option
2714         --optimize-cmp,
2715         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2716         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2717         macros,
2718         * src/pic16/NOTES: Raphael Neider added in list of active developers
2719         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2720         jumptable_end to prevent bug #,
2721         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2722         inCond and outCond fields,
2723         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2724         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2725         turn off register spilling,
2726         * (packRegsForOneUse): synced with other ports' versions although it
2727         is not used currently,
2728         * (pic16_packRegisters): added an optimization while reading
2729         structure bitfields, some registers may be saved (malloc code is
2730         decreased by 80 bytes)
2731
2732 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2733
2734         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2735         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2736         this can be optimized more?
2737
2738 2005-03-10 Raphael Neider <rneider AT web.de>
2739
2740         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2741           genNearPointerGet): (hopefully) fixed access to bitfields via
2742           pointers (p->bitN = x; and x = p->bitN; failed)
2743
2744 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2745
2746         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2747
2748 2005-03-09 Raphael Neider <rneider AT web.de>
2749
2750         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2751
2752 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2753
2754         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2755         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2756           (regTypeNum): set REG_BIT type if necessary
2757         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2758         * support/regression/tests/critical.c: check bug 1144613
2759
2760 2005-03-02 Raphael Neider <rneider AT web.de>
2761
2762         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2763
2764 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2765
2766         * src/avr/ralloc.c (serialRegAssign),
2767         * src/ds390/ralloc.c (serialRegAssign),
2768         * src/hc08/ralloc.c (serialRegAssign),
2769         * src/mcs51/ralloc.c (serialRegAssign),
2770         * src/pic/ralloc.c (serialRegAssign),
2771         * src/pic16/ralloc.c (serialRegAssign),
2772         * src/xa51/ralloc.c (serialRegAssign),
2773         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2774
2775 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2776
2777         * src/SDCCast.c (decorateType): fixed bug 1124787
2778
2779 2005-02-20 Hubert Sack <sack AT digiplan.de>
2780         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2781
2782         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2783         patch #1121755
2784
2785 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2786
2787         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2788         to keep the correct label reference count when adding/removing references
2789         to labels. A peephole file using this is appended to patch #1144962.
2790
2791 2005-02-14 Raphael Neider <rneider AT web.de>
2792
2793         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2794         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2795         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2796           retrievals of result operand's value on assignment
2797
2798 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2799
2800         * device/include/pic16/string.h: modified prototype for memccpy()
2801         to memccpy(void *, void *, char, size_t)
2802         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2803         check whether to omit frame pointer or not,
2804         * (genInline): convert all occurences of "\n" to LF in inline
2805         assembler blocks, this helps formatting the inline text,
2806         * (pic16_loadFSR0): modified prototype,
2807         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2808         removed some 8051 legacy code,
2809         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2810         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2811         before allocating temporary registers in functions,
2812
2813 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2814
2815         * support/regression/tests/bitvars.c: corrected the "fix"
2816
2817 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2818
2819         * support/regression/tests/bitvars.c,
2820         * support/regression/tests/bitwise.c,
2821         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2822
2823 2005-02-10 Raphael Neider <rneider AT web.de>
2824
2825         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2826           different size for Alpha
2827         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2828
2829 2005-02-09 Raphael Neider <rneider AT web.de>
2830
2831         * src/SDCC.lex(doPragma) : save and restore warning options as well
2832           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2833         * have #pragma less_pedantic set the errorlevel to WARNING
2834           (fixes #1117001)
2835         * (cloneOptimize) : fixed wrong malloc's size
2836         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2837           facilitate correct handling of #pragma (save|restore)
2838
2839 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2840
2841         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2842
2843 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2844
2845         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2846
2847 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2848
2849         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2850
2851 2005-02-02 Raphael Neider <rneider AT web.de>
2852
2853         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2854         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2855         * (pic16_storeForReturn): fixed to allow returning function pointers
2856         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2857         * device/include/pic16/{stddef.h,stdbool.h}: added
2858
2859 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2860
2861         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2862
2863 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2864
2865         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2866         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2867          appeared to be required
2868
2869 2005-01-31 Borut Razem <borut.razem AT siol.net>
2870
2871         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2872           include/mcs51 and include/z80 directories to the package
2873
2874 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2875
2876         * src/hc08/gen.c (genFunction): fixed bug #1112752
2877
2878 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2879
2880         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2881
2882 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2883
2884         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2885
2886 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2887
2888         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2889
2890 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2891
2892         * device/include/c8051fxxx.h: removed these 6 files
2893         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2894
2895 2005-01-26 Raphael Neider <rneider AT web.de>
2896
2897         * src/pic16/gen.c (genAssign): fixed assignment from longs
2898           in codespace (were cut to three bytes)
2899         * (genDummyRead): implemented (except for CODESPACE...),
2900           fixed bug #1108575
2901         * src/pic16/glue.c (emitStatistics): beautified
2902         * device/lib/pic16/libm/Makefile: added include path
2903
2904 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2905
2906         * src/z80/gen.c (aopPut): fixed bug #1103902
2907
2908 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2909
2910         * device/lib/expf.c: fixed bug #1095792
2911
2912 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2913
2914         * device/lib/pic16/libm: added Math library sources
2915
2916 2005-01-24 Raphael Neider <rneider AT web.de>
2917
2918         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2919           to enable upcast to pCodeOpReg2 (there is no type tag to
2920           differenciate the two and pic16_popGet2p cast into PCOR2)
2921         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2922           (sizeof(sectNames) changed to sizeof(sectName))
2923           Both patches fix segfaults under MinGW.
2924
2925 2005-01-23 Raphael Neider <rneider AT web.de>
2926
2927         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
2928           Safe_[mc]?alloc()'ed variables
2929         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
2930           of (byte sized) temporaries (assign them to WREG for now)
2931         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
2932           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
2933           this might fix SIGSEGVs on MinGW...
2934         * src/SDCCopt.c (killDeadCode): restored original behaviour
2935           (volatile operands might get thrown away though)
2936
2937 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
2938
2939         * src/pic16/gen.c: fixed bug #1106975,
2940         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
2941         pointer update, INTCON is saved, global interrupts are disabled and
2942         restored after updateing TOS.
2943         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
2944         * added function attribute 'shadowregs' to take advantage of shadow
2945         registers,
2946         * added function attribute 'wparam' as an alternative to the wparam
2947         pragma,
2948         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
2949         user declares a non-ISR function as 'shadowregs',
2950         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
2951
2952 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
2953
2954         * .version: bumped version number to 2.4.8
2955         * device/lib/pic16/pics.all: list of PIC18F devices supported by
2956         pic16 port,
2957         * device/lib/pic16/libio/i2c/: I2C module support library,
2958         * device/include/pic16/i2c.h: I2C support library header,
2959         * device/lib/pic16/libc/stdio/: standard IO support sources,
2960         * (printf_small.c): printf_small() source, supports float print,
2961         * (printf_tiny.c): printf_tiny() source, does not support floats,
2962         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
2963         enable global optimizations for entire library source, other
2964         Makefiles in the source tree are also modified to reflect this,
2965         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
2966         function,
2967         * doc/sdccman.lyx: updated to reflect new changes,
2968         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
2969         sym->onStack if-case,
2970         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
2971         sbit, idata, _idata, xdata, _xdata,
2972         * added pragma library, to link an external library, (see doc),
2973         * removed command line options, --pomit-config-words, --pomit-ivt,
2974         --pleave-reset-vector,
2975         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
2976         when calling assembler to reflect memory model used, also define
2977         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
2978         reflect stack model used,
2979         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
2980         on stack return NULL,
2981
2982 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2983
2984         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
2985           of the operands is volatile. Fixes #1020220
2986
2987 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
2988
2989         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
2990         * (OptimizeRegUsage): make sure that there is really no other flow where
2991           the first pCode is used
2992
2993 2005-01-22 Raphael Neider <rneider AT web.de>
2994
2995         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
2996           to fix #1106967 (pCode->seq are not set up correctly)
2997
2998 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2999
3000         * src/SDCCglue.c (glue): make sure code area is declared before the
3001         static initialization area.
3002
3003 2005-01-21 Raphael Neider <rneider AT web.de>
3004
3005         * device/lib/Makefile.in: fixed test for pic16 install dir
3006         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3007           optimizations
3008         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3009           added --optimize-goto compiler switch and pragma wparam documentation
3010         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3011         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3012           and PRODH closing bug #1071770 (peephole optimizer)
3013
3014 2005-01-19 Raphael Neider <rneider AT web.de>
3015
3016         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3017           cmdLine buffers (used when calling sdcpp...) are large enough
3018           (MAX_PATH=256 truncates arguments leading to system halts when
3019           used in MinGW...)
3020         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3021         * (genUminus): rewritten to for efficiency
3022         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3023           used uninitialized in some cases)
3024         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3025           copy the third byte from the int -- now assumes 0x80 (data memory)
3026         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3027           operands (genAddLit expects the iCode's operands to swapped as
3028           well), fixed leftover bytes (crashed for short left operands)
3029         * (pic16_genMinusDec): performance improvements, removed false
3030           PIC14 emitSKPNCs
3031         * (pic16_genMinus): fixed to cope with differently sized operands
3032         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3033           for --obanksel > 1
3034         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3035         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3036           new banksel optimization
3037         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3038           analysis for temporary registers (segfaults...)
3039         * src/pic16/peeph.def: added rule
3040
3041 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3042
3043         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3044         which converts a float number to its ASCII representation
3045         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3046         functions to convert the fractional and integer part of a float to ASCII,
3047         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3048         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3049         ram
3050         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3051         _STATMEM macros,
3052         * device/include/pic16/adc.h: added GPL info,
3053         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3054         a pCodeOp as tested operand,
3055         * (genNearPointerGet): optimized bit testing, does not use
3056         intermediate register for bit value, test directly instead with
3057         BTFSS, BTFSC, works only for single bits,
3058         * (genpic16Code): dump the name of the iCode in the asm,
3059         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3060         renamed to pic16_decodeOp,
3061         * (serialRegAssign): do not allocate a temporary register for iCode
3062         sequences that test a single bit for 1/0
3063
3064 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3065
3066         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3067         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3068         access stack and frame pointers. They are initially assigned to
3069         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3070         accessing SFRs. Updated all occurences of modification of stack or
3071         frame pointer in gen.c and pcode.c,
3072         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3073         assigning of a literal value to pointers,
3074         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3075         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3076         selected
3077
3078 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3079
3080         * doc/sdccman.lyx: update documentation about stack pragma, added
3081         some info for stack memory models
3082
3083 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3084
3085         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3086
3087 2005-01-08 Raphael Neider <rneider AT web.de>
3088
3089         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3090           udata sections to fix bug #1097823
3091
3092 2005-01-05 Raphael Neider <rneider AT web.de>
3093
3094         * src/pic16/gen.c (genGenericShift): added handling of differently
3095           sized left operand and result
3096
3097 2005-01-04 Raphael Neider <rneider AT web.de>
3098
3099         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3100         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3101           to hold the condition bit)
3102         * added new version of genCmp (old code available via #define)
3103         * added new version of genShiftLeft/genShiftRight in a generic
3104           way, now supports shifting by negative values
3105         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3106           shiftCount (expected by genGenericShift)
3107         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3108         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3109           dump
3110         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3111           is an invalid literal too...)
3112
3113 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3114
3115         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3116         from Raphael Neider,
3117         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3118         for 8-bit literals. This fixes some literal operands which are sign
3119         extended to 16-bits ints when instruction needs only 8-bits.
3120
3121 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3122
3123         * device/lib/logf.c: added mcs51 assembly version
3124         * device/lib/expf.c: added mcs51 assembly version
3125         * device/lib/_logexpf.c: new shared asm code for expf and logf
3126         * device/include/math.h: add defines for assembly math library
3127         * device/lib/Makefile.in: build new _logexpf.c
3128         * device/lib/libfloat.lib: use new _logexpf.c
3129
3130 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3131
3132         * src/pic/device.c
3133         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3134           device types which have less than 0x7f registers.
3135
3136 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3137
3138         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3139
3140 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3141
3142         * device/lib/printf_fast.c: only build on supported arch.
3143         * device/lib/printf_tiny.c: only build on supported arch.
3144         * device/lib/printf_fast_f.c: only build if asm float lib
3145         * device/lib/_fsget1arg.c: only build if asm float lib
3146         * device/lib/_fsget2args.c: only build if asm float lib
3147         * device/lib/_fsnormalize.c: only build if asm float lib
3148         * device/lib/_fsreturnval.c: only build if asm float lib
3149         * device/lib/_fsrshift.c: only build if asm float lib
3150         * device/lib/_fsswapargs.c: only build if asm float lib
3151         * device/include/stdio.h: don't provide print_fast,
3152           print_fast_f, print_tiny prototypes if --xstack used
3153
3154 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3155
3156         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3157         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3158           to the SOURCES
3159
3160 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3161
3162         * device/lib/printf_fast_f.c: same as printf_fast, but
3163           with floating point enabled
3164         * device/lib/printf_fast.c: minor tweaks
3165         * device/include/stdio.h: add printf_fast_f
3166
3167 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3168
3169         * src/SDCCmain.c: make --float-reent default for mcs51
3170         * device/lib/_fsadd.c: added mcs51 assembly version
3171         * device/lib/_fssub.c: added mcs51 assembly version
3172         * device/lib/_fsmul.c: added mcs51 assembly version
3173         * device/lib/_fsdiv.c: added mcs51 assembly version
3174         * device/lib/_fseq.c: added mcs51 assembly version
3175         * device/lib/_fsneq.c: added mcs51 assembly version
3176         * device/lib/_fsgt.c: added mcs51 assembly version
3177         * device/lib/_fslt.c: added mcs51 assembly version
3178         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3179         * device/lib/Makefile.in: add _fscmp to build
3180         * device/lib/libfloat.lib: add _fscmp to build
3181
3182 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3183
3184         * device/lib/_fs2slong.c: added mcs51 assembly version
3185         * device/lib/_fs2sint.c: added mcs51 assembly version
3186         * device/lib/_fs2schar.c: added mcs51 assembly version
3187         * device/lib/_fs2ulong.c: added mcs51 assembly version
3188         * device/lib/_fs2uint.c: added mcs51 assembly version
3189         * device/lib/_fs2uchar.c: added mcs51 assembly version
3190         * device/lib/_slong2fs.c: added mcs51 assembly version
3191         * device/lib/_sint2fs.c: added mcs51 assembly version
3192         * device/lib/_schar2fs.c: added mcs51 assembly version
3193         * device/lib/_ulong2fs.c: added mcs51 assembly version
3194         * device/lib/_uint2fs.c: added mcs51 assembly version
3195         * device/lib/_uchar2fs.c: added mcs51 assembly version
3196         * device/include/float.h: added #define to select asm vs c
3197
3198 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3199
3200         * device/lib/printf_fast.c: improvements to float output
3201         * device/include/float.h: add defines for assembly float library
3202         * device/lib/_fsget1arg.c: receive 1 float arg
3203         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3204         * device/lib/_fsnormalize.c: normalize a float
3205         * device/lib/_fsreturnval.c: return float, various helper routines
3206         * device/lib/_fsrshift.c: right shift a float's mantissa
3207         * device/lib/_fsswapargs.c: swap 2 floats
3208         * device/lib/Makefile.in: build these 6 new files for mcs51
3209         * device/lib/libfloat.lib: add these 6 files to the library
3210
3211 2004-12-26 Borut Razem <borut.razem AT siol.net>
3212
3213         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3214           built by gcc 3.4.2
3215
3216 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3217
3218         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3219           and fully reentrant and register bank neutral.
3220         * device/lib/printf_fast.c: added float (not enabled by default),
3221           added compact/slower integer (also not enabled by default),
3222           improved size/speed of fast integer code, other minor changes
3223         * device/include/stdio.h, device/lib/Makefile.in,
3224           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3225
3226 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3227
3228         * src/pic16/pcode.c: declaring variables other than at the start of a
3229           block is not supported in C by VC6.
3230
3231 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3232
3233         * applied a previous patch from Raphael Neider that wasn't included
3234         in the previous commits, which fixes infinite loops within jumptable
3235         improvements,
3236         * made some fixes that previous patches introduced
3237
3238 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3239
3240         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3241         that fixes an issue with AOP_PCODE asmop's offset,
3242         * (pic16_popCopyReg): update instance field too,
3243         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3244         function of pic port,
3245         * (genCmp, genAnd, genAssign),
3246         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3247
3248 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3249
3250         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3251         variables initial values to idata section,
3252         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3253         variables in some functions. This utilizes parmBytes field of iCode
3254         structure to hold the offset of the variable in stack. (might be
3255         able to use the stack field too?)
3256         * applied patch from Raphael Neider # ### , # ###
3257         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3258         variable initial values in idata section,
3259         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3260         for static variables with initial value
3261         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3262         applied fix in while loop from Raphael Neider.
3263
3264 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3265
3266         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3267         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3268         * src/ds390/ralloc.c (serialRegAssign): spill bits
3269         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3270         * support/Util/SDCCerr.c,
3271         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3272         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3273         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3274
3275 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3276
3277         * device/include/sdcc-lib.h: inserted LGPL, added includes
3278           asm/ds390/features.h and asm/mcs51/features.h
3279         * device/include/asm/default/features.h,
3280         * device/include/asm/gbz80/features.h,
3281         * device/include/asm/z80/features.h: added empty _AUTOMEM
3282           and _STATMEM
3283         * device/include/asm/ds390/features.h,
3284         * device/include/asm/mcs51/features.h: added files with defines for
3285           _AUTOMEM and _STATMEM indicating automatic and static storage class
3286         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3287         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3288         * src/SDCCicode.c (geniCodeCast),
3289         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3290         * src/SDCCloop.c (loopInduction): removed unused variable lr
3291         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3292           to convertToFcall to include char modulo (RFE 1065037), added check
3293           if left operand is unsigned and use abs of literal value
3294         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3295           as it doesn't work after conversion from peephole.def to peephole.rul
3296         * src/mcs51/gen.c (toBoolean): added check for size,
3297           (genModOneByte): optimized code for signed char modulo a literal
3298           power of 2 (thanks to Hubert Sack),
3299           (genRRC): removed unnecessary "clr c",
3300           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3301         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3302           jump optimization,
3303           swapped rules 256.c and 256.d,
3304           extended 256.d by using new multiple checks (thanks Erik),
3305           added rules 256.e and 256.f,
3306           updated rule 261.a and 261.b to new generated code
3307         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3308
3309 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3310
3311         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3312           induction related bugs, including first part of bug #1074377
3313
3314 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3315
3316         * applied patch from bug-report #1076292,
3317         * applied patches for genAnd and Goto-optimizations for Raphael
3318         Neider,
3319         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3320         dump a less iCode information,
3321         * src/pic16/device.h (pic16_options_t): added field debgen,
3322         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3323         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3324         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3325         puclic,
3326         * (various functions): added macros FENTRY and FENTRY2 to functions,
3327         to emit function prologue,
3328         * (various functions): fixed indentation,
3329         * (genNearPointerGet): fixed loading of FSR0,
3330         * (genPackBits): applied patch from Raphael Neider to fix updating
3331         of FSR0 and touching only the modified bits,
3332         * src/pic16/genarith.c (various functions): added macros FENTRY to
3333         emit function prologue in comments,
3334         * src/pic16/pcode.h: added functions debugf2, debugf3,
3335         * src/pic16/ralloc.c: partial fix for packForPush caused
3336         segmentation fault,
3337
3338 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3339
3340         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3341           <stsp AT users.sourceforge.net> with reversed byte order
3342         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3343
3344 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3345
3346         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3347           bug #1074377
3348         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3349         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3350
3351 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3352
3353         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3354
3355 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3356
3357         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3358           conditions,
3359           (setFromConditionArgs): friendly operand parser for peephole rules,
3360           (operandBaseName, operandsNotRelated): new peephole condition
3361           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3362           architecture specific register naming into account, handles n-way
3363           comparisons, and supports quoted literals
3364         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3365
3366 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3367
3368         * src/mcs51/peeph.def: fixed bug #1076940
3369
3370 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3371
3372         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3373
3374 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3375
3376         Adding support for replacing ljmps with sjmps in jumptables
3377         generated for switch statements. For now you need to set the
3378         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3379         Now 4 algorithms for mcs51 jumptable generation are used:
3380         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3381         addresses loaded pc-relative for up to 112 cases and stack-pushing
3382         target addresses loaded with offset from dptr for up to 256 cases.
3383
3384         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3385         * src/mcs51/main.c: adapted constants for switch table generation
3386         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3387
3388 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3389
3390         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3391         * support/regression/tests/bug1057979.c: added test for bug 1073386
3392
3393 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3394
3395         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3396         compilers
3397
3398 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3399
3400         * src/pic16/device.h,
3401         * src/pic16/genarith.c,
3402         * src/pic16/glue.c,
3403         * src/pic16/main.c,
3404         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3405
3406 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3407
3408         Large cummulative patch for pic16 port.
3409         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3410         to call when a stack overflow occurs,
3411         * (malloc.h): added CVS Id tag,
3412         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3413         variable,
3414         * added libc directory. The current version of LibC contains string
3415         functions, ctype functions and macros and some functions of the
3416         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3417         be extensively tested in the future. Standard disclaimer here.
3418         Library is not automatically build yet. But one can build it by
3419         invoking 'make' inside the libc directory.
3420         * added ADC library under libio. Preliminary version yet.
3421
3422         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3423         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3424         aopForRemat() now and not by pic16_aopOp(),
3425         * (pic16_popGetTempReg): removed warning messgae when allocating
3426         temporary registers, its a buggy feature and will be removed,
3427         * (pic16_popGet): set register instance field in AOP_CRY,
3428         * (pic16_outBitC): fixed for results in size greater than 1,
3429         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3430         * (pic16_storeForReturn): optimized return of 0,
3431         * (genCmp): experimental code for new genCmp which uses PIC18's
3432         special compare&skip instructions. Initial tests fail some times
3433         with variables grater than 1 byte in size, so new code is disabled,
3434         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3435         a single bit,
3436         * (genCast): began a fix to optimize the casting of a bit to another
3437         bit, now assigning a bitfield to another bitfield will fail, sorry,
3438         * src/pic16/main.c: disabled the use of lr-support feature,
3439         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3440         * added some function prototypes, added function _debugf prototype,
3441         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3442         bits with offset (case PO_GPR_BIT),
3443         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3444         command line,
3445         * (isBankInstruction): modified to return 0 for no banking instruction,
3446         and 1 for banking instruction,
3447         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3448         caused stop processing pCodes after a inline assembly block,
3449         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3450         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3451         registers when it shouldn't,
3452         * src/pic16/ralloc.c (allocReg): add preliminary support for
3453         supporting a limited set of temporary registers,
3454
3455 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3456
3457         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3458           genDataPointerSet): ensure assignments always copy in MSB to LSB
3459           order,
3460           (loadRegFromAop): recognize CLRH optimization,
3461           (genFunction): optimize RECEIVE iCodes in reentrant functions
3462
3463 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3464
3465         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3466           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3467           selected.
3468         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3469         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3470           contiguous with data
3471
3472 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3473
3474         * device/lib/_gptrget.c (_gptrget),
3475         * device/lib/_gptrgetc.c (_gptrgetc),
3476         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3477           instead of sjmp to ret
3478         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3479           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3480
3481 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3482
3483         * .version: bumped version to 2.4.7
3484         * device/lib/_gptrget.c (_gptrget): is now _naked
3485         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3486         * device/lib/_gptrput.c (_gptrput): is now _naked
3487         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3488           (createFunction): fixed xstack
3489         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3490         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3491           or bit either,
3492           (geniCodeCritical): store original interrupt state in an iTemp bit
3493           var unless stack-auto
3494         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3495         * src/SDCCmain.c (setIncludePath): added include/target to search path
3496         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3497         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3498           prototype,
3499           (processFuncArgs): put bit vars in bit area
3500         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3501           unsaveRBank): fixed xstack,
3502           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3503           (genFunction, genEndFunction): fixed xstack,
3504           (genAssign): optimization don't walk backwards through mem
3505         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3506         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3507         * support/regression/Makefile: also make library (for stack-auto) when
3508           making "all" and added "test-mcs51-xstack-auto"
3509         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3510         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3511         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3512         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3513         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3514           make-library by MAKE_LIBRARY
3515         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3516           regression tests for xstack
3517         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3518         * support/regression/tests/critical.c: test for critical on mcs51
3519
3520 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3521
3522         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3523           built version of sdcc instead of installed version
3524
3525 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3526
3527         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3528         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3529           vprintf.c now
3530         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3531         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3532           WARNING: remove device/lib/build/z80/printf.o by hand when
3533           updating from previous build!
3534         * device/lib/z80/printf.c: updated comment
3535         * support/regression/tests/bug1057979.c: test all ports now
3536         * support/regression/tests/bug1065458.c: file added
3537
3538 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3539
3540         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3541           *_start and *_end symbols for static functions
3542
3543 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3544
3545         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3546           and search crt0.o in all library paths,
3547           (setIncludePath): proper handling of --nostdinc,
3548           (setLibPath): proper handling of --nostdlib
3549         * support/regression/Makefile,
3550         * support/regression/ports/ds390/spec.mk,
3551         * support/regression/ports/gbz80/spec.mk,
3552         * support/regression/ports/hc08/spec.mk,
3553         * support/regression/ports/mcs51/spec.mk,
3554         * support/regression/ports/mcs51-large/spec.mk,
3555         * support/regression/ports/mcs51-stack-auto/spec.mk,
3556         * support/regression/ports/z80/spec.mk: use include and lib files from
3557           built version of sdcc instead of installed version
3558         * doc/sdccman.lyx: fixed typo in --nostdinc
3559
3560 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3561
3562         * src/pic/pcode.c,
3563         * src/pic/device.c,
3564         * src/pic/ralloc.c,
3565         * src/pic/gen.c : added support to generate code for struct bit fields.
3566
3567 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3568
3569         * as/xa51/xa_version.h,
3570         * device/include/errno.h,
3571         * device/include/regc515c.h,
3572         * device/lib/_itoa.c,
3573         * device/lib/_ltoa.c,
3574         * device/lib/ser_ir_cts_rts.c,
3575         * sim/ucsim/xa.src/glob.cc,
3576         * sim/ucsim/xa.src/inst_gen.cc,
3577         * sim/ucsim/xa.src/xa_bit.cc,
3578         * sim/ucsim/xa.src/xa_sfr.cc,
3579         * sim/ucsim/z80.src/inst_dd.cc,
3580         * sim/ucsim/z80.src/inst_fdcb.cc,
3581         * support/scripts/keil2sdcc.pl,
3582         * src/pic16/pic16.dsp,
3583         * src/pic16/pic16a.dsp: corrected cvs line endings
3584         * device/lib/printf_large.c: fixed bug 1057979
3585         * src/pic16/gen.c: fixed non-C standard code
3586         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3587         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3588         * support/regression/ports/mcs51/support.c: reload T1 asap
3589         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3590           pdata use and clear idata startup behaviour
3591         * support/regression/tests/bug1057979.c: added
3592
3593 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3594
3595         * device/examples/ds390/ow390/ad26.h,
3596         * device/examples/ds390/ow390/cnt1d.h,
3597         * device/examples/ds390/ow390/crcutil.c,
3598         * device/examples/ds390/ow390/ownet.h,
3599         * device/examples/ds390/ow390/owsesu.c,
3600         * device/examples/ds390/ow390/swt12.h,
3601         * device/examples/ds390/ow390/swtoper.c,
3602         * device/examples/ds390/ow390/temp10.h,
3603         * device/examples/ds390/ow390/thermodl.c,
3604         * device/examples/ds390/tinitalk/tinitalk.dsp,
3605         * device/examples/ds390/tinitalk/tinitalk.dsw,
3606         * device/examples/mcs51/clock/hw.h,
3607         * device/examples/mcs51/simple2/go.bat,
3608         * device/examples/serialcomm/windows/serial.h,
3609         * device/examples/xa51/dummy.c,
3610         * device/examples/xa51/hello.c,
3611         * device/include/80c51xa.h,
3612         * device/include/at89x051.h: corrected cvs line endings
3613
3614 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3615
3616         * src/pic16/main.c (options): added command line --gstack, to trace
3617         stack over/under flows,
3618         * added pragma 'wparam' to allow passing first byte of function
3619         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3620         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3621         call to __gstack_test function and sets up the symbol as extern,
3622         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3623         * popaop): added call to pic16_testStackOverflow,
3624         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3625         wparamList list,
3626         * (genCall, genPcall): now all parameters are passed via stack
3627         except in functions that are pass to wparam pragma in which WREG is
3628         used too,
3629         * (genPcall): REENTRANT flag is checked to see if variable prototype
3630         contains reentrant keyword, don't call a non-reentrant function, via
3631         a reentrant function pointer or vice versa, functions are never
3632         passed via WREG,
3633         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3634         D.Winkler,
3635         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3636         SIGSEGV when accessing a NULL register stucture,
3637         * (pic16_printGPointerType): modified to handle UPPER modifier for
3638         function initializers, changed prototype of function to simpler one,
3639         * (pic16_printIvalFuncPtr): check to see if function is already
3640         added in externs list,
3641         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3642         optimized a move from W to SFR with a move to the same register
3643         later after a CALL,
3644         * device/lib/pic16/debug: NEW directory, contains debug features
3645         which are enabled when linking with libdebug.lib, currently command
3646         line option --gstack enables stack pointer tracing for over/under
3647         flow, corresponding sources are in debug/gstack
3648
3649 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3650
3651         * doc/sdccman.lyx: updated SDCC version,
3652         * (PIC16 port): update list of command line options,
3653         * src/pic16/device.h (structure pic16_options_t): added field gstack
3654         to enable stack overflow tracing on push/pops,
3655         * src/pic16/device.c (statistics structure): added statistics
3656         structure,
3657         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3658         pic16_dump_int_registers): increase statistics counters for each
3659         * variable which is encountered
3660         * (pic16_dump_usection): emit each .udata variable to its own udata
3661         section,
3662         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3663         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3664         parameters via stack, otherwise use old scheme,
3665         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3666         assembler output file,
3667         * src/pic16/main.c: added command line options --gstack to enable
3668         push/pop tracing for stack overflow,
3669         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3670         instructions): added size of each instruction,
3671         * (pic16_countInstruction): estimate size of instructions in
3672         the_pFile list, inline assembly blocks are not counted,
3673         * (pic16_FixRegisterBanking): trace previous register usage, when
3674         banksel optimizations is greater than 0, don't emit a redudant
3675         banksel directive,
3676
3677 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3678
3679         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3680         * src/pic16/ralloc.c : applied same fix for pic16.
3681         * src/pic/gen.c : tidied it up a little.
3682
3683 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3684
3685         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3686         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3687
3688 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3689
3690         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3691
3692 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3693
3694         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3695         non-reentrant function __modsint in the interrupt function (thus
3696         corrupting math operations during serial I/O)
3697         * device/lib/ser_ir.c: as above, changed buffersize
3698         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3699         256.c,d for zeroing
3700         * doc/Makefile: added option -t for rsync
3701
3702 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3703
3704         * src/SDCCast.h (struct ast),
3705         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3706
3707 2004-10-20 Borut Razem <borut.razem AT siol.net>
3708
3709         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3710         package
3711
3712 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3713
3714         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3715         makefile targets,
3716         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3717         support functions to replace long sequences of MOVFF's from access
3718         bank registers to stack and vice versa,
3719         * src/pic16/device.h: added new field opt_flags, where optimization
3720         flags can be set to enable certain features,
3721         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3722         * pBlock, (genFunction, genEndFunction): surroung loop for
3723         saving/loading used registers in stack with PC_INFO pCodes,
3724         INF_LREGS. Code in between can then be optimized by pCode optimizer
3725         to support function calls,
3726         * (genDataPointerSet): fixed bug which loaded float fields in
3727         structures with corrupt data,
3728         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3729         in a standard way debug info on stderr. Feature used for developing
3730         and debugging only,
3731         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3732         obsolete chunks of code,
3733         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3734         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3735         * pic16/src/pcode.c (pic16_newpCodeInfo,
3736         * (pic16_newpCodeOpLocalRegs),
3737         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3738         feature,
3739         * (pic16_pCodeConstString): printing of the initial value of a
3740         symbol as a comment is inhibited since parsing was already done by
3741         copyStr and output is corrupt,
3742         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3743
3744 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3745
3746         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3747
3748 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3749
3750         * as/mcs51/lkarea.c: removed old K&R style,
3751           (lnksect): changed check on boundary error,
3752           (lnksect2): changed check on boundary error,
3753           (lnksect2): extend XSTK to end of page if size = 1
3754         * as/mcs51/lkmain.c: removed old K&R style,
3755           (Areas51): create l_IRAM symbol
3756         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3757         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3758           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3759         * device/lib/_mullong.c: added version to be compiled with xstack
3760         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3761         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3762         * device/lib/mcs51/crtxstack.asm: fixed comment
3763         * src/SDCCglue.c: maxInterrupts defaults to 0,
3764           (emitMaps): added pdata,
3765           (createInterruptVect): (re)moved default,
3766           (glue): added pdata,
3767           (glue): moved __start__xstack to XSTK with default size 1
3768         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3769           and options.float_rent when options.stackAuto is set,
3770           (linkEdit): only write XDATA_NAME if provided on command line
3771         * src/SDCCmem.h,
3772         * src/SDCCmem.c: added pdata
3773         * src/port.h: added pdata_name to PORT
3774         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3775           (saveRegisters, unsaveRegisters): removed usage of B,
3776           (genMinus): fixed accumulator clash,
3777           (genJumpTab): added comment, this needs another look
3778         * src/mcs51/gen.c: added check for "B in use" paranoia,
3779           added pushB() and popB()
3780         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3781           chance
3782         * src/avr/main.c,
3783         * src/ds390/main.c,
3784         * src/hc08/main.c,
3785         * src/mcs51/main.c,
3786         * src/pic/main.c,
3787         * src/pic16/main.c,
3788         * src/xa51/main.c,
3789         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3790           added PSEG (PAG,XDATA) or NULL to port specifier
3791         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3792         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3793           (_mcs51_genInitStartup): removed __start__xstack equ,
3794           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3795         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3796         * src/z80/gen.c (_rleAppend): fixed warnings
3797         * support/regression/tests/zeropad.c: added pdata test
3798         * .version: bumped to 2.4.6
3799
3800 2004-10-17 Borut Razem <borut.razem AT siol.net>
3801
3802         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3803         as a part of nightly build
3804
3805 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3806
3807         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3808         WREG holds the first byte function parameters,
3809         * (aopForSym): take special case for symbols which are in FARSPACE
3810         but in CODESPACE too,
3811         * (assignResultValue): modified to take into account _G.useWreg,
3812         * (genCall): don't use wreg for parameter passing when function is
3813         declared as reentrant, too, added optimization INCF to stack
3814         pointer when stack parameter count is 1,
3815         * (genFunction, genEndFunction): refurnished and fixed to not using
3816         wreg for passing parameters when function has varargs or is
3817         reentrant, fixed bug with symbol name compare for generating
3818         functions in absolute address,
3819         * (pic16_storeForReturn): refurnished,
3820         * (genCmp): began writing a new version of the function, not ready
3821         yet, therefore it is disabled,
3822         * (genAssign): do not read code memory when assigning a function to
3823         a pointer function,
3824         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3825         array of characters, not pointer,
3826         * (pic16initialComments): in debug mode emit an .ident directive for
3827         the assembler,
3828         * (_process_pragma): emit a new warning type (internal to pic16)
3829         when setting stack to default length, emit a similar warning when
3830         placing a function at absolute address and address is not word aligned
3831         * (_pic16_parseOptions): added 'return TRUE' statement,
3832         * (_pic16_linkEdit): if compiling a source, then add the source's
3833         file object, first in the list of objects to link,
3834
3835 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3836
3837         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3838         * src/pic/main.c : removed VC warning.
3839         * src/pic/gen.c : changed comment.
3840
3841 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3842
3843         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3844         reference to a deprecated symbol _GPTRREG was causing failure to
3845         link. Thanks G. M. Gallant for the info.
3846
3847 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3848
3849         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3850         comments for Bugs item #954788.
3851
3852 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3853
3854         * src/pic16/device.c (pic16_dump_gsection,
3855         * pic16_groupRegistersInSection): handle symbols declared to be in
3856         access bank differently,
3857         * src/pic16/gen.c (struct _G): added field resDirect,
3858         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3859         send values read from stack directly to result and don't allocate
3860         temporary values,
3861         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3862         same registers,
3863         * (pic16_sameRegsOfs): NEW,
3864         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3865         free because they were not allocated from temporary pool,
3866         * pic16_popRegFromString): workaround to fix a problem with
3867         allocating variables twice or never,
3868         * (genGenPointerGet): using PRODL instead of FSR0H,
3869         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3870         instead of FSR0H,
3871         * (genAssign): take advantage of the _G.resDirect flag,
3872         * (genCast): around line 11844, use mov2f instead of directly
3873         MOVFF'ing between operands to account for literal values,
3874         * src/pic16/genutils.c: some new debug functions for gpsim have been
3875         added,
3876         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3877         float with integer part only,
3878         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3879         place variables in access bank
3880         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3881         updated sources to reflect recent changes in gen.c
3882
3883 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3884
3885         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3886         sources that searched for headers in installation path, now the
3887         device/include/pic16 is used,
3888         * src/pic16/glue.c (pic16glue),
3889         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3890         .line directives if not in debug mode, this suppresses assembler's
3891         warnings for ignored directives
3892
3893 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3894
3895         * src/port.h: made reset_regparms prototype void parameter explicit.
3896         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3897         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3898         * doc/sdccman.lyx: documented warning disabling and how to use
3899           printf_large to make it print floats.
3900         * device/include/stdbool.h: NEW
3901         * device/lib/_atof.c,
3902         * device/lib/_divuint.c,
3903         * device/lib/_divulong.c,
3904         * device/lib/expf.c,
3905         * device/lib/printf_large.c,
3906         * device/lib/sincosf.c,
3907         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3908         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3909           a completely reentrant lib.
3910
3911 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3912
3913         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3914         * device/include/pic16/stdio.h: fixed bug with colon
3915
3916 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3917
3918         * device/include/pic16/stdio.h,
3919         * device/include/pic16/stdlib.h,
3920         * device/include/pic16/math.h: NEW
3921         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3922         declared as _naked to reduce overhead
3923         * device/lib/Makefile.in (target port-specific-objects-pic16):
3924         changed * to *.* so to ignore the CVS directory,
3925         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
3926         stacked variables back in stack,
3927         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
3928         corruption
3929
3930 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
3931
3932         * .version: bumped version number to 2.4.5
3933         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
3934         * support/Util/SDCCerr.c (messages structure): added entry for
3935         W_POSSBUG2
3936
3937         Large cumulative patch for pic16 port and libraries.
3938         * device/include/pic16/sdcc-lib.h,
3939         * device/include/pic16/stdarg.h,
3940         * device/include/asm/pic16/features.h,
3941         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
3942         * device/include/pic16/float.h: changes reentrant keyword with
3943         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
3944         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
3945         updated target build-libraries to include objects from gptr,
3946         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
3947         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
3948         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
3949         all function headings,
3950         * src/SDCCmain.c: added global parameter userIncDirsSet,
3951         * (parseCmdLine): when option -I is encountered add directory to
3952         userIncDirsSet too,
3953         * src/version.awk: added space between control and long,
3954         * src/pic16/NOTES: added some notes for the port,
3955         * src/pic16/gen.c: added prototype for mov2fp function,
3956         * (fReturnpic16[]): properly named return value registers,
3957         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
3958         * (aopForSym): added code to handle symbols with onStack flag set,
3959         symbols onStack are allocated PTRSIZE bytes,
3960         * (aopFreeAsmop): handles special case where asmops are stack objects,
3961         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
3962         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
3963         added argument lock to trace flaws in allocating temporary registers
3964         when developing port,
3965         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
3966         * (pic16_popRegFromString): reenabled allocating a direct register
3967         from string,
3968         * (assignResultValue): various beautifications,
3969         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
3970         referenced function argument,
3971         * (genIpush): reenabled to allow stacked arguments, handles only
3972         ic->parmPush iCodes,
3973         * (genCall, genPcall): major changes to allow for variable argument
3974         functions, fixed a bug with falsely restoring stack pointer after
3975         returning from call,
3976         * (genFunction): pending code for critical function,
3977         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
3978         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
3979         * (genNearPointerGet): fixed bug with indirect reading, was always
3980         reading from INDF0
3981         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
3982         pointers,
3983         * (genAddrOf): rewrote code to take address of a stacked function parameter
3984         * (genCast): fixed casting to generic pointer type,
3985         * src/pic16/gen.h: added AOP_STA,
3986         * (struct asmop): added field stk,
3987         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
3988         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
3989         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
3990         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
3991         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
3992         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
3993         generic pointers,
3994         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
3995         and library paths,
3996         * (pic16_port structure): generic pointer size is set to 3,
3997         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
3998         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
3999         compiler warning,
4000         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4001         operand is an iTemp,
4002
4003 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4004
4005         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4006         * debugger/mcs51/simi.c: addapt new syntax of s51
4007
4008 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4009
4010         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4011         * src/pic16/pcode.c: commented out some calls to free() in order to
4012         fix bug #989576,
4013
4014 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4015
4016         * src/SDCCicode.h,
4017         * src/SDCCicode.c (isiCodeInFunctionCall),
4018         * src/avr/ralloc.c (selectSpil),
4019         * src/pic/ralloc.c (selectSpil),
4020         * src/pic16/ralloc.c (selectSpil),
4021         * src/ds390/ralloc.c (selectSpil),
4022         * src/hc08/ralloc.c (selectSpil),
4023         * src/xa51/ralloc.c (selectSpil),
4024         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4025         stack in the middle of a function call sequence (fixes bug #1020268)
4026         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4027         costs associated with the minimum switch case.
4028
4029 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4030
4031         * src/SDCC.lex: fixed bug #1030549
4032
4033 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4034
4035         * src/SDCCcse.h (struct cseDef),
4036         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4037         over a function call if the CSE is derived from a symbol whose
4038         address has been taken (fixes bug #1029883)
4039         * support/regression/tests/bug-1029883: a new regression test for
4040         this bug
4041
4042 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4043
4044         * src/hc08/gen.c (emitinline): fixed bug #1029778
4045         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4046         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4047         and starts toward RFE #905167)
4048
4049 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4050
4051         * src/pic16/gen.c (mov2f): New function to move an operand to
4052         another without considering if it is a literal or a register,
4053         * (pic16_sameRegs): don't check if they are both AOP_REG,
4054         * (AccRsh): removed andmask=0 lines,
4055         * (genLeftShift): duplicated to be improved in future versions,
4056         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4057         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4058         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4059         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4060         * (insertBankSwitch): fixed inserting banksel directives algorithm
4061         for instructions that follow a skip instruction, this fixes a report
4062         for broken subtraction code generation,
4063         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4064         iCode is a left op, just in case result and right share the same
4065         registers
4066
4067 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4068
4069         * src/hc08/main.c,
4070         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4071         preservation of HX
4072         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4073         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4074         on 2004-09-12; it was buggy
4075
4076 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4077
4078         * src/SDCCsymt.h: removed RESULT_CHECK
4079         * src/SDCCast.c,
4080         * src/SDCCglue.c,
4081         * src/SDCCval.c,
4082         * src/pic/glue.c,
4083         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4084
4085 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4086
4087         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4088         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4089         configuration values no more rejected by compiler, they are assigned
4090         to configuration registers with a warning message instead,
4091         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4092         the for-loop so last conf register is emitted too,
4093         * (_pic16_initPaths): link library libsdcc.lib by default,
4094         * (_hasNativeMulFor): modified test for multiplication according to
4095         Raphael Neider's remarks. Integer multiplication is also done with
4096         support functions,
4097         * device/include/pic16/pic18fregs.h: corrected type error in while
4098         testing and including 18f6720 header file
4099
4100 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4101
4102         * src/pic16/device.h (pic16_options): removed field use_crt,
4103         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4104         until an optimization to handle single bits is added,
4105         * (pic16_loadFSR0): moved before genUnpackBits,
4106         * (genAnd): some white lines removed,
4107         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4108         leave_reset flags in pic16_options when using crt modules,
4109
4110 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4111
4112         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4113           for bugs 898889 & 979599. Also used some safer print instructions.
4114
4115 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4116
4117         * src/pic16/device.h (pic16_options_t): added field use_crt,
4118         crt_name, no_crt,
4119         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4120         catch a probable future bug,
4121         * src/pic16/gen.c: aopIdx function commented out,
4122         * (genAssign): commented out old code which used aopIdx,
4123         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4124         code, added if conditionals to take into account the --use-crt
4125         command line options,
4126         * src/pic16/main.c (pic16_optionsTable): added new command line
4127         options, --use-crt= and --no-crt,
4128         * (_pic16_linkEdit): now the proper crt object is added in the
4129         linker command line except than when --no-crt is specified,
4130         * src/pic16/pcode.c,
4131         * src/pic16/pcode.h: added some structures and functions for a new
4132         optimization scheme to compansate for instruction overhead between
4133         same iCodes, this scheme is currently under development and is not
4134         working in any way,
4135         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4136         to && operator,
4137         * device/lib/pic16/startup/crt0i.c,
4138         * device/lib/pic16/startup/crt0iz.c: added global char variable
4139         __uflags to force the generation of an idata section
4140
4141 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4142
4143         * doc/Makefile,
4144         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4145         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4146
4147 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4148
4149         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4150         Frieder) and clarified the default code optimization mode
4151
4152 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4153
4154         * src/SDCC.lex (doPragma, process_pragma),
4155         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4156         "opt_code_size", and "opt_code_balanced"
4157         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4158         regrouped options by category, added support for category headers
4159         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4160         and "--opt-code-size"
4161         * doc/sdccman.lyx: documented these new options and pragmas
4162         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4163         preference into account
4164
4165 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4166
4167         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4168           geniCodePreDec): Fixed bug 904237 by generating a warning
4169         * src/SDCCerr.h,
4170         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4171
4172 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4173
4174         * src/pic/device.c : When no max ram set validate full memory range.
4175         * src/pic/pcode.c,
4176         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4177
4178 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4179
4180         * device/lib/_gptrget.c,
4181         * device/lib/_gptrput.c: updated comment
4182         * device/lib/calloc.c,
4183         * device/lib/free.c,
4184         * device/lib/malloc.c,
4185         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4186         * src/SDCCcse.c (cseBBlock),
4187         * src/SDCCicode.c (printOperand, geniCodeArray),
4188         * src/SDCCicode.h (struct operand): fixed bug 868103
4189         * support/regression/tests/bug-868103.c: added
4190         * src/SDCCast.c (searchLitOp),
4191         * src/SDCCcse.h (struct cseDef),
4192         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4193         * src/SDCCicode.h (struct operand),
4194         * src/SDCCsymt.h (struct sym_link),
4195         * src/avr/gen.c (hasInc),
4196         * src/ds390/gen.c (hasInc),
4197         * src/hc08/gen.c (genPlusIncr, hasInc),
4198         * src/mcs51/gen.c (hasInc),
4199         * src/pic16/glue.c (pic16_printIvalChar),
4200         * src/pic16/ralloc.c (regWithIdx),
4201         * src/xa51/gen.c (hasInc) : removed warnings
4202         * src/SDCCast.c (createBlock): added comment ???
4203         * src/hc08/ralloc.c: updated comments
4204
4205 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4206
4207         * doc/sdccman.lyx: updated section on switch statements, added
4208         section about semaphore locking
4209         * doc/Makefile: added option -info for latex2html
4210         * device/lib/_gptrget.c,
4211         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4212
4213 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4214
4215         * src/pic/device.h,
4216         * src/pic/device.c,
4217         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4218          maxram is less than 0x100.
4219
4220 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4221
4222         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4223
4224 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4225
4226         * src/port.h,
4227         * src/mcs51/main.c,
4228         * src/ds390/main.c,
4229         * src/z80/main.c,
4230         * src/hc08/main.c,
4231         * src/pic/main.c,
4232         * src/pic16/main.c,
4233         * src/avr/main.c,
4234         * src/xa51/main.c
4235         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4236         a jump table is the best form for a switch statement, including
4237         automatic insertion of missing cases to make the case range
4238         continuous. Developed in collaboration with Frieder Ferlemann.
4239
4240 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4241
4242         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4243         accumulator result if it needs sign extension
4244
4245 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4246
4247         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4248
4249 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4250
4251         * device/lib/gbz80/printf.c,
4252         * device/lib/z80/printf.c: removed define for NULL
4253
4254 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4255
4256         * as/xa51/xa_link.c,
4257         * device/examples/ds390/ow390/ad26.c,
4258         * device/examples/ds390/ow390/cnt1d.c,
4259         * device/examples/ds390/ow390/counter.c,
4260         * device/examples/ds390/ow390/ds2480.h,
4261         * device/examples/ds390/ow390/ds2480ut.c,
4262         * device/examples/ds390/ow390/findtype.c,
4263         * device/examples/ds390/ow390/gethumd.c,
4264         * device/examples/ds390/ow390/owllu.c,
4265         * device/examples/ds390/ow390/ownetu.c,
4266         * device/examples/ds390/ow390/swt12.c,
4267         * device/examples/ds390/ow390/swtloop.c,
4268         * device/examples/ds390/ow390/temp.c,
4269         * device/examples/ds390/ow390/temp10.c,
4270         * device/examples/ds390/ow390/thermo21.c,
4271         * device/examples/ds390/ow390/tinilnk.c,
4272         * device/examples/ds390/ow390/tstfind.c,
4273         * device/examples/serialcomm/windows/serial.cpp,
4274         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4275         * device/include/reg51.h: fixed line endings for cvs
4276
4277 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4278
4279         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4280         packRegsForAccUse, packRegisters): new accumulator register
4281         packing algorithm
4282         * support/regression/ports/hc08/support.c (_putchar): suppress
4283         warning of unused variable
4284         * src/SDCCicode.c: added SWAP entry to codeTable
4285
4286 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4287
4288         * device/lib/sprintf.c: forgot to add this file before previous commit
4289
4290 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4291
4292         * src/pic16/gen.c (genPackBits): added operand right in function
4293         parameters, load result directly if p_type is POINTER (that is
4294         called by genNearPointerSet)
4295         * (genUnPackBits): added operand left in function parameters,
4296         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4297         FSR0 if accessing bitfields,
4298
4299 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4300
4301         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4302           _print_format; updated printf, sprintf, vsprintf
4303         * device/include/asm/default/features.h: corrected comment/define
4304         * device/lib/Makefile.in: added sprintf.c
4305         * device/lib/libsdcc.lib: added sprintf module
4306         * device/lib/printf_large.c,
4307         * device/lib/vprintf.c,
4308         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4309           into these 3 files
4310         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4311         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4312         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4313           hc08 test
4314         * support/regression/tests/zeropad.c: define idata as data for hc08
4315
4316 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4317
4318         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4319         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4320         labels are referenced at least once (even if a reference is not found)
4321         * src/hc08/gen.c (emitcode): set isComment flag for comments
4322         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4323         loads), rules 6a..6b (optimize jumps to return)
4324
4325 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4326
4327         * device/lib/acosf.c (acosf),
4328         * device/lib/asinf.c (asinf),
4329         * device/lib/atanf.c (atanf),
4330         * device/lib/ceilf.c (ceilf),
4331         * device/lib/cosf.c (cosf),
4332         * device/lib/coshf.c (coshf),
4333         * device/lib/cotf.c (cotf),
4334         * device/lib/fabsf.c (fabsf),
4335         * device/lib/floorf.c (floorf),
4336         * device/lib/log10f.c (log10f),
4337         * device/lib/logf.c (logf),
4338         * device/lib/sinf.c (sinf),
4339         * device/lib/sinhf.c (sinhf),
4340         * device/lib/sqrtf.c (sqrtf),
4341         * device/lib/tanf.c (tanf),
4342         * device/lib/tanhf.c (tanhf),
4343         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4344         replaced all instances of "reentrant" in the library functions
4345         defined in math.h with this macro.
4346         * support/regression/tests/float_trans.c: reenabled test for hc08
4347
4348 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4349
4350         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4351         erroneously deleted
4352
4353 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4354
4355         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4356         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4357         multi-byte volatile operands are used
4358         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4359         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4360         initialization to area GSINIT0 so that it would always precede
4361         any static initializers in GSINIT
4362         * support/regression/tests/zeropad.c: fixed idata define for hc08
4363         * support/regression/tests/bug-927659.c,
4364         * support/regression/tests/float_trans.c: disabled tests for hc08
4365         pending missing library routines
4366         * .version: increased version number to 2.4.4 - hc08 port now passes
4367         regression tests
4368
4369
4370 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4371
4372         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4373         * Makefile.common.in,
4374         * as/Makefile,
4375         * as/hc08/Makefile.in,
4376         * as/mcs51/Makefile.in,
4377         * as/z80/Makefile.in,
4378         * debugger/mcs51/Makefile.in,
4379         * device/include/Makefile.in,
4380         * device/lib/Makefile.in,
4381         * doc/Makefile,
4382         * link/Makefile,
4383         * link/z80/Makefile.in,
4384         * packihx/Makefile.in,
4385         * sim/ucsim/main_in.mk,
4386         * sim/ucsim/avr.src/Makefile.in,
4387         * sim/ucsim/doc/Makefile.in,
4388         * sim/ucsim/gui.src/serio.src/Makefile.in,
4389         * sim/ucsim/hc08.src/Makefile.in,
4390         * sim/ucsim/s51.src/Makefile.in,
4391         * sim/ucsim/xa.src/Makefile.in,
4392         * sim/ucsim/z80.src/Makefile.in,
4393         * src/Makefile.in,
4394         * support/cpp2/Makefile.in,
4395         * support/librarian/Makefile,
4396         * support/makebin/Makefile: added DESTDIR to the install path proposed
4397         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4398         * doc/sdccman.lyx: added DESTDIR documentation
4399
4400 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4401
4402         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4403         instruction for interrupt handlers, use fast returns when returning
4404         from high priority interrupts
4405
4406 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4407
4408         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4409         code generation
4410         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4411         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4412         bugs, ported much of Bernhard's code from mcs51
4413         * src/mcs51/gen.c (genSend),
4414         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4415         than one when calling a reentrant function
4416         * device/lib/_mullong.c: defined an alternate struct layout for big
4417         endian ports (hc08)
4418
4419 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4420
4421         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4422         test
4423
4424 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4425
4426         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4427         are sane and complete before asking the port its prefered parameter
4428         passing method (fixes bug #1017633)
4429         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4430         and _ret3
4431
4432 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4433
4434         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4435         problem in bitfields >= 8 bits.
4436
4437 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4438
4439         * src/SDCCsymt.c: undid changes that were not meant to be committed
4440
4441 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4442
4443         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4444
4445 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4446
4447         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4448           copied and wrong bit got inverted
4449
4450 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4451
4452         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4453         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4454         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4455         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4456         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4457         assignments to bitfields at known addresses
4458         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4459         reads from bitfields at known addresses
4460         * src/hc08/ralloc.c (packRegisters),
4461         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4462         genhc08Code): optimize pointer get values used as conditionals
4463         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4464         and branch
4465
4466 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4467
4468         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4469         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4470         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4471         as conditionals
4472
4473 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4474
4475         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4476
4477 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4478
4479         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4480         related problems
4481
4482 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4483
4484         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4485
4486 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4487
4488         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4489         mcs51 port
4490
4491 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4492
4493         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4494
4495 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4496
4497         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4498         cases use more compact code.
4499
4500 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4501
4502         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4503
4504 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4505
4506         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4507
4508 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4509
4510         * src/SDCCsymt.h,
4511         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4512         parameter of changePointer() from symbol* to sym_link*
4513         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4514         * src/SDCCsymt.c (compareType): void* type is castable to other
4515         pointers, but not necesarily an exact match.
4516         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4517         is no longer blindly treated as an exact match.
4518         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4519
4520 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4521
4522         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4523
4524 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4525
4526         * src/pic/gen.c,
4527         * src/pic/pcode.c,
4528         * src/pic/ralloc.h,
4529         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4530
4531 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4532
4533         * src/pic/device.c,
4534         * src/pic/device.h,
4535         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4536
4537 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4538
4539         * src/mcs51/gen.c (emitcode): fixed bug #992819
4540
4541 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4542
4543         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4544           there's no need to make it worse
4545
4546 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4547
4548         * src/mcs51/ralloc.c (deassignLR),
4549         * src/ds390/ralloc.c (deassignLR),
4550         * src/hc08/ralloc.c (deassignLR),
4551         * src/z80/ralloc.c (deassignLR),
4552         * src/pic/ralloc.c (deassignLR),
4553         * src/pic16/ralloc.c (deassignLR),
4554         * src/avr/ralloc.c (deassignLR),
4555         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4556         rlivePoint): fixed another part of bug #971834
4557
4558 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4559
4560         * src/z80/main.c: enabled "critical" keyword
4561         * src/z80/mappings.i,
4562         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4563         functions (fixes bug #979646)
4564         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4565
4566 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4567
4568         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4569           such as c:\mydir.
4570
4571 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4572
4573         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4574           doesn't disable too much optimizations
4575
4576 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4577
4578         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4579
4580 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4581
4582         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4583
4584 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4585
4586         * src/pic/gen.c tidied up tabs
4587         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4588         * src/pic/main.c tidied up tabs
4589         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4590         * src/pic/pcoderegs.c tidied up tabs
4591         * src/pic/ralloc.c tidied up tabs
4592
4593 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4594
4595         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4596         to S_FIXED for pic16 port and when symbol is not in level 0,
4597         allocate for S_REGISTER storage class and pic16 port, too,
4598         * src/pic16/device.h: prototype for checkSym,
4599         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4600         * (pic16_assignConfigWordValue): test the value and the mask to
4601         validate that the value is suitable for the configuration word,
4602         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4603         collect extern declared symbols, don't emit symbol twice, check
4604         first if symbol is in publics set first,
4605         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4606         * added command line '--fstack' which enables an experimental
4607         feature for stack access, too buggy to be used yet...
4608         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4609         * (pic16_allocDirReg): when register has storage class S_REGISTER
4610         allocate in pic16_dynAccessRegs,
4611         * device/include/pic16/pic18f????.h: modified configuration word
4612         naming convention, words started as CONFIG0H but should be CONFIG1H
4613
4614 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4615
4616         * device/include/mcs51reg.h: fixed bug 970993
4617
4618 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4619
4620         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4621         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4622         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4623         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4624         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4625         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4626           error/warning numbers,
4627           added function setWarningDisabled()
4628         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4629         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4630           _memcmp.c _memmove.c calloc.c realloc.c free.c
4631         * support/regression/tests/malloc.c: added tests for new functionality
4632         * support/regression/tests/zeropad.c: added tests for truncated initializers
4633           and initialized char arrays starting with '\x0'
4634         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4635
4636 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4637
4638         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4639
4640 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4641
4642         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4643         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4644         peephole 177.e. Thanks to anonymous
4645
4646 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4647
4648         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4649         function isn't used in the source but referenced as a
4650         variable initializer then declare it as extern in .asm file
4651
4652 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4653
4654         * .version: increased version number to 2.4.3
4655
4656         Adding version extension according to ChangeLog CVS revision
4657         * src/Makefile.in (target all): added dependency 'version.h'
4658         * (rule version.h): added rule to create version.h from ChangeLog,
4659         * (rule dep): added dependency version.h,
4660         * src/version.awk: AWK script to create version.h
4661         * src/SDCCdwarf2.c (dwWriteModule),
4662         * src/SDCCglue.c (initialComments),
4663         * src/SDCCmain.c (printVersionInfo): modified to write after
4664         version string the version extension number,
4665         * src/SDCCutil.c: included "version.h"
4666         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4667         number,
4668         * src/SDCCutil.h: added prototype for getBuildNumber
4669
4670         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4671         includeDirsSet, too,
4672         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4673         const char [] is found in function prototype...
4674
4675         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4676         moving to WREG with source is already in WREG,
4677         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4678         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4679         * (aopForSym): stack'ed symbols are partially supported, added
4680         if-clause to support symbols in FARSPACE,
4681         * (sameRegs): added test for AOP_ACC to see if registers are same,
4682         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4683         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4684         * (pic16_popRegFromString): will not allocate a new register if it
4685         doesn't find one by name, bug may have introduced...
4686         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4687         * (genIpush): revived to use pic16 port's stack,
4688         * (genAddrOf): added incomplete case for stack'ed operand,
4689         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4690         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4691         can handle multibyte operands,
4692         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4693         * (pic16initialComments): added message for MPLAB compatibility
4694         mode enabled,
4695         * src/pic16/main.h: prototype for pic16_mplab_comp,
4696         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4697         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4698         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4699         because of increased complexity of procedure,
4700         * (_process_pragma): stack pragma changed to format 'stack pos len',
4701         emit symbol '_stack_end' to conform with gplink,
4702         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4703         to search for register,
4704         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4705         PO_GPR_REGISTER,
4706         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4707         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4708         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4709         case for PO_GPR_REGISTER,
4710         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4711         dies, the new era is ahead !...
4712         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4713         pic16_dynInternalRegs,
4714         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4715         * (pic16_allocDirReg): minor optimizations and bug fixes,
4716         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4717
4718         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4719         load stack and frame pointer with address of 'stack_end' symbol
4720
4721 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4722
4723         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4724         without source code but only variable initializers
4725
4726 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4727
4728         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4729         external are not declared as extern to reduce overhead while linking
4730
4731 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4732
4733         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4734
4735 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4736
4737         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4738           Yee Keat for the patch
4739         * src/SDCCast.c (decorateType): fixed bug #979599
4740         * src/ds390/gen.h: removed local fReturnSizeDS390
4741         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4742         * src/ds390/gen.c (genAnd, genOr, genXor),
4743         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4744
4745 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4746
4747         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4748         add relFilesSet to $3, manipulate $2 to handle linking of object
4749         files without source files in command line,
4750         * device/include/pic16 (all headers): added ID location macros,
4751         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4752         entries for ID location bytes,
4753         * (pic16_assignIdByteValue): NEW,
4754         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4755         added field dumpcalltree to pic16_options_t,
4756         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4757         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4758         emitting rFalseIfx label after check_carry label,
4759         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4760         pic16_emitDIRegs), NEW
4761         * (pic16glue): dump .calltree file when option --calltree found,
4762         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4763         * (_pic16_genAssemblerPreamble): emit ID locations after
4764         configuration registers,
4765         * (pic16_linkCmd): modifications of the link command,
4766         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4767         * (pic16_pCodeInitRegisters): don't init stack registers,
4768         * (pic16_findPrevInstruction): fixed bug,
4769         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4770         bug with immediate registers,
4771         * (buildCallTree): traces stack push and pop,
4772         * (pct2): dump also stack usage for each function,
4773         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4774         * (pic16_allocDirReg): various modifications,
4775         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4776         fixed to 1,
4777
4778 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4779
4780         * src/pic16/pcode.c: removed buggy double colon
4781
4782 2004-07-01 Borut Razem <borut.razem AT siol.net>
4783
4784         * support/scripts/sdcc.nsi: added include/pic16 to setup
4785
4786 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4787
4788         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4789         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4790         target 'clean',
4791         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4792         specific command line arguments. Also added sample lkr script
4793         for placing a variable at a specific memory bank.
4794         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4795         at a specific memory bank,
4796         * (pic16_dump_isection): fixed bug which caused string literals to
4797         be omitted when dumping idata section,
4798         * (pic16_groupRegistersInSection): added code to handle registers
4799         in specific memory banks,
4800         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4801         public, all references are renamed too,
4802         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4803         AOP_DPTR2,
4804         * (pic16_storeForReturn): added case to handle when dest is WREG,
4805         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4806         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4807         pic16_rel_udata, check to see if that register is marked as being
4808         a member of a specific memory bank,
4809         * (pic16_printIvalCharPtr): added code to add string literals either
4810         to code or the idata sections,
4811         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4812         also accept the 'udata' pragma,
4813         * src/pic16/main.h: new structure types sectName and sectSym
4814         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4815         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4816         * (pic16_findPrevInstruction): fixed, it returned nothing,
4817         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4818         instruction combinations,
4819         * (pic16_FixRegisterBanking): heavily reorganised,
4820         * (pic16_AnalyzeBanking): if generating banksel directives is
4821         disabled, then don't call FixRegisterBanking at all,
4822         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4823         completely removed,
4824         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4825
4826 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4827
4828         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4829         Phuah Yee Keat <yk.phuah AT nestac.com>
4830
4831 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4832
4833         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4834         correctly the IVT even if it is relocated to some other location
4835
4836 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4837
4838         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4839         * device/include/pic16/pic18f2220.h: NEW,
4840         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4841         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4842         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4843         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4844         nodefaultlibs, ivt_loc is the location of the interrupt vector
4845         table, and nodefaultlibs signs that default libraries should not be
4846         linked in link stage,
4847         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4848         according to --ivt-loc argument,
4849         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4850         when pragma stack is found,
4851
4852 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4853
4854         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4855         256 (range check), 257 (do while), 258.a-f (bit banging
4856         f.e. on 3-wire SPI bus)
4857
4858 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4859
4860         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4861         variables used exclusively within a loop
4862
4863 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4864
4865         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4866
4867 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4868
4869         * src/SDCClrange.c (computeClash): fixed bug #971834
4870
4871 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4872
4873         * src/mcs51/gen.c (genCmp): fixed bug #975903
4874         * src/hc08/gen.c (operandsEqu),
4875         * src/ds390/gen.c (operandsEqu),
4876         * src/z80/gen.c (operandsEqu),
4877         * src/pic/gen.c (operandsEqu),
4878         * src/pic16/gen.c (operandsEqu),
4879         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4880         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4881
4882 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4883
4884         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4885
4886 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4887
4888         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4889         default case in switch statement,
4890         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4891         to eliminate problem with initialisation of pointers, but problem
4892         still exists,
4893         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4894         * (emitStaticSegment): removed various lines emitting debug info,
4895         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4896         added processor registers for utilizing EEPROM,
4897         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4898         configurable and set 8
4899
4900 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4901
4902         * .version: increased version number to 2.4.2,
4903
4904         Cumulative patch for pic16 port
4905         * src/pic16/device.c: changed scheme to dump initial values for
4906         variables in idata segment, all print_idata* functions were removed,
4907         now the pic16_printIval* will be called,
4908         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4909         * _pic16_printPointerType, pic16_printPointerType,
4910         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4911         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4912         NEW, similar to the respective functions in SDCCglue.c,
4913         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4914         way, emitting hex bytes,
4915         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4916
4917 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4918
4919         * src/avr/ralloc.c (serialRegAssign),
4920         * src/xa51/ralloc.c (serialRegAssign),
4921         * src/pic/ralloc.c (serialRegAssign),
4922         * src/pic16/ralloc.c (serialRegAssign),
4923         * src/hc08/ralloc.c (serialRegAssign),
4924         * src/z80/ralloc.c (serialRegAssign),
4925         * src/ds390/ralloc.c (serialRegAssign),
4926         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
4927
4928 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4929
4930         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
4931         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
4932
4933 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
4934
4935         Cumulative patch for pic16 port:
4936         * src/pic16/device.h (typedef PIC16_device) modified fields for
4937         defining microcontrollers,
4938         * src/pic16/device.c: added new info for all devices in Pics16 array,
4939         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
4940         to be optimised out by the pCode optimiser,
4941         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
4942         specially, bug reported by G.M. Gallant,
4943         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
4944         as force'd so that cannot be optimised out by pCode optimiser,
4945         * src/pic16/pcode.c,
4946         * src/pic16/pcodepeeph.c,
4947         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
4948         they are disabled by default, but can be enabled explicit with
4949         command argument --denable-peeps, for testing,
4950         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
4951         --pomit-ivt in COMPILE_FLAGS
4952
4953 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4954
4955         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
4956           compilation on MSVC
4957
4958 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
4959
4960         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
4961
4962 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4963
4964         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
4965         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
4966
4967 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
4968
4969         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
4970         would only assign 0x300001 register.
4971
4972 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
4973
4974         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
4975         in COMPILE_FLAGS. Thanks to G. Gallant for report.
4976
4977 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4978
4979         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
4980         for ds80c400
4981         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
4982         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
4983         added peephole 254 (left shift), 255 (jump table)
4984
4985 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
4986
4987         * device/lib/Makefile.in: removed comment line with model-pic16,
4988         * (target port-specific-objects-pic16): the libraries and objects
4989         are copied to the build directory form the device/lib/pic16/bin
4990         directory
4991
4992         Cumulative patch concerning pic16 port:
4993         * library directory has been re-organized,
4994         * added support for PIC18F1220,
4995         * added headers and library sources for chips 18f1220,18f6520,
4996         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
4997
4998         * configuration registers setting has changed, now each supported
4999         device has a complete description of the registers it uses,
5000         * all initialisations are moved to idata sections, these section
5001         can be absolute or relocatable,
5002         * fixed initialisation of codespace variables,
5003         * fixed warning about PCLATU and gpsim,
5004         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5005         * (genAssign): use table reads when assigning from variables in codespace,
5006         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5007         char/int variables placed in codespace,
5008         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5009         registers set in .asm file, no need for --pomit-config-words anymore,
5010         * (pic16glue): some 8051 legacy segments are commented out
5011         (to be removed completely),
5012         * added support for alternative assembler and linker with --asm=
5013         and --link= command line arguments,
5014         * peepholes are disabled automatically in the port, no need to
5015         specify on command line,
5016         * port supports natively char/int/long multiplication, but converts
5017         all divisions to support functions,
5018         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5019         to the file set in variable $2,
5020         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5021         strings in ASCII format and not in hex,
5022         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5023         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5024         allocate proper register if iCodes aren't temporary,
5025
5026 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5027
5028         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5029
5030 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5031
5032         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5033         is commented out
5034
5035 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5036
5037         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5038         computed address is reused
5039         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5040         multi-byte bitfields
5041
5042 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5043
5044         * src/z80/gen.c: (genArrayInit): must check for pointers too
5045
5046 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5047
5048         * support/regression/tests/zeropad.c: never meant to commit the
5049           nestedstruct test: removed, added check for GCC version
5050
5051 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5052
5053         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5054         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5055         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5056           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5057           bugs 928906 and 954082 half-empty initializers
5058         * src/SDCCsymt.h,
5059         * src/SDCCsymt.c (getAllocSize): added for above fix
5060         * src/z80/gen.c (genArrayInit): fixed bug 741044
5061         * support/regression/tests/zeropad.c: added tests
5062
5063 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5064
5065         * src/pic16/device.c (pic16_dump_section): corrected bug which
5066         caused some symbols of the libraries to be misplaced
5067
5068 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5069
5070         * src/pic16/glue.c,
5071         * src/pic16/ralloc.h,
5072         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5073         to fix conflict with pic port
5074
5075 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5076
5077         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5078         externs configuration variables,
5079         * src/pic16/ralloc.h,
5080         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5081         prototype in header, commented out some debug messages
5082
5083 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5084
5085         * src/pic16/glue.c,
5086         * src/pic16/main.c,
5087         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5088         for gpasm COFF object generation. Thanks to D. Hawkins for
5089         his patch info
5090
5091 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5092
5093         * src/ds390/main.c,
5094         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5095         Brock for spotting this)
5096         * src/ds390/gen.c (genEndFunction),
5097         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5098         interrupt handler and critical. Disable push/pop optimizations when
5099         peephole optimizations disabled.
5100
5101 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5102
5103         Updated pic16 library sources and headers.
5104         * device/lib/pic16/pic18f*/ ,
5105         * device/include/pic16/*.h: modified to handle structured SFR
5106         definitions
5107
5108 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5109
5110         * src/port.h (PORT structure): added hook initPaths, now each
5111         port can declare its own default search paths,
5112         which can been seen with the --print-search-dirs option,
5113         see pic16 port for example,
5114         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5115         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5116         * (doPrintSearchDirs): NEW, replaces in a central manner the
5117         printing of search dirs which was split in set*Paths functions,
5118         * (main): added call to port->initPaths and doPrintSearchDirs,
5119         * src/avr/main.c,
5120         * src/ds390/main.c,
5121         * src/hc08/main.c,
5122         * src/izt/i186.c,
5123         * src/izt/tlcs900h.c,
5124         * src/mcs51/main.c,
5125         * src/pic/main.c,
5126         * src/pic16/main.c: modified port structures to reflect addition of
5127         initPaths hook,
5128
5129         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5130         * (pic16_dump_section): for registers in same address reserve memory once,
5131         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5132         to no_banksel,
5133         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5134         result is greater in size than right or left,
5135         * (pic16_genUMult8X8_8): there are some cases where the result can
5136         be 16 bits size, so handle these,
5137         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5138         * (pic16_outBitC): modified to emit pcodes,
5139         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5140         or not,
5141         * (genDivOneByte): implemented algorithm to divide 8-bits,
5142         * (genCmp): uncommented goto, but issues still exist,
5143         * (genAnd): fixed a bug with variables >8bits,
5144         * (genPackBits): optimization added that uses BCF/BSF to change a
5145         single bit,
5146         * (genAssign): fixed bug when assigning floating point literals,
5147         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5148         __sdcc_gsinit_startup label,
5149         * src/pic16/main.c (_pic16_init): removed search directory
5150         initialisations,
5151         * (_pic16_initPaths): NEW, used to initialise search directories,
5152         * (_hasNativeMulFor): support functions for all except char/int
5153         multiplication, and char division,
5154         * (PIC16_port struct): modified entry for native mul support,
5155         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5156         no_banksel option,
5157         * (buildCallTree): call to register_usage is ifdef'ed out,
5158
5159 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5160
5161         * device/include/string.h: applied Stas Sergeev's patch to make this
5162         header file compatible with the preprocessor -Wundef option
5163         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5164         failure (fixes bug #941458)
5165
5166 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5167
5168         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5169         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5170         that the variable, not the function, should be static
5171         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5172         to be consistent with non-literal case
5173
5174 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5175
5176         * src/SDCCast.c (isConformingBody): fixed bug #949967
5177         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5178         convilong): fixed bug #952086
5179
5180 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5181
5182         * src/SDCCmem.c (allocVariables): fixed bug #955321
5183
5184 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5185
5186         * src/hc08/main.c (_hc08_genAssemblerEnd),
5187         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5188         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5189         completely eliminated the use of a temporary file
5190         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5191         when more than one file linked
5192         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5193
5194 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5195
5196         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5197         which fixes bug #543481
5198         * support/regression/tests/bug-751703.c: fixed comments left from a
5199         cut and paste error
5200         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5201         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5202         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5203         scopes
5204         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5205         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5206         are now changed to underscores in moduleName
5207
5208 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5209
5210         * as/mcs51/lkmem.c: better fix for bug #954173
5211
5212 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5213         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5214
5215         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5216         * device/include/c8051f000.h,
5217         * device/include/c8051f120.h,
5218         * device/include/c8051f300.h,
5219         * device/include/c8051f310.h,
5220         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5221         PWM16) and detab'ed
5222
5223 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5224
5225         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5226         and mailing lists, doc'ed --no-peep-comments, removed reference
5227         to knoppix (newest version has no LyX/LaTeX), other minor changes
5228         * src/SDCCglue.c (glue): save 2 bytes stack space with
5229         option --main-return. The ljmp could probably be avoided too
5230
5231 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5232
5233         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5234
5235 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5236
5237         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5238         * src/SDCCopt.c (isLocalWithoutDef),
5239         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5240         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5241         (credit to Maarten Brock for patch #949363, on which this is based)
5242         * support/regression/tests/bug-751703.c: some test cases of extern used
5243         within inner scopes.
5244
5245 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5246
5247         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5248         SPEC_STRUCT
5249         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5250         struct definitions
5251         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5252         dwWriteLabel): fix to create valid debugger symbols even when
5253         the module name has non-alphanumeric symbols in it
5254         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5255         when a variable's allocation has been optimized away
5256
5257
5258 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5259
5260         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5261         * src/hc08/main.c,
5262         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5263         * src/mcs51/main.c,
5264         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5265         * src/ds390/main.c,
5266         * src/z80/gen.c (z80_emitDebuggerSymbol),
5267         * src/z80/main.c,
5268         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5269         * src/pic/main.c,
5270         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5271         * src/pic16/main.c,
5272         * src/avr/gen.c (avr_emitDebuggerSymbol),
5273         * src/avr/main.c,
5274         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5275         * src/xa51/main.c,
5276         * src/SDCCdebug.c (emitDebuggerSymbol),
5277         * src/SDCCdebug.h,
5278         * src/port.h: added a debugger struct to the port struct. Added a
5279         callback for defining debugger symbols
5280
5281         * src/SDCCast.c (createLabel),
5282         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5283         with isitmp = 1
5284         * src/SDCCicode.h,
5285         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5286         iCode back to the ast for the function
5287
5288         * src/hc08/ralloc.c (hc08_assignRegisters),
5289         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5290         unneeded fields from the regs struct.
5291         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5292         pushReg() & pullReg() functions instead of emitcode()
5293
5294         * src/hc08/gen.c (genLabel, genhc08Code),
5295         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5296
5297         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5298         debugger hooks
5299
5300         * src/hc08/gen.c (genEndFunction, genhc08Code),
5301         * src/hc08/gen.h,
5302         * src/mcs51/gen.c (genEndFunction, gen51Code),
5303         * src/mcs51/gen.h,
5304         * src/ds390/gen.c (genEndFunction, gen390Code),
5305         * src/ds390/gen.h,
5306         * src/z80/gen.c (genEndFunction, genZ80Code),
5307         * src/z80/gen.h,
5308         * src/z80/z80.h,
5309         * src/pic/gen.c (genEndFunction, genpic14Code),
5310         * src/pic/gen.h,
5311         * src/pic16/gen.c (genEndFunction, genpic16Code),
5312         * src/pic16/gen.h,
5313         * src/avr/gen.c (genEndFunction, genAVRCode),
5314         * src/avr/gen.h,
5315         * src/xa51/gen.c (genEndFunction, genXA51Code),
5316         * src/xa51/gen.h,
5317         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5318         specific code to cdbFile.c and out of the backend code generators
5319
5320         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5321         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5322         starting address is now 0
5323
5324         * as/hc08/asm.h,
5325         * as/hc08/m08pst.c,
5326         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5327         assembler directive for DWARF support
5328         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5329
5330         * src/src.dsp,
5331         * src/Makefile.in,
5332         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5333
5334 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5335
5336         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5337         and inappropriate peephole optimization in jump tables
5338
5339 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5340
5341         * as/hc08/m08pst.c,
5342         * src/SDCCglue.c: sdccopt works for the hc08 port now
5343
5344 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5345
5346         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5347
5348 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5349
5350         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5351
5352 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5353
5354         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5355         rules
5356         * src/SDCCmain.c,
5357         * src/SDCCglobl.h,
5358         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5359         comments from the peephole optimizer replacement rules
5360         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5361         symbols
5362         * src/SDCCcse.c (updateSpillLocation),
5363         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5364         equivalents
5365         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5366         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5367         objects far pointers
5368
5369 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5370
5371         * src/SDCCsymt.h: a missing part of my last change
5372         * src/pic/ralloc.c (regTypeNum),
5373         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5374
5375 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5376
5377         * src/SDCCicode.h,
5378         * src/SDCCicode.c (aggrToPtrDclType),
5379         * src/SDCCptropt.h,
5380         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5381         ptrPseudoSymConvert),
5382         * src/pic/ralloc.c (regTypeNum),
5383         * src/pic16/ralloc.c (regTypeNum),
5384         * src/hc08/ralloc.c (regTypeNum),
5385         * src/ds390/ralloc.c (regTypeNum),
5386         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5387         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5388
5389 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5390
5391         * link/z80/lkmain.c (afile),
5392         * as/hc08/lkmain.c (afile),
5393         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5394         prevent a pointer problem when a filename has no directory and
5395         no extension specified.
5396
5397 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5398
5399         * link/z80/lkmain.c (afile): allow periods in directory names
5400         * link/z80/lkmain.c (afile),
5401         * as/mcs51/lkmain.c (afile),
5402         * as/hc08/lkmain.c (afile): allow linker script file to have an
5403         extension other than ".lnk"
5404         * link/z80/lklex.c (getfid),
5405         * link/z80/lkmain.c (parse),
5406         * as/mcs51/lklex.c (getfid),
5407         * as/mcs51/lkmain.c (parse),
5408         * as/hc08/lklex.c (getfid),
5409         * as/hc08/lkmain.c (parse): Support comments in the linker script
5410         file on lines by themselves and after filenames
5411
5412 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5413
5414         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5415
5416 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5417
5418         * src/z80/peeph-z80.def: removed some peephole rules that don't
5419         work with multibyte arithmetic (fixed bug #937126)
5420         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5421         to registers and not global variables
5422         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5423         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5424         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5425         checking for assignments not internally generated (fixed bug #931895)
5426         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5427         structure member (fixed bug #930072)
5428
5429 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5430
5431         * src/SDCCmain.c (linkEdit),
5432         * src/hc08/main.c (_hc08_parseOptions),
5433         * as/hc08/Makefile.in,
5434         * as/hc08/aslink.h,
5435         * as/hc08/asm.h,
5436         * as/hc08/m08pst.c,
5437         * as/hc08/lkrloc.c (relr, rele),
5438         * as/hc08/lkarea.c (lnkarea)
5439         * as/hc08/lkmain.c (afile, parse),
5440         * as/hc08/lkelf.c: support for ELF output
5441         * as/hc08/lks19.c (s19),
5442         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5443
5444 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5445
5446         * as/mcs51/lkihx.c: Fixed bug #899105.
5447
5448 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5449
5450         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5451         .dsp files from Unix to DOS.
5452
5453 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5454
5455         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5456         function pointers; we have been compliant for several months now.
5457         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5458         change that was accidently commented out
5459         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5460         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5461         bug #922319
5462
5463 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5464
5465         * src/hc08/gen.c: output of all of the internal debugging information
5466         is now controlled by the D() macro; it is disabled by default
5467
5468 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5469
5470         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5471         harder to keep the same registers during a CAST iCode
5472         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5473         long via int can be done in a single cast, if the signedness is
5474         correct.
5475         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5476         putchar() in tinibios.c in ds390's library
5477
5478 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5479
5480         * src/SDCCast.c (decorateType): fixed bug #898889,
5481         cast result of a literal complement too
5482         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5483         fixed check for bitfields
5484
5485 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5486
5487         * src/SDCCicode.c (geniCodeLogic): made it static,
5488         (geniCodeLogicAndOr): added in order to fix bug #905492,
5489         (ast2iCode): fixed bug #905492
5490         * support/regression/tests/bug-905492.c: added
5491         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5492         (processParms): fixed bug #927659: don't copy parms, this will clear
5493         decorated flag
5494         * support/regression/tests/bug-927659.c: added
5495
5496 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5497
5498         * src/SDCCast.c (addCast): don't cast float to char
5499         * device/lib/libsdcc.lib: added _memmove
5500
5501 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5502
5503         * device/lib/large/Makefile: fixed parallel execution by
5504         replacing `make` by `$(MAKE)`
5505
5506 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5507
5508         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5509         offsets (fixes bug #923936)
5510
5511 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5512
5513         * device/lib/small/Makefile: fixed parallel execution by
5514         replacing `make` by `$(MAKE)`
5515
5516 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5517
5518         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5519
5520 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5521
5522         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5523         * src/regression/Makefile: Regression test was not running.
5524
5525 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5526
5527         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5528         complement if possible
5529         * src/SDCCval.c (valComplement),
5530         * src/SDCCicode.c (operandOperation): fixed complement of literal
5531         * support/regression/tests/onebyte.c (testComplement): added
5532
5533 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5534
5535         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5536         return an optimized tree; actually replace actParm with the new tree
5537         * src/SDCCast.h: added some parantheses to remove side effects
5538         * support/regression/tests/bug-920866.c
5539
5540 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5541         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5542         Bit operands were not being handled properly in the pic14 port.
5543         (now src/regression/add.c passes again).
5544
5545 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5546
5547         * src/SDCC.y (labeled_statement): case and default no longer require
5548         a following statement (RFE #893037)
5549
5550 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5551
5552         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5553         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5554         disabled (fixes bug #916294)
5555         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5556         "mov a,acc"; patch provided by Lenny Story
5557         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5558
5559 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5560
5561         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5562         functions
5563         * src/ds390/gen.c (genFunction, genEndFunction),
5564         * src/ds390/ralloc.c (ds390_assignRegisters),
5565         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5566         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5567         pushed if there are parameters passed on the stack. Also, a cleaner
5568         way to decide if r0/r1 should be pushed/popped. (Together they fix
5569         bug #918693)
5570
5571 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5572
5573         * doc/sdccman.lyx,
5574         * device/lib/mcs51/crtpagesfr.asm,
5575         * device/lib/mcs51/crtxinit.asm,
5576         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5577         to avoid confusion with Si Lab's SFRPAGE register.
5578
5579 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5580
5581         * src/SDCCglue.c (emitMaps): allow public sfr variables
5582         * src/SDCCglue.c (initialComments): include compiler build date
5583         with compiler version and put the timestamp of the generated
5584         assembly file on a serperate line to be less confusing.
5585         * src/port.h: added genInitStartup hook
5586         * src/avr/main.c,
5587         * src/ds390/main.c,
5588         * src/hc08/main.c,
5589         * src/pic/main.c,
5590         * src/pic16/main.c,
5591         * src/xa51/main.c,
5592         * src/z80/main.c: genInitStartup initialize as NULL (default to
5593         historical behaviour)
5594         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5595         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5596         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5597         library instead of hard coding it into the compiler.
5598         * support/regression/ports/mcs51-stack-auto/spec.mk,
5599         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5600         * device/lib/mcs51/Makefile,
5601         * device/lib/small/Makefile,
5602         * device/lib/large/Makefile,
5603         * device/lib/mcs51/crtpagesfr.asm,
5604         * device/lib/mcs51/crtstart.asm,
5605         * device/lib/mcs51/crtxclear.asm,
5606         * device/lib/mcs51/crtxinit.asm,
5607         * device/lib/mcs51/crtclear.asm,
5608         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5609         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5610         and into user configurable files.
5611         * device/lib/clean.mk: clean mcs51 directory too
5612         * support/regression/tests/longlit.c: added static to T1 declaration
5613         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5614         accesses in the initialization code
5615
5616 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5617
5618         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5619         OSCTRIMVAL as noted in bug #916008
5620
5621 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5622
5623         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5624         in loops with multiple exits (reported as incorrect registers
5625         used by Martin Helmling in Sdcc-user list)
5626
5627 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5628
5629         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5630         made ds390 register extensions look less like error messages
5631
5632 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5633
5634         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5635         reported by Adam Wozniak in Sdcc-user list
5636
5637 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5638
5639         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5640         arithmetic optimizations, added debug output
5641
5642 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5643
5644         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5645         * sdcc.spec: updated and split sdcc into 3 rpms
5646         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5647         needed for literals of LEFT_OP and '+'
5648         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5649         introduced RESULT_TYPE_NOPROM
5650         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5651         left shift
5652         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5653         limited promotion to int only for '*'
5654         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5655
5656 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5657
5658         * src/pic16/gen.c (genSkip),
5659         (genc16bit2lit), (gencjneshort): commented out
5660         (is_LitOp): new helper function, checks operand type
5661         (genCmpEq): rewritten
5662
5663 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5664
5665         * support/regression/tests/bug-908454.c: added
5666
5667 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5668
5669         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5670         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5671         (geniCodeCast): cosmetic, don't preserve bit storage class
5672         (geniCodeLeftShift): added promotion
5673         (geniCodeLogic): fixed regression
5674         * src/SDCCsymt.c (computeTypeOr): accept bits too
5675         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5676
5677 2004-03-07  Borut Razem <borut.razem AT siol.net>
5678
5679         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5680
5681 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5682
5683         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5684         version of pic16_genPackRegisters which does not check if ic is a
5685         CAST operator,
5686         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5687         function cause string1.c regression test fails
5688
5689 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5690
5691         * sim/ucsim/configure.in,
5692         * sim/ucsim/configure,
5693         * sim/ucsim/doc/Makefile.in: use docdir
5694         * src/SDCC.y: fixed sbit atrributes
5695         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5696         * src/SDCCast.c (decorateType): |^& need special promotion handling
5697         * src/SDCCast.h,
5698         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5699         * src/SDCCsymt.h (computeType),
5700         * src/SDCCicode.c: computeType() needs op
5701         * src/SDCCsymt.c (checkTypeSanity),
5702         * doc/sddman.lyx: "plain" bitfields are unsigned
5703         * src/SDCCsymt.c (computeTypeOr): added
5704         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5705         |^& ops
5706         * src/SDCCval.c (val*): computeType() needs op
5707         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5708         * support/regression/tests/onebyte.c: added tests for |^&
5709
5710 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5711
5712         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5713         for writing icode into asm output.
5714
5715 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5716
5717         * src/pic16/device.c: added some debug lines enabled
5718         with macro DEBUG_CHECK,
5719         * src/pic16/genarith.c: more debug in genPlus,
5720         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5721         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5722         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5723         * (aopForSym): onStack symbols are re-placed in data memspace,
5724         and onStack flag is cleared,
5725         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5726         copy temporary pcodeop,
5727         * (genPcall): added warning for not updating PCLATU,
5728         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5729         always true for pic16 port,
5730         * (genMultOneWord): NEW, supports integer multiplication,
5731         * (genMult): modified to call genMultOneWord,
5732         * (ifxForOp): added warning when return NULL,
5733         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5734         flag is set before call to operandFromSymbol for implicit
5735         added structures,
5736         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5737         options.intlong_rent are set by default,
5738         * (_hasNativeMulFor): modified to allow port generation of integer
5739         multiplication,
5740         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5741         set regtype to REG_SFR for all registers, restricting seting the
5742         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5743
5744 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5745
5746         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5747         more than 500 times in the regression tests
5748
5749 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5750
5751         * support/Util/SDCCerr.h,
5752         * support/Util/SDCCerr.c,
5753         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5754         enumerator_list),
5755         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5756         for symbol conflicts.
5757         * support/valdiags/tests/enum.c,
5758         * support/valdiags/tests/tentdecl.c,
5759         * support/valdiags/tests/struct.c: expect possible error messages
5760         referring to original symbol definitions.
5761         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5762         * src/SDCCsymt.h,
5763         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5764
5765 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5766
5767         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5768
5769 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5770
5771         * src/pic16/ralloc.c (newReg): fixed bug #908929
5772
5773 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5774
5775         * src/ds390/gen.c: added missing #include "main.h"
5776
5777 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5778
5779         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5780         checking if symbol is already in set,
5781         * src/pic16/device.h: prototype for checkAddSym,
5782         * src/pic16/gen.c: (_G): added entry interruptvector,
5783         * (assignResultValue): removed some commented out lines,
5784         * (genFunction): check for ISR via sym->type, absolute section for
5785         interrupt code is created via a new pBlock, the goto instruction is
5786         placed now correctly at the interrupt vector position, changed all
5787         references from ivec to _G.interruptvector,
5788         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5789         is the interrupt is a high priority one, same for return from ISR,
5790         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5791         externs to calls of checkAddSym,
5792         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5793         pic16_pcode_verbose flag is set,
5794         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5795         * src/pic16/pcoderegs.c: message about how many registers are saved
5796         will only be emitted if pic16_pcode_verbose flag is set,
5797
5798 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5799
5800         * src/ds390/ralloc.h,
5801         * src/ds390/ralloc.c (ds390_regWithIdx),
5802         * src/ds390/gen.c (emitcode),
5803         * src/ds390/main.h,
5804         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5805         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5806         ds390operandCompare, getRegsRead, getRegsWritten,
5807         initializeAsmLineNode): customized instruction size calculation for
5808         ds390, started basis for some register optimizations
5809         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5810         corresponding assembly output
5811         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5812         missing push/pop of r0/r1. Optimized push/pops
5813
5814 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5815
5816         * src/mcs51/main.c (instructionSize): fixed ACALL size
5817         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5818
5819 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5820
5821         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5822         the sorting of rlist with NULL elements
5823         * (print_idataType, print_idata): NEW to create idata sections
5824         * src/pic16/device.h: idataSymSet new variable
5825         * src/pic16/gen.c (genFunction): fixed some bugs in string
5826         comparing, improved the absolute section creation for ISRs,
5827         added FSR0L/FSR0H in registers that are saved in an ISR,
5828         * (genInline): fixed the processing of inline snippets,
5829         now they undergo no process by the peephole optimizer
5830         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5831         are placed in idataSymSet,
5832         * (pic16emitStaticSeg): extern symbols are added in externs,
5833         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5834         switching when aboslute variables are placed in access bank memory
5835         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5836         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5837         commented out with #if,
5838         * (pic16_packRegisters): reintroduce the check for CAST because some
5839         symbols are not correctly handled,
5840         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5841         pCodeInstruction instead of pCode,
5842         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5843         pCodeAsmDir definition,
5844         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5845         directive, then the argument directive is emitted without the leading
5846         tab, hack for inline labels which must be in the first column,
5847         * (compareLabel,pic16_findNextInstruction),
5848         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5849         * (insertBankSwitch): modified for the new pCodeAsmDir,
5850
5851 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5852         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5853
5854         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5855         instance,
5856         * (pushSide): commented out with #if,
5857         * (assignResultValue): fixed some typos in saving
5858         registers,
5859         * (genPcall): FIXED and sync'ed with genCall,
5860         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5861         * (genNearPointerGet): fixed to handle some more cases,
5862         implementation scheme via table reads,
5863         * (genConstPointerGet): modified to access code memory correct,
5864         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5865         and improved to handle some cases
5866         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5867         instead of "RETLW" for init data
5868         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5869         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5870         variables are placed in access bank memory (<0x80 and >=0xf80),
5871         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5872         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5873         TBLWT_POSTDEC,TBLWT_PREINC
5874         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5875         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5876         directives
5877         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5878         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5879         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5880         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5881
5882 2004-02-29  Borut Razem <borut.razem AT siol.net>
5883
5884         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5885         support/Util/findme.h, support/Util/system.h: enhance binary relative
5886         search for lib and include by using findProgramPath()
5887
5888 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5889
5890         * src/SDCCpeeph.h,
5891         * src/SDCCpeeph.c (pcDistance),
5892         * src/port.h,
5893         * src/mcs51/ralloc.h,
5894         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5895         * src/mcs51/main.h,
5896         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5897         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5898         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5899         size calculation port specific, started basis for some register
5900         optimizations
5901         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5902         missing push/pop of r0/r1. Optimized push/pops
5903         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5904         * device/lib/_modsint.c (_modsint),
5905         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5906         and stack version so regression tests pass
5907
5908 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5909
5910         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5911         * src/SDCCast.c (decorateType): catch another small optimization
5912         with '?' operator
5913         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5914         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5915         modified to finally use computeType() all over SDCC,
5916         see Feature Request #877103
5917         * src/SDCCval.h: cosmetic
5918         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5919         valCompare(); regression tested in muldiv.c
5920         * support/regression/tests/muldiv.c (testMod): mod sign follows
5921         dividend only
5922
5923 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5924
5925         * src/SDCCast.c (decorateType): fixed bug #902362
5926         * doc/INSTALL.txt: fixed install instructions for win32
5927
5928 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
5929
5930         * device/include/Makefile.in (install): fixed by replacing spaces
5931         by tabs
5932         * doc/README.txt,
5933         * doc/INSTALL.txt: updated for release
5934         * doc/sdccman.lyx: added warning for --xstack being buggy
5935
5936 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
5937
5938         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
5939         to eliminate build warnings.
5940         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
5941
5942 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
5943            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5944
5945         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
5946         removed -penable-stack, added comment for stack pragma, added
5947         warning for not initializing the stack/frame registers, removed
5948         comment at interrupts section
5949
5950         Stack is made permanent, there is no ability to disable stack usage.
5951         * src/pic16/device.h,
5952         * src/pic16/device.c: removed all references to USE_STACK macro,
5953         * src/pic16/device.c (pic16_dump_section): when no elements in
5954         rlist, free rlist before return,
5955         * (pic16_dump_int_registers): NEW, internal registers are a new set
5956         of general purpose registers reused by each function,
5957         * (checkAddReg): returns 1 if registers is added to set,
5958         * (pic16_groupRegistersInSection): when a registers is of type
5959         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
5960         * src/pic16/device.h: memRange and Assigned Memory are deleted,
5961         SRCASECMP macro is moved here from device.c
5962         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
5963         PO_PCLATU, PO_PRODL, PO_PRODH,
5964         * (pic16_pCodeOpType, genMinus,
5965         changed compares to "a" register, with AOP_ACC,
5966         * (pic16_genPlus): fixed some bugs and indented properly,
5967         * (pic16_addSign): changed size to size+offset in the MOVWF
5968         instruction,
5969         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
5970         multiply 8-bit operand by literal, result is 8-bit,
5971         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
5972         multiply 2 8-bit operand, result is 8-bit,
5973         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
5974         genUMult8X*_16,
5975         * src/pic16/gen.c: changed accUse to contain WREG only,
5976         * (pic16_emitcomment): renamed to pic16_emitpcomment,
5977         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
5978         true, do not use immediate addressing any more unless sym is a
5979         pointer in codespace,
5980         * (aopForRemat): do not use immediate addressing when symbol not in
5981         codespace and when symbol's address is requested,
5982         * (aopOp): for-loop in if(sym->accUse) is modified for the new
5983         accUse size (= 1),
5984         * (aopGet): added case for AOP_ACC and don't return "accumulator
5985         bug" but WREG instead,
5986         * (popGetTempReg): pushes contents of temporary register in stack,
5987         * (popReleaseTempReg): pops contents of temporary register from
5988         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
5989         * (pic16_popGet): separated case AOP_ACC to return register WREG
5990         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
5991         or PO_IMMEDIATE and initializes their instance/offset appropriately,
5992         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
5993         the use of immediate pointers to certain cases only.
5994
5995         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
5996         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
5997         * (assignResultValue, genCall, genRet): modified to use the new
5998         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
5999         genPcall is still broken,
6000         * (genFunction): added code to create 'A' type pBlocks when
6001         interrupt functions are generated, code not extensively tested yet,
6002         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6003         * (genEndFunction): modified so ISRs pop stored registers from stack,
6004         * (genMultOneByte): cleanup,
6005         * (AccRsh): added flag andmask, to and result with appropriate mask,
6006         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6007         * (genDataPointerGet): fixed and reenabled its use,
6008         * (genNearDataPointerGet): bugs fixed,
6009         * (genDataPointerSet): bugs fixed,
6010         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6011         pic16_DumpSymbol, pic16_DumpOp,
6012         * src/pic16/genutils.h: function prototypes for the above functions,
6013         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6014         pointers,
6015         * (pic16emitRegularMap): many many many improvements, but needs a
6016         major cleanup,
6017         * src/pic16/main.c: enable_stack in pic16_options is removed,
6018         * (_pic16_parseOptions): removed command line options -penable-stack,
6019         * (_process_pragma): emit stack symbol only when stack pragma is
6020         processed,
6021         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6022         redirected to FSR0L/FSR0H pair,
6023         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6024         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6025         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6026         for immediates,
6027         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6028         * (dumpPicOptype): NEW,
6029         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6030         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6031         with movff instruction,
6032         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6033         added pic16_int_regs, some packRegsFor* functions are commented out,
6034         because produce errors,
6035         * src/pic16/NOTES: minor modifications
6036
6037 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6038
6039         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6040         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6041         --pack-iram.
6042         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6043         * as/mcs51/lkaomf51.c: fixed bug #895763
6044
6045 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6046
6047         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6048
6049 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6050
6051         * doc/sdccman.lyx: added details about the HC08 storage classes and
6052         interrupts, fixed the register usage info for z80 & gbz80
6053
6054 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6055
6056         * doc/sdccman.lyx: added more pic16 port documentation
6057         * device/include/pic16/: added header pic18fregs.h
6058
6059 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6060
6061         * doc/sdccman.lyx: added Vangelis' contribution
6062
6063 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6064
6065         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6066         extend to the next CALL or PCALL, not just to the next CALL.
6067
6068 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6069
6070         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6071
6072 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6073
6074         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6075         bug #895752 and a better fix for bug #716790
6076
6077 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6078
6079         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6080
6081 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6082
6083         * doc/sdccman.lyx: minor changes, minor changed
6084
6085 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6086
6087         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6088         which can't handle SDCC_NEWONEBYTEOPS,
6089         (geniCodeMultiply): removed conversion from mult to shift for pic14
6090         and pic16
6091
6092 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6093
6094         * src/hc08/gen.h,
6095         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6096         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6097         thus fixing bug #895406
6098
6099 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6100
6101         * device/lib/_modsint.c,
6102         * device/lib/_modslong.c: sign follows divisor only
6103         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6104         signs or signedness can be ignored
6105         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6106         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6107         added optimization for IFX,
6108         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6109         arguments;
6110         reenabled optimization for IFX, which was removed on 2004-01-11
6111         * src/SDCCast.h: added return type IFX
6112         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6113         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6114         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6115         SDCC_OLDONEBYTEOPS selects the old behaviour
6116         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6117         changed again and commented promotion rule
6118         * src/SDCCval.c (valDiv): promotion no longer necessary
6119         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6120         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6121         rewritten
6122         * support/regression/tests/onebyte.c: added
6123
6124 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6125
6126         * gen.c (genInline): reverted to old code for assemnling inline
6127         code because of bug reported James Chadd
6128
6129 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6130
6131         * ralloc.h: missing declarations from previous patch,
6132         seems that patch for ralloc.h was never applied, fixed
6133
6134 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6135            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6136
6137         * pcode.c,
6138         * pcode.h,
6139         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6140         indirect addressing. Marked FSR0 as deprecated
6141         * gen.c (pointerCode): commented out, not needed now
6142         (pic16_popGet2p): new MOVFF helper function
6143         (genGenPointerGet),
6144         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6145         (shiftRLong): removed duplicate debugging info
6146
6147 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6148
6149         * src/ds390/gen.c (genNearPointerGet),
6150         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6151         optimization with bits, but not bitfields.
6152         * src/ds390/ralloc.c (packRegisters),
6153         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6154
6155 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6156
6157         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6158
6159 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6160
6161         * src/SDCCsymt.h,
6162         * src/SDCCicode.c (operandFromSymbol),
6163         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6164         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6165         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6166         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6167         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6168         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6169         bug #892038
6170         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6171         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6172         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6173         * src/SDCCsymt.c (newSymbol),
6174         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6175         enumerator_list),
6176         * src/SDCCval.h,
6177         * src/SDCCval.c (newiList): fixed bug #885705
6178
6179 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6180
6181         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6182         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6183
6184 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6185
6186         * device/include/c8051f120.h,
6187         * device/include/c8051f300.h,
6188         * device/include/c8051f310.h: added/updated header files for Silicon
6189         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6190         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6191         in new section Submitting patches
6192
6193 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6194
6195         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6196         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6197         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6198         genGenPointerSet),
6199         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6200         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6201         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6202         genGenPointerSet),
6203         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6204         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6205         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6206         genGenPointerSet),
6207         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6208         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6209         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6210         genGenPointerSet): fixed bug #892400
6211         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6212         to eliminate build warnings.
6213         * src/SDCCast.c (processParms),
6214         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6215         fixed bug 751859
6216         * support/valdiag/valdiag.py: added GCC to the list of defines active
6217         when compiling with gcc
6218
6219 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6220
6221         * support/Util/SDCCerr.h,
6222         * support/Util/SDCCerr.c,
6223         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6224         with an incomplete type (fixed bug #883734)
6225         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6226
6227 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6228
6229         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6230
6231 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6232
6233         * src/SDCCast.c (decorateType),
6234         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6235         function pointer implementation
6236         * support/regression/tests/funptrs.c: added tests to verify both forms
6237         of function pointers work correctly. Added tests to verify parameters
6238         are passed in the correct order.
6239
6240 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6241
6242         * device.c (regCompare): registers are sorted by ascending
6243         address and increasing size,
6244         * main.c (_pic16_finaliseOptions): removed the declaration
6245         of compiler macro MCU. Now a macro of the format pic18fxxxx
6246         will be defined from the command line
6247
6248 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6249             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6250
6251         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6252         PCOP_RLCF was overwritten!
6253         * gen.c (genSkip): commented out calls to pic16_emitcode,
6254         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6255         * (genlshTwo),
6256         * (genRRC): added debugging info,
6257         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6258         overwritten while shifting,
6259         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6260         overwritten while shifting,
6261         * (AccLsh),
6262         * (AccRsh),
6263         * (shiftLLeftOrResult),
6264         * (shiftRLeftOrResult),
6265         * (shiftRLong),
6266         * (shiftLLong): Implemented with pic16_emitpcode
6267         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6268         * (genLeftShift): Fixed bug, operand for shift by variable always
6269         was "and"ed with 0x0f,
6270         * (genLeftShiftLiteral),
6271         * (genrshTwo),
6272         * (genRightShiftLiteral): added debugging info,
6273         * (genrshFour): added comment,
6274         * (genRightShift): determined signedness from operand "left"
6275         instead of "result"
6276
6277 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6278
6279         * src/SDCCicode.c (geniCodeParms),
6280         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6281         function pointers, fixed function pointer bugs #861242 and #861896
6282
6283 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6284
6285         * device/include/c8051f000.h,
6286         * device/include/c8051f120.h,
6287         * device/include/c8051f300.h: added header files for Silicon
6288         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6289
6290 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6291
6292         * src/SDCCast.c (processParams): added new type flow and restructured
6293         (gatherAutoInit): added new type flow
6294         (addCast): cosmetic changes
6295         (getLeftResultType): added new type flow for array indices, patch
6296         provided by Stas, see FR #877103
6297         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6298         array index patch by Stas
6299         * src/SDCCast.h: added prototype getResultTypeFromType()
6300         * src/SDCCval.h,
6301         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6302         * src/pic/glue.c (pic14emitStaticSeg),
6303         * src/pic16/glue.c (pic16emitStaticSeg),
6304         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6305         for initialization of symbols
6306         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6307         * support/Util/SDCCerr.h:
6308         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6309         * .version: bumped version number to 2.3.8
6310         * device/include/Makefile.in (install),
6311         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6312         avoid warnings
6313
6314 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6315
6316         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6317         Slade Rich fixed an optimization bug
6318         * src/pic/pcodepeep.c,
6319         * src/pic/pcoderegs.c
6320         * doc/Makefile (install): added test for directory
6321
6322 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6323
6324         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6325         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6326         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6327         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6328         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6329         * as/mcs51/asexpr.c (term),
6330         * as/hc08/asexpr.c (term): fixed bug #887146
6331
6332 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6333
6334         * src/z80/gen.c (genMult): handle single byte result product
6335         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6336         DUMMY_READ_VOLATILE (fixed bug #886367)
6337
6338 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6339
6340         * support/regression/tests/libmullong.c: fixed logic, on little endian
6341         hosts we ended without a mullong_wrapper()
6342
6343 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6344
6345         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6346         virus/worm forged address usage.
6347
6348 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6349
6350         Fixed promotion, it should be done on AST level:
6351         * src/SDCCast.c (addCast): added promotion to int
6352         (decorateType): updated call to upCast()
6353         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6354         usualUnaryConversions()
6355
6356 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6357
6358         * support/regression/tests/literalop.c (mulWrapper): Added a
6359         wrapper to remove integer overflow warnings.
6360
6361         * support/regression/tests/float_trans.c: Made work on host.
6362
6363         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6364         location of sz80.
6365
6366         * support/regression/generate-cases.py (main): Changed from inline
6367         to a main method.
6368
6369         * doc/Makefile (install): Changed to depth first to get rid of
6370         missing directory install warning.
6371
6372         * as/Makefile (install-doc): Made work on Mac.
6373
6374 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6375
6376         * src/SDCCast.c: added an additional type flow in decorateType() of
6377         opposite direction, see feature request #860006; it's enabled at runtime
6378         by setting the environment variable SDCC_NEWTYPEFLOW
6379         * src/SDCCast.h: changed prototype of decorateType()
6380         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6381         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6382         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6383         see feature request #877103
6384         * src/SDCCval.c: updated call of decorateType()
6385         (valBitwise): fixed bug #882876
6386         (valMinus): added promotion
6387         (valLogicAndOr): result is unsigned
6388         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6389         * src/SDCCsymt.c (computeType),
6390         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6391         must not cause an unsigned operation
6392         * src/pic/glue (pic14emitRegularMap),
6393         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6394
6395 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6396
6397         * src/pic/pcode.c (PCodeID): commented out left over debug code
6398
6399 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6400
6401         * support/valdiag/tests/overflow.c: added shift tests
6402         * src/pic/device.c,
6403         * src/pic/gen.c,
6404         * src/pic/gen.h,
6405         * src/pic/glue.c,
6406         * src/pic/main.c,
6407         * src/pic/pcode.c,
6408         * src/pic/pcode.h,
6409         * src/pic/pcodepeep.c,
6410         * src/pic/pcoderegs.c,
6411         * src/pic/ralloc.c,
6412         * src/pic/ralloc.h: applied patch from Slade Rich;
6413         added support for multiple code pages and multiple RAM banks on the
6414         PIC 14 port. The ASM files now no longer simply assume all the
6415         code / RAM are in the same page / bank. This means the linker can
6416         safely allocate code/RAM of separate ASM files to different pages/banks.
6417         * doc/sdccman.lyx: added Slade's tips
6418         * src/mcs51/peeph.def: fixed bug #880768
6419
6420 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6421
6422         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6423         * src/SDCCast.c (decorateType): fixed bug #880197
6424
6425 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6426
6427         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6428         getopt.h.
6429
6430         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6431         strtof is not part of C89 and isn't included with Mac OS X.
6432
6433 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6434
6435         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6436         shiftL2Left2Result): fixed bug #879326
6437         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6438         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6439         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6440         address fetch for clr instruction
6441         * device/lib/hc08/_mulint.c: created optimized assembly version
6442         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6443
6444 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6445
6446         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6447         proposed in FR #877103
6448
6449 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6450
6451         * src/SDCCval.c (cheapestVal): added missing checks
6452         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6453         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6454
6455 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6456
6457         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6458         equal operands
6459
6460 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6461
6462         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6463         loaded with the linker search paths (-L arguments) and the libraries
6464         to be linked with the current source (-l arguments). Changes
6465         currently will affect only the pic16 port.
6466         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6467         include path the port specific paths and port specific libraries,
6468         * gplink command now contains the $3 argument,
6469         * src/pic16/device.h,
6470         * src/pic16/device.c,: structure PIC_device is made public and
6471         renamed to PIC16_device, the same for variable Pics which is renamed
6472         to Pics16. Updated all references to them.
6473         * src/pic16/glue.c (pic16glue): corrected bug with code
6474         initialization which bypassed the variable initializations block.
6475
6476         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6477         COMPILE_FLAGS and added the --nostdinc option
6478
6479 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6480
6481         * device/include/mc68hc908jb8.h: Register defs for another member
6482         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6483
6484 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6485
6486         Documenting changes from previous commits.
6487         * configure.in (version 1.56),
6488         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6489         when generating output files to configure the pic16 library,
6490         but now I've commented it out, since gputils aren't installed in the
6491         SF compile farm, so library won't compile
6492
6493         * device/lib/Makefile.in (version 1.56): initially I've added in
6494         target 'all' the prerequestive 'model-pic16' so it compiled the
6495         pic16 library, but now I've commented it out for the same reasons
6496         above,
6497         * added targets 'model-pic16' and 'objects-pic16' to compile the
6498         library
6499         * added target 'port-specific-objects-pic16' to handle the
6500         generated libraries and copy them into the build/ directory
6501         * added target 'clean-intermediate-pic16' to clean intermediate
6502         files into pic16 directory
6503         * in target 'installdirs' added line to create directory pic16 in
6504         the installation path
6505
6506         * device/include/Makefile.in (version 1.11): in target 'install'
6507         added lines to copy all header files to installation path,
6508         * in target 'installdirs' added line create directory for pic16
6509         headers in the installation path
6510
6511 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6512
6513         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6514          a function call
6515
6516 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6517
6518         * configure,
6519         * device/lib/configure.in,
6520         * device/lib/configure: fixed for autoconf 2.57
6521
6522 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6523
6524         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6525         option so that it actually works. Made it specific to the z80, since
6526         the gbz80 doesn't have these kinds of I/O ports.
6527
6528 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6529
6530         * device/include/z180.h,
6531         * device/lib/_memcpy.c,
6532         * device/lib/_memmove.c,
6533         * device/lib/_mulint.c,
6534         * device/lib/ser_ir.c,
6535         * device/lib/ser_ir_cts_rts.c,
6536         * device/lib/_strcmp.c,
6537         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6538         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6539         portmode; added deprecation warning for bank= and protmode= forms.
6540         Also, guard against buffer overflow.
6541         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6542
6543 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6544
6545         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6546         changed interrupt vector table generation to only emit declared vectors.
6547         * device/include/Makefile.in: added missing backslash
6548         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6549
6550 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6551
6552         Mainly changes to support compilation of the device libraries
6553         * src/pic16/device.c: stack is allocated via symbol and not
6554         via literal number. The symbol is placed in the corresponding
6555         position of the data ram
6556         * (pic16_dump_section): relocatable and absolute uninitialized
6557         data are now emitted in sorted order to reduce section naming,
6558         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6559         weren't marked as being in the access bank,
6560
6561 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6562
6563         Added portion of GNU PIC Library under the directory
6564         device/include/pic16 and device/lib/pic16. These files
6565         contain the declarations of SFRs for the PIC18Fxx2 devices.
6566         The directory is initialized via configure from toplevel.
6567
6568 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6569
6570         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6571         the spilllocations to be compared correctly
6572
6573 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6574
6575         * src/SDCCast.c (decorateType): fixed bug introduced today
6576
6577 2004-01-12  Borut Razem <borut.razem AT siol.net>
6578
6579         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6580         doc/sdccman.lyx: upper case pragmas are deprecated
6581
6582 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6583
6584         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6585         in simpler and even better code
6586
6587 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6588
6589         * src/SDCCicode.c (operandOperation): fixed bug #874819
6590         * src/SDCCast.c (decorateType): fixed
6591         char foo (unsigned long ul) { return ul > 0; }
6592
6593 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6594
6595         * doc/sdccman.lyx: Moved and added some sections, small changes
6596         all over. Telling LaTeX to be less strict with word spacing
6597         to better keep the right margin. Changed some notes about
6598         maintainance of the ports in section 3.2.1 - is it OK like this?
6599
6600 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6601
6602         SDCC source changes:
6603         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6604         convilong): modified to inform the pic16 port that builtin functions
6605         are external
6606
6607         PIC16 PORT specific changes:
6608         * src/pic16/device.c pic16_dump_equates() added,
6609         processor registers declared internally by the port are emitted in
6610         the translation as equates,
6611         * src/pic16/gen.c: inline code is passed unprocessed to the
6612         translation,
6613         * (pic16_popGetLit2): fnuction modified to take second operand as
6614         pCodeOp pointer and not as literal,
6615         * (popRegFromIdx): prefixed with pic16_,
6616         * (pic16_popCombine2): modified to receive already allocated pCode
6617         operands,
6618         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6619         * (genFunction): initializes local stack frame and pushes on stack
6620         all the registers used by this function,
6621         * (genEndFunction): restores all registers from stack and restores
6622         stack frame,
6623         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6624         improvements,
6625         * (pic16glue): changed the program startup sequence,
6626         * added new dbName code 'A' for functions placed in absolute section
6627         * src/pic16/main.c: added function attribute _naked,
6628         * added pragma 'code' to place a fnuction at an absolute address,
6629         * added command line arguments --debug-ralloc and --pcode-verbose,
6630         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6631         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6632         * (pic16_newpCodeOpLit2): modified to take the second operand as
6633         pCodeOp pointer,
6634         * (pic16_printpBlock): modified to emit each function in a separate
6635         section,
6636         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6637         UPPER for immediate operands,
6638         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6639         instruction,
6640         * src/pic16/peeph.def: all peepholes with movff are commented out,
6641         because there is a problem in the pcode peep optimizer,
6642         * src/pic16/ralloc.c: the register allocator can now reuse local
6643         function symbols for another function. This saves register usage.
6644         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6645
6646         Added file src/pic16/NOTES with information about program writing on
6647         the current port version.
6648
6649 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6650
6651         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6652         and peephole 252 (array access)
6653
6654 2004-01-09  Borut Razem <borut.razem AT siol.net>
6655
6656         * src/SDCCmain.c : fixed #872250: -l command line defined library
6657           files are scanned before standard library files
6658
6659 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6660
6661         * src/SDCCast.c (decorateType): fixed bug #874046
6662
6663 2004-01-09  Borut Razem <borut.razem AT siol.net>
6664
6665         * support/scripts/sdcc.nsi: remove previous installation
6666
6667 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6668
6669         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6670         bytes for last interrupt vector (mcs51)
6671         * sdcc.spec: fixed typo
6672
6673 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6674
6675         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6676         gen51Code): more efficient parameter receive for --model-large
6677         ("bug" #845294)
6678
6679 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6680
6681         * src/ds390/main.c,
6682         * src/z80/main.c: added missed needLinkerScript flags (more than
6683         one port structure defined in these file)
6684         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6685         bug #795325
6686
6687 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6688
6689         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6690         * src/port.h: added flag needLinkerScript in port->linker
6691         structure to inform whether to create a .lnk file or not,
6692         * src/avr/main.c,
6693         * src/ds390/main.c,
6694         * src/hc08/main.c,
6695         * src/mcs51/main.c,
6696         * src/pic/main.c,
6697         * src/pic16/main.c,
6698         * src/xa51/main.c,
6699         * src/z80/main.c: changed appropriately to configure
6700         needLinkerScript flag
6701         * src/pic/gen.c,
6702         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6703         * src/pic/glue.c: added variable udata_section_name to
6704         override default uninitialized data segment definition for
6705         devices only with SHAREBANK memory (reported from Erik Epetrich)
6706         * (pic14emitOverlay): modified to emit a commented overlay segment
6707         directive when no overlay data exist
6708         * (picglue): modified to emit uninitialized data segment
6709         according to udata_section_name
6710         * src/pic/main.c (_pic14_parseOptions): added command line
6711         options --udata-section-name=[name] to override default
6712         udata definition name
6713         * modified _linkCmd and _asmCmd to include compiler passed
6714         arguments via -W option
6715         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6716         object file from '.rel' to '.o' in port->linker structure,
6717         changed size of fptr from 2 to 3 in port structure
6718
6719 2004-01-07  Borut Razem <borut.razem AT siol.net>
6720
6721         * support/scripts/sdcc.nsi: update PATH
6722         * support/scripts/sdcc.ico: craeted
6723
6724 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6725
6726         * device/include/Makefile.in: fix install
6727         * doc/Makefile: fix install
6728
6729 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6730
6731         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6732         in bug #860505
6733         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6734         how the function variable allocation summary is displayed; also
6735         include information about variables allocated to the overlay
6736         segment
6737
6738 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6739
6740         * as/mcs51/lkmain.c: Help about -Y option
6741         * as/mcs51/lkarea.c: Fixed gcc warnings
6742
6743 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6744
6745         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6746         fixed warning
6747         * support/valdiag/tests/overflow.c: added
6748         * src/SDCCast.c (decorateType),
6749         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6750         LEFT_OP (left shift)
6751
6752 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6753
6754         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6755         (default behaviour).
6756
6757 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6758
6759         A python script to validate compiler diagnostic messages. It can be
6760         used to verify that sdcc complains about bad c source code and
6761         gives a good location of the error.
6762         * support/valdiag/Makefile,
6763         * support/valdiag/valdiag.py,
6764         * support/valdiag/tests/*
6765
6766 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6767
6768         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6769         * src/SDCCsymt.c (newEnumType),
6770         * src/SDCCsymt.h
6771         * support/Util/SDCCerr.c,
6772         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6773         enum related bugs.
6774         * support/regression/tests/enum.c: added test for enum values that
6775         require at least 2 bytes of storage.
6776
6777 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6778
6779         * src/common.h: added ifndef/define/endif macros
6780         around the header file.
6781         Bug reported from Jesus Calvino-Fraga
6782
6783 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6784
6785         * sdcc.spec: updated
6786         * device/include/Makefile.in: don't install CVS directories
6787         * device/lib/Makefile.in: added removal of CVS directories after install
6788         * doc/Makefile: fixed install, added local_icons
6789         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6790         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6791         * src/ds390/gen.c (genRightShift): fixed bug #870788
6792         * src/SDCCast.c (decorateType): fixed bug #870781
6793
6794 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6795
6796         PIC16 port related changes:
6797         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6798         added variable stackPos,
6799
6800         * gen.c: genCall, assignResultValue: added support for
6801         pushing/retrieving function parameters to/from stack,
6802         genFunction,genEndFunction: setup stack frame for the
6803         generated function,
6804         genAddrOf: will be changed according to bug 863624
6805
6806         * added files genutils.c and genutils.h which contain gen*
6807         debugged and optimised functions extracted from gen.c
6808
6809         * glue.c: added variable 'externs' which holds extern symbols,
6810         pic16emitRegularMap: is modified to properly handle relocatable
6811          symbols under the new scheme,
6812         pic16createInterruptVect: is modified
6813         pic16printPublics: is modified to emit 'global' assembler directives,
6814         added pic16_printExterns to print extern symbols,
6815         pic16glue: initializes stack/frame pointer in the beginning of
6816         the assembly output. Temporary hack, will be corrected later,
6817         because gplink yet does not support stack and SDCC does not
6818         yet support a type of crt0.o object to create the final binary.
6819
6820         * Removed many lines that contain 8051 legacy code.
6821         * The code is finally placed under a 'code' directive.
6822         * Added port specific options.
6823
6824         * _process_pragma: simplified since now we do not need *special*
6825         include file to define SFR registers. But a separate header
6826         will be needed. This will be developed later.
6827         * _pic16_parseOptions: added, parses port specific options:
6828         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6829         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6830         --preplace-udata-with=
6831
6832         * _pic16_setDefaultOptions: modified to initialize section names,
6833         but hack is temporarly out of order since it needs improvement.
6834         * _pic16_genAssemblerPreamble: configuration words are emitted by
6835         their address instead of their name. This part is incomplete and
6836         supports only the 18Fxx2 devices. Other devices will emit an error
6837         during assembly since they do not contain the same set of config
6838         registers
6839         * _pic16_genIVT: is modified,
6840
6841         * pcode.c: added definitions for some hardware registers that are needed
6842         for stack support
6843         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6844         All PCI entries are updated. Now LFSR is supported.
6845         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6846         * added pic16_newpCodeOpLit2 to support instructions with
6847         two literal arguments
6848         * pic16_pCode2str: corrected code that emits assembler instructions
6849         with two literal operands and those that have an access bit modifier
6850         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6851         this fixes a bug which caused some labels to be lost, when an
6852         assembler directive was added, i.e. banksel,
6853         * pic16_FixRegisterBanking: improved logic that causes the insertion
6854         of bank switching,
6855         * InlineFunction: functions that are called once, are not any more
6856         inlined. This can be a port option in the future,
6857
6858         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6859
6860         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6861         hold the corresponding uninitialized symbols,
6862         * pic16_allocProcessorRegister: registers have explicit marked the
6863         accessBank field,
6864         * pic16_allocInternalRegister: registers are explicit marked as
6865         not used,
6866         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6867         processing list, so bit registers were lost,
6868         *
6869
6870         * ralloc.h: added field 'accessBank' and original symbol operand
6871         in register definition,
6872         * removed the field isMapped from register definition,
6873
6874         ** Several functions have been removed from various sources:
6875         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6876         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6877         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6878         pic16_assignRelocatableRegisters
6879
6880         ** others have been introduced:
6881         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6882         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6883
6884 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6885
6886         * support/scripts/inc2h.pl: changed definition of BIT_AT
6887         to emit 'sbit at' instead of 'bit at'. This was a request.
6888
6889         PIC16 port related preliminary changes:
6890         * gen.c: prefixed function popRegFromString with
6891         pic16_ and all references to it corrected
6892         * pcode.c: all pic16_pc_* hardware registers prefixed
6893         with underscore (_),
6894         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6895         * ralloc.c: newReg(): when register is REG_SFR then
6896         set address to rIdx,
6897         pic16_allocProcessorRegister(): marks register wasUsed=0
6898         pic16_writeUsedRegs(): added a call to assign processor
6899         registers via pic16_assignFixedRegisters
6900
6901 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6902
6903         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6904         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6905         variables in unused register banks.  Also the SSEG is placed
6906         wherever there is enough space for it, and IDATA can be anywhere
6907         in internal RAM.  For now compile using -Wl-Y[stack_size].
6908         The mem file is different for this option as well, since it
6909         makes no sense of talking about DSEG lenght.
6910
6911 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6912
6913         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6914         in certain cases, e.g. when ROM assignment, patch provided
6915         from Albert den Haan.
6916
6917 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6918
6919         Many signedness and type propagation fixes:
6920         * src/SDCCicode.c: made geniCodeCast() static
6921         replaced SPEC_ by IS_ (cosmetic)
6922         (operandOperation): fixed div and mod operation
6923         (usualBinaryConversions): added support for promotion of char
6924         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6925         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
6926         (geniCodeAdd): an array index will stay unsigned, even if promoted
6927         from char to int
6928         (geniCodeArray): ditto
6929         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
6930         * src/SDCCsymt.c (computeType): added more support for char;
6931         promotion of char is selectable by promoteCharToInt, fixed signedness
6932         for all cases
6933         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6934         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
6935         * src/SDCCval (val*): replaced signedness calculation by
6936         computeType()
6937         rearranged if-branches (cosmetic)
6938         (valShift): added warning W_SHIFT_CHANGED
6939         (valCompare): fixed problem with different types
6940         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
6941         * support/regression/tests/literalop.c: added many cases
6942         * support/regression/tests/ast_constant_folding.c: changed finally to
6943         'unsigned int'
6944         * .version: new year, new version: 2.3.7
6945         * src/SDCCmain.c (main): applied patch #866468
6946         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
6947         provided by Scott Bronson
6948         * doc/sdccman.lyx: updated documentation for sdcdb
6949         updated and added chapter tips
6950
6951 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6952
6953         * src/SDCCsymt.h: missing from yesterday's commits
6954
6955 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6956
6957         * src/SDCC.y (struct_or_union_specifier),
6958         * support/Util/SDCCerr.c,
6959         * support/Util/SDCCerr.h: verify that struct & union tags are used
6960         as declared.
6961
6962 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6963
6964         * src/SDCCglobl.h: missing from yesterday's commits
6965
6966 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6967
6968         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
6969         sft_attributes, struct_declaration, parameter_declaration,
6970         type_name, start_block, declaration_list),
6971         * src/SDCC.lex (check_type): support redefinition of typedef names
6972
6973 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6974
6975         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
6976         aligned xdata arrays. Erik helped me with the if clause.
6977
6978 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6979
6980         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
6981         warning
6982
6983 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6984
6985         * src/SDCCast.h,
6986         * src/SDCCast.c (newAst_),
6987         * src/SDCCicode.h,
6988         * src/SDCCicode.c (ast2iCode, newiCode),
6989         * src/SDCCglobl.h,
6990         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
6991         expr, statement, expression_statement, selection_statement,
6992         iteration_statement, expr_opt, jump_statement): foundation for tracking
6993         sequence points
6994         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
6995         point code too)
6996
6997 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6998
6999         * support/Util/SDCCerr.c,
7000         * src/SDCCast.h,
7001         * src/SDCCast.c (createCase, createDefault, decorateType),
7002         * src/SDCClabel.c (labelUnreach),
7003         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7004         to error messages.
7005         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7006         (with thanks to Stas Sergeev)
7007         * device/include/time.h,
7008         * device/lib/time.c (CheckTime): suppress unreachable code warning
7009
7010 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7011
7012         * src/SDCCast.c (createIvalCharPtr),
7013         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7014         bug #753752)
7015         * support/regression/tests/nullstring.c: tests for these two bugs
7016
7017 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7018
7019         * support/Util/SDCCerr.h,
7020         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7021         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7022         about storage class and 'at' used inside struct or union
7023         * src/SDCCBBlock.c (iCodeFromeBBlock),
7024         * src/SDCCcse.c (ifxOptimize),
7025         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7026         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7027         printIval, emitStaticSeg, emitOverlay),
7028         * src/SDCClabel.c (deleteIfx),
7029         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7030         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7031         gatherAutoInit, processParms),
7032         * support/Util/SDCCerr.h,
7033         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7034         reporting for post-parse errors.
7035
7036 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7037
7038         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7039         implicit casts via union; they don't work on big endian systems
7040         (possible fix for bug #861138)
7041
7042 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7043
7044         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7045         * src/mcs51/main.c: fixed the fix for bug #737001
7046
7047 2003-12-15  Borut Razem <borut.razem AT siol.net>
7048
7049         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7050
7051 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7052
7053         * support/makebin/makebin.c: put output in binary mode
7054
7055 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7056
7057         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7058         xdata and data memory on startup. Set the environment variable
7059         SDCC_NOGENRAMCLEAR to disable this.
7060         * src/mcs51/peephole.def,
7061         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7062         (allows non-interrupt and interrupt code to safely compete for a resource
7063         without the non-interrupt code having to disable interrupts)
7064
7065 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7066
7067         * src/SDCCicode.c (geniCodeAdd),
7068         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7069         with valFromType if type might be a pointer and host is big endian).
7070         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7071         types, not just integer types.
7072         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7073         multiply defined with mismatching "at" address.
7074
7075 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7076
7077         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7078         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7079         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7080         with embedded nulls (fixed bug #753752)
7081
7082 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7083
7084         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7085         Apparently this did not see much testing (endless loop)
7086
7087 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7088
7089         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7090
7091 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7092
7093         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7094         gracefully handle NULL memmap pointers
7095
7096 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7097
7098         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7099         instead of deleting the iCode when an operand is volatile
7100         * src/z80/gen.c (genDummyRead),
7101         * src/mcs51/gen.c (genDummyRead),
7102         * src/ds390/gen.c (genDummyRead),
7103         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7104         not just IC_RIGHT
7105         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7106         * src/SDCC.y: fixed bug #850420
7107
7108 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7109
7110         Applied z80 i/o port patch from Peter Townson and fixed some operators
7111         to better handle operands in A register.
7112         * device/include/z180.h
7113         * src/SDCC.y
7114         * src/SDCCglue.c
7115         * src/z80/gen.c
7116         * src/z80/gen.h
7117         * src/z80/main.c
7118         * src/z80/peeph-z80.def
7119         * src/z80/peeph.def
7120         * src/z80/z80.h
7121
7122 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7123
7124         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7125
7126 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7127
7128         * device/lib/hc08/_mullong.c: Removed extra #endif
7129
7130 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7131
7132         * sim/ucsim/hc08.src/inst.cc,
7133         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7134         carries from x to h
7135         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7136         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7137         * device/include/stdarg.h: fixed varargs for hc08
7138         * device/lib/Makefile.in,
7139         * device/lib/hc08/Makefile,
7140         * device/lib/hc08/_mulint.c,
7141         * device/lib/hc08/_mullong.c: fixed some endian problems
7142
7143 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7144
7145         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7146         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7147         * device/lib/_gptrget.c,
7148         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7149
7150 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7151
7152         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7153         * src/SDCCast.c (astErrors): fixed bug #846007
7154         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7155
7156 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7157
7158         * src/SDCCast.c (decorateType): disabled a transformation I added in
7159         revision 1.188 (access to fields of a structure at an absolute address);
7160         it breaks with bitfields, extern declarations, and gcse analysis.
7161         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7162         could be assigned through a pointer, so don't complain.
7163         * src/SDCCast.c (astErrors),
7164         * src/SDCCast.h,
7165         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7166
7167 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7168
7169         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7170         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7171         output of __config directives, since gpasm now supports them
7172         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7173         pre-processor macro, i.e. -DMCU=p18f452
7174         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7175         and modified to handle 'cast' icode similarly to '=' icode
7176         * src/pic16/device.h (typedef struct PIC_device): added field
7177         'extMIface' to indicate that chip has external memory interface
7178         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7179         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7180         18F8720
7181
7182 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7183
7184         * src/SDCC.y (pointer): fixed bug #846006
7185         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7186         * src/SDCCast.c (decorateType): fixed bug #846009
7187         * src/ds390/peeph.def,
7188         * src/ds390/gen.c (genAnd, genOr),
7189         * src/mcs51/peeph.def,
7190         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7191
7192 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7193
7194         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7195         * src/SDCCdflow.c
7196         * src/SDCCcse.c
7197         * src/SDCCcse.h
7198         * src/SDCCBBlock.h
7199         * src/SDCCBBlock.c
7200
7201 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7202
7203         fixed bug #845089
7204         * src/SDCCbitv.h,
7205         * src/SDCCbitv.c: added function to free a bitvector
7206         * src/SDCClrange.h,
7207         * src/SDCClrange.c: added function to recompute the liveranges
7208         * src/avr/ralloc.c,
7209         * src/ds390/ralloc.c,
7210         * src/hc08/ralloc.c,
7211         * src/mcs51/ralloc.c,
7212         * src/pic/ralloc.c,
7213         * src/pic16/ralloc.c,
7214         * src/xa51/ralloc.c,
7215         * src/z80/ralloc.c: recompute the liveranges after register packing
7216
7217 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7218
7219         * src/SDCCloop.c (newInduction): fixed bug #845630
7220
7221 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7222
7223         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7224         inadvertantly left behind from my 2003-11-12 change
7225
7226 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7227
7228         Updated headers I neglected to commit yesterday.
7229         * src/SDCClrange.h,
7230         * src/SDCCicode.h
7231
7232 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7233
7234         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7235         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7236         * src/SDCCopt.c (eBBlockFromiCode),
7237         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7238         the creation of the key hash table from the sequencing so it can be used
7239         earlier (for some GCSE bug fixes still pending)
7240
7241 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7242
7243         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7244         * support/regression/tests/addsub.c: testing genPlus shortcut
7245
7246 2003-11-15  Borut Razem <borut.razem AT siol.net>
7247
7248         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7249
7250 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7251
7252         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7253         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7254         ordering is immaterial.
7255         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7256
7257 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7258
7259         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7260         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7261         (SIGSEV) of bug #840381
7262         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7263         unlink new file before rename if new and old filenames are the same)
7264
7265 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7266
7267         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7268         uninitialized variables) for the mcs51. Set environment variable
7269         SDCC_GENRAMCLEAR to test.
7270         xdata initialization slightly shorter
7271
7272 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7273
7274         * src/SDCCsymt.h,
7275         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7276         #838241 & 780691 (basicly the same bug)
7277         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7278         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7279
7280 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7281
7282         * src/SDCCmain.c (linkEdit): "fix" #834252
7283
7284 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7285
7286         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7287         * src/SDCCast.h,
7288         * src/SDCC.y: fixed bug #819403
7289
7290 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7291
7292         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7293         the reentrant attribute.
7294         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7295         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7296         simulation
7297         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7298         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7299         erroneously reduced to a literal.
7300         * src/hc08/ralloc.c (packRegisters, rematStr),
7301         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7302         some cases
7303
7304 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7305
7306         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7307         * doc/sdccman.lyx: changed from 'article' to 'book'
7308         * doc/Makefile: readded test_suite_spec and cdbfileformat
7309
7310 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7311
7312         * device/include/stdlib.h: include malloc.h to comply with ANSI
7313         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7314
7315 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7316
7317         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7318         * doc/clean.mk: also remove *.out files
7319         * doc/sdccman.lyx: some additions, larger top/bottom margins
7320
7321 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7322
7323         * src/SDCC.y: fixed bug #837365
7324         * support/regression/tests/bitopcse.c
7325         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7326         a symbol (might be valop instead)
7327         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7328         * device/lib/clean.mk: added hc08 to the cleaning list
7329
7330 2003-11-04  Borut Razem <borut.razem AT siol.net>
7331
7332         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7333           made 2003-11-04
7334         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7335           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7336           malloc is declared in standard stdlib.h
7337
7338 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7339
7340         * device/lib/hc08/Makefile: need to clean .rel not .o files
7341         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7342
7343 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7344
7345         * src/port.h,
7346         * src/hc08/main.c,
7347         * src/mcs51/main.c,
7348         * src/ds390/main.c,
7349         * src/z80/main.c,
7350         * src/avr/main.c,
7351         * src/pic/main.c,
7352         * src/pic16/main.c,
7353         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7354         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7355         tests (which uses the port's oclsExpense function)
7356         * src/SDCC.y,
7357         * src/SDCCast.c,
7358         * src/SDCCicode.c,
7359         * src/hc08/gen.c,
7360         * src/ds390/gen.c,
7361         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7362
7363 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7364
7365         * src/SDCCcse.c (ifxOptimize),
7366         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7367         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7368         deleting the IFX iCode.
7369         * src/hc08/ralloc.c: reduced unneeded slocs
7370         * src/hc08/gen.c: fixed bug in asmopToBoolean
7371
7372 2003-11-04  Borut Razem <borut.razem AT siol.net>
7373
7374         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7375           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7376           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7377           transferred to configure
7378
7379 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7380
7381         Use headers defined in the C[++] standards:
7382         * sim/ucsim/gui.src/serio.src/fileio.cc
7383         * sim/ucsim/gui.src/serio.src/frontend.cc
7384         * sim/ucsim/gui.src/serio.src/main.cc
7385         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7386         * support/Util/NewAlloc.c
7387         * as/hc08/lklibr.c
7388         * as/mcs51/lklibr.c
7389         * as/z80/aslist.c
7390         * as/z80/assym.c
7391
7392 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7393
7394         * Added MSVC projects for hc08 assembler and linker:
7395         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7396         /as/hc08/link_hc08.dsp
7397
7398 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7399
7400         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7401
7402 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7403
7404         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7405
7406 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7407
7408         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7409
7410 2003-10-31  Borut Razem <borut.razem AT siol.net>
7411
7412         * support/cpp2/cpplib.h,
7413           support/cpp2/cpplib.c,
7414           support/cpp2/cpplex.c,
7415           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7416           to switch _asm block preprocessing on / off. Default is
7417           #pragma preproc_asm +
7418
7419 2003-10-31  Borut Razem <borut.razem AT siol.net>
7420
7421         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7422           when outputting comment blocks (when executed with -C option) and
7423           _asm (SDCPP specific) blocks
7424
7425 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7426
7427         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7428
7429 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7430
7431         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7432
7433 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7434
7435         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7436         * src/SDCCast.c (decorateType): fixed bug #832664
7437
7438 2003-10-31  Borut Razem <borut.razem AT siol.net>
7439
7440         * support\cpp2\cpplex.c: fixed for SDCPP:
7441           comments(when executed with -C option) and _asm blocks
7442           were included even if they where in skipped #if block.
7443           Applied solution from GCC cpp 3.3.2
7444
7445 2003-10-31  Borut Razem <borut.razem AT siol.net>
7446
7447         * src/SDCC.lex: sdcc now understands both formats:
7448           '# <line_number> <file_name>' and
7449           '#line <line_number> <file_name>'
7450         * support/cpp2/cppmain.c: sdcpp now generates the standard
7451           '# <line_number> <file_name>' instead of former
7452           '#line <line_number> <file_name>'
7453
7454 2003-10-30  Borut Razem <borut.razem AT siol.net>
7455
7456         * support/cpp2/cpphash.h,
7457         * support/cpp2/cpplib.h
7458         * support/cpp2/cpplex.c,
7459         * support/cpp2/cppmain.c,
7460         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7461
7462 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7463
7464         Fixed a number of problems revealed by bug #827883.
7465         * src/SDCCloop.c (loopInvariants): Spill location of the
7466         result operand should be recomputed if extracted from
7467         a loop. Also, don't extract assignments of an iTemp
7468         from a literal.
7469         * src/SDCCast.c (isConformingBody): loop reversal should
7470         not occur if the control variable is involved with a
7471         relational operator.
7472
7473 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7474
7475         * .version: bumped to 2.3.6 to reflect the big improvements
7476         made by Erik and Klaus. Thanks!
7477
7478 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7479
7480         Replaced the livrange code.
7481         * src/SDCClrange.c: added new LR code
7482         * src/SDCCloop.c,
7483         * src/SDCCBBlock.h: removed remainig parts from old LR code
7484         * src/ds390/ralloc.c,
7485         * src/ds390/gen.c: minor fixes to make it work with new code
7486
7487 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7488
7489         * as/hc08/asm.h,
7490         * as/hc08/lkrloc.c,
7491         * src/hc08/gen.c,
7492         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7493         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7494         (tweaked fix for bug #818696)
7495
7496 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7497
7498         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7499
7500 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7501
7502         * src/SDCCmain.c,
7503         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7504         * src/mcs51/gen.c (gencjneshort),
7505         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7506         more efficient (per Scott Bronson's suggestion)
7507
7508 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7509
7510         Extended the semantics of the critical keyword to include
7511         individual statements. See RFE #827755 and #799831
7512         * src/SDCC.y
7513         * src/SDCCicode.c
7514         * src/SDCCopt.c
7515         * src/SDCCast.c
7516         * support/Util/SDCCerr.c
7517         * support/Util/SDCCerr.h
7518         * src/mcs51/gen.c
7519         * src/ds390/gen.c
7520         * src/hc08/gen.c
7521
7522 2003-10-19  Borut Razem <borut.razem AT siol.net>
7523
7524         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7525
7526 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7527
7528         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7529         Fixed bug #818696
7530         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7531         and predecrement operand is displayed
7532
7533 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7534
7535         * src/SDCCval.c (valMinus): fixed bug #826041
7536
7537 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7538
7539         Some hc08 related updates that I missed earlier
7540         * sim/ucsim/stypes.h
7541         * support/regression/ports/hc08/spec.mk
7542
7543 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7544
7545         New target "hc08" for the Motorola 68hc08 family of micros
7546
7547         * configure
7548         * configure.in
7549         * Makefile
7550         * src/hc08/*
7551         * src/SDCCmain.c
7552         * src/port.h
7553         * sim/ucsim/hc08.src/*
7554         * sim/ucsim/configure.in
7555         * src/ucsim/configure
7556         * sim/ucsim/packages_in.mk
7557         * as/hc08/*
7558         * as/Makefile
7559         * device/include/mc68hc908qy.h
7560         * device/lib/hc08/*
7561         * device/lib/Makefile.in
7562         * support/regression/ports/hc08/*
7563         * support/regression/Makefile
7564
7565 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7566
7567         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7568         regression test
7569         * src/ds390/gen.c (genCast): fixed bug #821957
7570
7571 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7572
7573         * device/lib/logf.c: "fixed" overlay bug
7574         * support/regression/ports/host/spec.mk: added m library
7575         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7576         * support/regression/tests/float_trans: added (for Eric)
7577
7578 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7579
7580         * src/mcs51/gen.c (genCpl): fixed bug
7581         http://sf.net/mailarchive/message.php?msg_id=6263915
7582
7583 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7584
7585         * src/SDCCast.c (decorateType): added extended constant folding
7586         * src/SDCCsymt.c (computeType): cleanup
7587         * src/SDCCval.c (valShift): minor optimization
7588         * support/regression/tests/ast_constant_folding.c: added
7589
7590 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7591
7592         * src/SDCCmain.c: removed some unintended changes
7593
7594 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7595
7596         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7597         * src/z80/gen.c: fixed part of bug #817589
7598         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7599
7600 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7601
7602         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7603         * src/SDCCcflow.c
7604         * src/SDCCcse.c
7605         * src/SDCCdflow.c
7606         * src/SDCClabel.c
7607         * src/SDCClrange.c
7608         * src/SDCCmem.c
7609         * src/SDCCopt.c
7610         * src/SDCCpeeph.c
7611         * src/SDCCset.c
7612         * src/avr/ralloc.c
7613         * src/ds390/ralloc.c
7614         * src/izt/ralloc.c
7615         * src/mcs51/ralloc.c
7616         * src/pic/ralloc.c
7617         * src/pic16/ralloc.c
7618         * src/xa51/ralloc.c
7619         * src/z80/ralloc.c
7620         * src/z80/gen.c: removed unused label "release:"
7621
7622 2003-10-06  Borut Razem <borut.razem AT siol.net>
7623
7624         * src/SDCC.lex: removed definition of unused variables
7625           save_optimize and save_options
7626
7627 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7628
7629         * clean.mk: removed '=' in "-maxdepth=1"
7630         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7631         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7632
7633 2003-10-06  Borut Razem <borut.razem AT siol.net>
7634
7635         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7636           my_unput() replaced by unput()
7637
7638 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7639
7640         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7641         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7642         type-punned pointer will break strict-aliasing rules"
7643         Old LR behaviour is again default; Klaus' LR can be choosen by
7644         defining the environment variable LRKLAUS
7645         * src/SDCCBBlock.h
7646         * src/SDCCloop.c
7647         * src/SDCClrange.c
7648         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7649         * clean.mk: fixed removal of files in bin/CVS/
7650         * device/lib/clean.mk: fixed removal of directories small and large
7651         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7652         * src/SDCCicode.c,
7653         * src/SDCCval.c: removed superflous test for pedantic
7654
7655 2003-10-05  Borut Razem <borut.razem AT siol.net>
7656
7657         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7658           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7659           message "unmatched #pragma SAVE and #pragma RESTORE"
7660
7661 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7662
7663         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7664           assembly, critical functions, atomic, nojtbound)
7665
7666 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7667
7668         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7669         * src/SDCCBBlock.h
7670         * src/SDCCloop.c
7671         * src/SDCCloop.h
7672         * src/SDCClrange.c
7673
7674 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7675
7676         * src/z80/gen.h,
7677         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7678         * src/mcs51/gen.h
7679         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7680         * src/ds390/gen.h
7681         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7682         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7683         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7684
7685 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7686
7687         * src/z80/gen.c (genRet): fixed bug #524753
7688         * src/z80/gen.c (genCast): fixed internal error on cast from
7689         pointer to long
7690         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7691         fix for bug #477835 to the z80
7692         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7693         for tracking iCodes in the peephole optimizer for z80
7694
7695 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7696
7697         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7698         the other part of bug #814548
7699         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7700
7701 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7702
7703         * src/SDCCcse.c: fixed part of bug #814548
7704
7705 2003-09-28  Borut Razem <borut.razem AT siol.net>
7706
7707         * src/asm.c: rewrite of printILine() to use temporary file instead
7708           a pipe
7709         * src/xa51/main.c: commented out declaration of int rewinds
7710
7711 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7712
7713         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7714
7715 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7716
7717         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7718         * src/asm.c (printILine): Fixed bug #811015
7719
7720 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7721
7722         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7723         freeing.
7724
7725 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7726
7727         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7728         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7729         to correctly handle general case of AOP_PAIRPTR
7730         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7731
7732 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7733
7734         * src/mcs51/ralloc.c (fillGaps),
7735         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7736         register positioning bug)
7737
7738 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7739
7740         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7741
7742 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7743
7744         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7745         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7746         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7747         (ralloc doesn't intentionally do this now, but perhaps later)
7748         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7749         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7750         register positioning bugs (Fixed bug #762602 and #795325)
7751         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7752         (Fixed bug #808779)
7753         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7754         lines that --i-code-in-asm generates
7755
7756 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7757
7758         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7759         trying to fclose a FILE* that was already closed.
7760
7761 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7762
7763         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7764         of const struct should be treated as if const themselves)
7765
7766 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7767
7768         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7769
7770 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7771
7772         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7773         Unix (/n) and DOS (/r/n) line terminations.
7774
7775 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7776
7777         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7778         bug #613775
7779
7780 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7781
7782         * src/mcs51/gen.c (genFunction, genEndFunction),
7783         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7784         and restore of EA so that stack offsets to parameters are
7785         correct when using both critical and reentrant/stack-auto.
7786         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7787         size (can be triggered in error if sloc is shared between
7788         different sized objects)
7789         * device/include/float.h: fixed macros to explicitly use
7790         unsigned long where needed
7791
7792 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7793
7794         Feature req. 799831: added code to allow nesting of critical functions
7795         * src/mcs51/gen.c (genFunction, genEndFunction)
7796         * src/ds390/gen.c (genFunction, genEndFunction)
7797
7798 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7799
7800         * src/SDCCsymt.c (sclsFromPtr),
7801         * src/SDCCsymt.h,
7802         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7803         support for standard C idiom of memory mapped variables; for
7804         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7805         to xdata int at 0x1234 tempvar = 1.
7806         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7807         provided by Akiya ISHIDA
7808
7809 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7810
7811         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7812         * src/SDCCval.c (constVal): added reduction from int to char
7813         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7814         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7815         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7816         to ignore the sign
7817         * support/regression/tests/shifts.c: fixed
7818
7819 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7820
7821         * src/z80/gen.c (genXor): Fixed bug #805445
7822
7823 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7824
7825         Fixed bug #621531 (const & volatile confusion in the type chain).
7826         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7827         refer to the const or volatile state of the pointer itself.
7828
7829         * src/SDCCast.c
7830         * src/SDCCglue.c
7831         * src/SDCCicode.c
7832         * src/SDCCsymt.c
7833         * src/SDCCval.c
7834         * src/SDCC.y
7835         * src/SDCCsymt.h
7836         * src/pic/gen.c
7837         * src/pic/ralloc.c
7838         * src/pic16/gen.c
7839         * src/pic16/ralloc.c
7840         * support/regression/tests/const.c
7841
7842 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7843
7844         When checking for duplicated modules, use absolute paths
7845         instead of relative paths.  Files changed:
7846
7847         * as/mcs51/lklib.c
7848         * link/z80/lklib.c
7849
7850 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7851
7852         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7853
7854 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7855
7856         * device/include/string.h: added size_t typedef, changed
7857         prototypes to use size_t, eliminated separate reentrant and
7858         non-reentrant declarations, added _memmove declaration
7859         * device/lib/_memcpy.c: changed to use size_t instead of int,
7860         changed /4 to >>2 to avoid division library call
7861         * device/lib/_memcmp.c,
7862         * device/lib/_memset.c,
7863         * device/lib/_strncat.c,
7864         * device/lib/_strncpy.c,
7865         * device/lib/_strncmp.c: changed to use size_t instead of int
7866         * device/lib/_memmove.c: new file (fixed bug #772294)
7867         * device/lib/Makefile.in: added _memmove.c
7868         * device/lib/z80/asm_strings.s: fixed bug #772290
7869         * support/regression/tests/bitfields.c: attempt to fix host assertion
7870         failure on amd64-unknown-linux2.2
7871
7872 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7873
7874         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7875         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7876         * as/z80/asmain.c (main): fixed bug #801766
7877
7878 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7879
7880         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7881         compilers
7882
7883 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7884
7885         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7886         reported in bug #800609
7887
7888 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7889
7890         * Top header beautifications in src/pic16 directory:
7891           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7892           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7893           pcoderegs.h, ralloc.c, ralloc.h
7894         * main.c: added top header and GPL license notice
7895         * pcode.c: fixed the if-conditional warning
7896
7897 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7898
7899         * device/lib/_mullong.c: replaced int by short for gcc
7900
7901 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7902
7903         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7904         and JUMPTABLE iCodes properly now (worked by accident before)
7905         * src/mcs51/gen.c (leftRightUseAcc),
7906         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7907         iCode properly now. Use getSize instead of nRegs since a & b
7908         aren't part of the nRegs tally.
7909
7910 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7911
7912         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7913         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7914           before instructions that use the _STATUS register
7915
7916 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7917
7918         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7919         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7920         fetching of the pointer
7921         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7922         copied from genNearPointerSet()
7923         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7924         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7925         If they pop r0/r1 they must be called in the opposite order than aopOp().
7926         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
7927         (resp. --stack-auto), prepared for --xstack
7928
7929 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7930
7931         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
7932
7933 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7934
7935         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
7936         these ports have their own __sdcc_external_start()
7937
7938 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
7939
7940         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
7941         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
7942         type for bits was changed. It resulted in bit variables becoming
7943         global, which is not permitted in PIC 14 assembly output.
7944
7945 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7946
7947         * doc/sdccman.lyx: various additions and updates. Rearranged sections
7948
7949 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7950
7951         Z80 and MCS51 linkers complaint if a public symbol is defined
7952         in more than one library module:
7953
7954         * as/mcs51/lklib.c
7955         * link/z80/lklib.c
7956         * as/mcs51/Makefile.in
7957
7958 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7959
7960         A few small changes that speed up the peephole optimizer.
7961
7962         * src/SDCCpeeph.c
7963
7964 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7965
7966         Try to make the peephole optimizer smarter by maintaining
7967         an association between the assembly source code and the
7968         iCodes that originated them. Put this information to use
7969         with a new peephole rule condition "notVolatile" so that
7970         the rules can be aggressive yet still safe.
7971
7972         * src/SDCCpeeph.c
7973         * src/SDCCpeeph.h
7974         * src/mcs51/gen.c
7975         * src/mcs51/peeph.def
7976
7977 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7978
7979         Fixed bug #741761
7980
7981         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
7982         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
7983         if the left or right operand symbols have the accuse flag set.
7984
7985 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7986
7987         Changed the type of the result of the ! (NOT) operator to char;
7988         previously it returned the same type as the source. This allows
7989         us to eliminate all the genFloatNot functions (all of its target
7990         implementations were very buggy) since !float can use the same
7991         code as !long now.
7992
7993         * src/SDCCicode.c (ast2iCode): ! returns char
7994         * src/mcs51/gen.c (genNot, genNotFloat),
7995         * src/ds390/gen.c (genNot, genNotFloat),
7996         * src/z80/gen.c (genNot, genNotFloat),
7997         * src/pic/gen.c (genNot, genNotFloat),
7998         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
7999
8000 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8001
8002         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8003         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8004            during interrupts. Ensure WSAVE is located at a shared bank address.
8005         2. Fixed page selection in some places
8006         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8007            the registers name strings.
8008         4. Fixed "signed / unsigned compare" compiler warnings.
8009         5. The PIC port manages its own allocation of the general purpose
8010            registers, but makes no attempt to reuse them. As a result when
8011            compiling it soon runs out of general purpose registers. Some
8012            additional code was added to the files pcode.c and device.c to walk
8013            through the function call tree and rename the registers so that they
8014            get reused.
8015
8016         * src/pic/device.c
8017         * src/pic/gen.c
8018         * src/pic/glue.c
8019         * src/pic/pcode.c
8020         * src/pic/pcode.h
8021         * src/pic/ralloc.c
8022         * src/pic/ralloc.h
8023         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8024         genPlus() & genMinus() when the result is the same as left or right
8025
8026 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8027
8028         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8029
8030 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8031
8032         Made bitfield a distinct type from bit so that bitfields
8033         convert as per ANSI C and bits retain their traditional
8034         boolean style behaviour. Implemented bitfield support in
8035         the z80 port.
8036
8037         * src/SDCCsymt.h,
8038         * src/SDCCsymt.c,
8039         * src/SDCCast.c,
8040         * src/cdbFile.c,
8041         * src/mcs51/gen.c,
8042         * src/ds390/gen.c: bit v bitfield split
8043         * src/z80/gen.c: New support for bitfields
8044         * support/regression/tests/bitfields.c: reenabled z80,
8045         added more tests
8046
8047 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8048
8049         Rules 246.x, 247.x relate to bitfields, the others speed up
8050         access to xdata mapped I/O devices.
8051
8052         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8053
8054 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8055
8056         Cleaned up genPackBits and genUnpackBits and added two helper
8057         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8058         for literal assignments in genPackBits (thanks to Frieder for
8059         reminding me).
8060
8061         * src/mcs51/gen.c
8062         * src/ds390/gen.c
8063
8064 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8065
8066         Fixed bug #748310 (pointer to function type mishandled when the
8067         function name is omitted). Also fixed a SIGSEGV when a function
8068         attribute (reentrant, etc) is used on a non-function or on a
8069         function but misplaced before the parameter list.
8070
8071         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8072         bug #748310
8073         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8074         * support/Util/SDCCerr.h,
8075         * support/Util/SDCCerr.c: Added func attr misuse error msg
8076
8077 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8078
8079         Fixed bug #787649 by anonymous
8080         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8081         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8082
8083 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8084
8085         Fixed numerous bitfield problems.
8086
8087         * src/SDCC.y: More bitfield related error checking
8088         * src/SDCCsymt.h,
8089         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8090         * support/Util/SDCCerr.h,
8091         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8092         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8093         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8094         * support/regression/tests/bitfields.c: tests added
8095
8096 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8097
8098         Made the constant following the "interrupt" keyword optional. If
8099         omitted, the function will not automatically be given an entry
8100         in the interrupt vector table (similar to #pragma NOIV, but
8101         less syntacticly kludgy). The interrupt number is also now
8102         range checked. Also fixed a bug in the high order bit example
8103         in the manual.
8104
8105         * src/SDCC.y
8106         * src/SDCCmem.c
8107         * src/SDCCglue.c
8108         * src/SDCCsymt.h
8109         * support/Util/SDCCerr.c
8110         * support/Util/SDCCerr.h
8111         * doc/sdccman.lyx
8112
8113 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8114
8115         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8116         * src/SDCCicode.c (operandOperation): rewritten some ops
8117         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8118         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8119         other type
8120         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8121         be re-activated by defining REDUCE_LITERALS)
8122         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8123         unsigned, but are signed by default
8124         * src/SDCCval.c (constVal): rearranged
8125         * src/SDCCval.c (valMod): preliminary fix
8126         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8127         * support/regression/literalop.c: added, work in progress
8128
8129 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8130
8131         Generate warnings for useless declarations like "char data;"
8132         that don't do what new users expect.
8133
8134         * src/SDCC.y
8135         * support/Util/SDCCerr.h
8136         * support/Util/SDCCerr.c
8137
8138 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8139
8140         * src/SDCCval.c (valMult): fix overflow detection of negative int
8141
8142 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8143
8144         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8145
8146         Changes to support big endian targets:
8147
8148         * src/ports.h
8149         * src/SDCCglue.c
8150         * src/avr/main.c
8151         * src/ds390/main.c
8152         * src/izt/i186.c
8153         * src/mcs51/main.c
8154         * src/pic/main.c
8155         * src/pic16/main.c
8156         * src/xa51/main.c
8157         * src/z80/main.c
8158
8159 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8160
8161         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8162         * device/lib/time.c: fixed warning "integer overflow in expression"
8163
8164 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8165
8166         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8167         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8168         constants are unsigned; added recognition of "u" flag for unsigned
8169         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8170         * src/SDCCval.c (valDiv, valMod): fixed signdness
8171         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8172         signedness of modulo, left and right shift
8173         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8174         * support/Util/SDCCerr.h: added warning W_INT_OVL
8175         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8176         * src/SDCCast.c (ast_print): improved output of constants
8177
8178 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8179
8180         Fixed some warnings when building with MSVC:
8181
8182         * as\mcs51\asdata.c
8183         * as\z80\asdata.c
8184         * as\mcs51\asm.h
8185         * as\z80\asm.h
8186         * link\z80\aslink.h
8187         * link\z80\lkdata.c
8188         * link\z80\lkeval.c
8189         * link\z80\lkgb.c
8190         * link\z80\lkihx.c
8191         * link\z80\lks19.c
8192         * link\z80\lksym.c
8193         * support\cpp2\cpplib.c
8194         * src\ds390\gen.c
8195         * src\mcs51\gen.c
8196
8197 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8198
8199         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8200
8201 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8202
8203         * support\librarian\clean.mk: Do not remove Makefile.
8204         * support\librarian\Makefile: added.
8205
8206 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8207
8208         Added librarian to MSVC build:
8209         * all.dsp
8210         * sdcc.dsw
8211         * support\librarian\librarian.dsp
8212
8213         'configure' not needed for librarian, removed:
8214         * support\librarian\configure
8215         * support\librarian\configure.in
8216         * support\librarian\config_in.h
8217         * support\librarian\Makefile.in
8218
8219         Hopefully these ones built the librarian and the rest of sdcc properly:
8220         * Makefile
8221         * Makefile.common.in
8222
8223         Messed up 'configure', so revert to previous version:
8224         * configure
8225         * configure.in
8226
8227 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8228
8229         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8230         there, while the mantissa of a double is "only" 53 bits wide.
8231
8232 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8233
8234         Adding sdcclib to the build.  MSVC project coming soon.
8235         Files added/changed:
8236
8237         * support\librarian\clean.mk
8238         * support\librarian\configure
8239         * support\librarian\configure.in
8240         * support\librarian\config_in.h
8241         * support\librarian\Makefile.bcc
8242         * support\librarian\Makefile.in
8243         * support\librarian\sdcclib.c
8244         * Makefile.bcc
8245         * Makefile
8246         * Makefile.common.in
8247         * configure
8248         * configure.in
8249
8250 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8251
8252         Linker now complaints if linked modules have conflicting options, for
8253         example, one compiled using --model-large and another one compiled with
8254         --model-small.  The following files were modified:
8255
8256         * as\mcs51\asdata.c
8257         * as\mcs51\aslink.h
8258         * as\mcs51\asm.h
8259         * as\mcs51\asmain.c
8260         * as\mcs51\asout.c
8261         * as\mcs51\i51pst.c
8262         * as\mcs51\lkdata.c
8263         * as\mcs51\lklibr.c
8264         * as\mcs51\lkmain.c
8265         * as\z80\asdata.c
8266         * as\z80\asm.h
8267         * as\z80\asmain.c
8268         * as\z80\asout.c
8269         * as\z80\z80pst.c
8270         * link\z80\aslink.h
8271         * link\z80\lkdata.c
8272         * link\z80\lklibr.c
8273         * link\z80\lkmain.c
8274         * src\SDCCglue.c
8275
8276 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8277
8278         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8279         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8280
8281 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8282
8283         * src/z80/mappings.i: fix _mul[us][int,long] entries
8284
8285 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8286
8287         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8288
8289 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8290
8291         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8292         * support/regression/tests/bitopcse.c: added
8293         fixed warning:
8294         * src/avr/gen.c:
8295         * src/pic/gen.c:
8296         * src/pic16/gen.c:
8297         * src/z80/gen.c:
8298         * src/xa51/gen.c:
8299
8300 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8301
8302         added support for new library format to z80, gbz80 linkers:
8303         *link/z80/aslink.h
8304         *link/z80/lklex.c
8305         *link/z80/lklib.c
8306         *link/z80/lklist.c
8307
8308 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8309
8310         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8311         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8312
8313 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8314
8315         added DUMMY_READ_VOLATILE:
8316         * src/SDCC.y:
8317         * src/avr/gen.c:
8318         * src/xa51/gen.c:
8319         * src/z80/gen.c:
8320         * src/pic/gen.c:
8321         * src/pic16/gen.c:
8322         * src/mcs51/gen.c:
8323         * src/ds390/gen.c:
8324         * src/SDCCcse.c (algebraicOpts): many improvements
8325         * src/SDCCcse.h: removed algebraicOpts()
8326         * src/SDCCicode.c (picDummyRead): added
8327
8328 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8329
8330         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8331         "Insufficient space in data memory".
8332
8333 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8334
8335         * src/mcs51/gen.c: fixed bug #771358
8336         * src/z80/gen.c: fixed bug #759087
8337
8338 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8339
8340         * src/pic16/glue.c: minor cleanup by Vangelis
8341
8342 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8343
8344         * device/include/regc515c.h: fixed #758477
8345         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8346         * device/lib/_gptrput.c: saved a few bytes
8347         * my tab spacing is 8, yours too?)
8348         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8349         * device/lib/serial.c: process RX bytes earlier than TX bytes
8350         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8351
8352 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8353
8354         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8355
8356 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8357
8358     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8359
8360 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8361
8362         * device/lib/Makefile.in: bad fix, reverted to 1.43
8363
8364 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8365
8366         * device/lib/Makefile.in: added missing z80 object files
8367
8368 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8369
8370         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8371         pic16 progress by Vangelis:
8372         * src/SDCCglobl.h:
8373         * src/SDCCmain.c:
8374         * src/pic/Makefile:
8375         * src/pic:
8376         * pic/Makefile:
8377         * pic16/device.c:
8378         * pic16/device.h:
8379         * pic16/gen.c:
8380         * pic16/gen.h:
8381         * pic16/genarith.c:
8382         * pic16/glue.c:
8383         * pic16/main.c:
8384         * pic16/pcode.c:
8385         * pic16/pcode.h:
8386         * pic16/pcodepeep.c:
8387         * pic16/peeph.def:
8388
8389 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8390
8391     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8392
8393 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8394
8395     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8396     added gbz80 build to MSVC project.
8397     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8398     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8399     from 8051 stuff and setup so it links using a .lnk file.
8400
8401 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8402
8403     * support/librarian/sdcclib.c: sdcc librarian.
8404     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8405     with sdcclib.
8406
8407 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8408
8409     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8410
8411 2003-07-02  Borut Razem <borut.razem AT siol.net>
8412
8413         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8414         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8415         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8416         src/xa51/main.c, src/z80/main.c:
8417         virtualization of glue() function: each port has it's own glue function,
8418         which is accessed by do_glue function pointer in PORT.general structure
8419
8420 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8421
8422         * DS800C400 fun, improved ROM interface and tinibios.
8423
8424 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8425
8426         * More support for DS80C400. Now includes beginning of interface to ROM.
8427
8428 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8429
8430         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8431
8432 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8433
8434         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8435
8436 2003-06-19  Borut Razem <borut.razem AT siol.net>
8437
8438         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8439
8440 2003-06-19  Borut Razem <borut.razem AT siol.net>
8441
8442         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8443         fixed Z80 port - crt0.o: cannot open.
8444
8445 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8446
8447         * support/Util/MySystem.c (merge_command): revert bad fix
8448
8449 2003-06-18  Borut Razem <borut.razem AT siol.net>
8450
8451         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8452
8453 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8454
8455         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8456         option --use-stdout sends errors to stdout instead of stderr.
8457
8458 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8459
8460         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8461
8462 2003-06-15  Borut Razem <borut.razem AT siol.net>
8463
8464         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8465         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8466         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8467         fixed width array of pointers replaced with sets;
8468         multiple include and lib paths ared transferred to preprocessor and linker
8469         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8470         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8471         fixed width array of pointers
8472         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8473         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8474         fixupPath(), getPathDifference()
8475         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8476         fixed width array of pointers
8477
8478 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8479
8480         * src/pic16/ralloc.c: fix warnings
8481         * src/pic16/pcode.c: fix warning
8482
8483 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8484
8485          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8486         know all the details, but essentially this set of changes enable
8487         the pic16 port to generate movff instructions and generate assembler
8488         directives,
8489         * src/SDCCmain.c:
8490         * src/pic16/gen.c:
8491         * src/pic16/glue.c:
8492         * src/pic16/pcode.c:
8493         * src/pic16/device.c:
8494         * src/pic16/main.c:
8495         * src/pic16/pcode.h:
8496         * src/pic16/pcoderegs.c:
8497         * src/pic16/ralloc.c:
8498         * src/pic16/ralloc.h:
8499
8500 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8501
8502         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8503         added option --vc, so sdcc errors and warnings are compatible with
8504         Microsoft Visual Studio.
8505
8506 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8507
8508         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8509           device/lib/libfloat.lib: added atof function.
8510
8511 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8512
8513         * doc/sdccman.lyx: updated to Lyx 1.3
8514         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8515         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8516         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8517
8518 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8519
8520         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8521
8522 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8523
8524         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8525           additions to the "related tools/documentation" section
8526
8527 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8528
8529         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8530
8531 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8532
8533         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8534         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8535
8536 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8537
8538         * doc/sdccman.lyx: fix double dash and other minor things
8539         * doc/Makefile: fix double dash
8540
8541 2003-05-28  Karl Bongers(patches from Martin Helmling)
8542         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8543           condition and ignore commands.
8544
8545 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8546
8547         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8548           is in parts still quite out of date, I did changes as far as I felt makes sense
8549           for a non-native english speaker.
8550           Please feel free to add to the manual or to correct my changes.
8551         * doc/Makefile: undid touching the date of intermediate tex files.
8552
8553 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8554
8555         * doc/sdccman.lyx: Manual has an index now
8556
8557 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8558
8559         Finalize muluint/mulsint and mululong/mulslong merging:
8560         * device/lib/_mulint.c
8561         * device/lib/_mullong.c
8562         * device/lib/gbz80/mul.s
8563         * device/lib/gbz80/stubs.s
8564         * device/lib/z80/mul.s
8565         * device/lib/z80/stubs.s
8566         * src/SDCCsymt.c (initCSupport)
8567
8568 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8569
8570         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8571         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8572           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8573           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8574           instead of /Zm500.
8575
8576 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8577
8578         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8579           the regression tests I'm not brave enough to enable 245.b, 245.c
8580         * doc/sdccman.lyx: added latex preamble for hyperref package.
8581           Using pdflatex this will give you a hyperlinked pdf file with
8582           bookmarks. (prepend '%' before /usepackage if this breaks something)
8583
8584 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8585
8586          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8587
8588 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8589
8590         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8591
8592 2003-05-21    <johan AT balder>
8593
8594         * src/SDCCglue.c (printIval): fixed bug #739934
8595
8596 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8597
8598         Applied patch from bug 737905 (renamed yylineo to mylineno):
8599         * src/altlex.c
8600         * src/SDCCast.c
8601         * src/SDCglobl.h
8602         * src/SDCC.lex
8603         * src/SDCCsymt.c
8604         * src/SDCCval.c
8605         * src/pic16/pcode.c: Cleaned warnings
8606         * src/pic16/pcodeflow.c: Cleaned warnings
8607         * src/pic16/pcoderegs.c: Cleaned warnings
8608
8609 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8610
8611         * src/pic16/pcode.c: Cleaned warnings
8612         * src/pic16/pcodepeep.c: Cleaned warnings
8613         * src/pic16/ralloc.c: Cleaned warnings
8614
8615 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8616
8617         * doc/sdccman.lyx: fixed bug 739745
8618         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8619
8620 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8621
8622         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8623         it can be defined with CFLAGS when running configure
8624         * src/SDCCmain.c: fixed compiling + linking with object files
8625
8626 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8627
8628         * configure.in: configure for pic16 port,
8629             added --disable-pic16-port
8630         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8631         * src/SDCCmain.c: linkOptions is changed to set *,
8632             added if/endif conditional macros to remove options help
8633             messages from optionsTable when a port is not configured, added
8634             support for the PIc16 port in the ports table, when executing
8635             the compiler with no port specified on command line, a default
8636             port is selected with the new macro DEFAULT_PORT which is
8637             defined in port.h, in setDefaultOptions() linkOptions is removed
8638             from initialization assignment, since now it is a set,
8639             parseCmdLine uses setParseWithComma for linkOptions, in
8640             linkEdit() linkOptions are accessed with new function indexSet()
8641             which returns the i'th item of a set variable. See SDCCset.c, in
8642             linkEdit() when calling buildCmdLine(), added linkOptions as
8643             last argument. Now users can pass arguments to gplink via the
8644             -Wl option, main() uses pic16glue() to glue up pic16 programs
8645         * src/SDCCpeeph.c: various changes to support pic16
8646         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8647             return the i'th item of the set
8648         * src/SDCCset.h: added function prototype for indexSet()
8649         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8650         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8651         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8652             added macro DEFAULT_PORT
8653         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8654         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8655             generated
8656         * src/pic16/glue.c: commented out some error producing lines
8657         * src/pic16/main.c: __config directives are commented out to stop
8658             gpasm complaining and test the linkage with gplink, _linkCmd and
8659             _asmCmd changed to be more gplink and gpasm friendly
8660         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8661             produced an error when parsed, peep rule 12 is added to utilize
8662             movff, but it is commented out since the pCode does not support
8663             yet a command with 2 address arguments
8664
8665 2003-05-18    <johan AT balder>
8666
8667         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8668         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8669 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8670
8671         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8672   Added feature to script commands from file.
8673
8674 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8675
8676         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8677         * src/SDCCutil.c: include ctype.h for win32
8678
8679 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8680
8681         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8682
8683 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8684
8685         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8686   Fixed so you can set breakpoints prior to run, run does not stop
8687   on entry now.  Add tbreak.  Other enhancements and fixes for use
8688   with ddd.
8689
8690 2003-05-12  Borut Razem <borut.razem AT siol.net>
8691
8692         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8693
8694 2003-05-11  Borut Razem <borut.razem AT siol.net>
8695
8696         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8697         the path of bin directory, so that PATH is the only env. variable, which has to be set
8698         in case of standard installation.
8699         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8700         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8701         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8702
8703 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8704
8705         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8706         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8707         temp files are in the port dir; clean the gen/test directory when
8708         generating new test.c
8709         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8710         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8711         * support/regression/tests/zeropad.c: added
8712
8713 2003-05-09    <johan AT balder>
8714
8715         * src/SDCCglue.c: fixed bug #597940
8716
8717 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8718
8719         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8720   cache sfr, optimize next,step, fix off by one sourceline,
8721   support ddd list function.
8722         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8723
8724 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8725
8726         * support/regression/HTMLgen.py: added compare_s2f()
8727         * support/regression/Makefile: redo 1.27
8728         * support/regression/generate-cases.py: redo 1.5
8729
8730 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8731
8732         * support/regression/tests/float.c: workaround 33 bit hex constant
8733         * support/regression/tests/simplefloat.c: fix division for host
8734
8735 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8736
8737         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8738         that tame's the PIC's over-aggressive optimizer.
8739
8740 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8741
8742          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8743          support for MSVC.
8744
8745 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8746
8747         Initial support for DS80C400. "Hello world" runs on TINIm400
8748         (with polled I/O).
8749
8750 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8751
8752          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8753          * Some notes on ddd usage added in debugger/README
8754          Martin Helmling adding more features and fixes for ddd GUI debugger.
8755          Code added for nexti, stepi, up, down, and other adjustments.
8756
8757 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8758
8759         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8760         * src/pic/peeph.def Added two rules to optimize carry manipulation
8761         * src/pic/* removed debug printfs
8762
8763 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8764
8765         * debugger/mcs51/cmd.c: added header newalloc.h
8766
8767 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8768
8769         * as/Makefile: new EXEEXT
8770         * as/z80/Makefile: remove trailing slash of BUILDIR
8771         * as/z80/clean.mk: new EXEEXT
8772         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8773         * support/cpp2/Makefile.in: new EXEEXT
8774         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8775
8776 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8777
8778         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8779         EXEEXT was introduced to fix all related problems with targets
8780         "clean", "install" and "uninstall"; a couple of further flaws
8781         especially with "clean" have been fixed too
8782         * as/mcs51/Makefile.in
8783         * as/mcs51/clean.mk
8784         * as/z80/Makefile
8785         * Makefile
8786         * clean.mk
8787         * debugger/mcs51/Makefile.in
8788         * debugger/mcs51/clean.mk
8789         * link/z80/Makefile
8790         * link/z80/Makefile.in
8791         * link/z80/clean.mk
8792         * link/Makefile
8793         * packihx/Makefile.in
8794         * packihx/clean.mk
8795         * sim/ucsim/Makefile
8796         * sim/ucsim/clean.mk
8797         * sim/ucsim/avr.src/Makefile.in
8798         * sim/ucsim/avr.src/clean.mk
8799         * sim/ucsim/s51.src/Makefile.in
8800         * sim/ucsim/s51.src/clean.mk
8801         * sim/ucsim/xa.src/Makefile.in
8802         * sim/ucsim/xa.src/clean.mk
8803         * sim/ucsim/z80.src/Makefile.in
8804         * sim/ucsim/z80.src/clean.mk
8805         * sim/ucsim/main_in.mk
8806         * sim/ucsim/packages_in.mk
8807         * sim/ucsim/gui.src/Makefile.in
8808         * sim/ucsim/gui.src/serio.src/Makefile.in
8809         * sim/ucsim/gui.src/serio.src/clean.mk
8810         * src/Makefile.in
8811         * src/clean.mk
8812         * support/cpp2/Makefile.in
8813         * support/cpp2/clean.mk
8814         * support/makebin/Makefile
8815         * support/makebin/clean.mk
8816         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8817         * doc/sdccman.lyx: --program-suffix no longer needed
8818
8819 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8820
8821          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8822          Martin Helmling added support for ddd GUI debugger.
8823          Code added to display assembly, set variables, and other commands
8824          to interface to ddd.
8825
8826 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8827
8828         * as/Makefile: fix target clean
8829         * as/clean.mk: fix target clean
8830         * as/z80/clean.mk: fix target clean
8831
8832 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8833
8834         * Makefile.common.in: added  AT EXEEXT AT
8835         * configure.in: removed all mingw32 stuff
8836         * configure: rebuilt from configure.in
8837         * doc/sdccman.lyx: updated section "installation"
8838         * support/scripts/sdcc_mingw32: adapted to configure
8839         * support/scripts/sdcc_cygwin_mingw32: added
8840
8841 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8842
8843         * src/pic Added object file support for the PIC port
8844         * src/pic Applied patch from Craig Franklin (this started the object file support)
8845         * src/regression Updated the PIC regression tests for object files
8846
8847 2003-04-20  Borut Razem <borut.razem AT siol.net>
8848
8849         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8850           lklex.c: In function `getfid':
8851           lklex.c:203: warning: array subscript has type `char'
8852         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8853           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8854         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8855           stack handling macros
8856
8857 2003-04-19  Borut Razem <borut.razem AT siol.net>
8858
8859         * "handling space characters in file path" task:
8860         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8861         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8862         * support/Util/MySystem.h: make it self-sufficient
8863         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8864           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8865           handling space characters in file path
8866         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8867           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8868         * support/Util/MySystem.c: handling space characters in executable's path
8869
8870 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8871
8872         * as/z80/Makefile: fix permanent rebuild of z80
8873         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8874         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8875
8876 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8877
8878         * src/SDCCopt.c: add special case optimization to replace modulo by
8879           a power of two with a bitwise AND.
8880
8881 2003-04-18    <johan AT balder>
8882
8883         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8884
8885 2003-04-17    <johan AT balder>
8886
8887         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8888         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8889
8890 2003-04-13  Borut Razem <borut.razem AT siol.net>
8891
8892         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8893         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8894           fixed mingw problem in adl_NORMALIZE_PATH
8895
8896 2003-04-12  Borut Razem <borut.razem AT siol.net>
8897
8898         * fixed "#pragma SAVE/RESTORE can not be nested":
8899         * src/SDCC.lex: reworked pragma handling functions
8900         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8901         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8902
8903 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8904
8905         * src/SDCCutil.c (pathEquivalent): defined but not used
8906         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8907         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8908         * configure: rebuilt from configure.in
8909         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8910         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8911         * device/include/Makefile.in: replace sdcc_datadir
8912         * device/lib/Makefile.in: replace sdcc_datadir
8913         * Makefile.common.in: add LDFLAGS from configure
8914         * packihx/Makefile.in: use LDFLAGS
8915         * src/Makefile.in: use LDFLAGS
8916         * support/cpp2/Makefile.in: add LDFLAGS from configure
8917         * support/makebin/Makefile: use LDFLAGS
8918         * .version: bumped version number to 2.3.5
8919
8920 2003-04-12  Borut Razem <borut.razem AT siol.net>
8921
8922         * completed "different paths" task:
8923         * src/SDCCmacro.c: fixed bug in handling quotes
8924         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8925         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
8926
8927 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8928
8929         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
8930
8931 2003-04-11 kevin Vigor <kevin AT vigor.nu>
8932
8933         * ds390/gen.c ds390/peeph.def: fix bug 706781
8934
8935 2003-04-11  Borut Razem <borut.razem AT siol.net>
8936
8937         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
8938
8939 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
8940
8941         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
8942         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
8943          set - this bit used to not be set...).
8944         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
8945           bad code in PIC Port
8946         * src/regression/and2.c added to test bug 609268
8947         * src/regression/Makefile added and2.c to regression test
8948
8949
8950 2003-04-08    <johan AT CP255758-A>
8951
8952         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
8953         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
8954         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
8955
8956 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
8957
8958         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
8959         fix bug #487815
8960         * support/cpp2/Makefile.in: fix bug #487815
8961         * configure: rebuilt from configure.in
8962         * Makefile.common.in: docdir changed, new path suffixes
8963         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
8964         * sdcc_vc_in.h: reflect changes from sdccconf.h
8965         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
8966         * src/SDCCutil.h: remove BINDIR hack
8967         * doc/sdccman.lyx: update new path hierarchy
8968
8969 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8970
8971         * src/SDCCpeeph.c: added okToRemoveSLOC test
8972
8973 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8974
8975         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
8976
8977 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
8978
8979         * src/SDCCpeeph.c: added labelIsReturnOnly test
8980         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
8981
8982 2003-04-05    <johan AT balder>
8983
8984         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
8985         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
8986         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
8987         * src/SDCCast.c: fixed a warning
8988         * src/SDCCast.h: fixed a warning
8989         * src/SDCCicode.c (operandFromAst): fixed a warning
8990
8991 2003-04-04    <johan AT balder>
8992
8993         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
8994         * src/SDCCast.c (decorateType): fixed bug #715076
8995         * src/SDCC.y: fixed bug #702907
8996
8997 2003-04-03    <johan AT balder>
8998
8999         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9000         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9001         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9002         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9003         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9004
9005 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9006
9007         * _decdptr.c: fix return values
9008         * _gptrget.c: fix return values
9009         * _gptrgetc.c: fix return values
9010         * _gptrput.c: fix return values
9011         * _mulint.c: fix return values
9012         * as/z80/Makefile: fix 'make -j' problem
9013
9014 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9015
9016         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9017         * configure.in: big cleanup, updated to autoconf 2.5x
9018         * configure: rebuilt from configure.in
9019         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9020         * sdcc_vc_in.h: reflect changes from sdccconf.h
9021         * doc/Makefile: fixed a flaw in "make install"
9022
9023 2003-04-02    <johan AT balder>
9024
9025         * src/ds390/gen.c (genCmp): no comments
9026         * src/mcs51/gen.c (genCmp): no comments
9027         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9028         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9029
9030 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9031
9032         * support/regression/generate-cases.py: place generated file in given sub directory
9033         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9034         * support/regression/Makefile: improvements for 'make -j';
9035         side effect: it's simpler and faster now
9036
9037 2003-03-31  Borut Razem <borut.razem AT siol.net>
9038
9039         * src/z80/main.c: link-{port} and as-{port} defined without path
9040         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9041
9042 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9043
9044         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9045
9046 2003-03-30  Borut Razem <borut.razem AT siol.net>
9047
9048         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9049           changed type of list parameter to set
9050         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9051         * src/port.h: changed type of do_assemble() parameter to set
9052         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9053           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9054           definition of "cppoutfilename" macro with NULL value in preProcess()
9055         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9056         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9057         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9058           replaced with set *binPathSet
9059         * shash_add() deallocates the item, if allready exsists, before adding the new one
9060         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9061
9062 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9063
9064         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9065           a nested for loop bug in the PIC port
9066         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9067           for loops
9068
9069 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9070
9071         * support/Util/dbuf.h: remove C++ stuff to make it portable
9072
9073 2003-03-28  Borut Razem <borut.razem AT siol.net>
9074
9075         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9076           literal strings in stringLiteral()
9077         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9078         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9079           to the project
9080
9081 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9082
9083         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9084
9085 2003-03-26    <johan AT balder>
9086
9087         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9088         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9089         * src/SDCCast.c (decorateType): fixed " -v < 3"
9090
9091 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9092
9093         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9094         Added Lenny Story's debug infrastructure changes:
9095         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9096         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9097         * src/cdbFile.c: added
9098         * src/SDCCdebug.c: added
9099         * src/SDCCdebug.h: added
9100         * src/SDCCast.c (createFunction)
9101         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9102         * src/SDCCmain.c (parseCmdLine, main)
9103         * src/SDCCmem.c (redoStackOffsets)
9104         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9105         * src/SDCCsymt.h
9106         * src/common.h
9107         * src/avr/gen.c (genAVRCode)
9108         * src/ds390/gen.c (gen390Code)
9109         * src/mcs51/gen.c (gen51Code)
9110         * src/pic/gen.c (genpic14Code)
9111         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9112         * src/xa51/gen.c (genXA51Code)
9113         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9114
9115 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9116
9117         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9118         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9119
9120 2003-03-22    <johan AT balder>
9121
9122         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9123
9124 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9125
9126         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9127         * doc/cdbfileformat.lyx: added, written by Lenny Story
9128         * doc/Makefile: added cdbfileformat.lyx
9129         * doc/clean.mk: added cdbfileformat.lyx
9130
9131 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9132
9133         * src/mcs51/peeph.def: fix bug #705773
9134
9135 2003-03-20    <johan AT balder>
9136
9137         An sfr/sbit can have an "at #" AND an initializer
9138         * src/SDCCsymt.c (checkSClass):
9139         * src/SDCCmem.c (allocGlobal):
9140         * src/SDCCmem.c (allocLocal):
9141         * src/SDCCast.c (createBlock):
9142
9143 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9144
9145         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9146
9147 2003-03-16    <johan AT balder>
9148
9149         Undid the hackup of const and volatile, the problem is much bigger
9150         * src/SDCC.y:1.65
9151         * src/SDCCast.c:1.171
9152         * src/SDCCglue.c:1.138
9153         * src/SDCCicode.c:1.146
9154         * src/SDCCsymt.c:1.150
9155         * src/SDCCval.c:1.65
9156
9157 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9158
9159         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9160         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9161
9162 2003-03-13    <johan AT balder>
9163
9164         Hackup const and volatile modifiers in type chains a bit:
9165         * src/SDCC.y:1.63
9166         * src/SDCCast.c:1.169
9167         * src/SDCCglue.c:1.136
9168         * src/SDCCicode.c:1.143
9169         * src/SDCCsymt.c1.146
9170         * src/SDCCsymt.h1.59
9171         * src/SDCCval.c:1.63
9172
9173 2003-03-12    <johan AT balder>
9174
9175         * src/SDCCBBlock.h: more LRH debugging junk
9176         * src/SDCCcflow.h: more LRH debugging junk
9177         * src/SDCCloop.c: more LRH debugging junk
9178         * src/SDCC.y (struct_declaration): fixed bug #697590
9179         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9180         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9181         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9182
9183 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9184         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9185         test function names must now match exactly).
9186         * src/SDCCcse.c: added special case in findCheaperOp to allow
9187         extending a short integer. Makes less awful code for bug 700121 test case.
9188
9189 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9190
9191         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9192         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9193
9194 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9195
9196         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9197         actually called (operandsNotEqual() was called for all
9198         operandsNotEqualX tests).
9199
9200 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9201
9202         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9203         with shorter literals. Fixes bug 700121.
9204
9205 2003-03-11    <johan AT balder>
9206
9207         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9208
9209 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9210
9211         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9212         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9213
9214 2003-03-10  Borut Razem <borut.razem AT siol.net>
9215
9216         * src/SDCCmain.c: pipe preprocessor's output
9217         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9218         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9219         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9220         which closes all pipes in pipeSet set
9221         * src/SDCCset.c: free deleted item in function deleteSetItem()
9222         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9223         moved from z80 to src subproject
9224         * .version: increased version number to 2.3.4
9225
9226 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9227
9228         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9229         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9230         * support/regression/ports/xa51/spec.mk: fix typo
9231
9232 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9233
9234         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9235
9236 2003-03-09  Borut Razem <borut.razem AT siol.net>
9237
9238         * src/SDCCmain.c: pipe preprocessor's output
9239         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9240         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9241         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9242         which closes all pipes in pipeSet set
9243         * src/SDCCset.c: free deleted item in function deleteSetItem()
9244         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9245         moved from z80 to src subproject
9246
9247 2003-03-09  Borut Razem <borut.razem AT siol.net>
9248
9249         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9250         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9251         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9252         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9253         * src/SDCCglobl.h: unification of WIN32 native definitions
9254
9255 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9256
9257         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9258
9259 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9260
9261         * src/configure.in:   check for endianess (even while cross-compiling)
9262         * src/configure:      check for endianess (even while cross-compiling)
9263         * src/configure_in.h: check for endianess (even while cross-compiling)
9264         * src/avr/gen.c:        remove old endianess stuff
9265         * src/mcs51/gen.c:      remove old endianess stuff
9266         * src/ds390/gen.c:      remove old endianess stuff
9267         * src/pic/gen.c:        remove old endianess stuff
9268         * src/pic/genarith.c:   remove old endianess stuff
9269         * src/pic/glue.c:       fix endianess check
9270         * src/pic16/gen.c:      remove old endianess stuff
9271         * src/pic16/genarith.c: remove old endianess stuff
9272         * src/pic16/glue.c:     fix endianess check
9273         * src/xa51/gen.c:       remove old endianess stuff
9274         * src/z80/gen.c:        fix endianess check
9275         * src/SDCCglue.c:       fix endianess check
9276         * src/ds390/peeph.def: fix bug 700036
9277
9278 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9279
9280         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9281         * src/configure: find appropriate data-types on host for SDCC's int and long
9282         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9283         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9284         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9285
9286 2003-03-07    <johan AT balder>
9287
9288         Just a big NOOP:
9289                 some minor cleanups before the big shot
9290                 OP_DEFS and OP_USES now use Kevin's protection
9291                 new option --nolabelopt
9292
9293         * src/SDCCBBlock.c:
9294         * src/SDCCast.c,:
9295         * src/SDCCcflow.c:
9296         * src/SDCCcse.c:
9297         * src/SDCCicode.c:
9298         * src/SDCCicode.h:
9299         * src/SDCClabel.c:
9300         * src/SDCCloop.c:
9301         * src/SDCCmain.c:
9302         * src/ds390/ralloc.c:
9303         * src/mcs51/ralloc.c:
9304         * src/pic/ralloc.c:
9305         * src/xa51/ralloc.c:
9306         * src/z80/ralloc.c:
9307
9308 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9309
9310         * src/pic/pcode.c (get_op): fix 64 bit warnings
9311         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9312         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9313         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9314         * support/regression/tests/malloc.c: fix 64 bit warnings
9315
9316 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9317
9318         * src/mcs51/gen.c (genMinus): fixed bug 696436
9319
9320 2003-03-02  Borut Razem <borut.razem AT siol.net>
9321
9322         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9323
9324 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9325
9326         * configure.in: test for mkstemp
9327         * sdccconf_in.h: add HAVE_MKSTEMP
9328
9329 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9330
9331         * device/include/ctype.h: removed warning while using --stack-auto
9332         * device/include/malloc.h: removed warning while using --stack-auto
9333         * device/include/string.h: removed warning while using --stack-auto
9334
9335 2003-02-23  Borut Razem <borut.razem AT siol.net>
9336
9337         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9338         because NDEBUG is defined (see man assert)
9339         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9340
9341 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9342
9343         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9344         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9345
9346 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9347
9348         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9349         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9350
9351 2003-02-18    <johan AT balder>
9352
9353         * as/mcs51/asmain.c (asmbl): module can start with a digit
9354         * as/z80/asmain.c (asmbl): module can start with a digit
9355
9356 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9357
9358         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9359         * src/asm.c: fix pipe() for Mingw32
9360
9361 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9362
9363         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9364         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9365         make -V work again; --c1mode reads now from stdin
9366         * doc/sdccman.lyx: added --c1mode
9367         * support/Util/SDCCerr.c: new messages for c1 mode
9368         * support/Util/SDCCerr.h: new messages for c1 mode
9369         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9370
9371 2003-02-15    <johan AT balder>
9372
9373         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9374
9375 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9376
9377         * doc/sdccman.lyx: Environment variables, -o and other minor things
9378
9379 2003-02-14    <johan AT balder>
9380
9381         * src/xa51/main.c: before anyone really tries to use it :)
9382
9383         * Install doc's in share/sdcc/doc
9384         * removed some obsolete files
9385         * Do a proper make distclean and uninstall
9386         M Makefile.common.in
9387         R sdccbuild.sh
9388         M as/Makefile
9389         M device/include/Makefile.in
9390         M device/lib/Makefile.in
9391         M doc/sdccman.lyx
9392         M link/Makefile
9393         M sim/ucsim/doc/Makefile.in
9394         M src/clean.mk
9395         R src/avr/peeph.rul
9396         R src/xa51/peeph.rul
9397         M support/cpp2/Makefile.in
9398         M support/makebin/Makefile
9399
9400
9401 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9402
9403         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9404
9405 2003-02-10  Borut Razem <borut.razem AT siol.net>
9406
9407         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9408         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9409         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9410         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9411         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9412         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9413         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9414         src/z80/Makefile.bcc: Borland Makefile cleanup
9415         * as/z80/Makefile.bcc: Added Borland Makefile
9416         * support/cpp2/borland.h: Removed
9417
9418 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9419
9420         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9421         * src/SDCC.lex: new pragma NOIV
9422         * src/SDCCglobl.h: new pragma NOIV
9423         * src/SDCCmem.c: new pragma NOIV
9424
9425 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9426
9427         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9428
9429 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9430
9431         * src/SDCCmain.c: signal handling is switched off by --debug
9432         * doc/Makefile: small fix for install; use clean.mk again
9433         * doc/clean.mk: clean *.pdf and *.html too
9434
9435 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9436
9437         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9438         * device/lib/printfl.c: fix a ds390 bug by making it portable
9439         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9440         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9441         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9442         * debugger/mcs51/cmd.c: converted multi-line string literals
9443         * sim/ucsim/globals.cc: converted multi-line string literals
9444         * src/SDCCmain.c: introduced signal handler to remove temp files
9445         * doc/Makefile: small tweaks, implement clean
9446         * doc: removed generated files
9447
9448 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9449
9450         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9451         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9452         Address Record is not correctly generated for DS390."
9453
9454 2003-02-02  Borut Razem <borut.razem AT siol.net>
9455
9456         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9457         * as/mcs51/asm.h: fixed compilation with Borland C
9458         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9459         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9460         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9461         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9462         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9463         src/z80/Makefile.bcc: delete $(LIB) only if exist
9464         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9465
9466 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9467
9468         * device/include/malloc.h: introduced NULL
9469         * device/include/string.h: introduced NULL
9470         * device/include/stdlib.h: introduced NULL
9471         * device/lib/_memcpy.c: removed NULL
9472         * device/lib/_strcat.c: removed NULL
9473         * device/lib/_strchr.c: removed NULL
9474         * device/lib/_strcmp.c: removed NULL
9475         * device/lib/_strcpy.c: removed NULL
9476         * device/lib/_strcspn.c: removed NULL
9477         * device/lib/_strlen.c: removed NULL
9478         * device/lib/_strncat.c: removed NULL
9479         * device/lib/_strncmp.c: removed NULL
9480         * device/lib/_strncpy.c: removed NULL
9481         * device/lib/_strpbrk.c: removed NULL
9482         * device/lib/_strrchr.c: removed NULL
9483         * device/lib/_strspn.c: removed NULL
9484         * device/lib/_strstr.c: removed NULL
9485         * device/lib/_strtok.c: removed NULL
9486         * device/lib/malloc.c: removed NULL, include own header
9487
9488 2003-02-02    <johan AT balder>
9489
9490         * 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
9491         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9492         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9493         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9494         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9495         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9496
9497 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9498
9499         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9500         area 'DATA'"
9501
9502 2003-02-01    <johan AT balder>
9503
9504         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9505
9506 2003-01-31    <johan AT CP255758-A>
9507
9508         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9509
9510 2003-01-30    <johan AT balder>
9511
9512         * src/SDCCBBlock.c: automatic bug detection
9513         * src/SDCCicode.c: automatic bug detection
9514
9515 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9516
9517         * src/SDCCglobl.h:   now --xram-size 0 works
9518         * src/SDCCmain.c:    now --xram-size 0 works
9519
9520 2003-01-29    <johan AT balder>
9521
9522         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9523
9524 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9525
9526         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9527         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9528         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9529         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9530         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9531         * src/SDCCmain.c:    Added options --xram-size and --code-size
9532
9533 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9534
9535         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9536         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9537
9538 2003-01-27    <johan AT balder>
9539
9540         * src/SDCC.y: fixed bug #613764
9541
9542 2003-01-26    <johan AT balder>
9543
9544         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9545         * src/SDCCsymt.h: fixed bug #673374
9546         * src/SDCCglue.c: fixed bug #661910
9547         * src/SDCCast.c: fixed bug #458099 and 673374
9548
9549 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9550
9551         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9552         * as/mcs51/strcmpi.h: added
9553         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9554         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9555         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9556         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9557         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9558         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9559         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9560         * as/mcs51/Makefile.aslink: new module strcmpi
9561         * as/mcs51/Makefile.asx8051: new module strcmpi
9562         * as/mcs51/Makefil.bcc: new module strcmpi
9563         * as/mcs51/Makefile.in: new module strcmpi
9564         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9565
9566 2003-01-26    <johan AT balder>
9567
9568         * src/SDCCglue.c: reverted back to 1.124
9569         * src/SDCCast.c: reverted back to 1.156
9570         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9571
9572 2003-01-25    <johan AT balder>
9573
9574         * src/SDCCglue.c: A better fix for bug #661910
9575         * src/SDCCast.c: A better fix for bug #661910
9576         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9577
9578 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9579
9580         * src/Makefile.in: remove spawn.o
9581         * src/SDCCmain.c: remove spawn.h
9582         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9583         * src/spawn.c: removed
9584         * src/spawn.h: removed
9585         * support/regression/ports/ds390/spec.mk: link with -r
9586
9587 2003-01-24    <johan AT CP255758-A>
9588
9589         * src/ds390/gen.c (aopOp): fixed bug #667458
9590         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9591         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9592         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9593
9594 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9595
9596         * src/mcs51/peeph.def: better assembler identation by Frieder
9597         * src/mcs51/gen.c: better assembler identation by Frieder
9598
9599 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9600
9601         * as/z80/string.h: removed for gcc 3.2
9602         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9603         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9604
9605 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9606
9607         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9608         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9609         * support/regression/Makefile: separate temp files for ports
9610         * support/regression/generate-cases.py: separate temp files for ports
9611         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9612         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9613
9614 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9615
9616         * moved tinitalk to device/examples/ds390
9617
9618 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9619
9620         * as/mcs51/lkmem.c: rflag is for DS390
9621         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9622         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9623                          (linkEdit): move mem- and map-files the same way as ihx-files
9624         * src/z80/main.c (_setDefaultOptions): removed --generic
9625         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9626         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9627         * src/pic/glue.c (picglue): --c1mode works again
9628         * src/pic16/glue.c (pic16glue): --c1mode works again
9629         * src/asm.c (printCLine): fix #660034
9630
9631 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9632
9633         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9634         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9635         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9636         * as/mcs51/lkmem (summary): better fix for sp problem
9637         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9638         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9639         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9640                                               remove --stack-after-data
9641
9642 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9643
9644         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9645         * src/SDCCutil.c (join): ugly bug: missing '\0'
9646         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9647
9648 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9649
9650         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9651         * src/port.h: typo
9652         * src/pic/main.c (_asmCmd): gpasm supports -o
9653         * src/z80/main.c: more general macros
9654         * device/lib/Makefile.in: remove intermediate files
9655
9656 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9657
9658         * .version: Bumped version number to 2.3.3
9659         * src/SDCCBBlock.c: new option -o
9660         * src/SDCCglobl.h: new option -o
9661         * src/SDCCglue.c: new option -o
9662         * src/SDCCmain.c: new option -o
9663         * src/asm.c: new option -o
9664         * src/ds390/main.c: new option -o
9665         * src/pic/glue.c: new option -o
9666         * src/pic/pcode.c: new option -o
9667         * src/pic/ralloc.c: new option -o
9668         * src/pic16/glue.c: new option -o
9669         * src/pic16/pcode.c: new option -o
9670         * src/pic16/ralloc.c: new option -o
9671         * src/z80/main.c: new option -o
9672         * device/lib/Makefile.in: use -o
9673         * support/regression/ports/ds390/spec.mk: use -o
9674         * support/regression/ports/gbz80/spec.mk: use -o
9675         * support/regression/ports/mcs51/spec.mk: use -o
9676         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9677         * support/regression/ports/z80/spec.mk: use -o
9678         * support/regression/ports/ucz80/spec.mk: use -o
9679         * support/regression/ports/xa51/spec.mk: use -o
9680         * support/regression/fwk/lib/timeout.c: fix usage string
9681
9682 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9683         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9684
9685 2003-01-07    <johan AT balder>
9686
9687         * src/SDCCast.c (decorateType): fixed bug #600035
9688
9689 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9690         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9691         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9692         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9693         * src/pic/pcode.c: outcommented unused variable to remove warnings
9694         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9695
9696 2003-01-06    <karl AT turbobit.com>
9697         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9698    regression tests.
9699
9700 2003-01-06    <johan AT balder>
9701
9702         * src/SDCCicode.c: fixed array add
9703
9704 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9705         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9706         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9707
9708 2003-01-04    <johan AT balder>
9709
9710         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9711
9712 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9713         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9714
9715 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9716         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9717         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9718
9719 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9720         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9721
9722 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9723         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9724
9725 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9726         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9727
9728 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9729
9730     * in \sdcc\as\mcs51\ changed these files in order to create an
9731     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9732     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9733     following files to include the previous two files: aslink.dsp,
9734     Makefile.aslink, Makefile.bcc, and Makefile.in.
9735
9736     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9737     .adb instead of .cdb
9738
9739 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9740
9741         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9742         value from option --iram-size.
9743
9744 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9745
9746         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9747         dram[] array.
9748
9749 2002-09-18    <wiml AT hhhh.org>
9750
9751         * SDCClrange.h: exposed setFromRange() and setToRange()
9752         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9753           packRegsForAccUse() (bug 542397)
9754         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9755           multiple times and emitting the fetch operations more than once
9756           added aopGetUsesAcc() function to allow binary operators to
9757           fetch their operands in the correct order; made genMinus() emit
9758           compact code for X = LITERAL - Y
9759
9760 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9761         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9762         sprintf() in line 1267.
9763
9764 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9765         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9766         like ports.
9767
9768 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9769         Changes to aslink (All the changes are marked with 'JCF'):
9770
9771         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9772         summary().
9773
9774         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9775         area BSEG.  Also moves, if possible, the DATA area down into the internal
9776         ram so more space is available.
9777
9778         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9779         sflag.
9780
9781         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9782         not bytes.  Function summary() which creates a memory usage summary
9783         file with extension .mem.  Reports of overlaping stack and small stack
9784         size.  If the space for the stack is less than 16 bytes aslink trows a
9785         warning.
9786
9787         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9788         the 8051.  Option 'y' for memory summary output file.
9789
9790         Changes to sdcc (All the changes are marked with 'JCF'):
9791
9792         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9793
9794         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9795         overlaying area for it (uses RegBankUsed[4]).
9796
9797         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9798         bank zero as used by default.  By default aslink locates the stack
9799         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9800         the creation of the .mem file.  Delegates the allocation of data area
9801         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9802         the begining of the stack area to aslink.
9803
9804         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9805         glue() in SDCCglue.c creates an area for it.
9806
9807 2002-09-03  Borut Razem <borut.razem AT siol.net>
9808         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9809         sdcc/src/pic/glue.c:
9810         introduced atexit() handler for teporay files removal in case of
9811         errors, assertions, ...
9812
9813 2002-08-29  Borut Razem <borut.razem AT siol.net>
9814         * sdcc/support/cpp2/auto-host_vc_in.h:
9815         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9816         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9817         Maybe there is a similar problem with BORLANDC? It should be checked!
9818
9819         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9820         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9821         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9822         was not executed, and the compiler (cl) launched a warning:
9823         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9824
9825 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9826         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9827
9828 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9829         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9830
9831         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9832           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9833           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9834           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9835           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9836           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9837           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9838         - added Release configuration in VS projects
9839         - review of compiler an linker options
9840         - VC .exe files are generated in bin_vc directory, not to interfere
9841           with binaries generated from other projects (cygwin, mingw, bcc ...)
9842
9843         * sdcc/src/yacc.dsp: added
9844
9845         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9846         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9847         and insert the version number definitions from .version
9848
9849         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9850
9851         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9852         added - genarate auto-host.h using auto-host_vc_in.h as template
9853
9854         * sdcc/sdcc_vc.h,
9855         removed from CVS, generated automatically
9856
9857 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9858         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9859
9860 2002-08-11  Borut Razem <borut.razem AT siol.net>
9861         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9862
9863 2002-08-10  Borut Razem <borut.razem AT siol.net>
9864         * src/SDCCmain.c (main):
9865         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9866         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9867         The consequence was that some temporary files were not removed.
9868
9869         * src/SDCCglue.c:
9870         unification of code in functions tempfilename() and tempfile():
9871         function tempnam() is defined in Visual Studio 6.0 and .NET
9872
9873         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9874
9875         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9876           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9877         - removed compiler command line option /WX: Treats all warnings as errors
9878         - update a list of source files, included into the project
9879
9880         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9881           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9882         changed project type to Generic Project so that can be correcly converted to VS.NET project
9883
9884         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9885
9886         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9887
9888         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9889
9890         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9891         added return 0 statements after assert() to make compiler happy
9892
9893         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9894         added newline in the def file to keep MSC compiler satisfied
9895
9896         * sdcc/src/z80/gen.c:
9897         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9898           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9899         - solved MSC error in function aopDump()
9900
9901         * sdcc_vc.h: define PREFIX as "\\sdcc"
9902
9903 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9904         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9905
9906 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9907         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9908         - Rewrote the register banking algorithm.
9909         - Added pCode live-range analysis to registers (for now, only non-used and
9910         singly-used registers optimized away)
9911
9912         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9913
9914         * 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.
9915
9916 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9917         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9918
9919 2002-04-22  Michael Hope  <michaelh AT vroom>
9920
9921         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9922
9923         * configure.in (DD_COPT): Added include support required for gbdk.
9924
9925         * .version: Bumped version number just to increase it.
9926
9927         * src/SDCCmain.c: Added -nostdinc to the default options.
9928
9929 2002-04-15  Michael Hope  <michaelh AT vroom>
9930
9931         * device/lib/z80/printf.c (sprintf): Added.
9932
9933         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
9934
9935         * src/z80/peeph.def: Added transpose redundent load rule.
9936
9937         * src/z80/main.c: Added force callee saves for jaune.
9938
9939         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
9940
9941         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
9942
9943 2002-03-28  Johan Knol  <johan AT balder>
9944
9945         * src/SDCCval.c: fixed bug #532436
9946
9947 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9948         * /src/port.h:
9949         Added "char *Processor" field to the port structure.
9950
9951         * /src/SDCCmain.c:
9952         Added -p option. Allows port dependent processor to be specified.
9953
9954         * all ports:
9955         Initialized the new field char *Processor field to NULL in all ports
9956
9957         * /src/pic/*:
9958         Compiler generated registers for interrupt context saving
9959         were not getting allocated.
9960
9961 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
9962
9963         * /src/SDCCast.c:
9964         Fixed left shift. Will promote the left side of a left shift
9965         if a) left shifting more than size of operand or b) when assigned
9966         to something size > size of left side
9967
9968 2002-03-14  Scott Dattalo <scott AT dattalo.com>
9969         * src/pic/*
9970         tons of changes. Register allocation has been
9971         rewritten. Added customization for the various PICs. Flow
9972         analysis is restructured. ...
9973
9974         * src/pic/device.h:
9975         Added
9976
9977         * src/pic/device.c:
9978         Added. device.c is a PIC port hack to accomodate variations
9979         in PIC devices.
9980
9981 2002-03-13  Michael Hope  <michaelh AT vroom>
9982
9983         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
9984
9985 2002-03-04  johanknol  <johanknol AT manik>
9986
9987         * /src/SDCCval.c: fixed
9988
9989         const unsigned char arr[][2] = { { 0, 1 } };
9990         t18.c:1: error: Initializer element is not constant
9991
9992 2002-03-04  bela  <bela AT manik>
9993
9994         * /device/include/mcs51reg.h:
9995         ds89c420 register definition update
9996
9997 2002-03-03    <johan AT FRIJA>
9998
9999         * support/Util/SDCCerr.c: did something, but don't no why anymore
10000
10001         * support/regression/tests/bug-524691.c: made it a little less shy
10002
10003         * src/SDCCast.c (decorateType): fixed bug #524697
10004
10005         * src/SDCCast.c: made some lineno improvements
10006
10007         * src/SDCCval.c (getNelements): changed warning to error
10008
10009         * src/SDCCglue.c (printIvalArray): changed warning to error
10010
10011         * src/SDCCicode.c: fixed a warning for mingw
10012
10013         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10014
10015         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10016
10017 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10018
10019         * src/ds390/peeph.def:
10020         Added some more peephole rules
10021
10022         * src/ds390/gen.c: Various fixes & enhancements
10023
10024         * src/SDCClrange.c, src/SDCClrange.h:
10025         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10026
10027         * src/ds390/ralloc.c:
10028         various fixes & enhancements (ds390) specific
10029
10030         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10031         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10032         from rallocs.
10033
10034         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10035
10036 2002-03-02    <johan AT FRIJA>
10037
10038         * src/SDCCast.c (decorateType): fixed bug #524708
10039
10040         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10041
10042         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10043
10044 2002-03-01  Michael Hope  <michaelh AT vroom>
10045
10046         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10047
10048         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10049
10050 2002-03-01    <johan AT FRIJA>
10051
10052         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10053
10054         * src/SDCCast.c (decorateType): fixed bug #524209
10055
10056         * src/SDCCval.c (valNot): fixed bug #524195
10057
10058 2002-02-26    <johan AT balder>
10059
10060         * src/xa51/gen.c: fixed a warning
10061
10062         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10063
10064         * src/SDCCast.c (decorateType): fixed bug #522534
10065
10066 2002-02-23    <johan AT balder>
10067
10068         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10069
10070 2002-02-22    <johan AT balder>
10071
10072         * src/SDCCast.c: fixed bug #514865
10073
10074         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10075
10076 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10077
10078         * sdcc/src/SDCCloop.c:
10079         Previous fix was not good. basic blocks that have "break" or "return" are
10080         not really partof a loop , but live ranges used in these blocks should
10081         be live thru the entire loop, so set partOfLoop but don't add them to
10082         loop region
10083
10084 2002-02-21    <johan AT FRIJA>
10085
10086         * src/SDCCcse.c: fixed bug #514308
10087
10088 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10089
10090         * src/SDCCloop.c:
10091         Fixed BUG #519583. If a conditional block ended in a return/break
10092         statement inside a loop, it was not being considered part of the loop.
10093
10094         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10095
10096 2002-02-10  Karl Bongers <karl AT turbobit.com>
10097
10098         * debugger/*:
10099         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10100         with lots of comments and notes.
10101
10102         * device/examples/test2.c:
10103         Fix bug, "red" variable not being initialized(compiler complained).
10104
10105         * device/examples/Makefile, examples/test3.c:
10106         Add Makefile in device/examples folder, compiles test3.c
10107         for use as a multiple module SDCDB test case.
10108
10109         * sim/ucsim/cmd.src/cmdset.cc:
10110         Took out debug printfs in ucsim "next" command.
10111
10112         * sim/ucsim/xa.src:
10113         Karl and Johan start ucsim XA support.  Most dissassembly working,
10114         about 75% emulation done(plenty of work remaining).
10115
10116         * sim/ucsim/z80.src:
10117         Add Z80 support to ucsim, add test-ucz80 regression test,
10118         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10119         Notice z80 compiler fails on examples/test3.c/crc code.
10120
10121 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10122
10123         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10124         Added support for --parms-in-bank1
10125
10126         * src/ds390/peeph.def:
10127         added a few more peephole optimzations
10128
10129         * src/ds390/main.c:
10130         1) added __builtin_inp & __builtin_outp used to read in data of given length
10131            from a memory mapped port
10132         2) added __builtin_memcmp
10133         3) added __builtin_swapw swap bytes of a short
10134
10135         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10136         1) handle multiple send & receives from register bank1
10137         2) ralloc can now allocate DPTR1 to some liveRanges
10138
10139         * src/SDCCsymt.c, src/SDCCsymt.h:
10140         changes to handle multiple sends & receives
10141
10142         * src/SDCCptropt.h:
10143         added some pointer arithmetic optimization
10144
10145         * src/SDCCptropt.c:
10146         added some pointer arithmetic optimizations but not stable yet so not
10147         called from anywhere (will get this working shortly)
10148
10149         * src/SDCCopt.c: fixed for multiple sends & receives
10150
10151         * src/SDCCmain.c:
10152         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10153         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10154            set preprocessor defines (depending on options)
10155
10156         * src/SDCCicode.c, src/SDCCicode.h:
10157         changes made to handle multiple sends & receives
10158
10159         * src/SDCCglobl.h:
10160         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10161
10162         * src/SDCCcse.c, src/SDCCcse.h:
10163         added function findbackward def (to be used in upcoming optimization)
10164
10165         * src/SDCCcflow.c, src/SDCCcflow.h:
10166         added function returnAtEnd - to determine if a basic block terminates with
10167         a RETURN iCode
10168
10169         * src/SDCCast.c, src/SDCCast.h:
10170         added option parms-in-bank1
10171
10172         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10173         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10174         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10175         adjusted for --parms-in-bank1 option
10176
10177         * device/include/string.h:
10178         donot redefine "reentrant" keyword
10179
10180         * device/include/ds80c390.h: Added some more SFRs
10181
10182 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10183
10184         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10185
10186 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10187
10188         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10189
10190 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10191
10192         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10193
10194 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10195
10196         * Added --xram-movc option
10197
10198 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10199
10200         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10201
10202 2002-01-11  Johan Knol
10203
10204         * Added math lib of Jesus Calvino-Fraga
10205
10206 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10207
10208         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10209         * support/regression/Makefile: new target test-mcs51-stack-auto
10210         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10211
10212 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10213
10214         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10215
10216 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10217
10218         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10219
10220 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10221
10222         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10223
10224         * src/SDCCglue.h: add definition for printIvalChar()
10225
10226 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10227
10228         * src/SDCCast.c: fix #498138 by Johan
10229
10230         * src/SDCCglue.c: fix #498138 by Johan
10231
10232 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10233
10234         * support/regression/Makefile: fix clean
10235
10236         * support/regression/ports/ds390/support.c: fix transmission of last character
10237
10238 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10239
10240         * /sdcc/src/ds390/gen.c:
10241         a) improved computing address of stack variable
10242         b) took out some #if 0 code
10243         c) improved parmBytes adjustment
10244         d) improved genPlusIncr & genMinusIncr
10245         e) genCmp could generate bad code (when left assigned to DPTR)
10246         f) Fixed bug in hasInc
10247
10248         * /sdcc/src/ds390/ralloc.c:
10249         a) packRegsForSupport could mess up live information (Fixed)
10250         b) packRegsDPTRuse could be incorrect for left & right shift
10251
10252         * /sdcc/src/mcs51/ralloc.c:
10253         packRegsForSupport could mess up the live information (Fixed)
10254
10255         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10256
10257         * /sdcc/src/SDCCast.c:
10258         can reverse a loop even if function call is present as long
10259         as the loop control variable is local & is not passed as parameter
10260
10261 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10262
10263         * /sdcc/ChangeLog: *** empty log message ***
10264
10265         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10266         More builtin function additions for TININative
10267
10268         * /sdcc/src/ds390/ralloc.c:
10269         Had broken the regression testsuite
10270
10271         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10272
10273         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10274         Added funcattr hasStackParms will be set for reentrant functions when there
10275         are paramteres on the stack, this helps in minimizing frame pointer generation
10276         typeFromStr can handle function pointers now
10277
10278         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10279         *** empty log message ***
10280
10281 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10282
10283         * /src/ds390/gen.c, /src/ds390/main.c:
10284         More builtin function additions for TININative
10285
10286         * /src/ds390/ralloc.c:
10287         Had broken the regression testsuite
10288
10289         * /src/SDCCast.c: Fixed a bug in dumptree
10290
10291         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10292         Added funcattr hasStackParms will be set for reentrant functions when there
10293         are paramteres on the stack, this helps in minimizing frame pointer generation
10294         typeFromStr can handle function pointers now
10295
10296         * /doc/builtins.txt, /doc/TININative.txt:
10297         *** empty log message ***
10298
10299
10300 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10301
10302         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10303         ALPHA version for -mTININative
10304
10305         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10306         updated to reflect changes in the port structure
10307
10308         * /src/port.h:
10309         added function do_assemble (similar to do_link) if non-null this function
10310         will be called to do assembly (-mTININative) requires a multi command
10311         assembly
10312         added function genAssemblerEnd will be called to generate assembler Epilogue
10313
10314         * /src/SDCCsymt.c:
10315         added _JavaNative to debug info printing
10316
10317         * /src/SDCCmain.c: added option --tini-libid
10318         added port->do_assemble function (-mTININative) has a multi command assemble
10319
10320         * /src/SDCCglue.c: Disabled "constExpr" check
10321         added port->genAssemblerEnd function
10322
10323         * /src/SDCCglobl.h: Added option --tini-libid value
10324
10325         * /src/SDCCast.h:
10326         tookout optimizeCompare from the header (has no external references)
10327
10328         * /src/SDCCast.c: made one more function "static"
10329
10330 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10331
10332         * src/z80/mappings.i: Added z80asm support.
10333
10334         * src/z80/main.c: Added z80asm support on --asm=z80asm
10335
10336         * src/z80/gen.c: Fixed asm portability issues.
10337
10338         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10339
10340         * src/SDCCglue.c (printExterns): Added global/extern split.
10341
10342 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10343
10344         * support/regression/Makefile: added test for mcs51 model large
10345
10346         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10347
10348         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10349
10350 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10351
10352         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10353
10354 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10355
10356         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10357
10358         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10359
10360 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10361
10362         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10363
10364         * support/regression/tests/simplefloat.c: Port to mcs51.
10365
10366 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10367         * support/regression/tests/bug-485362.c: Added.
10368
10369         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10370
10371         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10372
10373         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10374
10375         * src/z80/gen.c (aopDump): Added a dump function.
10376
10377 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10378         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10379
10380         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10381
10382         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10383
10384         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10385
10386         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10387
10388         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10389
10390         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10391
10392         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10393
10394         * support/regression/ports/ds390/support.c: Use tinibios.
10395
10396         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10397
10398 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10399
10400         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10401         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10402
10403         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10404
10405         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10406
10407 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10408
10409         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10410
10411         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10412         (packRegsForIYUse): Created and optimised.
10413
10414 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10415
10416         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10417 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10418
10419         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10420
10421         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10422
10423         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10424
10425 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10426
10427         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10428
10429         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10430
10431 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10432
10433         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10434
10435         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10436
10437         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10438
10439 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10440
10441         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10442         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10443         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10444
10445         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10446
10447         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10448         (genNotFloat): Added.
10449         (genUminusFloat): Added.
10450
10451         * device/lib/z80/Makefile: Added floating pt stubs.
10452
10453         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10454
10455         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10456
10457         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10458
10459 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10460
10461         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10462
10463         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10464
10465         * sdcc/support/regression/Makefile: Add port ds390.
10466
10467         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10468
10469         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10470
10471         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10472
10473         * sdcc/support/regression/ports/ds390/support.c: Added.
10474
10475         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10476
10477         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10478
10479         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10480
10481 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10482
10483         * device/include/malloc.h: Added z80 and gbz80 support.
10484
10485         * device/lib/gbz80/heap.s: Added.
10486
10487         * device/lib/z80/heap.s: Added.
10488
10489         * device/lib/malloc.c: Added z80 and gbz80 support.
10490
10491         * support/regression/tests/malloc.c (testMalloc): Added.
10492
10493         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10494
10495         * support/regression/tests/bug-478094.c: Added.
10496
10497         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10498
10499 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10500
10501         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10502
10503         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10504
10505         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10506
10507         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10508
10509         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10510
10511 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10512
10513         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10514
10515 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10516
10517         * support/regression/tests/bug-477927.c: Added.
10518
10519         * src/z80/peeph.def: Added minor rules.
10520
10521         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10522
10523         * src/z80/peeph.def: Added jump optimisation modification.
10524
10525 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10526
10527         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10528
10529 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10530
10531         * support/regression/tests/funptrs.c: Added.
10532
10533 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10534
10535         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10536
10537 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10538
10539         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10540
10541         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10542
10543         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10544         (movLeft2ResultLong): Created.
10545
10546         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10547         (joinPushes): Added.  Joins two char pushes into a word push.
10548
10549 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10550
10551         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10552
10553         * support/makebin/Makefile (install): Added creation of dest dir.
10554
10555 2001-10-24 Karl Bongers <karl AT turbobit.com>
10556
10557         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10558
10559 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10560
10561         * src/z80/ralloc.c: Turned off faulty pack for one use.
10562
10563         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10564
10565         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10566
10567 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10568
10569         * support/regression/Makefile: Improved clean
10570
10571         * support/regression/ports/gbz80/spec.mk: Added clean
10572
10573         * support/regression/ports/host/spec.mk: Added clean
10574
10575         * support/regression/ports/z80/spec.mk: Added clean
10576
10577         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10578
10579         * support/regression/ports/mcs51/timeout.c: little improvements
10580
10581 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10582
10583         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10584
10585         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10586
10587         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10588
10589 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10590
10591         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10592
10593         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10594
10595 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10596         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10597
10598         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10599
10600         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10601
10602         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10603
10604         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10605
10606         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10607
10608         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10609
10610         * support/regression/tests/longor.c: Added.
10611
10612 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10613
10614         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10615
10616         * as/mcs51/aslink.h: define PATH_MAX
10617
10618         * as/mcs51/asm.h: define PATH_MAX
10619
10620         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10621
10622         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10623
10624         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10625
10626         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10627
10628         * src/SDCCglobl.h: define PATH_MAX
10629
10630         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10631
10632         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10633
10634 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10635
10636         * src/z80/gen.c (gencjneshort): Fixed
10637
10638         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10639
10640 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10641
10642         * support/regression/tests/bug-469671.c: Added.
10643
10644         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10645
10646 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10647
10648         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10649
10650         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10651
10652 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10653
10654         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10655
10656         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10657
10658         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10659
10660         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10661
10662         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10663
10664         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10665
10666         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10667
10668 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10669
10670         * 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.
10671
10672         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10673
10674         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10675
10676 2001-10-07    <johan AT FRIJA>
10677
10678         * device/lib/gets.c (gets): fixed the return value.
10679
10680 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10681         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10682
10683         * 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.
10684
10685         * 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.
10686
10687         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10688
10689         * src/pic/gen.c: Removed Safe_strdup.
10690
10691         * configure.in: Added option to enable libgc support.
10692
10693         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10694         (bitVectUnion): Optimised.
10695         (bitVectIntersect): Optimised.
10696         (bitVectBitsInCommon): Optimised.
10697         (bitVectCplAnd): Optimised.
10698
10699         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10700
10701 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10702
10703         * src/SDCCmain.c: distinguish between assembler debug and plain options
10704
10705         * src/avr/main.c:   remove standard assembler options
10706
10707         * src/ds390/main.c: remove standard assembler options
10708
10709         * src/mcs51/main.c: remove standard assembler options
10710
10711         * src/port.h: removed "PENDING" comment
10712
10713 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10714
10715         * src/device/lib/_mulint.c  : new, with assember functions
10716
10717         * src/device/lib/_mullong.c : new, with assember functions
10718
10719         * src/device/lib/_divuint.c : with assember functions
10720
10721         * src/device/lib/_divsint.c : with assember functions
10722
10723         * src/device/lib/_divulong.c: with assember functions
10724
10725         * src/device/lib/_divslong.c: with assember functions
10726
10727         * src/device/lib/_moduint.c : with assember functions
10728
10729         * src/device/lib/_modsint.c : with assember functions
10730
10731         * src/device/lib/_modulong.c: with assember functions
10732
10733         * src/device/lib/_modslong.c: with assember functions
10734
10735         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10736
10737         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10738
10739         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10740                                       replaced _mululong.c and _mulslong.c by _mullong.c
10741
10742 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10743
10744         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10745
10746 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10747
10748         * src/SDCCglue.c: test, if win32api is available for MINGW
10749
10750 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10751
10752         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10753         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10754         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10755         * support/regression/ports/host/spec.mk: removed GENERIC
10756         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10757         * support/regression/ports/z80/spec.mk: removed GENERIC
10758
10759 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10760
10761         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10762
10763         * support/regression/tests/bug-467035.c: Created.
10764
10765 2001-10-01    <johan AT FRIJA>
10766
10767         * src/SDCC.y: fixed bug #466586 part 1
10768
10769 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10770
10771         * SDCCicode.c: z80 has no generic pointers
10772         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10773
10774 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10775
10776         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10777
10778 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10779
10780         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10781
10782         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10783
10784 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10785
10786         * configure.in: Fixed up so that ucsim is only configured once.
10787
10788         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10789
10790         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10791         (getPathDifference): As above.
10792
10793         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10794
10795         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10796
10797 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10798         * .version: Updated to 2.3.1
10799
10800         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10801         Added copyright header.
10802
10803         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10804         (assemble): Added support for macro based assembler commands.
10805         (linkEdit): Added support for macro based linker commands.
10806         (preProcess): Changed the pre-processor to use macros.
10807         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10808         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10809
10810         * device/lib/z80/crt0.s: Added module name for debugging.
10811
10812 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10813
10814         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10815
10816         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10817
10818         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10819
10820         * src/Makefile.in: Added SDCCmacro and SDCCutil
10821
10822 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10823
10824         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10825
10826 2001-09-16    <johan AT FRIJA>
10827
10828         * 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.
10829
10830 2001-09-15    <johan AT FRIJA>
10831
10832         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10833         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10834
10835 2001-09-11    <johan AT FRIJA>
10836
10837         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10838
10839 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10840
10841         * support/regression/tests/bug-460444.c: Added test case.
10842
10843         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10844         (genCast): Added justification for all of the asserts.
10845
10846 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10847
10848         * support/regression/support.c: _xdata replaced by xdata
10849
10850         * support/regression/spec.mk: removed _generic
10851
10852 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10853
10854         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10855
10856         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10857         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10858
10859         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10860
10861         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10862
10863         * support/regression/tests/bug-460010.c: Added test case.
10864
10865         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10866
10867 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10868
10869         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10870
10871         * support/regression/testfwk.c: removed workaround for bug #436344
10872
10873         * support/regression/tests/bp.c: use less memory with mcs51
10874
10875         * support/regression/tests/bug-441448.c: use less memory
10876
10877         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10878
10879         * support/regression/collate-results.py: typo
10880
10881 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10882
10883         * support/regression/tests/fetchoverlap.c: Added new test case.
10884
10885         * support/regression/tests/bp.c: Added new test case.
10886
10887         * support/regression/tests/bug-448984.c: Added new test case.
10888
10889         * support/regression/tests/pow2shifts.c: Added new test case.
10890
10891         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10892         (genlshTwo): Fixed right shift for count > 8.
10893
10894         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10895
10896 2001-09-08    <johan AT FRIJA>
10897
10898         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10899
10900 2001-09-07    <johan AT FRIJA>
10901
10902         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10903
10904         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10905
10906 2001-09-06    <johan AT FRIJA>
10907
10908         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10909         * bernhard noted me at this: "() equals to (void)" (1.38)
10910
10911 2001-09-05    <johan AT FRIJA>
10912
10913         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10914
10915 2001-09-04    <johan AT FRIJA>
10916
10917         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10918
10919
10920 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10921
10922         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10923
10924 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10925
10926         * link/z80/aslink.h: Fixed path for PATH_MAX
10927
10928 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
10929
10930         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
10931
10932         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
10933
10934         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
10935
10936         * 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.
10937
10938 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
10939
10940         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
10941         (genCmp): Fixed up genCmp for the GB with longs.
10942
10943         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
10944
10945         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
10946
10947         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
10948
10949         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
10950
10951 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
10952
10953         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
10954
10955 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
10956
10957         * 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.
10958
10959         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
10960
10961 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
10962
10963         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
10964
10965         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
10966
10967 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
10968
10969   * sim/ucsim/configure:    little improvement of Cygwin-detection
10970   * sim/ucsim/configure.in: little improvement of Cygwin-detection
10971   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
10972   * support/regression/tests/bug-221100.c: small changes for mcs51
10973   * support/regression/tests/bug-221168.c: small changes for mcs51
10974   * support/regression/tests/bug-227710.c: small changes for mcs51
10975   * support/regression/tests/staticinit.c: small changes for mcs51
10976   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
10977   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10978   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
10979
10980 $Revision$