* device/include/stddef.h: c temporary hack to fix bug 1518273
[fw/sdcc] / ChangeLog
1 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
2
3         * device/include/stddef.h: c temporary hack to fix bug 1518273
4
5 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
6
7         * device/include/mcs51/cc2510fx.h: added
8         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
9           to projects.
10
11 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
12
13         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
14         * as/z80/Makefile.in: added strcmpi.c
15         * as/z80/z80adr.c: added upper case registers and lower case conditionals
16         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
17
18 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
19
20         * device/lib/gbz80/asm_strings.s,
21         * device/lib/gbz80/crt0_rle.s,
22         * device/lib/gbz80/div.s,
23         * device/lib/gbz80/mul.s,
24         * device/lib/gbz80/shift.s,
25         * device/lib/z80/asm_strings.s,
26         * device/lib/z80/crt0_rle.s,
27         * device/lib/z80/div.s,
28         * device/lib/z80/mul.s,
29         * device/lib/z80/shift.s: changed to all lower case menmonics except the
30           flags which are all upper case
31
32 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
33
34         * as/z80/asm.h: made CASE_SENSITIVE 1
35         * link/z80/aslink.h: made CASE_SENSITIVE 1
36         * src/z80/gen.c (throughout): made all conditionals upper case
37         * support/regression/tests/bug1503067.c: new
38
39 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
40
41         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
42           (shiftIntoPair): added case 2 for PAIR_IY,
43           (setupToPreserveCarry): replaced parameters with iCode and check if
44            PAIR_DE is in use to fix bug 1399290,
45           (genPlus, genMinus): updated call to setupToPreserveCarry
46         * support/regression/tests/bug1399290.c: new
47
48 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
49
50         * device/lib/Makefile.in (Z80SOURCES): enabled float support
51         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
52         * src/ds390/gen.c (shiftRLong),
53         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
54         * src/mcs51/gen.c (sameReg): changed to sameByte,
55           (xch_a_aopGet): new,
56           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
57            shiftRLong): fixed bug 1533966
58         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
59           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
60         * support/regression/Makefile.in: disabled z80, enabled ucz80
61         * support/regression/tests/float_trans.c: enabled test for z80 and host
62         * support/regression/tests/shifts2.c: new, for testing bug 1533966
63
64 2006-08-01 Borut Razem <borut.razem AT siol.net>
65
66         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
67           comparison is always false due to limited range of data type
68           on PPC64 machine (openpower-linux1) where "char = unsigned char"
69
70 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
71
72         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
73         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
74         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
75         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
76
77 2006-07-31 Borut Razem <borut.razem AT siol.net>
78
79         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
80           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
81           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
82           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
83           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
84           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
85           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
86           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
87           enable ucsim mingw compilation. Serial port is disabled,
88           since it uses termios.h API, which is not available on native
89           WIN32
90
91 2006-07-31 Borut Razem <borut.razem AT siol.net>
92
93         * Small Device C Compiler 2.6.0 released
94         * support/scripts/sdcc.nsi: added FULL_DOC option
95         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
96
97 2006-07-28 Borut Razem <borut.razem AT siol.net>
98
99         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
100         * doc/INSTALL.txt: updated
101
102 2006-07-27 Borut Razem <borut.razem AT siol.net>
103
104         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
105           device/lib/pic/libdev/Makefile.in: fixed bug
106           [ 1438354 ] pic libsdcc: distclean doesn't work
107         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
108           device/lib/pic16/libio/Makefile.in: fixed bug
109           [ 1438344 ] pic16 lib: clean doesn't work properly
110         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
111
112 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
113
114         * device/lib/pic/libsdcc/fsdiv.c,
115         * device/lib/pic/libsdcc/fsmul.c,
116         * device/lib/pic16/libsdcc/float/fsdiv.c,
117         * device/lib/pic16/libsdcc/float/fsmul.c,
118         * device/lib/_fsdiv.c,
119         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
120         * support/regression/tests/bug1520966.c: added
121         * doc/knownbugs.html: removed [ 1520966 ] from the list
122
123 2006-07-25 Borut Razem <borut.razem AT siol.net>
124
125         * configure.in, configure, sdccconf_in.h: fixed bug
126           [ 1519095 ] regression test onebyte.c fails on ppc64 host
127         * doc/knownbugs.html: removed [ 1519095 ] from the list
128
129 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
130
131         * doc/knownbugs.html: added, contains list of known bugs at release
132         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
133
134 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
135
136         * device/include/mcs51/compiler.h: added SFRX for xdata based special
137           function registers and corrected defaults with additional warning
138         * device/lib/malloc.c: cosmetic changes
139         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
140         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
141           (fillGaps): and used it
142
143 2006-07-20 Raphael Neider <rneider AT web.de>
144
145         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
146           output unless SDCCPICDEBUG is set
147         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
148           output if SILENT is set
149
150 2006-07-11 Borut Razem <borut.razem AT siol.net>
151
152         * doc/README.txt: updated
153
154 2006-07-10 Borut Razem <borut.razem AT siol.net>
155
156         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
157           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
158           in WIN32 installation
159         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
160           release candidate 1
161
162 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
163
164         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
165         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
166
167 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
168
169         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
170
171 2006-07-06 Borut Razem <borut.razem AT siol.net>
172
173         * support/regression/tests/bitfields.c:
174           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
175         * support/regression/tests/constantRange.c:
176           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
177
178 2006-07-04 Borut Razem <borut.razem AT siol.net>
179
180         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
181           src/port.mk,
182           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
183           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
184           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
185           reverted changes from 2006-07-03
186         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
187         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
188           added CPPFLAGS, used by the host port
189
190 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
191
192         * support/regression/valdiag/tests/switch.c,
193         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
194         * support/regression/tests/libmullong.c: fixed for host
195         * support/regression/ports/host/spec.mk: disable all warnings for host,
196         SDCC runs with --less-pedantic too
197
198 2006-07-03 Borut Razem <borut.razem AT siol.net>
199
200         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
201           defined CPPFLAGS
202         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
203         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
204           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
205           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
206           include ../port.mk
207         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
208           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
209           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
210           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
211
212 2006-07-02 Raphael Neider <rneider AT web.de>
213
214         * src/pic16/devices.inc,
215         * device/include/pic16/pic18fregs.h,
216         * device/include/pic16/pic18f4550.h,
217         * device/lib/pic16/pics.all,
218         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
219
220 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
221
222         * as/hc08/lkaomf51.c (OutputName),
223         * as/mcs51/lkaomf51.c (OutputName),
224         * as/z80/asmain.c (asmbl),
225         * src/ds390/main.c (asmLineNodeFromLineNode),
226         * src/hc08/ralloc.c (hc08_assignRegisters),
227         * src/mcs51/main.c (asmLineNodeFromLineNode),
228         * src/xa51/ralloc.c (checkRegMask),
229         * src/xa51/gen.c (emitcode),
230         * src/z80/gen.c (_emit2),
231         * src/SDCCast.c (searchLitOp),
232         * src/SDCCglobl.h,
233         * support/packihx/packihx.c,
234         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
235         * src/ds390/gen.c (aopPutUsesAcc),
236         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
237         * support/regression/tests/libmullong.c (mullong_wrapper),
238         * src/SDCCsymt.c (powof2),
239         * src/SDCCast.c,
240         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
241         * src/SDCCsymt.h: added TYPE_TARGET_*
242         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
243         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
244         SDCCast because 1) header problems 2) this is the right place
245         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
246         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
247         prototype
248
249 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
250
251         * src/SDCCicode.h: removed buggy semicolon in unused macro
252         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
253         search for previous definiton of auto symbols too,
254         (findPrevUse): fixed logic of emitWarnings
255
256 2006-06-26 Raphael Neider <rneider AT web.de>
257
258         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
259           PCLATH and PCLATU on interrupts, potentially fixes #1505141
260
261 2006-06-25 Raphael Neider <rneider AT web.de>
262
263         * device/lib/pic/libm: NEW, added math library functions
264         * device/lib/pic/libsdcc: NEW; added float support functions
265         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
266         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
267           NEW, added math related headers
268         * device/include/asm/pic/features.h: NEW
269         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
270           (popGet): allow larger offsets for AOP_PCODE,
271           (genDataPointerSet): handle literals explicitly, more debug output,
272           (genAssign): fixed for float using aopLiteral ;-)
273         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
274           GOTO initialisation routine
275         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
276           flag on registers, fixes #1469043 (local variables do not work)
277         * src/pic/main.c (_pic14_do_link),
278         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
279           available
280
281 2006-06-25 Borut Razem <borut.razem AT siol.net>
282
283         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
284           characters printed (not including the trailing '\0' used to end
285           output to strings). Problem detected in regression test bug-927659.c.
286           NOTE: printf() family functions should return int instead
287           unsigned int!
288         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
289           specifier are printed as themselves
290         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
291           support flags, width and precision specifiers
292
293 2006-06-24 Borut Razem <borut.razem AT siol.net>
294
295         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
296           to the list of sdcc tagrets not supporting bit type
297         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
298           testfor pic16 due to bug:
299           [ 1511794 ] pic16: regression test bug-895992.c fails
300
301 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
302
303         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
304         * src/SDCCglue.c (initPointer), fixed bug 1496419
305         * support/regression/tests/bug1496419.c: new, added
306
307 2006-06-22 Borut Razem <borut.razem AT siol.net>
308
309         * support/regression/ports/pic16/support.c: use gpsim usart module from
310           libgpsim_modules library
311
312 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
313
314         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
315         IP0H to IPH0.
316
317 2006-06-19 Raphael Neider <rneider AT web.de>
318
319         * src/pic/glue.h,src/pic16/glue.h: added prototypes
320         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
321           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
322           (pic14printExterns,pic14printPublics,pic16printPublics,
323           pic16_printExterns): use new functions to emit symbols
324           (picglue,pic16glue): emit publics before emitting externs
325         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
326           locally defined functions to avoid bug #1443651
327         * support/regression/tests/bug-716242.c: removed pic16 workaround
328         * support/regression/ports/pic16/spec.mk: ignore errors during build
329
330 2006-06-19 Raphael Neider <rneider AT web.de>
331
332         * src/pic/glue.h: added pic14aopLiteral prototype
333         * src/pic/glue.c (pic14aopLiteral): return unsigned int
334         * src/pic/gen.c: removed stdint.h dependency
335           (aopGet): use Safe_strdup()
336           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
337           (genDataPointerSet): use pic14aopLiteral()
338         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
339           for pic16; thanks to Bernhard and Maarten
340
341 2006-06-18 Borut Razem <borut.razem AT siol.net>
342
343         * support/regression/tests/structflexarray.c: flexible array members
344           not supported by gcc < 3
345         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
346           GUI tool by default
347         * src/pic/gen.c: don't include [p]strdin.h on solaris
348         * support/Util/pstdint.h: addad svn attributes
349         * support/regression/tests/constantRange.c,
350           support/regression/tests/rotate.c: include inttypes.h instead
351           stdint.h on solaris, addad svn attributes
352
353 2006-06-18 Raphael Neider <rneider AT web.de>
354
355         * src/SDCCsymt.c (initCSupport): change return type of divschar to
356           int for PIC16
357         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
358           (pic16_genMinusBits): simplified sign-extension
359           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
360             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
361             adjusted to correctly handle mixed-signed operands, disabled
362             now unused multiplciation routines
363         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
364           (assignResultValue): added argument denoting the size of the result
365             as returned by the function (fixes upcasts in assigning from
366             function calls: char foo(); int i = foo();)
367           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
368             function result to assignResultValue
369           (genMult): disabled inlined multiplication code
370           (genDiv): augmented to also handle the modulus operator, fixed to
371             handle mixed-signed operands correctly
372           (genMod): simply call genDiv, disabled unused code
373           (genAssign): fixed missing (sign-)extension on result
374         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
375             valid char operands, allow signed operands for native code, added
376             division and modulo operator handling
377         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
378
379         As a consequence, onebyte.c (if split into two files) and muldiv.c
380         pass regression tests.
381
382 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
383
384         * doc/Makefile.in: two runs of makeindex seem needed to get
385         correct page references in the index of sdccman.pdf
386         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
387
388 2006-06-17 Borut Razem <borut.razem AT siol.net>
389
390         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
391
392 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
393
394         * doc/sdccman.lyx: updated, added (porting source code, debugging),
395         mentioned ec2drv and paulmon
396
397 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
398
399         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
400           consecutive abs areas
401           (find_empty_space, allocate_space): added map to handle codemap or
402            xdatamap,
403           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
404            absolute idata and xdata
405         * as/mcs51/lkmem.c (summary2): updated legend
406
407 2006-06-16 Raphael Neider <rneider AT web.de>
408
409         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
410
411 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
412
413         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
414           1208515
415         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
416
417 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
418
419         * src/port.h (struct PORT): added field gp_tags, to hold the tag
420         value of generic pointers,
421         * src/avr/main.c,
422           src/ds390/main.c,
423           src/hc08/main.c,
424           src/izt/i186.c,
425           src/izt/tlcs900h.c,
426           src/mcs51/main.c,
427           src/pic/main.c,
428           src/pic16/main.c,
429           src/xa51/main.c,
430           src/z80/main.c: PORT structure, added elements for gp_tags field,
431         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
432         fields in the PORT structure of each port,
433         * src/SDCCast.c (decorateType): allow processing of generic pointers
434         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
435         S_FIXED symbols
436
437 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
438
439         * link/z80/lkgb.c,
440         * link/z80/lkgg.c,
441         * src/pic16/gen.c,
442         * src/pic16/main.c,
443         * src/pic16/pcode.c,
444         * src/pic/main.c,
445         * src/pic/pcoderegs.c,
446         * src/SDCCicode.c,
447         * src/SDCCmain.c,
448         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
449           bug 1504689 on minGW
450
451 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
452
453         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
454
455 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
456
457         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
458
459 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
460
461         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
462           for optimization
463
464 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
465
466         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
467         to a char variable. Fixed bug #1504211
468         * device/include/pic16/adc.h,
469         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
470         and fixed bug #1364390
471
472 2006-06-10 Borut Razem <borut.razem AT siol.net>
473
474         * CVSROOT: removed the CVS left-over
475
476 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
477
478         * as/hc08/asmain.c (asexit),
479         * as/hc08/lkmain.c (lkexit),
480         * as/mcs51/asmain.c (asexit),
481         * as/mcs51/lkmain.c (lkexit),
482         * src/SDCCglue.c (DEFSETFUNC),
483         * src/SDCCmain.c (linkEdit, assemble),
484         * support/librarian/sdcclib.c (AddRel),
485           replaced unlink() by standard C remove()
486         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
487         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
488           gatherImplicitVariables): new, added to fix bug 608752,
489           (createFunction): added gatherImplicitVariables()
490         * src/SDCCast.h: added createRMW prototype
491         * src/SDCCsymt.h (struct symbol): added infertype
492         * support/regression/tests/bug608752.c: new, added
493
494 2006-06-10 Raphael Neider <rneider AT web.de>
495
496         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
497           multibyte dummy reads (fixes #1503234)
498
499 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
500
501         * device/include/mcs51/compiler.h: new, added header file to enable
502           creating common sfr definition header files for different compilers
503
504 2006-06-05 Raphael Neider <rneider AT web.de>
505
506         * src/pic16/{pcode.h,genarith.c}:
507           introduced pCodeOp combining any two pCodeOps (previously only
508           two register operands could be combined), removed pcop2 from
509           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
510         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
511         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
512           rewritten to use new PO_TWO_OPS
513         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
514         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
515           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
516           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
517           (pic16_get_op): embraced return arg to allow #define return(x),
518             added new case for combined opcodes
519           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
520           (pic16_pCode2str,pic16_getRegFrompCodeOp,
521            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
522
523 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
524
525         * src/SDCCval.c (checkConstantRange): added
526         * src/SDCCval.h: added checkConstantRange
527         * support/Util/SDCCerr.c,
528         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
529         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
530         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
531         * src/SDCCast.c (decorateType): added checkConstantRange,
532         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
533         can be emitted with the correct always true/false warning,
534         added optimization for double '!';
535         result of decorateType() must be assigned back to the tree, because
536         decorateType() can change the tree
537         * src/SDCCicode.c (geniCodeLogic),
538         (geniCodeAssign): replaced new checkConstantRange, added warnings,
539         (checkConstantRange): removed, it was only a fragment which never
540         emitted a warning
541         * src/SDCCsymt.c (computeType): fixed promotion for
542         "-1 < (unsigned bit) b"
543         * src/pic/ralloc.c (packRegsForAssign),
544         * src/pic16/ralloc.c (packRegsForAssign),
545         * src/hc08/ralloc.c (packRegsForAssign),
546         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
547         from mcs51
548         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
549         * support/regression/tests/constantRange.c: added
550         * support/valdiag/tests/constantRange.c: added
551         * support/valdiag/valdiag.py: added -DPORT_HOST=1
552
553 2006-06-02 Borut Razem <borut.razem AT siol.net>
554
555         * support/regression/ports/pic16/support.c: increase stack size
556           to 255 bytes
557         * support/regression/Makefile.in: sort tests by name so that the
558           resutlts can be compared on different machines / platforms
559
560 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
561
562         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
563         * src/ds390/gen.c (emitLabel): new, added,
564           (genDjnz): fixed stack overflow bug,
565           (throughout): cosmetic changes to sync with mcs51/gen.c,
566           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
567         * src/mcs51/gen.c (genEndFunction): small optimization,
568           (throughout): cosmetic changes to sync with ds390/gen.c
569
570 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
571
572         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
573           (_print_format): fixed printing pointers
574         * src/mcs51/gen.c (emitLabel, movb): new, added,
575           (genAssign): small optimization,
576           (genDjnz): fixed stack overflow bug,
577           (throughout): replaced sprintf with SNPRINTF,
578           replaced mcs51_regWithIdx with REG_WITH_INDEX,
579           replaced emitcode("mov", "b,...") with MOVB(...),
580           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
581           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
582         * src/mcs51/peeph.def: added rules 140 and 264
583         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
584           so they may get optimized into registers
585
586 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
587
588         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
589           immediately when encountered,
590           (printUsage): always use stderr even on windows
591
592 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
593
594         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
595         (processParms): fixed bug #1247551
596         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
597         parseCmdLine, main): print '--version' to stdout,
598         print 'help' to stdout if --help is given,
599         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
600         arguments are given; fixed --help
601
602 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
603
604         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
605         * support/regression/tests/bug-1493710.c: added
606
607 2006-05-27 Borut Razem <borut.razem AT siol.net>
608
609         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
610           static instead auto
611         * support/regression/ports/pic16/support.c: increase stack size
612           from default 64 bytes to 128 bytes
613         * support/regression/tests/staticinit.c,
614           support/regression/tests/float.c: regression tests fully enabled
615           for pic16 port by putting the initialized data arrays into the code
616           section
617         * support/regression/ports/pic16/spec.mk: don't link default libraries.
618           This was changed by mistake in the previous version.
619
620 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
621
622         * src/pic16/gen.c (genFunction, genEndFunction): some
623         beautifications, fixed bug with falsely restoring FSR2 in large
624         stack model, thanks to Beau E. Cox for reporting the bug
625
626 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
627
628         * debugger/mcs51/break.c,
629         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
630           use %p to print pointers, made address variables unsigned
631         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
632         * debugger/mcs51/symtab.c (parseSymbol): must return something
633         * src/mcs51/gen.c (aopForSym): small optimization,
634            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
635           (freeAsmop): added missing break,
636           (aopPut): removed parameter bvolatile, determine it inside the function,
637           (saveRegisters, unsaveRegisters): small optimization,
638           (genIpush): removed pointless check,
639           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
640           replaced sprintf with SNPRINTF,
641           replaced strcpy with strncpyz,
642           updated aopPut calls,
643           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
644         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
645
646 2006-05-24 Borut Razem <borut.razem AT siol.net>
647
648         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
649           modification of test for the pic16 port, put the array to the code
650           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
651
652 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
653
654         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
655         * support/Util/pstdint.h: added
656
657 2006-05-22 Borut Razem <borut.razem AT siol.net>
658
659         * src/regression/Makefile: removed bool2.c test, added -q linker option
660         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
661           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
662           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
663           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
664           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
665           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
666           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
667           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
668           define SUPPORT_BIT_TYPES 0, removed unused bit variables
669
670 2006-05-22 Raphael Neider <rneider AT web.de>
671
672         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
673           bug #1492360 (problematic due to generic pointers, see code)
674
675 2006-05-22 Borut Razem <borut.razem AT siol.net>
676
677         * support/regression/ports/pic16/specs.mk: removed stack size linker
678           directive
679         * support/regression/tests/array.c,
680           support/regression/tests/bitopcse.c,
681           support/regression/tests/bug-908454.c,
682           support/regression/tests/malloc.c: modified for pic16 regression test
683         * support/regression/tests/bitfields.c:
684           pic16 - excluded bitfileds of size > 8
685         * support/regression/tests/bp.c: pic16 - reduced data size
686         * support/regression/tests/bug-221100.c: pic16 - reduced data size
687         * support/regression/tests/bug-460010.c:
688           pic16 - used the absolute address the fits in memory
689         * support/regression/tests/bug-716242.c:
690           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
691         * support/regression/tests/float.c:
692           pic16 - excluded - data size too big
693         * support/regression/tests/onebyte.c:
694           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
695         * support/regression/tests/shifts.c:
696           pic16 - function names probably have to differ in first X characters
697           (gpasm limitation?)
698         * support/regression/tests/staticinit.c:
699           pic16 - excluded some tests due error: no target memory available for
700           section ".idata"
701
702 2006-05-22 Borut Razem <borut.razem AT siol.net>
703
704         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
705           second try. Thanks Stas Sergeev once more.
706
707 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
708
709         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
710           (genLeftShift, genRightShift): fixed bug 1491627
711         * src/hc08/peeph.def (rules 7, 8.x): added
712         * support/regression/tests/shifts.c (ShiftLeftByParam,
713           ShiftRightByParam, testShiftByParam): added to test variable shifting
714
715 2006-05-20 Raphael Neider <rneider AT web.de>
716
717         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
718         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
719           (allocReg): add only new registers to dynAllocRegs,
720           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
721             #1489055, #1445850, and probably #1483693
722
723 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
724
725         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
726         bug in for-loop that didn't emit the last of CONFIG and ID registers
727
728 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
729
730         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
731           with offset
732         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
733           1489016, 1434401 and 1490124
734         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
735           1489016, 1434401 and 1490124
736
737 2006-05-17 Borut Razem <borut.razem AT siol.net>
738
739         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
740           thanks Stas Sergeev
741
742 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
743
744         * device/include/mcs51/P89c51RD2.h,
745         * device/include/mcs51/P89LPC901.h,
746         * device/include/mcs51/P89LPC922.h,
747         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
748
749 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
750
751         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
752         to fix missing stack pragma in compiled binary object file,
753
754 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
755
756         * support/packihx/configure.in,
757         * support/packihx/configure: removed warning, autoconf >= 2.5x can
758         determine sizeof basic types even while cross compiling
759
760 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
761
762         * src/avr/gen.c (aopop),
763         * src/ds390/gen.c (aopOp),
764         * src/hc08/gen.c (aopOp),
765         * src/mcs51/gen.c (aopop),
766         * src/pic16/gen.c (pic16_aopOp),
767         * src/pic/gen.c (aopOp),
768         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
769         if size of operand is smaller than spill location
770
771 2006-05-12 Borut Razem <borut.razem AT siol.net>
772
773         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
774           have to have CR/LF line endings even if they are checked out on *nix
775           or on WIN32 in cygwin binmode
776
777 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
778
779         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
780         * device/include/ds80c390.h: added sfr16 definitions
781         * src/ds390/gen.c,
782         * src/ds390/gen.h,
783         * src/ds390/main.c,
784         * src/ds390/ralloc.c,
785         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
786           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
787           bit returning functions
788         * support/regression/tests/sfr16.c: enabled test on ds390
789
790 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
791
792         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
793         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
794
795 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
796
797         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
798         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
799           (cl_address_space constructor): removed expensive initialization,
800           (cl_address_space::get_cell): extended for late initialization,
801           (cl_address_space::*): use late initialization,
802           (cl_address_decoder::activate): removed expensive initialization,
803           This reduced regression test running time by 25%
804
805 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
806
807         * packihx/,
808         * configure.in,
809         * configure,
810         * sdcc.dsw,
811         * Makefile.bcc,
812         * Makefile.in,
813         * support/packihx/Makefile.in,
814         * support/packihx/clean.mk,
815         * support/packihx/Makefile.bcc,
816         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
817
818 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
819
820         * src/SDCCval.c (valNot): fix for regression test failure
821           of not.c on big endian hosts
822
823 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
824
825         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
826
827 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
828
829         * device/lib/mcs51/Makefile.in: changed string comparison operator
830           to = for POSIX compliance; == is bash extension
831
832 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
833
834         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
835           kosmonaut_pirx
836
837 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
838
839         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
840         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
841         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
842         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
843         bug report #1478657,
844
845 2006-05-05 Borut Razem <borut.razem AT siol.net>
846
847         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
848           making the html
849
850 2006-05-02 Borut Razem <borut.razem AT siol.net>
851
852         * doc/Makefile.in: removed *.ind dependency since there is no rule to
853           create *.ind, which made make to fail if invoked with -j 2
854
855 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
856
857         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
858           Hubert Sack for patch 1479782
859
860 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
861
862         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
863
864 2006-05-01 Raphael Neider <rneider AT web.de>
865
866         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
867           (create_pic): store only prefix-free device name,
868           (init_pic): check for device names with "16" prefix,
869           (list_valid_pics),
870         * src/pic/device.h (struct PIC_device),
871         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
872             stored device name,
873         * device/include/pic/pic12f{635,675,629,683}.h,
874         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
875         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
876         * device/include/pic/pic16f505.h,
877         * device/lib/pic/libdev/pic16f505.c: removed
878         * device/include/pic/pic14devices.txt: added support for pic12f
879             devices, removed unsupported non 16-bit devices
880             [above changes provided by patch from Zik Saleeba]
881         * src/pic/*, src/pic16/*, device/include/pic16/*,
882           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
883
884 2006-05-01 Borut Razem <borut.razem AT siol.net>
885
886         * configure.in, configure, doc/Makefile.in:
887           sync with nightly build makefile - latex, dvipdf and dvips
888           not needed any more
889
890 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
891
892         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
893         in the library source
894
895 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
896
897         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
898
899 2006-04-28 Raphael Neider <rneider AT web.de>
900
901         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
902         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
903           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
904         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
905
906 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
907
908         * device/lib/pic/libdev/Makefile.in,
909         * device/lib/hc08/Makefile.in,
910         * device/lib/gbz80/Makefile.in,
911         * device/lib/z80/Makefile.in,
912         * device/lib/ds390/Makefile.in,
913         * device/lib/ds400/Makefile.in: added srcdir to include search path,
914         thanks to Borut for the bug report
915         * configure.in,
916         * configure: always create doc/Makefile independent from --enable-doc
917         * Makefile.in: always install from directory doc independent from
918         --enable-doc
919         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
920         removed
921         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
922         * doc/Makefile.in: install *.txt if present
923         * device/include/Makefile.in (install): added installation of pic/*.inc
924         and pic/*.txt files again, they were erroneously removed
925
926 2006-04-28 Raphael Neider <rneider AT web.de>
927
928         * src/pic/{gen.c,main.h,pcode.c},
929         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
930             concerning signedness with casts
931
932 2006-04-28 Raphael Neider <rneider AT web.de>
933
934         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
935             definition of an interrupt handler,
936         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
937             interrupt handler stuff from picglue() to separate routine,
938           (picglue): enabled definition of intr handlers in files w/o main()
939
940 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
941
942         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
943           compilation with MSVC 2005 Express Edition (VC8)
944
945 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
946
947         * device/lib/Makefile: fixed build of gbz80 lib
948
949 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
950
951         * support/regression/tests/bug-460010.c,
952         * support/regression/tests/bug-524691.c,
953         * support/regression/tests/bug-716242.c: removed conditional defines
954           that are already in testfwk.h
955
956 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
957
958         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
959           (AccAXRsh1): added, shift right by 1,
960           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
961            AccAXLrl1
962         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
963
964 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
965
966         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
967         remove cast to same type
968         * src/SDCCast.c (decorateType): fix for RFE 1475742,
969         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
970         * as/z80/Makefile,
971         * link/z80/Makefile: removed, they have moved to
972         Makefile.in files
973         * configure,
974         * configure.in: replaced duplicate message about ucsim by missing sdcpp
975         * install-sh: fix bug #1204398 by setting umask 0022
976         * device/lib/Makefile: separate build of z80 and gbz80 lib
977
978 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
979
980         Enabled VPATH feature: changed nearly all Makefiles (149 files).
981         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
982
983         One basic decision: e.g. src/clean.mk includes further files. In order
984         to make this work there are two solutions:
985         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
986           run configure on them. This way they can use
987           'include $(srcdir)/port-clean.mk'
988         - always include clean.mk by the Makefile at the same level. To avoid
989           that `make clean` tries to include and build Makefile.dep the
990           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
991           implemented, because now even `make uninstall` doesn't create
992           Makefile.in. clean.mk could be eliminated by pasting it in
993           Makefile.in.
994
995         * debugger/mcs51/Makefile.in: build own objects from library sources
996         (SLIB, SDCC) in current directory
997
998         * configure, configure.in: renamed --disable-device-lib-build in
999         --disable-device-lib; added --enable-doc, the required tools are
1000         searched by configure; added result message; the toolchain for the
1001         belonging ports are now only built, if the port is enabled.
1002
1003         * support/regression/*: all output is written in directory gen, because
1004         the fwk and ports directories don't livet in the build tree using vpath
1005
1006         * doc/sdccman.lyx: renamed --disable-device-lib-build to
1007         --disable-device-lib, added --enable-doc, added section VPATH
1008
1009         * sim/ucsim/configure.in,
1010         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
1011         z80 are enabled by default
1012
1013 2006-04-24 Raphael Neider <rneider AT web.de>
1014
1015         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
1016             to config word, "pic14_"-prefixed some extern functions
1017           (pic14_emitConfigWord): emit __config directive(s) if assignment to
1018             config word has been found
1019         * src/pic/device.h: added prototypes
1020         * src/pic/pcode.c: added "pic14_"-prefix where needed
1021         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
1022             fixup
1023         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
1024             words,
1025           (pic14emitRegularMap): ignore config words,
1026           (pic14createInterruptVect): moved generating __config directives away
1027           (picglue): have __config directives emitted
1028
1029 2006-04-24 Borut Razem <borut.razem AT siol.net>
1030
1031         * doc/Makefile: sync with nightly build makefile
1032
1033 2006-04-24 Raphael Neider <rneider AT web.de>
1034
1035         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
1036             registers that have not been assigned proper liveranges,
1037             fixes #1469504 and #1474602,
1038           (pCodeRegOptimizeRegUsage): fixed typo in comment
1039
1040 2006-04-24 Borut Razem <borut.razem AT siol.net>
1041
1042         * device/examples/main8051.c: deleted - it was removed from CVS
1043           24.mar.2000 and after that modified 18.feb.2001, so it reappered
1044           after the transition to Subversion
1045         * src/SDCCalloc.h: deleted - it was removed  from CVS
1046           3.feb.2001 and after that modified 18.feb.2001, so it reappered
1047           after the transition to Subversion
1048         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
1049           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
1050           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
1051           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
1052
1053 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
1054
1055         * as/asx8051.dsp: added mcs51/strcmpi.h
1056         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
1057         * as/hc08/aslink.h: updated lnksect prototype
1058         * as/hc08/asm.h,
1059         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
1060         * as/hc08/asmain.c,
1061         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
1062           (newdot): handle A_ABS
1063         * as/hc08/asout.c,
1064         * as/mcs51/asout.c (outarea): output address
1065         * as/hc08/lkaomf51.c,
1066         * as/mcs51/lkaomf51.c: disabled unused array UsageType
1067         * as/hc08/m08pst.c,
1068         * as/mcs51/i51pst.c,
1069         * as/z80/z80pst.c: "ABS" is not A_OVR
1070         * as/hc08/lkarea.c (newarea): read a_addr,
1071           (lnkarea): added codemap array, sort absolute areas to the front,
1072            combine all GSINITx/GSFINAL,
1073           (find_empty_space, allocate_space): new functions,
1074           (lnksect): return next address, handle absolute sections
1075         * as/mcs51/lkarea.c (newarea): read a_addr,
1076           lnksect2 prototype changed,
1077           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
1078           (find_empty_space, allocate_space): new, factored out of lnksect2,
1079           (lnksect2): return next address, handle absolute sections
1080         * as/hc08/lkhead.c,
1081         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
1082         * as/hc08/lklibr.c (addfile, fndsym),
1083         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
1084           index out of range and detect both '\' and '/'
1085         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
1086         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
1087           regression tests (ds390 cannot return bool yet)
1088         * doc/sdccman.lyx: changed version number, document changed --no-peep,
1089           document critical interrupts on z80, document changed SDCC define
1090         * src/asm.c (_asxxxx_mapping): fixed .org directive,
1091           (_a390_mapping): added .org directive
1092         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
1093           (genMultOneByte): fixed warnings
1094         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
1095           ones
1096         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
1097         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
1098           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
1099         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
1100         * src/pic16/main.c: removed newReg prototype
1101         * src/pic16/pcode.c,
1102         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
1103           warnings
1104         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
1105           ones
1106         * src/pic16/ralloc.c
1107         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
1108           to fix warnings
1109         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
1110           from short to PIC_OPTYPE
1111         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
1112         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
1113           optype from short to PIC_OPTYPE
1114         * src/port.h: made int_size unsigned to fix warnings
1115         * src/SDCC.y: fixed warning on MSVC
1116         * src/SDCCicode.c (getArraySizePtr): return unsigned int
1117         * src/SDCCopt.c (convertToFcall): fixed warnings
1118         * src/SDCCsymt.h: removed double prototype for genSymName
1119         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
1120           offset int to fix warnings
1121
1122 2006-04-22 Borut Razem <borut.razem AT siol.net>
1123
1124         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1125           references to CVS replaced with Subversion
1126
1127 2006-04-21 Borut Razem <borut.razem AT siol.net>
1128
1129         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1130           references to CVS replaced with Subversion
1131
1132 2006-04-19 Borut Razem <borut.razem AT siol.net>
1133
1134         * src/version.awk: adapted for svn
1135         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
1136           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
1137           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
1138           /binutils-avr/etc/*.vi, *.jin: removed all properties
1139           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
1140
1141 2006-04-19 Borut Razem <borut.razem AT siol.net>
1142
1143         * CVS to Subversion migration completed
1144
1145 2006-04-18 Borut Razem <borut.razem AT siol.net>
1146
1147         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
1148           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
1149
1150 2006-04-17 Borut Razem <borut.razem AT siol.net>
1151
1152         * device/include/Makefile.in: added pic/*.inc to the installation
1153
1154 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
1155
1156         * support/regression/collate-results.py: fixed output in case of
1157         a valdiag error
1158         * support/regression/generate-cases.py: fixed splitting of pathnames
1159         with dots
1160         * as/hc08/lklibr.c (addfile),
1161         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
1162
1163 2006-04-11 Raphael Neider <rneider AT web.de>
1164
1165         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
1166         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
1167         * src/pic16/pcode.c (assignValnums): fixed #1460578
1168
1169 2006-04-11 Raphael Neider <rneider AT web.de>
1170
1171         * device/lib/pic/libdev/*.c,
1172         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
1173           fixes #1468739, enables compilation in --std-c99 mode
1174         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
1175
1176 2006-04-11 Raphael Neider <rneider AT web.de>
1177
1178         * src/pic/device.c (find_device): removed debug output
1179           (list_valid_pics): enabled verbose listing of supported devices
1180         * device/include/stdbool.h: define bool as char for pic14/16 as well
1181
1182 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1183
1184         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
1185
1186 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1187
1188         * .version: bumped version to 2.5.6
1189         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
1190
1191 2006-04-06 Raphael Neider <rneider AT web.de>
1192
1193         * .version: bumped version to 2.5.6 (pic14 ABI changed)
1194         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
1195         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
1196           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
1197             pic14_constructAbsMap
1198           (pic14printPublics): declare absolute global symbols as global
1199           (pic14createInterruptVect),
1200         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
1201           (newReg): assume new registers unused, use correct name in
1202             hashtable (reg->name instead of name), more debugLog output
1203         * src/pic/device.h (PIC_device): added fields for verbose output
1204         * src/pic/device.c: moved device definition to pic14devices.txt,
1205             added routines for runtime parsing of pic14devices.txt,
1206             added support for second config word
1207         * src/pic/main.c (_process_pragma): removed #pragma maxram,
1208           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
1209           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
1210           (_pic14_parseOptions): moved pCodeInitRegisters here
1211           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
1212         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
1213           (pCodeInitRegisters): rewrapped comments, perpared new approach to
1214             handling the pseudo stack
1215         * device/lib/Makefile.in: ignore failures in objects-pic16,
1216         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
1217         * device/lib/pic/NEWS: document new dependency on picXXX.lib
1218         * device/lib/pic/Makefile.subdir,
1219         * device/lib/pic16/Makefile.subdir: improved clean rules
1220         * device/lib/pic/libdev/: NEW, pic14 device libraries
1221         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
1222         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
1223         * device/include/Makefile.in: create subdir and install pic14 headers
1224         * device/include/pic/p16f_common.inc: removed unused declarations
1225         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
1226             PICs from inc2h.pl v1.6,
1227             replaced BIT_AT macros with struct declarations
1228         * device/include/pic/pic14devices.txt: definition of supported devices,
1229             all above improvements contributed by Zik Saleeba, thanks
1230         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
1231         * support/scripts/sdcc.nsi: also install pic14 device libraries and
1232             headers
1233
1234 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1235
1236         * device/include/mcs51/c8051f410.h: added interrupt numbers,
1237         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
1238           thanks to Charles Olds
1239
1240 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1241
1242         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
1243
1244 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1245
1246         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
1247         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
1248         * support/regression/bug1464657.c: added, new test
1249
1250 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1251
1252         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
1253           version number
1254
1255 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1256
1257         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
1258           --no-peep and --peep-file <file> are used don't use default rules but
1259           do use the <file>
1260
1261 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1262
1263         * src/mcs51/gen.c (genCall): fixed bug 1457608
1264
1265 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1266
1267         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1268         changes seem to cause (trigger?) problems with the build system.
1269
1270 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1271
1272         * src/SDCCpeeph.c (operandsLiteral): new, added,
1273           (callFuncByName): inserted operandsLiteral
1274         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1275
1276 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1277
1278         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1279         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1280
1281 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1282
1283         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1284           implemented patch 1120823 Thanks to Willy De la Court (normal
1285           interrupts need an interrupt number now if they are made critical),
1286           and enabled nesting of critical functions though not for gbz80
1287           (genCritical, genEndCritical): added functions
1288           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1289         * src/z80/mappings.i: added "ei" to all mappings
1290
1291 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1292
1293         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1294         submitted by the Debian SDCC maintainer Aurelien Jarno:
1295         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1296         archive with gcc 4.1 on mips and wrote the patch"
1297
1298 2006-03-16 Raphael Neider <rneider AT web.de>
1299
1300         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1301           the left operand is shorter than the result (c* = lit-c* + int),
1302           fixes bug #1450796
1303         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1304           OP_SYMBOL
1305
1306 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1307
1308         * src/.version: increased version number to 2.5.5
1309         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1310         linking is done manually in pic16 port's _linkEdit,
1311         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1312         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1313         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1314         allocate asmop as AOP_ACC,
1315         (aopForRemat): added parameter 'bool result' in function declaration,
1316         (pic16_aopGet): return AOP_ACC when accessing WREG,
1317         (pic16_popGetTempReg): minor modification,
1318         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1319         'pic16_allocWithIdx',
1320         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1321         calling function in absolute addresses,
1322         (genAssign): take into account AOP_ACC asmop,
1323         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1324         * src/pic16/pcoderegs.c: some debug functions and lines added,
1325         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1326         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1327         register too,
1328         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1329         call to allocReg, not by manually allocating a new one,
1330         (pic16_assignRegisters): now before going through the register
1331         allocating functions mark all registers as free. This eliminates some
1332         side effects resulting from peephole parser done earlier in the backbone
1333
1334 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1335
1336         * src/SDCCicode.c (geniCodeLogic),
1337         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1338
1339 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1340
1341         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1342           (genSend): bugfix, do not allocate and free twice,
1343           (shiftRLong): handle partially overlapping aops
1344         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1345
1346 2006-03-08 Borut Razem <borut.razem AT siol.net>
1347
1348         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1349           for pic16
1350
1351 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1352
1353         * support/regression/tests/bug1409955.c: new, added
1354         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1355         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1356           (aopForSym, aopOp): increment asmop.allocated if reused,
1357           (freeAsmop): decrement asmop.allocated and check for zero instead of
1358           using asmop.freed,
1359           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1360           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1361            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1362            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1363            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1364            genSignedRightShift, genRightShift, genDataPointerGet,
1365            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1366            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1367             in reverse order from allocation,
1368           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1369             added swappedLR to keep track
1370         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1371           pdata & code for GCC, z80, gbz80 & hc08
1372         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1373
1374 2006-03-08 Raphael Neider <rneider AT web.de>
1375
1376         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1377
1378 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1379
1380         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1381         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1382         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1383
1384 2006-03-06 Borut Razem <borut.razem AT siol.net>
1385
1386         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1387           made the linker quiet
1388
1389 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1390
1391         * src/pic16/gen.c (genPcall): fixed bug #1443644
1392         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1393         which dumps before the function entry point a data byte which represents
1394         the number of the local variables used by the specified function, added
1395         'xinst' for initial support for Extended Instruction Support,
1396         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1397         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1398         port->fun_prefix anymore (may change later),
1399         (genFunction, genEndFunction): do not store/restore local registers for
1400         _main (this should take care the --main-return command line option in
1401         the future),
1402         (genOr): removed some legacy pic-port instructions,
1403         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1404         performing operations with SFR's causes data to be written more than
1405         once to each SFR. Perhaps SFRs should be handled in special cases...
1406         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1407         pcode.h
1408         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1409         into account for stack starting position,
1410         (struct OPTIONS pic16_optionsTable): added command line argument
1411         --extended or -y for Extended Instruction Support,
1412         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1413         (deassignLRs): *** perhaps the most important change, old 'for' code
1414         (commented out for reference), didn't account for some registers which
1415         were left marked 'not free' after a pointer operation. The change
1416         reduces register usage a lot in some cases
1417
1418 2006-03-04 Borut Razem <borut.razem AT siol.net>
1419
1420         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1421           _clean
1422         * support/regression/tests/bug-524697.c: decreased array size for
1423           mcs51 to fit into the internal RAM
1424         * support/regression/Makefile.in: a little bit more verbose
1425
1426 2006-03-03 Borut Razem <borut.razem AT siol.net>
1427
1428         * support/regression/fwk/lib/testfwk.c,
1429           support/regression/fwk/include/testfwk.h: introduced function
1430           _prints(), nonrecursive _printn(), call _initEmu() from main()
1431         * support/regression/ports/gbz80/support.asm,
1432           support/regression/ports/ucz80/support.asm,
1433           support/regression/ports/z80/support.asm,
1434           support/regression/ports/ds390/support.c,
1435           support/regression/ports/hc08/support.c,
1436           support/regression/ports/host/support.c,
1437           support/regression/ports/mcs51/support.c,
1438           support/regression/ports/xa51/support.c: added empty _initEmu()
1439           function
1440         * support/regression/ports/pic16/gpsim.cmd,
1441           support/regression/ports/pic16/spec.mk,
1442           support/regression/ports/pic16/support.c,
1443           support/regression/Makefile.in: added pic16 regression test
1444
1445 2006-03-01 Raphael Neider <rneider AT web.de>
1446
1447         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1448           genConstPointerGet): use safe way of generating MOVFF to cover
1449             literals as well as registers, fixes bug #1440527
1450         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1451             dereference
1452           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1453             more correctly, fixes bug #1232186
1454           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1455         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1456             gplink guess the correct processor in more cases, applied patch
1457             from Till Riedel attached to and fixing bug #1436552
1458
1459 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1460
1461         * support/regression/tests/array.c: added, contains check for #1434401
1462         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1463
1464 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1465
1466         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1467         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1468         * device/include/mcs51/c8051f326.h,
1469         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1470         * device/include/mcs51/c8051f000.h,
1471         * device/include/mcs51/c8051f018.h,
1472         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1473           PCON_IDLE,PCON_STOP and added sfr16 definitions
1474
1475 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1476
1477         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1478           genGetWord): fixed bug 1409955
1479
1480 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1481
1482         * device/include/hc08/mc68hc908gp32.h,
1483         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1484
1485 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1486
1487         * src/SDCCast.c (constExprValue): return NULL if not a value
1488         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1489         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1490         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1491
1492 2006-02-13 Borut Razem <borut.razem AT siol.net>
1493
1494         * src/regression/ptrarg.c: added, fails due to bug #1430967
1495         * src/regression/Makefile: ptrarg.c added, ...
1496
1497 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1498
1499         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1500         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1501
1502 2006-02-11 Borut Razem <borut.razem AT siol.net>
1503
1504         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1505           print "Processor: xxx" message to stdout only if --verbose
1506
1507 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1508
1509         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1510         * support/regression/tests/bug1426356.c: added
1511         * support/regression/tests/bitfields.c: removed 2 tests
1512
1513 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1514
1515         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1516         * device/include/mcs51/c8051f330.h,
1517         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1518           PCON_IDLE,PCON_STOP and added sfr16 definitions
1519         * device/lib/_divsint.c,
1520         * device/lib/_divuint.c,
1521         * device/lib/_divulong.c,
1522         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1523           register bank bug for small stackauto
1524
1525 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1526
1527         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1528
1529 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1530
1531         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1532         * all.dsp: corrected several bin paths
1533         * device/include/mcs51/c8051f120.h,
1534         * device/include/mcs51/c8051f300.h,
1535         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1536           to PCON_IDLE,PCON_STOP
1537         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1538         * device/lib/printf_large.c (output_float): fixed bug 1388703
1539         * support/regression/tests/bug1057979.c: added test for bug 1388703
1540
1541 2006-02-08 Raphael Neider <rneider AT web.de>
1542
1543         * src/pic/pcode.c (pciTRIS): fixed typo,
1544           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1545           (LinkFlow): fixed handling of flows that end in a call,
1546           (ReuseReg): perform safety check earlier
1547         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1548             to work with flows at the beginning of a pBlock,
1549             fixes #1426557 (Symbol not previously defined),
1550           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1551             usage information
1552           (RemoveUnusedRegisters): update register usage info
1553         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1554             created, reuse existing ones instead
1555         * src/pic/gen.c (genPcall): fixed #1424719
1556
1557 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1558
1559         * link/z80/lkmain.c,
1560         * link/z80/lklex.c,
1561         * link/z80/lkdata.c,
1562         * link/z80/aslink.h: fixed build on current cygwin:
1563         replaced getline() by lk_getline()
1564
1565 2006-02-01 Borut Razem <borut.razem AT siol.net>
1566
1567         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1568           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1569           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1570           src/regression/bool1.c, src/regression/bool2.c,
1571           src/regression/bool3.c, src/regression/call1.c,
1572           src/regression/compare.c, src/regression/compare10.c,
1573           src/regression/compare2.c, src/regression/compare3.c,
1574           src/regression/compare4.c, src/regression/compare5.c,
1575           src/regression/compare6.c, src/regression/compare7.c,
1576           src/regression/compare8.c, src/regression/compare9.c,
1577           src/regression/configword.c, src/regression/for.c,
1578           src/regression/inline.c, src/regression/mult1.c,
1579           src/regression/nestfor.c, src/regression/or1.c,
1580           src/regression/pointer1.c, src/regression/ptrfunc.c,
1581           src/regression/rotate1.c, src/regression/rotate2.c,
1582           src/regression/rotate3.c, src/regression/rotate4.c,
1583           src/regression/rotate5.c, src/regression/rotate6.c,
1584           src/regression/rotate7.c, src/regression/string1.c,
1585           src/regression/struct1.c, src/regression/sub.c,
1586           src/regression/sub2.c, src/regression/switch1.c,
1587           src/regression/while.c, src/regression/xor.c,
1588           src/regression/create_stc, src/regression/simulate,
1589           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1590           regression tests
1591         * src/regression/gpsim_assert.h: added
1592
1593 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1594
1595         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1596         ((void (code *) (void)) 0) ();
1597         * as/hc08/aslex.c,
1598         * as/hc08/aslink.h,
1599         * as/hc08/asm.h,
1600         * as/hc08/asmain.c,
1601         * as/hc08/lkdata.c,
1602         * as/hc08/lklex.c,
1603         * as/hc08/lkmain.c,
1604         * as/mcs51/aslex.c,
1605         * as/mcs51/aslink.h,
1606         * as/mcs51/asm.h,
1607         * as/mcs51/asmain.c,
1608         * as/mcs51/lkdata.c,
1609         * as/mcs51/lklex.c,
1610         * as/mcs51/lkmain.c,
1611         * as/z80/aslex.c,
1612         * as/z80/asm.h,
1613         * as/z80/asmain.c: fixed build on current cygwin:
1614         replaced getline() by as_getline()
1615
1616 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1617
1618         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1619         declarator in the symbol chain
1620         * src/SDCCsymt.h,
1621         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1622         parameter list for function pointers
1623         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1624         * support/regression/tests/bug-716242.c: added
1625
1626 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1627
1628         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1629         offset if possible
1630         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1631
1632 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1633
1634         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1635         inifinitely recurseable, added static
1636         * support/regression/tests/bug-1408066.c: added
1637
1638 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1639
1640         * src/SDCCicode.h,
1641         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1642         renamed, added possibility to create "postLoopLbl"-labels
1643         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1644         newiTempLoopHeaderLabel
1645         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1646         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1647         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1648         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1649         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1650         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1651         (basicInduction): fixed bug #136564, made static,
1652         (loopInduction): changed parameter of basicInduction, made static,
1653         (addPostLoopBlock): added
1654         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1655         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1656         findLoopEndSeq
1657         * support/regression/tests/bug-136564.c: added
1658         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1659         --std-sdcc99 to LIBSDCCFLAGS
1660
1661 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1662
1663         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1664         while loop
1665         * support/regression/tests/bug-1406131.c: added
1666
1667 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1668
1669         * src/SDCCast.c (decorateType): fix promotion of unary minus
1670         * src/SDCCsymt.c (computeType): beautified
1671         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1672         (valUnaryPM, valComplement): fix sign and promotion,
1673         (valNot): ANSI: result type is int (SDCC: unsigned char)
1674         * support/regression/tests/uminus.c: speedup by removing superflous
1675         test case 'int'
1676         * support/regression/tests/onebyte.c: added promotion and signedness
1677         tests for unary minus
1678         * support/regressions/tests/bug-477927.c: disable warning about
1679         uninitialized variables
1680         * support/regression/tests/not.c: added
1681
1682 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1683
1684         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1685         * src/mcs51/gen.c (gen51Code): show final register usage after
1686         fillGaps in asm with --i-code-in-asm
1687         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1688         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1689         incUsed, rliveClear, adjustIChain): made static,
1690         (setFromRange): excluded because it's unused,
1691         (findPrevUseSym, markWholeLoop): added,
1692         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1693         through all branches of predecessors enables sdcc to emit the warning
1694         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1695         (rlivePoint): made static, added parameter emitWarnings which is only
1696         true during the first run out of two,
1697         (findRecursiveSucc, findRecursivePred): removed,
1698         (computeLiveRanges): made static, added parameter emitWarnings,
1699         (dumpIcRlive): added for debugging only
1700         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1701         removed prototype of setFromRange()
1702         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1703         in call of computeLiveRanges()
1704         * support/regression/tests/bug-895992.c: added
1705         * support/regression/tests/bug-971834.c: added
1706         * support/valdiag/tests/bug-895992.c: added
1707         * support/valdiag/tests/bug-971834.c: added
1708
1709 2005-12-18 Raphael Neider <rneider AT web.de>
1710
1711         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1712           (genUnpackBits): improved code for direct operands,
1713           (genPackBits): improved code for literal assignment to bitfields
1714             and for direct destination operands (no FSR indirection),
1715             prevented redundant AND, fixes #1362800,
1716           (AccLsh): added parameter to disable masking of the result
1717         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1718           skip instructions with side-effects (like incfsz),
1719           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1720         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1721         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1722           fixes #1375263
1723
1724 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1725
1726         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1727         volatile variables as spill location
1728
1729 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1730
1731         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1732         replacing literals
1733         * support/regression/tests/bug-1376320.c: added
1734
1735 2005-12-08 Raphael Neider <rneider AT web.de>
1736
1737         * src/pic/device.c: renamed is_shared to pic14_is_shared
1738         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1739         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1740           (is_valid_identifier): added for above workaround
1741
1742 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1743
1744         * device/lib/Makefile.in: fixed to enable port-specific-objects
1745         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1746           char, thanks Hubert Sack
1747         * doc/sdccman.lyx: documented --xstack-loc,
1748           elaborated a bit more on interrupts and pitfalls,
1749           removed "setjmp/longjmp unsupported",
1750           documented some unsupported C99 features
1751         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1752         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1753           if, thanks Hubert Sack
1754         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1755         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1756           make make_library
1757         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1758           regression tests can report resource usage (rfe 700441)
1759         * support/regression/collate-results.py: report resource usage
1760         * support/regression/ports/ds390/spec.mk,
1761         * support/regression/ports/hc08/spec.mk,
1762         * support/regression/ports/mcs51/spec.mk,
1763         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1764         * support/regression/ports/ds390/uCsim.cmd,
1765         * support/regression/ports/hc08/uCsim.cmd,
1766         * support/regression/ports/mcs51/uCsim.cmd,
1767         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1768         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1769           library, use the default one
1770         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1771           building the library
1772
1773 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1774
1775         * config.dsp: added dependency on .version and configure_vc.awk
1776         * device/include/setjmp.h: updated for --stack-auto and --xstack
1777         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1778         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1779         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1780         * device/lib/libsdcc.lib: added _setjmp
1781         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1782           (decorateType): fixed bug 1372851,
1783           (optimizeGetHbit): fixed warning
1784         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1785           array initialisation
1786         * support/regression/tests/bug1057979.c: added test for bug 1358192
1787         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1788
1789 2005-12-03 Borut Razem <borut.razem AT siol.net>
1790
1791         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1792           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1793
1794 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1795
1796         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1797         createIval): implement symbol independant "flexible array member",
1798         (createIvalCharPtr): implemented flexible array initialisation with a
1799         string
1800         * src/SDCCsymt.c (copyStruct): removed,
1801         (getSize): fixed misleading comment,
1802         (getAllocSize): removed, the additional allocation size is now in
1803         sym->flexArrayLength,
1804         (checkStructFlexArray): new, syntax checks for flexible array members,
1805         (compStructSize): added syntax checks for "flexible array members"
1806         (copyStruct): removed,
1807         (copyLinkChain): removed inefficient fix for bug 770487
1808         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1809         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1810         symbol->flexArrayLength
1811         * src/SDCCerr.c,
1812         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1813         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1814         * support/regression/tests/structflexarray.c: added
1815         * support/valdiag/tests/structflexiblearray.c: added
1816
1817 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1818
1819         * src/SDCCast.c (decorateType): fixed bug 1368489
1820         * support/Util/SDCCerr.c,
1821         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1822
1823 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1824
1825         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1826           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1827
1828 2005-11-27 Borut Razem <borut.razem AT siol.net>
1829
1830         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1831           support/cpp2/mkdeps.h: added command line option
1832           -obj-ext=<extension> to SDCPP to define object file externion, used
1833           for generation of make dependencies (-M)
1834         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1835
1836 2005-11-26 Borut Razem <borut.razem AT siol.net>
1837
1838         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1839           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1840           added pic and pic16 libraries
1841
1842 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1843
1844         * device/include/float.h: Corrected typo in prototype of __fsgt
1845
1846 2005-11-25 Borut Razem <borut.razem AT siol.net>
1847
1848         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1849           added creation of model-mcs51-stack-auto libraries
1850
1851 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1852
1853         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1854         and fields-list too
1855         * src/SDCCast.c (createIvalArray): removed obsolete comment
1856
1857 2005-11-24 Borut Razem <borut.razem AT siol.net>
1858
1859         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1860           added missing device/lib/mcs51/crt*.asm sources
1861
1862 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1863
1864         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1865
1866 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1867
1868         * device/lib/_fs2schar.c,
1869         * device/lib/_fs2sint.c,
1870         * device/lib/_fs2slong.c: optimized inline asm
1871
1872 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1873
1874         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1875           Better handling of floats between -1.0 and 0.0.
1876
1877 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1878
1879         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1880           (the missing "if"s prohibited removal of redundant labels)
1881
1882 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1883
1884         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1885           Properly convert floats between -1.0 and 0.0 to long, int, and char
1886           types (max integer value of negative floats tends to zero).
1887         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1888           Removed changes made so to work properly with floats between
1889           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1890           and _fs2char.c
1891
1892 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1893
1894         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1895         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1896         (genCast) cosmetic change
1897         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1898         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1899         from mcs51
1900         * support/regression/tests/bitfields (testSignedBitfields): added
1901
1902 2005-11-18 Borut Razem <borut.razem AT siol.net>
1903
1904         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1905         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1906           introduced SILENT option to make building of pic16 libraries less
1907
1908 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1909
1910         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1911           Now they work properly with floats between -1.0 and 0.0
1912         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1913
1914 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1915
1916         * src/SDCCicode.c (printOperand): added missing else
1917
1918 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1919
1920         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1921         reformatted for better readability
1922         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1923         signed bitfields
1924
1925 2005-11-17 Borut Razem <borut.razem AT siol.net>
1926
1927         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1928           introduced SILENT option to make building of pic16 libraries less
1929           verbose - used for nightly snapshot build
1930         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1931           available on Win32 platforms.
1932         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1933           medium, large, pic and pic16
1934
1935 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1936
1937         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1938           printf("%f"...) sets fraction to zero.
1939
1940 2005-11-16 Raphael Neider <rneider AT web.de>
1941
1942         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1943           fixes #1357221
1944         * src/pic/gen.c (genIfx): implemented for CARRY bit
1945         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1946           to generic pointers, fixes #1357332,
1947           (pic16_movLit2f): NEW,
1948           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1949
1950 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1951
1952         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1953
1954 2005-11-11 Raphael Neider <rneider AT web.de>
1955
1956         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1957         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1958           compute pointer's type from operand,
1959           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1960           improved single bit reads, fixes bug #1353379
1961
1962 2005-11-09 Borut Razem <borut.razem AT siol.net>
1963
1964         * support/scripts/sdcc.nsi: added lib/pic to the package
1965
1966 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1967
1968         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1969
1970 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1971
1972         * support/regression/tests/bug1348008.c: added
1973         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1974         * support/regression/tests/bug1337835.c: updated comment
1975
1976 2005-11-06 Borut Razem <borut.razem AT siol.net>
1977
1978         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1979           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1980           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1981           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1982           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1983           dynamic construction of cl_error_class and derivates - 2.nd try
1984
1985 2005-11-05 Borut Razem <borut.razem AT siol.net>
1986
1987         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1988           bug, which caused Bus Errors on sparc solaris
1989
1990 2005-11-04 Borut Razem <borut.razem AT siol.net>
1991
1992         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1993           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1994           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1995           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1996           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1997           and derivates to resolve the initialization problem on OSX
1998
1999 2005-11-02 Borut Razem <borut.razem AT siol.net>
2000
2001         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2002           corrected typo - #include <winsock2.h>
2003
2004 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
2005
2006         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
2007           (_asxxxx_mapping): added org directive for future enhancements
2008
2009 2005-11-01 Borut Razem <borut.razem AT siol.net>
2010
2011         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2012           enabled sockets on WIN32
2013         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
2014
2015 2005-10-31 Borut Razem <borut.razem AT siol.net>
2016
2017         * support/regression/generate-cases.py: escape backslashes in {testcase}:
2018           WIN32 backslash path delimiters should be escaped when used in C strings
2019         * support/regression/tests/bitfields.c: exclude failing assertions for
2020           __CYGWIN32__ and __MINGW32__ hosts
2021
2022 2005-10-30 Borut Razem <borut.razem AT siol.net>
2023
2024         * src/SDCCutil.c: corrected double comparison typo
2025
2026 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
2027
2028         * device/lib/medium/Makefile: added for new memory model medium
2029         * device/include/asm/mcs51/features.h: updated for medium/pdata
2030         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
2031           added Multiply & Accumulate sbit's and MAC0_PAGE define
2032         * device/include/mcs51/c8051f300.h: added sfr16 definitions
2033         * device/include/mcs51/c8051f310.h: added sfr16 definitions
2034         * device/lib/_mullong.c: update for medium model
2035         * device/lib/incl.mk: added medium model
2036         * doc/sdccman.lyx: documented medium model
2037         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
2038         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
2039         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
2040         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
2041           (allocParms): set SCLS and OCLS to pdata for medium model
2042         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
2043           for pdata,
2044           (powof2): return <0 if not power of 2
2045         * src/avr/gen.c (genBitWise): use updated powof2
2046         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
2047           (shiftR2Left2Result): small optimization in setup, save acc when storing,
2048           (shiftLLeftOrResult): use B if necessary
2049         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
2050         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
2051         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
2052         * support/regression/Makefile.in: added test-mcs51-medium
2053         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
2054
2055 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2056
2057         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
2058         specifier unsigned
2059         * device/lib/time.c (mktime): fixed bug 1334315
2060
2061 2005-10-28 Raphael Neider <rneider AT web.de>
2062
2063         * device/include/pic/p16f_common.inc: added common declarations
2064         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
2065
2066 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2067
2068         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
2069           (aopPutUsesAcc): added to predict accumulator use,
2070           (assignResultValue): save acc if necessary,
2071           (genMinusDec): store result if indirectly addressed,
2072           (genDivOneByte):  save acc if necessary,
2073           (movLeft2Result): bugfix if left already in acc,
2074           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
2075             attention to accumulator use (esp. pdata),
2076           (genReceive): receive pdata correctly
2077         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
2078         * src/SDCCicode.h: added isOperandInPagedSpace prototype
2079
2080 2005-10-27 Raphael Neider <rneider AT web.de>
2081
2082         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
2083
2084 2005-10-27 Raphael Neider <rneider AT web.de>
2085
2086         * .version: changed version to 2.5.4
2087         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
2088         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
2089           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
2090             arithmetics support routines
2091         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
2092         * device/lib/Makefile.in: also create installdir for pic
2093
2094         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
2095           pic14 port as well
2096         * src/pic/device.c (dump_sfr): rewritten to delegate register
2097           placement to the linker (use `extern sym' rather than sym EQU addr),
2098           (validAddress): fixed to check last specified address
2099         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
2100           (popGetLit): truncate literal value to 8 bit,
2101           (popGet): moved assert to more appropriate place
2102           (popGetExternal): create pCode operand from and mark the according
2103             symbol as being `extern'
2104           (popGetAddr): added sanity check on immediate's offset, provide
2105             GPOINTER tag on demand
2106           (aopPut): fixed for immediates,
2107           (mov2w_op): move operand's address or contents to WREG (depending on
2108             operand type), safer variant of mov2w,
2109           (movwf,call_libraryfunc): NEW, handy abbreviations,
2110           (get_argument_pcop,get_return_val_pcop,pass_argument,
2111           get_returnvalue): interface for accessing function parameters and
2112             return values,
2113           (assignResultValuei,genRet): use new parameter/return value interface
2114           (pic14_getDataSize): back to old version handling generic pointers,
2115           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
2116             provided implementation and/or fixed old one,
2117           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
2118             calls, removed legacy 8051 reference code
2119           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
2120           (loadSignToC): NEW, move the operands sign bit to CARRY,
2121           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
2122             genRightShiftSigned, accepts negative shift counts,
2123           (setup_fsr): load FSR and adjust IRP (indirect memory access),
2124           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
2125             generic pointers, __data pointers and __code pointers,
2126           (genUnpackBits,genPackBits): rewritten to work with generic pointers
2127             and signed bitfields, limit bitfields to 8 bit,
2128           (genDataPointerGet): fixed number of bytes read,
2129           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
2130           (genPointerGet,genPointerSet): fixed handling of __code pointers,
2131             pointers to constant data are no longer assumed to point to __code
2132             space, removed invalid pointer types,
2133           (bitpatternFromVal): retrieve the PICs representation of an integer
2134             or float literal,
2135           (genDataPointerSet): fixed assigning to po_immediate operands,
2136           (genGenPointerSet): implemented as library call,
2137           (genIfx): fixed incorrect condition,
2138           (genAddrOf): limit generic pointers' addresses to 2 bytes,
2139             provide GPOINTER tag according to destination's storage class,
2140           (genCast): added code to handle casting to generic pointers, added
2141             sign-/zero extension of the result
2142           (aop_isLitLike,op_isLitLike): fixed handling of immediates
2143         * src/pic/gen.h: added macros to access IRP bit in STATUS register
2144         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
2145           extend the result
2146         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
2147           address/register resides in the shared banks
2148           (emitSymbolToFile): improved to handle global and `pinned' symbols,
2149             put all variables into separate sections (have the linker arrange
2150             them)
2151           (picglue): put init code and interrupt handlers in separate sections
2152         * src/pic/main.c: added port specific options table, modified to PORT
2153           structure to make GPOINTERs 3 byte, added pic14_options
2154           (_pic14_do_link): private linking routine (update paths to libraries,
2155             add libsdcc.lib by default)
2156         * src/pic/main.h: declare pic14_options
2157         * src/pic/pcode.c: fixed instructions i/o relations,
2158           (RegCond): reverted to correct version,
2159           (newpCodeOpLit): truncate literals to 8 bit,
2160           (genericPrint): added debug output,
2161           (getRegFromInstruction): fixed for various operand types, simplified
2162           (BuildFlow): fixed broken handling of isntructions with labels
2163           (LinkFlow): start at last instruction in flow (skip trailing comments),
2164             pass the flow on to the next instruction after CALL
2165           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
2166           (insertPCodeInstruction): fixed inserting after a skip instruction,
2167           (DoBankSelect): fixed for labeled instructions
2168           (OptimizepBlock): honor --nopeep switch
2169           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
2170         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
2171         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
2172           (pCodeOptime2pCodes): allow disabling this optimization via
2173             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
2174             but is still buggy), started implementation of a dataflow based
2175             pCode optimization (CSE + dead code elimination)
2176           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
2177         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
2178           names are independant of the stack location and therefore portable across
2179           devices
2180
2181 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2182
2183         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
2184           (selectSpil): fixed bug 1337835 by not spilling bit variables
2185         * support/regression/tests/bug1337835.c: added test for this bug
2186         * src/mcs51/peeph.def: restart after rule 3.c,
2187           addded rules 263.x to optimize loading constants
2188
2189 2005-10-26 Raphael Neider <rneider AT web.de>
2190
2191         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
2192         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
2193           (genAssign): emit warning when casting literals to generic pointer
2194             type, also applies when taking the address of a fixed variable,
2195           (genCast): improved casting to generic pointers
2196         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
2197           extern variables, added verbose error message
2198         * device/include/pic16/{string.h,errno.h}: added #pragma library c
2199
2200 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
2201
2202         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
2203         carry must be complemented too
2204         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
2205         could be emitted by genMinus
2206         * src/SDCCval.c (constVal): fixed bug 1305065
2207
2208 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
2209
2210         * src/SDCCast.c (addCast): added promotion for bit variables
2211         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
2212         promotion casts + optimisation
2213         (optimizeGetWord): fix warning 'i' might be used uninitialized
2214         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
2215         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
2216
2217 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2218
2219         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
2220         all chars are promoted to int; promotion should be handled in SDCCast.c
2221
2222 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2223
2224         * device/lib/_strcmp.c: Fixed bug 1326457
2225
2226 2005-10-11 Raphael Neider <rneider AT web.de>
2227
2228         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
2229         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
2230
2231 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2232
2233         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
2234         * support/regression/tests/sfr16.c: added test for the sfr32 bug
2235
2236 2005-10-04 Raphael Neider <rneider AT web.de>
2237
2238         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
2239           device/lib/pic16/pics.all: added pic18f1320
2240         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
2241
2242 2005-09-30 Raphael Neider <rneider AT web.de>
2243
2244         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
2245         * src/pic16/devices.inc: NEW, provides device descriptions
2246         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
2247
2248 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
2249
2250         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
2251           GETHBIT
2252
2253 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
2254
2255         * doc/sdccman.lyx: updated Highest Order Bit documentation,
2256           documented Any Order Bit, Higher Order Byte and Higher Order Word
2257         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
2258         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2259           (optimizeGetAbit): new, to get any bit, not only the high bit,
2260           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2261           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2262           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2263           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2264             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2265             GETABIT, GETBYTE, GETWORD: decorate them,
2266           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2267           (ast_print): added GETABIT, GETBYTE, GETWORD
2268         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2269         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2270           (geniCodeBinary): new generic binary icode,
2271           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2272         * src/port.h: updated comment for PORT.hasExtBitOp
2273         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2274           (genGetByte): new, to get a single byte,
2275           (genGetWord): new, to get a word from a long,
2276           (gen51Code): added GETABIT, GETBYTE, GETWORD
2277         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2278
2279 2005-09-23 Raphael Neider <rneider AT web.de>
2280
2281         * configure.in, configure: have device/lib/pic configured
2282         * device/lib/Makefile.in: added model-pic14
2283         * device/lib/clean.mk: added pic/ to clean rule
2284         * device/lib/pic: added rudimentary pic14 library providing support
2285           functions for multiplication/division/generic pointer access
2286         * src/SDCCopt.c (convilong): mark support functions as extern
2287           for pic14 port as well
2288         * src/pic/gen.c (genMult): added assertions,
2289           (genpic14Code): emit warning on unhandled iCodes
2290         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2291         * src/pic/pcode.c (pCodeOpCopy),
2292         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2293           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2294           SFR_REGISTER}), made safe for future extensions
2295         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2296           instructions even if preceeded by SKIP instructions (also remove
2297           them); removed unused code
2298         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2299           prevents leaving parts of the structure uninitialized after copying
2300
2301 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2302
2303         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2304           ago by me
2305         * support/regression/tests/addsub.c: added test for the bug
2306
2307 2005-09-21 Raphael Neider <rneider AT web.de>
2308
2309         * device/include/pic16/pic18f1220.h,
2310           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2311         * device/lib/pic16/Makefile.rules: added missing opening paren
2312         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2313           are provided in genutils.c,
2314           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2315           operand/result sizes,
2316           (genCmp): assert on NULL pointers first, then check deref'ed values
2317         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2318           result size
2319
2320 2005-09-18 Raphael Neider <rneider AT web.de>
2321
2322         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2323           as these are now unused,
2324           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2325         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2326           local, avoids uninitialized pointer dereference on r->name
2327         * src/pic16/ralloc.c (newReg): fixed indentation
2328
2329 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2330
2331         * src/SDCCval.c (constVal): fixed bug 730366
2332         * support/Util/SDCCerr.c,
2333         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2334
2335 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2336
2337         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2338
2339 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2340
2341         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2342
2343 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2344
2345         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2346           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2347         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2348           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2349         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2350         * packihx/packihx.c (hexDigit): made c unsigned char
2351         * as/mcs51/lklibr.c (fndsym),
2352         * link/z80/lkgb.c (gb),
2353         * link/z80/lklibr.c (fndsym),
2354         * link/z80/lkrloc.c (relr),
2355         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2356         * src/SDCC.lex (checkCurrFile, process_pragma),
2357         * src/SDCCglue.c (spacesToUnderscores),
2358         * src/SDCCmain.c (setParseWithComma, processFile),
2359         * src/asm.c (tvsprintf, printCLine),
2360         * src/avr/gen.c (emitcode, aopPut),
2361         * src/ds390/gen.c (emitcode),
2362         * src/hc08/gen.c (emitcode, emitinline),
2363         * src/mcs51/gen.c (emitcode, genInline),
2364         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2365           tokenizeLineNode),
2366         * src/pic/ralloc.c (debugLog),
2367         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2368           tokenizeLineNode),
2369         * src/pic16/ralloc.c (debugLog),
2370         * src/z80/main.c (_process_pragma):
2371            made all ctype.h function calls safe
2372         * src/SDCCopt.c: include math.h for fabs
2373         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2374           and used them throughout the code to make ctype.h function calls safe
2375         * src/ds390/main.c (asmLineNodeFromLineNode),
2376         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2377         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2378            unsigned char*
2379         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2380           (newpCodeAsmDir): made ctype.h function calls safe
2381         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2382           pic16_emitcode):  made lbp unsigned char*
2383         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2384           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2385         * src/xa51/gen.c (emitcode),
2386         * src/z80/gen.c (_emit2): made lbp unsigned char*
2387         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2388            char*
2389
2390 2005-09-05 Raphael Neider <rneider AT web.de>
2391
2392         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2393           access bank splitpoint
2394
2395 2005-09-05 Raphael Neider <rneider AT web.de>
2396
2397         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2398
2399 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2400
2401         * .version: changed to version 2.5.3
2402         * doc/sdccman.lyx: changed version to 2.5.3,
2403           documented --codeseg and --constseg and pragma codeseg and constseg,
2404           documented bit parameters (reentrant) and bit returning
2405         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2406            currFunc->recvSize, but is this ok for all ports?
2407           (ast2iCode): result of ~ on unsigned char must be cast to int for
2408            bool to work
2409         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2410           function pointers in bit space
2411         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2412           (processFuncArgs): call port.reg_parm() with reentrancy info
2413         * src/port.h,
2414         * src/avr/main.c,
2415         * src/ds390/main.c,
2416         * src/hc08/main.c,
2417         * src/pic/main.c,
2418         * src/pic16/main.c,
2419         * src/xa51/main.c,
2420         * src/z80/main.c: port.reg_parm prototype extended with
2421           "bool reentrant" parameter
2422         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2423           options.stackAuto for allocating bit register parameters
2424         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2425           (genSend): set BitBankUsed if it is,
2426           (selectRegBank): factored out of genCall for use in genPcall,
2427           (genCall): removed redundant dtype assignmen, use selectRegBank,
2428           (genPcall): handle returning in Carry properly, save in F0 if needed,
2429           (genReceive): handle bit register parameters
2430         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2431           (mcs51_assignRegisters): enable bit registers for all reentrant
2432            functions and don't set BitBankUsed unconditionally
2433         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2434         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2435         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2436
2437 2005-08-27 Borut Razem <borut.razem AT siol.net>
2438
2439         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2440         ppc-osx (Darwin) does not support -u option. It seems that it is
2441         supported only on Linux - GNU cp
2442
2443 2005-08-25 Borut Razem <borut.razem AT siol.net>
2444
2445         * sim/ucsim/gui.src/serio.src/Makefile.in,
2446           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2447           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2448           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2449           install and strip, since the strip at /usr/ccs/bin should be used
2450           on solaris
2451
2452 2005-08-24 Borut Razem <borut.razem AT siol.net>
2453
2454         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2455
2456 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2457
2458         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2459         ffffffffu
2460
2461 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2462
2463         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2464         * as/mcs51/lkmain.c (link_main): fixed warning
2465         * device/include/stdbool.h: ds390 has no advanced bit support yet
2466         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2467         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2468         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2469           and updated their macros
2470         * src/SDCCval.c (constVal): updated comment for renamed b_long
2471
2472 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2473
2474         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2475         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2476           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2477           (oprio): set priority for '['
2478         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2479            and adb_24_bit
2480         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2481         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2482         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2483         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2484           added overlayable BIT_BANK area
2485         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2486           (summary2): explain 'T' in legenda
2487         * as/mcs51/lkrloc.c: replaced old K&R style,
2488           (relr): added R_BIT processing,
2489           (errmsg): added "Bit-addressable relocation error",
2490           (adb_bit): added for converting from byte- to bit-addressable space,
2491           (adb_24_bit): added for converting from byte- to bit-addressable space
2492         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2493            used in reentrant functions now even as return value
2494         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2495         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2496           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2497         * src/SDCCglobl.h: added indicator BitBankUsed
2498         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2499            the bit registers b0-b7
2500         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2501           (geniCodeCast): fixed bug 1263853,
2502           (geniCodeLogicAndOr): put result in bool or char,
2503           (geniCodeReceive): added parameter func for accessing the return type,
2504           (geniCodeFunctionBody): pass func to geniCodeReceive
2505         * src/SDCCmain.c: added indicator BitBankUsed
2506         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2507         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2508           (checkSClass): don't put automatic bool/bit on stack,
2509           (checkFunction): removed check on function cannot return bit
2510         * src/SDCCsymt.h: added newBoolLink prototype
2511         * src/mcs51/gen.c (rb1regs): added bit registers,
2512           (movc): created for assigning to carry,
2513           (pushReg, popReg): created for pushing registers,
2514           (sameRegs): check both AOP_REG and AOP_CRY types,
2515           (aopOp): handle bit registers,
2516           (aopPut): optimization no self-assign,
2517           (saveRegisters): push reg->base (bits) only once for bit registers,
2518            and use pushReg,
2519           (unsaveRegisters): pop reg->base only once and use popReg,
2520           (assignResultValue): added parameter func and return in carry for bits,
2521           (genIpush): optimization no reload in A if not changed,
2522           (genSend): bit parameters in reentrant functions are passed in bit
2523            registers by first assigning to bits in B, then save registers and
2524            copy B to bits,
2525           (genCall): handle returning in Carry properly, save it in F0 if needed,
2526           (genPcall): updated assignResultValue call, this is not safe yet for bit
2527            returning function !!!
2528           (genFunction): don't generate equ's for bit registers and use pushReg,
2529           (genEndFunction): take care of bit returning functions and use popReg,
2530           (genRet): return bit in Carry,
2531           (genIfx): optimize bit registers and other directly addressable bits,
2532           (genReceive): updated assignResultValue call
2533         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2534           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2535            registers when using stack-auto
2536         * src/mcs51/ralloc.c (_G): added allBitregs,
2537           (regs8051): added the bit registers,
2538           (createStackSpil): use macro IS_BIT,
2539           (getRegBit): added to allocate a bit register, else spill,
2540           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2541           (updateRegUsage): factored out to ease stepping while debugging,
2542           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2543            also allocate bit registers,
2544           (fillGaps): handle bit registers,
2545           (findAllBitregs): added to create bit vector with all bit registers,
2546           (mcs51_allBitregs): returns this bit vector,
2547           (mcs51_assignRegisters): when using stack-auto use bit registers for
2548            passing parameters and creating local variables
2549         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2550
2551 2005-08-22 Borut Razem <borut.razem AT siol.net>
2552
2553         * device/lib/Makefile.in: replaced find option -or with -o
2554           to make it run on solaris
2555
2556 2005-08-22 Raphael Neider <rneider AT web.de>
2557
2558         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2559           fixes #1265442 (crash on Solaris)
2560
2561 2005-08-20 Borut Razem <borut.razem AT siol.net>
2562
2563         * configure, configure.in: added tests for libsocket and libnsl libraries,
2564           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2565           from support/regression/Makefile.in
2566         * support/regression/Makefile.in: added
2567         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2568         * sim/ucsim/libtool: regenerated on sparc-solaris
2569         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2570           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2571           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2572           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2573           sparc-solaris, which doesn't use GNU ld linker
2574         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2575         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2576
2577 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2578
2579         * src/mcs51/peeph.def: updated comments
2580
2581 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2582
2583         * device/lib/_gptrget.c,
2584         * device/lib/_gptrput.c: slightly shorter
2585         * doc/sdccman.lyx: incremented version
2586         * src/mcs51/peeph.def: moved peephole comments to the line of first
2587           change to better keep line correlation, reanimated 186.e
2588         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2589
2590 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2591
2592         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2593           David Saxton with quotes around file name.
2594
2595 2005-08-15 Borut Razem <borut.razem AT siol.net>
2596
2597         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2598           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2599           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2600           make tests run on x86_64 platform
2601
2602 2005-08-13 Raphael Neider <rneider AT web.de>
2603
2604         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2605           as it might be executed DURING a build (parallel make is wonderful)
2606
2607 2005-08-13 Raphael Neider <rneider AT web.de>
2608
2609         * device/lib/Makefile.in (port-specific-objects-pic16):
2610           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2611         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2612           dependency
2613         * device/lib/pic16/Makefile.rules: build subdirs before creating
2614           the library, removed builddir rule, create $(builddir) early in
2615           recurse rule, use empty recurse rule for leaf directories
2616         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2617           mkdir errors (race condition), removed duplicate suffix "hex"
2618           from clean rules
2619         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2620         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2621           prevents mkdir -p from aborting on Alpha
2622
2623 2005-08-12 Raphael Neider <rneider AT web.de>
2624
2625         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2626           db-statements in order to allow for arrays of pointers in code
2627           sections to be placed without interspersed 0-padding, fixes
2628           bug #1256215
2629         * (emitStatistics): fixed division by zero for pic18f1220
2630         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2631           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2632         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2633         * (pic16_pCodeConstString): keep track of already emitted string
2634           literals to prevent "duplicate definitions of symbol _str_NR"
2635         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2636           debug message
2637         * device/lib/Makefile.in: ignore failing PIC16 library builds
2638         * device/lib/pic16/Makefile: do not build if gputils are missing
2639         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2640
2641 2005-08-10 Raphael Neider <rneider AT web.de>
2642
2643         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2644           my last commit)
2645
2646 2005-08-10 Raphael Neider <rneider AT web.de>
2647
2648         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2649           Rokas' patch to add the new fixed point type "__fixed16x16"
2650         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2651           functions for __fixed16x16 arithmetics
2652         * device/lib/pic16: reimplemented the build system to support
2653           a separate build directory, better handling of libio (create
2654           the library in a separate subdir for each architecture) and
2655           easier configuration (centralized in Makefile.common)
2656
2657 2005-08-07 Raphael Neider <rneider AT web.de>
2658
2659         * src/pic16/gen.c (genrshTwo): fixed sign extension
2660         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2661         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2662           added T0CONbits
2663         * device/include/pic16/pic18f4220.h: NEW, header for
2664           pic18f4220 and pic18f4320
2665         * device/include/pic16/pic18fregs.h: added new devices,
2666           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2667         * device/include/pic16/signal.h: resolved name clashes
2668           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2669           to also allow testing for interrupt enable bits, added
2670           comments on how to use the macros
2671         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2672         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2673           register definitions for the devices
2674         * device/lib/pic16/pics.all: added new devices
2675         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2676           allocated memory
2677         * device/lib/pic16/libc/stdlib/memfree: do not count
2678           the block header as free memory
2679         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2680           simplified and added missing end-of-blocklist-marker
2681           (reported by Peter Onion, fixes #1252814)
2682         * (_mergeHeapBlock): fixed loop condition
2683         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2684           len==0, restructured code
2685         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2686           up a bit, reduced bitfield accesses, prevent endless loops
2687           in case of heap corruption
2688         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2689           "unreferenced arguments/must return a value" warnings
2690         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2691           replaced BAUDREG with SPBRG
2692         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2693           device/lib/pic16/debug/gstack/gstack.c: replaced
2694           _naked, _asm, _endasm with __naked, __asm, __endasm
2695
2696 2005-08-05 Raphael Neider <rneider AT web.de>
2697
2698         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2699           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2700
2701 2005-08-05 Borut Razem <borut.razem AT siol.net>
2702
2703         * device/lib/Makefile.in: added missing ';'
2704         * configure: removed ^M characters
2705
2706 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2707
2708         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2709           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2710           License
2711
2712 2005-08-04 Borut Razem <borut.razem AT siol.net>
2713
2714         * configure.in: pic16 libraries build 2nd try - enable running
2715           configure in device/lib/pic16
2716         * configure: regenerated from configure.in
2717         * device/lib/Makefile.in: create $(PORT)/bin directory
2718
2719 2005-08-03 Raphael Neider <rneider AT web.de>
2720
2721         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2722           to get/set values via pointers
2723         * (genUnpackBits,genPackBits): changed detection of
2724           ptr->bitfield vs. sym.bitfield, fixed access via generic
2725           pointers, removed dead (wrong) code for multibyte bitfields
2726         * (genNearPointerGet, genGenPointerGet): removed useless code,
2727           fixed bitfield detection, fixes #1250594
2728         * (genNearPointerSet): removed useless code
2729         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2730           and introduced macro pic16_emitpcode that conditionally emits
2731           the origin of the following pCode (useful for debugging SDCC)
2732         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2733         * (createDefmap): fixed handling of LFSR for --optimize-df
2734
2735 2005-08-02 Borut Razem <borut.razem AT siol.net>
2736
2737         * device/lib/Makefile.in: pic16 libraries build enabled since
2738           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2739
2740 2005-08-02 Raphael Neider <rneider AT web.de>
2741
2742         * src/pic16/gen.c (genPackBits): removed deprecated warning
2743         * (genGenPointerSet): fixed bitfield detection
2744
2745 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2746
2747         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2748
2749 2005-07-31 Raphael Neider <rneider AT web.de>
2750
2751         * device/lib/pic16/libdev/pic18f458.c,
2752           device/include/pic16/pic18f458.h: added missing T0CONbits
2753
2754 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2755
2756         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2757
2758 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2759
2760         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2761
2762 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2763
2764         * device/include/mcs51/at89c51ed2.h: added.
2765
2766 2005-07-23 Raphael Neider <rneider AT web.de>
2767
2768         * src/pic/gen.h: added emitpcode macro for debugging
2769         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2770           and replace by macro adding debug information on demand
2771         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2772         * (gencjne): tried to fix; replaced with correct (slower) code
2773         * (gen{Unp,P}ackBits): fixed single bit access
2774         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2775         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2776           previous instruction
2777         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2778           register has to be handled with care (forbidding movement
2779           of assignments/uses, removing assignments completely, ...)
2780         * (pCodeOptime2pCodes): make use of regIsSpecial
2781         * added lots of debugging output (commented out)
2782         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2783           from being reused as result UNLESS it is known to work
2784
2785 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2786
2787         * support/Util/dbuf.h: include <stddef.h> for size_t
2788         * .version: changed to version 2.5.2
2789
2790 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2791
2792         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2793
2794 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2795
2796         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2797           (genModOneByte): removed needless psha/pula
2798
2799 2005-07-22 Raphael Neider <rneider AT web.de>
2800
2801         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2802           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2803         * src/pic/gen.c (resolveIfx): do not "invent" labels
2804         * (genSkipc): changed to positive logic
2805         * (genSkipCond): removed as no longer needed
2806         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2807           backport from PIC16
2808         * (genLeftShift): check operands are in different registers
2809         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2810           INCF does not update CARRY...
2811         * src/pic/main.c: fixed _linkCmd
2812         * src/pic/pcode.c (unlinkpCode): added inactive code
2813         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2814           alive (do not assign result and operand overlapping registers)
2815
2816 2005-07-22 Raphael Neider <rneider AT web.de>
2817
2818         * src/pic/device.c (dump_sfr): replaced register declaration with
2819           call to emitSymbolToFile() to avoid duplicate symbols
2820         * (assignRelocatableRegisters): do not declare external symbols
2821         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2822           right (take size of type, not etype)
2823         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2824         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2825         * (packRegsForAccUse): disabled assignment of WREG as
2826           the result reg to prevent occurence of just fixed #1235003,
2827           fixes #1242954
2828         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2829           symbols (avoids duplicate symbols in .asm file)
2830         * (pic14emitRegularMap): use emitSymbolToFile()
2831         * src/pic/gen.c (aopOp): fixed spillLocation handling
2832         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2833         * (genDataPointerSet): removed unneccessary variables/output
2834
2835 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2836
2837         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2838         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2839
2840 2005-07-21 Raphael Neider <rneider AT web.de>
2841
2842         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2843           architecture cannot handle them efficiently, fixes bug #1235003
2844         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2845           check for empty sets before using them (fixes bug #1232190)
2846
2847 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2848
2849         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2850           (lnksect2): generate warnings for memory overlap
2851         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2852           constseg to set the name of these segments so you can instruct the linker
2853           to place them in banks
2854         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2855         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2856           added code_seg and const_seg to options
2857         * src/SDCCglue.c (emitMaps): use options.const_seg,
2858           (createInterruptVect): put interrupt vectors in segment HOME,
2859           (glue): put HOME before static segment and put the main glue in HOME,
2860           (glue): use options.code_seg
2861         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2862         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2863           these segments so you can instruct the linker to place them in banks
2864           (linkEdit): use code_loc for HOME segment which should be the first
2865           segment in code memory now
2866         * src/SDCCmem.c: fixed more stuff like bug 1238386
2867         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2868           (changePointer): don't change function pointers to code pointers for
2869           banked functions,
2870           (compareType): added exceptional check for banked function pointers
2871         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2872         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2873           after static in code memory
2874         * src/mcs51/gen.c: added aopLiteralLong prototype,
2875           (aopForSym): use getSize for functions,
2876           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2877           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2878           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2879           the segment,
2880           (genPcall): use call for literal function pointers and generate banked
2881           calls over the one trampoline so there's only one place for the user to
2882           modify according to his/hers hardware,
2883           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2884           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2885         * src/mcs51/main.c: added keyword banked,
2886           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2887         * support/Util/SDCCerr.c,
2888         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2889           needed for passing the bank and address to the trampoline
2890         * device/lib/mcs51/crtbank.asm: added for bankswitching
2891         * device/lib/mcs51/Makefile: added crtbank
2892
2893 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2894
2895         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2896           for fields at offset 0 of a struct or union as reported
2897           on 2005-07-07 in the developer mailing list.
2898
2899 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2900
2901         * src/SDCCmem.c: fixed bug 1238386
2902
2903 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2904
2905         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2906           (patch #1144962), added peephole 300, enabled 259.x
2907         * doc/sdccman.lyx: removed screenshot and provided link instead
2908
2909 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2910
2911         * doc/sdccman.lyx: added section about debugging with ddd
2912         * doc/figures/ddd_example.eps: screenshot of debugging session
2913
2914 2005-07-04 Raphael Neider <rneider AT web.de>
2915
2916         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2917           like CODE pointers, fixes #1115683
2918         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2919           call, fixes bugs #1232211, #1228110,
2920           fixed wrong casts to pCodeFlow from pCodeInstructions
2921
2922 2005-07-04 Raphael Neider <rneider AT web.de>
2923
2924         * src/pic/gen.c (popGet): changed assert to allow for
2925           bit operands
2926         * (popGetAddr): changed signature to provide
2927           an additional index, patched all call sites
2928         * (genCmpEq): handle literal-like operands correctly
2929         * (genAddrOf): added sanity checks on __code/__data pointers
2930         * (genAssign): added handling of symbols from __code section
2931         * (gencjne): do not generate code for comparisons whose result
2932           is neither stored nor used, fixes bug #1171114
2933         * (AccLsh, AccRsh): operate on operand instead of WREG
2934         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2935           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2936           by known count
2937         * rewrote complete shift-by-literal logic, commented unused
2938           functions out
2939         * (genConstPointerGet): get multiple bytes (if result size > 1),
2940           fixed handling of non-immediate addresses
2941         * (genPointerGet): handle CODE pointers like CONST pointers
2942         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2943         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2944           operand is to be treated as a literal or not
2945         * (mov2w,genPcall,genCmpEq),
2946           src/pic/genarith.c: use aop_isLitLike() to decide between
2947           literal/register contents
2948         * (addSign): added missing offset
2949         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2950           only emit comment in debug-mode,
2951           use {aop,op}_isLitLike throughout the file
2952         * src/pic/glue.c: fix initializers for pointers (work in progress)
2953         * src/pic/pcode.c (get_op): honor index on _const symbols
2954         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2955         * (dumppBlock): added pCode size estimation
2956         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2957           check for IS_SYMOP before OP_SYMBOL'ing
2958         * fixed indentation, compacted switch-statements
2959         * (allocReg): find free register and allocate it instead of
2960           allocating new registers all the time
2961         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2962           registers as its operands (necessary only for multibyte GETs)
2963
2964 2005-07-01 Raphael Neider <rneider AT web.de>
2965
2966         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2967           debugging .asm-output macros FENTRY + FEXIT
2968         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2969           way... I wonder...
2970         * (emitpComment): NEW, printf to pCode
2971         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2972           offset handling
2973         * (popGetAddr): NEW, variant of popGet to access an immediates
2974           high(er) bytes instead of the n'th byte of memory they reference,
2975           replaced popGet with popGetAddr where neccessary
2976         * (genDataPointerGet): reactivated and fixed implementation
2977         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2978           accesses
2979         * (genDataPointerSet): fixed multibyte assignments
2980         * (genpic14Code): fixed --i-code-in-asm handling
2981         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2982         * (genPlus): fixed index-out-of-bounds error
2983         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2984         * src/pic/ralloc.c: added debugging output macro FENTRY2
2985         * (spillThis): fixed indentation, enbraced for-body for clarity
2986         * (rematStr): commented out as now unused
2987         * (regTypeNum): commented out special spill case (overwrites
2988           arbitrary values)
2989         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2990
2991 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2992
2993         * doc/sdccman.lyx: documented sfr16/sfr32,
2994           added example for using storage class with function pointers
2995         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2996
2997 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2998
2999         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
3000         * device/lib/_itoa.c,
3001         * device/lib/_ltoa.c: optimized codesize
3002         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
3003           but don't know how to suppress the double warning.
3004         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
3005         * support/Util/SDCCerr.c,
3006         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
3007
3008 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
3009
3010         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
3011           fixed old K&R prototypes
3012         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
3013         * device/lib/_gptrget.c,
3014         * device/lib/_gptrgetc.c,
3015         * device/lib/_gptrput.c: changed versions for new memory indicator values,
3016           also new versions for small generic pointers and banked generic pointers
3017         * src/port.h: added const_name
3018         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
3019         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
3020         * src/SDCCcse.c (findPrevIc): check all associative operators
3021         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
3022         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
3023         * src/SDCCmem.c: updated comments,
3024           set far-space to 0 for pdata, results in optimized code
3025         * src/SDCCmem.h: added macro CONST_NAME
3026         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
3027           moving the info into the highest bits, see also gptrget/gptrput
3028         * src/src.dsp: added sdcc.ico to project files
3029         * src/avr/gen.c (genCast): fixed bug 0x%d
3030         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
3031         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
3032           relation between ptr_type and DCL_TYPE,
3033           (genCast): fixed bug 0x%d
3034         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
3035           (CODE)" for const_name
3036         * src/hc08/gen.c (genCast): fixed bug 0x%d
3037         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
3038           (hc08_port): added "CONST (CODE)" for const_name
3039         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
3040           (aopForRemat, adjustArithmeticResult): disconnected direct relation
3041           between ptr_type and DCL_TYPE,
3042           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
3043           operand* and took AOP() inside function so sfr-ness can be checked,
3044           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
3045           new prototype,
3046           (genFunction, genEndFunction): optimized stack setup,
3047           (genMinus): optimized for literals with ending zeroes (in bytes),
3048           (genCast): fixed bug 0x%d
3049         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
3050           (mcs51_port): added "CONST (CODE)" for const_name
3051         * src/mcs51/peeph.def: made rule 226 more generic
3052         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
3053         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
3054         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
3055         * src/z80/main.c (z80_port): added NULL for const_name,
3056           (gbz80_port): added NULL for const_name
3057         * support/regression/tests/bug663539.c,
3058         * support/regression/tests/sfr16.c: new tests
3059
3060 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3061
3062         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
3063
3064 2005-06-24 Raphael Neider <rneider AT web.de>
3065
3066         * device/lib/pic16/libdev/pic18f[68][567]20.c:
3067           corrected typos...
3068         * device/include/pic16/signal.h: added USBIF
3069           and SIG_USB
3070
3071 2005-06-24 Raphael Neider <rneider AT web.de>
3072
3073         * device/lib/pic16/libdev/pic18f2455.c,
3074           device/include/pic16/pic18f2455.h: NEW
3075         * device/include/pic16/pic18fregs.h,
3076           device/lib/pic16/pics.all,
3077           src/pic16/device.c: added 18f2455
3078         * device/lib/pic16/libdev/pic18f[68][567]20.c,
3079           device/include/pic16/{pic18f[68][567].h,usart.h}:
3080           replaced MULTIPLE_USARTS define with more relaible
3081           compatibility sfrs (for USART access)
3082
3083 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
3084
3085         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
3086           and the output asm file line is printed on two lines.
3087
3088 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3089
3090         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
3091           BGT, BLE, BHI, and BLS instructions
3092         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
3093           genCmpEq): removed
3094         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
3095           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
3096           fixes bug #1216342
3097         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
3098
3099 2005-06-15 Raphael Neider <rneider AT web.de>
3100
3101         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
3102         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
3103         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
3104           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
3105           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
3106
3107 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3108
3109         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
3110           Marcel Telka in bug #1215704
3111
3112 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
3113
3114         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
3115           located in shared memory bank.
3116
3117 2005-05-31 Raphael Neider <rneider AT web.de>
3118
3119         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
3120           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
3121           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
3122
3123 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
3124
3125         * device/lib/_strncpy.c: fixed the fix
3126
3127 2005-05-26 Raphael Neider <rneider AT web.de>
3128
3129         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
3130           initializers with \0, bug #1208187
3131         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
3132           intializers with \0, bug #1208187
3133
3134 2005-05-26 Raphael Neider <rneider AT web.de>
3135
3136         * src/pic16/glue.c (pic16_printIvalChar): fixed string
3137           initializers with \0, bug #1208187
3138         * src/pic16/main.c (_process_pragma): added sanity checks
3139           for stack position and size, emit warnings when appropriate
3140
3141 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
3142
3143         * device/lib/_strncpy.c: fixed not filling with \0
3144
3145 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3146
3147         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
3148           createFunction),
3149         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
3150           compound_statement),
3151         * src/SDCCsymt.h,
3152         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
3153
3154 2005-05-24 Raphael Neider <rneider AT web.de>
3155
3156         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
3157
3158 2005-05-24 Raphael Neider <rneider AT web.de>
3159
3160         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
3161           TRISE definitions, closes bug #1162453
3162
3163 2005-05-22 Raphael Neider <rneider AT web.de>
3164
3165         * src/pic16/main.c (_process_pragma): check for missing
3166           arguments to pragmas code and udata
3167         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
3168           consistency fixes to match other headers (thanks to Jim Paris)
3169         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
3170
3171 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
3172
3173         * src/SDCCicode.c (isOperandEqual): fixed missing ;
3174
3175 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
3176
3177         * support/regression/tests/bug1198642.c: new test
3178         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
3179         * src/SDCCcse.c (findPrevIc): added comment, please have a look
3180         * support/scripts/resource.h,
3181         * support/scripts/resource.rc,
3182         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
3183         * support/scripts/sdcc.ico: added 32x32 icon
3184
3185 2005-05-18 Raphael Neider <rneider AT web.de>
3186
3187         * device/lib/pic16/libdev/pic18f*.c,
3188         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
3189           keywords to "__sfr" and "__at (X)"
3190         * device/include/pic16/pic18fregs.h: added pic18f4520
3191         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
3192           #1203088 (MPLAB compatibility)
3193
3194 2005-05-17 Raphael Neider <rneider AT web.de>
3195
3196         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
3197         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
3198         * device/lib/pic16/pics.all: added new devices
3199         * src/pic16/device.c: added support for pic18f4520
3200
3201 2005-05-16 Raphael Neider <rneider AT web.de>
3202         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
3203         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
3204         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
3205           convenience function for bit access
3206
3207 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3208
3209         * device/lib/printf_large.c: fixed bug 1193299
3210         * support/regression/tests/bug1057979.c: added test %3.3s
3211
3212 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3213
3214         * device/include/mcs51/8051.h,
3215         * device/include/mcs51/8052.h: made parseable with lint
3216         * device/include/mcs51/lint.h: added include file for (sp)lint
3217         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
3218         * doc/cdbfileformat.lyx,
3219         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
3220
3221 2005-05-14 Raphael Neider <rneider AT web.de>
3222
3223         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
3224         * device/lib/pic16/libc/stdlib/itoa.c (new)
3225         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
3226         * device/lib/pic16/libio/Makefile: exclude subdir according to
3227           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
3228         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
3229         * src/pic16/gen.c (genFunction): prevent annoying warning
3230         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
3231           nameclashes on BeOS
3232         * support/cpp2/cppmain.c (cpp_output_string): new
3233         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
3234           fixes bug 1116802
3235
3236 2005-05-13 Borut Razem <borut.razem AT siol.net>
3237
3238         * src/SDCCmain.c (linkEdit): fixed bug 1195202
3239
3240 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3241
3242         * .version: changed to version 2.5.1; back to bleeding edge development
3243
3244 2005-05-11 Borut Razem <borut.razem AT siol.net>
3245
3246         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
3247           generate PDF version 1.3 documents
3248
3249 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3250
3251         * .version: changed to version 2.5.0
3252
3253 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3254
3255         * doc/sdccman.lyx: updated weblinks, index and smaller updates
3256
3257 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3258
3259         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3260         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3261         well as many smaller updates.
3262         * .version: changed to version 2.5.0-pre1
3263
3264 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3265
3266         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3267
3268 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3269
3270         * support/regression/tests/bug1185672.c: added
3271         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3272           bug 1185672
3273         * src/mcs51/gen.c (genCall): added comments, made it look safer
3274         * src/mcs51/gen.c (genEndFunction): simplified
3275
3276 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3277
3278         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3279
3280 2005-04-14 Borut Razem <borut.razem AT siol.net>
3281
3282         * fixed bug 1045046 - SIGSEGV with really simple code?:
3283           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3284           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3285
3286 2005-04-14 Borut Razem <borut.razem AT siol.net>
3287
3288         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3289           src/pic16/device.h: temporarily disabled experimental #inline pragma
3290           for 2.5.0 release
3291
3292 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3293
3294         * device/include/z80/stdio.h,
3295         * device/include/z80/string.h: removed these highly incomplete files so
3296           SDCC can use the default ones in device/include/
3297
3298 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3299
3300         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3301         gcc warning.
3302         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3303         fix sdcpp warnings.
3304
3305 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3306
3307         * device/include/malloc.h: removed redundant __reentrant prototypes
3308         * device/lib/_mullong.c: added working xstack variant in asm (C version
3309           doesn't pass regression tests)
3310         * device/lib/bpx.c: used __data and made bpx char for mcs51
3311         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3312           (createFunction): fixed bug with xstackPtr
3313         * src/SDCCcse.c: corrected comments
3314         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3315           (killDeadCode, eBBlockFromiCode): removed unused code
3316         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3317           corrected comments
3318         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3319           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3320           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3321           (genModOneByte): fixed warning in MSVC
3322         * src/mcs51/main.c (): added comments
3323         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3324
3325 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3326
3327         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3328
3329 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3330
3331         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3332
3333 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3334
3335         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3336         characters arrays of larger size than the declared one.
3337
3338 2005-04-10 Borut Razem <borut.razem AT siol.net>
3339
3340         * src/pic/gen.c (genInline),
3341           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3342           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3343           (findNextInstruction), (findPrevInstruction),
3344           (findInstructionUsingLabel),
3345           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3346         * src/pic/pcode.c (findLabel): added missing '\n'
3347         * src/src.dsp: added SDCCdwarf2.c to the project
3348
3349 2005-04-09 Borut Razem <borut.razem AT siol.net>
3350
3351         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3352
3353 2005-04-08 Raphael Neider <rneider AT web.de>
3354
3355         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3356           into the chain after a given one) and mergeDefmapSymbols (combine
3357           defmap entries for each symbol per pcode)
3358         * (createDefmap): have defmap entries merged in the end
3359         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3360           a symbol before replacing one access type's symbol, merge symbols in
3361           the end (replacement symbol might already have an entry)
3362         * (assignValnums): keep reference to written WREG intact
3363
3364 2005-04-08 Raphael Neider <rneider AT web.de>
3365
3366         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3367           Alpha)
3368
3369 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3370
3371         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3372         bytes
3373
3374 2005-04-07 Raphael Neider <rneider AT web.de>
3375
3376         * device/include/pic16/usart.h: added compatibility defines for
3377           devices with more than one USART
3378         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3379
3380 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3381
3382         * device/lib/Makefile.in: updated for port specific include
3383
3384 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3385
3386         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3387
3388 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3389
3390         * device/include/8051.h,
3391         * device/include/8052.h,
3392         * device/include/at89S8252.h,
3393         * device/include/at89c55.h,
3394         * device/include/at89x051.h,
3395         * device/include/at89x51.h,
3396         * device/include/at89x52.h,
3397         * device/include/mcs51reg.h,
3398         * device/include/reg51.h,
3399         * device/include/reg764.h,
3400         * device/include/regc515c.h,
3401         * device/include/sab80515.h: (re)moved these 12 files
3402         * device/include/mcs51/8051.h,
3403         * device/include/mcs51/8052.h,
3404         * device/include/mcs51/at89S8252.h,
3405         * device/include/mcs51/at89c55.h,
3406         * device/include/mcs51/at89x051.h,
3407         * device/include/mcs51/at89x51.h,
3408         * device/include/mcs51/at89x52.h,
3409         * device/include/mcs51/mcs51reg.h,
3410         * device/include/mcs51/reg51.h,
3411         * device/include/mcs51/reg764.h,
3412         * device/include/mcs51/regc515c.h,
3413         * device/include/mcs51/sab80515.h: and added them here
3414
3415 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3416
3417         * device/include/stdarg.h: changed SDCC specific keywords to double
3418           underlined form.
3419         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3420           mcs51 and ds390.
3421         * device/include/hc08/mc68hc908gp32.h,
3422         * device/include/hc08/mc68hc908jb8.h,
3423         * device/include/hc08/mc68hc908jkjl.h,
3424         * device/include/hc08/mc68hc908qy.h: fixed comments
3425         * device/include/mcs51/README: updated
3426         * device/include/mcs51/c8051f120.h: added PINRSF
3427         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3428         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3429           amidst code. Also inline is not supported.
3430
3431 2005-04-06 Raphael Neider <rneider AT web.de>
3432
3433         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3434         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3435           callers stack/frame pointers
3436
3437 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3438
3439         * device/include/pic16/usart.h: added, missing in previous commit,
3440         * device/include/pic16/adc.h: fixed typo,
3441         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3442         commit,
3443         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3444         <p18fxxx.inc>
3445         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3446         uninitialized because a bug appears with gplink
3447         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3448         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3449         complains for unrecognised option
3450
3451 2005-04-05 Raphael Neider <rneider AT web.de>
3452
3453         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3454           structs as well (using memcpy)
3455         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3456           on ISRs (GOTO has no label)
3457         * src/pic16/device.h: added OF_OPTIMIZE_DF
3458         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3459           new data flow analysis/optimization
3460         * src/pic16/pcode.c: added (prototypes for and implementation of)
3461           dataflow analysis functions, fixed pCodeInstructions' inCond and
3462           outCond values, made RCALL a branch instruction
3463         * (pic16_unlinkpCode): keep C line if possible
3464         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3465           C line moved if possible
3466         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3467         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3468           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3469         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3470           new flow)
3471         * (pic16_getJumptabpCode): NEW, needed in...
3472         * (LinkFlow): fixed handling of jumptables, calls and conditional
3473           branches
3474         * (pic16_InsertCommentAfter): NEW
3475         * (pic16_pCodeReplace): made verbose and flow preserving
3476         * (AnalyzeFlow): added call to data flow analysis
3477         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3478         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3479         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3480
3481 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3482
3483         * src/SDCCast.c (decorateType): fixed bug #1105626
3484
3485 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3486
3487         * device/include/asm/pic16/features.h,
3488         * pic18f*.h headers,
3489         * device/include/pic16/adc.h,
3490         * device/include/pic16/delay.h,
3491         * device/include/pic16/i2c.h,
3492         * device/include/pic16/malloc.h,
3493         * device/include/pic16/stdio.h,
3494         * device/include/pic16/stdlib.h,
3495         * device/include/pic16/string.h,
3496         * device/lib/pic16/libc/stdio/printf_tiny.c,
3497         * device/lib/pic16/libc/stdio/printf_small.c,
3498         * device/lib/pic16/libc/stdio/strmgpsim.c,
3499         * device/lib/pic16/libc/stdio/strmmssp.c,
3500         * device/lib/pic16/libc/stdio/strmusart.c,
3501         * device/lib/pic16/libc/stdio/vfprintf.c,
3502         * device/lib/pic16/libc/stdlib/ltoa.c,
3503         * device/lib/pic16/libc/stdlib/putchar.c,
3504         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3505         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3506         * device/lib/pic16/libc/stdlib/memchrram.c,
3507         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3508         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3509         * device/lib/pic16/libio/adc/adcbusy.c,
3510         * device/lib/pic16/libio/adc/adcread.c,
3511         * device/lib/pic16/libio/adc/adcsetch.c,
3512         * device/lib/pic16/libio/usart/ubaud.c,
3513         * device/lib/pic16/libio/usart/ubusy.c,
3514         * device/lib/pic16/libio/usart/udrdy.c,
3515         * device/lib/pic16/libio/usart/uopen.c,
3516         * device/lib/pic16/libio/usart/uputc.c,
3517         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3518         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3519         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3520         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3521         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3522         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3523         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3524         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3525         specific keywords to double underlined form,
3526         * device/lib/pic16/libc/Makefile.rules,
3527         * device/lib/pic16/libsdcc/Makefile.rules,
3528         * device/lib/pic16/libm/Makefile,
3529         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3530         to compile with C standard set in Makefile.common
3531         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3532         rand.c and crc.c in compilation process,
3533         * device/lib/pic16/libsdcc/int/divuint.c,
3534         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3535         `c' from signed to unsigned,
3536         * device/lib/pic16/startup/crt0.c,
3537         * device/lib/pic16/startup/crt0i.c,
3538         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3539         keywords to double underlined form, bug fixes in _do_cinit function
3540         which prevented the correct initialization of the .idata segment,
3541         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3542         core to enter a infinite loop
3543         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3544
3545 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3546
3547         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3548
3549 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3550
3551         * device/include/Makefile.in: add support for hc08 subdirectory
3552         * device/include/hc08/: new subdirectory
3553         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3554         Lucas Loizaga, thanks!
3555         * device/include/hc08/mc68hc908qy.h,
3556         * device/include/hc08/mc68hc908gp32.h,
3557         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3558         their own directory. Changed internal macro names to use the compiler
3559         reserved namespace. Changed SDCC specific keywords to double
3560         underlined form.
3561         * device/include/math.h,
3562         * device/include/malloc.h,
3563         * device/include/stdarg.h,
3564         * device/include/stdbool.h
3565         * device/include/string.h,
3566         * device/include/tinibios.h,
3567         * device/include/ds400rom.h,
3568         * device/include/8051.h,
3569         * device/include/8052.h,
3570         * device/include/80c51xa.h,
3571         * device/include/at89c55.h,
3572         * device/include/at89S8252.h,
3573         * device/include/at89x51.h,
3574         * device/include/at89x52.h,
3575         * device/include/ds80c390.h,
3576         * device/include/reg764.h,
3577         * device/include/regc515c.h,
3578         * device/include/sab80515.h,
3579         * device/include/mcs51/c8051f000.h,
3580         * device/include/mcs51/c8051f018.h,
3581         * device/include/mcs51/c8051f020.h,
3582         * device/include/mcs51/c8051f040.h,
3583         * device/include/mcs51/c8051f060.h,
3584         * device/include/mcs51/c8051f120.h,
3585         * device/include/mcs51/c8051f300.h,
3586         * device/include/mcs51/c8051f310.h,
3587         * device/include/mcs51/c8051f320.h,
3588         * device/include/mcs51/c8051f330.h,
3589         * device/include/mcs51/c8051f350.h,
3590         * device/include/z180.h: Changed SDCC specific keywords to double
3591         underlined form.
3592
3593 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3594
3595         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3596         18F4455,
3597         * (pic16_assignConfigWordValue): disable testing of configuration
3598         register value with config mask,
3599         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3600         function with port->fun_prefix,
3601         * (genFunction): when generating a naked interrupt function never
3602         create an absolute segment placed in interrupt vector address, place
3603         the actual interrupt function at IVA instead, when an interrupt
3604         function is generated with unspecified interrupt then do not create
3605         the absolute section,
3606         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3607         code for generating a call to generic pointer get/put function with
3608         a call to function pic16_callGenericPointer(),
3609         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3610         the call to the generic pointer get/put functions with prefixing the
3611         function name with port->fun_prefix,
3612         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3613         * src/pic16/main.c (_process_pragma): prefix function with
3614         port->fun_prefix,
3615         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3616         calling assembler, old 18Fxxxx macro is deprecated,
3617         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3618         PC_ASMDIR in while condition,
3619         * (findInstruction): add PC_ASMDIR in while condition,
3620         * (buildCallTree): prefix main with port->fun_prefix,
3621         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3622         identifier for variable with banked access in instructions BTFSS,
3623         BTFSC, BCF, BSF, BTG
3624         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3625         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3626         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3627         perform optimization when enviroment variable NO_REG_OPT is set,
3628         * (insideLRBlock): NEW, return 1 if register is inside an
3629         INF_LOCALREGS block,
3630         * (RemoveRegFromLRBlock): remove a register that is completely
3631         eliminated by register optimization, but it is still left in local
3632         register store/restore in/from stack block,
3633         * (Remove2pcodes): after removing register, check to see if it
3634         should be removed from local register store/restore in/from stack
3635         block,
3636         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3637         DUMMY_READ_VOLATILE,
3638
3639         * device/include/pic16/adc.h: minor prototype modifications and
3640         update,
3641         * device/include/pic16/malloc.h: added GPL notice various
3642         modifications,
3643         * device/include/pic16/stdint.h: NEW, standard header for ints
3644         * device/include/pic16/delay.h: NEW, header for delay functions,
3645         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3646         delay1mtcy,
3647         * device/include/pic16/signal.h: NEW, header providing helper macros
3648         for implementing signal handlers,
3649         * device/include/pic16/stdio.h: added prototypes for functions,
3650         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3651         prototypes for stdin and stdout, added macro PUTCHAR to
3652         automatically implement putchar function prototype,
3653         * device/include/pic16/usart.h: modified and updated USART library,
3654         * device/lib/pic16/libio/adc/,
3655         * device/lib/pic16/libio/i2c: some modifications to improve library
3656         performance,
3657         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3658         family of functions,
3659         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3660         family of functions and other sources,
3661         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3662         of the PIC18Fxx[28] devices,
3663         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3664         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3665         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3666         _do_cinit function, because the previous failed when local variables
3667         where not placed in the same memory bank,
3668         * device/lib/pic16/libsdcc/char/: various modifications to improve
3669         library performance,
3670         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3671         information on the new functions of the c library and more...
3672
3673 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3674
3675         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3676
3677 2005-03-26 Raphael Neider <rneider AT web.de>
3678
3679         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3680           if condition == CARRY)
3681         * (genCmp): adapted to new genSkipc semantics
3682         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3683           on rIfx (genCmp was broken)
3684
3685 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3686
3687         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3688         * src/z80/main.c (_keywords[]),
3689         * src/SDCCglobal.h (struct options),
3690         * src/SDCC.y,
3691         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3692         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3693         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3694         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3695         always available in leading double underscore form. The C99 support is
3696         mostly missing, but it's a start.
3697         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3698         reserved identifier "__data".
3699
3700 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3701
3702         * src/mcs51/peeph.def: fixed bug 1170013
3703
3704 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3705
3706         * device/include/mcs51reg.h: fixed bug 842007
3707
3708 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3709
3710         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3711         last time.
3712
3713 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3714
3715         * src/port.h (struct PORT),
3716         * src/avr/ralloc.c (avr_assignRegisters),
3717         * src/avr/main.c,
3718         * src/ds390/ralloc.c (ds390_assignRegisters),
3719         * src/ds390/main.c,
3720         * src/hc08/ralloc.c (hc08_assignRegisters),
3721         * src/hc08/main.c,
3722         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3723         * src/mcs51/main.c,
3724         * src/pic/ralloc.c (pic14_assignRegisters),
3725         * src/pic/main.c,
3726         * src/pic16/ralloc.c (pic16_assignRegisters),
3727         * src/pic16/main.c,
3728         * src/xa51/ralloc.c (xa51_assignRegisters),
3729         * src/xa51/main.c,
3730         * src/z80/ralloc.c (z80_assignRegisters),
3731         * src/z80/ralloc.h,
3732         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3733         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3734         * src/SDCCcse.h,
3735         * src/SDCCdflow.c (computeDataFlow),
3736         * src/SDCCdflow.h,
3737         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3738         * src/SDCCloop.h,
3739         * src/SDCCcflow.c (*),
3740         * src/SDCCcflow.h,
3741         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3742         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3743         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3744         immedDom() returning wrong block; probably fixes bug #1160833)
3745
3746 2005-03-20 Borut Razem <borut.razem AT siol.net>
3747
3748         * support/scripts/inc2h.pl: WIN32 port
3749
3750 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3751
3752         * device/lib/makefile.in: added abs.c and labs.c
3753
3754 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3755
3756         * device/include/stdint.h: added
3757         * device/lib/abs.c: added
3758         * device/lib/labs.c: added
3759         * device/include/stdlib.h: added abs() and labs() prototypes
3760         * device/lib/libsdcc.lib: added abs and labs
3761         * device/include/float.h,
3762         * device/lib/_fsmul.c,
3763         * device/lib/printf_fast.c,
3764         * device/lib/printf_tiny.c: updated comments
3765
3766 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3767
3768         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3769         bug #1164313
3770
3771 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3772
3773         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3774         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3775
3776 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3777
3778         * device/lib/printf_large.c: removed inline assembly for portability and
3779           readability. Use printf_fast if speed or size are more important.
3780         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3781         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3782
3783 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3784
3785         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3786         prevent compiler warning
3787
3788 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3789
3790         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3791         moved to level 0 and declared as static. Also they are explicit
3792         placed in access bank. This was necessery because some times they
3793         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3794         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3795         optimizations. Currently only compare to unsigned char is implemented,
3796         * src/pic16/gen.c: added fReturnIdx array,
3797         * (struct resolvedIfx) is moved to gen.h and made public,
3798         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3799         * (aopForSym): added an optimization to directly store in stack of
3800         the operand of a SEND iCode,
3801         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3802         but as registers instead (AOP_REG) using the fReturnIdx array,
3803         * (pic16_freeAsmop): remove the freed register from the
3804         _G.sregsAlloc field,
3805         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3806         a compare of 'WREG',
3807         * (pic16_popGetTempRegCond): changed function prototype, now
3808         function takes also a bitVector argument v which holds the current
3809         set of registers that are allocated for stack access by aopForSym,
3810         registers allocated in aopForSym for accessing stack symbols are not
3811         any more part of the functions usedRegs field,
3812         * (genCall): some times aopOp is called for a stack variable to be
3813         send, aopForSym might perform the push, if this is true make sure
3814         that genCall doesn't push the variable twice by testing _G.resDirect,
3815         * (genFunction): changed testing for unspecified interrupt number
3816         from 256 to INTNO_UNSPEC,
3817         * modified selection scheme of frame pointer generation. Previously
3818         if function did use local registers a frame pointer was generated,
3819         now a frame pointer is generated only if function has arguments
3820         (that need PLUSW2 register access), or has stack arguments, or the
3821         compiler is not instructed to omit the frame pointer,
3822         * (genEndFunction): before restoring local registers that were saved
3823         in the function preamble, also restore the registers that *might*
3824         have been allocated for stack access,
3825         * (genRet): removed some old comments,
3826         * (genCmp, the active (RN's) version): added a call to the
3827         pic16_genCmp_special function to perform the compare with a more
3828         robust and optimized way,
3829         * (genInline): a feature has been added in inline code generation,
3830         which allows a wildcard variable substitution when writing inline
3831         assembly. Code is incomplete and experimental therefore undocumented,
3832         * (genCast): changed order of aopOp for result and right to allow
3833         aopForSym to directly load the result if possible,
3834         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3835         perform an optimized compare on some selected special occasions,
3836         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3837         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3838         generate an IVT any more,
3839         * src/pic16/main.c (pic16_optionsTable): added command line option
3840         --optimize-cmp,
3841         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3842         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3843         macros,
3844         * src/pic16/NOTES: Raphael Neider added in list of active developers
3845         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3846         jumptable_end to prevent bug #,
3847         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3848         inCond and outCond fields,
3849         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3850         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3851         turn off register spilling,
3852         * (packRegsForOneUse): synced with other ports' versions although it
3853         is not used currently,
3854         * (pic16_packRegisters): added an optimization while reading
3855         structure bitfields, some registers may be saved (malloc code is
3856         decreased by 80 bytes)
3857
3858 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3859
3860         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3861         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3862         this can be optimized more?
3863
3864 2005-03-10 Raphael Neider <rneider AT web.de>
3865
3866         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3867           genNearPointerGet): (hopefully) fixed access to bitfields via
3868           pointers (p->bitN = x; and x = p->bitN; failed)
3869
3870 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3871
3872         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3873
3874 2005-03-09 Raphael Neider <rneider AT web.de>
3875
3876         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3877
3878 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3879
3880         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3881         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3882           (regTypeNum): set REG_BIT type if necessary
3883         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3884         * support/regression/tests/critical.c: check bug 1144613
3885
3886 2005-03-02 Raphael Neider <rneider AT web.de>
3887
3888         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3889
3890 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3891
3892         * src/avr/ralloc.c (serialRegAssign),
3893         * src/ds390/ralloc.c (serialRegAssign),
3894         * src/hc08/ralloc.c (serialRegAssign),
3895         * src/mcs51/ralloc.c (serialRegAssign),
3896         * src/pic/ralloc.c (serialRegAssign),
3897         * src/pic16/ralloc.c (serialRegAssign),
3898         * src/xa51/ralloc.c (serialRegAssign),
3899         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3900
3901 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3902
3903         * src/SDCCast.c (decorateType): fixed bug 1124787
3904
3905 2005-02-20 Hubert Sack <sack AT digiplan.de>
3906         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3907
3908         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3909         patch #1121755
3910
3911 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3912
3913         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3914         to keep the correct label reference count when adding/removing references
3915         to labels. A peephole file using this is appended to patch #1144962.
3916
3917 2005-02-14 Raphael Neider <rneider AT web.de>
3918
3919         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3920         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3921         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3922           retrievals of result operand's value on assignment
3923
3924 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3925
3926         * device/include/pic16/string.h: modified prototype for memccpy()
3927         to memccpy(void *, void *, char, size_t)
3928         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3929         check whether to omit frame pointer or not,
3930         * (genInline): convert all occurences of "\n" to LF in inline
3931         assembler blocks, this helps formatting the inline text,
3932         * (pic16_loadFSR0): modified prototype,
3933         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3934         removed some 8051 legacy code,
3935         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3936         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3937         before allocating temporary registers in functions,
3938
3939 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3940
3941         * support/regression/tests/bitvars.c: corrected the "fix"
3942
3943 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3944
3945         * support/regression/tests/bitvars.c,
3946         * support/regression/tests/bitwise.c,
3947         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3948
3949 2005-02-10 Raphael Neider <rneider AT web.de>
3950
3951         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3952           different size for Alpha
3953         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3954
3955 2005-02-09 Raphael Neider <rneider AT web.de>
3956
3957         * src/SDCC.lex(doPragma) : save and restore warning options as well
3958           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3959         * have #pragma less_pedantic set the errorlevel to WARNING
3960           (fixes #1117001)
3961         * (cloneOptimize) : fixed wrong malloc's size
3962         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3963           facilitate correct handling of #pragma (save|restore)
3964
3965 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3966
3967         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3968
3969 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3970
3971         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3972
3973 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3974
3975         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3976
3977 2005-02-02 Raphael Neider <rneider AT web.de>
3978
3979         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3980         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3981         * (pic16_storeForReturn): fixed to allow returning function pointers
3982         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3983         * device/include/pic16/{stddef.h,stdbool.h}: added
3984
3985 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3986
3987         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3988
3989 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3990
3991         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3992         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3993          appeared to be required
3994
3995 2005-01-31 Borut Razem <borut.razem AT siol.net>
3996
3997         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3998           include/mcs51 and include/z80 directories to the package
3999
4000 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4001
4002         * src/hc08/gen.c (genFunction): fixed bug #1112752
4003
4004 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4005
4006         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
4007
4008 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4009
4010         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
4011
4012 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
4013
4014         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
4015
4016 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
4017
4018         * device/include/c8051fxxx.h: removed these 6 files
4019         * device/include/mcs51/c8051fxxx.h: added these 11 new files
4020
4021 2005-01-26 Raphael Neider <rneider AT web.de>
4022
4023         * src/pic16/gen.c (genAssign): fixed assignment from longs
4024           in codespace (were cut to three bytes)
4025         * (genDummyRead): implemented (except for CODESPACE...),
4026           fixed bug #1108575
4027         * src/pic16/glue.c (emitStatistics): beautified
4028         * device/lib/pic16/libm/Makefile: added include path
4029
4030 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4031
4032         * src/z80/gen.c (aopPut): fixed bug #1103902
4033
4034 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4035
4036         * device/lib/expf.c: fixed bug #1095792
4037
4038 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
4039
4040         * device/lib/pic16/libm: added Math library sources
4041
4042 2005-01-24 Raphael Neider <rneider AT web.de>
4043
4044         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
4045           to enable upcast to pCodeOpReg2 (there is no type tag to
4046           differenciate the two and pic16_popGet2p cast into PCOR2)
4047         * src/pic16/main.c (_process_pragma): fixed another malloc bug
4048           (sizeof(sectNames) changed to sizeof(sectName))
4049           Both patches fix segfaults under MinGW.
4050
4051 2005-01-23 Raphael Neider <rneider AT web.de>
4052
4053         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
4054           Safe_[mc]?alloc()'ed variables
4055         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
4056           of (byte sized) temporaries (assign them to WREG for now)
4057         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
4058           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
4059           this might fix SIGSEGVs on MinGW...
4060         * src/SDCCopt.c (killDeadCode): restored original behaviour
4061           (volatile operands might get thrown away though)
4062
4063 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
4064
4065         * src/pic16/gen.c: fixed bug #1106975,
4066         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
4067         pointer update, INTCON is saved, global interrupts are disabled and
4068         restored after updateing TOS.
4069         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
4070         * added function attribute 'shadowregs' to take advantage of shadow
4071         registers,
4072         * added function attribute 'wparam' as an alternative to the wparam
4073         pragma,
4074         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
4075         user declares a non-ISR function as 'shadowregs',
4076         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
4077
4078 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
4079
4080         * .version: bumped version number to 2.4.8
4081         * device/lib/pic16/pics.all: list of PIC18F devices supported by
4082         pic16 port,
4083         * device/lib/pic16/libio/i2c/: I2C module support library,
4084         * device/include/pic16/i2c.h: I2C support library header,
4085         * device/lib/pic16/libc/stdio/: standard IO support sources,
4086         * (printf_small.c): printf_small() source, supports float print,
4087         * (printf_tiny.c): printf_tiny() source, does not support floats,
4088         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
4089         enable global optimizations for entire library source, other
4090         Makefiles in the source tree are also modified to reflect this,
4091         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
4092         function,
4093         * doc/sdccman.lyx: updated to reflect new changes,
4094         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
4095         sym->onStack if-case,
4096         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
4097         sbit, idata, _idata, xdata, _xdata,
4098         * added pragma library, to link an external library, (see doc),
4099         * removed command line options, --pomit-config-words, --pomit-ivt,
4100         --pleave-reset-vector,
4101         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
4102         when calling assembler to reflect memory model used, also define
4103         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
4104         reflect stack model used,
4105         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
4106         on stack return NULL,
4107
4108 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4109
4110         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
4111           of the operands is volatile. Fixes #1020220
4112
4113 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4114
4115         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
4116         * (OptimizeRegUsage): make sure that there is really no other flow where
4117           the first pCode is used
4118
4119 2005-01-22 Raphael Neider <rneider AT web.de>
4120
4121         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
4122           to fix #1106967 (pCode->seq are not set up correctly)
4123
4124 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4125
4126         * src/SDCCglue.c (glue): make sure code area is declared before the
4127         static initialization area.
4128
4129 2005-01-21 Raphael Neider <rneider AT web.de>
4130
4131         * device/lib/Makefile.in: fixed test for pic16 install dir
4132         * device/lib/pic16/*/Makefile*: modified compile flags to enable
4133           optimizations
4134         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
4135           added --optimize-goto compiler switch and pragma wparam documentation
4136         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
4137         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
4138           and PRODH closing bug #1071770 (peephole optimizer)
4139
4140 2005-01-19 Raphael Neider <rneider AT web.de>
4141
4142         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
4143           cmdLine buffers (used when calling sdcpp...) are large enough
4144           (MAX_PATH=256 truncates arguments leading to system halts when
4145           used in MinGW...)
4146         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
4147         * (genUminus): rewritten to for efficiency
4148         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
4149           used uninitialized in some cases)
4150         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
4151           copy the third byte from the int -- now assumes 0x80 (data memory)
4152         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
4153           operands (genAddLit expects the iCode's operands to swapped as
4154           well), fixed leftover bytes (crashed for short left operands)
4155         * (pic16_genMinusDec): performance improvements, removed false
4156           PIC14 emitSKPNCs
4157         * (pic16_genMinus): fixed to cope with differently sized operands
4158         * src/pic16/glue.c (pic16_glue): added new banksel optimization
4159           for --obanksel > 1
4160         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
4161         * src/pic16/graph.[ch]: implementation of directed graphs, used by
4162           new banksel optimization
4163         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
4164           analysis for temporary registers (segfaults...)
4165         * src/pic16/peeph.def: added rule
4166
4167 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
4168
4169         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
4170         which converts a float number to its ASCII representation
4171         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
4172         functions to convert the fractional and integer part of a float to ASCII,
4173         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
4174         realloc.c): added _MALLOC_SPEC to explicit place variables in data
4175         ram
4176         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
4177         _STATMEM macros,
4178         * device/include/pic16/adc.h: added GPL info,
4179         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
4180         a pCodeOp as tested operand,
4181         * (genNearPointerGet): optimized bit testing, does not use
4182         intermediate register for bit value, test directly instead with
4183         BTFSS, BTFSC, works only for single bits,
4184         * (genpic16Code): dump the name of the iCode in the asm,
4185         * src/pic16/ralloc.c (decodeOp): removed static declaration and
4186         renamed to pic16_decodeOp,
4187         * (serialRegAssign): do not allocate a temporary register for iCode
4188         sequences that test a single bit for 1/0
4189
4190 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
4191
4192         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
4193         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
4194         access stack and frame pointers. They are initially assigned to
4195         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
4196         accessing SFRs. Updated all occurences of modification of stack or
4197         frame pointer in gen.c and pcode.c,
4198         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
4199         assigning of a literal value to pointers,
4200         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
4201         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
4202         selected
4203
4204 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4205
4206         * doc/sdccman.lyx: update documentation about stack pragma, added
4207         some info for stack memory models
4208
4209 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4210
4211         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
4212
4213 2005-01-08 Raphael Neider <rneider AT web.de>
4214
4215         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
4216           udata sections to fix bug #1097823
4217
4218 2005-01-05 Raphael Neider <rneider AT web.de>
4219
4220         * src/pic16/gen.c (genGenericShift): added handling of differently
4221           sized left operand and result
4222
4223 2005-01-04 Raphael Neider <rneider AT web.de>
4224
4225         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
4226         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
4227           to hold the condition bit)
4228         * added new version of genCmp (old code available via #define)
4229         * added new version of genShiftLeft/genShiftRight in a generic
4230           way, now supports shifting by negative values
4231         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
4232           shiftCount (expected by genGenericShift)
4233         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
4234         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
4235           dump
4236         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
4237           is an invalid literal too...)
4238
4239 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
4240
4241         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
4242         from Raphael Neider,
4243         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
4244         for 8-bit literals. This fixes some literal operands which are sign
4245         extended to 16-bits ints when instruction needs only 8-bits.
4246
4247 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
4248
4249         * device/lib/logf.c: added mcs51 assembly version
4250         * device/lib/expf.c: added mcs51 assembly version
4251         * device/lib/_logexpf.c: new shared asm code for expf and logf
4252         * device/include/math.h: add defines for assembly math library
4253         * device/lib/Makefile.in: build new _logexpf.c
4254         * device/lib/libfloat.lib: use new _logexpf.c
4255
4256 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4257
4258         * src/pic/device.c
4259         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4260           device types which have less than 0x7f registers.
4261
4262 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4263
4264         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4265
4266 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4267
4268         * device/lib/printf_fast.c: only build on supported arch.
4269         * device/lib/printf_tiny.c: only build on supported arch.
4270         * device/lib/printf_fast_f.c: only build if asm float lib
4271         * device/lib/_fsget1arg.c: only build if asm float lib
4272         * device/lib/_fsget2args.c: only build if asm float lib
4273         * device/lib/_fsnormalize.c: only build if asm float lib
4274         * device/lib/_fsreturnval.c: only build if asm float lib
4275         * device/lib/_fsrshift.c: only build if asm float lib
4276         * device/lib/_fsswapargs.c: only build if asm float lib
4277         * device/include/stdio.h: don't provide print_fast,
4278           print_fast_f, print_tiny prototypes if --xstack used
4279
4280 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4281
4282         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4283         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4284           to the SOURCES
4285
4286 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4287
4288         * device/lib/printf_fast_f.c: same as printf_fast, but
4289           with floating point enabled
4290         * device/lib/printf_fast.c: minor tweaks
4291         * device/include/stdio.h: add printf_fast_f
4292
4293 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4294
4295         * src/SDCCmain.c: make --float-reent default for mcs51
4296         * device/lib/_fsadd.c: added mcs51 assembly version
4297         * device/lib/_fssub.c: added mcs51 assembly version
4298         * device/lib/_fsmul.c: added mcs51 assembly version
4299         * device/lib/_fsdiv.c: added mcs51 assembly version
4300         * device/lib/_fseq.c: added mcs51 assembly version
4301         * device/lib/_fsneq.c: added mcs51 assembly version
4302         * device/lib/_fsgt.c: added mcs51 assembly version
4303         * device/lib/_fslt.c: added mcs51 assembly version
4304         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4305         * device/lib/Makefile.in: add _fscmp to build
4306         * device/lib/libfloat.lib: add _fscmp to build
4307
4308 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4309
4310         * device/lib/_fs2slong.c: added mcs51 assembly version
4311         * device/lib/_fs2sint.c: added mcs51 assembly version
4312         * device/lib/_fs2schar.c: added mcs51 assembly version
4313         * device/lib/_fs2ulong.c: added mcs51 assembly version
4314         * device/lib/_fs2uint.c: added mcs51 assembly version
4315         * device/lib/_fs2uchar.c: added mcs51 assembly version
4316         * device/lib/_slong2fs.c: added mcs51 assembly version
4317         * device/lib/_sint2fs.c: added mcs51 assembly version
4318         * device/lib/_schar2fs.c: added mcs51 assembly version
4319         * device/lib/_ulong2fs.c: added mcs51 assembly version
4320         * device/lib/_uint2fs.c: added mcs51 assembly version
4321         * device/lib/_uchar2fs.c: added mcs51 assembly version
4322         * device/include/float.h: added #define to select asm vs c
4323
4324 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4325
4326         * device/lib/printf_fast.c: improvements to float output
4327         * device/include/float.h: add defines for assembly float library
4328         * device/lib/_fsget1arg.c: receive 1 float arg
4329         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4330         * device/lib/_fsnormalize.c: normalize a float
4331         * device/lib/_fsreturnval.c: return float, various helper routines
4332         * device/lib/_fsrshift.c: right shift a float's mantissa
4333         * device/lib/_fsswapargs.c: swap 2 floats
4334         * device/lib/Makefile.in: build these 6 new files for mcs51
4335         * device/lib/libfloat.lib: add these 6 files to the library
4336
4337 2004-12-26 Borut Razem <borut.razem AT siol.net>
4338
4339         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4340           built by gcc 3.4.2
4341
4342 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4343
4344         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4345           and fully reentrant and register bank neutral.
4346         * device/lib/printf_fast.c: added float (not enabled by default),
4347           added compact/slower integer (also not enabled by default),
4348           improved size/speed of fast integer code, other minor changes
4349         * device/include/stdio.h, device/lib/Makefile.in,
4350           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4351
4352 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4353
4354         * src/pic16/pcode.c: declaring variables other than at the start of a
4355           block is not supported in C by VC6.
4356
4357 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4358
4359         * applied a previous patch from Raphael Neider that wasn't included
4360         in the previous commits, which fixes infinite loops within jumptable
4361         improvements,
4362         * made some fixes that previous patches introduced
4363
4364 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4365
4366         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4367         that fixes an issue with AOP_PCODE asmop's offset,
4368         * (pic16_popCopyReg): update instance field too,
4369         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4370         function of pic port,
4371         * (genCmp, genAnd, genAssign),
4372         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4373
4374 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4375
4376         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4377         variables initial values to idata section,
4378         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4379         variables in some functions. This utilizes parmBytes field of iCode
4380         structure to hold the offset of the variable in stack. (might be
4381         able to use the stack field too?)
4382         * applied patch from Raphael Neider # ### , # ###
4383         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4384         variable initial values in idata section,
4385         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4386         for static variables with initial value
4387         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4388         applied fix in while loop from Raphael Neider.
4389
4390 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4391
4392         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4393         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4394         * src/ds390/ralloc.c (serialRegAssign): spill bits
4395         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4396         * support/Util/SDCCerr.c,
4397         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4398         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4399         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4400
4401 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4402
4403         * device/include/sdcc-lib.h: inserted LGPL, added includes
4404           asm/ds390/features.h and asm/mcs51/features.h
4405         * device/include/asm/default/features.h,
4406         * device/include/asm/gbz80/features.h,
4407         * device/include/asm/z80/features.h: added empty _AUTOMEM
4408           and _STATMEM
4409         * device/include/asm/ds390/features.h,
4410         * device/include/asm/mcs51/features.h: added files with defines for
4411           _AUTOMEM and _STATMEM indicating automatic and static storage class
4412         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4413         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4414         * src/SDCCicode.c (geniCodeCast),
4415         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4416         * src/SDCCloop.c (loopInduction): removed unused variable lr
4417         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4418           to convertToFcall to include char modulo (RFE 1065037), added check
4419           if left operand is unsigned and use abs of literal value
4420         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4421           as it doesn't work after conversion from peephole.def to peephole.rul
4422         * src/mcs51/gen.c (toBoolean): added check for size,
4423           (genModOneByte): optimized code for signed char modulo a literal
4424           power of 2 (thanks to Hubert Sack),
4425           (genRRC): removed unnecessary "clr c",
4426           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4427         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4428           jump optimization,
4429           swapped rules 256.c and 256.d,
4430           extended 256.d by using new multiple checks (thanks Erik),
4431           added rules 256.e and 256.f,
4432           updated rule 261.a and 261.b to new generated code
4433         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4434
4435 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4436
4437         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4438           induction related bugs, including first part of bug #1074377
4439
4440 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4441
4442         * applied patch from bug-report #1076292,
4443         * applied patches for genAnd and Goto-optimizations for Raphael
4444         Neider,
4445         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4446         dump a less iCode information,
4447         * src/pic16/device.h (pic16_options_t): added field debgen,
4448         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4449         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4450         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4451         puclic,
4452         * (various functions): added macros FENTRY and FENTRY2 to functions,
4453         to emit function prologue,
4454         * (various functions): fixed indentation,
4455         * (genNearPointerGet): fixed loading of FSR0,
4456         * (genPackBits): applied patch from Raphael Neider to fix updating
4457         of FSR0 and touching only the modified bits,
4458         * src/pic16/genarith.c (various functions): added macros FENTRY to
4459         emit function prologue in comments,
4460         * src/pic16/pcode.h: added functions debugf2, debugf3,
4461         * src/pic16/ralloc.c: partial fix for packForPush caused
4462         segmentation fault,
4463
4464 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4465
4466         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4467           <stsp AT users.sourceforge.net> with reversed byte order
4468         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4469
4470 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4471
4472         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4473           bug #1074377
4474         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4475         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4476
4477 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4478
4479         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4480
4481 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4482
4483         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4484           conditions,
4485           (setFromConditionArgs): friendly operand parser for peephole rules,
4486           (operandBaseName, operandsNotRelated): new peephole condition
4487           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4488           architecture specific register naming into account, handles n-way
4489           comparisons, and supports quoted literals
4490         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4491
4492 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4493
4494         * src/mcs51/peeph.def: fixed bug #1076940
4495
4496 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4497
4498         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4499
4500 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4501
4502         Adding support for replacing ljmps with sjmps in jumptables
4503         generated for switch statements. For now you need to set the
4504         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4505         Now 4 algorithms for mcs51 jumptable generation are used:
4506         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4507         addresses loaded pc-relative for up to 112 cases and stack-pushing
4508         target addresses loaded with offset from dptr for up to 256 cases.
4509
4510         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4511         * src/mcs51/main.c: adapted constants for switch table generation
4512         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4513
4514 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4515
4516         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4517         * support/regression/tests/bug1057979.c: added test for bug 1073386
4518
4519 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4520
4521         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4522         compilers
4523
4524 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4525
4526         * src/pic16/device.h,
4527         * src/pic16/genarith.c,
4528         * src/pic16/glue.c,
4529         * src/pic16/main.c,
4530         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4531
4532 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4533
4534         Large cummulative patch for pic16 port.
4535         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4536         to call when a stack overflow occurs,
4537         * (malloc.h): added CVS Id tag,
4538         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4539         variable,
4540         * added libc directory. The current version of LibC contains string
4541         functions, ctype functions and macros and some functions of the
4542         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4543         be extensively tested in the future. Standard disclaimer here.
4544         Library is not automatically build yet. But one can build it by
4545         invoking 'make' inside the libc directory.
4546         * added ADC library under libio. Preliminary version yet.
4547
4548         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4549         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4550         aopForRemat() now and not by pic16_aopOp(),
4551         * (pic16_popGetTempReg): removed warning messgae when allocating
4552         temporary registers, its a buggy feature and will be removed,
4553         * (pic16_popGet): set register instance field in AOP_CRY,
4554         * (pic16_outBitC): fixed for results in size greater than 1,
4555         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4556         * (pic16_storeForReturn): optimized return of 0,
4557         * (genCmp): experimental code for new genCmp which uses PIC18's
4558         special compare&skip instructions. Initial tests fail some times
4559         with variables grater than 1 byte in size, so new code is disabled,
4560         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4561         a single bit,
4562         * (genCast): began a fix to optimize the casting of a bit to another
4563         bit, now assigning a bitfield to another bitfield will fail, sorry,
4564         * src/pic16/main.c: disabled the use of lr-support feature,
4565         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4566         * added some function prototypes, added function _debugf prototype,
4567         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4568         bits with offset (case PO_GPR_BIT),
4569         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4570         command line,
4571         * (isBankInstruction): modified to return 0 for no banking instruction,
4572         and 1 for banking instruction,
4573         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4574         caused stop processing pCodes after a inline assembly block,
4575         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4576         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4577         registers when it shouldn't,
4578         * src/pic16/ralloc.c (allocReg): add preliminary support for
4579         supporting a limited set of temporary registers,
4580
4581 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4582
4583         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4584           genDataPointerSet): ensure assignments always copy in MSB to LSB
4585           order,
4586           (loadRegFromAop): recognize CLRH optimization,
4587           (genFunction): optimize RECEIVE iCodes in reentrant functions
4588
4589 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4590
4591         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4592           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4593           selected.
4594         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4595         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4596           contiguous with data
4597
4598 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4599
4600         * device/lib/_gptrget.c (_gptrget),
4601         * device/lib/_gptrgetc.c (_gptrgetc),
4602         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4603           instead of sjmp to ret
4604         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4605           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4606
4607 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4608
4609         * .version: bumped version to 2.4.7
4610         * device/lib/_gptrget.c (_gptrget): is now _naked
4611         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4612         * device/lib/_gptrput.c (_gptrput): is now _naked
4613         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4614           (createFunction): fixed xstack
4615         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4616         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4617           or bit either,
4618           (geniCodeCritical): store original interrupt state in an iTemp bit
4619           var unless stack-auto
4620         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4621         * src/SDCCmain.c (setIncludePath): added include/target to search path
4622         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4623         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4624           prototype,
4625           (processFuncArgs): put bit vars in bit area
4626         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4627           unsaveRBank): fixed xstack,
4628           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4629           (genFunction, genEndFunction): fixed xstack,
4630           (genAssign): optimization don't walk backwards through mem
4631         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4632         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4633         * support/regression/Makefile: also make library (for stack-auto) when
4634           making "all" and added "test-mcs51-xstack-auto"
4635         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4636         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4637         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4638         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4639         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4640           make-library by MAKE_LIBRARY
4641         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4642           regression tests for xstack
4643         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4644         * support/regression/tests/critical.c: test for critical on mcs51
4645
4646 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4647
4648         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4649           built version of sdcc instead of installed version
4650
4651 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4652
4653         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4654         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4655           vprintf.c now
4656         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4657         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4658           WARNING: remove device/lib/build/z80/printf.o by hand when
4659           updating from previous build!
4660         * device/lib/z80/printf.c: updated comment
4661         * support/regression/tests/bug1057979.c: test all ports now
4662         * support/regression/tests/bug1065458.c: file added
4663
4664 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4665
4666         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4667           *_start and *_end symbols for static functions
4668
4669 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4670
4671         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4672           and search crt0.o in all library paths,
4673           (setIncludePath): proper handling of --nostdinc,
4674           (setLibPath): proper handling of --nostdlib
4675         * support/regression/Makefile,
4676         * support/regression/ports/ds390/spec.mk,
4677         * support/regression/ports/gbz80/spec.mk,
4678         * support/regression/ports/hc08/spec.mk,
4679         * support/regression/ports/mcs51/spec.mk,
4680         * support/regression/ports/mcs51-large/spec.mk,
4681         * support/regression/ports/mcs51-stack-auto/spec.mk,
4682         * support/regression/ports/z80/spec.mk: use include and lib files from
4683           built version of sdcc instead of installed version
4684         * doc/sdccman.lyx: fixed typo in --nostdinc
4685
4686 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4687
4688         * src/pic/pcode.c,
4689         * src/pic/device.c,
4690         * src/pic/ralloc.c,
4691         * src/pic/gen.c : added support to generate code for struct bit fields.
4692
4693 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4694
4695         * as/xa51/xa_version.h,
4696         * device/include/errno.h,
4697         * device/include/regc515c.h,
4698         * device/lib/_itoa.c,
4699         * device/lib/_ltoa.c,
4700         * device/lib/ser_ir_cts_rts.c,
4701         * sim/ucsim/xa.src/glob.cc,
4702         * sim/ucsim/xa.src/inst_gen.cc,
4703         * sim/ucsim/xa.src/xa_bit.cc,
4704         * sim/ucsim/xa.src/xa_sfr.cc,
4705         * sim/ucsim/z80.src/inst_dd.cc,
4706         * sim/ucsim/z80.src/inst_fdcb.cc,
4707         * support/scripts/keil2sdcc.pl,
4708         * src/pic16/pic16.dsp,
4709         * src/pic16/pic16a.dsp: corrected cvs line endings
4710         * device/lib/printf_large.c: fixed bug 1057979
4711         * src/pic16/gen.c: fixed non-C standard code
4712         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4713         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4714         * support/regression/ports/mcs51/support.c: reload T1 asap
4715         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4716           pdata use and clear idata startup behaviour
4717         * support/regression/tests/bug1057979.c: added
4718
4719 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4720
4721         * device/examples/ds390/ow390/ad26.h,
4722         * device/examples/ds390/ow390/cnt1d.h,
4723         * device/examples/ds390/ow390/crcutil.c,
4724         * device/examples/ds390/ow390/ownet.h,
4725         * device/examples/ds390/ow390/owsesu.c,
4726         * device/examples/ds390/ow390/swt12.h,
4727         * device/examples/ds390/ow390/swtoper.c,
4728         * device/examples/ds390/ow390/temp10.h,
4729         * device/examples/ds390/ow390/thermodl.c,
4730         * device/examples/ds390/tinitalk/tinitalk.dsp,
4731         * device/examples/ds390/tinitalk/tinitalk.dsw,
4732         * device/examples/mcs51/clock/hw.h,
4733         * device/examples/mcs51/simple2/go.bat,
4734         * device/examples/serialcomm/windows/serial.h,
4735         * device/examples/xa51/dummy.c,
4736         * device/examples/xa51/hello.c,
4737         * device/include/80c51xa.h,
4738         * device/include/at89x051.h: corrected cvs line endings
4739
4740 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4741
4742         * src/pic16/main.c (options): added command line --gstack, to trace
4743         stack over/under flows,
4744         * added pragma 'wparam' to allow passing first byte of function
4745         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4746         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4747         call to __gstack_test function and sets up the symbol as extern,
4748         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4749         * popaop): added call to pic16_testStackOverflow,
4750         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4751         wparamList list,
4752         * (genCall, genPcall): now all parameters are passed via stack
4753         except in functions that are pass to wparam pragma in which WREG is
4754         used too,
4755         * (genPcall): REENTRANT flag is checked to see if variable prototype
4756         contains reentrant keyword, don't call a non-reentrant function, via
4757         a reentrant function pointer or vice versa, functions are never
4758         passed via WREG,
4759         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4760         D.Winkler,
4761         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4762         SIGSEGV when accessing a NULL register stucture,
4763         * (pic16_printGPointerType): modified to handle UPPER modifier for
4764         function initializers, changed prototype of function to simpler one,
4765         * (pic16_printIvalFuncPtr): check to see if function is already
4766         added in externs list,
4767         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4768         optimized a move from W to SFR with a move to the same register
4769         later after a CALL,
4770         * device/lib/pic16/debug: NEW directory, contains debug features
4771         which are enabled when linking with libdebug.lib, currently command
4772         line option --gstack enables stack pointer tracing for over/under
4773         flow, corresponding sources are in debug/gstack
4774
4775 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4776
4777         * doc/sdccman.lyx: updated SDCC version,
4778         * (PIC16 port): update list of command line options,
4779         * src/pic16/device.h (structure pic16_options_t): added field gstack
4780         to enable stack overflow tracing on push/pops,
4781         * src/pic16/device.c (statistics structure): added statistics
4782         structure,
4783         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4784         pic16_dump_int_registers): increase statistics counters for each
4785         * variable which is encountered
4786         * (pic16_dump_usection): emit each .udata variable to its own udata
4787         section,
4788         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4789         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4790         parameters via stack, otherwise use old scheme,
4791         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4792         assembler output file,
4793         * src/pic16/main.c: added command line options --gstack to enable
4794         push/pop tracing for stack overflow,
4795         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4796         instructions): added size of each instruction,
4797         * (pic16_countInstruction): estimate size of instructions in
4798         the_pFile list, inline assembly blocks are not counted,
4799         * (pic16_FixRegisterBanking): trace previous register usage, when
4800         banksel optimizations is greater than 0, don't emit a redudant
4801         banksel directive,
4802
4803 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4804
4805         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4806         * src/pic16/ralloc.c : applied same fix for pic16.
4807         * src/pic/gen.c : tidied it up a little.
4808
4809 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4810
4811         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4812         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4813
4814 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4815
4816         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4817
4818 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4819
4820         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4821         non-reentrant function __modsint in the interrupt function (thus
4822         corrupting math operations during serial I/O)
4823         * device/lib/ser_ir.c: as above, changed buffersize
4824         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4825         256.c,d for zeroing
4826         * doc/Makefile: added option -t for rsync
4827
4828 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4829
4830         * src/SDCCast.h (struct ast),
4831         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4832
4833 2004-10-20 Borut Razem <borut.razem AT siol.net>
4834
4835         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4836         package
4837
4838 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4839
4840         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4841         makefile targets,
4842         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4843         support functions to replace long sequences of MOVFF's from access
4844         bank registers to stack and vice versa,
4845         * src/pic16/device.h: added new field opt_flags, where optimization
4846         flags can be set to enable certain features,
4847         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4848         * pBlock, (genFunction, genEndFunction): surroung loop for
4849         saving/loading used registers in stack with PC_INFO pCodes,
4850         INF_LREGS. Code in between can then be optimized by pCode optimizer
4851         to support function calls,
4852         * (genDataPointerSet): fixed bug which loaded float fields in
4853         structures with corrupt data,
4854         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4855         in a standard way debug info on stderr. Feature used for developing
4856         and debugging only,
4857         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4858         obsolete chunks of code,
4859         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4860         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4861         * pic16/src/pcode.c (pic16_newpCodeInfo,
4862         * (pic16_newpCodeOpLocalRegs),
4863         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4864         feature,
4865         * (pic16_pCodeConstString): printing of the initial value of a
4866         symbol as a comment is inhibited since parsing was already done by
4867         copyStr and output is corrupt,
4868         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4869
4870 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4871
4872         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4873
4874 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4875
4876         * as/mcs51/lkarea.c: removed old K&R style,
4877           (lnksect): changed check on boundary error,
4878           (lnksect2): changed check on boundary error,
4879           (lnksect2): extend XSTK to end of page if size = 1
4880         * as/mcs51/lkmain.c: removed old K&R style,
4881           (Areas51): create l_IRAM symbol
4882         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4883         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4884           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4885         * device/lib/_mullong.c: added version to be compiled with xstack
4886         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4887         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4888         * device/lib/mcs51/crtxstack.asm: fixed comment
4889         * src/SDCCglue.c: maxInterrupts defaults to 0,
4890           (emitMaps): added pdata,
4891           (createInterruptVect): (re)moved default,
4892           (glue): added pdata,
4893           (glue): moved __start__xstack to XSTK with default size 1
4894         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4895           and options.float_rent when options.stackAuto is set,
4896           (linkEdit): only write XDATA_NAME if provided on command line
4897         * src/SDCCmem.h,
4898         * src/SDCCmem.c: added pdata
4899         * src/port.h: added pdata_name to PORT
4900         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4901           (saveRegisters, unsaveRegisters): removed usage of B,
4902           (genMinus): fixed accumulator clash,
4903           (genJumpTab): added comment, this needs another look
4904         * src/mcs51/gen.c: added check for "B in use" paranoia,
4905           added pushB() and popB()
4906         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4907           chance
4908         * src/avr/main.c,
4909         * src/ds390/main.c,
4910         * src/hc08/main.c,
4911         * src/mcs51/main.c,
4912         * src/pic/main.c,
4913         * src/pic16/main.c,
4914         * src/xa51/main.c,
4915         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4916           added PSEG (PAG,XDATA) or NULL to port specifier
4917         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4918         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4919           (_mcs51_genInitStartup): removed __start__xstack equ,
4920           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4921         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4922         * src/z80/gen.c (_rleAppend): fixed warnings
4923         * support/regression/tests/zeropad.c: added pdata test
4924         * .version: bumped to 2.4.6
4925
4926 2004-10-17 Borut Razem <borut.razem AT siol.net>
4927
4928         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4929         as a part of nightly build
4930
4931 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4932
4933         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4934         WREG holds the first byte function parameters,
4935         * (aopForSym): take special case for symbols which are in FARSPACE
4936         but in CODESPACE too,
4937         * (assignResultValue): modified to take into account _G.useWreg,
4938         * (genCall): don't use wreg for parameter passing when function is
4939         declared as reentrant, too, added optimization INCF to stack
4940         pointer when stack parameter count is 1,
4941         * (genFunction, genEndFunction): refurnished and fixed to not using
4942         wreg for passing parameters when function has varargs or is
4943         reentrant, fixed bug with symbol name compare for generating
4944         functions in absolute address,
4945         * (pic16_storeForReturn): refurnished,
4946         * (genCmp): began writing a new version of the function, not ready
4947         yet, therefore it is disabled,
4948         * (genAssign): do not read code memory when assigning a function to
4949         a pointer function,
4950         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4951         array of characters, not pointer,
4952         * (pic16initialComments): in debug mode emit an .ident directive for
4953         the assembler,
4954         * (_process_pragma): emit a new warning type (internal to pic16)
4955         when setting stack to default length, emit a similar warning when
4956         placing a function at absolute address and address is not word aligned
4957         * (_pic16_parseOptions): added 'return TRUE' statement,
4958         * (_pic16_linkEdit): if compiling a source, then add the source's
4959         file object, first in the list of objects to link,
4960
4961 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4962
4963         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4964         * src/pic/main.c : removed VC warning.
4965         * src/pic/gen.c : changed comment.
4966
4967 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4968
4969         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4970         reference to a deprecated symbol _GPTRREG was causing failure to
4971         link. Thanks G. M. Gallant for the info.
4972
4973 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4974
4975         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4976         comments for Bugs item #954788.
4977
4978 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4979
4980         * src/pic16/device.c (pic16_dump_gsection,
4981         * pic16_groupRegistersInSection): handle symbols declared to be in
4982         access bank differently,
4983         * src/pic16/gen.c (struct _G): added field resDirect,
4984         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4985         send values read from stack directly to result and don't allocate
4986         temporary values,
4987         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4988         same registers,
4989         * (pic16_sameRegsOfs): NEW,
4990         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4991         free because they were not allocated from temporary pool,
4992         * pic16_popRegFromString): workaround to fix a problem with
4993         allocating variables twice or never,
4994         * (genGenPointerGet): using PRODL instead of FSR0H,
4995         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4996         instead of FSR0H,
4997         * (genAssign): take advantage of the _G.resDirect flag,
4998         * (genCast): around line 11844, use mov2f instead of directly
4999         MOVFF'ing between operands to account for literal values,
5000         * src/pic16/genutils.c: some new debug functions for gpsim have been
5001         added,
5002         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
5003         float with integer part only,
5004         * src/pic16/main.c (_process_pragma): handle pragma udata access to
5005         place variables in access bank
5006         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
5007         updated sources to reflect recent changes in gen.c
5008
5009 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
5010
5011         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
5012         sources that searched for headers in installation path, now the
5013         device/include/pic16 is used,
5014         * src/pic16/glue.c (pic16glue),
5015         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
5016         .line directives if not in debug mode, this suppresses assembler's
5017         warnings for ignored directives
5018
5019 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
5020
5021         * src/port.h: made reset_regparms prototype void parameter explicit.
5022         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
5023         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
5024         * doc/sdccman.lyx: documented warning disabling and how to use
5025           printf_large to make it print floats.
5026         * device/include/stdbool.h: NEW
5027         * device/lib/_atof.c,
5028         * device/lib/_divuint.c,
5029         * device/lib/_divulong.c,
5030         * device/lib/expf.c,
5031         * device/lib/printf_large.c,
5032         * device/lib/sincosf.c,
5033         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
5034         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
5035           a completely reentrant lib.
5036
5037 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
5038
5039         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
5040         * device/include/pic16/stdio.h: fixed bug with colon
5041
5042 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
5043
5044         * device/include/pic16/stdio.h,
5045         * device/include/pic16/stdlib.h,
5046         * device/include/pic16/math.h: NEW
5047         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
5048         declared as _naked to reduce overhead
5049         * device/lib/Makefile.in (target port-specific-objects-pic16):
5050         changed * to *.* so to ignore the CVS directory,
5051         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
5052         stacked variables back in stack,
5053         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
5054         corruption
5055
5056 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
5057
5058         * .version: bumped version number to 2.4.5
5059         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
5060         * support/Util/SDCCerr.c (messages structure): added entry for
5061         W_POSSBUG2
5062
5063         Large cumulative patch for pic16 port and libraries.
5064         * device/include/pic16/sdcc-lib.h,
5065         * device/include/pic16/stdarg.h,
5066         * device/include/asm/pic16/features.h,
5067         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
5068         * device/include/pic16/float.h: changes reentrant keyword with
5069         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
5070         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
5071         updated target build-libraries to include objects from gptr,
5072         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
5073         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
5074         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
5075         all function headings,
5076         * src/SDCCmain.c: added global parameter userIncDirsSet,
5077         * (parseCmdLine): when option -I is encountered add directory to
5078         userIncDirsSet too,
5079         * src/version.awk: added space between control and long,
5080         * src/pic16/NOTES: added some notes for the port,
5081         * src/pic16/gen.c: added prototype for mov2fp function,
5082         * (fReturnpic16[]): properly named return value registers,
5083         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
5084         * (aopForSym): added code to handle symbols with onStack flag set,
5085         symbols onStack are allocated PTRSIZE bytes,
5086         * (aopFreeAsmop): handles special case where asmops are stack objects,
5087         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
5088         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
5089         added argument lock to trace flaws in allocating temporary registers
5090         when developing port,
5091         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
5092         * (pic16_popRegFromString): reenabled allocating a direct register
5093         from string,
5094         * (assignResultValue): various beautifications,
5095         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
5096         referenced function argument,
5097         * (genIpush): reenabled to allow stacked arguments, handles only
5098         ic->parmPush iCodes,
5099         * (genCall, genPcall): major changes to allow for variable argument
5100         functions, fixed a bug with falsely restoring stack pointer after
5101         returning from call,
5102         * (genFunction): pending code for critical function,
5103         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
5104         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
5105         * (genNearPointerGet): fixed bug with indirect reading, was always
5106         reading from INDF0
5107         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
5108         pointers,
5109         * (genAddrOf): rewrote code to take address of a stacked function parameter
5110         * (genCast): fixed casting to generic pointer type,
5111         * src/pic16/gen.h: added AOP_STA,
5112         * (struct asmop): added field stk,
5113         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
5114         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
5115         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
5116         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
5117         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
5118         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
5119         generic pointers,
5120         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
5121         and library paths,
5122         * (pic16_port structure): generic pointer size is set to 3,
5123         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
5124         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
5125         compiler warning,
5126         * src/pic16/ralloc.c (allocReg): prevent allocating register when
5127         operand is an iTemp,
5128
5129 2004-09-24 Martin Helmling <mh AT octo-soft.de>
5130
5131         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
5132         * debugger/mcs51/simi.c: addapt new syntax of s51
5133
5134 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
5135
5136         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
5137         * src/pic16/pcode.c: commented out some calls to free() in order to
5138         fix bug #989576,
5139
5140 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5141
5142         * src/SDCCicode.h,
5143         * src/SDCCicode.c (isiCodeInFunctionCall),
5144         * src/avr/ralloc.c (selectSpil),
5145         * src/pic/ralloc.c (selectSpil),
5146         * src/pic16/ralloc.c (selectSpil),
5147         * src/ds390/ralloc.c (selectSpil),
5148         * src/hc08/ralloc.c (selectSpil),
5149         * src/xa51/ralloc.c (selectSpil),
5150         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
5151         stack in the middle of a function call sequence (fixes bug #1020268)
5152         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
5153         costs associated with the minimum switch case.
5154
5155 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5156
5157         * src/SDCC.lex: fixed bug #1030549
5158
5159 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5160
5161         * src/SDCCcse.h (struct cseDef),
5162         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
5163         over a function call if the CSE is derived from a symbol whose
5164         address has been taken (fixes bug #1029883)
5165         * support/regression/tests/bug-1029883: a new regression test for
5166         this bug
5167
5168 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5169
5170         * src/hc08/gen.c (emitinline): fixed bug #1029778
5171         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
5172         to a cast object is no longer a syntax error ("fixes" bug #1030006,
5173         and starts toward RFE #905167)
5174
5175 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
5176
5177         * src/pic16/gen.c (mov2f): New function to move an operand to
5178         another without considering if it is a literal or a register,
5179         * (pic16_sameRegs): don't check if they are both AOP_REG,
5180         * (AccRsh): removed andmask=0 lines,
5181         * (genLeftShift): duplicated to be improved in future versions,
5182         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
5183         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
5184         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
5185         * (pic16initMnemonics): added initialization for POC_INFSNZW,
5186         * (insertBankSwitch): fixed inserting banksel directives algorithm
5187         for instructions that follow a skip instruction, this fixes a report
5188         for broken subtraction code generation,
5189         * src/pic16/ralloc.c (deassignLRs): do not free register if current
5190         iCode is a left op, just in case result and right share the same
5191         registers
5192
5193 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5194
5195         * src/hc08/main.c,
5196         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
5197         preservation of HX
5198         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
5199         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
5200         on 2004-09-12; it was buggy
5201
5202 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
5203
5204         * src/SDCCsymt.h: removed RESULT_CHECK
5205         * src/SDCCast.c,
5206         * src/SDCCglue.c,
5207         * src/SDCCval.c,
5208         * src/pic/glue.c,
5209         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
5210
5211 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
5212
5213         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
5214         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
5215         configuration values no more rejected by compiler, they are assigned
5216         to configuration registers with a warning message instead,
5217         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
5218         the for-loop so last conf register is emitted too,
5219         * (_pic16_initPaths): link library libsdcc.lib by default,
5220         * (_hasNativeMulFor): modified test for multiplication according to
5221         Raphael Neider's remarks. Integer multiplication is also done with
5222         support functions,
5223         * device/include/pic16/pic18fregs.h: corrected type error in while
5224         testing and including 18f6720 header file
5225
5226 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
5227
5228         * src/pic16/device.h (pic16_options): removed field use_crt,
5229         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
5230         until an optimization to handle single bits is added,
5231         * (pic16_loadFSR0): moved before genUnpackBits,
5232         * (genAnd): some white lines removed,
5233         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
5234         leave_reset flags in pic16_options when using crt modules,
5235
5236 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
5237
5238         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
5239           for bugs 898889 & 979599. Also used some safer print instructions.
5240
5241 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
5242
5243         * src/pic16/device.h (pic16_options_t): added field use_crt,
5244         crt_name, no_crt,
5245         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
5246         catch a probable future bug,
5247         * src/pic16/gen.c: aopIdx function commented out,
5248         * (genAssign): commented out old code which used aopIdx,
5249         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
5250         code, added if conditionals to take into account the --use-crt
5251         command line options,
5252         * src/pic16/main.c (pic16_optionsTable): added new command line
5253         options, --use-crt= and --no-crt,
5254         * (_pic16_linkEdit): now the proper crt object is added in the
5255         linker command line except than when --no-crt is specified,
5256         * src/pic16/pcode.c,
5257         * src/pic16/pcode.h: added some structures and functions for a new
5258         optimization scheme to compansate for instruction overhead between
5259         same iCodes, this scheme is currently under development and is not
5260         working in any way,
5261         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5262         to && operator,
5263         * device/lib/pic16/startup/crt0i.c,
5264         * device/lib/pic16/startup/crt0iz.c: added global char variable
5265         __uflags to force the generation of an idata section
5266
5267 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5268
5269         * doc/Makefile,
5270         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5271         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5272
5273 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5274
5275         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5276         Frieder) and clarified the default code optimization mode
5277
5278 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5279
5280         * src/SDCC.lex (doPragma, process_pragma),
5281         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5282         "opt_code_size", and "opt_code_balanced"
5283         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5284         regrouped options by category, added support for category headers
5285         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5286         and "--opt-code-size"
5287         * doc/sdccman.lyx: documented these new options and pragmas
5288         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5289         preference into account
5290
5291 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5292
5293         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5294           geniCodePreDec): Fixed bug 904237 by generating a warning
5295         * src/SDCCerr.h,
5296         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5297
5298 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5299
5300         * src/pic/device.c : When no max ram set validate full memory range.
5301         * src/pic/pcode.c,
5302         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5303
5304 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5305
5306         * device/lib/_gptrget.c,
5307         * device/lib/_gptrput.c: updated comment
5308         * device/lib/calloc.c,
5309         * device/lib/free.c,
5310         * device/lib/malloc.c,
5311         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5312         * src/SDCCcse.c (cseBBlock),
5313         * src/SDCCicode.c (printOperand, geniCodeArray),
5314         * src/SDCCicode.h (struct operand): fixed bug 868103
5315         * support/regression/tests/bug-868103.c: added
5316         * src/SDCCast.c (searchLitOp),
5317         * src/SDCCcse.h (struct cseDef),
5318         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5319         * src/SDCCicode.h (struct operand),
5320         * src/SDCCsymt.h (struct sym_link),
5321         * src/avr/gen.c (hasInc),
5322         * src/ds390/gen.c (hasInc),
5323         * src/hc08/gen.c (genPlusIncr, hasInc),
5324         * src/mcs51/gen.c (hasInc),
5325         * src/pic16/glue.c (pic16_printIvalChar),
5326         * src/pic16/ralloc.c (regWithIdx),
5327         * src/xa51/gen.c (hasInc) : removed warnings
5328         * src/SDCCast.c (createBlock): added comment ???
5329         * src/hc08/ralloc.c: updated comments
5330
5331 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5332
5333         * doc/sdccman.lyx: updated section on switch statements, added
5334         section about semaphore locking
5335         * doc/Makefile: added option -info for latex2html
5336         * device/lib/_gptrget.c,
5337         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5338
5339 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5340
5341         * src/pic/device.h,
5342         * src/pic/device.c,
5343         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5344          maxram is less than 0x100.
5345
5346 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5347
5348         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5349
5350 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5351
5352         * src/port.h,
5353         * src/mcs51/main.c,
5354         * src/ds390/main.c,
5355         * src/z80/main.c,
5356         * src/hc08/main.c,
5357         * src/pic/main.c,
5358         * src/pic16/main.c,
5359         * src/avr/main.c,
5360         * src/xa51/main.c
5361         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5362         a jump table is the best form for a switch statement, including
5363         automatic insertion of missing cases to make the case range
5364         continuous. Developed in collaboration with Frieder Ferlemann.
5365
5366 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5367
5368         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5369         accumulator result if it needs sign extension
5370
5371 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5372
5373         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5374
5375 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5376
5377         * device/lib/gbz80/printf.c,
5378         * device/lib/z80/printf.c: removed define for NULL
5379
5380 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5381
5382         * as/xa51/xa_link.c,
5383         * device/examples/ds390/ow390/ad26.c,
5384         * device/examples/ds390/ow390/cnt1d.c,
5385         * device/examples/ds390/ow390/counter.c,
5386         * device/examples/ds390/ow390/ds2480.h,
5387         * device/examples/ds390/ow390/ds2480ut.c,
5388         * device/examples/ds390/ow390/findtype.c,
5389         * device/examples/ds390/ow390/gethumd.c,
5390         * device/examples/ds390/ow390/owllu.c,
5391         * device/examples/ds390/ow390/ownetu.c,
5392         * device/examples/ds390/ow390/swt12.c,
5393         * device/examples/ds390/ow390/swtloop.c,
5394         * device/examples/ds390/ow390/temp.c,
5395         * device/examples/ds390/ow390/temp10.c,
5396         * device/examples/ds390/ow390/thermo21.c,
5397         * device/examples/ds390/ow390/tinilnk.c,
5398         * device/examples/ds390/ow390/tstfind.c,
5399         * device/examples/serialcomm/windows/serial.cpp,
5400         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5401         * device/include/reg51.h: fixed line endings for cvs
5402
5403 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5404
5405         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5406         packRegsForAccUse, packRegisters): new accumulator register
5407         packing algorithm
5408         * support/regression/ports/hc08/support.c (_putchar): suppress
5409         warning of unused variable
5410         * src/SDCCicode.c: added SWAP entry to codeTable
5411
5412 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5413
5414         * device/lib/sprintf.c: forgot to add this file before previous commit
5415
5416 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5417
5418         * src/pic16/gen.c (genPackBits): added operand right in function
5419         parameters, load result directly if p_type is POINTER (that is
5420         called by genNearPointerSet)
5421         * (genUnPackBits): added operand left in function parameters,
5422         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5423         FSR0 if accessing bitfields,
5424
5425 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5426
5427         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5428           _print_format; updated printf, sprintf, vsprintf
5429         * device/include/asm/default/features.h: corrected comment/define
5430         * device/lib/Makefile.in: added sprintf.c
5431         * device/lib/libsdcc.lib: added sprintf module
5432         * device/lib/printf_large.c,
5433         * device/lib/vprintf.c,
5434         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5435           into these 3 files
5436         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5437         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5438         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5439           hc08 test
5440         * support/regression/tests/zeropad.c: define idata as data for hc08
5441
5442 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5443
5444         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5445         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5446         labels are referenced at least once (even if a reference is not found)
5447         * src/hc08/gen.c (emitcode): set isComment flag for comments
5448         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5449         loads), rules 6a..6b (optimize jumps to return)
5450
5451 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5452
5453         * device/lib/acosf.c (acosf),
5454         * device/lib/asinf.c (asinf),
5455         * device/lib/atanf.c (atanf),
5456         * device/lib/ceilf.c (ceilf),
5457         * device/lib/cosf.c (cosf),
5458         * device/lib/coshf.c (coshf),
5459         * device/lib/cotf.c (cotf),
5460         * device/lib/fabsf.c (fabsf),
5461         * device/lib/floorf.c (floorf),
5462         * device/lib/log10f.c (log10f),
5463         * device/lib/logf.c (logf),
5464         * device/lib/sinf.c (sinf),
5465         * device/lib/sinhf.c (sinhf),
5466         * device/lib/sqrtf.c (sqrtf),
5467         * device/lib/tanf.c (tanf),
5468         * device/lib/tanhf.c (tanhf),
5469         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5470         replaced all instances of "reentrant" in the library functions
5471         defined in math.h with this macro.
5472         * support/regression/tests/float_trans.c: reenabled test for hc08
5473
5474 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5475
5476         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5477         erroneously deleted
5478
5479 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5480
5481         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5482         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5483         multi-byte volatile operands are used
5484         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5485         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5486         initialization to area GSINIT0 so that it would always precede
5487         any static initializers in GSINIT
5488         * support/regression/tests/zeropad.c: fixed idata define for hc08
5489         * support/regression/tests/bug-927659.c,
5490         * support/regression/tests/float_trans.c: disabled tests for hc08
5491         pending missing library routines
5492         * .version: increased version number to 2.4.4 - hc08 port now passes
5493         regression tests
5494
5495
5496 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5497
5498         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5499         * Makefile.common.in,
5500         * as/Makefile,
5501         * as/hc08/Makefile.in,
5502         * as/mcs51/Makefile.in,
5503         * as/z80/Makefile.in,
5504         * debugger/mcs51/Makefile.in,
5505         * device/include/Makefile.in,
5506         * device/lib/Makefile.in,
5507         * doc/Makefile,
5508         * link/Makefile,
5509         * link/z80/Makefile.in,
5510         * packihx/Makefile.in,
5511         * sim/ucsim/main_in.mk,
5512         * sim/ucsim/avr.src/Makefile.in,
5513         * sim/ucsim/doc/Makefile.in,
5514         * sim/ucsim/gui.src/serio.src/Makefile.in,
5515         * sim/ucsim/hc08.src/Makefile.in,
5516         * sim/ucsim/s51.src/Makefile.in,
5517         * sim/ucsim/xa.src/Makefile.in,
5518         * sim/ucsim/z80.src/Makefile.in,
5519         * src/Makefile.in,
5520         * support/cpp2/Makefile.in,
5521         * support/librarian/Makefile,
5522         * support/makebin/Makefile: added DESTDIR to the install path proposed
5523         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5524         * doc/sdccman.lyx: added DESTDIR documentation
5525
5526 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5527
5528         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5529         instruction for interrupt handlers, use fast returns when returning
5530         from high priority interrupts
5531
5532 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5533
5534         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5535         code generation
5536         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5537         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5538         bugs, ported much of Bernhard's code from mcs51
5539         * src/mcs51/gen.c (genSend),
5540         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5541         than one when calling a reentrant function
5542         * device/lib/_mullong.c: defined an alternate struct layout for big
5543         endian ports (hc08)
5544
5545 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5546
5547         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5548         test
5549
5550 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5551
5552         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5553         are sane and complete before asking the port its prefered parameter
5554         passing method (fixes bug #1017633)
5555         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5556         and _ret3
5557
5558 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5559
5560         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5561         problem in bitfields >= 8 bits.
5562
5563 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5564
5565         * src/SDCCsymt.c: undid changes that were not meant to be committed
5566
5567 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5568
5569         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5570
5571 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5572
5573         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5574           copied and wrong bit got inverted
5575
5576 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5577
5578         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5579         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5580         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5581         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5582         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5583         assignments to bitfields at known addresses
5584         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5585         reads from bitfields at known addresses
5586         * src/hc08/ralloc.c (packRegisters),
5587         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5588         genhc08Code): optimize pointer get values used as conditionals
5589         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5590         and branch
5591
5592 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5593
5594         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5595         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5596         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5597         as conditionals
5598
5599 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5600
5601         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5602
5603 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5604
5605         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5606         related problems
5607
5608 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5609
5610         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5611
5612 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5613
5614         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5615         mcs51 port
5616
5617 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5618
5619         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5620
5621 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5622
5623         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5624         cases use more compact code.
5625
5626 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5627
5628         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5629
5630 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5631
5632         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5633
5634 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5635
5636         * src/SDCCsymt.h,
5637         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5638         parameter of changePointer() from symbol* to sym_link*
5639         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5640         * src/SDCCsymt.c (compareType): void* type is castable to other
5641         pointers, but not necesarily an exact match.
5642         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5643         is no longer blindly treated as an exact match.
5644         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5645
5646 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5647
5648         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5649
5650 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5651
5652         * src/pic/gen.c,
5653         * src/pic/pcode.c,
5654         * src/pic/ralloc.h,
5655         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5656
5657 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5658
5659         * src/pic/device.c,
5660         * src/pic/device.h,
5661         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5662
5663 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5664
5665         * src/mcs51/gen.c (emitcode): fixed bug #992819
5666
5667 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5668
5669         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5670           there's no need to make it worse
5671
5672 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5673
5674         * src/mcs51/ralloc.c (deassignLR),
5675         * src/ds390/ralloc.c (deassignLR),
5676         * src/hc08/ralloc.c (deassignLR),
5677         * src/z80/ralloc.c (deassignLR),
5678         * src/pic/ralloc.c (deassignLR),
5679         * src/pic16/ralloc.c (deassignLR),
5680         * src/avr/ralloc.c (deassignLR),
5681         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5682         rlivePoint): fixed another part of bug #971834
5683
5684 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5685
5686         * src/z80/main.c: enabled "critical" keyword
5687         * src/z80/mappings.i,
5688         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5689         functions (fixes bug #979646)
5690         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5691
5692 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5693
5694         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5695           such as c:\mydir.
5696
5697 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5698
5699         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5700           doesn't disable too much optimizations
5701
5702 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5703
5704         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5705
5706 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5707
5708         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5709
5710 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5711
5712         * src/pic/gen.c tidied up tabs
5713         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5714         * src/pic/main.c tidied up tabs
5715         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5716         * src/pic/pcoderegs.c tidied up tabs
5717         * src/pic/ralloc.c tidied up tabs
5718
5719 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5720
5721         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5722         to S_FIXED for pic16 port and when symbol is not in level 0,
5723         allocate for S_REGISTER storage class and pic16 port, too,
5724         * src/pic16/device.h: prototype for checkSym,
5725         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5726         * (pic16_assignConfigWordValue): test the value and the mask to
5727         validate that the value is suitable for the configuration word,
5728         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5729         collect extern declared symbols, don't emit symbol twice, check
5730         first if symbol is in publics set first,
5731         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5732         * added command line '--fstack' which enables an experimental
5733         feature for stack access, too buggy to be used yet...
5734         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5735         * (pic16_allocDirReg): when register has storage class S_REGISTER
5736         allocate in pic16_dynAccessRegs,
5737         * device/include/pic16/pic18f????.h: modified configuration word
5738         naming convention, words started as CONFIG0H but should be CONFIG1H
5739
5740 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5741
5742         * device/include/mcs51reg.h: fixed bug 970993
5743
5744 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5745
5746         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5747         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5748         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5749         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5750         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5751         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5752           error/warning numbers,
5753           added function setWarningDisabled()
5754         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5755         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5756           _memcmp.c _memmove.c calloc.c realloc.c free.c
5757         * support/regression/tests/malloc.c: added tests for new functionality
5758         * support/regression/tests/zeropad.c: added tests for truncated initializers
5759           and initialized char arrays starting with '\x0'
5760         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5761
5762 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5763
5764         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5765
5766 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5767
5768         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5769         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5770         peephole 177.e. Thanks to anonymous
5771
5772 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5773
5774         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5775         function isn't used in the source but referenced as a
5776         variable initializer then declare it as extern in .asm file
5777
5778 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5779
5780         * .version: increased version number to 2.4.3
5781
5782         Adding version extension according to ChangeLog CVS revision
5783         * src/Makefile.in (target all): added dependency 'version.h'
5784         * (rule version.h): added rule to create version.h from ChangeLog,
5785         * (rule dep): added dependency version.h,
5786         * src/version.awk: AWK script to create version.h
5787         * src/SDCCdwarf2.c (dwWriteModule),
5788         * src/SDCCglue.c (initialComments),
5789         * src/SDCCmain.c (printVersionInfo): modified to write after
5790         version string the version extension number,
5791         * src/SDCCutil.c: included "version.h"
5792         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5793         number,
5794         * src/SDCCutil.h: added prototype for getBuildNumber
5795
5796         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5797         includeDirsSet, too,
5798         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5799         const char [] is found in function prototype...
5800
5801         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5802         moving to WREG with source is already in WREG,
5803         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5804         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5805         * (aopForSym): stack'ed symbols are partially supported, added
5806         if-clause to support symbols in FARSPACE,
5807         * (sameRegs): added test for AOP_ACC to see if registers are same,
5808         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5809         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5810         * (pic16_popRegFromString): will not allocate a new register if it
5811         doesn't find one by name, bug may have introduced...
5812         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5813         * (genIpush): revived to use pic16 port's stack,
5814         * (genAddrOf): added incomplete case for stack'ed operand,
5815         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5816         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5817         can handle multibyte operands,
5818         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5819         * (pic16initialComments): added message for MPLAB compatibility
5820         mode enabled,
5821         * src/pic16/main.h: prototype for pic16_mplab_comp,
5822         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5823         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5824         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5825         because of increased complexity of procedure,
5826         * (_process_pragma): stack pragma changed to format 'stack pos len',
5827         emit symbol '_stack_end' to conform with gplink,
5828         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5829         to search for register,
5830         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5831         PO_GPR_REGISTER,
5832         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5833         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5834         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5835         case for PO_GPR_REGISTER,
5836         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5837         dies, the new era is ahead !...
5838         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5839         pic16_dynInternalRegs,
5840         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5841         * (pic16_allocDirReg): minor optimizations and bug fixes,
5842         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5843
5844         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5845         load stack and frame pointer with address of 'stack_end' symbol
5846
5847 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5848
5849         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5850         without source code but only variable initializers
5851
5852 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5853
5854         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5855         external are not declared as extern to reduce overhead while linking
5856
5857 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5858
5859         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5860
5861 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5862
5863         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5864           Yee Keat for the patch
5865         * src/SDCCast.c (decorateType): fixed bug #979599
5866         * src/ds390/gen.h: removed local fReturnSizeDS390
5867         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5868         * src/ds390/gen.c (genAnd, genOr, genXor),
5869         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5870
5871 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5872
5873         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5874         add relFilesSet to $3, manipulate $2 to handle linking of object
5875         files without source files in command line,
5876         * device/include/pic16 (all headers): added ID location macros,
5877         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5878         entries for ID location bytes,
5879         * (pic16_assignIdByteValue): NEW,
5880         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5881         added field dumpcalltree to pic16_options_t,
5882         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5883         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5884         emitting rFalseIfx label after check_carry label,
5885         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5886         pic16_emitDIRegs), NEW
5887         * (pic16glue): dump .calltree file when option --calltree found,
5888         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5889         * (_pic16_genAssemblerPreamble): emit ID locations after
5890         configuration registers,
5891         * (pic16_linkCmd): modifications of the link command,
5892         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5893         * (pic16_pCodeInitRegisters): don't init stack registers,
5894         * (pic16_findPrevInstruction): fixed bug,
5895         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5896         bug with immediate registers,
5897         * (buildCallTree): traces stack push and pop,
5898         * (pct2): dump also stack usage for each function,
5899         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5900         * (pic16_allocDirReg): various modifications,
5901         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5902         fixed to 1,
5903
5904 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5905
5906         * src/pic16/pcode.c: removed buggy double colon
5907
5908 2004-07-01 Borut Razem <borut.razem AT siol.net>
5909
5910         * support/scripts/sdcc.nsi: added include/pic16 to setup
5911
5912 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5913
5914         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5915         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5916         target 'clean',
5917         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5918         specific command line arguments. Also added sample lkr script
5919         for placing a variable at a specific memory bank.
5920         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5921         at a specific memory bank,
5922         * (pic16_dump_isection): fixed bug which caused string literals to
5923         be omitted when dumping idata section,
5924         * (pic16_groupRegistersInSection): added code to handle registers
5925         in specific memory banks,
5926         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5927         public, all references are renamed too,
5928         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5929         AOP_DPTR2,
5930         * (pic16_storeForReturn): added case to handle when dest is WREG,
5931         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5932         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5933         pic16_rel_udata, check to see if that register is marked as being
5934         a member of a specific memory bank,
5935         * (pic16_printIvalCharPtr): added code to add string literals either
5936         to code or the idata sections,
5937         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5938         also accept the 'udata' pragma,
5939         * src/pic16/main.h: new structure types sectName and sectSym
5940         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5941         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5942         * (pic16_findPrevInstruction): fixed, it returned nothing,
5943         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5944         instruction combinations,
5945         * (pic16_FixRegisterBanking): heavily reorganised,
5946         * (pic16_AnalyzeBanking): if generating banksel directives is
5947         disabled, then don't call FixRegisterBanking at all,
5948         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5949         completely removed,
5950         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5951
5952 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5953
5954         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5955         Phuah Yee Keat <yk.phuah AT nestac.com>
5956
5957 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5958
5959         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5960         correctly the IVT even if it is relocated to some other location
5961
5962 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5963
5964         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5965         * device/include/pic16/pic18f2220.h: NEW,
5966         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5967         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5968         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5969         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5970         nodefaultlibs, ivt_loc is the location of the interrupt vector
5971         table, and nodefaultlibs signs that default libraries should not be
5972         linked in link stage,
5973         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5974         according to --ivt-loc argument,
5975         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5976         when pragma stack is found,
5977
5978 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5979
5980         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5981         256 (range check), 257 (do while), 258.a-f (bit banging
5982         f.e. on 3-wire SPI bus)
5983
5984 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5985
5986         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5987         variables used exclusively within a loop
5988
5989 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5990
5991         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5992
5993 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5994
5995         * src/SDCClrange.c (computeClash): fixed bug #971834
5996
5997 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5998
5999         * src/mcs51/gen.c (genCmp): fixed bug #975903
6000         * src/hc08/gen.c (operandsEqu),
6001         * src/ds390/gen.c (operandsEqu),
6002         * src/z80/gen.c (operandsEqu),
6003         * src/pic/gen.c (operandsEqu),
6004         * src/pic16/gen.c (operandsEqu),
6005         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
6006         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
6007
6008 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6009
6010         * src/SDCCcse.c (cseBBlock): fixed bug #966963
6011
6012 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
6013
6014         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
6015         default case in switch statement,
6016         * glue.c (pic16_initPointer): expr is initialised via decoarteType
6017         to eliminate problem with initialisation of pointers, but problem
6018         still exists,
6019         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
6020         * (emitStaticSegment): removed various lines emitting debug info,
6021         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
6022         added processor registers for utilizing EEPROM,
6023         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
6024         configurable and set 8
6025
6026 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
6027
6028         * .version: increased version number to 2.4.2,
6029
6030         Cumulative patch for pic16 port
6031         * src/pic16/device.c: changed scheme to dump initial values for
6032         variables in idata segment, all print_idata* functions were removed,
6033         now the pic16_printIval* will be called,
6034         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
6035         * _pic16_printPointerType, pic16_printPointerType,
6036         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
6037         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
6038         NEW, similar to the respective functions in SDCCglue.c,
6039         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
6040         way, emitting hex bytes,
6041         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
6042
6043 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6044
6045         * src/avr/ralloc.c (serialRegAssign),
6046         * src/xa51/ralloc.c (serialRegAssign),
6047         * src/pic/ralloc.c (serialRegAssign),
6048         * src/pic16/ralloc.c (serialRegAssign),
6049         * src/hc08/ralloc.c (serialRegAssign),
6050         * src/z80/ralloc.c (serialRegAssign),
6051         * src/ds390/ralloc.c (serialRegAssign),
6052         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
6053
6054 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6055
6056         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
6057         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
6058
6059 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
6060
6061         Cumulative patch for pic16 port:
6062         * src/pic16/device.h (typedef PIC16_device) modified fields for
6063         defining microcontrollers,
6064         * src/pic16/device.c: added new info for all devices in Pics16 array,
6065         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
6066         to be optimised out by the pCode optimiser,
6067         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
6068         specially, bug reported by G.M. Gallant,
6069         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
6070         as force'd so that cannot be optimised out by pCode optimiser,
6071         * src/pic16/pcode.c,
6072         * src/pic16/pcodepeeph.c,
6073         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
6074         they are disabled by default, but can be enabled explicit with
6075         command argument --denable-peeps, for testing,
6076         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
6077         --pomit-ivt in COMPILE_FLAGS
6078
6079 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6080
6081         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
6082           compilation on MSVC
6083
6084 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6085
6086         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
6087
6088 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6089
6090         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
6091         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
6092
6093 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
6094
6095         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
6096         would only assign 0x300001 register.
6097
6098 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
6099
6100         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
6101         in COMPILE_FLAGS. Thanks to G. Gallant for report.
6102
6103 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6104
6105         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
6106         for ds80c400
6107         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
6108         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
6109         added peephole 254 (left shift), 255 (jump table)
6110
6111 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
6112
6113         * device/lib/Makefile.in: removed comment line with model-pic16,
6114         * (target port-specific-objects-pic16): the libraries and objects
6115         are copied to the build directory form the device/lib/pic16/bin
6116         directory
6117
6118         Cumulative patch concerning pic16 port:
6119         * library directory has been re-organized,
6120         * added support for PIC18F1220,
6121         * added headers and library sources for chips 18f1220,18f6520,
6122         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
6123
6124         * configuration registers setting has changed, now each supported
6125         device has a complete description of the registers it uses,
6126         * all initialisations are moved to idata sections, these section
6127         can be absolute or relocatable,
6128         * fixed initialisation of codespace variables,
6129         * fixed warning about PCLATU and gpsim,
6130         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
6131         * (genAssign): use table reads when assigning from variables in codespace,
6132         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
6133         char/int variables placed in codespace,
6134         * (pic16_emitConfigRegs): NEW, emits a list with configuration
6135         registers set in .asm file, no need for --pomit-config-words anymore,
6136         * (pic16glue): some 8051 legacy segments are commented out
6137         (to be removed completely),
6138         * added support for alternative assembler and linker with --asm=
6139         and --link= command line arguments,
6140         * peepholes are disabled automatically in the port, no need to
6141         specify on command line,
6142         * port supports natively char/int/long multiplication, but converts
6143         all divisions to support functions,
6144         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
6145         to the file set in variable $2,
6146         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
6147         strings in ASCII format and not in hex,
6148         * ralloc.c (serialRegAssign): added a triplet of conditional calls
6149         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
6150         allocate proper register if iCodes aren't temporary,
6151
6152 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
6153
6154         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
6155
6156 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
6157
6158         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
6159         is commented out
6160
6161 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6162
6163         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
6164         computed address is reused
6165         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
6166         multi-byte bitfields
6167
6168 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6169
6170         * src/z80/gen.c: (genArrayInit): must check for pointers too
6171
6172 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6173
6174         * support/regression/tests/zeropad.c: never meant to commit the
6175           nestedstruct test: removed, added check for GCC version
6176
6177 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
6178
6179         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
6180         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
6181         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
6182           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
6183           bugs 928906 and 954082 half-empty initializers
6184         * src/SDCCsymt.h,
6185         * src/SDCCsymt.c (getAllocSize): added for above fix
6186         * src/z80/gen.c (genArrayInit): fixed bug 741044
6187         * support/regression/tests/zeropad.c: added tests
6188
6189 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
6190
6191         * src/pic16/device.c (pic16_dump_section): corrected bug which
6192         caused some symbols of the libraries to be misplaced
6193
6194 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6195
6196         * src/pic16/glue.c,
6197         * src/pic16/ralloc.h,
6198         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
6199         to fix conflict with pic port
6200
6201 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6202
6203         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
6204         externs configuration variables,
6205         * src/pic16/ralloc.h,
6206         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
6207         prototype in header, commented out some debug messages
6208
6209 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
6210
6211         * src/pic16/glue.c,
6212         * src/pic16/main.c,
6213         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
6214         for gpasm COFF object generation. Thanks to D. Hawkins for
6215         his patch info
6216
6217 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6218
6219         * src/ds390/main.c,
6220         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
6221         Brock for spotting this)
6222         * src/ds390/gen.c (genEndFunction),
6223         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
6224         interrupt handler and critical. Disable push/pop optimizations when
6225         peephole optimizations disabled.
6226
6227 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6228
6229         Updated pic16 library sources and headers.
6230         * device/lib/pic16/pic18f*/ ,
6231         * device/include/pic16/*.h: modified to handle structured SFR
6232         definitions
6233
6234 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6235
6236         * src/port.h (PORT structure): added hook initPaths, now each
6237         port can declare its own default search paths,
6238         which can been seen with the --print-search-dirs option,
6239         see pic16 port for example,
6240         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
6241         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
6242         * (doPrintSearchDirs): NEW, replaces in a central manner the
6243         printing of search dirs which was split in set*Paths functions,
6244         * (main): added call to port->initPaths and doPrintSearchDirs,
6245         * src/avr/main.c,
6246         * src/ds390/main.c,
6247         * src/hc08/main.c,
6248         * src/izt/i186.c,
6249         * src/izt/tlcs900h.c,
6250         * src/mcs51/main.c,
6251         * src/pic/main.c,
6252         * src/pic16/main.c: modified port structures to reflect addition of
6253         initPaths hook,
6254
6255         * src/pic16/device.c (regCompare): registers are finally sorted by name,
6256         * (pic16_dump_section): for registers in same address reserve memory once,
6257         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
6258         to no_banksel,
6259         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6260         result is greater in size than right or left,
6261         * (pic16_genUMult8X8_8): there are some cases where the result can
6262         be 16 bits size, so handle these,
6263         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6264         * (pic16_outBitC): modified to emit pcodes,
6265         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6266         or not,
6267         * (genDivOneByte): implemented algorithm to divide 8-bits,
6268         * (genCmp): uncommented goto, but issues still exist,
6269         * (genAnd): fixed a bug with variables >8bits,
6270         * (genPackBits): optimization added that uses BCF/BSF to change a
6271         single bit,
6272         * (genAssign): fixed bug when assigning floating point literals,
6273         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6274         __sdcc_gsinit_startup label,
6275         * src/pic16/main.c (_pic16_init): removed search directory
6276         initialisations,
6277         * (_pic16_initPaths): NEW, used to initialise search directories,
6278         * (_hasNativeMulFor): support functions for all except char/int
6279         multiplication, and char division,
6280         * (PIC16_port struct): modified entry for native mul support,
6281         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6282         no_banksel option,
6283         * (buildCallTree): call to register_usage is ifdef'ed out,
6284
6285 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6286
6287         * device/include/string.h: applied Stas Sergeev's patch to make this
6288         header file compatible with the preprocessor -Wundef option
6289         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6290         failure (fixes bug #941458)
6291
6292 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6293
6294         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6295         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6296         that the variable, not the function, should be static
6297         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6298         to be consistent with non-literal case
6299
6300 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6301
6302         * src/SDCCast.c (isConformingBody): fixed bug #949967
6303         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6304         convilong): fixed bug #952086
6305
6306 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6307
6308         * src/SDCCmem.c (allocVariables): fixed bug #955321
6309
6310 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6311
6312         * src/hc08/main.c (_hc08_genAssemblerEnd),
6313         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6314         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6315         completely eliminated the use of a temporary file
6316         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6317         when more than one file linked
6318         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6319
6320 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6321
6322         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6323         which fixes bug #543481
6324         * support/regression/tests/bug-751703.c: fixed comments left from a
6325         cut and paste error
6326         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6327         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6328         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6329         scopes
6330         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6331         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6332         are now changed to underscores in moduleName
6333
6334 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6335
6336         * as/mcs51/lkmem.c: better fix for bug #954173
6337
6338 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6339         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6340
6341         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6342         * device/include/c8051f000.h,
6343         * device/include/c8051f120.h,
6344         * device/include/c8051f300.h,
6345         * device/include/c8051f310.h,
6346         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6347         PWM16) and detab'ed
6348
6349 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6350
6351         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6352         and mailing lists, doc'ed --no-peep-comments, removed reference
6353         to knoppix (newest version has no LyX/LaTeX), other minor changes
6354         * src/SDCCglue.c (glue): save 2 bytes stack space with
6355         option --main-return. The ljmp could probably be avoided too
6356
6357 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6358
6359         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6360
6361 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6362
6363         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6364         * src/SDCCopt.c (isLocalWithoutDef),
6365         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6366         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6367         (credit to Maarten Brock for patch #949363, on which this is based)
6368         * support/regression/tests/bug-751703.c: some test cases of extern used
6369         within inner scopes.
6370
6371 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6372
6373         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6374         SPEC_STRUCT
6375         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6376         struct definitions
6377         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6378         dwWriteLabel): fix to create valid debugger symbols even when
6379         the module name has non-alphanumeric symbols in it
6380         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6381         when a variable's allocation has been optimized away
6382
6383
6384 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6385
6386         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6387         * src/hc08/main.c,
6388         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6389         * src/mcs51/main.c,
6390         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6391         * src/ds390/main.c,
6392         * src/z80/gen.c (z80_emitDebuggerSymbol),
6393         * src/z80/main.c,
6394         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6395         * src/pic/main.c,
6396         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6397         * src/pic16/main.c,
6398         * src/avr/gen.c (avr_emitDebuggerSymbol),
6399         * src/avr/main.c,
6400         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6401         * src/xa51/main.c,
6402         * src/SDCCdebug.c (emitDebuggerSymbol),
6403         * src/SDCCdebug.h,
6404         * src/port.h: added a debugger struct to the port struct. Added a
6405         callback for defining debugger symbols
6406
6407         * src/SDCCast.c (createLabel),
6408         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6409         with isitmp = 1
6410         * src/SDCCicode.h,
6411         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6412         iCode back to the ast for the function
6413
6414         * src/hc08/ralloc.c (hc08_assignRegisters),
6415         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6416         unneeded fields from the regs struct.
6417         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6418         pushReg() & pullReg() functions instead of emitcode()
6419
6420         * src/hc08/gen.c (genLabel, genhc08Code),
6421         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6422
6423         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6424         debugger hooks
6425
6426         * src/hc08/gen.c (genEndFunction, genhc08Code),
6427         * src/hc08/gen.h,
6428         * src/mcs51/gen.c (genEndFunction, gen51Code),
6429         * src/mcs51/gen.h,
6430         * src/ds390/gen.c (genEndFunction, gen390Code),
6431         * src/ds390/gen.h,
6432         * src/z80/gen.c (genEndFunction, genZ80Code),
6433         * src/z80/gen.h,
6434         * src/z80/z80.h,
6435         * src/pic/gen.c (genEndFunction, genpic14Code),
6436         * src/pic/gen.h,
6437         * src/pic16/gen.c (genEndFunction, genpic16Code),
6438         * src/pic16/gen.h,
6439         * src/avr/gen.c (genEndFunction, genAVRCode),
6440         * src/avr/gen.h,
6441         * src/xa51/gen.c (genEndFunction, genXA51Code),
6442         * src/xa51/gen.h,
6443         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6444         specific code to cdbFile.c and out of the backend code generators
6445
6446         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6447         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6448         starting address is now 0
6449
6450         * as/hc08/asm.h,
6451         * as/hc08/m08pst.c,
6452         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6453         assembler directive for DWARF support
6454         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6455
6456         * src/src.dsp,
6457         * src/Makefile.in,
6458         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6459
6460 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6461
6462         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6463         and inappropriate peephole optimization in jump tables
6464
6465 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6466
6467         * as/hc08/m08pst.c,
6468         * src/SDCCglue.c: sdccopt works for the hc08 port now
6469
6470 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6471
6472         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6473
6474 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6475
6476         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6477
6478 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6479
6480         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6481         rules
6482         * src/SDCCmain.c,
6483         * src/SDCCglobl.h,
6484         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6485         comments from the peephole optimizer replacement rules
6486         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6487         symbols
6488         * src/SDCCcse.c (updateSpillLocation),
6489         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6490         equivalents
6491         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6492         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6493         objects far pointers
6494
6495 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6496
6497         * src/SDCCsymt.h: a missing part of my last change
6498         * src/pic/ralloc.c (regTypeNum),
6499         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6500
6501 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6502
6503         * src/SDCCicode.h,
6504         * src/SDCCicode.c (aggrToPtrDclType),
6505         * src/SDCCptropt.h,
6506         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6507         ptrPseudoSymConvert),
6508         * src/pic/ralloc.c (regTypeNum),
6509         * src/pic16/ralloc.c (regTypeNum),
6510         * src/hc08/ralloc.c (regTypeNum),
6511         * src/ds390/ralloc.c (regTypeNum),
6512         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6513         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6514
6515 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6516
6517         * link/z80/lkmain.c (afile),
6518         * as/hc08/lkmain.c (afile),
6519         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6520         prevent a pointer problem when a filename has no directory and
6521         no extension specified.
6522
6523 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6524
6525         * link/z80/lkmain.c (afile): allow periods in directory names
6526         * link/z80/lkmain.c (afile),
6527         * as/mcs51/lkmain.c (afile),
6528         * as/hc08/lkmain.c (afile): allow linker script file to have an
6529         extension other than ".lnk"
6530         * link/z80/lklex.c (getfid),
6531         * link/z80/lkmain.c (parse),
6532         * as/mcs51/lklex.c (getfid),
6533         * as/mcs51/lkmain.c (parse),
6534         * as/hc08/lklex.c (getfid),
6535         * as/hc08/lkmain.c (parse): Support comments in the linker script
6536         file on lines by themselves and after filenames
6537
6538 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6539
6540         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6541
6542 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6543
6544         * src/z80/peeph-z80.def: removed some peephole rules that don't
6545         work with multibyte arithmetic (fixed bug #937126)
6546         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6547         to registers and not global variables
6548         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6549         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6550         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6551         checking for assignments not internally generated (fixed bug #931895)
6552         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6553         structure member (fixed bug #930072)
6554
6555 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6556
6557         * src/SDCCmain.c (linkEdit),
6558         * src/hc08/main.c (_hc08_parseOptions),
6559         * as/hc08/Makefile.in,
6560         * as/hc08/aslink.h,
6561         * as/hc08/asm.h,
6562         * as/hc08/m08pst.c,
6563         * as/hc08/lkrloc.c (relr, rele),
6564         * as/hc08/lkarea.c (lnkarea)
6565         * as/hc08/lkmain.c (afile, parse),
6566         * as/hc08/lkelf.c: support for ELF output
6567         * as/hc08/lks19.c (s19),
6568         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6569
6570 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6571
6572         * as/mcs51/lkihx.c: Fixed bug #899105.
6573
6574 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6575
6576         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6577         .dsp files from Unix to DOS.
6578
6579 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6580
6581         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6582         function pointers; we have been compliant for several months now.
6583         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6584         change that was accidently commented out
6585         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6586         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6587         bug #922319
6588
6589 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6590
6591         * src/hc08/gen.c: output of all of the internal debugging information
6592         is now controlled by the D() macro; it is disabled by default
6593
6594 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6595
6596         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6597         harder to keep the same registers during a CAST iCode
6598         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6599         long via int can be done in a single cast, if the signedness is
6600         correct.
6601         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6602         putchar() in tinibios.c in ds390's library
6603
6604 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6605
6606         * src/SDCCast.c (decorateType): fixed bug #898889,
6607         cast result of a literal complement too
6608         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6609         fixed check for bitfields
6610
6611 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6612
6613         * src/SDCCicode.c (geniCodeLogic): made it static,
6614         (geniCodeLogicAndOr): added in order to fix bug #905492,
6615         (ast2iCode): fixed bug #905492
6616         * support/regression/tests/bug-905492.c: added
6617         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6618         (processParms): fixed bug #927659: don't copy parms, this will clear
6619         decorated flag
6620         * support/regression/tests/bug-927659.c: added
6621
6622 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6623
6624         * src/SDCCast.c (addCast): don't cast float to char
6625         * device/lib/libsdcc.lib: added _memmove
6626
6627 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6628
6629         * device/lib/large/Makefile: fixed parallel execution by
6630         replacing `make` by `$(MAKE)`
6631
6632 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6633
6634         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6635         offsets (fixes bug #923936)
6636
6637 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6638
6639         * device/lib/small/Makefile: fixed parallel execution by
6640         replacing `make` by `$(MAKE)`
6641
6642 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6643
6644         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6645
6646 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6647
6648         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6649         * src/regression/Makefile: Regression test was not running.
6650
6651 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6652
6653         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6654         complement if possible
6655         * src/SDCCval.c (valComplement),
6656         * src/SDCCicode.c (operandOperation): fixed complement of literal
6657         * support/regression/tests/onebyte.c (testComplement): added
6658
6659 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6660
6661         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6662         return an optimized tree; actually replace actParm with the new tree
6663         * src/SDCCast.h: added some parantheses to remove side effects
6664         * support/regression/tests/bug-920866.c
6665
6666 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6667         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6668         Bit operands were not being handled properly in the pic14 port.
6669         (now src/regression/add.c passes again).
6670
6671 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6672
6673         * src/SDCC.y (labeled_statement): case and default no longer require
6674         a following statement (RFE #893037)
6675
6676 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6677
6678         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6679         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6680         disabled (fixes bug #916294)
6681         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6682         "mov a,acc"; patch provided by Lenny Story
6683         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6684
6685 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6686
6687         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6688         functions
6689         * src/ds390/gen.c (genFunction, genEndFunction),
6690         * src/ds390/ralloc.c (ds390_assignRegisters),
6691         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6692         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6693         pushed if there are parameters passed on the stack. Also, a cleaner
6694         way to decide if r0/r1 should be pushed/popped. (Together they fix
6695         bug #918693)
6696
6697 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6698
6699         * doc/sdccman.lyx,
6700         * device/lib/mcs51/crtpagesfr.asm,
6701         * device/lib/mcs51/crtxinit.asm,
6702         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6703         to avoid confusion with Si Lab's SFRPAGE register.
6704
6705 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6706
6707         * src/SDCCglue.c (emitMaps): allow public sfr variables
6708         * src/SDCCglue.c (initialComments): include compiler build date
6709         with compiler version and put the timestamp of the generated
6710         assembly file on a serperate line to be less confusing.
6711         * src/port.h: added genInitStartup hook
6712         * src/avr/main.c,
6713         * src/ds390/main.c,
6714         * src/hc08/main.c,
6715         * src/pic/main.c,
6716         * src/pic16/main.c,
6717         * src/xa51/main.c,
6718         * src/z80/main.c: genInitStartup initialize as NULL (default to
6719         historical behaviour)
6720         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6721         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6722         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6723         library instead of hard coding it into the compiler.
6724         * support/regression/ports/mcs51-stack-auto/spec.mk,
6725         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6726         * device/lib/mcs51/Makefile,
6727         * device/lib/small/Makefile,
6728         * device/lib/large/Makefile,
6729         * device/lib/mcs51/crtpagesfr.asm,
6730         * device/lib/mcs51/crtstart.asm,
6731         * device/lib/mcs51/crtxclear.asm,
6732         * device/lib/mcs51/crtxinit.asm,
6733         * device/lib/mcs51/crtclear.asm,
6734         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6735         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6736         and into user configurable files.
6737         * device/lib/clean.mk: clean mcs51 directory too
6738         * support/regression/tests/longlit.c: added static to T1 declaration
6739         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6740         accesses in the initialization code
6741
6742 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6743
6744         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6745         OSCTRIMVAL as noted in bug #916008
6746
6747 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6748
6749         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6750         in loops with multiple exits (reported as incorrect registers
6751         used by Martin Helmling in Sdcc-user list)
6752
6753 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6754
6755         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6756         made ds390 register extensions look less like error messages
6757
6758 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6759
6760         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6761         reported by Adam Wozniak in Sdcc-user list
6762
6763 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6764
6765         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6766         arithmetic optimizations, added debug output
6767
6768 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6769
6770         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6771         * sdcc.spec: updated and split sdcc into 3 rpms
6772         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6773         needed for literals of LEFT_OP and '+'
6774         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6775         introduced RESULT_TYPE_NOPROM
6776         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6777         left shift
6778         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6779         limited promotion to int only for '*'
6780         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6781
6782 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6783
6784         * src/pic16/gen.c (genSkip),
6785         (genc16bit2lit), (gencjneshort): commented out
6786         (is_LitOp): new helper function, checks operand type
6787         (genCmpEq): rewritten
6788
6789 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6790
6791         * support/regression/tests/bug-908454.c: added
6792
6793 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6794
6795         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6796         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6797         (geniCodeCast): cosmetic, don't preserve bit storage class
6798         (geniCodeLeftShift): added promotion
6799         (geniCodeLogic): fixed regression
6800         * src/SDCCsymt.c (computeTypeOr): accept bits too
6801         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6802
6803 2004-03-07  Borut Razem <borut.razem AT siol.net>
6804
6805         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6806
6807 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6808
6809         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6810         version of pic16_genPackRegisters which does not check if ic is a
6811         CAST operator,
6812         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6813         function cause string1.c regression test fails
6814
6815 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6816
6817         * sim/ucsim/configure.in,
6818         * sim/ucsim/configure,
6819         * sim/ucsim/doc/Makefile.in: use docdir
6820         * src/SDCC.y: fixed sbit atrributes
6821         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6822         * src/SDCCast.c (decorateType): |^& need special promotion handling
6823         * src/SDCCast.h,
6824         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6825         * src/SDCCsymt.h (computeType),
6826         * src/SDCCicode.c: computeType() needs op
6827         * src/SDCCsymt.c (checkTypeSanity),
6828         * doc/sddman.lyx: "plain" bitfields are unsigned
6829         * src/SDCCsymt.c (computeTypeOr): added
6830         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6831         |^& ops
6832         * src/SDCCval.c (val*): computeType() needs op
6833         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6834         * support/regression/tests/onebyte.c: added tests for |^&
6835
6836 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6837
6838         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6839         for writing icode into asm output.
6840
6841 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6842
6843         * src/pic16/device.c: added some debug lines enabled
6844         with macro DEBUG_CHECK,
6845         * src/pic16/genarith.c: more debug in genPlus,
6846         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6847         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6848         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6849         * (aopForSym): onStack symbols are re-placed in data memspace,
6850         and onStack flag is cleared,
6851         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6852         copy temporary pcodeop,
6853         * (genPcall): added warning for not updating PCLATU,
6854         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6855         always true for pic16 port,
6856         * (genMultOneWord): NEW, supports integer multiplication,
6857         * (genMult): modified to call genMultOneWord,
6858         * (ifxForOp): added warning when return NULL,
6859         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6860         flag is set before call to operandFromSymbol for implicit
6861         added structures,
6862         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6863         options.intlong_rent are set by default,
6864         * (_hasNativeMulFor): modified to allow port generation of integer
6865         multiplication,
6866         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6867         set regtype to REG_SFR for all registers, restricting seting the
6868         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6869
6870 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6871
6872         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6873         more than 500 times in the regression tests
6874
6875 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6876
6877         * support/Util/SDCCerr.h,
6878         * support/Util/SDCCerr.c,
6879         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6880         enumerator_list),
6881         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6882         for symbol conflicts.
6883         * support/valdiags/tests/enum.c,
6884         * support/valdiags/tests/tentdecl.c,
6885         * support/valdiags/tests/struct.c: expect possible error messages
6886         referring to original symbol definitions.
6887         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6888         * src/SDCCsymt.h,
6889         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6890
6891 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6892
6893         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6894
6895 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6896
6897         * src/pic16/ralloc.c (newReg): fixed bug #908929
6898
6899 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6900
6901         * src/ds390/gen.c: added missing #include "main.h"
6902
6903 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6904
6905         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6906         checking if symbol is already in set,
6907         * src/pic16/device.h: prototype for checkAddSym,
6908         * src/pic16/gen.c: (_G): added entry interruptvector,
6909         * (assignResultValue): removed some commented out lines,
6910         * (genFunction): check for ISR via sym->type, absolute section for
6911         interrupt code is created via a new pBlock, the goto instruction is
6912         placed now correctly at the interrupt vector position, changed all
6913         references from ivec to _G.interruptvector,
6914         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6915         is the interrupt is a high priority one, same for return from ISR,
6916         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6917         externs to calls of checkAddSym,
6918         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6919         pic16_pcode_verbose flag is set,
6920         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6921         * src/pic16/pcoderegs.c: message about how many registers are saved
6922         will only be emitted if pic16_pcode_verbose flag is set,
6923
6924 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6925
6926         * src/ds390/ralloc.h,
6927         * src/ds390/ralloc.c (ds390_regWithIdx),
6928         * src/ds390/gen.c (emitcode),
6929         * src/ds390/main.h,
6930         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6931         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6932         ds390operandCompare, getRegsRead, getRegsWritten,
6933         initializeAsmLineNode): customized instruction size calculation for
6934         ds390, started basis for some register optimizations
6935         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6936         corresponding assembly output
6937         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6938         missing push/pop of r0/r1. Optimized push/pops
6939
6940 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6941
6942         * src/mcs51/main.c (instructionSize): fixed ACALL size
6943         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6944
6945 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6946
6947         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6948         the sorting of rlist with NULL elements
6949         * (print_idataType, print_idata): NEW to create idata sections
6950         * src/pic16/device.h: idataSymSet new variable
6951         * src/pic16/gen.c (genFunction): fixed some bugs in string
6952         comparing, improved the absolute section creation for ISRs,
6953         added FSR0L/FSR0H in registers that are saved in an ISR,
6954         * (genInline): fixed the processing of inline snippets,
6955         now they undergo no process by the peephole optimizer
6956         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6957         are placed in idataSymSet,
6958         * (pic16emitStaticSeg): extern symbols are added in externs,
6959         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6960         switching when aboslute variables are placed in access bank memory
6961         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6962         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6963         commented out with #if,
6964         * (pic16_packRegisters): reintroduce the check for CAST because some
6965         symbols are not correctly handled,
6966         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6967         pCodeInstruction instead of pCode,
6968         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6969         pCodeAsmDir definition,
6970         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6971         directive, then the argument directive is emitted without the leading
6972         tab, hack for inline labels which must be in the first column,
6973         * (compareLabel,pic16_findNextInstruction),
6974         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6975         * (insertBankSwitch): modified for the new pCodeAsmDir,
6976
6977 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6978         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6979
6980         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6981         instance,
6982         * (pushSide): commented out with #if,
6983         * (assignResultValue): fixed some typos in saving
6984         registers,
6985         * (genPcall): FIXED and sync'ed with genCall,
6986         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6987         * (genNearPointerGet): fixed to handle some more cases,
6988         implementation scheme via table reads,
6989         * (genConstPointerGet): modified to access code memory correct,
6990         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6991         and improved to handle some cases
6992         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6993         instead of "RETLW" for init data
6994         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6995         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6996         variables are placed in access bank memory (<0x80 and >=0xf80),
6997         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6998         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6999         TBLWT_POSTDEC,TBLWT_PREINC
7000         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
7001         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
7002         directives
7003         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
7004         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
7005         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
7006         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
7007
7008 2004-02-29  Borut Razem <borut.razem AT siol.net>
7009
7010         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
7011         support/Util/findme.h, support/Util/system.h: enhance binary relative
7012         search for lib and include by using findProgramPath()
7013
7014 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7015
7016         * src/SDCCpeeph.h,
7017         * src/SDCCpeeph.c (pcDistance),
7018         * src/port.h,
7019         * src/mcs51/ralloc.h,
7020         * src/mcs51/ralloc.c (mcs51_regWithIdx),
7021         * src/mcs51/main.h,
7022         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
7023         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7024         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
7025         size calculation port specific, started basis for some register
7026         optimizations
7027         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
7028         missing push/pop of r0/r1. Optimized push/pops
7029         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
7030         * device/lib/_modsint.c (_modsint),
7031         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
7032         and stack version so regression tests pass
7033
7034 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
7035
7036         * src/Makefile.in (dep): include SLIBOBJS in dependency check
7037         * src/SDCCast.c (decorateType): catch another small optimization
7038         with '?' operator
7039         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
7040         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
7041         modified to finally use computeType() all over SDCC,
7042         see Feature Request #877103
7043         * src/SDCCval.h: cosmetic
7044         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
7045         valCompare(); regression tested in muldiv.c
7046         * support/regression/tests/muldiv.c (testMod): mod sign follows
7047         dividend only
7048
7049 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
7050
7051         * src/SDCCast.c (decorateType): fixed bug #902362
7052         * doc/INSTALL.txt: fixed install instructions for win32
7053
7054 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
7055
7056         * device/include/Makefile.in (install): fixed by replacing spaces
7057         by tabs
7058         * doc/README.txt,
7059         * doc/INSTALL.txt: updated for release
7060         * doc/sdccman.lyx: added warning for --xstack being buggy
7061
7062 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
7063
7064         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
7065         to eliminate build warnings.
7066         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
7067
7068 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
7069            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7070
7071         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
7072         removed -penable-stack, added comment for stack pragma, added
7073         warning for not initializing the stack/frame registers, removed
7074         comment at interrupts section
7075
7076         Stack is made permanent, there is no ability to disable stack usage.
7077         * src/pic16/device.h,
7078         * src/pic16/device.c: removed all references to USE_STACK macro,
7079         * src/pic16/device.c (pic16_dump_section): when no elements in
7080         rlist, free rlist before return,
7081         * (pic16_dump_int_registers): NEW, internal registers are a new set
7082         of general purpose registers reused by each function,
7083         * (checkAddReg): returns 1 if registers is added to set,
7084         * (pic16_groupRegistersInSection): when a registers is of type
7085         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
7086         * src/pic16/device.h: memRange and Assigned Memory are deleted,
7087         SRCASECMP macro is moved here from device.c
7088         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
7089         PO_PCLATU, PO_PRODL, PO_PRODH,
7090         * (pic16_pCodeOpType, genMinus,
7091         changed compares to "a" register, with AOP_ACC,
7092         * (pic16_genPlus): fixed some bugs and indented properly,
7093         * (pic16_addSign): changed size to size+offset in the MOVWF
7094         instruction,
7095         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
7096         multiply 8-bit operand by literal, result is 8-bit,
7097         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
7098         multiply 2 8-bit operand, result is 8-bit,
7099         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
7100         genUMult8X*_16,
7101         * src/pic16/gen.c: changed accUse to contain WREG only,
7102         * (pic16_emitcomment): renamed to pic16_emitpcomment,
7103         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
7104         true, do not use immediate addressing any more unless sym is a
7105         pointer in codespace,
7106         * (aopForRemat): do not use immediate addressing when symbol not in
7107         codespace and when symbol's address is requested,
7108         * (aopOp): for-loop in if(sym->accUse) is modified for the new
7109         accUse size (= 1),
7110         * (aopGet): added case for AOP_ACC and don't return "accumulator
7111         bug" but WREG instead,
7112         * (popGetTempReg): pushes contents of temporary register in stack,
7113         * (popReleaseTempReg): pops contents of temporary register from
7114         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
7115         * (pic16_popGet): separated case AOP_ACC to return register WREG
7116         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
7117         or PO_IMMEDIATE and initializes their instance/offset appropriately,
7118         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
7119         the use of immediate pointers to certain cases only.
7120
7121         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
7122         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
7123         * (assignResultValue, genCall, genRet): modified to use the new
7124         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
7125         genPcall is still broken,
7126         * (genFunction): added code to create 'A' type pBlocks when
7127         interrupt functions are generated, code not extensively tested yet,
7128         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
7129         * (genEndFunction): modified so ISRs pop stored registers from stack,
7130         * (genMultOneByte): cleanup,
7131         * (AccRsh): added flag andmask, to and result with appropriate mask,
7132         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
7133         * (genDataPointerGet): fixed and reenabled its use,
7134         * (genNearDataPointerGet): bugs fixed,
7135         * (genDataPointerSet): bugs fixed,
7136         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
7137         pic16_DumpSymbol, pic16_DumpOp,
7138         * src/pic16/genutils.h: function prototypes for the above functions,
7139         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
7140         pointers,
7141         * (pic16emitRegularMap): many many many improvements, but needs a
7142         major cleanup,
7143         * src/pic16/main.c: enable_stack in pic16_options is removed,
7144         * (_pic16_parseOptions): removed command line options -penable-stack,
7145         * (_process_pragma): emit stack symbol only when stack pragma is
7146         processed,
7147         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
7148         redirected to FSR0L/FSR0H pair,
7149         * (pic16_get_op, pic16_get_op2): modifications and improvements,
7150         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7151         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
7152         for immediates,
7153         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
7154         * (dumpPicOptype): NEW,
7155         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
7156         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
7157         with movff instruction,
7158         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
7159         added pic16_int_regs, some packRegsFor* functions are commented out,
7160         because produce errors,
7161         * src/pic16/NOTES: minor modifications
7162
7163 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7164
7165         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
7166         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
7167         --pack-iram.
7168         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
7169         * as/mcs51/lkaomf51.c: fixed bug #895763
7170
7171 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
7172
7173         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
7174
7175 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7176
7177         * doc/sdccman.lyx: added details about the HC08 storage classes and
7178         interrupts, fixed the register usage info for z80 & gbz80
7179
7180 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
7181
7182         * doc/sdccman.lyx: added more pic16 port documentation
7183         * device/include/pic16/: added header pic18fregs.h
7184
7185 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
7186
7187         * doc/sdccman.lyx: added Vangelis' contribution
7188
7189 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7190
7191         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
7192         extend to the next CALL or PCALL, not just to the next CALL.
7193
7194 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
7195
7196         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
7197
7198 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7199
7200         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
7201         bug #895752 and a better fix for bug #716790
7202
7203 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7204
7205         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
7206
7207 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7208
7209         * doc/sdccman.lyx: minor changes, minor changed
7210
7211 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
7212
7213         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
7214         which can't handle SDCC_NEWONEBYTEOPS,
7215         (geniCodeMultiply): removed conversion from mult to shift for pic14
7216         and pic16
7217
7218 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7219
7220         * src/hc08/gen.h,
7221         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
7222         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
7223         thus fixing bug #895406
7224
7225 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
7226
7227         * device/lib/_modsint.c,
7228         * device/lib/_modslong.c: sign follows divisor only
7229         * src/hc08/gen.c (genMultOneByte): if result size is 1,
7230         signs or signedness can be ignored
7231         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
7232         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
7233         added optimization for IFX,
7234         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
7235         arguments;
7236         reenabled optimization for IFX, which was removed on 2004-01-11
7237         * src/SDCCast.h: added return type IFX
7238         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
7239         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
7240         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
7241         SDCC_OLDONEBYTEOPS selects the old behaviour
7242         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
7243         changed again and commented promotion rule
7244         * src/SDCCval.c (valDiv): promotion no longer necessary
7245         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
7246         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
7247         rewritten
7248         * support/regression/tests/onebyte.c: added
7249
7250 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
7251
7252         * gen.c (genInline): reverted to old code for assemnling inline
7253         code because of bug reported James Chadd
7254
7255 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
7256
7257         * ralloc.h: missing declarations from previous patch,
7258         seems that patch for ralloc.h was never applied, fixed
7259
7260 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7261            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7262
7263         * pcode.c,
7264         * pcode.h,
7265         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7266         indirect addressing. Marked FSR0 as deprecated
7267         * gen.c (pointerCode): commented out, not needed now
7268         (pic16_popGet2p): new MOVFF helper function
7269         (genGenPointerGet),
7270         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7271         (shiftRLong): removed duplicate debugging info
7272
7273 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7274
7275         * src/ds390/gen.c (genNearPointerGet),
7276         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7277         optimization with bits, but not bitfields.
7278         * src/ds390/ralloc.c (packRegisters),
7279         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7280
7281 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7282
7283         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7284
7285 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7286
7287         * src/SDCCsymt.h,
7288         * src/SDCCicode.c (operandFromSymbol),
7289         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7290         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7291         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7292         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7293         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7294         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7295         bug #892038
7296         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7297         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7298         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7299         * src/SDCCsymt.c (newSymbol),
7300         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7301         enumerator_list),
7302         * src/SDCCval.h,
7303         * src/SDCCval.c (newiList): fixed bug #885705
7304
7305 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7306
7307         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7308         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7309
7310 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7311
7312         * device/include/c8051f120.h,
7313         * device/include/c8051f300.h,
7314         * device/include/c8051f310.h: added/updated header files for Silicon
7315         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7316         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7317         in new section Submitting patches
7318
7319 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7320
7321         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7322         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7323         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7324         genGenPointerSet),
7325         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7326         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7327         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7328         genGenPointerSet),
7329         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7330         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7331         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7332         genGenPointerSet),
7333         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7334         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7335         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7336         genGenPointerSet): fixed bug #892400
7337         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7338         to eliminate build warnings.
7339         * src/SDCCast.c (processParms),
7340         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7341         fixed bug 751859
7342         * support/valdiag/valdiag.py: added GCC to the list of defines active
7343         when compiling with gcc
7344
7345 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7346
7347         * support/Util/SDCCerr.h,
7348         * support/Util/SDCCerr.c,
7349         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7350         with an incomplete type (fixed bug #883734)
7351         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7352
7353 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7354
7355         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7356
7357 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7358
7359         * src/SDCCast.c (decorateType),
7360         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7361         function pointer implementation
7362         * support/regression/tests/funptrs.c: added tests to verify both forms
7363         of function pointers work correctly. Added tests to verify parameters
7364         are passed in the correct order.
7365
7366 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7367
7368         * device.c (regCompare): registers are sorted by ascending
7369         address and increasing size,
7370         * main.c (_pic16_finaliseOptions): removed the declaration
7371         of compiler macro MCU. Now a macro of the format pic18fxxxx
7372         will be defined from the command line
7373
7374 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7375             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7376
7377         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7378         PCOP_RLCF was overwritten!
7379         * gen.c (genSkip): commented out calls to pic16_emitcode,
7380         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7381         * (genlshTwo),
7382         * (genRRC): added debugging info,
7383         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7384         overwritten while shifting,
7385         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7386         overwritten while shifting,
7387         * (AccLsh),
7388         * (AccRsh),
7389         * (shiftLLeftOrResult),
7390         * (shiftRLeftOrResult),
7391         * (shiftRLong),
7392         * (shiftLLong): Implemented with pic16_emitpcode
7393         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7394         * (genLeftShift): Fixed bug, operand for shift by variable always
7395         was "and"ed with 0x0f,
7396         * (genLeftShiftLiteral),
7397         * (genrshTwo),
7398         * (genRightShiftLiteral): added debugging info,
7399         * (genrshFour): added comment,
7400         * (genRightShift): determined signedness from operand "left"
7401         instead of "result"
7402
7403 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7404
7405         * src/SDCCicode.c (geniCodeParms),
7406         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7407         function pointers, fixed function pointer bugs #861242 and #861896
7408
7409 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7410
7411         * device/include/c8051f000.h,
7412         * device/include/c8051f120.h,
7413         * device/include/c8051f300.h: added header files for Silicon
7414         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7415
7416 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7417
7418         * src/SDCCast.c (processParams): added new type flow and restructured
7419         (gatherAutoInit): added new type flow
7420         (addCast): cosmetic changes
7421         (getLeftResultType): added new type flow for array indices, patch
7422         provided by Stas, see FR #877103
7423         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7424         array index patch by Stas
7425         * src/SDCCast.h: added prototype getResultTypeFromType()
7426         * src/SDCCval.h,
7427         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7428         * src/pic/glue.c (pic14emitStaticSeg),
7429         * src/pic16/glue.c (pic16emitStaticSeg),
7430         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7431         for initialization of symbols
7432         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7433         * support/Util/SDCCerr.h:
7434         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7435         * .version: bumped version number to 2.3.8
7436         * device/include/Makefile.in (install),
7437         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7438         avoid warnings
7439
7440 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7441
7442         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7443         Slade Rich fixed an optimization bug
7444         * src/pic/pcodepeep.c,
7445         * src/pic/pcoderegs.c
7446         * doc/Makefile (install): added test for directory
7447
7448 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7449
7450         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7451         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7452         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7453         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7454         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7455         * as/mcs51/asexpr.c (term),
7456         * as/hc08/asexpr.c (term): fixed bug #887146
7457
7458 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7459
7460         * src/z80/gen.c (genMult): handle single byte result product
7461         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7462         DUMMY_READ_VOLATILE (fixed bug #886367)
7463
7464 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7465
7466         * support/regression/tests/libmullong.c: fixed logic, on little endian
7467         hosts we ended without a mullong_wrapper()
7468
7469 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7470
7471         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7472         virus/worm forged address usage.
7473
7474 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7475
7476         Fixed promotion, it should be done on AST level:
7477         * src/SDCCast.c (addCast): added promotion to int
7478         (decorateType): updated call to upCast()
7479         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7480         usualUnaryConversions()
7481
7482 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7483
7484         * support/regression/tests/literalop.c (mulWrapper): Added a
7485         wrapper to remove integer overflow warnings.
7486
7487         * support/regression/tests/float_trans.c: Made work on host.
7488
7489         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7490         location of sz80.
7491
7492         * support/regression/generate-cases.py (main): Changed from inline
7493         to a main method.
7494
7495         * doc/Makefile (install): Changed to depth first to get rid of
7496         missing directory install warning.
7497
7498         * as/Makefile (install-doc): Made work on Mac.
7499
7500 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7501
7502         * src/SDCCast.c: added an additional type flow in decorateType() of
7503         opposite direction, see feature request #860006; it's enabled at runtime
7504         by setting the environment variable SDCC_NEWTYPEFLOW
7505         * src/SDCCast.h: changed prototype of decorateType()
7506         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7507         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7508         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7509         see feature request #877103
7510         * src/SDCCval.c: updated call of decorateType()
7511         (valBitwise): fixed bug #882876
7512         (valMinus): added promotion
7513         (valLogicAndOr): result is unsigned
7514         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7515         * src/SDCCsymt.c (computeType),
7516         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7517         must not cause an unsigned operation
7518         * src/pic/glue (pic14emitRegularMap),
7519         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7520
7521 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7522
7523         * src/pic/pcode.c (PCodeID): commented out left over debug code
7524
7525 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7526
7527         * support/valdiag/tests/overflow.c: added shift tests
7528         * src/pic/device.c,
7529         * src/pic/gen.c,
7530         * src/pic/gen.h,
7531         * src/pic/glue.c,
7532         * src/pic/main.c,
7533         * src/pic/pcode.c,
7534         * src/pic/pcode.h,
7535         * src/pic/pcodepeep.c,
7536         * src/pic/pcoderegs.c,
7537         * src/pic/ralloc.c,
7538         * src/pic/ralloc.h: applied patch from Slade Rich;
7539         added support for multiple code pages and multiple RAM banks on the
7540         PIC 14 port. The ASM files now no longer simply assume all the
7541         code / RAM are in the same page / bank. This means the linker can
7542         safely allocate code/RAM of separate ASM files to different pages/banks.
7543         * doc/sdccman.lyx: added Slade's tips
7544         * src/mcs51/peeph.def: fixed bug #880768
7545
7546 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7547
7548         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7549         * src/SDCCast.c (decorateType): fixed bug #880197
7550
7551 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7552
7553         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7554         getopt.h.
7555
7556         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7557         strtof is not part of C89 and isn't included with Mac OS X.
7558
7559 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7560
7561         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7562         shiftL2Left2Result): fixed bug #879326
7563         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7564         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7565         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7566         address fetch for clr instruction
7567         * device/lib/hc08/_mulint.c: created optimized assembly version
7568         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7569
7570 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7571
7572         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7573         proposed in FR #877103
7574
7575 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7576
7577         * src/SDCCval.c (cheapestVal): added missing checks
7578         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7579         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7580
7581 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7582
7583         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7584         equal operands
7585
7586 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7587
7588         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7589         loaded with the linker search paths (-L arguments) and the libraries
7590         to be linked with the current source (-l arguments). Changes
7591         currently will affect only the pic16 port.
7592         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7593         include path the port specific paths and port specific libraries,
7594         * gplink command now contains the $3 argument,
7595         * src/pic16/device.h,
7596         * src/pic16/device.c,: structure PIC_device is made public and
7597         renamed to PIC16_device, the same for variable Pics which is renamed
7598         to Pics16. Updated all references to them.
7599         * src/pic16/glue.c (pic16glue): corrected bug with code
7600         initialization which bypassed the variable initializations block.
7601
7602         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7603         COMPILE_FLAGS and added the --nostdinc option
7604
7605 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7606
7607         * device/include/mc68hc908jb8.h: Register defs for another member
7608         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7609
7610 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7611
7612         Documenting changes from previous commits.
7613         * configure.in (version 1.56),
7614         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7615         when generating output files to configure the pic16 library,
7616         but now I've commented it out, since gputils aren't installed in the
7617         SF compile farm, so library won't compile
7618
7619         * device/lib/Makefile.in (version 1.56): initially I've added in
7620         target 'all' the prerequestive 'model-pic16' so it compiled the
7621         pic16 library, but now I've commented it out for the same reasons
7622         above,
7623         * added targets 'model-pic16' and 'objects-pic16' to compile the
7624         library
7625         * added target 'port-specific-objects-pic16' to handle the
7626         generated libraries and copy them into the build/ directory
7627         * added target 'clean-intermediate-pic16' to clean intermediate
7628         files into pic16 directory
7629         * in target 'installdirs' added line to create directory pic16 in
7630         the installation path
7631
7632         * device/include/Makefile.in (version 1.11): in target 'install'
7633         added lines to copy all header files to installation path,
7634         * in target 'installdirs' added line create directory for pic16
7635         headers in the installation path
7636
7637 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7638
7639         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7640          a function call
7641
7642 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7643
7644         * configure,
7645         * device/lib/configure.in,
7646         * device/lib/configure: fixed for autoconf 2.57
7647
7648 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7649
7650         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7651         option so that it actually works. Made it specific to the z80, since
7652         the gbz80 doesn't have these kinds of I/O ports.
7653
7654 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7655
7656         * device/include/z180.h,
7657         * device/lib/_memcpy.c,
7658         * device/lib/_memmove.c,
7659         * device/lib/_mulint.c,
7660         * device/lib/ser_ir.c,
7661         * device/lib/ser_ir_cts_rts.c,
7662         * device/lib/_strcmp.c,
7663         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7664         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7665         portmode; added deprecation warning for bank= and protmode= forms.
7666         Also, guard against buffer overflow.
7667         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7668
7669 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7670
7671         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7672         changed interrupt vector table generation to only emit declared vectors.
7673         * device/include/Makefile.in: added missing backslash
7674         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7675
7676 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7677
7678         Mainly changes to support compilation of the device libraries
7679         * src/pic16/device.c: stack is allocated via symbol and not
7680         via literal number. The symbol is placed in the corresponding
7681         position of the data ram
7682         * (pic16_dump_section): relocatable and absolute uninitialized
7683         data are now emitted in sorted order to reduce section naming,
7684         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7685         weren't marked as being in the access bank,
7686
7687 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7688
7689         Added portion of GNU PIC Library under the directory
7690         device/include/pic16 and device/lib/pic16. These files
7691         contain the declarations of SFRs for the PIC18Fxx2 devices.
7692         The directory is initialized via configure from toplevel.
7693
7694 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7695
7696         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7697         the spilllocations to be compared correctly
7698
7699 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7700
7701         * src/SDCCast.c (decorateType): fixed bug introduced today
7702
7703 2004-01-12  Borut Razem <borut.razem AT siol.net>
7704
7705         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7706         doc/sdccman.lyx: upper case pragmas are deprecated
7707
7708 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7709
7710         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7711         in simpler and even better code
7712
7713 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7714
7715         * src/SDCCicode.c (operandOperation): fixed bug #874819
7716         * src/SDCCast.c (decorateType): fixed
7717         char foo (unsigned long ul) { return ul > 0; }
7718
7719 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7720
7721         * doc/sdccman.lyx: Moved and added some sections, small changes
7722         all over. Telling LaTeX to be less strict with word spacing
7723         to better keep the right margin. Changed some notes about
7724         maintainance of the ports in section 3.2.1 - is it OK like this?
7725
7726 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7727
7728         SDCC source changes:
7729         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7730         convilong): modified to inform the pic16 port that builtin functions
7731         are external
7732
7733         PIC16 PORT specific changes:
7734         * src/pic16/device.c pic16_dump_equates() added,
7735         processor registers declared internally by the port are emitted in
7736         the translation as equates,
7737         * src/pic16/gen.c: inline code is passed unprocessed to the
7738         translation,
7739         * (pic16_popGetLit2): fnuction modified to take second operand as
7740         pCodeOp pointer and not as literal,
7741         * (popRegFromIdx): prefixed with pic16_,
7742         * (pic16_popCombine2): modified to receive already allocated pCode
7743         operands,
7744         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7745         * (genFunction): initializes local stack frame and pushes on stack
7746         all the registers used by this function,
7747         * (genEndFunction): restores all registers from stack and restores
7748         stack frame,
7749         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7750         improvements,
7751         * (pic16glue): changed the program startup sequence,
7752         * added new dbName code 'A' for functions placed in absolute section
7753         * src/pic16/main.c: added function attribute _naked,
7754         * added pragma 'code' to place a fnuction at an absolute address,
7755         * added command line arguments --debug-ralloc and --pcode-verbose,
7756         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7757         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7758         * (pic16_newpCodeOpLit2): modified to take the second operand as
7759         pCodeOp pointer,
7760         * (pic16_printpBlock): modified to emit each function in a separate
7761         section,
7762         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7763         UPPER for immediate operands,
7764         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7765         instruction,
7766         * src/pic16/peeph.def: all peepholes with movff are commented out,
7767         because there is a problem in the pcode peep optimizer,
7768         * src/pic16/ralloc.c: the register allocator can now reuse local
7769         function symbols for another function. This saves register usage.
7770         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7771
7772         Added file src/pic16/NOTES with information about program writing on
7773         the current port version.
7774
7775 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7776
7777         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7778         and peephole 252 (array access)
7779
7780 2004-01-09  Borut Razem <borut.razem AT siol.net>
7781
7782         * src/SDCCmain.c : fixed #872250: -l command line defined library
7783           files are scanned before standard library files
7784
7785 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7786
7787         * src/SDCCast.c (decorateType): fixed bug #874046
7788
7789 2004-01-09  Borut Razem <borut.razem AT siol.net>
7790
7791         * support/scripts/sdcc.nsi: remove previous installation
7792
7793 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7794
7795         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7796         bytes for last interrupt vector (mcs51)
7797         * sdcc.spec: fixed typo
7798
7799 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7800
7801         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7802         gen51Code): more efficient parameter receive for --model-large
7803         ("bug" #845294)
7804
7805 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7806
7807         * src/ds390/main.c,
7808         * src/z80/main.c: added missed needLinkerScript flags (more than
7809         one port structure defined in these file)
7810         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7811         bug #795325
7812
7813 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7814
7815         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7816         * src/port.h: added flag needLinkerScript in port->linker
7817         structure to inform whether to create a .lnk file or not,
7818         * src/avr/main.c,
7819         * src/ds390/main.c,
7820         * src/hc08/main.c,
7821         * src/mcs51/main.c,
7822         * src/pic/main.c,
7823         * src/pic16/main.c,
7824         * src/xa51/main.c,
7825         * src/z80/main.c: changed appropriately to configure
7826         needLinkerScript flag
7827         * src/pic/gen.c,
7828         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7829         * src/pic/glue.c: added variable udata_section_name to
7830         override default uninitialized data segment definition for
7831         devices only with SHAREBANK memory (reported from Erik Epetrich)
7832         * (pic14emitOverlay): modified to emit a commented overlay segment
7833         directive when no overlay data exist
7834         * (picglue): modified to emit uninitialized data segment
7835         according to udata_section_name
7836         * src/pic/main.c (_pic14_parseOptions): added command line
7837         options --udata-section-name=[name] to override default
7838         udata definition name
7839         * modified _linkCmd and _asmCmd to include compiler passed
7840         arguments via -W option
7841         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7842         object file from '.rel' to '.o' in port->linker structure,
7843         changed size of fptr from 2 to 3 in port structure
7844
7845 2004-01-07  Borut Razem <borut.razem AT siol.net>
7846
7847         * support/scripts/sdcc.nsi: update PATH
7848         * support/scripts/sdcc.ico: craeted
7849
7850 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7851
7852         * device/include/Makefile.in: fix install
7853         * doc/Makefile: fix install
7854
7855 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7856
7857         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7858         in bug #860505
7859         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7860         how the function variable allocation summary is displayed; also
7861         include information about variables allocated to the overlay
7862         segment
7863
7864 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7865
7866         * as/mcs51/lkmain.c: Help about -Y option
7867         * as/mcs51/lkarea.c: Fixed gcc warnings
7868
7869 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7870
7871         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7872         fixed warning
7873         * support/valdiag/tests/overflow.c: added
7874         * src/SDCCast.c (decorateType),
7875         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7876         LEFT_OP (left shift)
7877
7878 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7879
7880         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7881         (default behaviour).
7882
7883 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7884
7885         A python script to validate compiler diagnostic messages. It can be
7886         used to verify that sdcc complains about bad c source code and
7887         gives a good location of the error.
7888         * support/valdiag/Makefile,
7889         * support/valdiag/valdiag.py,
7890         * support/valdiag/tests/*
7891
7892 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7893
7894         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7895         * src/SDCCsymt.c (newEnumType),
7896         * src/SDCCsymt.h
7897         * support/Util/SDCCerr.c,
7898         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7899         enum related bugs.
7900         * support/regression/tests/enum.c: added test for enum values that
7901         require at least 2 bytes of storage.
7902
7903 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7904
7905         * src/common.h: added ifndef/define/endif macros
7906         around the header file.
7907         Bug reported from Jesus Calvino-Fraga
7908
7909 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7910
7911         * sdcc.spec: updated
7912         * device/include/Makefile.in: don't install CVS directories
7913         * device/lib/Makefile.in: added removal of CVS directories after install
7914         * doc/Makefile: fixed install, added local_icons
7915         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7916         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7917         * src/ds390/gen.c (genRightShift): fixed bug #870788
7918         * src/SDCCast.c (decorateType): fixed bug #870781
7919
7920 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7921
7922         PIC16 port related changes:
7923         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7924         added variable stackPos,
7925
7926         * gen.c: genCall, assignResultValue: added support for
7927         pushing/retrieving function parameters to/from stack,
7928         genFunction,genEndFunction: setup stack frame for the
7929         generated function,
7930         genAddrOf: will be changed according to bug 863624
7931
7932         * added files genutils.c and genutils.h which contain gen*
7933         debugged and optimised functions extracted from gen.c
7934
7935         * glue.c: added variable 'externs' which holds extern symbols,
7936         pic16emitRegularMap: is modified to properly handle relocatable
7937          symbols under the new scheme,
7938         pic16createInterruptVect: is modified
7939         pic16printPublics: is modified to emit 'global' assembler directives,
7940         added pic16_printExterns to print extern symbols,
7941         pic16glue: initializes stack/frame pointer in the beginning of
7942         the assembly output. Temporary hack, will be corrected later,
7943         because gplink yet does not support stack and SDCC does not
7944         yet support a type of crt0.o object to create the final binary.
7945
7946         * Removed many lines that contain 8051 legacy code.
7947         * The code is finally placed under a 'code' directive.
7948         * Added port specific options.
7949
7950         * _process_pragma: simplified since now we do not need *special*
7951         include file to define SFR registers. But a separate header
7952         will be needed. This will be developed later.
7953         * _pic16_parseOptions: added, parses port specific options:
7954         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7955         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7956         --preplace-udata-with=
7957
7958         * _pic16_setDefaultOptions: modified to initialize section names,
7959         but hack is temporarly out of order since it needs improvement.
7960         * _pic16_genAssemblerPreamble: configuration words are emitted by
7961         their address instead of their name. This part is incomplete and
7962         supports only the 18Fxx2 devices. Other devices will emit an error
7963         during assembly since they do not contain the same set of config
7964         registers
7965         * _pic16_genIVT: is modified,
7966
7967         * pcode.c: added definitions for some hardware registers that are needed
7968         for stack support
7969         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7970         All PCI entries are updated. Now LFSR is supported.
7971         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7972         * added pic16_newpCodeOpLit2 to support instructions with
7973         two literal arguments
7974         * pic16_pCode2str: corrected code that emits assembler instructions
7975         with two literal operands and those that have an access bit modifier
7976         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7977         this fixes a bug which caused some labels to be lost, when an
7978         assembler directive was added, i.e. banksel,
7979         * pic16_FixRegisterBanking: improved logic that causes the insertion
7980         of bank switching,
7981         * InlineFunction: functions that are called once, are not any more
7982         inlined. This can be a port option in the future,
7983
7984         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7985
7986         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7987         hold the corresponding uninitialized symbols,
7988         * pic16_allocProcessorRegister: registers have explicit marked the
7989         accessBank field,
7990         * pic16_allocInternalRegister: registers are explicit marked as
7991         not used,
7992         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7993         processing list, so bit registers were lost,
7994         *
7995
7996         * ralloc.h: added field 'accessBank' and original symbol operand
7997         in register definition,
7998         * removed the field isMapped from register definition,
7999
8000         ** Several functions have been removed from various sources:
8001         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
8002         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
8003         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
8004         pic16_assignRelocatableRegisters
8005
8006         ** others have been introduced:
8007         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
8008         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
8009
8010 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
8011
8012         * support/scripts/inc2h.pl: changed definition of BIT_AT
8013         to emit 'sbit at' instead of 'bit at'. This was a request.
8014
8015         PIC16 port related preliminary changes:
8016         * gen.c: prefixed function popRegFromString with
8017         pic16_ and all references to it corrected
8018         * pcode.c: all pic16_pc_* hardware registers prefixed
8019         with underscore (_),
8020         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
8021         * ralloc.c: newReg(): when register is REG_SFR then
8022         set address to rIdx,
8023         pic16_allocProcessorRegister(): marks register wasUsed=0
8024         pic16_writeUsedRegs(): added a call to assign processor
8025         registers via pic16_assignFixedRegisters
8026
8027 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8028
8029         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
8030         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
8031         variables in unused register banks.  Also the SSEG is placed
8032         wherever there is enough space for it, and IDATA can be anywhere
8033         in internal RAM.  For now compile using -Wl-Y[stack_size].
8034         The mem file is different for this option as well, since it
8035         makes no sense of talking about DSEG lenght.
8036
8037 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
8038
8039         * src/SDCClrange.c: fixed bug 869095 that caused segfault
8040         in certain cases, e.g. when ROM assignment, patch provided
8041         from Albert den Haan.
8042
8043 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
8044
8045         Many signedness and type propagation fixes:
8046         * src/SDCCicode.c: made geniCodeCast() static
8047         replaced SPEC_ by IS_ (cosmetic)
8048         (operandOperation): fixed div and mod operation
8049         (usualBinaryConversions): added support for promotion of char
8050         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
8051         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
8052         (geniCodeAdd): an array index will stay unsigned, even if promoted
8053         from char to int
8054         (geniCodeArray): ditto
8055         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
8056         * src/SDCCsymt.c (computeType): added more support for char;
8057         promotion of char is selectable by promoteCharToInt, fixed signedness
8058         for all cases
8059         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8060         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8061         * src/SDCCval (val*): replaced signedness calculation by
8062         computeType()
8063         rearranged if-branches (cosmetic)
8064         (valShift): added warning W_SHIFT_CHANGED
8065         (valCompare): fixed problem with different types
8066         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
8067         * support/regression/tests/literalop.c: added many cases
8068         * support/regression/tests/ast_constant_folding.c: changed finally to
8069         'unsigned int'
8070         * .version: new year, new version: 2.3.7
8071         * src/SDCCmain.c (main): applied patch #866468
8072         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
8073         provided by Scott Bronson
8074         * doc/sdccman.lyx: updated documentation for sdcdb
8075         updated and added chapter tips
8076
8077 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8078
8079         * src/SDCCsymt.h: missing from yesterday's commits
8080
8081 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8082
8083         * src/SDCC.y (struct_or_union_specifier),
8084         * support/Util/SDCCerr.c,
8085         * support/Util/SDCCerr.h: verify that struct & union tags are used
8086         as declared.
8087
8088 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8089
8090         * src/SDCCglobl.h: missing from yesterday's commits
8091
8092 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8093
8094         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
8095         sft_attributes, struct_declaration, parameter_declaration,
8096         type_name, start_block, declaration_list),
8097         * src/SDCC.lex (check_type): support redefinition of typedef names
8098
8099 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8100
8101         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
8102         aligned xdata arrays. Erik helped me with the if clause.
8103
8104 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8105
8106         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
8107         warning
8108
8109 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8110
8111         * src/SDCCast.h,
8112         * src/SDCCast.c (newAst_),
8113         * src/SDCCicode.h,
8114         * src/SDCCicode.c (ast2iCode, newiCode),
8115         * src/SDCCglobl.h,
8116         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
8117         expr, statement, expression_statement, selection_statement,
8118         iteration_statement, expr_opt, jump_statement): foundation for tracking
8119         sequence points
8120         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
8121         point code too)
8122
8123 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8124
8125         * support/Util/SDCCerr.c,
8126         * src/SDCCast.h,
8127         * src/SDCCast.c (createCase, createDefault, decorateType),
8128         * src/SDCClabel.c (labelUnreach),
8129         * src/SDCC.y (labeled_statement, jump_statement): More improvements
8130         to error messages.
8131         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
8132         (with thanks to Stas Sergeev)
8133         * device/include/time.h,
8134         * device/lib/time.c (CheckTime): suppress unreachable code warning
8135
8136 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8137
8138         * src/SDCCast.c (createIvalCharPtr),
8139         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
8140         bug #753752)
8141         * support/regression/tests/nullstring.c: tests for these two bugs
8142
8143 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8144
8145         * support/Util/SDCCerr.h,
8146         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
8147         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
8148         about storage class and 'at' used inside struct or union
8149         * src/SDCCBBlock.c (iCodeFromeBBlock),
8150         * src/SDCCcse.c (ifxOptimize),
8151         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
8152         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
8153         printIval, emitStaticSeg, emitOverlay),
8154         * src/SDCClabel.c (deleteIfx),
8155         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
8156         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
8157         gatherAutoInit, processParms),
8158         * support/Util/SDCCerr.h,
8159         * support/Util/SDCCerr.c (werrorfl): Support for better error location
8160         reporting for post-parse errors.
8161
8162 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8163
8164         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
8165         implicit casts via union; they don't work on big endian systems
8166         (possible fix for bug #861138)
8167
8168 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8169
8170         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
8171         * src/mcs51/main.c: fixed the fix for bug #737001
8172
8173 2003-12-15  Borut Razem <borut.razem AT siol.net>
8174
8175         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
8176
8177 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8178
8179         * support/makebin/makebin.c: put output in binary mode
8180
8181 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8182
8183         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
8184         xdata and data memory on startup. Set the environment variable
8185         SDCC_NOGENRAMCLEAR to disable this.
8186         * src/mcs51/peephole.def,
8187         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
8188         (allows non-interrupt and interrupt code to safely compete for a resource
8189         without the non-interrupt code having to disable interrupts)
8190
8191 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8192
8193         * src/SDCCicode.c (geniCodeAdd),
8194         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
8195         with valFromType if type might be a pointer and host is big endian).
8196         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
8197         types, not just integer types.
8198         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
8199         multiply defined with mismatching "at" address.
8200
8201 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8202
8203         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
8204         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
8205         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
8206         with embedded nulls (fixed bug #753752)
8207
8208 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8209
8210         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
8211         Apparently this did not see much testing (endless loop)
8212
8213 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8214
8215         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
8216
8217 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8218
8219         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
8220         gracefully handle NULL memmap pointers
8221
8222 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8223
8224         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
8225         instead of deleting the iCode when an operand is volatile
8226         * src/z80/gen.c (genDummyRead),
8227         * src/mcs51/gen.c (genDummyRead),
8228         * src/ds390/gen.c (genDummyRead),
8229         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
8230         not just IC_RIGHT
8231         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
8232         * src/SDCC.y: fixed bug #850420
8233
8234 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8235
8236         Applied z80 i/o port patch from Peter Townson and fixed some operators
8237         to better handle operands in A register.
8238         * device/include/z180.h
8239         * src/SDCC.y
8240         * src/SDCCglue.c
8241         * src/z80/gen.c
8242         * src/z80/gen.h
8243         * src/z80/main.c
8244         * src/z80/peeph-z80.def
8245         * src/z80/peeph.def
8246         * src/z80/z80.h
8247
8248 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8249
8250         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
8251
8252 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8253
8254         * device/lib/hc08/_mullong.c: Removed extra #endif
8255
8256 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8257
8258         * sim/ucsim/hc08.src/inst.cc,
8259         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8260         carries from x to h
8261         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8262         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8263         * device/include/stdarg.h: fixed varargs for hc08
8264         * device/lib/Makefile.in,
8265         * device/lib/hc08/Makefile,
8266         * device/lib/hc08/_mulint.c,
8267         * device/lib/hc08/_mullong.c: fixed some endian problems
8268
8269 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8270
8271         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8272         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8273         * device/lib/_gptrget.c,
8274         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8275
8276 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8277
8278         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8279         * src/SDCCast.c (astErrors): fixed bug #846007
8280         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8281
8282 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8283
8284         * src/SDCCast.c (decorateType): disabled a transformation I added in
8285         revision 1.188 (access to fields of a structure at an absolute address);
8286         it breaks with bitfields, extern declarations, and gcse analysis.
8287         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8288         could be assigned through a pointer, so don't complain.
8289         * src/SDCCast.c (astErrors),
8290         * src/SDCCast.h,
8291         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8292
8293 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8294
8295         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8296         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8297         output of __config directives, since gpasm now supports them
8298         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8299         pre-processor macro, i.e. -DMCU=p18f452
8300         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8301         and modified to handle 'cast' icode similarly to '=' icode
8302         * src/pic16/device.h (typedef struct PIC_device): added field
8303         'extMIface' to indicate that chip has external memory interface
8304         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8305         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8306         18F8720
8307
8308 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8309
8310         * src/SDCC.y (pointer): fixed bug #846006
8311         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8312         * src/SDCCast.c (decorateType): fixed bug #846009
8313         * src/ds390/peeph.def,
8314         * src/ds390/gen.c (genAnd, genOr),
8315         * src/mcs51/peeph.def,
8316         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8317
8318 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8319
8320         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8321         * src/SDCCdflow.c
8322         * src/SDCCcse.c
8323         * src/SDCCcse.h
8324         * src/SDCCBBlock.h
8325         * src/SDCCBBlock.c
8326
8327 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8328
8329         fixed bug #845089
8330         * src/SDCCbitv.h,
8331         * src/SDCCbitv.c: added function to free a bitvector
8332         * src/SDCClrange.h,
8333         * src/SDCClrange.c: added function to recompute the liveranges
8334         * src/avr/ralloc.c,
8335         * src/ds390/ralloc.c,
8336         * src/hc08/ralloc.c,
8337         * src/mcs51/ralloc.c,
8338         * src/pic/ralloc.c,
8339         * src/pic16/ralloc.c,
8340         * src/xa51/ralloc.c,
8341         * src/z80/ralloc.c: recompute the liveranges after register packing
8342
8343 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8344
8345         * src/SDCCloop.c (newInduction): fixed bug #845630
8346
8347 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8348
8349         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8350         inadvertantly left behind from my 2003-11-12 change
8351
8352 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8353
8354         Updated headers I neglected to commit yesterday.
8355         * src/SDCClrange.h,
8356         * src/SDCCicode.h
8357
8358 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8359
8360         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8361         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8362         * src/SDCCopt.c (eBBlockFromiCode),
8363         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8364         the creation of the key hash table from the sequencing so it can be used
8365         earlier (for some GCSE bug fixes still pending)
8366
8367 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8368
8369         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8370         * support/regression/tests/addsub.c: testing genPlus shortcut
8371
8372 2003-11-15  Borut Razem <borut.razem AT siol.net>
8373
8374         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8375
8376 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8377
8378         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8379         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8380         ordering is immaterial.
8381         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8382
8383 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8384
8385         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8386         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8387         (SIGSEV) of bug #840381
8388         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8389         unlink new file before rename if new and old filenames are the same)
8390
8391 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8392
8393         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8394         uninitialized variables) for the mcs51. Set environment variable
8395         SDCC_GENRAMCLEAR to test.
8396         xdata initialization slightly shorter
8397
8398 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8399
8400         * src/SDCCsymt.h,
8401         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8402         #838241 & 780691 (basicly the same bug)
8403         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8404         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8405
8406 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8407
8408         * src/SDCCmain.c (linkEdit): "fix" #834252
8409
8410 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8411
8412         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8413         * src/SDCCast.h,
8414         * src/SDCC.y: fixed bug #819403
8415
8416 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8417
8418         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8419         the reentrant attribute.
8420         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8421         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8422         simulation
8423         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8424         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8425         erroneously reduced to a literal.
8426         * src/hc08/ralloc.c (packRegisters, rematStr),
8427         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8428         some cases
8429
8430 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8431
8432         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8433         * doc/sdccman.lyx: changed from 'article' to 'book'
8434         * doc/Makefile: readded test_suite_spec and cdbfileformat
8435
8436 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8437
8438         * device/include/stdlib.h: include malloc.h to comply with ANSI
8439         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8440
8441 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8442
8443         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8444         * doc/clean.mk: also remove *.out files
8445         * doc/sdccman.lyx: some additions, larger top/bottom margins
8446
8447 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8448
8449         * src/SDCC.y: fixed bug #837365
8450         * support/regression/tests/bitopcse.c
8451         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8452         a symbol (might be valop instead)
8453         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8454         * device/lib/clean.mk: added hc08 to the cleaning list
8455
8456 2003-11-04  Borut Razem <borut.razem AT siol.net>
8457
8458         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8459           made 2003-11-04
8460         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8461           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8462           malloc is declared in standard stdlib.h
8463
8464 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8465
8466         * device/lib/hc08/Makefile: need to clean .rel not .o files
8467         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8468
8469 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8470
8471         * src/port.h,
8472         * src/hc08/main.c,
8473         * src/mcs51/main.c,
8474         * src/ds390/main.c,
8475         * src/z80/main.c,
8476         * src/avr/main.c,
8477         * src/pic/main.c,
8478         * src/pic16/main.c,
8479         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8480         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8481         tests (which uses the port's oclsExpense function)
8482         * src/SDCC.y,
8483         * src/SDCCast.c,
8484         * src/SDCCicode.c,
8485         * src/hc08/gen.c,
8486         * src/ds390/gen.c,
8487         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8488
8489 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8490
8491         * src/SDCCcse.c (ifxOptimize),
8492         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8493         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8494         deleting the IFX iCode.
8495         * src/hc08/ralloc.c: reduced unneeded slocs
8496         * src/hc08/gen.c: fixed bug in asmopToBoolean
8497
8498 2003-11-04  Borut Razem <borut.razem AT siol.net>
8499
8500         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8501           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8502           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8503           transferred to configure
8504
8505 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8506
8507         Use headers defined in the C[++] standards:
8508         * sim/ucsim/gui.src/serio.src/fileio.cc
8509         * sim/ucsim/gui.src/serio.src/frontend.cc
8510         * sim/ucsim/gui.src/serio.src/main.cc
8511         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8512         * support/Util/NewAlloc.c
8513         * as/hc08/lklibr.c
8514         * as/mcs51/lklibr.c
8515         * as/z80/aslist.c
8516         * as/z80/assym.c
8517
8518 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8519
8520         * Added MSVC projects for hc08 assembler and linker:
8521         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8522         /as/hc08/link_hc08.dsp
8523
8524 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8525
8526         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8527
8528 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8529
8530         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8531
8532 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8533
8534         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8535
8536 2003-10-31  Borut Razem <borut.razem AT siol.net>
8537
8538         * support/cpp2/cpplib.h,
8539           support/cpp2/cpplib.c,
8540           support/cpp2/cpplex.c,
8541           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8542           to switch _asm block preprocessing on / off. Default is
8543           #pragma preproc_asm +
8544
8545 2003-10-31  Borut Razem <borut.razem AT siol.net>
8546
8547         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8548           when outputting comment blocks (when executed with -C option) and
8549           _asm (SDCPP specific) blocks
8550
8551 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8552
8553         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8554
8555 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8556
8557         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8558
8559 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8560
8561         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8562         * src/SDCCast.c (decorateType): fixed bug #832664
8563
8564 2003-10-31  Borut Razem <borut.razem AT siol.net>
8565
8566         * support/cpp2/cpplex.c: fixed for SDCPP:
8567           comments(when executed with -C option) and _asm blocks
8568           were included even if they where in skipped #if block.
8569           Applied solution from GCC cpp 3.3.2
8570
8571 2003-10-31  Borut Razem <borut.razem AT siol.net>
8572
8573         * src/SDCC.lex: sdcc now understands both formats:
8574           '# <line_number> <file_name>' and
8575           '#line <line_number> <file_name>'
8576         * support/cpp2/cppmain.c: sdcpp now generates the standard
8577           '# <line_number> <file_name>' instead of former
8578           '#line <line_number> <file_name>'
8579
8580 2003-10-30  Borut Razem <borut.razem AT siol.net>
8581
8582         * support/cpp2/cpphash.h,
8583         * support/cpp2/cpplib.h
8584         * support/cpp2/cpplex.c,
8585         * support/cpp2/cppmain.c,
8586         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8587
8588 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8589
8590         Fixed a number of problems revealed by bug #827883.
8591         * src/SDCCloop.c (loopInvariants): Spill location of the
8592         result operand should be recomputed if extracted from
8593         a loop. Also, don't extract assignments of an iTemp
8594         from a literal.
8595         * src/SDCCast.c (isConformingBody): loop reversal should
8596         not occur if the control variable is involved with a
8597         relational operator.
8598
8599 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8600
8601         * .version: bumped to 2.3.6 to reflect the big improvements
8602         made by Erik and Klaus. Thanks!
8603
8604 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8605
8606         Replaced the livrange code.
8607         * src/SDCClrange.c: added new LR code
8608         * src/SDCCloop.c,
8609         * src/SDCCBBlock.h: removed remainig parts from old LR code
8610         * src/ds390/ralloc.c,
8611         * src/ds390/gen.c: minor fixes to make it work with new code
8612
8613 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8614
8615         * as/hc08/asm.h,
8616         * as/hc08/lkrloc.c,
8617         * src/hc08/gen.c,
8618         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8619         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8620         (tweaked fix for bug #818696)
8621
8622 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8623
8624         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8625
8626 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8627
8628         * src/SDCCmain.c,
8629         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8630         * src/mcs51/gen.c (gencjneshort),
8631         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8632         more efficient (per Scott Bronson's suggestion)
8633
8634 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8635
8636         Extended the semantics of the critical keyword to include
8637         individual statements. See RFE #827755 and #799831
8638         * src/SDCC.y
8639         * src/SDCCicode.c
8640         * src/SDCCopt.c
8641         * src/SDCCast.c
8642         * support/Util/SDCCerr.c
8643         * support/Util/SDCCerr.h
8644         * src/mcs51/gen.c
8645         * src/ds390/gen.c
8646         * src/hc08/gen.c
8647
8648 2003-10-19  Borut Razem <borut.razem AT siol.net>
8649
8650         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8651
8652 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8653
8654         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8655         Fixed bug #818696
8656         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8657         and predecrement operand is displayed
8658
8659 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8660
8661         * src/SDCCval.c (valMinus): fixed bug #826041
8662
8663 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8664
8665         Some hc08 related updates that I missed earlier
8666         * sim/ucsim/stypes.h
8667         * support/regression/ports/hc08/spec.mk
8668
8669 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8670
8671         New target "hc08" for the Motorola 68hc08 family of micros
8672
8673         * configure
8674         * configure.in
8675         * Makefile
8676         * src/hc08/*
8677         * src/SDCCmain.c
8678         * src/port.h
8679         * sim/ucsim/hc08.src/*
8680         * sim/ucsim/configure.in
8681         * src/ucsim/configure
8682         * sim/ucsim/packages_in.mk
8683         * as/hc08/*
8684         * as/Makefile
8685         * device/include/mc68hc908qy.h
8686         * device/lib/hc08/*
8687         * device/lib/Makefile.in
8688         * support/regression/ports/hc08/*
8689         * support/regression/Makefile
8690
8691 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8692
8693         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8694         regression test
8695         * src/ds390/gen.c (genCast): fixed bug #821957
8696
8697 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8698
8699         * device/lib/logf.c: "fixed" overlay bug
8700         * support/regression/ports/host/spec.mk: added m library
8701         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8702         * support/regression/tests/float_trans: added (for Eric)
8703
8704 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8705
8706         * src/mcs51/gen.c (genCpl): fixed bug
8707         http://sf.net/mailarchive/message.php?msg_id=6263915
8708
8709 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8710
8711         * src/SDCCast.c (decorateType): added extended constant folding
8712         * src/SDCCsymt.c (computeType): cleanup
8713         * src/SDCCval.c (valShift): minor optimization
8714         * support/regression/tests/ast_constant_folding.c: added
8715
8716 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8717
8718         * src/SDCCmain.c: removed some unintended changes
8719
8720 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8721
8722         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8723         * src/z80/gen.c: fixed part of bug #817589
8724         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8725
8726 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8727
8728         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8729         * src/SDCCcflow.c
8730         * src/SDCCcse.c
8731         * src/SDCCdflow.c
8732         * src/SDCClabel.c
8733         * src/SDCClrange.c
8734         * src/SDCCmem.c
8735         * src/SDCCopt.c
8736         * src/SDCCpeeph.c
8737         * src/SDCCset.c
8738         * src/avr/ralloc.c
8739         * src/ds390/ralloc.c
8740         * src/izt/ralloc.c
8741         * src/mcs51/ralloc.c
8742         * src/pic/ralloc.c
8743         * src/pic16/ralloc.c
8744         * src/xa51/ralloc.c
8745         * src/z80/ralloc.c
8746         * src/z80/gen.c: removed unused label "release:"
8747
8748 2003-10-06  Borut Razem <borut.razem AT siol.net>
8749
8750         * src/SDCC.lex: removed definition of unused variables
8751           save_optimize and save_options
8752
8753 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8754
8755         * clean.mk: removed '=' in "-maxdepth=1"
8756         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8757         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8758
8759 2003-10-06  Borut Razem <borut.razem AT siol.net>
8760
8761         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8762           my_unput() replaced by unput()
8763
8764 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8765
8766         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8767         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8768         type-punned pointer will break strict-aliasing rules"
8769         Old LR behaviour is again default; Klaus' LR can be choosen by
8770         defining the environment variable LRKLAUS
8771         * src/SDCCBBlock.h
8772         * src/SDCCloop.c
8773         * src/SDCClrange.c
8774         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8775         * clean.mk: fixed removal of files in bin/CVS/
8776         * device/lib/clean.mk: fixed removal of directories small and large
8777         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8778         * src/SDCCicode.c,
8779         * src/SDCCval.c: removed superflous test for pedantic
8780
8781 2003-10-05  Borut Razem <borut.razem AT siol.net>
8782
8783         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8784           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8785           message "unmatched #pragma SAVE and #pragma RESTORE"
8786
8787 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8788
8789         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8790           assembly, critical functions, atomic, nojtbound)
8791
8792 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8793
8794         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8795         * src/SDCCBBlock.h
8796         * src/SDCCloop.c
8797         * src/SDCCloop.h
8798         * src/SDCClrange.c
8799
8800 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8801
8802         * src/z80/gen.h,
8803         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8804         * src/mcs51/gen.h
8805         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8806         * src/ds390/gen.h
8807         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8808         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8809         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8810
8811 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8812
8813         * src/z80/gen.c (genRet): fixed bug #524753
8814         * src/z80/gen.c (genCast): fixed internal error on cast from
8815         pointer to long
8816         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8817         fix for bug #477835 to the z80
8818         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8819         for tracking iCodes in the peephole optimizer for z80
8820
8821 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8822
8823         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8824         the other part of bug #814548
8825         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8826
8827 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8828
8829         * src/SDCCcse.c: fixed part of bug #814548
8830
8831 2003-09-28  Borut Razem <borut.razem AT siol.net>
8832
8833         * src/asm.c: rewrite of printILine() to use temporary file instead
8834           a pipe
8835         * src/xa51/main.c: commented out declaration of int rewinds
8836
8837 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8838
8839         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8840
8841 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8842
8843         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8844         * src/asm.c (printILine): Fixed bug #811015
8845
8846 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8847
8848         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8849         freeing.
8850
8851 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8852
8853         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8854         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8855         to correctly handle general case of AOP_PAIRPTR
8856         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8857
8858 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8859
8860         * src/mcs51/ralloc.c (fillGaps),
8861         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8862         register positioning bug)
8863
8864 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8865
8866         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8867
8868 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8869
8870         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8871         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8872         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8873         (ralloc doesn't intentionally do this now, but perhaps later)
8874         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8875         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8876         register positioning bugs (Fixed bug #762602 and #795325)
8877         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8878         (Fixed bug #808779)
8879         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8880         lines that --i-code-in-asm generates
8881
8882 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8883
8884         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8885         trying to fclose a FILE* that was already closed.
8886
8887 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8888
8889         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8890         of const struct should be treated as if const themselves)
8891
8892 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8893
8894         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8895
8896 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8897
8898         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8899         Unix (/n) and DOS (/r/n) line terminations.
8900
8901 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8902
8903         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8904         bug #613775
8905
8906 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8907
8908         * src/mcs51/gen.c (genFunction, genEndFunction),
8909         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8910         and restore of EA so that stack offsets to parameters are
8911         correct when using both critical and reentrant/stack-auto.
8912         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8913         size (can be triggered in error if sloc is shared between
8914         different sized objects)
8915         * device/include/float.h: fixed macros to explicitly use
8916         unsigned long where needed
8917
8918 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8919
8920         Feature req. 799831: added code to allow nesting of critical functions
8921         * src/mcs51/gen.c (genFunction, genEndFunction)
8922         * src/ds390/gen.c (genFunction, genEndFunction)
8923
8924 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8925
8926         * src/SDCCsymt.c (sclsFromPtr),
8927         * src/SDCCsymt.h,
8928         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8929         support for standard C idiom of memory mapped variables; for
8930         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8931         to xdata int at 0x1234 tempvar = 1.
8932         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8933         provided by Akiya ISHIDA
8934
8935 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8936
8937         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8938         * src/SDCCval.c (constVal): added reduction from int to char
8939         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8940         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8941         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8942         to ignore the sign
8943         * support/regression/tests/shifts.c: fixed
8944
8945 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8946
8947         * src/z80/gen.c (genXor): Fixed bug #805445
8948
8949 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8950
8951         Fixed bug #621531 (const & volatile confusion in the type chain).
8952         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8953         refer to the const or volatile state of the pointer itself.
8954
8955         * src/SDCCast.c
8956         * src/SDCCglue.c
8957         * src/SDCCicode.c
8958         * src/SDCCsymt.c
8959         * src/SDCCval.c
8960         * src/SDCC.y
8961         * src/SDCCsymt.h
8962         * src/pic/gen.c
8963         * src/pic/ralloc.c
8964         * src/pic16/gen.c
8965         * src/pic16/ralloc.c
8966         * support/regression/tests/const.c
8967
8968 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8969
8970         When checking for duplicated modules, use absolute paths
8971         instead of relative paths.  Files changed:
8972
8973         * as/mcs51/lklib.c
8974         * link/z80/lklib.c
8975
8976 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8977
8978         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8979
8980 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8981
8982         * device/include/string.h: added size_t typedef, changed
8983         prototypes to use size_t, eliminated separate reentrant and
8984         non-reentrant declarations, added _memmove declaration
8985         * device/lib/_memcpy.c: changed to use size_t instead of int,
8986         changed /4 to >>2 to avoid division library call
8987         * device/lib/_memcmp.c,
8988         * device/lib/_memset.c,
8989         * device/lib/_strncat.c,
8990         * device/lib/_strncpy.c,
8991         * device/lib/_strncmp.c: changed to use size_t instead of int
8992         * device/lib/_memmove.c: new file (fixed bug #772294)
8993         * device/lib/Makefile.in: added _memmove.c
8994         * device/lib/z80/asm_strings.s: fixed bug #772290
8995         * support/regression/tests/bitfields.c: attempt to fix host assertion
8996         failure on amd64-unknown-linux2.2
8997
8998 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8999
9000         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
9001         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
9002         * as/z80/asmain.c (main): fixed bug #801766
9003
9004 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
9005
9006         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
9007         compilers
9008
9009 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9010
9011         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
9012         reported in bug #800609
9013
9014 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
9015
9016         * Top header beautifications in src/pic16 directory:
9017           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
9018           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
9019           pcoderegs.h, ralloc.c, ralloc.h
9020         * main.c: added top header and GPL license notice
9021         * pcode.c: fixed the if-conditional warning
9022
9023 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
9024
9025         * device/lib/_mullong.c: replaced int by short for gcc
9026
9027 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9028
9029         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
9030         and JUMPTABLE iCodes properly now (worked by accident before)
9031         * src/mcs51/gen.c (leftRightUseAcc),
9032         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
9033         iCode properly now. Use getSize instead of nRegs since a & b
9034         aren't part of the nRegs tally.
9035
9036 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
9037
9038         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
9039         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
9040           before instructions that use the _STATUS register
9041
9042 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
9043
9044         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
9045         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
9046         fetching of the pointer
9047         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
9048         copied from genNearPointerSet()
9049         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
9050         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
9051         If they pop r0/r1 they must be called in the opposite order than aopOp().
9052         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
9053         (resp. --stack-auto), prepared for --xstack
9054
9055 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9056
9057         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
9058
9059 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9060
9061         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
9062         these ports have their own __sdcc_external_start()
9063
9064 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
9065
9066         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9067         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
9068         type for bits was changed. It resulted in bit variables becoming
9069         global, which is not permitted in PIC 14 assembly output.
9070
9071 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9072
9073         * doc/sdccman.lyx: various additions and updates. Rearranged sections
9074
9075 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9076
9077         Z80 and MCS51 linkers complaint if a public symbol is defined
9078         in more than one library module:
9079
9080         * as/mcs51/lklib.c
9081         * link/z80/lklib.c
9082         * as/mcs51/Makefile.in
9083
9084 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9085
9086         A few small changes that speed up the peephole optimizer.
9087
9088         * src/SDCCpeeph.c
9089
9090 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9091
9092         Try to make the peephole optimizer smarter by maintaining
9093         an association between the assembly source code and the
9094         iCodes that originated them. Put this information to use
9095         with a new peephole rule condition "notVolatile" so that
9096         the rules can be aggressive yet still safe.
9097
9098         * src/SDCCpeeph.c
9099         * src/SDCCpeeph.h
9100         * src/mcs51/gen.c
9101         * src/mcs51/peeph.def
9102
9103 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9104
9105         Fixed bug #741761
9106
9107         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
9108         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
9109         if the left or right operand symbols have the accuse flag set.
9110
9111 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9112
9113         Changed the type of the result of the ! (NOT) operator to char;
9114         previously it returned the same type as the source. This allows
9115         us to eliminate all the genFloatNot functions (all of its target
9116         implementations were very buggy) since !float can use the same
9117         code as !long now.
9118
9119         * src/SDCCicode.c (ast2iCode): ! returns char
9120         * src/mcs51/gen.c (genNot, genNotFloat),
9121         * src/ds390/gen.c (genNot, genNotFloat),
9122         * src/z80/gen.c (genNot, genNotFloat),
9123         * src/pic/gen.c (genNot, genNotFloat),
9124         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
9125
9126 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
9127
9128         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9129         1. Interrupt would not compile properly. Ensure PCLATH register is saved
9130            during interrupts. Ensure WSAVE is located at a shared bank address.
9131         2. Fixed page selection in some places
9132         3. Fixed BTFSS/C to where necessary use registers directly and not simply
9133            the registers name strings.
9134         4. Fixed "signed / unsigned compare" compiler warnings.
9135         5. The PIC port manages its own allocation of the general purpose
9136            registers, but makes no attempt to reuse them. As a result when
9137            compiling it soon runs out of general purpose registers. Some
9138            additional code was added to the files pcode.c and device.c to walk
9139            through the function call tree and rename the registers so that they
9140            get reused.
9141
9142         * src/pic/device.c
9143         * src/pic/gen.c
9144         * src/pic/glue.c
9145         * src/pic/pcode.c
9146         * src/pic/pcode.h
9147         * src/pic/ralloc.c
9148         * src/pic/ralloc.h
9149         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
9150         genPlus() & genMinus() when the result is the same as left or right
9151
9152 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9153
9154         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
9155
9156 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9157
9158         Made bitfield a distinct type from bit so that bitfields
9159         convert as per ANSI C and bits retain their traditional
9160         boolean style behaviour. Implemented bitfield support in
9161         the z80 port.
9162
9163         * src/SDCCsymt.h,
9164         * src/SDCCsymt.c,
9165         * src/SDCCast.c,
9166         * src/cdbFile.c,
9167         * src/mcs51/gen.c,
9168         * src/ds390/gen.c: bit v bitfield split
9169         * src/z80/gen.c: New support for bitfields
9170         * support/regression/tests/bitfields.c: reenabled z80,
9171         added more tests
9172
9173 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9174
9175         Rules 246.x, 247.x relate to bitfields, the others speed up
9176         access to xdata mapped I/O devices.
9177
9178         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
9179
9180 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9181
9182         Cleaned up genPackBits and genUnpackBits and added two helper
9183         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
9184         for literal assignments in genPackBits (thanks to Frieder for
9185         reminding me).
9186
9187         * src/mcs51/gen.c
9188         * src/ds390/gen.c
9189
9190 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9191
9192         Fixed bug #748310 (pointer to function type mishandled when the
9193         function name is omitted). Also fixed a SIGSEGV when a function
9194         attribute (reentrant, etc) is used on a non-function or on a
9195         function but misplaced before the parameter list.
9196
9197         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
9198         bug #748310
9199         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
9200         * support/Util/SDCCerr.h,
9201         * support/Util/SDCCerr.c: Added func attr misuse error msg
9202
9203 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9204
9205         Fixed bug #787649 by anonymous
9206         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
9207         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
9208
9209 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9210
9211         Fixed numerous bitfield problems.
9212
9213         * src/SDCC.y: More bitfield related error checking
9214         * src/SDCCsymt.h,
9215         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
9216         * support/Util/SDCCerr.h,
9217         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
9218         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9219         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9220         * support/regression/tests/bitfields.c: tests added
9221
9222 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9223
9224         Made the constant following the "interrupt" keyword optional. If
9225         omitted, the function will not automatically be given an entry
9226         in the interrupt vector table (similar to #pragma NOIV, but
9227         less syntacticly kludgy). The interrupt number is also now
9228         range checked. Also fixed a bug in the high order bit example
9229         in the manual.
9230
9231         * src/SDCC.y
9232         * src/SDCCmem.c
9233         * src/SDCCglue.c
9234         * src/SDCCsymt.h
9235         * support/Util/SDCCerr.c
9236         * support/Util/SDCCerr.h
9237         * doc/sdccman.lyx
9238
9239 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9240
9241         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
9242         * src/SDCCicode.c (operandOperation): rewritten some ops
9243         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
9244         * src/SDCCsymt.c (computeType): literals are handled the same way as any
9245         other type
9246         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
9247         be re-activated by defining REDUCE_LITERALS)
9248         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
9249         unsigned, but are signed by default
9250         * src/SDCCval.c (constVal): rearranged
9251         * src/SDCCval.c (valMod): preliminary fix
9252         * src/SDCCval.c (valCastLiteral): use TYPE_* types
9253         * support/regression/literalop.c: added, work in progress
9254
9255 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9256
9257         Generate warnings for useless declarations like "char data;"
9258         that don't do what new users expect.
9259
9260         * src/SDCC.y
9261         * support/Util/SDCCerr.h
9262         * support/Util/SDCCerr.c
9263
9264 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9265
9266         * src/SDCCval.c (valMult): fix overflow detection of negative int
9267
9268 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9269
9270         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9271
9272         Changes to support big endian targets:
9273
9274         * src/ports.h
9275         * src/SDCCglue.c
9276         * src/avr/main.c
9277         * src/ds390/main.c
9278         * src/izt/i186.c
9279         * src/mcs51/main.c
9280         * src/pic/main.c
9281         * src/pic16/main.c
9282         * src/xa51/main.c
9283         * src/z80/main.c
9284
9285 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9286
9287         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9288         * device/lib/time.c: fixed warning "integer overflow in expression"
9289
9290 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9291
9292         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9293         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9294         constants are unsigned; added recognition of "u" flag for unsigned
9295         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9296         * src/SDCCval.c (valDiv, valMod): fixed signdness
9297         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9298         signedness of modulo, left and right shift
9299         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9300         * support/Util/SDCCerr.h: added warning W_INT_OVL
9301         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9302         * src/SDCCast.c (ast_print): improved output of constants
9303
9304 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9305
9306         Fixed some warnings when building with MSVC:
9307
9308         * as/mcs51/asdata.c
9309         * as/z80/asdata.c
9310         * as/mcs51/asm.h
9311         * as/z80/asm.h
9312         * link/z80/aslink.h
9313         * link/z80/lkdata.c
9314         * link/z80/lkeval.c
9315         * link/z80/lkgb.c
9316         * link/z80/lkihx.c
9317         * link/z80/lks19.c
9318         * link/z80/lksym.c
9319         * support/cpp2/cpplib.c
9320         * src/ds390/gen.c
9321         * src/mcs51/gen.c
9322
9323 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9324
9325         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9326
9327 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9328
9329         * support/librarian/clean.mk: Do not remove Makefile.
9330         * support/librarian/Makefile: added.
9331
9332 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9333
9334         Added librarian to MSVC build:
9335         * all.dsp
9336         * sdcc.dsw
9337         * support/librarian/librarian.dsp
9338
9339         'configure' not needed for librarian, removed:
9340         * support/librarian/configure
9341         * support/librarian/configure.in
9342         * support/librarian/config_in.h
9343         * support/librarian/Makefile.in
9344
9345         Hopefully these ones built the librarian and the rest of sdcc properly:
9346         * Makefile
9347         * Makefile.common.in
9348
9349         Messed up 'configure', so revert to previous version:
9350         * configure
9351         * configure.in
9352
9353 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9354
9355         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9356         there, while the mantissa of a double is "only" 53 bits wide.
9357
9358 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9359
9360         Adding sdcclib to the build.  MSVC project coming soon.
9361         Files added/changed:
9362
9363         * support/librarian/clean.mk
9364         * support/librarian/configure
9365         * support/librarian/configure.in
9366         * support/librarian/config_in.h
9367         * support/librarian/Makefile.bcc
9368         * support/librarian/Makefile.in
9369         * support/librarian/sdcclib.c
9370         * Makefile.bcc
9371         * Makefile
9372         * Makefile.common.in
9373         * configure
9374         * configure.in
9375
9376 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9377
9378         Linker now complaints if linked modules have conflicting options, for
9379         example, one compiled using --model-large and another one compiled with
9380         --model-small.  The following files were modified:
9381
9382         * as/mcs51/asdata.c
9383         * as/mcs51/aslink.h
9384         * as/mcs51/asm.h
9385         * as/mcs51/asmain.c
9386         * as/mcs51/asout.c
9387         * as/mcs51/i51pst.c
9388         * as/mcs51/lkdata.c
9389         * as/mcs51/lklibr.c
9390         * as/mcs51/lkmain.c
9391         * as/z80/asdata.c
9392         * as/z80/asm.h
9393         * as/z80/asmain.c
9394         * as/z80/asout.c
9395         * as/z80/z80pst.c
9396         * link/z80/aslink.h
9397         * link/z80/lkdata.c
9398         * link/z80/lklibr.c
9399         * link/z80/lkmain.c
9400         * src/SDCCglue.c
9401
9402 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9403
9404         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9405         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9406
9407 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9408
9409         * src/z80/mappings.i: fix _mul[us][int,long] entries
9410
9411 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9412
9413         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9414
9415 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9416
9417         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9418         * support/regression/tests/bitopcse.c: added
9419         fixed warning:
9420         * src/avr/gen.c:
9421         * src/pic/gen.c:
9422         * src/pic16/gen.c:
9423         * src/z80/gen.c:
9424         * src/xa51/gen.c:
9425
9426 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9427
9428         added support for new library format to z80, gbz80 linkers:
9429         *link/z80/aslink.h
9430         *link/z80/lklex.c
9431         *link/z80/lklib.c
9432         *link/z80/lklist.c
9433
9434 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9435
9436         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9437         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9438
9439 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9440
9441         added DUMMY_READ_VOLATILE:
9442         * src/SDCC.y:
9443         * src/avr/gen.c:
9444         * src/xa51/gen.c:
9445         * src/z80/gen.c:
9446         * src/pic/gen.c:
9447         * src/pic16/gen.c:
9448         * src/mcs51/gen.c:
9449         * src/ds390/gen.c:
9450         * src/SDCCcse.c (algebraicOpts): many improvements
9451         * src/SDCCcse.h: removed algebraicOpts()
9452         * src/SDCCicode.c (picDummyRead): added
9453
9454 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9455
9456         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9457         "Insufficient space in data memory".
9458
9459 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9460
9461         * src/mcs51/gen.c: fixed bug #771358
9462         * src/z80/gen.c: fixed bug #759087
9463
9464 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9465
9466         * src/pic16/glue.c: minor cleanup by Vangelis
9467
9468 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9469
9470         * device/include/regc515c.h: fixed #758477
9471         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9472         * device/lib/_gptrput.c: saved a few bytes
9473         * my tab spacing is 8, yours too?)
9474         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9475         * device/lib/serial.c: process RX bytes earlier than TX bytes
9476         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9477
9478 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9479
9480         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9481
9482 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9483
9484     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9485
9486 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9487
9488         * device/lib/Makefile.in: bad fix, reverted to 1.43
9489
9490 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9491
9492         * device/lib/Makefile.in: added missing z80 object files
9493
9494 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9495
9496         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9497         pic16 progress by Vangelis:
9498         * src/SDCCglobl.h:
9499         * src/SDCCmain.c:
9500         * src/pic/Makefile:
9501         * src/pic:
9502         * pic/Makefile:
9503         * pic16/device.c:
9504         * pic16/device.h:
9505         * pic16/gen.c:
9506         * pic16/gen.h:
9507         * pic16/genarith.c:
9508         * pic16/glue.c:
9509         * pic16/main.c:
9510         * pic16/pcode.c:
9511         * pic16/pcode.h:
9512         * pic16/pcodepeep.c:
9513         * pic16/peeph.def:
9514
9515 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9516
9517     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9518
9519 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9520
9521     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9522     added gbz80 build to MSVC project.
9523     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9524     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9525     from 8051 stuff and setup so it links using a .lnk file.
9526
9527 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9528
9529     * support/librarian/sdcclib.c: sdcc librarian.
9530     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9531     with sdcclib.
9532
9533 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9534
9535     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9536
9537 2003-07-02  Borut Razem <borut.razem AT siol.net>
9538
9539         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9540         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9541         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9542         src/xa51/main.c, src/z80/main.c:
9543         virtualization of glue() function: each port has it's own glue function,
9544         which is accessed by do_glue function pointer in PORT.general structure
9545
9546 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9547
9548         * DS800C400 fun, improved ROM interface and tinibios.
9549
9550 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9551
9552         * More support for DS80C400. Now includes beginning of interface to ROM.
9553
9554 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9555
9556         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9557
9558 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9559
9560         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9561
9562 2003-06-19  Borut Razem <borut.razem AT siol.net>
9563
9564         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9565
9566 2003-06-19  Borut Razem <borut.razem AT siol.net>
9567
9568         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9569         fixed Z80 port - crt0.o: cannot open.
9570
9571 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9572
9573         * support/Util/MySystem.c (merge_command): revert bad fix
9574
9575 2003-06-18  Borut Razem <borut.razem AT siol.net>
9576
9577         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9578
9579 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9580
9581         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9582         option --use-stdout sends errors to stdout instead of stderr.
9583
9584 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9585
9586         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9587
9588 2003-06-15  Borut Razem <borut.razem AT siol.net>
9589
9590         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9591         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9592         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9593         fixed width array of pointers replaced with sets;
9594         multiple include and lib paths ared transferred to preprocessor and linker
9595         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9596         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9597         fixed width array of pointers
9598         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9599         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9600         fixupPath(), getPathDifference()
9601         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9602         fixed width array of pointers
9603
9604 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9605
9606         * src/pic16/ralloc.c: fix warnings
9607         * src/pic16/pcode.c: fix warning
9608
9609 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9610
9611          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9612         know all the details, but essentially this set of changes enable
9613         the pic16 port to generate movff instructions and generate assembler
9614         directives,
9615         * src/SDCCmain.c:
9616         * src/pic16/gen.c:
9617         * src/pic16/glue.c:
9618         * src/pic16/pcode.c:
9619         * src/pic16/device.c:
9620         * src/pic16/main.c:
9621         * src/pic16/pcode.h:
9622         * src/pic16/pcoderegs.c:
9623         * src/pic16/ralloc.c:
9624         * src/pic16/ralloc.h:
9625
9626 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9627
9628         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9629         added option --vc, so sdcc errors and warnings are compatible with
9630         Microsoft Visual Studio.
9631
9632 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9633
9634         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9635           device/lib/libfloat.lib: added atof function.
9636
9637 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9638
9639         * doc/sdccman.lyx: updated to Lyx 1.3
9640         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9641         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9642         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9643
9644 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9645
9646         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9647
9648 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9649
9650         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9651           additions to the "related tools/documentation" section
9652
9653 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9654
9655         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9656
9657 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9658
9659         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9660         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9661
9662 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9663
9664         * doc/sdccman.lyx: fix double dash and other minor things
9665         * doc/Makefile: fix double dash
9666
9667 2003-05-28  Karl Bongers(patches from Martin Helmling)
9668         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9669           condition and ignore commands.
9670
9671 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9672
9673         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9674           is in parts still quite out of date, I did changes as far as I felt makes sense
9675           for a non-native english speaker.
9676           Please feel free to add to the manual or to correct my changes.
9677         * doc/Makefile: undid touching the date of intermediate tex files.
9678
9679 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9680
9681         * doc/sdccman.lyx: Manual has an index now
9682
9683 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9684
9685         Finalize muluint/mulsint and mululong/mulslong merging:
9686         * device/lib/_mulint.c
9687         * device/lib/_mullong.c
9688         * device/lib/gbz80/mul.s
9689         * device/lib/gbz80/stubs.s
9690         * device/lib/z80/mul.s
9691         * device/lib/z80/stubs.s
9692         * src/SDCCsymt.c (initCSupport)
9693
9694 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9695
9696         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9697         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9698           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9699           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9700           instead of /Zm500.
9701
9702 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9703
9704         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9705           the regression tests I'm not brave enough to enable 245.b, 245.c
9706         * doc/sdccman.lyx: added latex preamble for hyperref package.
9707           Using pdflatex this will give you a hyperlinked pdf file with
9708           bookmarks. (prepend '%' before /usepackage if this breaks something)
9709
9710 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9711
9712          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9713
9714 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9715
9716         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9717
9718 2003-05-21    <johan AT balder>
9719
9720         * src/SDCCglue.c (printIval): fixed bug #739934
9721
9722 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9723
9724         Applied patch from bug 737905 (renamed yylineo to mylineno):
9725         * src/altlex.c
9726         * src/SDCCast.c
9727         * src/SDCglobl.h
9728         * src/SDCC.lex
9729         * src/SDCCsymt.c
9730         * src/SDCCval.c
9731         * src/pic16/pcode.c: Cleaned warnings
9732         * src/pic16/pcodeflow.c: Cleaned warnings
9733         * src/pic16/pcoderegs.c: Cleaned warnings
9734
9735 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9736
9737         * src/pic16/pcode.c: Cleaned warnings
9738         * src/pic16/pcodepeep.c: Cleaned warnings
9739         * src/pic16/ralloc.c: Cleaned warnings
9740
9741 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9742
9743         * doc/sdccman.lyx: fixed bug 739745
9744         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9745
9746 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9747
9748         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9749         it can be defined with CFLAGS when running configure
9750         * src/SDCCmain.c: fixed compiling + linking with object files
9751
9752 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9753
9754         * configure.in: configure for pic16 port,
9755             added --disable-pic16-port
9756         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9757         * src/SDCCmain.c: linkOptions is changed to set *,
9758             added if/endif conditional macros to remove options help
9759             messages from optionsTable when a port is not configured, added
9760             support for the PIc16 port in the ports table, when executing
9761             the compiler with no port specified on command line, a default
9762             port is selected with the new macro DEFAULT_PORT which is
9763             defined in port.h, in setDefaultOptions() linkOptions is removed
9764             from initialization assignment, since now it is a set,
9765             parseCmdLine uses setParseWithComma for linkOptions, in
9766             linkEdit() linkOptions are accessed with new function indexSet()
9767             which returns the i'th item of a set variable. See SDCCset.c, in
9768             linkEdit() when calling buildCmdLine(), added linkOptions as
9769             last argument. Now users can pass arguments to gplink via the
9770             -Wl option, main() uses pic16glue() to glue up pic16 programs
9771         * src/SDCCpeeph.c: various changes to support pic16
9772         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9773             return the i'th item of the set
9774         * src/SDCCset.h: added function prototype for indexSet()
9775         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9776         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9777         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9778             added macro DEFAULT_PORT
9779         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9780         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9781             generated
9782         * src/pic16/glue.c: commented out some error producing lines
9783         * src/pic16/main.c: __config directives are commented out to stop
9784             gpasm complaining and test the linkage with gplink, _linkCmd and
9785             _asmCmd changed to be more gplink and gpasm friendly
9786         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9787             produced an error when parsed, peep rule 12 is added to utilize
9788             movff, but it is commented out since the pCode does not support
9789             yet a command with 2 address arguments
9790
9791 2003-05-18    <johan AT balder>
9792
9793         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9794         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9795 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9796
9797         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9798   Added feature to script commands from file.
9799
9800 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9801
9802         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9803         * src/SDCCutil.c: include ctype.h for win32
9804
9805 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9806
9807         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9808
9809 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9810
9811         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9812   Fixed so you can set breakpoints prior to run, run does not stop
9813   on entry now.  Add tbreak.  Other enhancements and fixes for use
9814   with ddd.
9815
9816 2003-05-12  Borut Razem <borut.razem AT siol.net>
9817
9818         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9819
9820 2003-05-11  Borut Razem <borut.razem AT siol.net>
9821
9822         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9823         the path of bin directory, so that PATH is the only env. variable, which has to be set
9824         in case of standard installation.
9825         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9826         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9827         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9828
9829 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9830
9831         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9832         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9833         temp files are in the port dir; clean the gen/test directory when
9834         generating new test.c
9835         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9836         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9837         * support/regression/tests/zeropad.c: added
9838
9839 2003-05-09    <johan AT balder>
9840
9841         * src/SDCCglue.c: fixed bug #597940
9842
9843 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9844
9845         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9846   cache sfr, optimize next,step, fix off by one sourceline,
9847   support ddd list function.
9848         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9849
9850 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9851
9852         * support/regression/HTMLgen.py: added compare_s2f()
9853         * support/regression/Makefile: redo 1.27
9854         * support/regression/generate-cases.py: redo 1.5
9855
9856 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9857
9858         * support/regression/tests/float.c: workaround 33 bit hex constant
9859         * support/regression/tests/simplefloat.c: fix division for host
9860
9861 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9862
9863         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9864         that tame's the PIC's over-aggressive optimizer.
9865
9866 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9867
9868          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9869          support for MSVC.
9870
9871 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9872
9873         Initial support for DS80C400. "Hello world" runs on TINIm400
9874         (with polled I/O).
9875
9876 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9877
9878          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9879          * Some notes on ddd usage added in debugger/README
9880          Martin Helmling adding more features and fixes for ddd GUI debugger.
9881          Code added for nexti, stepi, up, down, and other adjustments.
9882
9883 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9884
9885         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9886         * src/pic/peeph.def Added two rules to optimize carry manipulation
9887         * src/pic/* removed debug printfs
9888
9889 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9890
9891         * debugger/mcs51/cmd.c: added header newalloc.h
9892
9893 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9894
9895         * as/Makefile: new EXEEXT
9896         * as/z80/Makefile: remove trailing slash of BUILDIR
9897         * as/z80/clean.mk: new EXEEXT
9898         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9899         * support/cpp2/Makefile.in: new EXEEXT
9900         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9901
9902 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9903
9904         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9905         EXEEXT was introduced to fix all related problems with targets
9906         "clean", "install" and "uninstall"; a couple of further flaws
9907         especially with "clean" have been fixed too
9908         * as/mcs51/Makefile.in
9909         * as/mcs51/clean.mk
9910         * as/z80/Makefile
9911         * Makefile
9912         * clean.mk
9913         * debugger/mcs51/Makefile.in
9914         * debugger/mcs51/clean.mk
9915         * link/z80/Makefile
9916         * link/z80/Makefile.in
9917         * link/z80/clean.mk
9918         * link/Makefile
9919         * packihx/Makefile.in
9920         * packihx/clean.mk
9921         * sim/ucsim/Makefile
9922         * sim/ucsim/clean.mk
9923         * sim/ucsim/avr.src/Makefile.in
9924         * sim/ucsim/avr.src/clean.mk
9925         * sim/ucsim/s51.src/Makefile.in
9926         * sim/ucsim/s51.src/clean.mk
9927         * sim/ucsim/xa.src/Makefile.in
9928         * sim/ucsim/xa.src/clean.mk
9929         * sim/ucsim/z80.src/Makefile.in
9930         * sim/ucsim/z80.src/clean.mk
9931         * sim/ucsim/main_in.mk
9932         * sim/ucsim/packages_in.mk
9933         * sim/ucsim/gui.src/Makefile.in
9934         * sim/ucsim/gui.src/serio.src/Makefile.in
9935         * sim/ucsim/gui.src/serio.src/clean.mk
9936         * src/Makefile.in
9937         * src/clean.mk
9938         * support/cpp2/Makefile.in
9939         * support/cpp2/clean.mk
9940         * support/makebin/Makefile
9941         * support/makebin/clean.mk
9942         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9943         * doc/sdccman.lyx: --program-suffix no longer needed
9944
9945 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9946
9947          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9948          Martin Helmling added support for ddd GUI debugger.
9949          Code added to display assembly, set variables, and other commands
9950          to interface to ddd.
9951
9952 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9953
9954         * as/Makefile: fix target clean
9955         * as/clean.mk: fix target clean
9956         * as/z80/clean.mk: fix target clean
9957
9958 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9959
9960         * Makefile.common.in: added  AT EXEEXT AT
9961         * configure.in: removed all mingw32 stuff
9962         * configure: rebuilt from configure.in
9963         * doc/sdccman.lyx: updated section "installation"
9964         * support/scripts/sdcc_mingw32: adapted to configure
9965         * support/scripts/sdcc_cygwin_mingw32: added
9966
9967 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9968
9969         * src/pic Added object file support for the PIC port
9970         * src/pic Applied patch from Craig Franklin (this started the object file support)
9971         * src/regression Updated the PIC regression tests for object files
9972
9973 2003-04-20  Borut Razem <borut.razem AT siol.net>
9974
9975         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9976           lklex.c: In function `getfid':
9977           lklex.c:203: warning: array subscript has type `char'
9978         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9979           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9980         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9981           stack handling macros
9982
9983 2003-04-19  Borut Razem <borut.razem AT siol.net>
9984
9985         * "handling space characters in file path" task:
9986         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9987         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9988         * support/Util/MySystem.h: make it self-sufficient
9989         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9990           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9991           handling space characters in file path
9992         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9993           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9994         * support/Util/MySystem.c: handling space characters in executable's path
9995
9996 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9997
9998         * as/z80/Makefile: fix permanent rebuild of z80
9999         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
10000         * support/regression/tests/bitfields.c: added Johan's bitfields.c
10001
10002 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
10003
10004         * src/SDCCopt.c: add special case optimization to replace modulo by
10005           a power of two with a bitwise AND.
10006
10007 2003-04-18    <johan AT balder>
10008
10009         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
10010
10011 2003-04-17    <johan AT balder>
10012
10013         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
10014         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
10015
10016 2003-04-13  Borut Razem <borut.razem AT siol.net>
10017
10018         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
10019         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
10020           fixed mingw problem in adl_NORMALIZE_PATH
10021
10022 2003-04-12  Borut Razem <borut.razem AT siol.net>
10023
10024         * fixed "#pragma SAVE/RESTORE can not be nested":
10025         * src/SDCC.lex: reworked pragma handling functions
10026         * sdcc/src/SDCCglobl.h: reworked stack handling macros
10027         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
10028
10029 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10030
10031         * src/SDCCutil.c (pathEquivalent): defined but not used
10032         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
10033         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
10034         * configure: rebuilt from configure.in
10035         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10036         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10037         * device/include/Makefile.in: replace sdcc_datadir
10038         * device/lib/Makefile.in: replace sdcc_datadir
10039         * Makefile.common.in: add LDFLAGS from configure
10040         * packihx/Makefile.in: use LDFLAGS
10041         * src/Makefile.in: use LDFLAGS
10042         * support/cpp2/Makefile.in: add LDFLAGS from configure
10043         * support/makebin/Makefile: use LDFLAGS
10044         * .version: bumped version number to 2.3.5
10045
10046 2003-04-12  Borut Razem <borut.razem AT siol.net>
10047
10048         * completed "different paths" task:
10049         * src/SDCCmacro.c: fixed bug in handling quotes
10050         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
10051         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
10052
10053 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10054
10055         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
10056
10057 2003-04-11 kevin Vigor <kevin AT vigor.nu>
10058
10059         * ds390/gen.c ds390/peeph.def: fix bug 706781
10060
10061 2003-04-11  Borut Razem <borut.razem AT siol.net>
10062
10063         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
10064
10065 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
10066
10067         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
10068         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
10069          set - this bit used to not be set...).
10070         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
10071           bad code in PIC Port
10072         * src/regression/and2.c added to test bug 609268
10073         * src/regression/Makefile added and2.c to regression test
10074
10075
10076 2003-04-08    <johan AT CP255758-A>
10077
10078         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
10079         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
10080         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
10081
10082 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
10083
10084         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
10085         fix bug #487815
10086         * support/cpp2/Makefile.in: fix bug #487815
10087         * configure: rebuilt from configure.in
10088         * Makefile.common.in: docdir changed, new path suffixes
10089         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10090         * sdcc_vc_in.h: reflect changes from sdccconf.h
10091         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
10092         * src/SDCCutil.h: remove BINDIR hack
10093         * doc/sdccman.lyx: update new path hierarchy
10094
10095 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10096
10097         * src/SDCCpeeph.c: added okToRemoveSLOC test
10098
10099 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10100
10101         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
10102
10103 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10104
10105         * src/SDCCpeeph.c: added labelIsReturnOnly test
10106         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
10107
10108 2003-04-05    <johan AT balder>
10109
10110         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
10111         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
10112         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
10113         * src/SDCCast.c: fixed a warning
10114         * src/SDCCast.h: fixed a warning
10115         * src/SDCCicode.c (operandFromAst): fixed a warning
10116
10117 2003-04-04    <johan AT balder>
10118
10119         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
10120         * src/SDCCast.c (decorateType): fixed bug #715076
10121         * src/SDCC.y: fixed bug #702907
10122
10123 2003-04-03    <johan AT balder>
10124
10125         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
10126         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
10127         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
10128         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
10129         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
10130
10131 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
10132
10133         * _decdptr.c: fix return values
10134         * _gptrget.c: fix return values
10135         * _gptrgetc.c: fix return values
10136         * _gptrput.c: fix return values
10137         * _mulint.c: fix return values
10138         * as/z80/Makefile: fix 'make -j' problem
10139
10140 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
10141
10142         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
10143         * configure.in: big cleanup, updated to autoconf 2.5x
10144         * configure: rebuilt from configure.in
10145         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10146         * sdcc_vc_in.h: reflect changes from sdccconf.h
10147         * doc/Makefile: fixed a flaw in "make install"
10148
10149 2003-04-02    <johan AT balder>
10150
10151         * src/ds390/gen.c (genCmp): no comments
10152         * src/mcs51/gen.c (genCmp): no comments
10153         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
10154         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
10155
10156 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
10157
10158         * support/regression/generate-cases.py: place generated file in given sub directory
10159         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
10160         * support/regression/Makefile: improvements for 'make -j';
10161         side effect: it's simpler and faster now
10162
10163 2003-03-31  Borut Razem <borut.razem AT siol.net>
10164
10165         * src/z80/main.c: link-{port} and as-{port} defined without path
10166         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
10167
10168 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
10169
10170         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
10171
10172 2003-03-30  Borut Razem <borut.razem AT siol.net>
10173
10174         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
10175           changed type of list parameter to set
10176         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
10177         * src/port.h: changed type of do_assemble() parameter to set
10178         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
10179           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
10180           definition of "cppoutfilename" macro with NULL value in preProcess()
10181         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
10182         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
10183         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
10184           replaced with set *binPathSet
10185         * shash_add() deallocates the item, if allready exsists, before adding the new one
10186         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
10187
10188 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
10189
10190         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
10191           a nested for loop bug in the PIC port
10192         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
10193           for loops
10194
10195 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
10196
10197         * support/Util/dbuf.h: remove C++ stuff to make it portable
10198
10199 2003-03-28  Borut Razem <borut.razem AT siol.net>
10200
10201         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
10202           literal strings in stringLiteral()
10203         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
10204         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
10205           to the project
10206
10207 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
10208
10209         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
10210
10211 2003-03-26    <johan AT balder>
10212
10213         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
10214         * src/ds390/gen.c (saveRegisters): catched symbol abuse
10215         * src/SDCCast.c (decorateType): fixed " -v < 3"
10216
10217 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
10218
10219         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
10220         Added Lenny Story's debug infrastructure changes:
10221         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
10222         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
10223         * src/cdbFile.c: added
10224         * src/SDCCdebug.c: added
10225         * src/SDCCdebug.h: added
10226         * src/SDCCast.c (createFunction)
10227         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
10228         * src/SDCCmain.c (parseCmdLine, main)
10229         * src/SDCCmem.c (redoStackOffsets)
10230         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
10231         * src/SDCCsymt.h
10232         * src/common.h
10233         * src/avr/gen.c (genAVRCode)
10234         * src/ds390/gen.c (gen390Code)
10235         * src/mcs51/gen.c (gen51Code)
10236         * src/pic/gen.c (genpic14Code)
10237         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
10238         * src/xa51/gen.c (genXA51Code)
10239         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
10240
10241 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10242
10243         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
10244         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
10245
10246 2003-03-22    <johan AT balder>
10247
10248         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
10249
10250 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
10251
10252         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
10253         * doc/cdbfileformat.lyx: added, written by Lenny Story
10254         * doc/Makefile: added cdbfileformat.lyx
10255         * doc/clean.mk: added cdbfileformat.lyx
10256
10257 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
10258
10259         * src/mcs51/peeph.def: fix bug #705773
10260
10261 2003-03-20    <johan AT balder>
10262
10263         An sfr/sbit can have an "at #" AND an initializer
10264         * src/SDCCsymt.c (checkSClass):
10265         * src/SDCCmem.c (allocGlobal):
10266         * src/SDCCmem.c (allocLocal):
10267         * src/SDCCast.c (createBlock):
10268
10269 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10270
10271         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10272
10273 2003-03-16    <johan AT balder>
10274
10275         Undid the hackup of const and volatile, the problem is much bigger
10276         * src/SDCC.y:1.65
10277         * src/SDCCast.c:1.171
10278         * src/SDCCglue.c:1.138
10279         * src/SDCCicode.c:1.146
10280         * src/SDCCsymt.c:1.150
10281         * src/SDCCval.c:1.65
10282
10283 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10284
10285         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10286         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10287
10288 2003-03-13    <johan AT balder>
10289
10290         Hackup const and volatile modifiers in type chains a bit:
10291         * src/SDCC.y:1.63
10292         * src/SDCCast.c:1.169
10293         * src/SDCCglue.c:1.136
10294         * src/SDCCicode.c:1.143
10295         * src/SDCCsymt.c1.146
10296         * src/SDCCsymt.h1.59
10297         * src/SDCCval.c:1.63
10298
10299 2003-03-12    <johan AT balder>
10300
10301         * src/SDCCBBlock.h: more LRH debugging junk
10302         * src/SDCCcflow.h: more LRH debugging junk
10303         * src/SDCCloop.c: more LRH debugging junk
10304         * src/SDCC.y (struct_declaration): fixed bug #697590
10305         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10306         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10307         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10308
10309 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10310         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10311         test function names must now match exactly).
10312         * src/SDCCcse.c: added special case in findCheaperOp to allow
10313         extending a short integer. Makes less awful code for bug 700121 test case.
10314
10315 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10316
10317         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10318         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10319
10320 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10321
10322         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10323         actually called (operandsNotEqual() was called for all
10324         operandsNotEqualX tests).
10325
10326 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10327
10328         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10329         with shorter literals. Fixes bug 700121.
10330
10331 2003-03-11    <johan AT balder>
10332
10333         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10334
10335 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10336
10337         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10338         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10339
10340 2003-03-10  Borut Razem <borut.razem AT siol.net>
10341
10342         * src/SDCCmain.c: pipe preprocessor's output
10343         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10344         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10345         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10346         which closes all pipes in pipeSet set
10347         * src/SDCCset.c: free deleted item in function deleteSetItem()
10348         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10349         moved from z80 to src subproject
10350         * .version: increased version number to 2.3.4
10351
10352 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10353
10354         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10355         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10356         * support/regression/ports/xa51/spec.mk: fix typo
10357
10358 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10359
10360         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10361
10362 2003-03-09  Borut Razem <borut.razem AT siol.net>
10363
10364         * src/SDCCmain.c: pipe preprocessor's output
10365         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10366         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10367         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10368         which closes all pipes in pipeSet set
10369         * src/SDCCset.c: free deleted item in function deleteSetItem()
10370         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10371         moved from z80 to src subproject
10372
10373 2003-03-09  Borut Razem <borut.razem AT siol.net>
10374
10375         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10376         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10377         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10378         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10379         * src/SDCCglobl.h: unification of WIN32 native definitions
10380
10381 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10382
10383         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10384
10385 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10386
10387         * src/configure.in:   check for endianess (even while cross-compiling)
10388         * src/configure:      check for endianess (even while cross-compiling)
10389         * src/configure_in.h: check for endianess (even while cross-compiling)
10390         * src/avr/gen.c:        remove old endianess stuff
10391         * src/mcs51/gen.c:      remove old endianess stuff
10392         * src/ds390/gen.c:      remove old endianess stuff
10393         * src/pic/gen.c:        remove old endianess stuff
10394         * src/pic/genarith.c:   remove old endianess stuff
10395         * src/pic/glue.c:       fix endianess check
10396         * src/pic16/gen.c:      remove old endianess stuff
10397         * src/pic16/genarith.c: remove old endianess stuff
10398         * src/pic16/glue.c:     fix endianess check
10399         * src/xa51/gen.c:       remove old endianess stuff
10400         * src/z80/gen.c:        fix endianess check
10401         * src/SDCCglue.c:       fix endianess check
10402         * src/ds390/peeph.def: fix bug 700036
10403
10404 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10405
10406         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10407         * src/configure: find appropriate data-types on host for SDCC's int and long
10408         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10409         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10410         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10411
10412 2003-03-07    <johan AT balder>
10413
10414         Just a big NOOP:
10415                 some minor cleanups before the big shot
10416                 OP_DEFS and OP_USES now use Kevin's protection
10417                 new option --nolabelopt
10418
10419         * src/SDCCBBlock.c:
10420         * src/SDCCast.c,:
10421         * src/SDCCcflow.c:
10422         * src/SDCCcse.c:
10423         * src/SDCCicode.c:
10424         * src/SDCCicode.h:
10425         * src/SDCClabel.c:
10426         * src/SDCCloop.c:
10427         * src/SDCCmain.c:
10428         * src/ds390/ralloc.c:
10429         * src/mcs51/ralloc.c:
10430         * src/pic/ralloc.c:
10431         * src/xa51/ralloc.c:
10432         * src/z80/ralloc.c:
10433
10434 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10435
10436         * src/pic/pcode.c (get_op): fix 64 bit warnings
10437         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10438         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10439         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10440         * support/regression/tests/malloc.c: fix 64 bit warnings
10441
10442 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10443
10444         * src/mcs51/gen.c (genMinus): fixed bug 696436
10445
10446 2003-03-02  Borut Razem <borut.razem AT siol.net>
10447
10448         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10449
10450 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10451
10452         * configure.in: test for mkstemp
10453         * sdccconf_in.h: add HAVE_MKSTEMP
10454
10455 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10456
10457         * device/include/ctype.h: removed warning while using --stack-auto
10458         * device/include/malloc.h: removed warning while using --stack-auto
10459         * device/include/string.h: removed warning while using --stack-auto
10460
10461 2003-02-23  Borut Razem <borut.razem AT siol.net>
10462
10463         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10464         because NDEBUG is defined (see man assert)
10465         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10466
10467 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10468
10469         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10470         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10471
10472 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10473
10474         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10475         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10476
10477 2003-02-18    <johan AT balder>
10478
10479         * as/mcs51/asmain.c (asmbl): module can start with a digit
10480         * as/z80/asmain.c (asmbl): module can start with a digit
10481
10482 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10483
10484         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10485         * src/asm.c: fix pipe() for Mingw32
10486
10487 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10488
10489         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10490         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10491         make -V work again; --c1mode reads now from stdin
10492         * doc/sdccman.lyx: added --c1mode
10493         * support/Util/SDCCerr.c: new messages for c1 mode
10494         * support/Util/SDCCerr.h: new messages for c1 mode
10495         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10496
10497 2003-02-15    <johan AT balder>
10498
10499         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10500
10501 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10502
10503         * doc/sdccman.lyx: Environment variables, -o and other minor things
10504
10505 2003-02-14    <johan AT balder>
10506
10507         * src/xa51/main.c: before anyone really tries to use it :)
10508
10509         * Install doc's in share/sdcc/doc
10510         * removed some obsolete files
10511         * Do a proper make distclean and uninstall
10512         M Makefile.common.in
10513         R sdccbuild.sh
10514         M as/Makefile
10515         M device/include/Makefile.in
10516         M device/lib/Makefile.in
10517         M doc/sdccman.lyx
10518         M link/Makefile
10519         M sim/ucsim/doc/Makefile.in
10520         M src/clean.mk
10521         R src/avr/peeph.rul
10522         R src/xa51/peeph.rul
10523         M support/cpp2/Makefile.in
10524         M support/makebin/Makefile
10525
10526
10527 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10528
10529         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10530
10531 2003-02-10  Borut Razem <borut.razem AT siol.net>
10532
10533         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10534         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10535         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10536         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10537         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10538         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10539         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10540         src/z80/Makefile.bcc: Borland Makefile cleanup
10541         * as/z80/Makefile.bcc: Added Borland Makefile
10542         * support/cpp2/borland.h: Removed
10543
10544 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10545
10546         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10547         * src/SDCC.lex: new pragma NOIV
10548         * src/SDCCglobl.h: new pragma NOIV
10549         * src/SDCCmem.c: new pragma NOIV
10550
10551 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10552
10553         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10554
10555 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10556
10557         * src/SDCCmain.c: signal handling is switched off by --debug
10558         * doc/Makefile: small fix for install; use clean.mk again
10559         * doc/clean.mk: clean *.pdf and *.html too
10560
10561 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10562
10563         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10564         * device/lib/printfl.c: fix a ds390 bug by making it portable
10565         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10566         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10567         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10568         * debugger/mcs51/cmd.c: converted multi-line string literals
10569         * sim/ucsim/globals.cc: converted multi-line string literals
10570         * src/SDCCmain.c: introduced signal handler to remove temp files
10571         * doc/Makefile: small tweaks, implement clean
10572         * doc: removed generated files
10573
10574 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10575
10576         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10577         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10578         Address Record is not correctly generated for DS390."
10579
10580 2003-02-02  Borut Razem <borut.razem AT siol.net>
10581
10582         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10583         * as/mcs51/asm.h: fixed compilation with Borland C
10584         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10585         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10586         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10587         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10588         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10589         src/z80/Makefile.bcc: delete $(LIB) only if exist
10590         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10591
10592 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10593
10594         * device/include/malloc.h: introduced NULL
10595         * device/include/string.h: introduced NULL
10596         * device/include/stdlib.h: introduced NULL
10597         * device/lib/_memcpy.c: removed NULL
10598         * device/lib/_strcat.c: removed NULL
10599         * device/lib/_strchr.c: removed NULL
10600         * device/lib/_strcmp.c: removed NULL
10601         * device/lib/_strcpy.c: removed NULL
10602         * device/lib/_strcspn.c: removed NULL
10603         * device/lib/_strlen.c: removed NULL
10604         * device/lib/_strncat.c: removed NULL
10605         * device/lib/_strncmp.c: removed NULL
10606         * device/lib/_strncpy.c: removed NULL
10607         * device/lib/_strpbrk.c: removed NULL
10608         * device/lib/_strrchr.c: removed NULL
10609         * device/lib/_strspn.c: removed NULL
10610         * device/lib/_strstr.c: removed NULL
10611         * device/lib/_strtok.c: removed NULL
10612         * device/lib/malloc.c: removed NULL, include own header
10613
10614 2003-02-02    <johan AT balder>
10615
10616         * 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
10617         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10618         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10619         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10620         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10621         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10622
10623 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10624
10625         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10626         area 'DATA'"
10627
10628 2003-02-01    <johan AT balder>
10629
10630         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10631
10632 2003-01-31    <johan AT CP255758-A>
10633
10634         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10635
10636 2003-01-30    <johan AT balder>
10637
10638         * src/SDCCBBlock.c: automatic bug detection
10639         * src/SDCCicode.c: automatic bug detection
10640
10641 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10642
10643         * src/SDCCglobl.h:   now --xram-size 0 works
10644         * src/SDCCmain.c:    now --xram-size 0 works
10645
10646 2003-01-29    <johan AT balder>
10647
10648         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10649
10650 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10651
10652         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10653         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10654         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10655         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10656         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10657         * src/SDCCmain.c:    Added options --xram-size and --code-size
10658
10659 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10660
10661         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10662         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10663
10664 2003-01-27    <johan AT balder>
10665
10666         * src/SDCC.y: fixed bug #613764
10667
10668 2003-01-26    <johan AT balder>
10669
10670         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10671         * src/SDCCsymt.h: fixed bug #673374
10672         * src/SDCCglue.c: fixed bug #661910
10673         * src/SDCCast.c: fixed bug #458099 and 673374
10674
10675 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10676
10677         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10678         * as/mcs51/strcmpi.h: added
10679         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10680         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10681         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10682         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10683         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10684         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10685         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10686         * as/mcs51/Makefile.aslink: new module strcmpi
10687         * as/mcs51/Makefile.asx8051: new module strcmpi
10688         * as/mcs51/Makefil.bcc: new module strcmpi
10689         * as/mcs51/Makefile.in: new module strcmpi
10690         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10691
10692 2003-01-26    <johan AT balder>
10693
10694         * src/SDCCglue.c: reverted back to 1.124
10695         * src/SDCCast.c: reverted back to 1.156
10696         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10697
10698 2003-01-25    <johan AT balder>
10699
10700         * src/SDCCglue.c: A better fix for bug #661910
10701         * src/SDCCast.c: A better fix for bug #661910
10702         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10703
10704 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10705
10706         * src/Makefile.in: remove spawn.o
10707         * src/SDCCmain.c: remove spawn.h
10708         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10709         * src/spawn.c: removed
10710         * src/spawn.h: removed
10711         * support/regression/ports/ds390/spec.mk: link with -r
10712
10713 2003-01-24    <johan AT CP255758-A>
10714
10715         * src/ds390/gen.c (aopOp): fixed bug #667458
10716         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10717         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10718         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10719
10720 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10721
10722         * src/mcs51/peeph.def: better assembler identation by Frieder
10723         * src/mcs51/gen.c: better assembler identation by Frieder
10724
10725 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10726
10727         * as/z80/string.h: removed for gcc 3.2
10728         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10729         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10730
10731 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10732
10733         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10734         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10735         * support/regression/Makefile: separate temp files for ports
10736         * support/regression/generate-cases.py: separate temp files for ports
10737         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10738         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10739
10740 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10741
10742         * moved tinitalk to device/examples/ds390
10743
10744 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10745
10746         * as/mcs51/lkmem.c: rflag is for DS390
10747         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10748         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10749                          (linkEdit): move mem- and map-files the same way as ihx-files
10750         * src/z80/main.c (_setDefaultOptions): removed --generic
10751         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10752         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10753         * src/pic/glue.c (picglue): --c1mode works again
10754         * src/pic16/glue.c (pic16glue): --c1mode works again
10755         * src/asm.c (printCLine): fix #660034
10756
10757 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10758
10759         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10760         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10761         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10762         * as/mcs51/lkmem (summary): better fix for sp problem
10763         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10764         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10765         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10766                                               remove --stack-after-data
10767
10768 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10769
10770         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10771         * src/SDCCutil.c (join): ugly bug: missing '\0'
10772         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10773
10774 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10775
10776         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10777         * src/port.h: typo
10778         * src/pic/main.c (_asmCmd): gpasm supports -o
10779         * src/z80/main.c: more general macros
10780         * device/lib/Makefile.in: remove intermediate files
10781
10782 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10783
10784         * .version: Bumped version number to 2.3.3
10785         * src/SDCCBBlock.c: new option -o
10786         * src/SDCCglobl.h: new option -o
10787         * src/SDCCglue.c: new option -o
10788         * src/SDCCmain.c: new option -o
10789         * src/asm.c: new option -o
10790         * src/ds390/main.c: new option -o
10791         * src/pic/glue.c: new option -o
10792         * src/pic/pcode.c: new option -o
10793         * src/pic/ralloc.c: new option -o
10794         * src/pic16/glue.c: new option -o
10795         * src/pic16/pcode.c: new option -o
10796         * src/pic16/ralloc.c: new option -o
10797         * src/z80/main.c: new option -o
10798         * device/lib/Makefile.in: use -o
10799         * support/regression/ports/ds390/spec.mk: use -o
10800         * support/regression/ports/gbz80/spec.mk: use -o
10801         * support/regression/ports/mcs51/spec.mk: use -o
10802         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10803         * support/regression/ports/z80/spec.mk: use -o
10804         * support/regression/ports/ucz80/spec.mk: use -o
10805         * support/regression/ports/xa51/spec.mk: use -o
10806         * support/regression/fwk/lib/timeout.c: fix usage string
10807
10808 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10809         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10810
10811 2003-01-07    <johan AT balder>
10812
10813         * src/SDCCast.c (decorateType): fixed bug #600035
10814
10815 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10816         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10817         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10818         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10819         * src/pic/pcode.c: outcommented unused variable to remove warnings
10820         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10821
10822 2003-01-06    <karl AT turbobit.com>
10823         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10824    regression tests.
10825
10826 2003-01-06    <johan AT balder>
10827
10828         * src/SDCCicode.c: fixed array add
10829
10830 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10831         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10832         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10833
10834 2003-01-04    <johan AT balder>
10835
10836         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10837
10838 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10839         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10840
10841 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10842         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10843         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10844
10845 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10846         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10847
10848 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10849         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10850
10851 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10852         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10853
10854 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10855
10856     * in /sdcc/as/mcs51/ changed these files in order to create an
10857     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10858     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10859     following files to include the previous two files: aslink.dsp,
10860     Makefile.aslink, Makefile.bcc, and Makefile.in.
10861
10862     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
10863     .adb instead of .cdb
10864
10865 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10866
10867         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
10868         value from option --iram-size.
10869
10870 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10871
10872         * /sdcc/as/mcs51/lklist.c: added boundary check before using
10873         dram[] array.
10874
10875 2002-09-18    <wiml AT hhhh.org>
10876
10877         * SDCClrange.h: exposed setFromRange() and setToRange()
10878         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10879           packRegsForAccUse() (bug 542397)
10880         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10881           multiple times and emitting the fetch operations more than once
10882           added aopGetUsesAcc() function to allow binary operators to
10883           fetch their operands in the correct order; made genMinus() emit
10884           compact code for X = LITERAL - Y
10885
10886 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10887         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
10888         sprintf() in line 1267.
10889
10890 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10891         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10892         like ports.
10893
10894 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10895         Changes to aslink (All the changes are marked with 'JCF'):
10896
10897         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
10898         summary().
10899
10900         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
10901         area BSEG.  Also moves, if possible, the DATA area down into the internal
10902         ram so more space is available.
10903
10904         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
10905         sflag.
10906
10907         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
10908         not bytes.  Function summary() which creates a memory usage summary
10909         file with extension .mem.  Reports of overlaping stack and small stack
10910         size.  If the space for the stack is less than 16 bytes aslink trows a
10911         warning.
10912
10913         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
10914         the 8051.  Option 'y' for memory summary output file.
10915
10916         Changes to sdcc (All the changes are marked with 'JCF'):
10917
10918         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
10919
10920         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
10921         overlaying area for it (uses RegBankUsed[4]).
10922
10923         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
10924         bank zero as used by default.  By default aslink locates the stack
10925         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10926         the creation of the .mem file.  Delegates the allocation of data area
10927         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10928         the begining of the stack area to aslink.
10929
10930         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
10931         glue() in SDCCglue.c creates an area for it.
10932
10933 2002-09-03  Borut Razem <borut.razem AT siol.net>
10934         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10935         sdcc/src/pic/glue.c:
10936         introduced atexit() handler for teporay files removal in case of
10937         errors, assertions, ...
10938
10939 2002-08-29  Borut Razem <borut.razem AT siol.net>
10940         * sdcc/support/cpp2/auto-host_vc_in.h:
10941         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10942         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10943         Maybe there is a similar problem with BORLANDC? It should be checked!
10944
10945         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10946         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10947         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10948         was not executed, and the compiler (cl) launched a warning:
10949         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10950
10951 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10952         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10953
10954 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10955         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10956
10957         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10958           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10959           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10960           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10961           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10962           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10963           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10964         - added Release configuration in VS projects
10965         - review of compiler an linker options
10966         - VC .exe files are generated in bin_vc directory, not to interfere
10967           with binaries generated from other projects (cygwin, mingw, bcc ...)
10968
10969         * sdcc/src/yacc.dsp: added
10970
10971         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10972         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10973         and insert the version number definitions from .version
10974
10975         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10976
10977         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10978         added - genarate auto-host.h using auto-host_vc_in.h as template
10979
10980         * sdcc/sdcc_vc.h,
10981         removed from CVS, generated automatically
10982
10983 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10984         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10985
10986 2002-08-11  Borut Razem <borut.razem AT siol.net>
10987         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10988
10989 2002-08-10  Borut Razem <borut.razem AT siol.net>
10990         * src/SDCCmain.c (main):
10991         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10992         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10993         The consequence was that some temporary files were not removed.
10994
10995         * src/SDCCglue.c:
10996         unification of code in functions tempfilename() and tempfile():
10997         function tempnam() is defined in Visual Studio 6.0 and .NET
10998
10999         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
11000
11001         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11002           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
11003         - removed compiler command line option /WX: Treats all warnings as errors
11004         - update a list of source files, included into the project
11005
11006         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11007           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
11008         changed project type to Generic Project so that can be correcly converted to VS.NET project
11009
11010         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
11011
11012         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
11013
11014         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
11015
11016         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
11017         added return 0 statements after assert() to make compiler happy
11018
11019         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
11020         added newline in the def file to keep MSC compiler satisfied
11021
11022         * sdcc/src/z80/gen.c:
11023         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
11024           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
11025         - solved MSC error in function aopDump()
11026
11027         * sdcc_vc.h: define PREFIX as "\\sdcc"
11028
11029 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
11030         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
11031
11032 2002-06-22  Scott Dattalo <scott AT dattalo.com>
11033         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
11034         - Rewrote the register banking algorithm.
11035         - Added pCode live-range analysis to registers (for now, only non-used and
11036         singly-used registers optimized away)
11037
11038         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
11039
11040         * 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.
11041
11042 2002-05-10  Scott Dattalo <scott AT dattalo.com>
11043         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
11044
11045 2002-04-22  Michael Hope  <michaelh AT vroom>
11046
11047         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
11048
11049         * configure.in (DD_COPT): Added include support required for gbdk.
11050
11051         * .version: Bumped version number just to increase it.
11052
11053         * src/SDCCmain.c: Added -nostdinc to the default options.
11054
11055 2002-04-15  Michael Hope  <michaelh AT vroom>
11056
11057         * device/lib/z80/printf.c (sprintf): Added.
11058
11059         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
11060
11061         * src/z80/peeph.def: Added transpose redundent load rule.
11062
11063         * src/z80/main.c: Added force callee saves for jaune.
11064
11065         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
11066
11067         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
11068
11069 2002-03-28  Johan Knol  <johan AT balder>
11070
11071         * src/SDCCval.c: fixed bug #532436
11072
11073 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11074         * /src/port.h:
11075         Added "char *Processor" field to the port structure.
11076
11077         * /src/SDCCmain.c:
11078         Added -p option. Allows port dependent processor to be specified.
11079
11080         * all ports:
11081         Initialized the new field char *Processor field to NULL in all ports
11082
11083         * /src/pic/*:
11084         Compiler generated registers for interrupt context saving
11085         were not getting allocated.
11086
11087 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
11088
11089         * /src/SDCCast.c:
11090         Fixed left shift. Will promote the left side of a left shift
11091         if a) left shifting more than size of operand or b) when assigned
11092         to something size > size of left side
11093
11094 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11095         * src/pic/*
11096         tons of changes. Register allocation has been
11097         rewritten. Added customization for the various PICs. Flow
11098         analysis is restructured. ...
11099
11100         * src/pic/device.h:
11101         Added
11102
11103         * src/pic/device.c:
11104         Added. device.c is a PIC port hack to accomodate variations
11105         in PIC devices.
11106
11107 2002-03-13  Michael Hope  <michaelh AT vroom>
11108
11109         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
11110
11111 2002-03-04  johanknol  <johanknol AT manik>
11112
11113         * /src/SDCCval.c: fixed
11114
11115         const unsigned char arr[][2] = { { 0, 1 } };
11116         t18.c:1: error: Initializer element is not constant
11117
11118 2002-03-04  bela  <bela AT manik>
11119
11120         * /device/include/mcs51reg.h:
11121         ds89c420 register definition update
11122
11123 2002-03-03    <johan AT FRIJA>
11124
11125         * support/Util/SDCCerr.c: did something, but don't no why anymore
11126
11127         * support/regression/tests/bug-524691.c: made it a little less shy
11128
11129         * src/SDCCast.c (decorateType): fixed bug #524697
11130
11131         * src/SDCCast.c: made some lineno improvements
11132
11133         * src/SDCCval.c (getNelements): changed warning to error
11134
11135         * src/SDCCglue.c (printIvalArray): changed warning to error
11136
11137         * src/SDCCicode.c: fixed a warning for mingw
11138
11139         * src/SDCCast.c (decorateType): fixed the << promotion for ops
11140
11141         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
11142
11143 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
11144
11145         * src/ds390/peeph.def:
11146         Added some more peephole rules
11147
11148         * src/ds390/gen.c: Various fixes & enhancements
11149
11150         * src/SDCClrange.c, src/SDCClrange.h:
11151         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
11152
11153         * src/ds390/ralloc.c:
11154         various fixes & enhancements (ds390) specific
11155
11156         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
11157         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
11158         from rallocs.
11159
11160         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
11161
11162 2002-03-02    <johan AT FRIJA>
11163
11164         * src/SDCCast.c (decorateType): fixed bug #524708
11165
11166         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
11167
11168         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
11169
11170 2002-03-01  Michael Hope  <michaelh AT vroom>
11171
11172         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
11173
11174         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
11175
11176 2002-03-01    <johan AT FRIJA>
11177
11178         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
11179
11180         * src/SDCCast.c (decorateType): fixed bug #524209
11181
11182         * src/SDCCval.c (valNot): fixed bug #524195
11183
11184 2002-02-26    <johan AT balder>
11185
11186         * src/xa51/gen.c: fixed a warning
11187
11188         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
11189
11190         * src/SDCCast.c (decorateType): fixed bug #522534
11191
11192 2002-02-23    <johan AT balder>
11193
11194         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
11195
11196 2002-02-22    <johan AT balder>
11197
11198         * src/SDCCast.c: fixed bug #514865
11199
11200         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
11201
11202 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
11203
11204         * sdcc/src/SDCCloop.c:
11205         Previous fix was not good. basic blocks that have "break" or "return" are
11206         not really partof a loop , but live ranges used in these blocks should
11207         be live thru the entire loop, so set partOfLoop but don't add them to
11208         loop region
11209
11210 2002-02-21    <johan AT FRIJA>
11211
11212         * src/SDCCcse.c: fixed bug #514308
11213
11214 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
11215
11216         * src/SDCCloop.c:
11217         Fixed BUG #519583. If a conditional block ended in a return/break
11218         statement inside a loop, it was not being considered part of the loop.
11219
11220         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
11221
11222 2002-02-10  Karl Bongers <karl AT turbobit.com>
11223
11224         * debugger/*:
11225         Fixed up SDCDB debugger somewhat.  Updated debugger/README
11226         with lots of comments and notes.
11227
11228         * device/examples/test2.c:
11229         Fix bug, "red" variable not being initialized(compiler complained).
11230
11231         * device/examples/Makefile, examples/test3.c:
11232         Add Makefile in device/examples folder, compiles test3.c
11233         for use as a multiple module SDCDB test case.
11234
11235         * sim/ucsim/cmd.src/cmdset.cc:
11236         Took out debug printfs in ucsim "next" command.
11237
11238         * sim/ucsim/xa.src:
11239         Karl and Johan start ucsim XA support.  Most dissassembly working,
11240         about 75% emulation done(plenty of work remaining).
11241
11242         * sim/ucsim/z80.src:
11243         Add Z80 support to ucsim, add test-ucz80 regression test,
11244         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
11245         Notice z80 compiler fails on examples/test3.c/crc code.
11246
11247 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
11248
11249         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
11250         Added support for --parms-in-bank1
11251
11252         * src/ds390/peeph.def:
11253         added a few more peephole optimzations
11254
11255         * src/ds390/main.c:
11256         1) added __builtin_inp & __builtin_outp used to read in data of given length
11257            from a memory mapped port
11258         2) added __builtin_memcmp
11259         3) added __builtin_swapw swap bytes of a short
11260
11261         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11262         1) handle multiple send & receives from register bank1
11263         2) ralloc can now allocate DPTR1 to some liveRanges
11264
11265         * src/SDCCsymt.c, src/SDCCsymt.h:
11266         changes to handle multiple sends & receives
11267
11268         * src/SDCCptropt.h:
11269         added some pointer arithmetic optimization
11270
11271         * src/SDCCptropt.c:
11272         added some pointer arithmetic optimizations but not stable yet so not
11273         called from anywhere (will get this working shortly)
11274
11275         * src/SDCCopt.c: fixed for multiple sends & receives
11276
11277         * src/SDCCmain.c:
11278         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11279         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11280            set preprocessor defines (depending on options)
11281
11282         * src/SDCCicode.c, src/SDCCicode.h:
11283         changes made to handle multiple sends & receives
11284
11285         * src/SDCCglobl.h:
11286         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11287
11288         * src/SDCCcse.c, src/SDCCcse.h:
11289         added function findbackward def (to be used in upcoming optimization)
11290
11291         * src/SDCCcflow.c, src/SDCCcflow.h:
11292         added function returnAtEnd - to determine if a basic block terminates with
11293         a RETURN iCode
11294
11295         * src/SDCCast.c, src/SDCCast.h:
11296         added option parms-in-bank1
11297
11298         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11299         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11300         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11301         adjusted for --parms-in-bank1 option
11302
11303         * device/include/string.h:
11304         donot redefine "reentrant" keyword
11305
11306         * device/include/ds80c390.h: Added some more SFRs
11307
11308 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11309
11310         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11311
11312 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11313
11314         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11315
11316 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11317
11318         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11319
11320 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11321
11322         * Added --xram-movc option
11323
11324 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11325
11326         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11327
11328 2002-01-11  Johan Knol
11329
11330         * Added math lib of Jesus Calvino-Fraga
11331
11332 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11333
11334         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11335         * support/regression/Makefile: new target test-mcs51-stack-auto
11336         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11337
11338 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11339
11340         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11341
11342 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11343
11344         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11345
11346 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11347
11348         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11349
11350         * src/SDCCglue.h: add definition for printIvalChar()
11351
11352 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11353
11354         * src/SDCCast.c: fix #498138 by Johan
11355
11356         * src/SDCCglue.c: fix #498138 by Johan
11357
11358 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11359
11360         * support/regression/Makefile: fix clean
11361
11362         * support/regression/ports/ds390/support.c: fix transmission of last character
11363
11364 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11365
11366         * /sdcc/src/ds390/gen.c:
11367         a) improved computing address of stack variable
11368         b) took out some #if 0 code
11369         c) improved parmBytes adjustment
11370         d) improved genPlusIncr & genMinusIncr
11371         e) genCmp could generate bad code (when left assigned to DPTR)
11372         f) Fixed bug in hasInc
11373
11374         * /sdcc/src/ds390/ralloc.c:
11375         a) packRegsForSupport could mess up live information (Fixed)
11376         b) packRegsDPTRuse could be incorrect for left & right shift
11377
11378         * /sdcc/src/mcs51/ralloc.c:
11379         packRegsForSupport could mess up the live information (Fixed)
11380
11381         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11382
11383         * /sdcc/src/SDCCast.c:
11384         can reverse a loop even if function call is present as long
11385         as the loop control variable is local & is not passed as parameter
11386
11387 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11388
11389         * /sdcc/ChangeLog: *** empty log message ***
11390
11391         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11392         More builtin function additions for TININative
11393
11394         * /sdcc/src/ds390/ralloc.c:
11395         Had broken the regression testsuite
11396
11397         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11398
11399         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11400         Added funcattr hasStackParms will be set for reentrant functions when there
11401         are paramteres on the stack, this helps in minimizing frame pointer generation
11402         typeFromStr can handle function pointers now
11403
11404         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11405         *** empty log message ***
11406
11407 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11408
11409         * /src/ds390/gen.c, /src/ds390/main.c:
11410         More builtin function additions for TININative
11411
11412         * /src/ds390/ralloc.c:
11413         Had broken the regression testsuite
11414
11415         * /src/SDCCast.c: Fixed a bug in dumptree
11416
11417         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11418         Added funcattr hasStackParms will be set for reentrant functions when there
11419         are paramteres on the stack, this helps in minimizing frame pointer generation
11420         typeFromStr can handle function pointers now
11421
11422         * /doc/builtins.txt, /doc/TININative.txt:
11423         *** empty log message ***
11424
11425
11426 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11427
11428         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11429         ALPHA version for -mTININative
11430
11431         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11432         updated to reflect changes in the port structure
11433
11434         * /src/port.h:
11435         added function do_assemble (similar to do_link) if non-null this function
11436         will be called to do assembly (-mTININative) requires a multi command
11437         assembly
11438         added function genAssemblerEnd will be called to generate assembler Epilogue
11439
11440         * /src/SDCCsymt.c:
11441         added _JavaNative to debug info printing
11442
11443         * /src/SDCCmain.c: added option --tini-libid
11444         added port->do_assemble function (-mTININative) has a multi command assemble
11445
11446         * /src/SDCCglue.c: Disabled "constExpr" check
11447         added port->genAssemblerEnd function
11448
11449         * /src/SDCCglobl.h: Added option --tini-libid value
11450
11451         * /src/SDCCast.h:
11452         tookout optimizeCompare from the header (has no external references)
11453
11454         * /src/SDCCast.c: made one more function "static"
11455
11456 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11457
11458         * src/z80/mappings.i: Added z80asm support.
11459
11460         * src/z80/main.c: Added z80asm support on --asm=z80asm
11461
11462         * src/z80/gen.c: Fixed asm portability issues.
11463
11464         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11465
11466         * src/SDCCglue.c (printExterns): Added global/extern split.
11467
11468 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11469
11470         * support/regression/Makefile: added test for mcs51 model large
11471
11472         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11473
11474         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11475
11476 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11477
11478         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11479
11480 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11481
11482         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11483
11484         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11485
11486 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11487
11488         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11489
11490         * support/regression/tests/simplefloat.c: Port to mcs51.
11491
11492 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11493         * support/regression/tests/bug-485362.c: Added.
11494
11495         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11496
11497         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11498
11499         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11500
11501         * src/z80/gen.c (aopDump): Added a dump function.
11502
11503 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11504         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11505
11506         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11507
11508         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11509
11510         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11511
11512         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11513
11514         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11515
11516         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11517
11518         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11519
11520         * support/regression/ports/ds390/support.c: Use tinibios.
11521
11522         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11523
11524 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11525
11526         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11527         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11528
11529         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11530
11531         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11532
11533 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11534
11535         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11536
11537         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11538         (packRegsForIYUse): Created and optimised.
11539
11540 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11541
11542         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11543 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11544
11545         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11546
11547         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11548
11549         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11550
11551 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11552
11553         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11554
11555         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11556
11557 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11558
11559         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11560
11561         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11562
11563         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11564
11565 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11566
11567         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11568         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11569         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11570
11571         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11572
11573         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11574         (genNotFloat): Added.
11575         (genUminusFloat): Added.
11576
11577         * device/lib/z80/Makefile: Added floating pt stubs.
11578
11579         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11580
11581         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11582
11583         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11584
11585 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11586
11587         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11588
11589         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11590
11591         * sdcc/support/regression/Makefile: Add port ds390.
11592
11593         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11594
11595         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11596
11597         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11598
11599         * sdcc/support/regression/ports/ds390/support.c: Added.
11600
11601         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11602
11603         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11604
11605         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11606
11607 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11608
11609         * device/include/malloc.h: Added z80 and gbz80 support.
11610
11611         * device/lib/gbz80/heap.s: Added.
11612
11613         * device/lib/z80/heap.s: Added.
11614
11615         * device/lib/malloc.c: Added z80 and gbz80 support.
11616
11617         * support/regression/tests/malloc.c (testMalloc): Added.
11618
11619         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11620
11621         * support/regression/tests/bug-478094.c: Added.
11622
11623         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11624
11625 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11626
11627         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11628
11629         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11630
11631         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11632
11633         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11634
11635         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11636
11637 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11638
11639         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11640
11641 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11642
11643         * support/regression/tests/bug-477927.c: Added.
11644
11645         * src/z80/peeph.def: Added minor rules.
11646
11647         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11648
11649         * src/z80/peeph.def: Added jump optimisation modification.
11650
11651 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11652
11653         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11654
11655 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11656
11657         * support/regression/tests/funptrs.c: Added.
11658
11659 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11660
11661         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11662
11663 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11664
11665         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11666
11667         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11668
11669         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11670         (movLeft2ResultLong): Created.
11671
11672         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11673         (joinPushes): Added.  Joins two char pushes into a word push.
11674
11675 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11676
11677         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11678
11679         * support/makebin/Makefile (install): Added creation of dest dir.
11680
11681 2001-10-24 Karl Bongers <karl AT turbobit.com>
11682
11683         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11684
11685 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11686
11687         * src/z80/ralloc.c: Turned off faulty pack for one use.
11688
11689         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11690
11691         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11692
11693 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11694
11695         * support/regression/Makefile: Improved clean
11696
11697         * support/regression/ports/gbz80/spec.mk: Added clean
11698
11699         * support/regression/ports/host/spec.mk: Added clean
11700
11701         * support/regression/ports/z80/spec.mk: Added clean
11702
11703         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11704
11705         * support/regression/ports/mcs51/timeout.c: little improvements
11706
11707 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11708
11709         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11710
11711         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11712
11713         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11714
11715 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11716
11717         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11718
11719         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11720
11721 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11722         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11723
11724         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11725
11726         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11727
11728         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11729
11730         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11731
11732         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11733
11734         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11735
11736         * support/regression/tests/longor.c: Added.
11737
11738 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11739
11740         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11741
11742         * as/mcs51/aslink.h: define PATH_MAX
11743
11744         * as/mcs51/asm.h: define PATH_MAX
11745
11746         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11747
11748         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11749
11750         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11751
11752         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11753
11754         * src/SDCCglobl.h: define PATH_MAX
11755
11756         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11757
11758         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11759
11760 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11761
11762         * src/z80/gen.c (gencjneshort): Fixed
11763
11764         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11765
11766 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11767
11768         * support/regression/tests/bug-469671.c: Added.
11769
11770         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11771
11772 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11773
11774         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11775
11776         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11777
11778 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11779
11780         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11781
11782         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11783
11784         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11785
11786         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11787
11788         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11789
11790         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11791
11792         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11793
11794 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11795
11796         * 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.
11797
11798         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11799
11800         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11801
11802 2001-10-07    <johan AT FRIJA>
11803
11804         * device/lib/gets.c (gets): fixed the return value.
11805
11806 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11807         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11808
11809         * 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.
11810
11811         * 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.
11812
11813         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11814
11815         * src/pic/gen.c: Removed Safe_strdup.
11816
11817         * configure.in: Added option to enable libgc support.
11818
11819         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11820         (bitVectUnion): Optimised.
11821         (bitVectIntersect): Optimised.
11822         (bitVectBitsInCommon): Optimised.
11823         (bitVectCplAnd): Optimised.
11824
11825         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11826
11827 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11828
11829         * src/SDCCmain.c: distinguish between assembler debug and plain options
11830
11831         * src/avr/main.c:   remove standard assembler options
11832
11833         * src/ds390/main.c: remove standard assembler options
11834
11835         * src/mcs51/main.c: remove standard assembler options
11836
11837         * src/port.h: removed "PENDING" comment
11838
11839 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11840
11841         * src/device/lib/_mulint.c  : new, with assember functions
11842
11843         * src/device/lib/_mullong.c : new, with assember functions
11844
11845         * src/device/lib/_divuint.c : with assember functions
11846
11847         * src/device/lib/_divsint.c : with assember functions
11848
11849         * src/device/lib/_divulong.c: with assember functions
11850
11851         * src/device/lib/_divslong.c: with assember functions
11852
11853         * src/device/lib/_moduint.c : with assember functions
11854
11855         * src/device/lib/_modsint.c : with assember functions
11856
11857         * src/device/lib/_modulong.c: with assember functions
11858
11859         * src/device/lib/_modslong.c: with assember functions
11860
11861         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11862
11863         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11864
11865         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11866                                       replaced _mululong.c and _mulslong.c by _mullong.c
11867
11868 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11869
11870         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11871
11872 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11873
11874         * src/SDCCglue.c: test, if win32api is available for MINGW
11875
11876 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11877
11878         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11879         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11880         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11881         * support/regression/ports/host/spec.mk: removed GENERIC
11882         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11883         * support/regression/ports/z80/spec.mk: removed GENERIC
11884
11885 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11886
11887         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11888
11889         * support/regression/tests/bug-467035.c: Created.
11890
11891 2001-10-01    <johan AT FRIJA>
11892
11893         * src/SDCC.y: fixed bug #466586 part 1
11894
11895 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11896
11897         * SDCCicode.c: z80 has no generic pointers
11898         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11899
11900 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11901
11902         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11903
11904 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11905
11906         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11907
11908         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11909
11910 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11911
11912         * configure.in: Fixed up so that ucsim is only configured once.
11913
11914         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11915
11916         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11917         (getPathDifference): As above.
11918
11919         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11920
11921         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11922
11923 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11924         * .version: Updated to 2.3.1
11925
11926         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11927         Added copyright header.
11928
11929         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11930         (assemble): Added support for macro based assembler commands.
11931         (linkEdit): Added support for macro based linker commands.
11932         (preProcess): Changed the pre-processor to use macros.
11933         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11934         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11935
11936         * device/lib/z80/crt0.s: Added module name for debugging.
11937
11938 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11939
11940         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11941
11942         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11943
11944         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11945
11946         * src/Makefile.in: Added SDCCmacro and SDCCutil
11947
11948 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11949
11950         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11951
11952 2001-09-16    <johan AT FRIJA>
11953
11954         * 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.
11955
11956 2001-09-15    <johan AT FRIJA>
11957
11958         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11959         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11960
11961 2001-09-11    <johan AT FRIJA>
11962
11963         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11964
11965 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11966
11967         * support/regression/tests/bug-460444.c: Added test case.
11968
11969         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11970         (genCast): Added justification for all of the asserts.
11971
11972 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11973
11974         * support/regression/support.c: _xdata replaced by xdata
11975
11976         * support/regression/spec.mk: removed _generic
11977
11978 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11979
11980         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11981
11982         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11983         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11984
11985         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11986
11987         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11988
11989         * support/regression/tests/bug-460010.c: Added test case.
11990
11991         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11992
11993 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11994
11995         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11996
11997         * support/regression/testfwk.c: removed workaround for bug #436344
11998
11999         * support/regression/tests/bp.c: use less memory with mcs51
12000
12001         * support/regression/tests/bug-441448.c: use less memory
12002
12003         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
12004
12005         * support/regression/collate-results.py: typo
12006
12007 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
12008
12009         * support/regression/tests/fetchoverlap.c: Added new test case.
12010
12011         * support/regression/tests/bp.c: Added new test case.
12012
12013         * support/regression/tests/bug-448984.c: Added new test case.
12014
12015         * support/regression/tests/pow2shifts.c: Added new test case.
12016
12017         * src/z80/gen.c: Turned off the noise it normally generates for the release.
12018         (genlshTwo): Fixed right shift for count > 8.
12019
12020         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
12021
12022 2001-09-08    <johan AT FRIJA>
12023
12024         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
12025
12026 2001-09-07    <johan AT FRIJA>
12027
12028         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
12029
12030         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
12031
12032 2001-09-06    <johan AT FRIJA>
12033
12034         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
12035         * bernhard noted me at this: "() equals to (void)" (1.38)
12036
12037 2001-09-05    <johan AT FRIJA>
12038
12039         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
12040
12041 2001-09-04    <johan AT FRIJA>
12042
12043         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
12044
12045
12046 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
12047
12048         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
12049
12050 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
12051
12052         * link/z80/aslink.h: Fixed path for PATH_MAX
12053
12054 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
12055
12056         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
12057
12058         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
12059
12060         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
12061
12062         * 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.
12063
12064 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
12065
12066         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
12067         (genCmp): Fixed up genCmp for the GB with longs.
12068
12069         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
12070
12071         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
12072
12073         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
12074
12075         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
12076
12077 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
12078
12079         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
12080
12081 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
12082
12083         * 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.
12084
12085         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
12086
12087 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
12088
12089         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
12090
12091         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
12092
12093 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
12094
12095   * sim/ucsim/configure:    little improvement of Cygwin-detection
12096   * sim/ucsim/configure.in: little improvement of Cygwin-detection
12097   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
12098   * support/regression/tests/bug-221100.c: small changes for mcs51
12099   * support/regression/tests/bug-221168.c: small changes for mcs51
12100   * support/regression/tests/bug-227710.c: small changes for mcs51
12101   * support/regression/tests/staticinit.c: small changes for mcs51
12102   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
12103   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12104   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12105
12106 $Revision$