device/include/mcs51/cc2510fx.h: added.
[fw/sdcc] / ChangeLog
1 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
2
3         * device/include/mcs51/cc2510fx.h: added
4         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
5           to projects.
6
7 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
8
9         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
10         * as/z80/Makefile.in: added strcmpi.c
11         * as/z80/z80adr.c: added upper case registers and lower case conditionals
12         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
13
14 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
15
16         * device/lib/gbz80/asm_strings.s,
17         * device/lib/gbz80/crt0_rle.s,
18         * device/lib/gbz80/div.s,
19         * device/lib/gbz80/mul.s,
20         * device/lib/gbz80/shift.s,
21         * device/lib/z80/asm_strings.s,
22         * device/lib/z80/crt0_rle.s,
23         * device/lib/z80/div.s,
24         * device/lib/z80/mul.s,
25         * device/lib/z80/shift.s: changed to all lower case menmonics except the
26           flags which are all upper case
27
28 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
29
30         * as/z80/asm.h: made CASE_SENSITIVE 1
31         * link/z80/aslink.h: made CASE_SENSITIVE 1
32         * src/z80/gen.c (throughout): made all conditionals upper case
33         * support/regression/tests/bug1503067.c: new
34
35 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
36
37         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
38           (shiftIntoPair): added case 2 for PAIR_IY,
39           (setupToPreserveCarry): replaced parameters with iCode and check if
40            PAIR_DE is in use to fix bug 1399290,
41           (genPlus, genMinus): updated call to setupToPreserveCarry
42         * support/regression/tests/bug1399290.c: new
43
44 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
45
46         * device/lib/Makefile.in (Z80SOURCES): enabled float support
47         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
48         * src/ds390/gen.c (shiftRLong),
49         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
50         * src/mcs51/gen.c (sameReg): changed to sameByte,
51           (xch_a_aopGet): new,
52           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
53            shiftRLong): fixed bug 1533966
54         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
55           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
56         * support/regression/Makefile.in: disabled z80, enabled ucz80
57         * support/regression/tests/float_trans.c: enabled test for z80 and host
58         * support/regression/tests/shifts2.c: new, for testing bug 1533966
59
60 2006-08-01 Borut Razem <borut.razem AT siol.net>
61
62         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
63           comparison is always false due to limited range of data type
64           on PPC64 machine (openpower-linux1) where "char = unsigned char"
65
66 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
67
68         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
69         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
70         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
71         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
72
73 2006-07-31 Borut Razem <borut.razem AT siol.net>
74
75         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
76           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
77           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
78           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
79           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
80           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
81           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
82           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
83           enable ucsim mingw compilation. Serial port is disabled,
84           since it uses termios.h API, which is not available on native
85           WIN32
86
87 2006-07-31 Borut Razem <borut.razem AT siol.net>
88
89         * Small Device C Compiler 2.6.0 released
90         * support/scripts/sdcc.nsi: added FULL_DOC option
91         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
92
93 2006-07-28 Borut Razem <borut.razem AT siol.net>
94
95         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
96         * doc/INSTALL.txt: updated
97
98 2006-07-27 Borut Razem <borut.razem AT siol.net>
99
100         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
101           device/lib/pic/libdev/Makefile.in: fixed bug
102           [ 1438354 ] pic libsdcc: distclean doesn't work
103         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
104           device/lib/pic16/libio/Makefile.in: fixed bug
105           [ 1438344 ] pic16 lib: clean doesn't work properly
106         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
107
108 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
109
110         * device/lib/pic/libsdcc/fsdiv.c,
111         * device/lib/pic/libsdcc/fsmul.c,
112         * device/lib/pic16/libsdcc/float/fsdiv.c,
113         * device/lib/pic16/libsdcc/float/fsmul.c,
114         * device/lib/_fsdiv.c,
115         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
116         * support/regression/tests/bug1520966.c: added
117         * doc/knownbugs.html: removed [ 1520966 ] from the list
118
119 2006-07-25 Borut Razem <borut.razem AT siol.net>
120
121         * configure.in, configure, sdccconf_in.h: fixed bug
122           [ 1519095 ] regression test onebyte.c fails on ppc64 host
123         * doc/knownbugs.html: removed [ 1519095 ] from the list
124
125 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
126
127         * doc/knownbugs.html: added, contains list of known bugs at release
128         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
129
130 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
131
132         * device/include/mcs51/compiler.h: added SFRX for xdata based special
133           function registers and corrected defaults with additional warning
134         * device/lib/malloc.c: cosmetic changes
135         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
136         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
137           (fillGaps): and used it
138
139 2006-07-20 Raphael Neider <rneider AT web.de>
140
141         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
142           output unless SDCCPICDEBUG is set
143         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
144           output if SILENT is set
145
146 2006-07-11 Borut Razem <borut.razem AT siol.net>
147
148         * doc/README.txt: updated
149
150 2006-07-10 Borut Razem <borut.razem AT siol.net>
151
152         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
153           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
154           in WIN32 installation
155         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
156           release candidate 1
157
158 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
159
160         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
161         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
162
163 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
164
165         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
166
167 2006-07-06 Borut Razem <borut.razem AT siol.net>
168
169         * support/regression/tests/bitfields.c:
170           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
171         * support/regression/tests/constantRange.c:
172           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
173
174 2006-07-04 Borut Razem <borut.razem AT siol.net>
175
176         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
177           src/port.mk,
178           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
179           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
180           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
181           reverted changes from 2006-07-03
182         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
183         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
184           added CPPFLAGS, used by the host port
185
186 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
187
188         * support/regression/valdiag/tests/switch.c,
189         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
190         * support/regression/tests/libmullong.c: fixed for host
191         * support/regression/ports/host/spec.mk: disable all warnings for host,
192         SDCC runs with --less-pedantic too
193
194 2006-07-03 Borut Razem <borut.razem AT siol.net>
195
196         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
197           defined CPPFLAGS
198         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
199         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
200           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
201           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
202           include ../port.mk
203         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
204           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
205           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
206           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
207
208 2006-07-02 Raphael Neider <rneider AT web.de>
209
210         * src/pic16/devices.inc,
211         * device/include/pic16/pic18fregs.h,
212         * device/include/pic16/pic18f4550.h,
213         * device/lib/pic16/pics.all,
214         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
215
216 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
217
218         * as/hc08/lkaomf51.c (OutputName),
219         * as/mcs51/lkaomf51.c (OutputName),
220         * as/z80/asmain.c (asmbl),
221         * src/ds390/main.c (asmLineNodeFromLineNode),
222         * src/hc08/ralloc.c (hc08_assignRegisters),
223         * src/mcs51/main.c (asmLineNodeFromLineNode),
224         * src/xa51/ralloc.c (checkRegMask),
225         * src/xa51/gen.c (emitcode),
226         * src/z80/gen.c (_emit2),
227         * src/SDCCast.c (searchLitOp),
228         * src/SDCCglobl.h,
229         * support/packihx/packihx.c,
230         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
231         * src/ds390/gen.c (aopPutUsesAcc),
232         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
233         * support/regression/tests/libmullong.c (mullong_wrapper),
234         * src/SDCCsymt.c (powof2),
235         * src/SDCCast.c,
236         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
237         * src/SDCCsymt.h: added TYPE_TARGET_*
238         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
239         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
240         SDCCast because 1) header problems 2) this is the right place
241         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
242         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
243         prototype
244
245 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
246
247         * src/SDCCicode.h: removed buggy semicolon in unused macro
248         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
249         search for previous definiton of auto symbols too,
250         (findPrevUse): fixed logic of emitWarnings
251
252 2006-06-26 Raphael Neider <rneider AT web.de>
253
254         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
255           PCLATH and PCLATU on interrupts, potentially fixes #1505141
256
257 2006-06-25 Raphael Neider <rneider AT web.de>
258
259         * device/lib/pic/libm: NEW, added math library functions
260         * device/lib/pic/libsdcc: NEW; added float support functions
261         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
262         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
263           NEW, added math related headers
264         * device/include/asm/pic/features.h: NEW
265         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
266           (popGet): allow larger offsets for AOP_PCODE,
267           (genDataPointerSet): handle literals explicitly, more debug output,
268           (genAssign): fixed for float using aopLiteral ;-)
269         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
270           GOTO initialisation routine
271         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
272           flag on registers, fixes #1469043 (local variables do not work)
273         * src/pic/main.c (_pic14_do_link),
274         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
275           available
276
277 2006-06-25 Borut Razem <borut.razem AT siol.net>
278
279         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
280           characters printed (not including the trailing '\0' used to end
281           output to strings). Problem detected in regression test bug-927659.c.
282           NOTE: printf() family functions should return int instead
283           unsigned int!
284         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
285           specifier are printed as themselves
286         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
287           support flags, width and precision specifiers
288
289 2006-06-24 Borut Razem <borut.razem AT siol.net>
290
291         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
292           to the list of sdcc tagrets not supporting bit type
293         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
294           testfor pic16 due to bug:
295           [ 1511794 ] pic16: regression test bug-895992.c fails
296
297 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
298
299         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
300         * src/SDCCglue.c (initPointer), fixed bug 1496419
301         * support/regression/tests/bug1496419.c: new, added
302
303 2006-06-22 Borut Razem <borut.razem AT siol.net>
304
305         * support/regression/ports/pic16/support.c: use gpsim usart module from
306           libgpsim_modules library
307
308 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
309
310         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
311         IP0H to IPH0.
312
313 2006-06-19 Raphael Neider <rneider AT web.de>
314
315         * src/pic/glue.h,src/pic16/glue.h: added prototypes
316         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
317           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
318           (pic14printExterns,pic14printPublics,pic16printPublics,
319           pic16_printExterns): use new functions to emit symbols
320           (picglue,pic16glue): emit publics before emitting externs
321         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
322           locally defined functions to avoid bug #1443651
323         * support/regression/tests/bug-716242.c: removed pic16 workaround
324         * support/regression/ports/pic16/spec.mk: ignore errors during build
325
326 2006-06-19 Raphael Neider <rneider AT web.de>
327
328         * src/pic/glue.h: added pic14aopLiteral prototype
329         * src/pic/glue.c (pic14aopLiteral): return unsigned int
330         * src/pic/gen.c: removed stdint.h dependency
331           (aopGet): use Safe_strdup()
332           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
333           (genDataPointerSet): use pic14aopLiteral()
334         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
335           for pic16; thanks to Bernhard and Maarten
336
337 2006-06-18 Borut Razem <borut.razem AT siol.net>
338
339         * support/regression/tests/structflexarray.c: flexible array members
340           not supported by gcc < 3
341         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
342           GUI tool by default
343         * src/pic/gen.c: don't include [p]strdin.h on solaris
344         * support/Util/pstdint.h: addad svn attributes
345         * support/regression/tests/constantRange.c,
346           support/regression/tests/rotate.c: include inttypes.h instead
347           stdint.h on solaris, addad svn attributes
348
349 2006-06-18 Raphael Neider <rneider AT web.de>
350
351         * src/SDCCsymt.c (initCSupport): change return type of divschar to
352           int for PIC16
353         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
354           (pic16_genMinusBits): simplified sign-extension
355           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
356             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
357             adjusted to correctly handle mixed-signed operands, disabled
358             now unused multiplciation routines
359         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
360           (assignResultValue): added argument denoting the size of the result
361             as returned by the function (fixes upcasts in assigning from
362             function calls: char foo(); int i = foo();)
363           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
364             function result to assignResultValue
365           (genMult): disabled inlined multiplication code
366           (genDiv): augmented to also handle the modulus operator, fixed to
367             handle mixed-signed operands correctly
368           (genMod): simply call genDiv, disabled unused code
369           (genAssign): fixed missing (sign-)extension on result
370         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
371             valid char operands, allow signed operands for native code, added
372             division and modulo operator handling
373         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
374
375         As a consequence, onebyte.c (if split into two files) and muldiv.c
376         pass regression tests.
377
378 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
379
380         * doc/Makefile.in: two runs of makeindex seem needed to get
381         correct page references in the index of sdccman.pdf
382         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
383
384 2006-06-17 Borut Razem <borut.razem AT siol.net>
385
386         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
387
388 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
389
390         * doc/sdccman.lyx: updated, added (porting source code, debugging),
391         mentioned ec2drv and paulmon
392
393 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
394
395         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
396           consecutive abs areas
397           (find_empty_space, allocate_space): added map to handle codemap or
398            xdatamap,
399           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
400            absolute idata and xdata
401         * as/mcs51/lkmem.c (summary2): updated legend
402
403 2006-06-16 Raphael Neider <rneider AT web.de>
404
405         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
406
407 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
408
409         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
410           1208515
411         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
412
413 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
414
415         * src/port.h (struct PORT): added field gp_tags, to hold the tag
416         value of generic pointers,
417         * src/avr/main.c,
418           src/ds390/main.c,
419           src/hc08/main.c,
420           src/izt/i186.c,
421           src/izt/tlcs900h.c,
422           src/mcs51/main.c,
423           src/pic/main.c,
424           src/pic16/main.c,
425           src/xa51/main.c,
426           src/z80/main.c: PORT structure, added elements for gp_tags field,
427         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
428         fields in the PORT structure of each port,
429         * src/SDCCast.c (decorateType): allow processing of generic pointers
430         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
431         S_FIXED symbols
432
433 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
434
435         * link/z80/lkgb.c,
436         * link/z80/lkgg.c,
437         * src/pic16/gen.c,
438         * src/pic16/main.c,
439         * src/pic16/pcode.c,
440         * src/pic/main.c,
441         * src/pic/pcoderegs.c,
442         * src/SDCCicode.c,
443         * src/SDCCmain.c,
444         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
445           bug 1504689 on minGW
446
447 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
448
449         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
450
451 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
452
453         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
454
455 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
456
457         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
458           for optimization
459
460 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
461
462         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
463         to a char variable. Fixed bug #1504211
464         * device/include/pic16/adc.h,
465         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
466         and fixed bug #1364390
467
468 2006-06-10 Borut Razem <borut.razem AT siol.net>
469
470         * CVSROOT: removed the CVS left-over
471
472 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
473
474         * as/hc08/asmain.c (asexit),
475         * as/hc08/lkmain.c (lkexit),
476         * as/mcs51/asmain.c (asexit),
477         * as/mcs51/lkmain.c (lkexit),
478         * src/SDCCglue.c (DEFSETFUNC),
479         * src/SDCCmain.c (linkEdit, assemble),
480         * support/librarian/sdcclib.c (AddRel),
481           replaced unlink() by standard C remove()
482         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
483         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
484           gatherImplicitVariables): new, added to fix bug 608752,
485           (createFunction): added gatherImplicitVariables()
486         * src/SDCCast.h: added createRMW prototype
487         * src/SDCCsymt.h (struct symbol): added infertype
488         * support/regression/tests/bug608752.c: new, added
489
490 2006-06-10 Raphael Neider <rneider AT web.de>
491
492         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
493           multibyte dummy reads (fixes #1503234)
494
495 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
496
497         * device/include/mcs51/compiler.h: new, added header file to enable
498           creating common sfr definition header files for different compilers
499
500 2006-06-05 Raphael Neider <rneider AT web.de>
501
502         * src/pic16/{pcode.h,genarith.c}:
503           introduced pCodeOp combining any two pCodeOps (previously only
504           two register operands could be combined), removed pcop2 from
505           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
506         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
507         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
508           rewritten to use new PO_TWO_OPS
509         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
510         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
511           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
512           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
513           (pic16_get_op): embraced return arg to allow #define return(x),
514             added new case for combined opcodes
515           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
516           (pic16_pCode2str,pic16_getRegFrompCodeOp,
517            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
518
519 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
520
521         * src/SDCCval.c (checkConstantRange): added
522         * src/SDCCval.h: added checkConstantRange
523         * support/Util/SDCCerr.c,
524         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
525         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
526         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
527         * src/SDCCast.c (decorateType): added checkConstantRange,
528         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
529         can be emitted with the correct always true/false warning,
530         added optimization for double '!';
531         result of decorateType() must be assigned back to the tree, because
532         decorateType() can change the tree
533         * src/SDCCicode.c (geniCodeLogic),
534         (geniCodeAssign): replaced new checkConstantRange, added warnings,
535         (checkConstantRange): removed, it was only a fragment which never
536         emitted a warning
537         * src/SDCCsymt.c (computeType): fixed promotion for
538         "-1 < (unsigned bit) b"
539         * src/pic/ralloc.c (packRegsForAssign),
540         * src/pic16/ralloc.c (packRegsForAssign),
541         * src/hc08/ralloc.c (packRegsForAssign),
542         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
543         from mcs51
544         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
545         * support/regression/tests/constantRange.c: added
546         * support/valdiag/tests/constantRange.c: added
547         * support/valdiag/valdiag.py: added -DPORT_HOST=1
548
549 2006-06-02 Borut Razem <borut.razem AT siol.net>
550
551         * support/regression/ports/pic16/support.c: increase stack size
552           to 255 bytes
553         * support/regression/Makefile.in: sort tests by name so that the
554           resutlts can be compared on different machines / platforms
555
556 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
557
558         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
559         * src/ds390/gen.c (emitLabel): new, added,
560           (genDjnz): fixed stack overflow bug,
561           (throughout): cosmetic changes to sync with mcs51/gen.c,
562           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
563         * src/mcs51/gen.c (genEndFunction): small optimization,
564           (throughout): cosmetic changes to sync with ds390/gen.c
565
566 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
567
568         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
569           (_print_format): fixed printing pointers
570         * src/mcs51/gen.c (emitLabel, movb): new, added,
571           (genAssign): small optimization,
572           (genDjnz): fixed stack overflow bug,
573           (throughout): replaced sprintf with SNPRINTF,
574           replaced mcs51_regWithIdx with REG_WITH_INDEX,
575           replaced emitcode("mov", "b,...") with MOVB(...),
576           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
577           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
578         * src/mcs51/peeph.def: added rules 140 and 264
579         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
580           so they may get optimized into registers
581
582 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
583
584         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
585           immediately when encountered,
586           (printUsage): always use stderr even on windows
587
588 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
589
590         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
591         (processParms): fixed bug #1247551
592         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
593         parseCmdLine, main): print '--version' to stdout,
594         print 'help' to stdout if --help is given,
595         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
596         arguments are given; fixed --help
597
598 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
599
600         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
601         * support/regression/tests/bug-1493710.c: added
602
603 2006-05-27 Borut Razem <borut.razem AT siol.net>
604
605         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
606           static instead auto
607         * support/regression/ports/pic16/support.c: increase stack size
608           from default 64 bytes to 128 bytes
609         * support/regression/tests/staticinit.c,
610           support/regression/tests/float.c: regression tests fully enabled
611           for pic16 port by putting the initialized data arrays into the code
612           section
613         * support/regression/ports/pic16/spec.mk: don't link default libraries.
614           This was changed by mistake in the previous version.
615
616 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
617
618         * src/pic16/gen.c (genFunction, genEndFunction): some
619         beautifications, fixed bug with falsely restoring FSR2 in large
620         stack model, thanks to Beau E. Cox for reporting the bug
621
622 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
623
624         * debugger/mcs51/break.c,
625         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
626           use %p to print pointers, made address variables unsigned
627         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
628         * debugger/mcs51/symtab.c (parseSymbol): must return something
629         * src/mcs51/gen.c (aopForSym): small optimization,
630            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
631           (freeAsmop): added missing break,
632           (aopPut): removed parameter bvolatile, determine it inside the function,
633           (saveRegisters, unsaveRegisters): small optimization,
634           (genIpush): removed pointless check,
635           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
636           replaced sprintf with SNPRINTF,
637           replaced strcpy with strncpyz,
638           updated aopPut calls,
639           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
640         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
641
642 2006-05-24 Borut Razem <borut.razem AT siol.net>
643
644         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
645           modification of test for the pic16 port, put the array to the code
646           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
647
648 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
649
650         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
651         * support/Util/pstdint.h: added
652
653 2006-05-22 Borut Razem <borut.razem AT siol.net>
654
655         * src/regression/Makefile: removed bool2.c test, added -q linker option
656         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
657           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
658           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
659           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
660           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
661           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
662           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
663           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
664           define SUPPORT_BIT_TYPES 0, removed unused bit variables
665
666 2006-05-22 Raphael Neider <rneider AT web.de>
667
668         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
669           bug #1492360 (problematic due to generic pointers, see code)
670
671 2006-05-22 Borut Razem <borut.razem AT siol.net>
672
673         * support/regression/ports/pic16/specs.mk: removed stack size linker
674           directive
675         * support/regression/tests/array.c,
676           support/regression/tests/bitopcse.c,
677           support/regression/tests/bug-908454.c,
678           support/regression/tests/malloc.c: modified for pic16 regression test
679         * support/regression/tests/bitfields.c:
680           pic16 - excluded bitfileds of size > 8
681         * support/regression/tests/bp.c: pic16 - reduced data size
682         * support/regression/tests/bug-221100.c: pic16 - reduced data size
683         * support/regression/tests/bug-460010.c:
684           pic16 - used the absolute address the fits in memory
685         * support/regression/tests/bug-716242.c:
686           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
687         * support/regression/tests/float.c:
688           pic16 - excluded - data size too big
689         * support/regression/tests/onebyte.c:
690           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
691         * support/regression/tests/shifts.c:
692           pic16 - function names probably have to differ in first X characters
693           (gpasm limitation?)
694         * support/regression/tests/staticinit.c:
695           pic16 - excluded some tests due error: no target memory available for
696           section ".idata"
697
698 2006-05-22 Borut Razem <borut.razem AT siol.net>
699
700         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
701           second try. Thanks Stas Sergeev once more.
702
703 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
704
705         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
706           (genLeftShift, genRightShift): fixed bug 1491627
707         * src/hc08/peeph.def (rules 7, 8.x): added
708         * support/regression/tests/shifts.c (ShiftLeftByParam,
709           ShiftRightByParam, testShiftByParam): added to test variable shifting
710
711 2006-05-20 Raphael Neider <rneider AT web.de>
712
713         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
714         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
715           (allocReg): add only new registers to dynAllocRegs,
716           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
717             #1489055, #1445850, and probably #1483693
718
719 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
720
721         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
722         bug in for-loop that didn't emit the last of CONFIG and ID registers
723
724 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
725
726         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
727           with offset
728         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
729           1489016, 1434401 and 1490124
730         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
731           1489016, 1434401 and 1490124
732
733 2006-05-17 Borut Razem <borut.razem AT siol.net>
734
735         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
736           thanks Stas Sergeev
737
738 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
739
740         * device/include/mcs51/P89c51RD2.h,
741         * device/include/mcs51/P89LPC901.h,
742         * device/include/mcs51/P89LPC922.h,
743         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
744
745 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
746
747         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
748         to fix missing stack pragma in compiled binary object file,
749
750 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
751
752         * support/packihx/configure.in,
753         * support/packihx/configure: removed warning, autoconf >= 2.5x can
754         determine sizeof basic types even while cross compiling
755
756 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
757
758         * src/avr/gen.c (aopop),
759         * src/ds390/gen.c (aopOp),
760         * src/hc08/gen.c (aopOp),
761         * src/mcs51/gen.c (aopop),
762         * src/pic16/gen.c (pic16_aopOp),
763         * src/pic/gen.c (aopOp),
764         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
765         if size of operand is smaller than spill location
766
767 2006-05-12 Borut Razem <borut.razem AT siol.net>
768
769         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
770           have to have CR/LF line endings even if they are checked out on *nix
771           or on WIN32 in cygwin binmode
772
773 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
774
775         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
776         * device/include/ds80c390.h: added sfr16 definitions
777         * src/ds390/gen.c,
778         * src/ds390/gen.h,
779         * src/ds390/main.c,
780         * src/ds390/ralloc.c,
781         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
782           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
783           bit returning functions
784         * support/regression/tests/sfr16.c: enabled test on ds390
785
786 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
787
788         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
789         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
790
791 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
792
793         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
794         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
795           (cl_address_space constructor): removed expensive initialization,
796           (cl_address_space::get_cell): extended for late initialization,
797           (cl_address_space::*): use late initialization,
798           (cl_address_decoder::activate): removed expensive initialization,
799           This reduced regression test running time by 25%
800
801 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
802
803         * packihx/,
804         * configure.in,
805         * configure,
806         * sdcc.dsw,
807         * Makefile.bcc,
808         * Makefile.in,
809         * support/packihx/Makefile.in,
810         * support/packihx/clean.mk,
811         * support/packihx/Makefile.bcc,
812         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
813
814 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
815
816         * src/SDCCval.c (valNot): fix for regression test failure
817           of not.c on big endian hosts
818
819 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
820
821         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
822
823 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
824
825         * device/lib/mcs51/Makefile.in: changed string comparison operator
826           to = for POSIX compliance; == is bash extension
827
828 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
829
830         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
831           kosmonaut_pirx
832
833 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
834
835         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
836         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
837         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
838         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
839         bug report #1478657,
840
841 2006-05-05 Borut Razem <borut.razem AT siol.net>
842
843         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
844           making the html
845
846 2006-05-02 Borut Razem <borut.razem AT siol.net>
847
848         * doc/Makefile.in: removed *.ind dependency since there is no rule to
849           create *.ind, which made make to fail if invoked with -j 2
850
851 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
852
853         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
854           Hubert Sack for patch 1479782
855
856 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
857
858         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
859
860 2006-05-01 Raphael Neider <rneider AT web.de>
861
862         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
863           (create_pic): store only prefix-free device name,
864           (init_pic): check for device names with "16" prefix,
865           (list_valid_pics),
866         * src/pic/device.h (struct PIC_device),
867         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
868             stored device name,
869         * device/include/pic/pic12f{635,675,629,683}.h,
870         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
871         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
872         * device/include/pic/pic16f505.h,
873         * device/lib/pic/libdev/pic16f505.c: removed
874         * device/include/pic/pic14devices.txt: added support for pic12f
875             devices, removed unsupported non 16-bit devices
876             [above changes provided by patch from Zik Saleeba]
877         * src/pic/*, src/pic16/*, device/include/pic16/*,
878           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
879
880 2006-05-01 Borut Razem <borut.razem AT siol.net>
881
882         * configure.in, configure, doc/Makefile.in:
883           sync with nightly build makefile - latex, dvipdf and dvips
884           not needed any more
885
886 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
887
888         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
889         in the library source
890
891 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
892
893         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
894
895 2006-04-28 Raphael Neider <rneider AT web.de>
896
897         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
898         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
899           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
900         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
901
902 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
903
904         * device/lib/pic/libdev/Makefile.in,
905         * device/lib/hc08/Makefile.in,
906         * device/lib/gbz80/Makefile.in,
907         * device/lib/z80/Makefile.in,
908         * device/lib/ds390/Makefile.in,
909         * device/lib/ds400/Makefile.in: added srcdir to include search path,
910         thanks to Borut for the bug report
911         * configure.in,
912         * configure: always create doc/Makefile independent from --enable-doc
913         * Makefile.in: always install from directory doc independent from
914         --enable-doc
915         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
916         removed
917         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
918         * doc/Makefile.in: install *.txt if present
919         * device/include/Makefile.in (install): added installation of pic/*.inc
920         and pic/*.txt files again, they were erroneously removed
921
922 2006-04-28 Raphael Neider <rneider AT web.de>
923
924         * src/pic/{gen.c,main.h,pcode.c},
925         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
926             concerning signedness with casts
927
928 2006-04-28 Raphael Neider <rneider AT web.de>
929
930         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
931             definition of an interrupt handler,
932         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
933             interrupt handler stuff from picglue() to separate routine,
934           (picglue): enabled definition of intr handlers in files w/o main()
935
936 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
937
938         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
939           compilation with MSVC 2005 Express Edition (VC8)
940
941 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
942
943         * device/lib/Makefile: fixed build of gbz80 lib
944
945 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
946
947         * support/regression/tests/bug-460010.c,
948         * support/regression/tests/bug-524691.c,
949         * support/regression/tests/bug-716242.c: removed conditional defines
950           that are already in testfwk.h
951
952 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
953
954         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
955           (AccAXRsh1): added, shift right by 1,
956           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
957            AccAXLrl1
958         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
959
960 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
961
962         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
963         remove cast to same type
964         * src/SDCCast.c (decorateType): fix for RFE 1475742,
965         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
966         * as/z80/Makefile,
967         * link/z80/Makefile: removed, they have moved to
968         Makefile.in files
969         * configure,
970         * configure.in: replaced duplicate message about ucsim by missing sdcpp
971         * install-sh: fix bug #1204398 by setting umask 0022
972         * device/lib/Makefile: separate build of z80 and gbz80 lib
973
974 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
975
976         Enabled VPATH feature: changed nearly all Makefiles (149 files).
977         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
978
979         One basic decision: e.g. src/clean.mk includes further files. In order
980         to make this work there are two solutions:
981         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
982           run configure on them. This way they can use
983           'include $(srcdir)/port-clean.mk'
984         - always include clean.mk by the Makefile at the same level. To avoid
985           that `make clean` tries to include and build Makefile.dep the
986           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
987           implemented, because now even `make uninstall` doesn't create
988           Makefile.in. clean.mk could be eliminated by pasting it in
989           Makefile.in.
990
991         * debugger/mcs51/Makefile.in: build own objects from library sources
992         (SLIB, SDCC) in current directory
993
994         * configure, configure.in: renamed --disable-device-lib-build in
995         --disable-device-lib; added --enable-doc, the required tools are
996         searched by configure; added result message; the toolchain for the
997         belonging ports are now only built, if the port is enabled.
998
999         * support/regression/*: all output is written in directory gen, because
1000         the fwk and ports directories don't livet in the build tree using vpath
1001
1002         * doc/sdccman.lyx: renamed --disable-device-lib-build to
1003         --disable-device-lib, added --enable-doc, added section VPATH
1004
1005         * sim/ucsim/configure.in,
1006         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
1007         z80 are enabled by default
1008
1009 2006-04-24 Raphael Neider <rneider AT web.de>
1010
1011         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
1012             to config word, "pic14_"-prefixed some extern functions
1013           (pic14_emitConfigWord): emit __config directive(s) if assignment to
1014             config word has been found
1015         * src/pic/device.h: added prototypes
1016         * src/pic/pcode.c: added "pic14_"-prefix where needed
1017         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
1018             fixup
1019         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
1020             words,
1021           (pic14emitRegularMap): ignore config words,
1022           (pic14createInterruptVect): moved generating __config directives away
1023           (picglue): have __config directives emitted
1024
1025 2006-04-24 Borut Razem <borut.razem AT siol.net>
1026
1027         * doc/Makefile: sync with nightly build makefile
1028
1029 2006-04-24 Raphael Neider <rneider AT web.de>
1030
1031         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
1032             registers that have not been assigned proper liveranges,
1033             fixes #1469504 and #1474602,
1034           (pCodeRegOptimizeRegUsage): fixed typo in comment
1035
1036 2006-04-24 Borut Razem <borut.razem AT siol.net>
1037
1038         * device/examples/main8051.c: deleted - it was removed from CVS
1039           24.mar.2000 and after that modified 18.feb.2001, so it reappered
1040           after the transition to Subversion
1041         * src/SDCCalloc.h: deleted - it was removed  from CVS
1042           3.feb.2001 and after that modified 18.feb.2001, so it reappered
1043           after the transition to Subversion
1044         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
1045           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
1046           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
1047           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
1048
1049 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
1050
1051         * as/asx8051.dsp: added mcs51/strcmpi.h
1052         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
1053         * as/hc08/aslink.h: updated lnksect prototype
1054         * as/hc08/asm.h,
1055         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
1056         * as/hc08/asmain.c,
1057         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
1058           (newdot): handle A_ABS
1059         * as/hc08/asout.c,
1060         * as/mcs51/asout.c (outarea): output address
1061         * as/hc08/lkaomf51.c,
1062         * as/mcs51/lkaomf51.c: disabled unused array UsageType
1063         * as/hc08/m08pst.c,
1064         * as/mcs51/i51pst.c,
1065         * as/z80/z80pst.c: "ABS" is not A_OVR
1066         * as/hc08/lkarea.c (newarea): read a_addr,
1067           (lnkarea): added codemap array, sort absolute areas to the front,
1068            combine all GSINITx/GSFINAL,
1069           (find_empty_space, allocate_space): new functions,
1070           (lnksect): return next address, handle absolute sections
1071         * as/mcs51/lkarea.c (newarea): read a_addr,
1072           lnksect2 prototype changed,
1073           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
1074           (find_empty_space, allocate_space): new, factored out of lnksect2,
1075           (lnksect2): return next address, handle absolute sections
1076         * as/hc08/lkhead.c,
1077         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
1078         * as/hc08/lklibr.c (addfile, fndsym),
1079         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
1080           index out of range and detect both '\' and '/'
1081         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
1082         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
1083           regression tests (ds390 cannot return bool yet)
1084         * doc/sdccman.lyx: changed version number, document changed --no-peep,
1085           document critical interrupts on z80, document changed SDCC define
1086         * src/asm.c (_asxxxx_mapping): fixed .org directive,
1087           (_a390_mapping): added .org directive
1088         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
1089           (genMultOneByte): fixed warnings
1090         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
1091           ones
1092         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
1093         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
1094           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
1095         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
1096         * src/pic16/main.c: removed newReg prototype
1097         * src/pic16/pcode.c,
1098         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
1099           warnings
1100         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
1101           ones
1102         * src/pic16/ralloc.c
1103         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
1104           to fix warnings
1105         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
1106           from short to PIC_OPTYPE
1107         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
1108         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
1109           optype from short to PIC_OPTYPE
1110         * src/port.h: made int_size unsigned to fix warnings
1111         * src/SDCC.y: fixed warning on MSVC
1112         * src/SDCCicode.c (getArraySizePtr): return unsigned int
1113         * src/SDCCopt.c (convertToFcall): fixed warnings
1114         * src/SDCCsymt.h: removed double prototype for genSymName
1115         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
1116           offset int to fix warnings
1117
1118 2006-04-22 Borut Razem <borut.razem AT siol.net>
1119
1120         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1121           references to CVS replaced with Subversion
1122
1123 2006-04-21 Borut Razem <borut.razem AT siol.net>
1124
1125         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1126           references to CVS replaced with Subversion
1127
1128 2006-04-19 Borut Razem <borut.razem AT siol.net>
1129
1130         * src/version.awk: adapted for svn
1131         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
1132           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
1133           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
1134           /binutils-avr/etc/*.vi, *.jin: removed all properties
1135           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
1136
1137 2006-04-19 Borut Razem <borut.razem AT siol.net>
1138
1139         * CVS to Subversion migration completed
1140
1141 2006-04-18 Borut Razem <borut.razem AT siol.net>
1142
1143         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
1144           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
1145
1146 2006-04-17 Borut Razem <borut.razem AT siol.net>
1147
1148         * device/include/Makefile.in: added pic/*.inc to the installation
1149
1150 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
1151
1152         * support/regression/collate-results.py: fixed output in case of
1153         a valdiag error
1154         * support/regression/generate-cases.py: fixed splitting of pathnames
1155         with dots
1156         * as/hc08/lklibr.c (addfile),
1157         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
1158
1159 2006-04-11 Raphael Neider <rneider AT web.de>
1160
1161         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
1162         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
1163         * src/pic16/pcode.c (assignValnums): fixed #1460578
1164
1165 2006-04-11 Raphael Neider <rneider AT web.de>
1166
1167         * device/lib/pic/libdev/*.c,
1168         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
1169           fixes #1468739, enables compilation in --std-c99 mode
1170         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
1171
1172 2006-04-11 Raphael Neider <rneider AT web.de>
1173
1174         * src/pic/device.c (find_device): removed debug output
1175           (list_valid_pics): enabled verbose listing of supported devices
1176         * device/include/stdbool.h: define bool as char for pic14/16 as well
1177
1178 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1179
1180         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
1181
1182 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1183
1184         * .version: bumped version to 2.5.6
1185         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
1186
1187 2006-04-06 Raphael Neider <rneider AT web.de>
1188
1189         * .version: bumped version to 2.5.6 (pic14 ABI changed)
1190         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
1191         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
1192           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
1193             pic14_constructAbsMap
1194           (pic14printPublics): declare absolute global symbols as global
1195           (pic14createInterruptVect),
1196         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
1197           (newReg): assume new registers unused, use correct name in
1198             hashtable (reg->name instead of name), more debugLog output
1199         * src/pic/device.h (PIC_device): added fields for verbose output
1200         * src/pic/device.c: moved device definition to pic14devices.txt,
1201             added routines for runtime parsing of pic14devices.txt,
1202             added support for second config word
1203         * src/pic/main.c (_process_pragma): removed #pragma maxram,
1204           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
1205           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
1206           (_pic14_parseOptions): moved pCodeInitRegisters here
1207           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
1208         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
1209           (pCodeInitRegisters): rewrapped comments, perpared new approach to
1210             handling the pseudo stack
1211         * device/lib/Makefile.in: ignore failures in objects-pic16,
1212         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
1213         * device/lib/pic/NEWS: document new dependency on picXXX.lib
1214         * device/lib/pic/Makefile.subdir,
1215         * device/lib/pic16/Makefile.subdir: improved clean rules
1216         * device/lib/pic/libdev/: NEW, pic14 device libraries
1217         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
1218         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
1219         * device/include/Makefile.in: create subdir and install pic14 headers
1220         * device/include/pic/p16f_common.inc: removed unused declarations
1221         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
1222             PICs from inc2h.pl v1.6,
1223             replaced BIT_AT macros with struct declarations
1224         * device/include/pic/pic14devices.txt: definition of supported devices,
1225             all above improvements contributed by Zik Saleeba, thanks
1226         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
1227         * support/scripts/sdcc.nsi: also install pic14 device libraries and
1228             headers
1229
1230 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1231
1232         * device/include/mcs51/c8051f410.h: added interrupt numbers,
1233         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
1234           thanks to Charles Olds
1235
1236 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1237
1238         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
1239
1240 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1241
1242         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
1243         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
1244         * support/regression/bug1464657.c: added, new test
1245
1246 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1247
1248         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
1249           version number
1250
1251 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1252
1253         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
1254           --no-peep and --peep-file <file> are used don't use default rules but
1255           do use the <file>
1256
1257 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
1258
1259         * src/mcs51/gen.c (genCall): fixed bug 1457608
1260
1261 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1262
1263         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
1264         changes seem to cause (trigger?) problems with the build system.
1265
1266 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
1267
1268         * src/SDCCpeeph.c (operandsLiteral): new, added,
1269           (callFuncByName): inserted operandsLiteral
1270         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
1271
1272 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1273
1274         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
1275         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
1276
1277 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1278
1279         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
1280           implemented patch 1120823 Thanks to Willy De la Court (normal
1281           interrupts need an interrupt number now if they are made critical),
1282           and enabled nesting of critical functions though not for gbz80
1283           (genCritical, genEndCritical): added functions
1284           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
1285         * src/z80/mappings.i: added "ei" to all mappings
1286
1287 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1288
1289         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
1290         submitted by the Debian SDCC maintainer Aurelien Jarno:
1291         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
1292         archive with gcc 4.1 on mips and wrote the patch"
1293
1294 2006-03-16 Raphael Neider <rneider AT web.de>
1295
1296         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
1297           the left operand is shorter than the result (c* = lit-c* + int),
1298           fixes bug #1450796
1299         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
1300           OP_SYMBOL
1301
1302 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1303
1304         * src/.version: increased version number to 2.5.5
1305         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
1306         linking is done manually in pic16 port's _linkEdit,
1307         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
1308         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
1309         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
1310         allocate asmop as AOP_ACC,
1311         (aopForRemat): added parameter 'bool result' in function declaration,
1312         (pic16_aopGet): return AOP_ACC when accessing WREG,
1313         (pic16_popGetTempReg): minor modification,
1314         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
1315         'pic16_allocWithIdx',
1316         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
1317         calling function in absolute addresses,
1318         (genAssign): take into account AOP_ACC asmop,
1319         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
1320         * src/pic16/pcoderegs.c: some debug functions and lines added,
1321         * src/pic16/ralloc.c (decodeRegType): added but commented out,
1322         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
1323         register too,
1324         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
1325         call to allocReg, not by manually allocating a new one,
1326         (pic16_assignRegisters): now before going through the register
1327         allocating functions mark all registers as free. This eliminates some
1328         side effects resulting from peephole parser done earlier in the backbone
1329
1330 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
1331
1332         * src/SDCCicode.c (geniCodeLogic),
1333         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
1334
1335 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
1336
1337         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
1338           (genSend): bugfix, do not allocate and free twice,
1339           (shiftRLong): handle partially overlapping aops
1340         * support/regression/tests/bitopcse.c: fixed warning redefined idata
1341
1342 2006-03-08 Borut Razem <borut.razem AT siol.net>
1343
1344         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
1345           for pic16
1346
1347 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
1348
1349         * support/regression/tests/bug1409955.c: new, added
1350         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
1351         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
1352           (aopForSym, aopOp): increment asmop.allocated if reused,
1353           (freeAsmop): decrement asmop.allocated and check for zero instead of
1354           using asmop.freed,
1355           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
1356           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
1357            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
1358            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
1359            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
1360            genSignedRightShift, genRightShift, genDataPointerGet,
1361            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
1362            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
1363             in reverse order from allocation,
1364           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
1365             added swappedLR to keep track
1366         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
1367           pdata & code for GCC, z80, gbz80 & hc08
1368         * support/regression/tests/zeropad.c: moved defines to testfwk.h
1369
1370 2006-03-08 Raphael Neider <rneider AT web.de>
1371
1372         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
1373
1374 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
1375
1376         * device/include/mcs51/c8051f410.h: new SiLabs mcu
1377         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
1378         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
1379
1380 2006-03-06 Borut Razem <borut.razem AT siol.net>
1381
1382         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
1383           made the linker quiet
1384
1385 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1386
1387         * src/pic16/gen.c (genPcall): fixed bug #1443644
1388         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
1389         which dumps before the function entry point a data byte which represents
1390         the number of the local variables used by the specified function, added
1391         'xinst' for initial support for Extended Instruction Support,
1392         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
1393         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
1394         port->fun_prefix anymore (may change later),
1395         (genFunction, genEndFunction): do not store/restore local registers for
1396         _main (this should take care the --main-return command line option in
1397         the future),
1398         (genOr): removed some legacy pic-port instructions,
1399         * src/pic16/genarith.c (genAddLit): re-enabled old code because
1400         performing operations with SFR's causes data to be written more than
1401         once to each SFR. Perhaps SFRs should be handled in special cases...
1402         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
1403         pcode.h
1404         * src/pic16/main.c (_process_pragma): stack bound checking did not take
1405         into account for stack starting position,
1406         (struct OPTIONS pic16_optionsTable): added command line argument
1407         --extended or -y for Extended Instruction Support,
1408         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
1409         (deassignLRs): *** perhaps the most important change, old 'for' code
1410         (commented out for reference), didn't account for some registers which
1411         were left marked 'not free' after a pointer operation. The change
1412         reduces register usage a lot in some cases
1413
1414 2006-03-04 Borut Razem <borut.razem AT siol.net>
1415
1416         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
1417           _clean
1418         * support/regression/tests/bug-524697.c: decreased array size for
1419           mcs51 to fit into the internal RAM
1420         * support/regression/Makefile.in: a little bit more verbose
1421
1422 2006-03-03 Borut Razem <borut.razem AT siol.net>
1423
1424         * support/regression/fwk/lib/testfwk.c,
1425           support/regression/fwk/include/testfwk.h: introduced function
1426           _prints(), nonrecursive _printn(), call _initEmu() from main()
1427         * support/regression/ports/gbz80/support.asm,
1428           support/regression/ports/ucz80/support.asm,
1429           support/regression/ports/z80/support.asm,
1430           support/regression/ports/ds390/support.c,
1431           support/regression/ports/hc08/support.c,
1432           support/regression/ports/host/support.c,
1433           support/regression/ports/mcs51/support.c,
1434           support/regression/ports/xa51/support.c: added empty _initEmu()
1435           function
1436         * support/regression/ports/pic16/gpsim.cmd,
1437           support/regression/ports/pic16/spec.mk,
1438           support/regression/ports/pic16/support.c,
1439           support/regression/Makefile.in: added pic16 regression test
1440
1441 2006-03-01 Raphael Neider <rneider AT web.de>
1442
1443         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
1444           genConstPointerGet): use safe way of generating MOVFF to cover
1445             literals as well as registers, fixes bug #1440527
1446         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1447             dereference
1448           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1449             more correctly, fixes bug #1232186
1450           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1451         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1452             gplink guess the correct processor in more cases, applied patch
1453             from Till Riedel attached to and fixing bug #1436552
1454
1455 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1456
1457         * support/regression/tests/array.c: added, contains check for #1434401
1458         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1459
1460 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1461
1462         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1463         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1464         * device/include/mcs51/c8051f326.h,
1465         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1466         * device/include/mcs51/c8051f000.h,
1467         * device/include/mcs51/c8051f018.h,
1468         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1469           PCON_IDLE,PCON_STOP and added sfr16 definitions
1470
1471 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1472
1473         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1474           genGetWord): fixed bug 1409955
1475
1476 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1477
1478         * device/include/hc08/mc68hc908gp32.h,
1479         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1480
1481 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1482
1483         * src/SDCCast.c (constExprValue): return NULL if not a value
1484         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1485         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1486         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1487
1488 2006-02-13 Borut Razem <borut.razem AT siol.net>
1489
1490         * src/regression/ptrarg.c: added, fails due to bug #1430967
1491         * src/regression/Makefile: ptrarg.c added, ...
1492
1493 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1494
1495         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1496         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1497
1498 2006-02-11 Borut Razem <borut.razem AT siol.net>
1499
1500         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1501           print "Processor: xxx" message to stdout only if --verbose
1502
1503 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1504
1505         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1506         * support/regression/tests/bug1426356.c: added
1507         * support/regression/tests/bitfields.c: removed 2 tests
1508
1509 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1510
1511         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1512         * device/include/mcs51/c8051f330.h,
1513         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1514           PCON_IDLE,PCON_STOP and added sfr16 definitions
1515         * device/lib/_divsint.c,
1516         * device/lib/_divuint.c,
1517         * device/lib/_divulong.c,
1518         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1519           register bank bug for small stackauto
1520
1521 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1522
1523         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1524
1525 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1526
1527         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1528         * all.dsp: corrected several bin paths
1529         * device/include/mcs51/c8051f120.h,
1530         * device/include/mcs51/c8051f300.h,
1531         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1532           to PCON_IDLE,PCON_STOP
1533         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1534         * device/lib/printf_large.c (output_float): fixed bug 1388703
1535         * support/regression/tests/bug1057979.c: added test for bug 1388703
1536
1537 2006-02-08 Raphael Neider <rneider AT web.de>
1538
1539         * src/pic/pcode.c (pciTRIS): fixed typo,
1540           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1541           (LinkFlow): fixed handling of flows that end in a call,
1542           (ReuseReg): perform safety check earlier
1543         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1544             to work with flows at the beginning of a pBlock,
1545             fixes #1426557 (Symbol not previously defined),
1546           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1547             usage information
1548           (RemoveUnusedRegisters): update register usage info
1549         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1550             created, reuse existing ones instead
1551         * src/pic/gen.c (genPcall): fixed #1424719
1552
1553 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1554
1555         * link/z80/lkmain.c,
1556         * link/z80/lklex.c,
1557         * link/z80/lkdata.c,
1558         * link/z80/aslink.h: fixed build on current cygwin:
1559         replaced getline() by lk_getline()
1560
1561 2006-02-01 Borut Razem <borut.razem AT siol.net>
1562
1563         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1564           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1565           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1566           src/regression/bool1.c, src/regression/bool2.c,
1567           src/regression/bool3.c, src/regression/call1.c,
1568           src/regression/compare.c, src/regression/compare10.c,
1569           src/regression/compare2.c, src/regression/compare3.c,
1570           src/regression/compare4.c, src/regression/compare5.c,
1571           src/regression/compare6.c, src/regression/compare7.c,
1572           src/regression/compare8.c, src/regression/compare9.c,
1573           src/regression/configword.c, src/regression/for.c,
1574           src/regression/inline.c, src/regression/mult1.c,
1575           src/regression/nestfor.c, src/regression/or1.c,
1576           src/regression/pointer1.c, src/regression/ptrfunc.c,
1577           src/regression/rotate1.c, src/regression/rotate2.c,
1578           src/regression/rotate3.c, src/regression/rotate4.c,
1579           src/regression/rotate5.c, src/regression/rotate6.c,
1580           src/regression/rotate7.c, src/regression/string1.c,
1581           src/regression/struct1.c, src/regression/sub.c,
1582           src/regression/sub2.c, src/regression/switch1.c,
1583           src/regression/while.c, src/regression/xor.c,
1584           src/regression/create_stc, src/regression/simulate,
1585           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1586           regression tests
1587         * src/regression/gpsim_assert.h: added
1588
1589 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1590
1591         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1592         ((void (code *) (void)) 0) ();
1593         * as/hc08/aslex.c,
1594         * as/hc08/aslink.h,
1595         * as/hc08/asm.h,
1596         * as/hc08/asmain.c,
1597         * as/hc08/lkdata.c,
1598         * as/hc08/lklex.c,
1599         * as/hc08/lkmain.c,
1600         * as/mcs51/aslex.c,
1601         * as/mcs51/aslink.h,
1602         * as/mcs51/asm.h,
1603         * as/mcs51/asmain.c,
1604         * as/mcs51/lkdata.c,
1605         * as/mcs51/lklex.c,
1606         * as/mcs51/lkmain.c,
1607         * as/z80/aslex.c,
1608         * as/z80/asm.h,
1609         * as/z80/asmain.c: fixed build on current cygwin:
1610         replaced getline() by as_getline()
1611
1612 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1613
1614         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1615         declarator in the symbol chain
1616         * src/SDCCsymt.h,
1617         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1618         parameter list for function pointers
1619         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1620         * support/regression/tests/bug-716242.c: added
1621
1622 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1623
1624         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1625         offset if possible
1626         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1627
1628 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1629
1630         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1631         inifinitely recurseable, added static
1632         * support/regression/tests/bug-1408066.c: added
1633
1634 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1635
1636         * src/SDCCicode.h,
1637         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1638         renamed, added possibility to create "postLoopLbl"-labels
1639         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1640         newiTempLoopHeaderLabel
1641         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1642         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1643         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1644         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1645         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1646         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1647         (basicInduction): fixed bug #136564, made static,
1648         (loopInduction): changed parameter of basicInduction, made static,
1649         (addPostLoopBlock): added
1650         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1651         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1652         findLoopEndSeq
1653         * support/regression/tests/bug-136564.c: added
1654         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1655         --std-sdcc99 to LIBSDCCFLAGS
1656
1657 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1658
1659         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1660         while loop
1661         * support/regression/tests/bug-1406131.c: added
1662
1663 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1664
1665         * src/SDCCast.c (decorateType): fix promotion of unary minus
1666         * src/SDCCsymt.c (computeType): beautified
1667         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1668         (valUnaryPM, valComplement): fix sign and promotion,
1669         (valNot): ANSI: result type is int (SDCC: unsigned char)
1670         * support/regression/tests/uminus.c: speedup by removing superflous
1671         test case 'int'
1672         * support/regression/tests/onebyte.c: added promotion and signedness
1673         tests for unary minus
1674         * support/regressions/tests/bug-477927.c: disable warning about
1675         uninitialized variables
1676         * support/regression/tests/not.c: added
1677
1678 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1679
1680         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1681         * src/mcs51/gen.c (gen51Code): show final register usage after
1682         fillGaps in asm with --i-code-in-asm
1683         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1684         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1685         incUsed, rliveClear, adjustIChain): made static,
1686         (setFromRange): excluded because it's unused,
1687         (findPrevUseSym, markWholeLoop): added,
1688         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1689         through all branches of predecessors enables sdcc to emit the warning
1690         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1691         (rlivePoint): made static, added parameter emitWarnings which is only
1692         true during the first run out of two,
1693         (findRecursiveSucc, findRecursivePred): removed,
1694         (computeLiveRanges): made static, added parameter emitWarnings,
1695         (dumpIcRlive): added for debugging only
1696         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1697         removed prototype of setFromRange()
1698         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1699         in call of computeLiveRanges()
1700         * support/regression/tests/bug-895992.c: added
1701         * support/regression/tests/bug-971834.c: added
1702         * support/valdiag/tests/bug-895992.c: added
1703         * support/valdiag/tests/bug-971834.c: added
1704
1705 2005-12-18 Raphael Neider <rneider AT web.de>
1706
1707         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1708           (genUnpackBits): improved code for direct operands,
1709           (genPackBits): improved code for literal assignment to bitfields
1710             and for direct destination operands (no FSR indirection),
1711             prevented redundant AND, fixes #1362800,
1712           (AccLsh): added parameter to disable masking of the result
1713         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1714           skip instructions with side-effects (like incfsz),
1715           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1716         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1717         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1718           fixes #1375263
1719
1720 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1721
1722         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1723         volatile variables as spill location
1724
1725 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1726
1727         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1728         replacing literals
1729         * support/regression/tests/bug-1376320.c: added
1730
1731 2005-12-08 Raphael Neider <rneider AT web.de>
1732
1733         * src/pic/device.c: renamed is_shared to pic14_is_shared
1734         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1735         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1736           (is_valid_identifier): added for above workaround
1737
1738 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1739
1740         * device/lib/Makefile.in: fixed to enable port-specific-objects
1741         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1742           char, thanks Hubert Sack
1743         * doc/sdccman.lyx: documented --xstack-loc,
1744           elaborated a bit more on interrupts and pitfalls,
1745           removed "setjmp/longjmp unsupported",
1746           documented some unsupported C99 features
1747         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1748         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1749           if, thanks Hubert Sack
1750         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1751         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1752           make make_library
1753         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1754           regression tests can report resource usage (rfe 700441)
1755         * support/regression/collate-results.py: report resource usage
1756         * support/regression/ports/ds390/spec.mk,
1757         * support/regression/ports/hc08/spec.mk,
1758         * support/regression/ports/mcs51/spec.mk,
1759         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1760         * support/regression/ports/ds390/uCsim.cmd,
1761         * support/regression/ports/hc08/uCsim.cmd,
1762         * support/regression/ports/mcs51/uCsim.cmd,
1763         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1764         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1765           library, use the default one
1766         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1767           building the library
1768
1769 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1770
1771         * config.dsp: added dependency on .version and configure_vc.awk
1772         * device/include/setjmp.h: updated for --stack-auto and --xstack
1773         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1774         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1775         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1776         * device/lib/libsdcc.lib: added _setjmp
1777         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1778           (decorateType): fixed bug 1372851,
1779           (optimizeGetHbit): fixed warning
1780         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1781           array initialisation
1782         * support/regression/tests/bug1057979.c: added test for bug 1358192
1783         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1784
1785 2005-12-03 Borut Razem <borut.razem AT siol.net>
1786
1787         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1788           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1789
1790 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1791
1792         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1793         createIval): implement symbol independant "flexible array member",
1794         (createIvalCharPtr): implemented flexible array initialisation with a
1795         string
1796         * src/SDCCsymt.c (copyStruct): removed,
1797         (getSize): fixed misleading comment,
1798         (getAllocSize): removed, the additional allocation size is now in
1799         sym->flexArrayLength,
1800         (checkStructFlexArray): new, syntax checks for flexible array members,
1801         (compStructSize): added syntax checks for "flexible array members"
1802         (copyStruct): removed,
1803         (copyLinkChain): removed inefficient fix for bug 770487
1804         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1805         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1806         symbol->flexArrayLength
1807         * src/SDCCerr.c,
1808         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1809         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1810         * support/regression/tests/structflexarray.c: added
1811         * support/valdiag/tests/structflexiblearray.c: added
1812
1813 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1814
1815         * src/SDCCast.c (decorateType): fixed bug 1368489
1816         * support/Util/SDCCerr.c,
1817         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1818
1819 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1820
1821         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1822           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1823
1824 2005-11-27 Borut Razem <borut.razem AT siol.net>
1825
1826         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1827           support/cpp2/mkdeps.h: added command line option
1828           -obj-ext=<extension> to SDCPP to define object file externion, used
1829           for generation of make dependencies (-M)
1830         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1831
1832 2005-11-26 Borut Razem <borut.razem AT siol.net>
1833
1834         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1835           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1836           added pic and pic16 libraries
1837
1838 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1839
1840         * device/include/float.h: Corrected typo in prototype of __fsgt
1841
1842 2005-11-25 Borut Razem <borut.razem AT siol.net>
1843
1844         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1845           added creation of model-mcs51-stack-auto libraries
1846
1847 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1848
1849         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1850         and fields-list too
1851         * src/SDCCast.c (createIvalArray): removed obsolete comment
1852
1853 2005-11-24 Borut Razem <borut.razem AT siol.net>
1854
1855         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1856           added missing device/lib/mcs51/crt*.asm sources
1857
1858 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1859
1860         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1861
1862 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1863
1864         * device/lib/_fs2schar.c,
1865         * device/lib/_fs2sint.c,
1866         * device/lib/_fs2slong.c: optimized inline asm
1867
1868 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1869
1870         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1871           Better handling of floats between -1.0 and 0.0.
1872
1873 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1874
1875         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1876           (the missing "if"s prohibited removal of redundant labels)
1877
1878 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1879
1880         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1881           Properly convert floats between -1.0 and 0.0 to long, int, and char
1882           types (max integer value of negative floats tends to zero).
1883         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1884           Removed changes made so to work properly with floats between
1885           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1886           and _fs2char.c
1887
1888 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1889
1890         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1891         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1892         (genCast) cosmetic change
1893         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1894         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1895         from mcs51
1896         * support/regression/tests/bitfields (testSignedBitfields): added
1897
1898 2005-11-18 Borut Razem <borut.razem AT siol.net>
1899
1900         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1901         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1902           introduced SILENT option to make building of pic16 libraries less
1903
1904 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1905
1906         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1907           Now they work properly with floats between -1.0 and 0.0
1908         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1909
1910 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1911
1912         * src/SDCCicode.c (printOperand): added missing else
1913
1914 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1915
1916         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1917         reformatted for better readability
1918         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1919         signed bitfields
1920
1921 2005-11-17 Borut Razem <borut.razem AT siol.net>
1922
1923         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1924           introduced SILENT option to make building of pic16 libraries less
1925           verbose - used for nightly snapshot build
1926         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1927           available on Win32 platforms.
1928         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1929           medium, large, pic and pic16
1930
1931 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1932
1933         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1934           printf("%f"...) sets fraction to zero.
1935
1936 2005-11-16 Raphael Neider <rneider AT web.de>
1937
1938         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1939           fixes #1357221
1940         * src/pic/gen.c (genIfx): implemented for CARRY bit
1941         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1942           to generic pointers, fixes #1357332,
1943           (pic16_movLit2f): NEW,
1944           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1945
1946 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1947
1948         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1949
1950 2005-11-11 Raphael Neider <rneider AT web.de>
1951
1952         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1953         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1954           compute pointer's type from operand,
1955           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1956           improved single bit reads, fixes bug #1353379
1957
1958 2005-11-09 Borut Razem <borut.razem AT siol.net>
1959
1960         * support/scripts/sdcc.nsi: added lib/pic to the package
1961
1962 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1963
1964         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1965
1966 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1967
1968         * support/regression/tests/bug1348008.c: added
1969         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1970         * support/regression/tests/bug1337835.c: updated comment
1971
1972 2005-11-06 Borut Razem <borut.razem AT siol.net>
1973
1974         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1975           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1976           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1977           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1978           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1979           dynamic construction of cl_error_class and derivates - 2.nd try
1980
1981 2005-11-05 Borut Razem <borut.razem AT siol.net>
1982
1983         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1984           bug, which caused Bus Errors on sparc solaris
1985
1986 2005-11-04 Borut Razem <borut.razem AT siol.net>
1987
1988         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1989           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1990           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1991           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1992           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1993           and derivates to resolve the initialization problem on OSX
1994
1995 2005-11-02 Borut Razem <borut.razem AT siol.net>
1996
1997         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1998           corrected typo - #include <winsock2.h>
1999
2000 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
2001
2002         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
2003           (_asxxxx_mapping): added org directive for future enhancements
2004
2005 2005-11-01 Borut Razem <borut.razem AT siol.net>
2006
2007         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2008           enabled sockets on WIN32
2009         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
2010
2011 2005-10-31 Borut Razem <borut.razem AT siol.net>
2012
2013         * support/regression/generate-cases.py: escape backslashes in {testcase}:
2014           WIN32 backslash path delimiters should be escaped when used in C strings
2015         * support/regression/tests/bitfields.c: exclude failing assertions for
2016           __CYGWIN32__ and __MINGW32__ hosts
2017
2018 2005-10-30 Borut Razem <borut.razem AT siol.net>
2019
2020         * src/SDCCutil.c: corrected double comparison typo
2021
2022 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
2023
2024         * device/lib/medium/Makefile: added for new memory model medium
2025         * device/include/asm/mcs51/features.h: updated for medium/pdata
2026         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
2027           added Multiply & Accumulate sbit's and MAC0_PAGE define
2028         * device/include/mcs51/c8051f300.h: added sfr16 definitions
2029         * device/include/mcs51/c8051f310.h: added sfr16 definitions
2030         * device/lib/_mullong.c: update for medium model
2031         * device/lib/incl.mk: added medium model
2032         * doc/sdccman.lyx: documented medium model
2033         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
2034         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
2035         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
2036         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
2037           (allocParms): set SCLS and OCLS to pdata for medium model
2038         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
2039           for pdata,
2040           (powof2): return <0 if not power of 2
2041         * src/avr/gen.c (genBitWise): use updated powof2
2042         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
2043           (shiftR2Left2Result): small optimization in setup, save acc when storing,
2044           (shiftLLeftOrResult): use B if necessary
2045         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
2046         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
2047         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
2048         * support/regression/Makefile.in: added test-mcs51-medium
2049         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
2050
2051 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2052
2053         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
2054         specifier unsigned
2055         * device/lib/time.c (mktime): fixed bug 1334315
2056
2057 2005-10-28 Raphael Neider <rneider AT web.de>
2058
2059         * device/include/pic/p16f_common.inc: added common declarations
2060         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
2061
2062 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2063
2064         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
2065           (aopPutUsesAcc): added to predict accumulator use,
2066           (assignResultValue): save acc if necessary,
2067           (genMinusDec): store result if indirectly addressed,
2068           (genDivOneByte):  save acc if necessary,
2069           (movLeft2Result): bugfix if left already in acc,
2070           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
2071             attention to accumulator use (esp. pdata),
2072           (genReceive): receive pdata correctly
2073         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
2074         * src/SDCCicode.h: added isOperandInPagedSpace prototype
2075
2076 2005-10-27 Raphael Neider <rneider AT web.de>
2077
2078         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
2079
2080 2005-10-27 Raphael Neider <rneider AT web.de>
2081
2082         * .version: changed version to 2.5.4
2083         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
2084         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
2085           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
2086             arithmetics support routines
2087         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
2088         * device/lib/Makefile.in: also create installdir for pic
2089
2090         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
2091           pic14 port as well
2092         * src/pic/device.c (dump_sfr): rewritten to delegate register
2093           placement to the linker (use `extern sym' rather than sym EQU addr),
2094           (validAddress): fixed to check last specified address
2095         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
2096           (popGetLit): truncate literal value to 8 bit,
2097           (popGet): moved assert to more appropriate place
2098           (popGetExternal): create pCode operand from and mark the according
2099             symbol as being `extern'
2100           (popGetAddr): added sanity check on immediate's offset, provide
2101             GPOINTER tag on demand
2102           (aopPut): fixed for immediates,
2103           (mov2w_op): move operand's address or contents to WREG (depending on
2104             operand type), safer variant of mov2w,
2105           (movwf,call_libraryfunc): NEW, handy abbreviations,
2106           (get_argument_pcop,get_return_val_pcop,pass_argument,
2107           get_returnvalue): interface for accessing function parameters and
2108             return values,
2109           (assignResultValuei,genRet): use new parameter/return value interface
2110           (pic14_getDataSize): back to old version handling generic pointers,
2111           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
2112             provided implementation and/or fixed old one,
2113           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
2114             calls, removed legacy 8051 reference code
2115           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
2116           (loadSignToC): NEW, move the operands sign bit to CARRY,
2117           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
2118             genRightShiftSigned, accepts negative shift counts,
2119           (setup_fsr): load FSR and adjust IRP (indirect memory access),
2120           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
2121             generic pointers, __data pointers and __code pointers,
2122           (genUnpackBits,genPackBits): rewritten to work with generic pointers
2123             and signed bitfields, limit bitfields to 8 bit,
2124           (genDataPointerGet): fixed number of bytes read,
2125           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
2126           (genPointerGet,genPointerSet): fixed handling of __code pointers,
2127             pointers to constant data are no longer assumed to point to __code
2128             space, removed invalid pointer types,
2129           (bitpatternFromVal): retrieve the PICs representation of an integer
2130             or float literal,
2131           (genDataPointerSet): fixed assigning to po_immediate operands,
2132           (genGenPointerSet): implemented as library call,
2133           (genIfx): fixed incorrect condition,
2134           (genAddrOf): limit generic pointers' addresses to 2 bytes,
2135             provide GPOINTER tag according to destination's storage class,
2136           (genCast): added code to handle casting to generic pointers, added
2137             sign-/zero extension of the result
2138           (aop_isLitLike,op_isLitLike): fixed handling of immediates
2139         * src/pic/gen.h: added macros to access IRP bit in STATUS register
2140         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
2141           extend the result
2142         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
2143           address/register resides in the shared banks
2144           (emitSymbolToFile): improved to handle global and `pinned' symbols,
2145             put all variables into separate sections (have the linker arrange
2146             them)
2147           (picglue): put init code and interrupt handlers in separate sections
2148         * src/pic/main.c: added port specific options table, modified to PORT
2149           structure to make GPOINTERs 3 byte, added pic14_options
2150           (_pic14_do_link): private linking routine (update paths to libraries,
2151             add libsdcc.lib by default)
2152         * src/pic/main.h: declare pic14_options
2153         * src/pic/pcode.c: fixed instructions i/o relations,
2154           (RegCond): reverted to correct version,
2155           (newpCodeOpLit): truncate literals to 8 bit,
2156           (genericPrint): added debug output,
2157           (getRegFromInstruction): fixed for various operand types, simplified
2158           (BuildFlow): fixed broken handling of isntructions with labels
2159           (LinkFlow): start at last instruction in flow (skip trailing comments),
2160             pass the flow on to the next instruction after CALL
2161           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
2162           (insertPCodeInstruction): fixed inserting after a skip instruction,
2163           (DoBankSelect): fixed for labeled instructions
2164           (OptimizepBlock): honor --nopeep switch
2165           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
2166         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
2167         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
2168           (pCodeOptime2pCodes): allow disabling this optimization via
2169             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
2170             but is still buggy), started implementation of a dataflow based
2171             pCode optimization (CSE + dead code elimination)
2172           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
2173         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
2174           names are independant of the stack location and therefore portable across
2175           devices
2176
2177 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2178
2179         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
2180           (selectSpil): fixed bug 1337835 by not spilling bit variables
2181         * support/regression/tests/bug1337835.c: added test for this bug
2182         * src/mcs51/peeph.def: restart after rule 3.c,
2183           addded rules 263.x to optimize loading constants
2184
2185 2005-10-26 Raphael Neider <rneider AT web.de>
2186
2187         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
2188         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
2189           (genAssign): emit warning when casting literals to generic pointer
2190             type, also applies when taking the address of a fixed variable,
2191           (genCast): improved casting to generic pointers
2192         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
2193           extern variables, added verbose error message
2194         * device/include/pic16/{string.h,errno.h}: added #pragma library c
2195
2196 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
2197
2198         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
2199         carry must be complemented too
2200         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
2201         could be emitted by genMinus
2202         * src/SDCCval.c (constVal): fixed bug 1305065
2203
2204 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
2205
2206         * src/SDCCast.c (addCast): added promotion for bit variables
2207         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
2208         promotion casts + optimisation
2209         (optimizeGetWord): fix warning 'i' might be used uninitialized
2210         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
2211         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
2212
2213 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2214
2215         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
2216         all chars are promoted to int; promotion should be handled in SDCCast.c
2217
2218 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2219
2220         * device/lib/_strcmp.c: Fixed bug 1326457
2221
2222 2005-10-11 Raphael Neider <rneider AT web.de>
2223
2224         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
2225         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
2226
2227 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2228
2229         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
2230         * support/regression/tests/sfr16.c: added test for the sfr32 bug
2231
2232 2005-10-04 Raphael Neider <rneider AT web.de>
2233
2234         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
2235           device/lib/pic16/pics.all: added pic18f1320
2236         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
2237
2238 2005-09-30 Raphael Neider <rneider AT web.de>
2239
2240         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
2241         * src/pic16/devices.inc: NEW, provides device descriptions
2242         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
2243
2244 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
2245
2246         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
2247           GETHBIT
2248
2249 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
2250
2251         * doc/sdccman.lyx: updated Highest Order Bit documentation,
2252           documented Any Order Bit, Higher Order Byte and Higher Order Word
2253         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
2254         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
2255           (optimizeGetAbit): new, to get any bit, not only the high bit,
2256           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
2257           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
2258           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
2259           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
2260             RIGHT_OP: also try GETBYTE, GETWORD optimization,
2261             GETABIT, GETBYTE, GETWORD: decorate them,
2262           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
2263           (ast_print): added GETABIT, GETBYTE, GETWORD
2264         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
2265         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
2266           (geniCodeBinary): new generic binary icode,
2267           (ast2iCode): added GETABIT, GETBYTE, GETWORD
2268         * src/port.h: updated comment for PORT.hasExtBitOp
2269         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
2270           (genGetByte): new, to get a single byte,
2271           (genGetWord): new, to get a word from a long,
2272           (gen51Code): added GETABIT, GETBYTE, GETWORD
2273         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
2274
2275 2005-09-23 Raphael Neider <rneider AT web.de>
2276
2277         * configure.in, configure: have device/lib/pic configured
2278         * device/lib/Makefile.in: added model-pic14
2279         * device/lib/clean.mk: added pic/ to clean rule
2280         * device/lib/pic: added rudimentary pic14 library providing support
2281           functions for multiplication/division/generic pointer access
2282         * src/SDCCopt.c (convilong): mark support functions as extern
2283           for pic14 port as well
2284         * src/pic/gen.c (genMult): added assertions,
2285           (genpic14Code): emit warning on unhandled iCodes
2286         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
2287         * src/pic/pcode.c (pCodeOpCopy),
2288         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
2289           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
2290           SFR_REGISTER}), made safe for future extensions
2291         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
2292           instructions even if preceeded by SKIP instructions (also remove
2293           them); removed unused code
2294         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
2295           prevents leaving parts of the structure uninitialized after copying
2296
2297 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
2298
2299         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
2300           ago by me
2301         * support/regression/tests/addsub.c: added test for the bug
2302
2303 2005-09-21 Raphael Neider <rneider AT web.de>
2304
2305         * device/include/pic16/pic18f1220.h,
2306           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
2307         * device/lib/pic16/Makefile.rules: added missing opening paren
2308         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
2309           are provided in genutils.c,
2310           (genUminusFloat,genUminus,genCmpEq): added asserts on different
2311           operand/result sizes,
2312           (genCmp): assert on NULL pointers first, then check deref'ed values
2313         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
2314           result size
2315
2316 2005-09-18 Raphael Neider <rneider AT web.de>
2317
2318         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
2319           as these are now unused,
2320           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
2321         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
2322           local, avoids uninitialized pointer dereference on r->name
2323         * src/pic16/ralloc.c (newReg): fixed indentation
2324
2325 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
2326
2327         * src/SDCCval.c (constVal): fixed bug 730366
2328         * support/Util/SDCCerr.c,
2329         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
2330
2331 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
2332
2333         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
2334
2335 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
2336
2337         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
2338
2339 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2340
2341         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
2342           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2343         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
2344           (hex2dec): made hex_digit unsigned char, removed ascii dependance
2345         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
2346         * packihx/packihx.c (hexDigit): made c unsigned char
2347         * as/mcs51/lklibr.c (fndsym),
2348         * link/z80/lkgb.c (gb),
2349         * link/z80/lklibr.c (fndsym),
2350         * link/z80/lkrloc.c (relr),
2351         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
2352         * src/SDCC.lex (checkCurrFile, process_pragma),
2353         * src/SDCCglue.c (spacesToUnderscores),
2354         * src/SDCCmain.c (setParseWithComma, processFile),
2355         * src/asm.c (tvsprintf, printCLine),
2356         * src/avr/gen.c (emitcode, aopPut),
2357         * src/ds390/gen.c (emitcode),
2358         * src/hc08/gen.c (emitcode, emitinline),
2359         * src/mcs51/gen.c (emitcode, genInline),
2360         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2361           tokenizeLineNode),
2362         * src/pic/ralloc.c (debugLog),
2363         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
2364           tokenizeLineNode),
2365         * src/pic16/ralloc.c (debugLog),
2366         * src/z80/main.c (_process_pragma):
2367            made all ctype.h function calls safe
2368         * src/SDCCopt.c: include math.h for fabs
2369         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
2370           and used them throughout the code to make ctype.h function calls safe
2371         * src/ds390/main.c (asmLineNodeFromLineNode),
2372         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
2373         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
2374            unsigned char*
2375         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
2376           (newpCodeAsmDir): made ctype.h function calls safe
2377         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
2378           pic16_emitcode):  made lbp unsigned char*
2379         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
2380           (pic16_newpCodeAsmDir): made ctype.h function calls safe
2381         * src/xa51/gen.c (emitcode),
2382         * src/z80/gen.c (_emit2): made lbp unsigned char*
2383         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
2384            char*
2385
2386 2005-09-05 Raphael Neider <rneider AT web.de>
2387
2388         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
2389           access bank splitpoint
2390
2391 2005-09-05 Raphael Neider <rneider AT web.de>
2392
2393         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
2394
2395 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
2396
2397         * .version: changed to version 2.5.3
2398         * doc/sdccman.lyx: changed version to 2.5.3,
2399           documented --codeseg and --constseg and pragma codeseg and constseg,
2400           documented bit parameters (reentrant) and bit returning
2401         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
2402            currFunc->recvSize, but is this ok for all ports?
2403           (ast2iCode): result of ~ on unsigned char must be cast to int for
2404            bool to work
2405         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
2406           function pointers in bit space
2407         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
2408           (processFuncArgs): call port.reg_parm() with reentrancy info
2409         * src/port.h,
2410         * src/avr/main.c,
2411         * src/ds390/main.c,
2412         * src/hc08/main.c,
2413         * src/pic/main.c,
2414         * src/pic16/main.c,
2415         * src/xa51/main.c,
2416         * src/z80/main.c: port.reg_parm prototype extended with
2417           "bool reentrant" parameter
2418         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
2419           options.stackAuto for allocating bit register parameters
2420         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
2421           (genSend): set BitBankUsed if it is,
2422           (selectRegBank): factored out of genCall for use in genPcall,
2423           (genCall): removed redundant dtype assignmen, use selectRegBank,
2424           (genPcall): handle returning in Carry properly, save in F0 if needed,
2425           (genReceive): handle bit register parameters
2426         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
2427           (mcs51_assignRegisters): enable bit registers for all reentrant
2428            functions and don't set BitBankUsed unconditionally
2429         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
2430         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
2431         * support/regression/tests/funptrs.c: added tests for BOOL and for return
2432
2433 2005-08-27 Borut Razem <borut.razem AT siol.net>
2434
2435         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
2436         ppc-osx (Darwin) does not support -u option. It seems that it is
2437         supported only on Linux - GNU cp
2438
2439 2005-08-25 Borut Razem <borut.razem AT siol.net>
2440
2441         * sim/ucsim/gui.src/serio.src/Makefile.in,
2442           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
2443           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2444           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
2445           install and strip, since the strip at /usr/ccs/bin should be used
2446           on solaris
2447
2448 2005-08-24 Borut Razem <borut.razem AT siol.net>
2449
2450         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2451
2452 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2453
2454         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2455         ffffffffu
2456
2457 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2458
2459         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2460         * as/mcs51/lkmain.c (link_main): fixed warning
2461         * device/include/stdbool.h: ds390 has no advanced bit support yet
2462         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2463         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2464         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2465           and updated their macros
2466         * src/SDCCval.c (constVal): updated comment for renamed b_long
2467
2468 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2469
2470         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2471         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2472           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2473           (oprio): set priority for '['
2474         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2475            and adb_24_bit
2476         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2477         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2478         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2479         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2480           added overlayable BIT_BANK area
2481         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2482           (summary2): explain 'T' in legenda
2483         * as/mcs51/lkrloc.c: replaced old K&R style,
2484           (relr): added R_BIT processing,
2485           (errmsg): added "Bit-addressable relocation error",
2486           (adb_bit): added for converting from byte- to bit-addressable space,
2487           (adb_24_bit): added for converting from byte- to bit-addressable space
2488         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2489            used in reentrant functions now even as return value
2490         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2491         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2492           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2493         * src/SDCCglobl.h: added indicator BitBankUsed
2494         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2495            the bit registers b0-b7
2496         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2497           (geniCodeCast): fixed bug 1263853,
2498           (geniCodeLogicAndOr): put result in bool or char,
2499           (geniCodeReceive): added parameter func for accessing the return type,
2500           (geniCodeFunctionBody): pass func to geniCodeReceive
2501         * src/SDCCmain.c: added indicator BitBankUsed
2502         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2503         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2504           (checkSClass): don't put automatic bool/bit on stack,
2505           (checkFunction): removed check on function cannot return bit
2506         * src/SDCCsymt.h: added newBoolLink prototype
2507         * src/mcs51/gen.c (rb1regs): added bit registers,
2508           (movc): created for assigning to carry,
2509           (pushReg, popReg): created for pushing registers,
2510           (sameRegs): check both AOP_REG and AOP_CRY types,
2511           (aopOp): handle bit registers,
2512           (aopPut): optimization no self-assign,
2513           (saveRegisters): push reg->base (bits) only once for bit registers,
2514            and use pushReg,
2515           (unsaveRegisters): pop reg->base only once and use popReg,
2516           (assignResultValue): added parameter func and return in carry for bits,
2517           (genIpush): optimization no reload in A if not changed,
2518           (genSend): bit parameters in reentrant functions are passed in bit
2519            registers by first assigning to bits in B, then save registers and
2520            copy B to bits,
2521           (genCall): handle returning in Carry properly, save it in F0 if needed,
2522           (genPcall): updated assignResultValue call, this is not safe yet for bit
2523            returning function !!!
2524           (genFunction): don't generate equ's for bit registers and use pushReg,
2525           (genEndFunction): take care of bit returning functions and use popReg,
2526           (genRet): return bit in Carry,
2527           (genIfx): optimize bit registers and other directly addressable bits,
2528           (genReceive): updated assignResultValue call
2529         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2530           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2531            registers when using stack-auto
2532         * src/mcs51/ralloc.c (_G): added allBitregs,
2533           (regs8051): added the bit registers,
2534           (createStackSpil): use macro IS_BIT,
2535           (getRegBit): added to allocate a bit register, else spill,
2536           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2537           (updateRegUsage): factored out to ease stepping while debugging,
2538           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2539            also allocate bit registers,
2540           (fillGaps): handle bit registers,
2541           (findAllBitregs): added to create bit vector with all bit registers,
2542           (mcs51_allBitregs): returns this bit vector,
2543           (mcs51_assignRegisters): when using stack-auto use bit registers for
2544            passing parameters and creating local variables
2545         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2546
2547 2005-08-22 Borut Razem <borut.razem AT siol.net>
2548
2549         * device/lib/Makefile.in: replaced find option -or with -o
2550           to make it run on solaris
2551
2552 2005-08-22 Raphael Neider <rneider AT web.de>
2553
2554         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2555           fixes #1265442 (crash on Solaris)
2556
2557 2005-08-20 Borut Razem <borut.razem AT siol.net>
2558
2559         * configure, configure.in: added tests for libsocket and libnsl libraries,
2560           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2561           from support/regression/Makefile.in
2562         * support/regression/Makefile.in: added
2563         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2564         * sim/ucsim/libtool: regenerated on sparc-solaris
2565         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2566           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2567           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2568           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2569           sparc-solaris, which doesn't use GNU ld linker
2570         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2571         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2572
2573 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2574
2575         * src/mcs51/peeph.def: updated comments
2576
2577 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2578
2579         * device/lib/_gptrget.c,
2580         * device/lib/_gptrput.c: slightly shorter
2581         * doc/sdccman.lyx: incremented version
2582         * src/mcs51/peeph.def: moved peephole comments to the line of first
2583           change to better keep line correlation, reanimated 186.e
2584         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2585
2586 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2587
2588         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2589           David Saxton with quotes around file name.
2590
2591 2005-08-15 Borut Razem <borut.razem AT siol.net>
2592
2593         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2594           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2595           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2596           make tests run on x86_64 platform
2597
2598 2005-08-13 Raphael Neider <rneider AT web.de>
2599
2600         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2601           as it might be executed DURING a build (parallel make is wonderful)
2602
2603 2005-08-13 Raphael Neider <rneider AT web.de>
2604
2605         * device/lib/Makefile.in (port-specific-objects-pic16):
2606           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2607         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2608           dependency
2609         * device/lib/pic16/Makefile.rules: build subdirs before creating
2610           the library, removed builddir rule, create $(builddir) early in
2611           recurse rule, use empty recurse rule for leaf directories
2612         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2613           mkdir errors (race condition), removed duplicate suffix "hex"
2614           from clean rules
2615         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2616         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2617           prevents mkdir -p from aborting on Alpha
2618
2619 2005-08-12 Raphael Neider <rneider AT web.de>
2620
2621         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2622           db-statements in order to allow for arrays of pointers in code
2623           sections to be placed without interspersed 0-padding, fixes
2624           bug #1256215
2625         * (emitStatistics): fixed division by zero for pic18f1220
2626         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2627           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2628         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2629         * (pic16_pCodeConstString): keep track of already emitted string
2630           literals to prevent "duplicate definitions of symbol _str_NR"
2631         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2632           debug message
2633         * device/lib/Makefile.in: ignore failing PIC16 library builds
2634         * device/lib/pic16/Makefile: do not build if gputils are missing
2635         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2636
2637 2005-08-10 Raphael Neider <rneider AT web.de>
2638
2639         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2640           my last commit)
2641
2642 2005-08-10 Raphael Neider <rneider AT web.de>
2643
2644         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2645           Rokas' patch to add the new fixed point type "__fixed16x16"
2646         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2647           functions for __fixed16x16 arithmetics
2648         * device/lib/pic16: reimplemented the build system to support
2649           a separate build directory, better handling of libio (create
2650           the library in a separate subdir for each architecture) and
2651           easier configuration (centralized in Makefile.common)
2652
2653 2005-08-07 Raphael Neider <rneider AT web.de>
2654
2655         * src/pic16/gen.c (genrshTwo): fixed sign extension
2656         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2657         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2658           added T0CONbits
2659         * device/include/pic16/pic18f4220.h: NEW, header for
2660           pic18f4220 and pic18f4320
2661         * device/include/pic16/pic18fregs.h: added new devices,
2662           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2663         * device/include/pic16/signal.h: resolved name clashes
2664           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2665           to also allow testing for interrupt enable bits, added
2666           comments on how to use the macros
2667         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2668         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2669           register definitions for the devices
2670         * device/lib/pic16/pics.all: added new devices
2671         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2672           allocated memory
2673         * device/lib/pic16/libc/stdlib/memfree: do not count
2674           the block header as free memory
2675         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2676           simplified and added missing end-of-blocklist-marker
2677           (reported by Peter Onion, fixes #1252814)
2678         * (_mergeHeapBlock): fixed loop condition
2679         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2680           len==0, restructured code
2681         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2682           up a bit, reduced bitfield accesses, prevent endless loops
2683           in case of heap corruption
2684         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2685           "unreferenced arguments/must return a value" warnings
2686         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2687           replaced BAUDREG with SPBRG
2688         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2689           device/lib/pic16/debug/gstack/gstack.c: replaced
2690           _naked, _asm, _endasm with __naked, __asm, __endasm
2691
2692 2005-08-05 Raphael Neider <rneider AT web.de>
2693
2694         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2695           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2696
2697 2005-08-05 Borut Razem <borut.razem AT siol.net>
2698
2699         * device/lib/Makefile.in: added missing ';'
2700         * configure: removed ^M characters
2701
2702 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2703
2704         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2705           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2706           License
2707
2708 2005-08-04 Borut Razem <borut.razem AT siol.net>
2709
2710         * configure.in: pic16 libraries build 2nd try - enable running
2711           configure in device/lib/pic16
2712         * configure: regenerated from configure.in
2713         * device/lib/Makefile.in: create $(PORT)/bin directory
2714
2715 2005-08-03 Raphael Neider <rneider AT web.de>
2716
2717         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2718           to get/set values via pointers
2719         * (genUnpackBits,genPackBits): changed detection of
2720           ptr->bitfield vs. sym.bitfield, fixed access via generic
2721           pointers, removed dead (wrong) code for multibyte bitfields
2722         * (genNearPointerGet, genGenPointerGet): removed useless code,
2723           fixed bitfield detection, fixes #1250594
2724         * (genNearPointerSet): removed useless code
2725         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2726           and introduced macro pic16_emitpcode that conditionally emits
2727           the origin of the following pCode (useful for debugging SDCC)
2728         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2729         * (createDefmap): fixed handling of LFSR for --optimize-df
2730
2731 2005-08-02 Borut Razem <borut.razem AT siol.net>
2732
2733         * device/lib/Makefile.in: pic16 libraries build enabled since
2734           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2735
2736 2005-08-02 Raphael Neider <rneider AT web.de>
2737
2738         * src/pic16/gen.c (genPackBits): removed deprecated warning
2739         * (genGenPointerSet): fixed bitfield detection
2740
2741 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2742
2743         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2744
2745 2005-07-31 Raphael Neider <rneider AT web.de>
2746
2747         * device/lib/pic16/libdev/pic18f458.c,
2748           device/include/pic16/pic18f458.h: added missing T0CONbits
2749
2750 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2751
2752         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2753
2754 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2755
2756         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2757
2758 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2759
2760         * device/include/mcs51/at89c51ed2.h: added.
2761
2762 2005-07-23 Raphael Neider <rneider AT web.de>
2763
2764         * src/pic/gen.h: added emitpcode macro for debugging
2765         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2766           and replace by macro adding debug information on demand
2767         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2768         * (gencjne): tried to fix; replaced with correct (slower) code
2769         * (gen{Unp,P}ackBits): fixed single bit access
2770         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2771         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2772           previous instruction
2773         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2774           register has to be handled with care (forbidding movement
2775           of assignments/uses, removing assignments completely, ...)
2776         * (pCodeOptime2pCodes): make use of regIsSpecial
2777         * added lots of debugging output (commented out)
2778         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2779           from being reused as result UNLESS it is known to work
2780
2781 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2782
2783         * support/Util/dbuf.h: include <stddef.h> for size_t
2784         * .version: changed to version 2.5.2
2785
2786 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2787
2788         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2789
2790 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2791
2792         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2793           (genModOneByte): removed needless psha/pula
2794
2795 2005-07-22 Raphael Neider <rneider AT web.de>
2796
2797         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2798           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2799         * src/pic/gen.c (resolveIfx): do not "invent" labels
2800         * (genSkipc): changed to positive logic
2801         * (genSkipCond): removed as no longer needed
2802         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2803           backport from PIC16
2804         * (genLeftShift): check operands are in different registers
2805         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2806           INCF does not update CARRY...
2807         * src/pic/main.c: fixed _linkCmd
2808         * src/pic/pcode.c (unlinkpCode): added inactive code
2809         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2810           alive (do not assign result and operand overlapping registers)
2811
2812 2005-07-22 Raphael Neider <rneider AT web.de>
2813
2814         * src/pic/device.c (dump_sfr): replaced register declaration with
2815           call to emitSymbolToFile() to avoid duplicate symbols
2816         * (assignRelocatableRegisters): do not declare external symbols
2817         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2818           right (take size of type, not etype)
2819         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2820         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2821         * (packRegsForAccUse): disabled assignment of WREG as
2822           the result reg to prevent occurence of just fixed #1235003,
2823           fixes #1242954
2824         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2825           symbols (avoids duplicate symbols in .asm file)
2826         * (pic14emitRegularMap): use emitSymbolToFile()
2827         * src/pic/gen.c (aopOp): fixed spillLocation handling
2828         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2829         * (genDataPointerSet): removed unneccessary variables/output
2830
2831 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2832
2833         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2834         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2835
2836 2005-07-21 Raphael Neider <rneider AT web.de>
2837
2838         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2839           architecture cannot handle them efficiently, fixes bug #1235003
2840         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2841           check for empty sets before using them (fixes bug #1232190)
2842
2843 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2844
2845         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2846           (lnksect2): generate warnings for memory overlap
2847         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2848           constseg to set the name of these segments so you can instruct the linker
2849           to place them in banks
2850         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2851         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2852           added code_seg and const_seg to options
2853         * src/SDCCglue.c (emitMaps): use options.const_seg,
2854           (createInterruptVect): put interrupt vectors in segment HOME,
2855           (glue): put HOME before static segment and put the main glue in HOME,
2856           (glue): use options.code_seg
2857         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2858         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2859           these segments so you can instruct the linker to place them in banks
2860           (linkEdit): use code_loc for HOME segment which should be the first
2861           segment in code memory now
2862         * src/SDCCmem.c: fixed more stuff like bug 1238386
2863         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2864           (changePointer): don't change function pointers to code pointers for
2865           banked functions,
2866           (compareType): added exceptional check for banked function pointers
2867         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2868         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2869           after static in code memory
2870         * src/mcs51/gen.c: added aopLiteralLong prototype,
2871           (aopForSym): use getSize for functions,
2872           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2873           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2874           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2875           the segment,
2876           (genPcall): use call for literal function pointers and generate banked
2877           calls over the one trampoline so there's only one place for the user to
2878           modify according to his/hers hardware,
2879           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2880           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2881         * src/mcs51/main.c: added keyword banked,
2882           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2883         * support/Util/SDCCerr.c,
2884         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2885           needed for passing the bank and address to the trampoline
2886         * device/lib/mcs51/crtbank.asm: added for bankswitching
2887         * device/lib/mcs51/Makefile: added crtbank
2888
2889 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2890
2891         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2892           for fields at offset 0 of a struct or union as reported
2893           on 2005-07-07 in the developer mailing list.
2894
2895 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2896
2897         * src/SDCCmem.c: fixed bug 1238386
2898
2899 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2900
2901         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2902           (patch #1144962), added peephole 300, enabled 259.x
2903         * doc/sdccman.lyx: removed screenshot and provided link instead
2904
2905 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2906
2907         * doc/sdccman.lyx: added section about debugging with ddd
2908         * doc/figures/ddd_example.eps: screenshot of debugging session
2909
2910 2005-07-04 Raphael Neider <rneider AT web.de>
2911
2912         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2913           like CODE pointers, fixes #1115683
2914         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2915           call, fixes bugs #1232211, #1228110,
2916           fixed wrong casts to pCodeFlow from pCodeInstructions
2917
2918 2005-07-04 Raphael Neider <rneider AT web.de>
2919
2920         * src/pic/gen.c (popGet): changed assert to allow for
2921           bit operands
2922         * (popGetAddr): changed signature to provide
2923           an additional index, patched all call sites
2924         * (genCmpEq): handle literal-like operands correctly
2925         * (genAddrOf): added sanity checks on __code/__data pointers
2926         * (genAssign): added handling of symbols from __code section
2927         * (gencjne): do not generate code for comparisons whose result
2928           is neither stored nor used, fixes bug #1171114
2929         * (AccLsh, AccRsh): operate on operand instead of WREG
2930         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2931           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2932           by known count
2933         * rewrote complete shift-by-literal logic, commented unused
2934           functions out
2935         * (genConstPointerGet): get multiple bytes (if result size > 1),
2936           fixed handling of non-immediate addresses
2937         * (genPointerGet): handle CODE pointers like CONST pointers
2938         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2939         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2940           operand is to be treated as a literal or not
2941         * (mov2w,genPcall,genCmpEq),
2942           src/pic/genarith.c: use aop_isLitLike() to decide between
2943           literal/register contents
2944         * (addSign): added missing offset
2945         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2946           only emit comment in debug-mode,
2947           use {aop,op}_isLitLike throughout the file
2948         * src/pic/glue.c: fix initializers for pointers (work in progress)
2949         * src/pic/pcode.c (get_op): honor index on _const symbols
2950         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2951         * (dumppBlock): added pCode size estimation
2952         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2953           check for IS_SYMOP before OP_SYMBOL'ing
2954         * fixed indentation, compacted switch-statements
2955         * (allocReg): find free register and allocate it instead of
2956           allocating new registers all the time
2957         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2958           registers as its operands (necessary only for multibyte GETs)
2959
2960 2005-07-01 Raphael Neider <rneider AT web.de>
2961
2962         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2963           debugging .asm-output macros FENTRY + FEXIT
2964         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2965           way... I wonder...
2966         * (emitpComment): NEW, printf to pCode
2967         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2968           offset handling
2969         * (popGetAddr): NEW, variant of popGet to access an immediates
2970           high(er) bytes instead of the n'th byte of memory they reference,
2971           replaced popGet with popGetAddr where neccessary
2972         * (genDataPointerGet): reactivated and fixed implementation
2973         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2974           accesses
2975         * (genDataPointerSet): fixed multibyte assignments
2976         * (genpic14Code): fixed --i-code-in-asm handling
2977         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2978         * (genPlus): fixed index-out-of-bounds error
2979         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2980         * src/pic/ralloc.c: added debugging output macro FENTRY2
2981         * (spillThis): fixed indentation, enbraced for-body for clarity
2982         * (rematStr): commented out as now unused
2983         * (regTypeNum): commented out special spill case (overwrites
2984           arbitrary values)
2985         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2986
2987 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2988
2989         * doc/sdccman.lyx: documented sfr16/sfr32,
2990           added example for using storage class with function pointers
2991         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2992
2993 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2994
2995         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2996         * device/lib/_itoa.c,
2997         * device/lib/_ltoa.c: optimized codesize
2998         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2999           but don't know how to suppress the double warning.
3000         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
3001         * support/Util/SDCCerr.c,
3002         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
3003
3004 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
3005
3006         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
3007           fixed old K&R prototypes
3008         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
3009         * device/lib/_gptrget.c,
3010         * device/lib/_gptrgetc.c,
3011         * device/lib/_gptrput.c: changed versions for new memory indicator values,
3012           also new versions for small generic pointers and banked generic pointers
3013         * src/port.h: added const_name
3014         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
3015         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
3016         * src/SDCCcse.c (findPrevIc): check all associative operators
3017         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
3018         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
3019         * src/SDCCmem.c: updated comments,
3020           set far-space to 0 for pdata, results in optimized code
3021         * src/SDCCmem.h: added macro CONST_NAME
3022         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
3023           moving the info into the highest bits, see also gptrget/gptrput
3024         * src/src.dsp: added sdcc.ico to project files
3025         * src/avr/gen.c (genCast): fixed bug 0x%d
3026         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
3027         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
3028           relation between ptr_type and DCL_TYPE,
3029           (genCast): fixed bug 0x%d
3030         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
3031           (CODE)" for const_name
3032         * src/hc08/gen.c (genCast): fixed bug 0x%d
3033         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
3034           (hc08_port): added "CONST (CODE)" for const_name
3035         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
3036           (aopForRemat, adjustArithmeticResult): disconnected direct relation
3037           between ptr_type and DCL_TYPE,
3038           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
3039           operand* and took AOP() inside function so sfr-ness can be checked,
3040           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
3041           new prototype,
3042           (genFunction, genEndFunction): optimized stack setup,
3043           (genMinus): optimized for literals with ending zeroes (in bytes),
3044           (genCast): fixed bug 0x%d
3045         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
3046           (mcs51_port): added "CONST (CODE)" for const_name
3047         * src/mcs51/peeph.def: made rule 226 more generic
3048         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
3049         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
3050         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
3051         * src/z80/main.c (z80_port): added NULL for const_name,
3052           (gbz80_port): added NULL for const_name
3053         * support/regression/tests/bug663539.c,
3054         * support/regression/tests/sfr16.c: new tests
3055
3056 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3057
3058         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
3059
3060 2005-06-24 Raphael Neider <rneider AT web.de>
3061
3062         * device/lib/pic16/libdev/pic18f[68][567]20.c:
3063           corrected typos...
3064         * device/include/pic16/signal.h: added USBIF
3065           and SIG_USB
3066
3067 2005-06-24 Raphael Neider <rneider AT web.de>
3068
3069         * device/lib/pic16/libdev/pic18f2455.c,
3070           device/include/pic16/pic18f2455.h: NEW
3071         * device/include/pic16/pic18fregs.h,
3072           device/lib/pic16/pics.all,
3073           src/pic16/device.c: added 18f2455
3074         * device/lib/pic16/libdev/pic18f[68][567]20.c,
3075           device/include/pic16/{pic18f[68][567].h,usart.h}:
3076           replaced MULTIPLE_USARTS define with more relaible
3077           compatibility sfrs (for USART access)
3078
3079 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
3080
3081         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
3082           and the output asm file line is printed on two lines.
3083
3084 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3085
3086         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
3087           BGT, BLE, BHI, and BLS instructions
3088         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
3089           genCmpEq): removed
3090         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
3091           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
3092           fixes bug #1216342
3093         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
3094
3095 2005-06-15 Raphael Neider <rneider AT web.de>
3096
3097         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
3098         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
3099         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
3100           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
3101           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
3102
3103 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3104
3105         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
3106           Marcel Telka in bug #1215704
3107
3108 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
3109
3110         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
3111           located in shared memory bank.
3112
3113 2005-05-31 Raphael Neider <rneider AT web.de>
3114
3115         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
3116           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
3117           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
3118
3119 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
3120
3121         * device/lib/_strncpy.c: fixed the fix
3122
3123 2005-05-26 Raphael Neider <rneider AT web.de>
3124
3125         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
3126           initializers with \0, bug #1208187
3127         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
3128           intializers with \0, bug #1208187
3129
3130 2005-05-26 Raphael Neider <rneider AT web.de>
3131
3132         * src/pic16/glue.c (pic16_printIvalChar): fixed string
3133           initializers with \0, bug #1208187
3134         * src/pic16/main.c (_process_pragma): added sanity checks
3135           for stack position and size, emit warnings when appropriate
3136
3137 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
3138
3139         * device/lib/_strncpy.c: fixed not filling with \0
3140
3141 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3142
3143         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
3144           createFunction),
3145         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
3146           compound_statement),
3147         * src/SDCCsymt.h,
3148         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
3149
3150 2005-05-24 Raphael Neider <rneider AT web.de>
3151
3152         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
3153
3154 2005-05-24 Raphael Neider <rneider AT web.de>
3155
3156         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
3157           TRISE definitions, closes bug #1162453
3158
3159 2005-05-22 Raphael Neider <rneider AT web.de>
3160
3161         * src/pic16/main.c (_process_pragma): check for missing
3162           arguments to pragmas code and udata
3163         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
3164           consistency fixes to match other headers (thanks to Jim Paris)
3165         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
3166
3167 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
3168
3169         * src/SDCCicode.c (isOperandEqual): fixed missing ;
3170
3171 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
3172
3173         * support/regression/tests/bug1198642.c: new test
3174         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
3175         * src/SDCCcse.c (findPrevIc): added comment, please have a look
3176         * support/scripts/resource.h,
3177         * support/scripts/resource.rc,
3178         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
3179         * support/scripts/sdcc.ico: added 32x32 icon
3180
3181 2005-05-18 Raphael Neider <rneider AT web.de>
3182
3183         * device/lib/pic16/libdev/pic18f*.c,
3184         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
3185           keywords to "__sfr" and "__at (X)"
3186         * device/include/pic16/pic18fregs.h: added pic18f4520
3187         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
3188           #1203088 (MPLAB compatibility)
3189
3190 2005-05-17 Raphael Neider <rneider AT web.de>
3191
3192         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
3193         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
3194         * device/lib/pic16/pics.all: added new devices
3195         * src/pic16/device.c: added support for pic18f4520
3196
3197 2005-05-16 Raphael Neider <rneider AT web.de>
3198         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
3199         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
3200         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
3201           convenience function for bit access
3202
3203 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3204
3205         * device/lib/printf_large.c: fixed bug 1193299
3206         * support/regression/tests/bug1057979.c: added test %3.3s
3207
3208 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3209
3210         * device/include/mcs51/8051.h,
3211         * device/include/mcs51/8052.h: made parseable with lint
3212         * device/include/mcs51/lint.h: added include file for (sp)lint
3213         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
3214         * doc/cdbfileformat.lyx,
3215         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
3216
3217 2005-05-14 Raphael Neider <rneider AT web.de>
3218
3219         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
3220         * device/lib/pic16/libc/stdlib/itoa.c (new)
3221         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
3222         * device/lib/pic16/libio/Makefile: exclude subdir according to
3223           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
3224         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
3225         * src/pic16/gen.c (genFunction): prevent annoying warning
3226         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
3227           nameclashes on BeOS
3228         * support/cpp2/cppmain.c (cpp_output_string): new
3229         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
3230           fixes bug 1116802
3231
3232 2005-05-13 Borut Razem <borut.razem AT siol.net>
3233
3234         * src/SDCCmain.c (linkEdit): fixed bug 1195202
3235
3236 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3237
3238         * .version: changed to version 2.5.1; back to bleeding edge development
3239
3240 2005-05-11 Borut Razem <borut.razem AT siol.net>
3241
3242         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
3243           generate PDF version 1.3 documents
3244
3245 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3246
3247         * .version: changed to version 2.5.0
3248
3249 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3250
3251         * doc/sdccman.lyx: updated weblinks, index and smaller updates
3252
3253 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3254
3255         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
3256         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
3257         well as many smaller updates.
3258         * .version: changed to version 2.5.0-pre1
3259
3260 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3261
3262         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
3263
3264 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
3265
3266         * support/regression/tests/bug1185672.c: added
3267         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
3268           bug 1185672
3269         * src/mcs51/gen.c (genCall): added comments, made it look safer
3270         * src/mcs51/gen.c (genEndFunction): simplified
3271
3272 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
3273
3274         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
3275
3276 2005-04-14 Borut Razem <borut.razem AT siol.net>
3277
3278         * fixed bug 1045046 - SIGSEGV with really simple code?:
3279           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
3280           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
3281
3282 2005-04-14 Borut Razem <borut.razem AT siol.net>
3283
3284         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
3285           src/pic16/device.h: temporarily disabled experimental #inline pragma
3286           for 2.5.0 release
3287
3288 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
3289
3290         * device/include/z80/stdio.h,
3291         * device/include/z80/string.h: removed these highly incomplete files so
3292           SDCC can use the default ones in device/include/
3293
3294 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3295
3296         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
3297         gcc warning.
3298         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
3299         fix sdcpp warnings.
3300
3301 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3302
3303         * device/include/malloc.h: removed redundant __reentrant prototypes
3304         * device/lib/_mullong.c: added working xstack variant in asm (C version
3305           doesn't pass regression tests)
3306         * device/lib/bpx.c: used __data and made bpx char for mcs51
3307         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
3308           (createFunction): fixed bug with xstackPtr
3309         * src/SDCCcse.c: corrected comments
3310         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
3311           (killDeadCode, eBBlockFromiCode): removed unused code
3312         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
3313           corrected comments
3314         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
3315           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
3316           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
3317           (genModOneByte): fixed warning in MSVC
3318         * src/mcs51/main.c (): added comments
3319         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
3320
3321 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
3322
3323         * src/SDCCmain.c (linkEdit): oops, changed one line too many
3324
3325 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
3326
3327         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
3328
3329 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
3330
3331         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
3332         characters arrays of larger size than the declared one.
3333
3334 2005-04-10 Borut Razem <borut.razem AT siol.net>
3335
3336         * src/pic/gen.c (genInline),
3337           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
3338           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
3339           (findNextInstruction), (findPrevInstruction),
3340           (findInstructionUsingLabel),
3341           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
3342         * src/pic/pcode.c (findLabel): added missing '\n'
3343         * src/src.dsp: added SDCCdwarf2.c to the project
3344
3345 2005-04-09 Borut Razem <borut.razem AT siol.net>
3346
3347         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
3348
3349 2005-04-08 Raphael Neider <rneider AT web.de>
3350
3351         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
3352           into the chain after a given one) and mergeDefmapSymbols (combine
3353           defmap entries for each symbol per pcode)
3354         * (createDefmap): have defmap entries merged in the end
3355         * (defmapReplaceSymRef): split defmap entries covering two accesses to
3356           a symbol before replacing one access type's symbol, merge symbols in
3357           the end (replacement symbol might already have an entry)
3358         * (assignValnums): keep reference to written WREG intact
3359
3360 2005-04-08 Raphael Neider <rneider AT web.de>
3361
3362         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
3363           Alpha)
3364
3365 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
3366
3367         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
3368         bytes
3369
3370 2005-04-07 Raphael Neider <rneider AT web.de>
3371
3372         * device/include/pic16/usart.h: added compatibility defines for
3373           devices with more than one USART
3374         * device/include/pic16/pic18f[68][567]20.h: activated above defines
3375
3376 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3377
3378         * device/lib/Makefile.in: updated for port specific include
3379
3380 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3381
3382         * support/regression/ports/mcs51/spec.mk: added mcs51 include
3383
3384 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3385
3386         * device/include/8051.h,
3387         * device/include/8052.h,
3388         * device/include/at89S8252.h,
3389         * device/include/at89c55.h,
3390         * device/include/at89x051.h,
3391         * device/include/at89x51.h,
3392         * device/include/at89x52.h,
3393         * device/include/mcs51reg.h,
3394         * device/include/reg51.h,
3395         * device/include/reg764.h,
3396         * device/include/regc515c.h,
3397         * device/include/sab80515.h: (re)moved these 12 files
3398         * device/include/mcs51/8051.h,
3399         * device/include/mcs51/8052.h,
3400         * device/include/mcs51/at89S8252.h,
3401         * device/include/mcs51/at89c55.h,
3402         * device/include/mcs51/at89x051.h,
3403         * device/include/mcs51/at89x51.h,
3404         * device/include/mcs51/at89x52.h,
3405         * device/include/mcs51/mcs51reg.h,
3406         * device/include/mcs51/reg51.h,
3407         * device/include/mcs51/reg764.h,
3408         * device/include/mcs51/regc515c.h,
3409         * device/include/mcs51/sab80515.h: and added them here
3410
3411 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3412
3413         * device/include/stdarg.h: changed SDCC specific keywords to double
3414           underlined form.
3415         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
3416           mcs51 and ds390.
3417         * device/include/hc08/mc68hc908gp32.h,
3418         * device/include/hc08/mc68hc908jb8.h,
3419         * device/include/hc08/mc68hc908jkjl.h,
3420         * device/include/hc08/mc68hc908qy.h: fixed comments
3421         * device/include/mcs51/README: updated
3422         * device/include/mcs51/c8051f120.h: added PINRSF
3423         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
3424         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
3425           amidst code. Also inline is not supported.
3426
3427 2005-04-06 Raphael Neider <rneider AT web.de>
3428
3429         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
3430         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
3431           callers stack/frame pointers
3432
3433 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3434
3435         * device/include/pic16/usart.h: added, missing in previous commit,
3436         * device/include/pic16/adc.h: fixed typo,
3437         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
3438         commit,
3439         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
3440         <p18fxxx.inc>
3441         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
3442         uninitialized because a bug appears with gplink
3443         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
3444         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
3445         complains for unrecognised option
3446
3447 2005-04-05 Raphael Neider <rneider AT web.de>
3448
3449         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3450           structs as well (using memcpy)
3451         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3452           on ISRs (GOTO has no label)
3453         * src/pic16/device.h: added OF_OPTIMIZE_DF
3454         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3455           new data flow analysis/optimization
3456         * src/pic16/pcode.c: added (prototypes for and implementation of)
3457           dataflow analysis functions, fixed pCodeInstructions' inCond and
3458           outCond values, made RCALL a branch instruction
3459         * (pic16_unlinkpCode): keep C line if possible
3460         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3461           C line moved if possible
3462         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3463         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3464           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3465         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3466           new flow)
3467         * (pic16_getJumptabpCode): NEW, needed in...
3468         * (LinkFlow): fixed handling of jumptables, calls and conditional
3469           branches
3470         * (pic16_InsertCommentAfter): NEW
3471         * (pic16_pCodeReplace): made verbose and flow preserving
3472         * (AnalyzeFlow): added call to data flow analysis
3473         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3474         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3475         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3476
3477 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3478
3479         * src/SDCCast.c (decorateType): fixed bug #1105626
3480
3481 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3482
3483         * device/include/asm/pic16/features.h,
3484         * pic18f*.h headers,
3485         * device/include/pic16/adc.h,
3486         * device/include/pic16/delay.h,
3487         * device/include/pic16/i2c.h,
3488         * device/include/pic16/malloc.h,
3489         * device/include/pic16/stdio.h,
3490         * device/include/pic16/stdlib.h,
3491         * device/include/pic16/string.h,
3492         * device/lib/pic16/libc/stdio/printf_tiny.c,
3493         * device/lib/pic16/libc/stdio/printf_small.c,
3494         * device/lib/pic16/libc/stdio/strmgpsim.c,
3495         * device/lib/pic16/libc/stdio/strmmssp.c,
3496         * device/lib/pic16/libc/stdio/strmusart.c,
3497         * device/lib/pic16/libc/stdio/vfprintf.c,
3498         * device/lib/pic16/libc/stdlib/ltoa.c,
3499         * device/lib/pic16/libc/stdlib/putchar.c,
3500         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3501         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3502         * device/lib/pic16/libc/stdlib/memchrram.c,
3503         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3504         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3505         * device/lib/pic16/libio/adc/adcbusy.c,
3506         * device/lib/pic16/libio/adc/adcread.c,
3507         * device/lib/pic16/libio/adc/adcsetch.c,
3508         * device/lib/pic16/libio/usart/ubaud.c,
3509         * device/lib/pic16/libio/usart/ubusy.c,
3510         * device/lib/pic16/libio/usart/udrdy.c,
3511         * device/lib/pic16/libio/usart/uopen.c,
3512         * device/lib/pic16/libio/usart/uputc.c,
3513         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3514         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3515         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3516         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3517         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3518         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3519         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3520         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3521         specific keywords to double underlined form,
3522         * device/lib/pic16/libc/Makefile.rules,
3523         * device/lib/pic16/libsdcc/Makefile.rules,
3524         * device/lib/pic16/libm/Makefile,
3525         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3526         to compile with C standard set in Makefile.common
3527         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3528         rand.c and crc.c in compilation process,
3529         * device/lib/pic16/libsdcc/int/divuint.c,
3530         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3531         `c' from signed to unsigned,
3532         * device/lib/pic16/startup/crt0.c,
3533         * device/lib/pic16/startup/crt0i.c,
3534         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3535         keywords to double underlined form, bug fixes in _do_cinit function
3536         which prevented the correct initialization of the .idata segment,
3537         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3538         core to enter a infinite loop
3539         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3540
3541 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3542
3543         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3544
3545 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3546
3547         * device/include/Makefile.in: add support for hc08 subdirectory
3548         * device/include/hc08/: new subdirectory
3549         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3550         Lucas Loizaga, thanks!
3551         * device/include/hc08/mc68hc908qy.h,
3552         * device/include/hc08/mc68hc908gp32.h,
3553         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3554         their own directory. Changed internal macro names to use the compiler
3555         reserved namespace. Changed SDCC specific keywords to double
3556         underlined form.
3557         * device/include/math.h,
3558         * device/include/malloc.h,
3559         * device/include/stdarg.h,
3560         * device/include/stdbool.h
3561         * device/include/string.h,
3562         * device/include/tinibios.h,
3563         * device/include/ds400rom.h,
3564         * device/include/8051.h,
3565         * device/include/8052.h,
3566         * device/include/80c51xa.h,
3567         * device/include/at89c55.h,
3568         * device/include/at89S8252.h,
3569         * device/include/at89x51.h,
3570         * device/include/at89x52.h,
3571         * device/include/ds80c390.h,
3572         * device/include/reg764.h,
3573         * device/include/regc515c.h,
3574         * device/include/sab80515.h,
3575         * device/include/mcs51/c8051f000.h,
3576         * device/include/mcs51/c8051f018.h,
3577         * device/include/mcs51/c8051f020.h,
3578         * device/include/mcs51/c8051f040.h,
3579         * device/include/mcs51/c8051f060.h,
3580         * device/include/mcs51/c8051f120.h,
3581         * device/include/mcs51/c8051f300.h,
3582         * device/include/mcs51/c8051f310.h,
3583         * device/include/mcs51/c8051f320.h,
3584         * device/include/mcs51/c8051f330.h,
3585         * device/include/mcs51/c8051f350.h,
3586         * device/include/z180.h: Changed SDCC specific keywords to double
3587         underlined form.
3588
3589 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3590
3591         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3592         18F4455,
3593         * (pic16_assignConfigWordValue): disable testing of configuration
3594         register value with config mask,
3595         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3596         function with port->fun_prefix,
3597         * (genFunction): when generating a naked interrupt function never
3598         create an absolute segment placed in interrupt vector address, place
3599         the actual interrupt function at IVA instead, when an interrupt
3600         function is generated with unspecified interrupt then do not create
3601         the absolute section,
3602         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3603         code for generating a call to generic pointer get/put function with
3604         a call to function pic16_callGenericPointer(),
3605         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3606         the call to the generic pointer get/put functions with prefixing the
3607         function name with port->fun_prefix,
3608         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3609         * src/pic16/main.c (_process_pragma): prefix function with
3610         port->fun_prefix,
3611         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3612         calling assembler, old 18Fxxxx macro is deprecated,
3613         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3614         PC_ASMDIR in while condition,
3615         * (findInstruction): add PC_ASMDIR in while condition,
3616         * (buildCallTree): prefix main with port->fun_prefix,
3617         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3618         identifier for variable with banked access in instructions BTFSS,
3619         BTFSC, BCF, BSF, BTG
3620         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3621         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3622         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3623         perform optimization when enviroment variable NO_REG_OPT is set,
3624         * (insideLRBlock): NEW, return 1 if register is inside an
3625         INF_LOCALREGS block,
3626         * (RemoveRegFromLRBlock): remove a register that is completely
3627         eliminated by register optimization, but it is still left in local
3628         register store/restore in/from stack block,
3629         * (Remove2pcodes): after removing register, check to see if it
3630         should be removed from local register store/restore in/from stack
3631         block,
3632         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3633         DUMMY_READ_VOLATILE,
3634
3635         * device/include/pic16/adc.h: minor prototype modifications and
3636         update,
3637         * device/include/pic16/malloc.h: added GPL notice various
3638         modifications,
3639         * device/include/pic16/stdint.h: NEW, standard header for ints
3640         * device/include/pic16/delay.h: NEW, header for delay functions,
3641         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3642         delay1mtcy,
3643         * device/include/pic16/signal.h: NEW, header providing helper macros
3644         for implementing signal handlers,
3645         * device/include/pic16/stdio.h: added prototypes for functions,
3646         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3647         prototypes for stdin and stdout, added macro PUTCHAR to
3648         automatically implement putchar function prototype,
3649         * device/include/pic16/usart.h: modified and updated USART library,
3650         * device/lib/pic16/libio/adc/,
3651         * device/lib/pic16/libio/i2c: some modifications to improve library
3652         performance,
3653         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3654         family of functions,
3655         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3656         family of functions and other sources,
3657         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3658         of the PIC18Fxx[28] devices,
3659         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3660         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3661         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3662         _do_cinit function, because the previous failed when local variables
3663         where not placed in the same memory bank,
3664         * device/lib/pic16/libsdcc/char/: various modifications to improve
3665         library performance,
3666         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3667         information on the new functions of the c library and more...
3668
3669 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3670
3671         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3672
3673 2005-03-26 Raphael Neider <rneider AT web.de>
3674
3675         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3676           if condition == CARRY)
3677         * (genCmp): adapted to new genSkipc semantics
3678         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3679           on rIfx (genCmp was broken)
3680
3681 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3682
3683         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3684         * src/z80/main.c (_keywords[]),
3685         * src/SDCCglobal.h (struct options),
3686         * src/SDCC.y,
3687         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3688         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3689         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3690         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3691         always available in leading double underscore form. The C99 support is
3692         mostly missing, but it's a start.
3693         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3694         reserved identifier "__data".
3695
3696 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3697
3698         * src/mcs51/peeph.def: fixed bug 1170013
3699
3700 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3701
3702         * device/include/mcs51reg.h: fixed bug 842007
3703
3704 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3705
3706         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3707         last time.
3708
3709 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3710
3711         * src/port.h (struct PORT),
3712         * src/avr/ralloc.c (avr_assignRegisters),
3713         * src/avr/main.c,
3714         * src/ds390/ralloc.c (ds390_assignRegisters),
3715         * src/ds390/main.c,
3716         * src/hc08/ralloc.c (hc08_assignRegisters),
3717         * src/hc08/main.c,
3718         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3719         * src/mcs51/main.c,
3720         * src/pic/ralloc.c (pic14_assignRegisters),
3721         * src/pic/main.c,
3722         * src/pic16/ralloc.c (pic16_assignRegisters),
3723         * src/pic16/main.c,
3724         * src/xa51/ralloc.c (xa51_assignRegisters),
3725         * src/xa51/main.c,
3726         * src/z80/ralloc.c (z80_assignRegisters),
3727         * src/z80/ralloc.h,
3728         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3729         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3730         * src/SDCCcse.h,
3731         * src/SDCCdflow.c (computeDataFlow),
3732         * src/SDCCdflow.h,
3733         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3734         * src/SDCCloop.h,
3735         * src/SDCCcflow.c (*),
3736         * src/SDCCcflow.h,
3737         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3738         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3739         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3740         immedDom() returning wrong block; probably fixes bug #1160833)
3741
3742 2005-03-20 Borut Razem <borut.razem AT siol.net>
3743
3744         * support/scripts/inc2h.pl: WIN32 port
3745
3746 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3747
3748         * device/lib/makefile.in: added abs.c and labs.c
3749
3750 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3751
3752         * device/include/stdint.h: added
3753         * device/lib/abs.c: added
3754         * device/lib/labs.c: added
3755         * device/include/stdlib.h: added abs() and labs() prototypes
3756         * device/lib/libsdcc.lib: added abs and labs
3757         * device/include/float.h,
3758         * device/lib/_fsmul.c,
3759         * device/lib/printf_fast.c,
3760         * device/lib/printf_tiny.c: updated comments
3761
3762 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3763
3764         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3765         bug #1164313
3766
3767 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3768
3769         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3770         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3771
3772 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3773
3774         * device/lib/printf_large.c: removed inline assembly for portability and
3775           readability. Use printf_fast if speed or size are more important.
3776         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3777         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3778
3779 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3780
3781         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3782         prevent compiler warning
3783
3784 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3785
3786         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3787         moved to level 0 and declared as static. Also they are explicit
3788         placed in access bank. This was necessery because some times they
3789         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3790         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3791         optimizations. Currently only compare to unsigned char is implemented,
3792         * src/pic16/gen.c: added fReturnIdx array,
3793         * (struct resolvedIfx) is moved to gen.h and made public,
3794         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3795         * (aopForSym): added an optimization to directly store in stack of
3796         the operand of a SEND iCode,
3797         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3798         but as registers instead (AOP_REG) using the fReturnIdx array,
3799         * (pic16_freeAsmop): remove the freed register from the
3800         _G.sregsAlloc field,
3801         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3802         a compare of 'WREG',
3803         * (pic16_popGetTempRegCond): changed function prototype, now
3804         function takes also a bitVector argument v which holds the current
3805         set of registers that are allocated for stack access by aopForSym,
3806         registers allocated in aopForSym for accessing stack symbols are not
3807         any more part of the functions usedRegs field,
3808         * (genCall): some times aopOp is called for a stack variable to be
3809         send, aopForSym might perform the push, if this is true make sure
3810         that genCall doesn't push the variable twice by testing _G.resDirect,
3811         * (genFunction): changed testing for unspecified interrupt number
3812         from 256 to INTNO_UNSPEC,
3813         * modified selection scheme of frame pointer generation. Previously
3814         if function did use local registers a frame pointer was generated,
3815         now a frame pointer is generated only if function has arguments
3816         (that need PLUSW2 register access), or has stack arguments, or the
3817         compiler is not instructed to omit the frame pointer,
3818         * (genEndFunction): before restoring local registers that were saved
3819         in the function preamble, also restore the registers that *might*
3820         have been allocated for stack access,
3821         * (genRet): removed some old comments,
3822         * (genCmp, the active (RN's) version): added a call to the
3823         pic16_genCmp_special function to perform the compare with a more
3824         robust and optimized way,
3825         * (genInline): a feature has been added in inline code generation,
3826         which allows a wildcard variable substitution when writing inline
3827         assembly. Code is incomplete and experimental therefore undocumented,
3828         * (genCast): changed order of aopOp for result and right to allow
3829         aopForSym to directly load the result if possible,
3830         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3831         perform an optimized compare on some selected special occasions,
3832         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3833         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3834         generate an IVT any more,
3835         * src/pic16/main.c (pic16_optionsTable): added command line option
3836         --optimize-cmp,
3837         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3838         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3839         macros,
3840         * src/pic16/NOTES: Raphael Neider added in list of active developers
3841         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3842         jumptable_end to prevent bug #,
3843         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3844         inCond and outCond fields,
3845         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3846         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3847         turn off register spilling,
3848         * (packRegsForOneUse): synced with other ports' versions although it
3849         is not used currently,
3850         * (pic16_packRegisters): added an optimization while reading
3851         structure bitfields, some registers may be saved (malloc code is
3852         decreased by 80 bytes)
3853
3854 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3855
3856         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3857         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3858         this can be optimized more?
3859
3860 2005-03-10 Raphael Neider <rneider AT web.de>
3861
3862         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3863           genNearPointerGet): (hopefully) fixed access to bitfields via
3864           pointers (p->bitN = x; and x = p->bitN; failed)
3865
3866 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3867
3868         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3869
3870 2005-03-09 Raphael Neider <rneider AT web.de>
3871
3872         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3873
3874 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3875
3876         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3877         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3878           (regTypeNum): set REG_BIT type if necessary
3879         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3880         * support/regression/tests/critical.c: check bug 1144613
3881
3882 2005-03-02 Raphael Neider <rneider AT web.de>
3883
3884         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3885
3886 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3887
3888         * src/avr/ralloc.c (serialRegAssign),
3889         * src/ds390/ralloc.c (serialRegAssign),
3890         * src/hc08/ralloc.c (serialRegAssign),
3891         * src/mcs51/ralloc.c (serialRegAssign),
3892         * src/pic/ralloc.c (serialRegAssign),
3893         * src/pic16/ralloc.c (serialRegAssign),
3894         * src/xa51/ralloc.c (serialRegAssign),
3895         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3896
3897 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3898
3899         * src/SDCCast.c (decorateType): fixed bug 1124787
3900
3901 2005-02-20 Hubert Sack <sack AT digiplan.de>
3902         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3903
3904         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3905         patch #1121755
3906
3907 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3908
3909         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3910         to keep the correct label reference count when adding/removing references
3911         to labels. A peephole file using this is appended to patch #1144962.
3912
3913 2005-02-14 Raphael Neider <rneider AT web.de>
3914
3915         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3916         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3917         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3918           retrievals of result operand's value on assignment
3919
3920 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3921
3922         * device/include/pic16/string.h: modified prototype for memccpy()
3923         to memccpy(void *, void *, char, size_t)
3924         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3925         check whether to omit frame pointer or not,
3926         * (genInline): convert all occurences of "\n" to LF in inline
3927         assembler blocks, this helps formatting the inline text,
3928         * (pic16_loadFSR0): modified prototype,
3929         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3930         removed some 8051 legacy code,
3931         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3932         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3933         before allocating temporary registers in functions,
3934
3935 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3936
3937         * support/regression/tests/bitvars.c: corrected the "fix"
3938
3939 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3940
3941         * support/regression/tests/bitvars.c,
3942         * support/regression/tests/bitwise.c,
3943         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3944
3945 2005-02-10 Raphael Neider <rneider AT web.de>
3946
3947         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3948           different size for Alpha
3949         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3950
3951 2005-02-09 Raphael Neider <rneider AT web.de>
3952
3953         * src/SDCC.lex(doPragma) : save and restore warning options as well
3954           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3955         * have #pragma less_pedantic set the errorlevel to WARNING
3956           (fixes #1117001)
3957         * (cloneOptimize) : fixed wrong malloc's size
3958         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3959           facilitate correct handling of #pragma (save|restore)
3960
3961 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3962
3963         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3964
3965 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3966
3967         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3968
3969 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3970
3971         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3972
3973 2005-02-02 Raphael Neider <rneider AT web.de>
3974
3975         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3976         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3977         * (pic16_storeForReturn): fixed to allow returning function pointers
3978         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3979         * device/include/pic16/{stddef.h,stdbool.h}: added
3980
3981 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3982
3983         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3984
3985 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3986
3987         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3988         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3989          appeared to be required
3990
3991 2005-01-31 Borut Razem <borut.razem AT siol.net>
3992
3993         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3994           include/mcs51 and include/z80 directories to the package
3995
3996 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3997
3998         * src/hc08/gen.c (genFunction): fixed bug #1112752
3999
4000 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4001
4002         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
4003
4004 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4005
4006         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
4007
4008 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
4009
4010         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
4011
4012 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
4013
4014         * device/include/c8051fxxx.h: removed these 6 files
4015         * device/include/mcs51/c8051fxxx.h: added these 11 new files
4016
4017 2005-01-26 Raphael Neider <rneider AT web.de>
4018
4019         * src/pic16/gen.c (genAssign): fixed assignment from longs
4020           in codespace (were cut to three bytes)
4021         * (genDummyRead): implemented (except for CODESPACE...),
4022           fixed bug #1108575
4023         * src/pic16/glue.c (emitStatistics): beautified
4024         * device/lib/pic16/libm/Makefile: added include path
4025
4026 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4027
4028         * src/z80/gen.c (aopPut): fixed bug #1103902
4029
4030 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4031
4032         * device/lib/expf.c: fixed bug #1095792
4033
4034 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
4035
4036         * device/lib/pic16/libm: added Math library sources
4037
4038 2005-01-24 Raphael Neider <rneider AT web.de>
4039
4040         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
4041           to enable upcast to pCodeOpReg2 (there is no type tag to
4042           differenciate the two and pic16_popGet2p cast into PCOR2)
4043         * src/pic16/main.c (_process_pragma): fixed another malloc bug
4044           (sizeof(sectNames) changed to sizeof(sectName))
4045           Both patches fix segfaults under MinGW.
4046
4047 2005-01-23 Raphael Neider <rneider AT web.de>
4048
4049         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
4050           Safe_[mc]?alloc()'ed variables
4051         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
4052           of (byte sized) temporaries (assign them to WREG for now)
4053         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
4054           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
4055           this might fix SIGSEGVs on MinGW...
4056         * src/SDCCopt.c (killDeadCode): restored original behaviour
4057           (volatile operands might get thrown away though)
4058
4059 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
4060
4061         * src/pic16/gen.c: fixed bug #1106975,
4062         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
4063         pointer update, INTCON is saved, global interrupts are disabled and
4064         restored after updateing TOS.
4065         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
4066         * added function attribute 'shadowregs' to take advantage of shadow
4067         registers,
4068         * added function attribute 'wparam' as an alternative to the wparam
4069         pragma,
4070         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
4071         user declares a non-ISR function as 'shadowregs',
4072         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
4073
4074 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
4075
4076         * .version: bumped version number to 2.4.8
4077         * device/lib/pic16/pics.all: list of PIC18F devices supported by
4078         pic16 port,
4079         * device/lib/pic16/libio/i2c/: I2C module support library,
4080         * device/include/pic16/i2c.h: I2C support library header,
4081         * device/lib/pic16/libc/stdio/: standard IO support sources,
4082         * (printf_small.c): printf_small() source, supports float print,
4083         * (printf_tiny.c): printf_tiny() source, does not support floats,
4084         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
4085         enable global optimizations for entire library source, other
4086         Makefiles in the source tree are also modified to reflect this,
4087         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
4088         function,
4089         * doc/sdccman.lyx: updated to reflect new changes,
4090         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
4091         sym->onStack if-case,
4092         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
4093         sbit, idata, _idata, xdata, _xdata,
4094         * added pragma library, to link an external library, (see doc),
4095         * removed command line options, --pomit-config-words, --pomit-ivt,
4096         --pleave-reset-vector,
4097         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
4098         when calling assembler to reflect memory model used, also define
4099         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
4100         reflect stack model used,
4101         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
4102         on stack return NULL,
4103
4104 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4105
4106         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
4107           of the operands is volatile. Fixes #1020220
4108
4109 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4110
4111         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
4112         * (OptimizeRegUsage): make sure that there is really no other flow where
4113           the first pCode is used
4114
4115 2005-01-22 Raphael Neider <rneider AT web.de>
4116
4117         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
4118           to fix #1106967 (pCode->seq are not set up correctly)
4119
4120 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4121
4122         * src/SDCCglue.c (glue): make sure code area is declared before the
4123         static initialization area.
4124
4125 2005-01-21 Raphael Neider <rneider AT web.de>
4126
4127         * device/lib/Makefile.in: fixed test for pic16 install dir
4128         * device/lib/pic16/*/Makefile*: modified compile flags to enable
4129           optimizations
4130         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
4131           added --optimize-goto compiler switch and pragma wparam documentation
4132         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
4133         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
4134           and PRODH closing bug #1071770 (peephole optimizer)
4135
4136 2005-01-19 Raphael Neider <rneider AT web.de>
4137
4138         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
4139           cmdLine buffers (used when calling sdcpp...) are large enough
4140           (MAX_PATH=256 truncates arguments leading to system halts when
4141           used in MinGW...)
4142         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
4143         * (genUminus): rewritten to for efficiency
4144         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
4145           used uninitialized in some cases)
4146         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
4147           copy the third byte from the int -- now assumes 0x80 (data memory)
4148         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
4149           operands (genAddLit expects the iCode's operands to swapped as
4150           well), fixed leftover bytes (crashed for short left operands)
4151         * (pic16_genMinusDec): performance improvements, removed false
4152           PIC14 emitSKPNCs
4153         * (pic16_genMinus): fixed to cope with differently sized operands
4154         * src/pic16/glue.c (pic16_glue): added new banksel optimization
4155           for --obanksel > 1
4156         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
4157         * src/pic16/graph.[ch]: implementation of directed graphs, used by
4158           new banksel optimization
4159         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
4160           analysis for temporary registers (segfaults...)
4161         * src/pic16/peeph.def: added rule
4162
4163 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
4164
4165         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
4166         which converts a float number to its ASCII representation
4167         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
4168         functions to convert the fractional and integer part of a float to ASCII,
4169         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
4170         realloc.c): added _MALLOC_SPEC to explicit place variables in data
4171         ram
4172         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
4173         _STATMEM macros,
4174         * device/include/pic16/adc.h: added GPL info,
4175         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
4176         a pCodeOp as tested operand,
4177         * (genNearPointerGet): optimized bit testing, does not use
4178         intermediate register for bit value, test directly instead with
4179         BTFSS, BTFSC, works only for single bits,
4180         * (genpic16Code): dump the name of the iCode in the asm,
4181         * src/pic16/ralloc.c (decodeOp): removed static declaration and
4182         renamed to pic16_decodeOp,
4183         * (serialRegAssign): do not allocate a temporary register for iCode
4184         sequences that test a single bit for 1/0
4185
4186 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
4187
4188         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
4189         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
4190         access stack and frame pointers. They are initially assigned to
4191         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
4192         accessing SFRs. Updated all occurences of modification of stack or
4193         frame pointer in gen.c and pcode.c,
4194         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
4195         assigning of a literal value to pointers,
4196         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
4197         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
4198         selected
4199
4200 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4201
4202         * doc/sdccman.lyx: update documentation about stack pragma, added
4203         some info for stack memory models
4204
4205 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4206
4207         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
4208
4209 2005-01-08 Raphael Neider <rneider AT web.de>
4210
4211         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
4212           udata sections to fix bug #1097823
4213
4214 2005-01-05 Raphael Neider <rneider AT web.de>
4215
4216         * src/pic16/gen.c (genGenericShift): added handling of differently
4217           sized left operand and result
4218
4219 2005-01-04 Raphael Neider <rneider AT web.de>
4220
4221         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
4222         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
4223           to hold the condition bit)
4224         * added new version of genCmp (old code available via #define)
4225         * added new version of genShiftLeft/genShiftRight in a generic
4226           way, now supports shifting by negative values
4227         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
4228           shiftCount (expected by genGenericShift)
4229         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
4230         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
4231           dump
4232         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
4233           is an invalid literal too...)
4234
4235 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
4236
4237         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
4238         from Raphael Neider,
4239         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
4240         for 8-bit literals. This fixes some literal operands which are sign
4241         extended to 16-bits ints when instruction needs only 8-bits.
4242
4243 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
4244
4245         * device/lib/logf.c: added mcs51 assembly version
4246         * device/lib/expf.c: added mcs51 assembly version
4247         * device/lib/_logexpf.c: new shared asm code for expf and logf
4248         * device/include/math.h: add defines for assembly math library
4249         * device/lib/Makefile.in: build new _logexpf.c
4250         * device/lib/libfloat.lib: use new _logexpf.c
4251
4252 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4253
4254         * src/pic/device.c
4255         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
4256           device types which have less than 0x7f registers.
4257
4258 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
4259
4260         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
4261
4262 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4263
4264         * device/lib/printf_fast.c: only build on supported arch.
4265         * device/lib/printf_tiny.c: only build on supported arch.
4266         * device/lib/printf_fast_f.c: only build if asm float lib
4267         * device/lib/_fsget1arg.c: only build if asm float lib
4268         * device/lib/_fsget2args.c: only build if asm float lib
4269         * device/lib/_fsnormalize.c: only build if asm float lib
4270         * device/lib/_fsreturnval.c: only build if asm float lib
4271         * device/lib/_fsrshift.c: only build if asm float lib
4272         * device/lib/_fsswapargs.c: only build if asm float lib
4273         * device/include/stdio.h: don't provide print_fast,
4274           print_fast_f, print_tiny prototypes if --xstack used
4275
4276 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
4277
4278         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
4279         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
4280           to the SOURCES
4281
4282 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
4283
4284         * device/lib/printf_fast_f.c: same as printf_fast, but
4285           with floating point enabled
4286         * device/lib/printf_fast.c: minor tweaks
4287         * device/include/stdio.h: add printf_fast_f
4288
4289 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4290
4291         * src/SDCCmain.c: make --float-reent default for mcs51
4292         * device/lib/_fsadd.c: added mcs51 assembly version
4293         * device/lib/_fssub.c: added mcs51 assembly version
4294         * device/lib/_fsmul.c: added mcs51 assembly version
4295         * device/lib/_fsdiv.c: added mcs51 assembly version
4296         * device/lib/_fseq.c: added mcs51 assembly version
4297         * device/lib/_fsneq.c: added mcs51 assembly version
4298         * device/lib/_fsgt.c: added mcs51 assembly version
4299         * device/lib/_fslt.c: added mcs51 assembly version
4300         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
4301         * device/lib/Makefile.in: add _fscmp to build
4302         * device/lib/libfloat.lib: add _fscmp to build
4303
4304 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
4305
4306         * device/lib/_fs2slong.c: added mcs51 assembly version
4307         * device/lib/_fs2sint.c: added mcs51 assembly version
4308         * device/lib/_fs2schar.c: added mcs51 assembly version
4309         * device/lib/_fs2ulong.c: added mcs51 assembly version
4310         * device/lib/_fs2uint.c: added mcs51 assembly version
4311         * device/lib/_fs2uchar.c: added mcs51 assembly version
4312         * device/lib/_slong2fs.c: added mcs51 assembly version
4313         * device/lib/_sint2fs.c: added mcs51 assembly version
4314         * device/lib/_schar2fs.c: added mcs51 assembly version
4315         * device/lib/_ulong2fs.c: added mcs51 assembly version
4316         * device/lib/_uint2fs.c: added mcs51 assembly version
4317         * device/lib/_uchar2fs.c: added mcs51 assembly version
4318         * device/include/float.h: added #define to select asm vs c
4319
4320 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
4321
4322         * device/lib/printf_fast.c: improvements to float output
4323         * device/include/float.h: add defines for assembly float library
4324         * device/lib/_fsget1arg.c: receive 1 float arg
4325         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
4326         * device/lib/_fsnormalize.c: normalize a float
4327         * device/lib/_fsreturnval.c: return float, various helper routines
4328         * device/lib/_fsrshift.c: right shift a float's mantissa
4329         * device/lib/_fsswapargs.c: swap 2 floats
4330         * device/lib/Makefile.in: build these 6 new files for mcs51
4331         * device/lib/libfloat.lib: add these 6 files to the library
4332
4333 2004-12-26 Borut Razem <borut.razem AT siol.net>
4334
4335         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
4336           built by gcc 3.4.2
4337
4338 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
4339
4340         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
4341           and fully reentrant and register bank neutral.
4342         * device/lib/printf_fast.c: added float (not enabled by default),
4343           added compact/slower integer (also not enabled by default),
4344           improved size/speed of fast integer code, other minor changes
4345         * device/include/stdio.h, device/lib/Makefile.in,
4346           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
4347
4348 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
4349
4350         * src/pic16/pcode.c: declaring variables other than at the start of a
4351           block is not supported in C by VC6.
4352
4353 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
4354
4355         * applied a previous patch from Raphael Neider that wasn't included
4356         in the previous commits, which fixes infinite loops within jumptable
4357         improvements,
4358         * made some fixes that previous patches introduced
4359
4360 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
4361
4362         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
4363         that fixes an issue with AOP_PCODE asmop's offset,
4364         * (pic16_popCopyReg): update instance field too,
4365         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
4366         function of pic port,
4367         * (genCmp, genAnd, genAssign),
4368         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
4369
4370 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
4371
4372         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4373         variables initial values to idata section,
4374         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
4375         variables in some functions. This utilizes parmBytes field of iCode
4376         structure to hold the offset of the variable in stack. (might be
4377         able to use the stack field too?)
4378         * applied patch from Raphael Neider # ### , # ###
4379         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
4380         variable initial values in idata section,
4381         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
4382         for static variables with initial value
4383         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
4384         applied fix in while loop from Raphael Neider.
4385
4386 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
4387
4388         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
4389         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
4390         * src/ds390/ralloc.c (serialRegAssign): spill bits
4391         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
4392         * support/Util/SDCCerr.c,
4393         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
4394         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
4395         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
4396
4397 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
4398
4399         * device/include/sdcc-lib.h: inserted LGPL, added includes
4400           asm/ds390/features.h and asm/mcs51/features.h
4401         * device/include/asm/default/features.h,
4402         * device/include/asm/gbz80/features.h,
4403         * device/include/asm/z80/features.h: added empty _AUTOMEM
4404           and _STATMEM
4405         * device/include/asm/ds390/features.h,
4406         * device/include/asm/mcs51/features.h: added files with defines for
4407           _AUTOMEM and _STATMEM indicating automatic and static storage class
4408         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
4409         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
4410         * src/SDCCicode.c (geniCodeCast),
4411         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
4412         * src/SDCCloop.c (loopInduction): removed unused variable lr
4413         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
4414           to convertToFcall to include char modulo (RFE 1065037), added check
4415           if left operand is unsigned and use abs of literal value
4416         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
4417           as it doesn't work after conversion from peephole.def to peephole.rul
4418         * src/mcs51/gen.c (toBoolean): added check for size,
4419           (genModOneByte): optimized code for signed char modulo a literal
4420           power of 2 (thanks to Hubert Sack),
4421           (genRRC): removed unnecessary "clr c",
4422           (genRLC): replaced "add a,acc" with cheaper "rlc a"
4423         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
4424           jump optimization,
4425           swapped rules 256.c and 256.d,
4426           extended 256.d by using new multiple checks (thanks Erik),
4427           added rules 256.e and 256.f,
4428           updated rule 261.a and 261.b to new generated code
4429         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
4430
4431 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4432
4433         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
4434           induction related bugs, including first part of bug #1074377
4435
4436 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
4437
4438         * applied patch from bug-report #1076292,
4439         * applied patches for genAnd and Goto-optimizations for Raphael
4440         Neider,
4441         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
4442         dump a less iCode information,
4443         * src/pic16/device.h (pic16_options_t): added field debgen,
4444         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
4445         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4446         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4447         puclic,
4448         * (various functions): added macros FENTRY and FENTRY2 to functions,
4449         to emit function prologue,
4450         * (various functions): fixed indentation,
4451         * (genNearPointerGet): fixed loading of FSR0,
4452         * (genPackBits): applied patch from Raphael Neider to fix updating
4453         of FSR0 and touching only the modified bits,
4454         * src/pic16/genarith.c (various functions): added macros FENTRY to
4455         emit function prologue in comments,
4456         * src/pic16/pcode.h: added functions debugf2, debugf3,
4457         * src/pic16/ralloc.c: partial fix for packForPush caused
4458         segmentation fault,
4459
4460 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4461
4462         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4463           <stsp AT users.sourceforge.net> with reversed byte order
4464         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4465
4466 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4467
4468         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4469           bug #1074377
4470         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4471         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4472
4473 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4474
4475         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4476
4477 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4478
4479         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4480           conditions,
4481           (setFromConditionArgs): friendly operand parser for peephole rules,
4482           (operandBaseName, operandsNotRelated): new peephole condition
4483           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4484           architecture specific register naming into account, handles n-way
4485           comparisons, and supports quoted literals
4486         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4487
4488 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4489
4490         * src/mcs51/peeph.def: fixed bug #1076940
4491
4492 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4493
4494         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4495
4496 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4497
4498         Adding support for replacing ljmps with sjmps in jumptables
4499         generated for switch statements. For now you need to set the
4500         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4501         Now 4 algorithms for mcs51 jumptable generation are used:
4502         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4503         addresses loaded pc-relative for up to 112 cases and stack-pushing
4504         target addresses loaded with offset from dptr for up to 256 cases.
4505
4506         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4507         * src/mcs51/main.c: adapted constants for switch table generation
4508         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4509
4510 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4511
4512         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4513         * support/regression/tests/bug1057979.c: added test for bug 1073386
4514
4515 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4516
4517         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4518         compilers
4519
4520 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4521
4522         * src/pic16/device.h,
4523         * src/pic16/genarith.c,
4524         * src/pic16/glue.c,
4525         * src/pic16/main.c,
4526         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4527
4528 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4529
4530         Large cummulative patch for pic16 port.
4531         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4532         to call when a stack overflow occurs,
4533         * (malloc.h): added CVS Id tag,
4534         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4535         variable,
4536         * added libc directory. The current version of LibC contains string
4537         functions, ctype functions and macros and some functions of the
4538         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4539         be extensively tested in the future. Standard disclaimer here.
4540         Library is not automatically build yet. But one can build it by
4541         invoking 'make' inside the libc directory.
4542         * added ADC library under libio. Preliminary version yet.
4543
4544         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4545         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4546         aopForRemat() now and not by pic16_aopOp(),
4547         * (pic16_popGetTempReg): removed warning messgae when allocating
4548         temporary registers, its a buggy feature and will be removed,
4549         * (pic16_popGet): set register instance field in AOP_CRY,
4550         * (pic16_outBitC): fixed for results in size greater than 1,
4551         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4552         * (pic16_storeForReturn): optimized return of 0,
4553         * (genCmp): experimental code for new genCmp which uses PIC18's
4554         special compare&skip instructions. Initial tests fail some times
4555         with variables grater than 1 byte in size, so new code is disabled,
4556         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4557         a single bit,
4558         * (genCast): began a fix to optimize the casting of a bit to another
4559         bit, now assigning a bitfield to another bitfield will fail, sorry,
4560         * src/pic16/main.c: disabled the use of lr-support feature,
4561         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4562         * added some function prototypes, added function _debugf prototype,
4563         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4564         bits with offset (case PO_GPR_BIT),
4565         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4566         command line,
4567         * (isBankInstruction): modified to return 0 for no banking instruction,
4568         and 1 for banking instruction,
4569         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4570         caused stop processing pCodes after a inline assembly block,
4571         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4572         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4573         registers when it shouldn't,
4574         * src/pic16/ralloc.c (allocReg): add preliminary support for
4575         supporting a limited set of temporary registers,
4576
4577 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4578
4579         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4580           genDataPointerSet): ensure assignments always copy in MSB to LSB
4581           order,
4582           (loadRegFromAop): recognize CLRH optimization,
4583           (genFunction): optimize RECEIVE iCodes in reentrant functions
4584
4585 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4586
4587         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4588           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4589           selected.
4590         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4591         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4592           contiguous with data
4593
4594 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4595
4596         * device/lib/_gptrget.c (_gptrget),
4597         * device/lib/_gptrgetc.c (_gptrgetc),
4598         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4599           instead of sjmp to ret
4600         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4601           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4602
4603 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4604
4605         * .version: bumped version to 2.4.7
4606         * device/lib/_gptrget.c (_gptrget): is now _naked
4607         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4608         * device/lib/_gptrput.c (_gptrput): is now _naked
4609         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4610           (createFunction): fixed xstack
4611         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4612         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4613           or bit either,
4614           (geniCodeCritical): store original interrupt state in an iTemp bit
4615           var unless stack-auto
4616         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4617         * src/SDCCmain.c (setIncludePath): added include/target to search path
4618         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4619         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4620           prototype,
4621           (processFuncArgs): put bit vars in bit area
4622         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4623           unsaveRBank): fixed xstack,
4624           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4625           (genFunction, genEndFunction): fixed xstack,
4626           (genAssign): optimization don't walk backwards through mem
4627         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4628         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4629         * support/regression/Makefile: also make library (for stack-auto) when
4630           making "all" and added "test-mcs51-xstack-auto"
4631         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4632         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4633         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4634         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4635         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4636           make-library by MAKE_LIBRARY
4637         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4638           regression tests for xstack
4639         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4640         * support/regression/tests/critical.c: test for critical on mcs51
4641
4642 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4643
4644         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4645           built version of sdcc instead of installed version
4646
4647 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4648
4649         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4650         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4651           vprintf.c now
4652         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4653         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4654           WARNING: remove device/lib/build/z80/printf.o by hand when
4655           updating from previous build!
4656         * device/lib/z80/printf.c: updated comment
4657         * support/regression/tests/bug1057979.c: test all ports now
4658         * support/regression/tests/bug1065458.c: file added
4659
4660 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4661
4662         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4663           *_start and *_end symbols for static functions
4664
4665 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4666
4667         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4668           and search crt0.o in all library paths,
4669           (setIncludePath): proper handling of --nostdinc,
4670           (setLibPath): proper handling of --nostdlib
4671         * support/regression/Makefile,
4672         * support/regression/ports/ds390/spec.mk,
4673         * support/regression/ports/gbz80/spec.mk,
4674         * support/regression/ports/hc08/spec.mk,
4675         * support/regression/ports/mcs51/spec.mk,
4676         * support/regression/ports/mcs51-large/spec.mk,
4677         * support/regression/ports/mcs51-stack-auto/spec.mk,
4678         * support/regression/ports/z80/spec.mk: use include and lib files from
4679           built version of sdcc instead of installed version
4680         * doc/sdccman.lyx: fixed typo in --nostdinc
4681
4682 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4683
4684         * src/pic/pcode.c,
4685         * src/pic/device.c,
4686         * src/pic/ralloc.c,
4687         * src/pic/gen.c : added support to generate code for struct bit fields.
4688
4689 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4690
4691         * as/xa51/xa_version.h,
4692         * device/include/errno.h,
4693         * device/include/regc515c.h,
4694         * device/lib/_itoa.c,
4695         * device/lib/_ltoa.c,
4696         * device/lib/ser_ir_cts_rts.c,
4697         * sim/ucsim/xa.src/glob.cc,
4698         * sim/ucsim/xa.src/inst_gen.cc,
4699         * sim/ucsim/xa.src/xa_bit.cc,
4700         * sim/ucsim/xa.src/xa_sfr.cc,
4701         * sim/ucsim/z80.src/inst_dd.cc,
4702         * sim/ucsim/z80.src/inst_fdcb.cc,
4703         * support/scripts/keil2sdcc.pl,
4704         * src/pic16/pic16.dsp,
4705         * src/pic16/pic16a.dsp: corrected cvs line endings
4706         * device/lib/printf_large.c: fixed bug 1057979
4707         * src/pic16/gen.c: fixed non-C standard code
4708         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4709         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4710         * support/regression/ports/mcs51/support.c: reload T1 asap
4711         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4712           pdata use and clear idata startup behaviour
4713         * support/regression/tests/bug1057979.c: added
4714
4715 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4716
4717         * device/examples/ds390/ow390/ad26.h,
4718         * device/examples/ds390/ow390/cnt1d.h,
4719         * device/examples/ds390/ow390/crcutil.c,
4720         * device/examples/ds390/ow390/ownet.h,
4721         * device/examples/ds390/ow390/owsesu.c,
4722         * device/examples/ds390/ow390/swt12.h,
4723         * device/examples/ds390/ow390/swtoper.c,
4724         * device/examples/ds390/ow390/temp10.h,
4725         * device/examples/ds390/ow390/thermodl.c,
4726         * device/examples/ds390/tinitalk/tinitalk.dsp,
4727         * device/examples/ds390/tinitalk/tinitalk.dsw,
4728         * device/examples/mcs51/clock/hw.h,
4729         * device/examples/mcs51/simple2/go.bat,
4730         * device/examples/serialcomm/windows/serial.h,
4731         * device/examples/xa51/dummy.c,
4732         * device/examples/xa51/hello.c,
4733         * device/include/80c51xa.h,
4734         * device/include/at89x051.h: corrected cvs line endings
4735
4736 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4737
4738         * src/pic16/main.c (options): added command line --gstack, to trace
4739         stack over/under flows,
4740         * added pragma 'wparam' to allow passing first byte of function
4741         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4742         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4743         call to __gstack_test function and sets up the symbol as extern,
4744         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4745         * popaop): added call to pic16_testStackOverflow,
4746         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4747         wparamList list,
4748         * (genCall, genPcall): now all parameters are passed via stack
4749         except in functions that are pass to wparam pragma in which WREG is
4750         used too,
4751         * (genPcall): REENTRANT flag is checked to see if variable prototype
4752         contains reentrant keyword, don't call a non-reentrant function, via
4753         a reentrant function pointer or vice versa, functions are never
4754         passed via WREG,
4755         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4756         D.Winkler,
4757         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4758         SIGSEGV when accessing a NULL register stucture,
4759         * (pic16_printGPointerType): modified to handle UPPER modifier for
4760         function initializers, changed prototype of function to simpler one,
4761         * (pic16_printIvalFuncPtr): check to see if function is already
4762         added in externs list,
4763         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4764         optimized a move from W to SFR with a move to the same register
4765         later after a CALL,
4766         * device/lib/pic16/debug: NEW directory, contains debug features
4767         which are enabled when linking with libdebug.lib, currently command
4768         line option --gstack enables stack pointer tracing for over/under
4769         flow, corresponding sources are in debug/gstack
4770
4771 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4772
4773         * doc/sdccman.lyx: updated SDCC version,
4774         * (PIC16 port): update list of command line options,
4775         * src/pic16/device.h (structure pic16_options_t): added field gstack
4776         to enable stack overflow tracing on push/pops,
4777         * src/pic16/device.c (statistics structure): added statistics
4778         structure,
4779         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4780         pic16_dump_int_registers): increase statistics counters for each
4781         * variable which is encountered
4782         * (pic16_dump_usection): emit each .udata variable to its own udata
4783         section,
4784         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4785         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4786         parameters via stack, otherwise use old scheme,
4787         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4788         assembler output file,
4789         * src/pic16/main.c: added command line options --gstack to enable
4790         push/pop tracing for stack overflow,
4791         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4792         instructions): added size of each instruction,
4793         * (pic16_countInstruction): estimate size of instructions in
4794         the_pFile list, inline assembly blocks are not counted,
4795         * (pic16_FixRegisterBanking): trace previous register usage, when
4796         banksel optimizations is greater than 0, don't emit a redudant
4797         banksel directive,
4798
4799 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4800
4801         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4802         * src/pic16/ralloc.c : applied same fix for pic16.
4803         * src/pic/gen.c : tidied it up a little.
4804
4805 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4806
4807         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4808         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4809
4810 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4811
4812         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4813
4814 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4815
4816         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4817         non-reentrant function __modsint in the interrupt function (thus
4818         corrupting math operations during serial I/O)
4819         * device/lib/ser_ir.c: as above, changed buffersize
4820         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4821         256.c,d for zeroing
4822         * doc/Makefile: added option -t for rsync
4823
4824 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4825
4826         * src/SDCCast.h (struct ast),
4827         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4828
4829 2004-10-20 Borut Razem <borut.razem AT siol.net>
4830
4831         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4832         package
4833
4834 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4835
4836         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4837         makefile targets,
4838         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4839         support functions to replace long sequences of MOVFF's from access
4840         bank registers to stack and vice versa,
4841         * src/pic16/device.h: added new field opt_flags, where optimization
4842         flags can be set to enable certain features,
4843         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4844         * pBlock, (genFunction, genEndFunction): surroung loop for
4845         saving/loading used registers in stack with PC_INFO pCodes,
4846         INF_LREGS. Code in between can then be optimized by pCode optimizer
4847         to support function calls,
4848         * (genDataPointerSet): fixed bug which loaded float fields in
4849         structures with corrupt data,
4850         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4851         in a standard way debug info on stderr. Feature used for developing
4852         and debugging only,
4853         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4854         obsolete chunks of code,
4855         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4856         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4857         * pic16/src/pcode.c (pic16_newpCodeInfo,
4858         * (pic16_newpCodeOpLocalRegs),
4859         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4860         feature,
4861         * (pic16_pCodeConstString): printing of the initial value of a
4862         symbol as a comment is inhibited since parsing was already done by
4863         copyStr and output is corrupt,
4864         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4865
4866 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4867
4868         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4869
4870 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4871
4872         * as/mcs51/lkarea.c: removed old K&R style,
4873           (lnksect): changed check on boundary error,
4874           (lnksect2): changed check on boundary error,
4875           (lnksect2): extend XSTK to end of page if size = 1
4876         * as/mcs51/lkmain.c: removed old K&R style,
4877           (Areas51): create l_IRAM symbol
4878         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4879         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4880           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4881         * device/lib/_mullong.c: added version to be compiled with xstack
4882         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4883         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4884         * device/lib/mcs51/crtxstack.asm: fixed comment
4885         * src/SDCCglue.c: maxInterrupts defaults to 0,
4886           (emitMaps): added pdata,
4887           (createInterruptVect): (re)moved default,
4888           (glue): added pdata,
4889           (glue): moved __start__xstack to XSTK with default size 1
4890         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4891           and options.float_rent when options.stackAuto is set,
4892           (linkEdit): only write XDATA_NAME if provided on command line
4893         * src/SDCCmem.h,
4894         * src/SDCCmem.c: added pdata
4895         * src/port.h: added pdata_name to PORT
4896         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4897           (saveRegisters, unsaveRegisters): removed usage of B,
4898           (genMinus): fixed accumulator clash,
4899           (genJumpTab): added comment, this needs another look
4900         * src/mcs51/gen.c: added check for "B in use" paranoia,
4901           added pushB() and popB()
4902         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4903           chance
4904         * src/avr/main.c,
4905         * src/ds390/main.c,
4906         * src/hc08/main.c,
4907         * src/mcs51/main.c,
4908         * src/pic/main.c,
4909         * src/pic16/main.c,
4910         * src/xa51/main.c,
4911         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4912           added PSEG (PAG,XDATA) or NULL to port specifier
4913         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4914         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4915           (_mcs51_genInitStartup): removed __start__xstack equ,
4916           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4917         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4918         * src/z80/gen.c (_rleAppend): fixed warnings
4919         * support/regression/tests/zeropad.c: added pdata test
4920         * .version: bumped to 2.4.6
4921
4922 2004-10-17 Borut Razem <borut.razem AT siol.net>
4923
4924         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4925         as a part of nightly build
4926
4927 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4928
4929         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4930         WREG holds the first byte function parameters,
4931         * (aopForSym): take special case for symbols which are in FARSPACE
4932         but in CODESPACE too,
4933         * (assignResultValue): modified to take into account _G.useWreg,
4934         * (genCall): don't use wreg for parameter passing when function is
4935         declared as reentrant, too, added optimization INCF to stack
4936         pointer when stack parameter count is 1,
4937         * (genFunction, genEndFunction): refurnished and fixed to not using
4938         wreg for passing parameters when function has varargs or is
4939         reentrant, fixed bug with symbol name compare for generating
4940         functions in absolute address,
4941         * (pic16_storeForReturn): refurnished,
4942         * (genCmp): began writing a new version of the function, not ready
4943         yet, therefore it is disabled,
4944         * (genAssign): do not read code memory when assigning a function to
4945         a pointer function,
4946         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4947         array of characters, not pointer,
4948         * (pic16initialComments): in debug mode emit an .ident directive for
4949         the assembler,
4950         * (_process_pragma): emit a new warning type (internal to pic16)
4951         when setting stack to default length, emit a similar warning when
4952         placing a function at absolute address and address is not word aligned
4953         * (_pic16_parseOptions): added 'return TRUE' statement,
4954         * (_pic16_linkEdit): if compiling a source, then add the source's
4955         file object, first in the list of objects to link,
4956
4957 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4958
4959         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4960         * src/pic/main.c : removed VC warning.
4961         * src/pic/gen.c : changed comment.
4962
4963 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4964
4965         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4966         reference to a deprecated symbol _GPTRREG was causing failure to
4967         link. Thanks G. M. Gallant for the info.
4968
4969 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4970
4971         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4972         comments for Bugs item #954788.
4973
4974 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4975
4976         * src/pic16/device.c (pic16_dump_gsection,
4977         * pic16_groupRegistersInSection): handle symbols declared to be in
4978         access bank differently,
4979         * src/pic16/gen.c (struct _G): added field resDirect,
4980         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4981         send values read from stack directly to result and don't allocate
4982         temporary values,
4983         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4984         same registers,
4985         * (pic16_sameRegsOfs): NEW,
4986         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4987         free because they were not allocated from temporary pool,
4988         * pic16_popRegFromString): workaround to fix a problem with
4989         allocating variables twice or never,
4990         * (genGenPointerGet): using PRODL instead of FSR0H,
4991         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4992         instead of FSR0H,
4993         * (genAssign): take advantage of the _G.resDirect flag,
4994         * (genCast): around line 11844, use mov2f instead of directly
4995         MOVFF'ing between operands to account for literal values,
4996         * src/pic16/genutils.c: some new debug functions for gpsim have been
4997         added,
4998         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4999         float with integer part only,
5000         * src/pic16/main.c (_process_pragma): handle pragma udata access to
5001         place variables in access bank
5002         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
5003         updated sources to reflect recent changes in gen.c
5004
5005 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
5006
5007         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
5008         sources that searched for headers in installation path, now the
5009         device/include/pic16 is used,
5010         * src/pic16/glue.c (pic16glue),
5011         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
5012         .line directives if not in debug mode, this suppresses assembler's
5013         warnings for ignored directives
5014
5015 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
5016
5017         * src/port.h: made reset_regparms prototype void parameter explicit.
5018         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
5019         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
5020         * doc/sdccman.lyx: documented warning disabling and how to use
5021           printf_large to make it print floats.
5022         * device/include/stdbool.h: NEW
5023         * device/lib/_atof.c,
5024         * device/lib/_divuint.c,
5025         * device/lib/_divulong.c,
5026         * device/lib/expf.c,
5027         * device/lib/printf_large.c,
5028         * device/lib/sincosf.c,
5029         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
5030         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
5031           a completely reentrant lib.
5032
5033 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
5034
5035         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
5036         * device/include/pic16/stdio.h: fixed bug with colon
5037
5038 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
5039
5040         * device/include/pic16/stdio.h,
5041         * device/include/pic16/stdlib.h,
5042         * device/include/pic16/math.h: NEW
5043         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
5044         declared as _naked to reduce overhead
5045         * device/lib/Makefile.in (target port-specific-objects-pic16):
5046         changed * to *.* so to ignore the CVS directory,
5047         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
5048         stacked variables back in stack,
5049         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
5050         corruption
5051
5052 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
5053
5054         * .version: bumped version number to 2.4.5
5055         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
5056         * support/Util/SDCCerr.c (messages structure): added entry for
5057         W_POSSBUG2
5058
5059         Large cumulative patch for pic16 port and libraries.
5060         * device/include/pic16/sdcc-lib.h,
5061         * device/include/pic16/stdarg.h,
5062         * device/include/asm/pic16/features.h,
5063         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
5064         * device/include/pic16/float.h: changes reentrant keyword with
5065         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
5066         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
5067         updated target build-libraries to include objects from gptr,
5068         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
5069         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
5070         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
5071         all function headings,
5072         * src/SDCCmain.c: added global parameter userIncDirsSet,
5073         * (parseCmdLine): when option -I is encountered add directory to
5074         userIncDirsSet too,
5075         * src/version.awk: added space between control and long,
5076         * src/pic16/NOTES: added some notes for the port,
5077         * src/pic16/gen.c: added prototype for mov2fp function,
5078         * (fReturnpic16[]): properly named return value registers,
5079         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
5080         * (aopForSym): added code to handle symbols with onStack flag set,
5081         symbols onStack are allocated PTRSIZE bytes,
5082         * (aopFreeAsmop): handles special case where asmops are stack objects,
5083         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
5084         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
5085         added argument lock to trace flaws in allocating temporary registers
5086         when developing port,
5087         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
5088         * (pic16_popRegFromString): reenabled allocating a direct register
5089         from string,
5090         * (assignResultValue): various beautifications,
5091         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
5092         referenced function argument,
5093         * (genIpush): reenabled to allow stacked arguments, handles only
5094         ic->parmPush iCodes,
5095         * (genCall, genPcall): major changes to allow for variable argument
5096         functions, fixed a bug with falsely restoring stack pointer after
5097         returning from call,
5098         * (genFunction): pending code for critical function,
5099         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
5100         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
5101         * (genNearPointerGet): fixed bug with indirect reading, was always
5102         reading from INDF0
5103         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
5104         pointers,
5105         * (genAddrOf): rewrote code to take address of a stacked function parameter
5106         * (genCast): fixed casting to generic pointer type,
5107         * src/pic16/gen.h: added AOP_STA,
5108         * (struct asmop): added field stk,
5109         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
5110         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
5111         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
5112         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
5113         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
5114         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
5115         generic pointers,
5116         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
5117         and library paths,
5118         * (pic16_port structure): generic pointer size is set to 3,
5119         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
5120         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
5121         compiler warning,
5122         * src/pic16/ralloc.c (allocReg): prevent allocating register when
5123         operand is an iTemp,
5124
5125 2004-09-24 Martin Helmling <mh AT octo-soft.de>
5126
5127         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
5128         * debugger/mcs51/simi.c: addapt new syntax of s51
5129
5130 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
5131
5132         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
5133         * src/pic16/pcode.c: commented out some calls to free() in order to
5134         fix bug #989576,
5135
5136 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5137
5138         * src/SDCCicode.h,
5139         * src/SDCCicode.c (isiCodeInFunctionCall),
5140         * src/avr/ralloc.c (selectSpil),
5141         * src/pic/ralloc.c (selectSpil),
5142         * src/pic16/ralloc.c (selectSpil),
5143         * src/ds390/ralloc.c (selectSpil),
5144         * src/hc08/ralloc.c (selectSpil),
5145         * src/xa51/ralloc.c (selectSpil),
5146         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
5147         stack in the middle of a function call sequence (fixes bug #1020268)
5148         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
5149         costs associated with the minimum switch case.
5150
5151 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5152
5153         * src/SDCC.lex: fixed bug #1030549
5154
5155 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5156
5157         * src/SDCCcse.h (struct cseDef),
5158         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
5159         over a function call if the CSE is derived from a symbol whose
5160         address has been taken (fixes bug #1029883)
5161         * support/regression/tests/bug-1029883: a new regression test for
5162         this bug
5163
5164 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5165
5166         * src/hc08/gen.c (emitinline): fixed bug #1029778
5167         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
5168         to a cast object is no longer a syntax error ("fixes" bug #1030006,
5169         and starts toward RFE #905167)
5170
5171 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
5172
5173         * src/pic16/gen.c (mov2f): New function to move an operand to
5174         another without considering if it is a literal or a register,
5175         * (pic16_sameRegs): don't check if they are both AOP_REG,
5176         * (AccRsh): removed andmask=0 lines,
5177         * (genLeftShift): duplicated to be improved in future versions,
5178         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
5179         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
5180         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
5181         * (pic16initMnemonics): added initialization for POC_INFSNZW,
5182         * (insertBankSwitch): fixed inserting banksel directives algorithm
5183         for instructions that follow a skip instruction, this fixes a report
5184         for broken subtraction code generation,
5185         * src/pic16/ralloc.c (deassignLRs): do not free register if current
5186         iCode is a left op, just in case result and right share the same
5187         registers
5188
5189 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5190
5191         * src/hc08/main.c,
5192         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
5193         preservation of HX
5194         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
5195         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
5196         on 2004-09-12; it was buggy
5197
5198 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
5199
5200         * src/SDCCsymt.h: removed RESULT_CHECK
5201         * src/SDCCast.c,
5202         * src/SDCCglue.c,
5203         * src/SDCCval.c,
5204         * src/pic/glue.c,
5205         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
5206
5207 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
5208
5209         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
5210         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
5211         configuration values no more rejected by compiler, they are assigned
5212         to configuration registers with a warning message instead,
5213         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
5214         the for-loop so last conf register is emitted too,
5215         * (_pic16_initPaths): link library libsdcc.lib by default,
5216         * (_hasNativeMulFor): modified test for multiplication according to
5217         Raphael Neider's remarks. Integer multiplication is also done with
5218         support functions,
5219         * device/include/pic16/pic18fregs.h: corrected type error in while
5220         testing and including 18f6720 header file
5221
5222 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
5223
5224         * src/pic16/device.h (pic16_options): removed field use_crt,
5225         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
5226         until an optimization to handle single bits is added,
5227         * (pic16_loadFSR0): moved before genUnpackBits,
5228         * (genAnd): some white lines removed,
5229         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
5230         leave_reset flags in pic16_options when using crt modules,
5231
5232 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
5233
5234         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
5235           for bugs 898889 & 979599. Also used some safer print instructions.
5236
5237 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
5238
5239         * src/pic16/device.h (pic16_options_t): added field use_crt,
5240         crt_name, no_crt,
5241         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
5242         catch a probable future bug,
5243         * src/pic16/gen.c: aopIdx function commented out,
5244         * (genAssign): commented out old code which used aopIdx,
5245         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
5246         code, added if conditionals to take into account the --use-crt
5247         command line options,
5248         * src/pic16/main.c (pic16_optionsTable): added new command line
5249         options, --use-crt= and --no-crt,
5250         * (_pic16_linkEdit): now the proper crt object is added in the
5251         linker command line except than when --no-crt is specified,
5252         * src/pic16/pcode.c,
5253         * src/pic16/pcode.h: added some structures and functions for a new
5254         optimization scheme to compansate for instruction overhead between
5255         same iCodes, this scheme is currently under development and is not
5256         working in any way,
5257         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
5258         to && operator,
5259         * device/lib/pic16/startup/crt0i.c,
5260         * device/lib/pic16/startup/crt0iz.c: added global char variable
5261         __uflags to force the generation of an idata section
5262
5263 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
5264
5265         * doc/Makefile,
5266         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
5267         * doc/sdccman.lyx: updated sdcc version to 2.4.4
5268
5269 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5270
5271         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
5272         Frieder) and clarified the default code optimization mode
5273
5274 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5275
5276         * src/SDCC.lex (doPragma, process_pragma),
5277         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5278         "opt_code_size", and "opt_code_balanced"
5279         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
5280         regrouped options by category, added support for category headers
5281         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
5282         and "--opt-code-size"
5283         * doc/sdccman.lyx: documented these new options and pragmas
5284         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
5285         preference into account
5286
5287 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5288
5289         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
5290           geniCodePreDec): Fixed bug 904237 by generating a warning
5291         * src/SDCCerr.h,
5292         * src/SDCCerr.c: added warning W_SIZEOF_VOID
5293
5294 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
5295
5296         * src/pic/device.c : When no max ram set validate full memory range.
5297         * src/pic/pcode.c,
5298         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
5299
5300 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
5301
5302         * device/lib/_gptrget.c,
5303         * device/lib/_gptrput.c: updated comment
5304         * device/lib/calloc.c,
5305         * device/lib/free.c,
5306         * device/lib/malloc.c,
5307         * device/lib/realloc.c: added LGPL, made them reentrant-safe
5308         * src/SDCCcse.c (cseBBlock),
5309         * src/SDCCicode.c (printOperand, geniCodeArray),
5310         * src/SDCCicode.h (struct operand): fixed bug 868103
5311         * support/regression/tests/bug-868103.c: added
5312         * src/SDCCast.c (searchLitOp),
5313         * src/SDCCcse.h (struct cseDef),
5314         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
5315         * src/SDCCicode.h (struct operand),
5316         * src/SDCCsymt.h (struct sym_link),
5317         * src/avr/gen.c (hasInc),
5318         * src/ds390/gen.c (hasInc),
5319         * src/hc08/gen.c (genPlusIncr, hasInc),
5320         * src/mcs51/gen.c (hasInc),
5321         * src/pic16/glue.c (pic16_printIvalChar),
5322         * src/pic16/ralloc.c (regWithIdx),
5323         * src/xa51/gen.c (hasInc) : removed warnings
5324         * src/SDCCast.c (createBlock): added comment ???
5325         * src/hc08/ralloc.c: updated comments
5326
5327 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5328
5329         * doc/sdccman.lyx: updated section on switch statements, added
5330         section about semaphore locking
5331         * doc/Makefile: added option -info for latex2html
5332         * device/lib/_gptrget.c,
5333         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
5334
5335 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5336
5337         * src/pic/device.h,
5338         * src/pic/device.c,
5339         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
5340          maxram is less than 0x100.
5341
5342 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
5343
5344         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
5345
5346 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5347
5348         * src/port.h,
5349         * src/mcs51/main.c,
5350         * src/ds390/main.c,
5351         * src/z80/main.c,
5352         * src/hc08/main.c,
5353         * src/pic/main.c,
5354         * src/pic16/main.c,
5355         * src/avr/main.c,
5356         * src/xa51/main.c
5357         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
5358         a jump table is the best form for a switch statement, including
5359         automatic insertion of missing cases to make the case range
5360         continuous. Developed in collaboration with Frieder Ferlemann.
5361
5362 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5363
5364         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
5365         accumulator result if it needs sign extension
5366
5367 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5368
5369         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
5370
5371 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5372
5373         * device/lib/gbz80/printf.c,
5374         * device/lib/z80/printf.c: removed define for NULL
5375
5376 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
5377
5378         * as/xa51/xa_link.c,
5379         * device/examples/ds390/ow390/ad26.c,
5380         * device/examples/ds390/ow390/cnt1d.c,
5381         * device/examples/ds390/ow390/counter.c,
5382         * device/examples/ds390/ow390/ds2480.h,
5383         * device/examples/ds390/ow390/ds2480ut.c,
5384         * device/examples/ds390/ow390/findtype.c,
5385         * device/examples/ds390/ow390/gethumd.c,
5386         * device/examples/ds390/ow390/owllu.c,
5387         * device/examples/ds390/ow390/ownetu.c,
5388         * device/examples/ds390/ow390/swt12.c,
5389         * device/examples/ds390/ow390/swtloop.c,
5390         * device/examples/ds390/ow390/temp.c,
5391         * device/examples/ds390/ow390/temp10.c,
5392         * device/examples/ds390/ow390/thermo21.c,
5393         * device/examples/ds390/ow390/tinilnk.c,
5394         * device/examples/ds390/ow390/tstfind.c,
5395         * device/examples/serialcomm/windows/serial.cpp,
5396         * device/examples/serialcomm/windows/test_serialcomm.cpp,
5397         * device/include/reg51.h: fixed line endings for cvs
5398
5399 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5400
5401         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
5402         packRegsForAccUse, packRegisters): new accumulator register
5403         packing algorithm
5404         * support/regression/ports/hc08/support.c (_putchar): suppress
5405         warning of unused variable
5406         * src/SDCCicode.c: added SWAP entry to codeTable
5407
5408 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
5409
5410         * device/lib/sprintf.c: forgot to add this file before previous commit
5411
5412 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
5413
5414         * src/pic16/gen.c (genPackBits): added operand right in function
5415         parameters, load result directly if p_type is POINTER (that is
5416         called by genNearPointerSet)
5417         * (genUnPackBits): added operand left in function parameters,
5418         * (genNearPointerGet, genNearPointerSet): prevent the loading of
5419         FSR0 if accessing bitfields,
5420
5421 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
5422
5423         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
5424           _print_format; updated printf, sprintf, vsprintf
5425         * device/include/asm/default/features.h: corrected comment/define
5426         * device/lib/Makefile.in: added sprintf.c
5427         * device/lib/libsdcc.lib: added sprintf module
5428         * device/lib/printf_large.c,
5429         * device/lib/vprintf.c,
5430         * device/lib/sprintf.c: totally refactored printf_large and vprintf
5431           into these 3 files
5432         * support/regression/Makefile: changed ALL_PORTS into a usefull default
5433         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
5434         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
5435           hc08 test
5436         * support/regression/tests/zeropad.c: define idata as data for hc08
5437
5438 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5439
5440         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
5441         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
5442         labels are referenced at least once (even if a reference is not found)
5443         * src/hc08/gen.c (emitcode): set isComment flag for comments
5444         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
5445         loads), rules 6a..6b (optimize jumps to return)
5446
5447 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5448
5449         * device/lib/acosf.c (acosf),
5450         * device/lib/asinf.c (asinf),
5451         * device/lib/atanf.c (atanf),
5452         * device/lib/ceilf.c (ceilf),
5453         * device/lib/cosf.c (cosf),
5454         * device/lib/coshf.c (coshf),
5455         * device/lib/cotf.c (cotf),
5456         * device/lib/fabsf.c (fabsf),
5457         * device/lib/floorf.c (floorf),
5458         * device/lib/log10f.c (log10f),
5459         * device/lib/logf.c (logf),
5460         * device/lib/sinf.c (sinf),
5461         * device/lib/sinhf.c (sinhf),
5462         * device/lib/sqrtf.c (sqrtf),
5463         * device/lib/tanf.c (tanf),
5464         * device/lib/tanhf.c (tanhf),
5465         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5466         replaced all instances of "reentrant" in the library functions
5467         defined in math.h with this macro.
5468         * support/regression/tests/float_trans.c: reenabled test for hc08
5469
5470 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5471
5472         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5473         erroneously deleted
5474
5475 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5476
5477         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5478         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5479         multi-byte volatile operands are used
5480         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5481         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5482         initialization to area GSINIT0 so that it would always precede
5483         any static initializers in GSINIT
5484         * support/regression/tests/zeropad.c: fixed idata define for hc08
5485         * support/regression/tests/bug-927659.c,
5486         * support/regression/tests/float_trans.c: disabled tests for hc08
5487         pending missing library routines
5488         * .version: increased version number to 2.4.4 - hc08 port now passes
5489         regression tests
5490
5491
5492 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5493
5494         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5495         * Makefile.common.in,
5496         * as/Makefile,
5497         * as/hc08/Makefile.in,
5498         * as/mcs51/Makefile.in,
5499         * as/z80/Makefile.in,
5500         * debugger/mcs51/Makefile.in,
5501         * device/include/Makefile.in,
5502         * device/lib/Makefile.in,
5503         * doc/Makefile,
5504         * link/Makefile,
5505         * link/z80/Makefile.in,
5506         * packihx/Makefile.in,
5507         * sim/ucsim/main_in.mk,
5508         * sim/ucsim/avr.src/Makefile.in,
5509         * sim/ucsim/doc/Makefile.in,
5510         * sim/ucsim/gui.src/serio.src/Makefile.in,
5511         * sim/ucsim/hc08.src/Makefile.in,
5512         * sim/ucsim/s51.src/Makefile.in,
5513         * sim/ucsim/xa.src/Makefile.in,
5514         * sim/ucsim/z80.src/Makefile.in,
5515         * src/Makefile.in,
5516         * support/cpp2/Makefile.in,
5517         * support/librarian/Makefile,
5518         * support/makebin/Makefile: added DESTDIR to the install path proposed
5519         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5520         * doc/sdccman.lyx: added DESTDIR documentation
5521
5522 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5523
5524         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5525         instruction for interrupt handlers, use fast returns when returning
5526         from high priority interrupts
5527
5528 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5529
5530         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5531         code generation
5532         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5533         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5534         bugs, ported much of Bernhard's code from mcs51
5535         * src/mcs51/gen.c (genSend),
5536         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5537         than one when calling a reentrant function
5538         * device/lib/_mullong.c: defined an alternate struct layout for big
5539         endian ports (hc08)
5540
5541 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5542
5543         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5544         test
5545
5546 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5547
5548         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5549         are sane and complete before asking the port its prefered parameter
5550         passing method (fixes bug #1017633)
5551         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5552         and _ret3
5553
5554 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5555
5556         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5557         problem in bitfields >= 8 bits.
5558
5559 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5560
5561         * src/SDCCsymt.c: undid changes that were not meant to be committed
5562
5563 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5564
5565         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5566
5567 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5568
5569         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5570           copied and wrong bit got inverted
5571
5572 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5573
5574         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5575         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5576         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5577         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5578         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5579         assignments to bitfields at known addresses
5580         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5581         reads from bitfields at known addresses
5582         * src/hc08/ralloc.c (packRegisters),
5583         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5584         genhc08Code): optimize pointer get values used as conditionals
5585         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5586         and branch
5587
5588 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5589
5590         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5591         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5592         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5593         as conditionals
5594
5595 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5596
5597         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5598
5599 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5600
5601         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5602         related problems
5603
5604 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5605
5606         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5607
5608 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5609
5610         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5611         mcs51 port
5612
5613 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5614
5615         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5616
5617 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5618
5619         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5620         cases use more compact code.
5621
5622 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5623
5624         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5625
5626 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5627
5628         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5629
5630 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5631
5632         * src/SDCCsymt.h,
5633         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5634         parameter of changePointer() from symbol* to sym_link*
5635         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5636         * src/SDCCsymt.c (compareType): void* type is castable to other
5637         pointers, but not necesarily an exact match.
5638         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5639         is no longer blindly treated as an exact match.
5640         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5641
5642 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5643
5644         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5645
5646 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5647
5648         * src/pic/gen.c,
5649         * src/pic/pcode.c,
5650         * src/pic/ralloc.h,
5651         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5652
5653 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5654
5655         * src/pic/device.c,
5656         * src/pic/device.h,
5657         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5658
5659 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5660
5661         * src/mcs51/gen.c (emitcode): fixed bug #992819
5662
5663 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5664
5665         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5666           there's no need to make it worse
5667
5668 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5669
5670         * src/mcs51/ralloc.c (deassignLR),
5671         * src/ds390/ralloc.c (deassignLR),
5672         * src/hc08/ralloc.c (deassignLR),
5673         * src/z80/ralloc.c (deassignLR),
5674         * src/pic/ralloc.c (deassignLR),
5675         * src/pic16/ralloc.c (deassignLR),
5676         * src/avr/ralloc.c (deassignLR),
5677         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5678         rlivePoint): fixed another part of bug #971834
5679
5680 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5681
5682         * src/z80/main.c: enabled "critical" keyword
5683         * src/z80/mappings.i,
5684         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5685         functions (fixes bug #979646)
5686         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5687
5688 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5689
5690         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5691           such as c:\mydir.
5692
5693 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5694
5695         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5696           doesn't disable too much optimizations
5697
5698 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5699
5700         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5701
5702 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5703
5704         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5705
5706 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5707
5708         * src/pic/gen.c tidied up tabs
5709         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5710         * src/pic/main.c tidied up tabs
5711         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5712         * src/pic/pcoderegs.c tidied up tabs
5713         * src/pic/ralloc.c tidied up tabs
5714
5715 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5716
5717         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5718         to S_FIXED for pic16 port and when symbol is not in level 0,
5719         allocate for S_REGISTER storage class and pic16 port, too,
5720         * src/pic16/device.h: prototype for checkSym,
5721         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5722         * (pic16_assignConfigWordValue): test the value and the mask to
5723         validate that the value is suitable for the configuration word,
5724         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5725         collect extern declared symbols, don't emit symbol twice, check
5726         first if symbol is in publics set first,
5727         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5728         * added command line '--fstack' which enables an experimental
5729         feature for stack access, too buggy to be used yet...
5730         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5731         * (pic16_allocDirReg): when register has storage class S_REGISTER
5732         allocate in pic16_dynAccessRegs,
5733         * device/include/pic16/pic18f????.h: modified configuration word
5734         naming convention, words started as CONFIG0H but should be CONFIG1H
5735
5736 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5737
5738         * device/include/mcs51reg.h: fixed bug 970993
5739
5740 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5741
5742         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5743         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5744         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5745         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5746         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5747         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5748           error/warning numbers,
5749           added function setWarningDisabled()
5750         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5751         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5752           _memcmp.c _memmove.c calloc.c realloc.c free.c
5753         * support/regression/tests/malloc.c: added tests for new functionality
5754         * support/regression/tests/zeropad.c: added tests for truncated initializers
5755           and initialized char arrays starting with '\x0'
5756         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5757
5758 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5759
5760         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5761
5762 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5763
5764         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5765         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5766         peephole 177.e. Thanks to anonymous
5767
5768 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5769
5770         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5771         function isn't used in the source but referenced as a
5772         variable initializer then declare it as extern in .asm file
5773
5774 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5775
5776         * .version: increased version number to 2.4.3
5777
5778         Adding version extension according to ChangeLog CVS revision
5779         * src/Makefile.in (target all): added dependency 'version.h'
5780         * (rule version.h): added rule to create version.h from ChangeLog,
5781         * (rule dep): added dependency version.h,
5782         * src/version.awk: AWK script to create version.h
5783         * src/SDCCdwarf2.c (dwWriteModule),
5784         * src/SDCCglue.c (initialComments),
5785         * src/SDCCmain.c (printVersionInfo): modified to write after
5786         version string the version extension number,
5787         * src/SDCCutil.c: included "version.h"
5788         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5789         number,
5790         * src/SDCCutil.h: added prototype for getBuildNumber
5791
5792         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5793         includeDirsSet, too,
5794         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5795         const char [] is found in function prototype...
5796
5797         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5798         moving to WREG with source is already in WREG,
5799         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5800         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5801         * (aopForSym): stack'ed symbols are partially supported, added
5802         if-clause to support symbols in FARSPACE,
5803         * (sameRegs): added test for AOP_ACC to see if registers are same,
5804         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5805         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5806         * (pic16_popRegFromString): will not allocate a new register if it
5807         doesn't find one by name, bug may have introduced...
5808         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5809         * (genIpush): revived to use pic16 port's stack,
5810         * (genAddrOf): added incomplete case for stack'ed operand,
5811         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5812         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5813         can handle multibyte operands,
5814         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5815         * (pic16initialComments): added message for MPLAB compatibility
5816         mode enabled,
5817         * src/pic16/main.h: prototype for pic16_mplab_comp,
5818         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5819         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5820         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5821         because of increased complexity of procedure,
5822         * (_process_pragma): stack pragma changed to format 'stack pos len',
5823         emit symbol '_stack_end' to conform with gplink,
5824         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5825         to search for register,
5826         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5827         PO_GPR_REGISTER,
5828         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5829         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5830         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5831         case for PO_GPR_REGISTER,
5832         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5833         dies, the new era is ahead !...
5834         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5835         pic16_dynInternalRegs,
5836         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5837         * (pic16_allocDirReg): minor optimizations and bug fixes,
5838         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5839
5840         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5841         load stack and frame pointer with address of 'stack_end' symbol
5842
5843 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5844
5845         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5846         without source code but only variable initializers
5847
5848 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5849
5850         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5851         external are not declared as extern to reduce overhead while linking
5852
5853 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5854
5855         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5856
5857 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5858
5859         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5860           Yee Keat for the patch
5861         * src/SDCCast.c (decorateType): fixed bug #979599
5862         * src/ds390/gen.h: removed local fReturnSizeDS390
5863         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5864         * src/ds390/gen.c (genAnd, genOr, genXor),
5865         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5866
5867 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5868
5869         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5870         add relFilesSet to $3, manipulate $2 to handle linking of object
5871         files without source files in command line,
5872         * device/include/pic16 (all headers): added ID location macros,
5873         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5874         entries for ID location bytes,
5875         * (pic16_assignIdByteValue): NEW,
5876         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5877         added field dumpcalltree to pic16_options_t,
5878         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5879         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5880         emitting rFalseIfx label after check_carry label,
5881         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5882         pic16_emitDIRegs), NEW
5883         * (pic16glue): dump .calltree file when option --calltree found,
5884         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5885         * (_pic16_genAssemblerPreamble): emit ID locations after
5886         configuration registers,
5887         * (pic16_linkCmd): modifications of the link command,
5888         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5889         * (pic16_pCodeInitRegisters): don't init stack registers,
5890         * (pic16_findPrevInstruction): fixed bug,
5891         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5892         bug with immediate registers,
5893         * (buildCallTree): traces stack push and pop,
5894         * (pct2): dump also stack usage for each function,
5895         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5896         * (pic16_allocDirReg): various modifications,
5897         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5898         fixed to 1,
5899
5900 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5901
5902         * src/pic16/pcode.c: removed buggy double colon
5903
5904 2004-07-01 Borut Razem <borut.razem AT siol.net>
5905
5906         * support/scripts/sdcc.nsi: added include/pic16 to setup
5907
5908 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5909
5910         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5911         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5912         target 'clean',
5913         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5914         specific command line arguments. Also added sample lkr script
5915         for placing a variable at a specific memory bank.
5916         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5917         at a specific memory bank,
5918         * (pic16_dump_isection): fixed bug which caused string literals to
5919         be omitted when dumping idata section,
5920         * (pic16_groupRegistersInSection): added code to handle registers
5921         in specific memory banks,
5922         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5923         public, all references are renamed too,
5924         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5925         AOP_DPTR2,
5926         * (pic16_storeForReturn): added case to handle when dest is WREG,
5927         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5928         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5929         pic16_rel_udata, check to see if that register is marked as being
5930         a member of a specific memory bank,
5931         * (pic16_printIvalCharPtr): added code to add string literals either
5932         to code or the idata sections,
5933         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5934         also accept the 'udata' pragma,
5935         * src/pic16/main.h: new structure types sectName and sectSym
5936         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5937         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5938         * (pic16_findPrevInstruction): fixed, it returned nothing,
5939         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5940         instruction combinations,
5941         * (pic16_FixRegisterBanking): heavily reorganised,
5942         * (pic16_AnalyzeBanking): if generating banksel directives is
5943         disabled, then don't call FixRegisterBanking at all,
5944         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5945         completely removed,
5946         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5947
5948 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5949
5950         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5951         Phuah Yee Keat <yk.phuah AT nestac.com>
5952
5953 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5954
5955         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5956         correctly the IVT even if it is relocated to some other location
5957
5958 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5959
5960         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5961         * device/include/pic16/pic18f2220.h: NEW,
5962         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5963         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5964         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5965         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5966         nodefaultlibs, ivt_loc is the location of the interrupt vector
5967         table, and nodefaultlibs signs that default libraries should not be
5968         linked in link stage,
5969         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5970         according to --ivt-loc argument,
5971         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5972         when pragma stack is found,
5973
5974 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5975
5976         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5977         256 (range check), 257 (do while), 258.a-f (bit banging
5978         f.e. on 3-wire SPI bus)
5979
5980 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5981
5982         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5983         variables used exclusively within a loop
5984
5985 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5986
5987         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5988
5989 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5990
5991         * src/SDCClrange.c (computeClash): fixed bug #971834
5992
5993 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5994
5995         * src/mcs51/gen.c (genCmp): fixed bug #975903
5996         * src/hc08/gen.c (operandsEqu),
5997         * src/ds390/gen.c (operandsEqu),
5998         * src/z80/gen.c (operandsEqu),
5999         * src/pic/gen.c (operandsEqu),
6000         * src/pic16/gen.c (operandsEqu),
6001         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
6002         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
6003
6004 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6005
6006         * src/SDCCcse.c (cseBBlock): fixed bug #966963
6007
6008 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
6009
6010         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
6011         default case in switch statement,
6012         * glue.c (pic16_initPointer): expr is initialised via decoarteType
6013         to eliminate problem with initialisation of pointers, but problem
6014         still exists,
6015         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
6016         * (emitStaticSegment): removed various lines emitting debug info,
6017         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
6018         added processor registers for utilizing EEPROM,
6019         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
6020         configurable and set 8
6021
6022 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
6023
6024         * .version: increased version number to 2.4.2,
6025
6026         Cumulative patch for pic16 port
6027         * src/pic16/device.c: changed scheme to dump initial values for
6028         variables in idata segment, all print_idata* functions were removed,
6029         now the pic16_printIval* will be called,
6030         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
6031         * _pic16_printPointerType, pic16_printPointerType,
6032         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
6033         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
6034         NEW, similar to the respective functions in SDCCglue.c,
6035         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
6036         way, emitting hex bytes,
6037         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
6038
6039 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6040
6041         * src/avr/ralloc.c (serialRegAssign),
6042         * src/xa51/ralloc.c (serialRegAssign),
6043         * src/pic/ralloc.c (serialRegAssign),
6044         * src/pic16/ralloc.c (serialRegAssign),
6045         * src/hc08/ralloc.c (serialRegAssign),
6046         * src/z80/ralloc.c (serialRegAssign),
6047         * src/ds390/ralloc.c (serialRegAssign),
6048         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
6049
6050 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6051
6052         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
6053         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
6054
6055 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
6056
6057         Cumulative patch for pic16 port:
6058         * src/pic16/device.h (typedef PIC16_device) modified fields for
6059         defining microcontrollers,
6060         * src/pic16/device.c: added new info for all devices in Pics16 array,
6061         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
6062         to be optimised out by the pCode optimiser,
6063         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
6064         specially, bug reported by G.M. Gallant,
6065         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
6066         as force'd so that cannot be optimised out by pCode optimiser,
6067         * src/pic16/pcode.c,
6068         * src/pic16/pcodepeeph.c,
6069         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
6070         they are disabled by default, but can be enabled explicit with
6071         command argument --denable-peeps, for testing,
6072         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
6073         --pomit-ivt in COMPILE_FLAGS
6074
6075 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6076
6077         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
6078           compilation on MSVC
6079
6080 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6081
6082         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
6083
6084 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6085
6086         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
6087         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
6088
6089 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
6090
6091         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
6092         would only assign 0x300001 register.
6093
6094 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
6095
6096         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
6097         in COMPILE_FLAGS. Thanks to G. Gallant for report.
6098
6099 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6100
6101         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
6102         for ds80c400
6103         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
6104         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
6105         added peephole 254 (left shift), 255 (jump table)
6106
6107 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
6108
6109         * device/lib/Makefile.in: removed comment line with model-pic16,
6110         * (target port-specific-objects-pic16): the libraries and objects
6111         are copied to the build directory form the device/lib/pic16/bin
6112         directory
6113
6114         Cumulative patch concerning pic16 port:
6115         * library directory has been re-organized,
6116         * added support for PIC18F1220,
6117         * added headers and library sources for chips 18f1220,18f6520,
6118         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
6119
6120         * configuration registers setting has changed, now each supported
6121         device has a complete description of the registers it uses,
6122         * all initialisations are moved to idata sections, these section
6123         can be absolute or relocatable,
6124         * fixed initialisation of codespace variables,
6125         * fixed warning about PCLATU and gpsim,
6126         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
6127         * (genAssign): use table reads when assigning from variables in codespace,
6128         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
6129         char/int variables placed in codespace,
6130         * (pic16_emitConfigRegs): NEW, emits a list with configuration
6131         registers set in .asm file, no need for --pomit-config-words anymore,
6132         * (pic16glue): some 8051 legacy segments are commented out
6133         (to be removed completely),
6134         * added support for alternative assembler and linker with --asm=
6135         and --link= command line arguments,
6136         * peepholes are disabled automatically in the port, no need to
6137         specify on command line,
6138         * port supports natively char/int/long multiplication, but converts
6139         all divisions to support functions,
6140         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
6141         to the file set in variable $2,
6142         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
6143         strings in ASCII format and not in hex,
6144         * ralloc.c (serialRegAssign): added a triplet of conditional calls
6145         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
6146         allocate proper register if iCodes aren't temporary,
6147
6148 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
6149
6150         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
6151
6152 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
6153
6154         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
6155         is commented out
6156
6157 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6158
6159         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
6160         computed address is reused
6161         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
6162         multi-byte bitfields
6163
6164 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6165
6166         * src/z80/gen.c: (genArrayInit): must check for pointers too
6167
6168 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6169
6170         * support/regression/tests/zeropad.c: never meant to commit the
6171           nestedstruct test: removed, added check for GCC version
6172
6173 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
6174
6175         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
6176         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
6177         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
6178           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
6179           bugs 928906 and 954082 half-empty initializers
6180         * src/SDCCsymt.h,
6181         * src/SDCCsymt.c (getAllocSize): added for above fix
6182         * src/z80/gen.c (genArrayInit): fixed bug 741044
6183         * support/regression/tests/zeropad.c: added tests
6184
6185 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
6186
6187         * src/pic16/device.c (pic16_dump_section): corrected bug which
6188         caused some symbols of the libraries to be misplaced
6189
6190 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6191
6192         * src/pic16/glue.c,
6193         * src/pic16/ralloc.h,
6194         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
6195         to fix conflict with pic port
6196
6197 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6198
6199         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
6200         externs configuration variables,
6201         * src/pic16/ralloc.h,
6202         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
6203         prototype in header, commented out some debug messages
6204
6205 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
6206
6207         * src/pic16/glue.c,
6208         * src/pic16/main.c,
6209         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
6210         for gpasm COFF object generation. Thanks to D. Hawkins for
6211         his patch info
6212
6213 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6214
6215         * src/ds390/main.c,
6216         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
6217         Brock for spotting this)
6218         * src/ds390/gen.c (genEndFunction),
6219         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
6220         interrupt handler and critical. Disable push/pop optimizations when
6221         peephole optimizations disabled.
6222
6223 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6224
6225         Updated pic16 library sources and headers.
6226         * device/lib/pic16/pic18f*/ ,
6227         * device/include/pic16/*.h: modified to handle structured SFR
6228         definitions
6229
6230 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
6231
6232         * src/port.h (PORT structure): added hook initPaths, now each
6233         port can declare its own default search paths,
6234         which can been seen with the --print-search-dirs option,
6235         see pic16 port for example,
6236         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
6237         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
6238         * (doPrintSearchDirs): NEW, replaces in a central manner the
6239         printing of search dirs which was split in set*Paths functions,
6240         * (main): added call to port->initPaths and doPrintSearchDirs,
6241         * src/avr/main.c,
6242         * src/ds390/main.c,
6243         * src/hc08/main.c,
6244         * src/izt/i186.c,
6245         * src/izt/tlcs900h.c,
6246         * src/mcs51/main.c,
6247         * src/pic/main.c,
6248         * src/pic16/main.c: modified port structures to reflect addition of
6249         initPaths hook,
6250
6251         * src/pic16/device.c (regCompare): registers are finally sorted by name,
6252         * (pic16_dump_section): for registers in same address reserve memory once,
6253         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
6254         to no_banksel,
6255         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
6256         result is greater in size than right or left,
6257         * (pic16_genUMult8X8_8): there are some cases where the result can
6258         be 16 bits size, so handle these,
6259         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
6260         * (pic16_outBitC): modified to emit pcodes,
6261         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
6262         or not,
6263         * (genDivOneByte): implemented algorithm to divide 8-bits,
6264         * (genCmp): uncommented goto, but issues still exist,
6265         * (genAnd): fixed a bug with variables >8bits,
6266         * (genPackBits): optimization added that uses BCF/BSF to change a
6267         single bit,
6268         * (genAssign): fixed bug when assigning floating point literals,
6269         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
6270         __sdcc_gsinit_startup label,
6271         * src/pic16/main.c (_pic16_init): removed search directory
6272         initialisations,
6273         * (_pic16_initPaths): NEW, used to initialise search directories,
6274         * (_hasNativeMulFor): support functions for all except char/int
6275         multiplication, and char division,
6276         * (PIC16_port struct): modified entry for native mul support,
6277         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
6278         no_banksel option,
6279         * (buildCallTree): call to register_usage is ifdef'ed out,
6280
6281 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6282
6283         * device/include/string.h: applied Stas Sergeev's patch to make this
6284         header file compatible with the preprocessor -Wundef option
6285         * src/SDCCmain.c (main): abort compilation if preprocessor reports
6286         failure (fixes bug #941458)
6287
6288 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6289
6290         * src/SDCCopt.c (killDeadCode): fixed bug #907733
6291         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
6292         that the variable, not the function, should be static
6293         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
6294         to be consistent with non-literal case
6295
6296 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6297
6298         * src/SDCCast.c (isConformingBody): fixed bug #949967
6299         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
6300         convilong): fixed bug #952086
6301
6302 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6303
6304         * src/SDCCmem.c (allocVariables): fixed bug #955321
6305
6306 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6307
6308         * src/hc08/main.c (_hc08_genAssemblerEnd),
6309         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
6310         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
6311         completely eliminated the use of a temporary file
6312         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
6313         when more than one file linked
6314         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
6315
6316 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6317
6318         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
6319         which fixes bug #543481
6320         * support/regression/tests/bug-751703.c: fixed comments left from a
6321         cut and paste error
6322         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
6323         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
6324         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
6325         scopes
6326         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
6327         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
6328         are now changed to underscores in moduleName
6329
6330 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6331
6332         * as/mcs51/lkmem.c: better fix for bug #954173
6333
6334 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
6335         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6336
6337         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
6338         * device/include/c8051f000.h,
6339         * device/include/c8051f120.h,
6340         * device/include/c8051f300.h,
6341         * device/include/c8051f310.h,
6342         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
6343         PWM16) and detab'ed
6344
6345 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6346
6347         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
6348         and mailing lists, doc'ed --no-peep-comments, removed reference
6349         to knoppix (newest version has no LyX/LaTeX), other minor changes
6350         * src/SDCCglue.c (glue): save 2 bytes stack space with
6351         option --main-return. The ljmp could probably be avoided too
6352
6353 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6354
6355         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
6356
6357 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6358
6359         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
6360         * src/SDCCopt.c (isLocalWithoutDef),
6361         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
6362         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
6363         (credit to Maarten Brock for patch #949363, on which this is based)
6364         * support/regression/tests/bug-751703.c: some test cases of extern used
6365         within inner scopes.
6366
6367 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6368
6369         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
6370         SPEC_STRUCT
6371         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
6372         struct definitions
6373         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
6374         dwWriteLabel): fix to create valid debugger symbols even when
6375         the module name has non-alphanumeric symbols in it
6376         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
6377         when a variable's allocation has been optimized away
6378
6379
6380 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6381
6382         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
6383         * src/hc08/main.c,
6384         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
6385         * src/mcs51/main.c,
6386         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
6387         * src/ds390/main.c,
6388         * src/z80/gen.c (z80_emitDebuggerSymbol),
6389         * src/z80/main.c,
6390         * src/pic/gen.c (pic14_emitDebuggerSymbol),
6391         * src/pic/main.c,
6392         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
6393         * src/pic16/main.c,
6394         * src/avr/gen.c (avr_emitDebuggerSymbol),
6395         * src/avr/main.c,
6396         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
6397         * src/xa51/main.c,
6398         * src/SDCCdebug.c (emitDebuggerSymbol),
6399         * src/SDCCdebug.h,
6400         * src/port.h: added a debugger struct to the port struct. Added a
6401         callback for defining debugger symbols
6402
6403         * src/SDCCast.c (createLabel),
6404         * src/SDCC.y (labeled_statement): mark all compiler generated labels
6405         with isitmp = 1
6406         * src/SDCCicode.h,
6407         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
6408         iCode back to the ast for the function
6409
6410         * src/hc08/ralloc.c (hc08_assignRegisters),
6411         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
6412         unneeded fields from the regs struct.
6413         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
6414         pushReg() & pullReg() functions instead of emitcode()
6415
6416         * src/hc08/gen.c (genLabel, genhc08Code),
6417         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
6418
6419         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
6420         debugger hooks
6421
6422         * src/hc08/gen.c (genEndFunction, genhc08Code),
6423         * src/hc08/gen.h,
6424         * src/mcs51/gen.c (genEndFunction, gen51Code),
6425         * src/mcs51/gen.h,
6426         * src/ds390/gen.c (genEndFunction, gen390Code),
6427         * src/ds390/gen.h,
6428         * src/z80/gen.c (genEndFunction, genZ80Code),
6429         * src/z80/gen.h,
6430         * src/z80/z80.h,
6431         * src/pic/gen.c (genEndFunction, genpic14Code),
6432         * src/pic/gen.h,
6433         * src/pic16/gen.c (genEndFunction, genpic16Code),
6434         * src/pic16/gen.h,
6435         * src/avr/gen.c (genEndFunction, genAVRCode),
6436         * src/avr/gen.h,
6437         * src/xa51/gen.c (genEndFunction, genXA51Code),
6438         * src/xa51/gen.h,
6439         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
6440         specific code to cdbFile.c and out of the backend code generators
6441
6442         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
6443         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
6444         starting address is now 0
6445
6446         * as/hc08/asm.h,
6447         * as/hc08/m08pst.c,
6448         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6449         assembler directive for DWARF support
6450         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6451
6452         * src/src.dsp,
6453         * src/Makefile.in,
6454         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6455
6456 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6457
6458         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6459         and inappropriate peephole optimization in jump tables
6460
6461 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6462
6463         * as/hc08/m08pst.c,
6464         * src/SDCCglue.c: sdccopt works for the hc08 port now
6465
6466 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6467
6468         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6469
6470 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6471
6472         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6473
6474 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6475
6476         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6477         rules
6478         * src/SDCCmain.c,
6479         * src/SDCCglobl.h,
6480         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6481         comments from the peephole optimizer replacement rules
6482         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6483         symbols
6484         * src/SDCCcse.c (updateSpillLocation),
6485         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6486         equivalents
6487         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6488         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6489         objects far pointers
6490
6491 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6492
6493         * src/SDCCsymt.h: a missing part of my last change
6494         * src/pic/ralloc.c (regTypeNum),
6495         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6496
6497 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6498
6499         * src/SDCCicode.h,
6500         * src/SDCCicode.c (aggrToPtrDclType),
6501         * src/SDCCptropt.h,
6502         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6503         ptrPseudoSymConvert),
6504         * src/pic/ralloc.c (regTypeNum),
6505         * src/pic16/ralloc.c (regTypeNum),
6506         * src/hc08/ralloc.c (regTypeNum),
6507         * src/ds390/ralloc.c (regTypeNum),
6508         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6509         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6510
6511 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6512
6513         * link/z80/lkmain.c (afile),
6514         * as/hc08/lkmain.c (afile),
6515         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6516         prevent a pointer problem when a filename has no directory and
6517         no extension specified.
6518
6519 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6520
6521         * link/z80/lkmain.c (afile): allow periods in directory names
6522         * link/z80/lkmain.c (afile),
6523         * as/mcs51/lkmain.c (afile),
6524         * as/hc08/lkmain.c (afile): allow linker script file to have an
6525         extension other than ".lnk"
6526         * link/z80/lklex.c (getfid),
6527         * link/z80/lkmain.c (parse),
6528         * as/mcs51/lklex.c (getfid),
6529         * as/mcs51/lkmain.c (parse),
6530         * as/hc08/lklex.c (getfid),
6531         * as/hc08/lkmain.c (parse): Support comments in the linker script
6532         file on lines by themselves and after filenames
6533
6534 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6535
6536         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6537
6538 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6539
6540         * src/z80/peeph-z80.def: removed some peephole rules that don't
6541         work with multibyte arithmetic (fixed bug #937126)
6542         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6543         to registers and not global variables
6544         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6545         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6546         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6547         checking for assignments not internally generated (fixed bug #931895)
6548         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6549         structure member (fixed bug #930072)
6550
6551 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6552
6553         * src/SDCCmain.c (linkEdit),
6554         * src/hc08/main.c (_hc08_parseOptions),
6555         * as/hc08/Makefile.in,
6556         * as/hc08/aslink.h,
6557         * as/hc08/asm.h,
6558         * as/hc08/m08pst.c,
6559         * as/hc08/lkrloc.c (relr, rele),
6560         * as/hc08/lkarea.c (lnkarea)
6561         * as/hc08/lkmain.c (afile, parse),
6562         * as/hc08/lkelf.c: support for ELF output
6563         * as/hc08/lks19.c (s19),
6564         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6565
6566 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6567
6568         * as/mcs51/lkihx.c: Fixed bug #899105.
6569
6570 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6571
6572         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6573         .dsp files from Unix to DOS.
6574
6575 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6576
6577         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6578         function pointers; we have been compliant for several months now.
6579         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6580         change that was accidently commented out
6581         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6582         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6583         bug #922319
6584
6585 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6586
6587         * src/hc08/gen.c: output of all of the internal debugging information
6588         is now controlled by the D() macro; it is disabled by default
6589
6590 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6591
6592         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6593         harder to keep the same registers during a CAST iCode
6594         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6595         long via int can be done in a single cast, if the signedness is
6596         correct.
6597         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6598         putchar() in tinibios.c in ds390's library
6599
6600 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6601
6602         * src/SDCCast.c (decorateType): fixed bug #898889,
6603         cast result of a literal complement too
6604         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6605         fixed check for bitfields
6606
6607 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6608
6609         * src/SDCCicode.c (geniCodeLogic): made it static,
6610         (geniCodeLogicAndOr): added in order to fix bug #905492,
6611         (ast2iCode): fixed bug #905492
6612         * support/regression/tests/bug-905492.c: added
6613         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6614         (processParms): fixed bug #927659: don't copy parms, this will clear
6615         decorated flag
6616         * support/regression/tests/bug-927659.c: added
6617
6618 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6619
6620         * src/SDCCast.c (addCast): don't cast float to char
6621         * device/lib/libsdcc.lib: added _memmove
6622
6623 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6624
6625         * device/lib/large/Makefile: fixed parallel execution by
6626         replacing `make` by `$(MAKE)`
6627
6628 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6629
6630         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6631         offsets (fixes bug #923936)
6632
6633 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6634
6635         * device/lib/small/Makefile: fixed parallel execution by
6636         replacing `make` by `$(MAKE)`
6637
6638 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6639
6640         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6641
6642 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6643
6644         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6645         * src/regression/Makefile: Regression test was not running.
6646
6647 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6648
6649         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6650         complement if possible
6651         * src/SDCCval.c (valComplement),
6652         * src/SDCCicode.c (operandOperation): fixed complement of literal
6653         * support/regression/tests/onebyte.c (testComplement): added
6654
6655 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6656
6657         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6658         return an optimized tree; actually replace actParm with the new tree
6659         * src/SDCCast.h: added some parantheses to remove side effects
6660         * support/regression/tests/bug-920866.c
6661
6662 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6663         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6664         Bit operands were not being handled properly in the pic14 port.
6665         (now src/regression/add.c passes again).
6666
6667 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6668
6669         * src/SDCC.y (labeled_statement): case and default no longer require
6670         a following statement (RFE #893037)
6671
6672 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6673
6674         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6675         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6676         disabled (fixes bug #916294)
6677         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6678         "mov a,acc"; patch provided by Lenny Story
6679         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6680
6681 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6682
6683         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6684         functions
6685         * src/ds390/gen.c (genFunction, genEndFunction),
6686         * src/ds390/ralloc.c (ds390_assignRegisters),
6687         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6688         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6689         pushed if there are parameters passed on the stack. Also, a cleaner
6690         way to decide if r0/r1 should be pushed/popped. (Together they fix
6691         bug #918693)
6692
6693 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6694
6695         * doc/sdccman.lyx,
6696         * device/lib/mcs51/crtpagesfr.asm,
6697         * device/lib/mcs51/crtxinit.asm,
6698         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6699         to avoid confusion with Si Lab's SFRPAGE register.
6700
6701 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6702
6703         * src/SDCCglue.c (emitMaps): allow public sfr variables
6704         * src/SDCCglue.c (initialComments): include compiler build date
6705         with compiler version and put the timestamp of the generated
6706         assembly file on a serperate line to be less confusing.
6707         * src/port.h: added genInitStartup hook
6708         * src/avr/main.c,
6709         * src/ds390/main.c,
6710         * src/hc08/main.c,
6711         * src/pic/main.c,
6712         * src/pic16/main.c,
6713         * src/xa51/main.c,
6714         * src/z80/main.c: genInitStartup initialize as NULL (default to
6715         historical behaviour)
6716         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6717         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6718         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6719         library instead of hard coding it into the compiler.
6720         * support/regression/ports/mcs51-stack-auto/spec.mk,
6721         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6722         * device/lib/mcs51/Makefile,
6723         * device/lib/small/Makefile,
6724         * device/lib/large/Makefile,
6725         * device/lib/mcs51/crtpagesfr.asm,
6726         * device/lib/mcs51/crtstart.asm,
6727         * device/lib/mcs51/crtxclear.asm,
6728         * device/lib/mcs51/crtxinit.asm,
6729         * device/lib/mcs51/crtclear.asm,
6730         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6731         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6732         and into user configurable files.
6733         * device/lib/clean.mk: clean mcs51 directory too
6734         * support/regression/tests/longlit.c: added static to T1 declaration
6735         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6736         accesses in the initialization code
6737
6738 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6739
6740         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6741         OSCTRIMVAL as noted in bug #916008
6742
6743 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6744
6745         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6746         in loops with multiple exits (reported as incorrect registers
6747         used by Martin Helmling in Sdcc-user list)
6748
6749 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6750
6751         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6752         made ds390 register extensions look less like error messages
6753
6754 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6755
6756         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6757         reported by Adam Wozniak in Sdcc-user list
6758
6759 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6760
6761         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6762         arithmetic optimizations, added debug output
6763
6764 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6765
6766         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6767         * sdcc.spec: updated and split sdcc into 3 rpms
6768         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6769         needed for literals of LEFT_OP and '+'
6770         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6771         introduced RESULT_TYPE_NOPROM
6772         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6773         left shift
6774         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6775         limited promotion to int only for '*'
6776         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6777
6778 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6779
6780         * src/pic16/gen.c (genSkip),
6781         (genc16bit2lit), (gencjneshort): commented out
6782         (is_LitOp): new helper function, checks operand type
6783         (genCmpEq): rewritten
6784
6785 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6786
6787         * support/regression/tests/bug-908454.c: added
6788
6789 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6790
6791         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6792         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6793         (geniCodeCast): cosmetic, don't preserve bit storage class
6794         (geniCodeLeftShift): added promotion
6795         (geniCodeLogic): fixed regression
6796         * src/SDCCsymt.c (computeTypeOr): accept bits too
6797         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6798
6799 2004-03-07  Borut Razem <borut.razem AT siol.net>
6800
6801         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6802
6803 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6804
6805         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6806         version of pic16_genPackRegisters which does not check if ic is a
6807         CAST operator,
6808         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6809         function cause string1.c regression test fails
6810
6811 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6812
6813         * sim/ucsim/configure.in,
6814         * sim/ucsim/configure,
6815         * sim/ucsim/doc/Makefile.in: use docdir
6816         * src/SDCC.y: fixed sbit atrributes
6817         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6818         * src/SDCCast.c (decorateType): |^& need special promotion handling
6819         * src/SDCCast.h,
6820         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6821         * src/SDCCsymt.h (computeType),
6822         * src/SDCCicode.c: computeType() needs op
6823         * src/SDCCsymt.c (checkTypeSanity),
6824         * doc/sddman.lyx: "plain" bitfields are unsigned
6825         * src/SDCCsymt.c (computeTypeOr): added
6826         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6827         |^& ops
6828         * src/SDCCval.c (val*): computeType() needs op
6829         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6830         * support/regression/tests/onebyte.c: added tests for |^&
6831
6832 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6833
6834         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6835         for writing icode into asm output.
6836
6837 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6838
6839         * src/pic16/device.c: added some debug lines enabled
6840         with macro DEBUG_CHECK,
6841         * src/pic16/genarith.c: more debug in genPlus,
6842         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6843         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6844         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6845         * (aopForSym): onStack symbols are re-placed in data memspace,
6846         and onStack flag is cleared,
6847         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6848         copy temporary pcodeop,
6849         * (genPcall): added warning for not updating PCLATU,
6850         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6851         always true for pic16 port,
6852         * (genMultOneWord): NEW, supports integer multiplication,
6853         * (genMult): modified to call genMultOneWord,
6854         * (ifxForOp): added warning when return NULL,
6855         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6856         flag is set before call to operandFromSymbol for implicit
6857         added structures,
6858         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6859         options.intlong_rent are set by default,
6860         * (_hasNativeMulFor): modified to allow port generation of integer
6861         multiplication,
6862         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6863         set regtype to REG_SFR for all registers, restricting seting the
6864         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6865
6866 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6867
6868         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6869         more than 500 times in the regression tests
6870
6871 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6872
6873         * support/Util/SDCCerr.h,
6874         * support/Util/SDCCerr.c,
6875         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6876         enumerator_list),
6877         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6878         for symbol conflicts.
6879         * support/valdiags/tests/enum.c,
6880         * support/valdiags/tests/tentdecl.c,
6881         * support/valdiags/tests/struct.c: expect possible error messages
6882         referring to original symbol definitions.
6883         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6884         * src/SDCCsymt.h,
6885         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6886
6887 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6888
6889         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6890
6891 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6892
6893         * src/pic16/ralloc.c (newReg): fixed bug #908929
6894
6895 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6896
6897         * src/ds390/gen.c: added missing #include "main.h"
6898
6899 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6900
6901         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6902         checking if symbol is already in set,
6903         * src/pic16/device.h: prototype for checkAddSym,
6904         * src/pic16/gen.c: (_G): added entry interruptvector,
6905         * (assignResultValue): removed some commented out lines,
6906         * (genFunction): check for ISR via sym->type, absolute section for
6907         interrupt code is created via a new pBlock, the goto instruction is
6908         placed now correctly at the interrupt vector position, changed all
6909         references from ivec to _G.interruptvector,
6910         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6911         is the interrupt is a high priority one, same for return from ISR,
6912         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6913         externs to calls of checkAddSym,
6914         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6915         pic16_pcode_verbose flag is set,
6916         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6917         * src/pic16/pcoderegs.c: message about how many registers are saved
6918         will only be emitted if pic16_pcode_verbose flag is set,
6919
6920 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6921
6922         * src/ds390/ralloc.h,
6923         * src/ds390/ralloc.c (ds390_regWithIdx),
6924         * src/ds390/gen.c (emitcode),
6925         * src/ds390/main.h,
6926         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6927         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6928         ds390operandCompare, getRegsRead, getRegsWritten,
6929         initializeAsmLineNode): customized instruction size calculation for
6930         ds390, started basis for some register optimizations
6931         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6932         corresponding assembly output
6933         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6934         missing push/pop of r0/r1. Optimized push/pops
6935
6936 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6937
6938         * src/mcs51/main.c (instructionSize): fixed ACALL size
6939         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6940
6941 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6942
6943         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6944         the sorting of rlist with NULL elements
6945         * (print_idataType, print_idata): NEW to create idata sections
6946         * src/pic16/device.h: idataSymSet new variable
6947         * src/pic16/gen.c (genFunction): fixed some bugs in string
6948         comparing, improved the absolute section creation for ISRs,
6949         added FSR0L/FSR0H in registers that are saved in an ISR,
6950         * (genInline): fixed the processing of inline snippets,
6951         now they undergo no process by the peephole optimizer
6952         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6953         are placed in idataSymSet,
6954         * (pic16emitStaticSeg): extern symbols are added in externs,
6955         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6956         switching when aboslute variables are placed in access bank memory
6957         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6958         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6959         commented out with #if,
6960         * (pic16_packRegisters): reintroduce the check for CAST because some
6961         symbols are not correctly handled,
6962         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6963         pCodeInstruction instead of pCode,
6964         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6965         pCodeAsmDir definition,
6966         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6967         directive, then the argument directive is emitted without the leading
6968         tab, hack for inline labels which must be in the first column,
6969         * (compareLabel,pic16_findNextInstruction),
6970         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6971         * (insertBankSwitch): modified for the new pCodeAsmDir,
6972
6973 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6974         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6975
6976         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6977         instance,
6978         * (pushSide): commented out with #if,
6979         * (assignResultValue): fixed some typos in saving
6980         registers,
6981         * (genPcall): FIXED and sync'ed with genCall,
6982         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6983         * (genNearPointerGet): fixed to handle some more cases,
6984         implementation scheme via table reads,
6985         * (genConstPointerGet): modified to access code memory correct,
6986         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6987         and improved to handle some cases
6988         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6989         instead of "RETLW" for init data
6990         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6991         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6992         variables are placed in access bank memory (<0x80 and >=0xf80),
6993         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6994         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6995         TBLWT_POSTDEC,TBLWT_PREINC
6996         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6997         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6998         directives
6999         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
7000         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
7001         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
7002         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
7003
7004 2004-02-29  Borut Razem <borut.razem AT siol.net>
7005
7006         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
7007         support/Util/findme.h, support/Util/system.h: enhance binary relative
7008         search for lib and include by using findProgramPath()
7009
7010 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7011
7012         * src/SDCCpeeph.h,
7013         * src/SDCCpeeph.c (pcDistance),
7014         * src/port.h,
7015         * src/mcs51/ralloc.h,
7016         * src/mcs51/ralloc.c (mcs51_regWithIdx),
7017         * src/mcs51/main.h,
7018         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
7019         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7020         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
7021         size calculation port specific, started basis for some register
7022         optimizations
7023         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
7024         missing push/pop of r0/r1. Optimized push/pops
7025         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
7026         * device/lib/_modsint.c (_modsint),
7027         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
7028         and stack version so regression tests pass
7029
7030 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
7031
7032         * src/Makefile.in (dep): include SLIBOBJS in dependency check
7033         * src/SDCCast.c (decorateType): catch another small optimization
7034         with '?' operator
7035         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
7036         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
7037         modified to finally use computeType() all over SDCC,
7038         see Feature Request #877103
7039         * src/SDCCval.h: cosmetic
7040         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
7041         valCompare(); regression tested in muldiv.c
7042         * support/regression/tests/muldiv.c (testMod): mod sign follows
7043         dividend only
7044
7045 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
7046
7047         * src/SDCCast.c (decorateType): fixed bug #902362
7048         * doc/INSTALL.txt: fixed install instructions for win32
7049
7050 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
7051
7052         * device/include/Makefile.in (install): fixed by replacing spaces
7053         by tabs
7054         * doc/README.txt,
7055         * doc/INSTALL.txt: updated for release
7056         * doc/sdccman.lyx: added warning for --xstack being buggy
7057
7058 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
7059
7060         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
7061         to eliminate build warnings.
7062         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
7063
7064 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
7065            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7066
7067         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
7068         removed -penable-stack, added comment for stack pragma, added
7069         warning for not initializing the stack/frame registers, removed
7070         comment at interrupts section
7071
7072         Stack is made permanent, there is no ability to disable stack usage.
7073         * src/pic16/device.h,
7074         * src/pic16/device.c: removed all references to USE_STACK macro,
7075         * src/pic16/device.c (pic16_dump_section): when no elements in
7076         rlist, free rlist before return,
7077         * (pic16_dump_int_registers): NEW, internal registers are a new set
7078         of general purpose registers reused by each function,
7079         * (checkAddReg): returns 1 if registers is added to set,
7080         * (pic16_groupRegistersInSection): when a registers is of type
7081         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
7082         * src/pic16/device.h: memRange and Assigned Memory are deleted,
7083         SRCASECMP macro is moved here from device.c
7084         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
7085         PO_PCLATU, PO_PRODL, PO_PRODH,
7086         * (pic16_pCodeOpType, genMinus,
7087         changed compares to "a" register, with AOP_ACC,
7088         * (pic16_genPlus): fixed some bugs and indented properly,
7089         * (pic16_addSign): changed size to size+offset in the MOVWF
7090         instruction,
7091         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
7092         multiply 8-bit operand by literal, result is 8-bit,
7093         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
7094         multiply 2 8-bit operand, result is 8-bit,
7095         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
7096         genUMult8X*_16,
7097         * src/pic16/gen.c: changed accUse to contain WREG only,
7098         * (pic16_emitcomment): renamed to pic16_emitpcomment,
7099         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
7100         true, do not use immediate addressing any more unless sym is a
7101         pointer in codespace,
7102         * (aopForRemat): do not use immediate addressing when symbol not in
7103         codespace and when symbol's address is requested,
7104         * (aopOp): for-loop in if(sym->accUse) is modified for the new
7105         accUse size (= 1),
7106         * (aopGet): added case for AOP_ACC and don't return "accumulator
7107         bug" but WREG instead,
7108         * (popGetTempReg): pushes contents of temporary register in stack,
7109         * (popReleaseTempReg): pops contents of temporary register from
7110         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
7111         * (pic16_popGet): separated case AOP_ACC to return register WREG
7112         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
7113         or PO_IMMEDIATE and initializes their instance/offset appropriately,
7114         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
7115         the use of immediate pointers to certain cases only.
7116
7117         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
7118         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
7119         * (assignResultValue, genCall, genRet): modified to use the new
7120         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
7121         genPcall is still broken,
7122         * (genFunction): added code to create 'A' type pBlocks when
7123         interrupt functions are generated, code not extensively tested yet,
7124         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
7125         * (genEndFunction): modified so ISRs pop stored registers from stack,
7126         * (genMultOneByte): cleanup,
7127         * (AccRsh): added flag andmask, to and result with appropriate mask,
7128         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
7129         * (genDataPointerGet): fixed and reenabled its use,
7130         * (genNearDataPointerGet): bugs fixed,
7131         * (genDataPointerSet): bugs fixed,
7132         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
7133         pic16_DumpSymbol, pic16_DumpOp,
7134         * src/pic16/genutils.h: function prototypes for the above functions,
7135         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
7136         pointers,
7137         * (pic16emitRegularMap): many many many improvements, but needs a
7138         major cleanup,
7139         * src/pic16/main.c: enable_stack in pic16_options is removed,
7140         * (_pic16_parseOptions): removed command line options -penable-stack,
7141         * (_process_pragma): emit stack symbol only when stack pragma is
7142         processed,
7143         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
7144         redirected to FSR0L/FSR0H pair,
7145         * (pic16_get_op, pic16_get_op2): modifications and improvements,
7146         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7147         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
7148         for immediates,
7149         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
7150         * (dumpPicOptype): NEW,
7151         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
7152         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
7153         with movff instruction,
7154         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
7155         added pic16_int_regs, some packRegsFor* functions are commented out,
7156         because produce errors,
7157         * src/pic16/NOTES: minor modifications
7158
7159 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7160
7161         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
7162         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
7163         --pack-iram.
7164         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
7165         * as/mcs51/lkaomf51.c: fixed bug #895763
7166
7167 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
7168
7169         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
7170
7171 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7172
7173         * doc/sdccman.lyx: added details about the HC08 storage classes and
7174         interrupts, fixed the register usage info for z80 & gbz80
7175
7176 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
7177
7178         * doc/sdccman.lyx: added more pic16 port documentation
7179         * device/include/pic16/: added header pic18fregs.h
7180
7181 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
7182
7183         * doc/sdccman.lyx: added Vangelis' contribution
7184
7185 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7186
7187         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
7188         extend to the next CALL or PCALL, not just to the next CALL.
7189
7190 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
7191
7192         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
7193
7194 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7195
7196         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
7197         bug #895752 and a better fix for bug #716790
7198
7199 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7200
7201         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
7202
7203 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7204
7205         * doc/sdccman.lyx: minor changes, minor changed
7206
7207 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
7208
7209         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
7210         which can't handle SDCC_NEWONEBYTEOPS,
7211         (geniCodeMultiply): removed conversion from mult to shift for pic14
7212         and pic16
7213
7214 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7215
7216         * src/hc08/gen.h,
7217         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
7218         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
7219         thus fixing bug #895406
7220
7221 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
7222
7223         * device/lib/_modsint.c,
7224         * device/lib/_modslong.c: sign follows divisor only
7225         * src/hc08/gen.c (genMultOneByte): if result size is 1,
7226         signs or signedness can be ignored
7227         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
7228         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
7229         added optimization for IFX,
7230         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
7231         arguments;
7232         reenabled optimization for IFX, which was removed on 2004-01-11
7233         * src/SDCCast.h: added return type IFX
7234         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
7235         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
7236         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
7237         SDCC_OLDONEBYTEOPS selects the old behaviour
7238         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
7239         changed again and commented promotion rule
7240         * src/SDCCval.c (valDiv): promotion no longer necessary
7241         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
7242         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
7243         rewritten
7244         * support/regression/tests/onebyte.c: added
7245
7246 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
7247
7248         * gen.c (genInline): reverted to old code for assemnling inline
7249         code because of bug reported James Chadd
7250
7251 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
7252
7253         * ralloc.h: missing declarations from previous patch,
7254         seems that patch for ralloc.h was never applied, fixed
7255
7256 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7257            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7258
7259         * pcode.c,
7260         * pcode.h,
7261         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
7262         indirect addressing. Marked FSR0 as deprecated
7263         * gen.c (pointerCode): commented out, not needed now
7264         (pic16_popGet2p): new MOVFF helper function
7265         (genGenPointerGet),
7266         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
7267         (shiftRLong): removed duplicate debugging info
7268
7269 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7270
7271         * src/ds390/gen.c (genNearPointerGet),
7272         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
7273         optimization with bits, but not bitfields.
7274         * src/ds390/ralloc.c (packRegisters),
7275         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
7276
7277 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
7278
7279         * src/SDCCcse.c (algebraicOpts): copy operands before modification
7280
7281 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7282
7283         * src/SDCCsymt.h,
7284         * src/SDCCicode.c (operandFromSymbol),
7285         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
7286         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
7287         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
7288         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
7289         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
7290         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
7291         bug #892038
7292         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
7293         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
7294         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
7295         * src/SDCCsymt.c (newSymbol),
7296         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7297         enumerator_list),
7298         * src/SDCCval.h,
7299         * src/SDCCval.c (newiList): fixed bug #885705
7300
7301 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7302
7303         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
7304         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
7305
7306 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7307
7308         * device/include/c8051f120.h,
7309         * device/include/c8051f300.h,
7310         * device/include/c8051f310.h: added/updated header files for Silicon
7311         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7312         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
7313         in new section Submitting patches
7314
7315 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7316
7317         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
7318         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7319         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7320         genGenPointerSet),
7321         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
7322         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7323         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7324         genGenPointerSet),
7325         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
7326         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7327         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7328         genGenPointerSet),
7329         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
7330         genFarPointerGet, genCodePointerGet, genGenPointerGet,
7331         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
7332         genGenPointerSet): fixed bug #892400
7333         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
7334         to eliminate build warnings.
7335         * src/SDCCast.c (processParms),
7336         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
7337         fixed bug 751859
7338         * support/valdiag/valdiag.py: added GCC to the list of defines active
7339         when compiling with gcc
7340
7341 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7342
7343         * support/Util/SDCCerr.h,
7344         * support/Util/SDCCerr.c,
7345         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
7346         with an incomplete type (fixed bug #883734)
7347         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
7348
7349 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7350
7351         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
7352
7353 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7354
7355         * src/SDCCast.c (decorateType),
7356         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
7357         function pointer implementation
7358         * support/regression/tests/funptrs.c: added tests to verify both forms
7359         of function pointers work correctly. Added tests to verify parameters
7360         are passed in the correct order.
7361
7362 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
7363
7364         * device.c (regCompare): registers are sorted by ascending
7365         address and increasing size,
7366         * main.c (_pic16_finaliseOptions): removed the declaration
7367         of compiler macro MCU. Now a macro of the format pic18fxxxx
7368         will be defined from the command line
7369
7370 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7371             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
7372
7373         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
7374         PCOP_RLCF was overwritten!
7375         * gen.c (genSkip): commented out calls to pic16_emitcode,
7376         * (genCmpEQ): fixed "long" compares, only high word did get compared,
7377         * (genlshTwo),
7378         * (genRRC): added debugging info,
7379         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
7380         overwritten while shifting,
7381         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
7382         overwritten while shifting,
7383         * (AccLsh),
7384         * (AccRsh),
7385         * (shiftLLeftOrResult),
7386         * (shiftRLeftOrResult),
7387         * (shiftRLong),
7388         * (shiftLLong): Implemented with pic16_emitpcode
7389         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
7390         * (genLeftShift): Fixed bug, operand for shift by variable always
7391         was "and"ed with 0x0f,
7392         * (genLeftShiftLiteral),
7393         * (genrshTwo),
7394         * (genRightShiftLiteral): added debugging info,
7395         * (genrshFour): added comment,
7396         * (genRightShift): determined signedness from operand "left"
7397         instead of "result"
7398
7399 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7400
7401         * src/SDCCicode.c (geniCodeParms),
7402         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
7403         function pointers, fixed function pointer bugs #861242 and #861896
7404
7405 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7406
7407         * device/include/c8051f000.h,
7408         * device/include/c8051f120.h,
7409         * device/include/c8051f300.h: added header files for Silicon
7410         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
7411
7412 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
7413
7414         * src/SDCCast.c (processParams): added new type flow and restructured
7415         (gatherAutoInit): added new type flow
7416         (addCast): cosmetic changes
7417         (getLeftResultType): added new type flow for array indices, patch
7418         provided by Stas, see FR #877103
7419         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
7420         array index patch by Stas
7421         * src/SDCCast.h: added prototype getResultTypeFromType()
7422         * src/SDCCval.h,
7423         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
7424         * src/pic/glue.c (pic14emitStaticSeg),
7425         * src/pic16/glue.c (pic16emitStaticSeg),
7426         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
7427         for initialization of symbols
7428         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
7429         * support/Util/SDCCerr.h:
7430         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
7431         * .version: bumped version number to 2.3.8
7432         * device/include/Makefile.in (install),
7433         * doc/Makefile (install): changed to 'rm `find ...`' construct to
7434         avoid warnings
7435
7436 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
7437
7438         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
7439         Slade Rich fixed an optimization bug
7440         * src/pic/pcodepeep.c,
7441         * src/pic/pcoderegs.c
7442         * doc/Makefile (install): added test for directory
7443
7444 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7445
7446         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7447         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7448         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7449         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7450         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7451         * as/mcs51/asexpr.c (term),
7452         * as/hc08/asexpr.c (term): fixed bug #887146
7453
7454 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7455
7456         * src/z80/gen.c (genMult): handle single byte result product
7457         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7458         DUMMY_READ_VOLATILE (fixed bug #886367)
7459
7460 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7461
7462         * support/regression/tests/libmullong.c: fixed logic, on little endian
7463         hosts we ended without a mullong_wrapper()
7464
7465 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7466
7467         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7468         virus/worm forged address usage.
7469
7470 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7471
7472         Fixed promotion, it should be done on AST level:
7473         * src/SDCCast.c (addCast): added promotion to int
7474         (decorateType): updated call to upCast()
7475         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7476         usualUnaryConversions()
7477
7478 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7479
7480         * support/regression/tests/literalop.c (mulWrapper): Added a
7481         wrapper to remove integer overflow warnings.
7482
7483         * support/regression/tests/float_trans.c: Made work on host.
7484
7485         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7486         location of sz80.
7487
7488         * support/regression/generate-cases.py (main): Changed from inline
7489         to a main method.
7490
7491         * doc/Makefile (install): Changed to depth first to get rid of
7492         missing directory install warning.
7493
7494         * as/Makefile (install-doc): Made work on Mac.
7495
7496 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7497
7498         * src/SDCCast.c: added an additional type flow in decorateType() of
7499         opposite direction, see feature request #860006; it's enabled at runtime
7500         by setting the environment variable SDCC_NEWTYPEFLOW
7501         * src/SDCCast.h: changed prototype of decorateType()
7502         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7503         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7504         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7505         see feature request #877103
7506         * src/SDCCval.c: updated call of decorateType()
7507         (valBitwise): fixed bug #882876
7508         (valMinus): added promotion
7509         (valLogicAndOr): result is unsigned
7510         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7511         * src/SDCCsymt.c (computeType),
7512         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7513         must not cause an unsigned operation
7514         * src/pic/glue (pic14emitRegularMap),
7515         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7516
7517 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7518
7519         * src/pic/pcode.c (PCodeID): commented out left over debug code
7520
7521 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7522
7523         * support/valdiag/tests/overflow.c: added shift tests
7524         * src/pic/device.c,
7525         * src/pic/gen.c,
7526         * src/pic/gen.h,
7527         * src/pic/glue.c,
7528         * src/pic/main.c,
7529         * src/pic/pcode.c,
7530         * src/pic/pcode.h,
7531         * src/pic/pcodepeep.c,
7532         * src/pic/pcoderegs.c,
7533         * src/pic/ralloc.c,
7534         * src/pic/ralloc.h: applied patch from Slade Rich;
7535         added support for multiple code pages and multiple RAM banks on the
7536         PIC 14 port. The ASM files now no longer simply assume all the
7537         code / RAM are in the same page / bank. This means the linker can
7538         safely allocate code/RAM of separate ASM files to different pages/banks.
7539         * doc/sdccman.lyx: added Slade's tips
7540         * src/mcs51/peeph.def: fixed bug #880768
7541
7542 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7543
7544         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7545         * src/SDCCast.c (decorateType): fixed bug #880197
7546
7547 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7548
7549         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7550         getopt.h.
7551
7552         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7553         strtof is not part of C89 and isn't included with Mac OS X.
7554
7555 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7556
7557         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7558         shiftL2Left2Result): fixed bug #879326
7559         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7560         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7561         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7562         address fetch for clr instruction
7563         * device/lib/hc08/_mulint.c: created optimized assembly version
7564         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7565
7566 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7567
7568         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7569         proposed in FR #877103
7570
7571 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7572
7573         * src/SDCCval.c (cheapestVal): added missing checks
7574         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7575         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7576
7577 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7578
7579         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7580         equal operands
7581
7582 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7583
7584         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7585         loaded with the linker search paths (-L arguments) and the libraries
7586         to be linked with the current source (-l arguments). Changes
7587         currently will affect only the pic16 port.
7588         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7589         include path the port specific paths and port specific libraries,
7590         * gplink command now contains the $3 argument,
7591         * src/pic16/device.h,
7592         * src/pic16/device.c,: structure PIC_device is made public and
7593         renamed to PIC16_device, the same for variable Pics which is renamed
7594         to Pics16. Updated all references to them.
7595         * src/pic16/glue.c (pic16glue): corrected bug with code
7596         initialization which bypassed the variable initializations block.
7597
7598         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7599         COMPILE_FLAGS and added the --nostdinc option
7600
7601 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7602
7603         * device/include/mc68hc908jb8.h: Register defs for another member
7604         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7605
7606 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7607
7608         Documenting changes from previous commits.
7609         * configure.in (version 1.56),
7610         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7611         when generating output files to configure the pic16 library,
7612         but now I've commented it out, since gputils aren't installed in the
7613         SF compile farm, so library won't compile
7614
7615         * device/lib/Makefile.in (version 1.56): initially I've added in
7616         target 'all' the prerequestive 'model-pic16' so it compiled the
7617         pic16 library, but now I've commented it out for the same reasons
7618         above,
7619         * added targets 'model-pic16' and 'objects-pic16' to compile the
7620         library
7621         * added target 'port-specific-objects-pic16' to handle the
7622         generated libraries and copy them into the build/ directory
7623         * added target 'clean-intermediate-pic16' to clean intermediate
7624         files into pic16 directory
7625         * in target 'installdirs' added line to create directory pic16 in
7626         the installation path
7627
7628         * device/include/Makefile.in (version 1.11): in target 'install'
7629         added lines to copy all header files to installation path,
7630         * in target 'installdirs' added line create directory for pic16
7631         headers in the installation path
7632
7633 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7634
7635         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7636          a function call
7637
7638 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7639
7640         * configure,
7641         * device/lib/configure.in,
7642         * device/lib/configure: fixed for autoconf 2.57
7643
7644 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7645
7646         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7647         option so that it actually works. Made it specific to the z80, since
7648         the gbz80 doesn't have these kinds of I/O ports.
7649
7650 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7651
7652         * device/include/z180.h,
7653         * device/lib/_memcpy.c,
7654         * device/lib/_memmove.c,
7655         * device/lib/_mulint.c,
7656         * device/lib/ser_ir.c,
7657         * device/lib/ser_ir_cts_rts.c,
7658         * device/lib/_strcmp.c,
7659         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7660         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7661         portmode; added deprecation warning for bank= and protmode= forms.
7662         Also, guard against buffer overflow.
7663         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7664
7665 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7666
7667         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7668         changed interrupt vector table generation to only emit declared vectors.
7669         * device/include/Makefile.in: added missing backslash
7670         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7671
7672 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7673
7674         Mainly changes to support compilation of the device libraries
7675         * src/pic16/device.c: stack is allocated via symbol and not
7676         via literal number. The symbol is placed in the corresponding
7677         position of the data ram
7678         * (pic16_dump_section): relocatable and absolute uninitialized
7679         data are now emitted in sorted order to reduce section naming,
7680         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7681         weren't marked as being in the access bank,
7682
7683 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7684
7685         Added portion of GNU PIC Library under the directory
7686         device/include/pic16 and device/lib/pic16. These files
7687         contain the declarations of SFRs for the PIC18Fxx2 devices.
7688         The directory is initialized via configure from toplevel.
7689
7690 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7691
7692         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7693         the spilllocations to be compared correctly
7694
7695 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7696
7697         * src/SDCCast.c (decorateType): fixed bug introduced today
7698
7699 2004-01-12  Borut Razem <borut.razem AT siol.net>
7700
7701         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7702         doc/sdccman.lyx: upper case pragmas are deprecated
7703
7704 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7705
7706         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7707         in simpler and even better code
7708
7709 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7710
7711         * src/SDCCicode.c (operandOperation): fixed bug #874819
7712         * src/SDCCast.c (decorateType): fixed
7713         char foo (unsigned long ul) { return ul > 0; }
7714
7715 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7716
7717         * doc/sdccman.lyx: Moved and added some sections, small changes
7718         all over. Telling LaTeX to be less strict with word spacing
7719         to better keep the right margin. Changed some notes about
7720         maintainance of the ports in section 3.2.1 - is it OK like this?
7721
7722 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7723
7724         SDCC source changes:
7725         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7726         convilong): modified to inform the pic16 port that builtin functions
7727         are external
7728
7729         PIC16 PORT specific changes:
7730         * src/pic16/device.c pic16_dump_equates() added,
7731         processor registers declared internally by the port are emitted in
7732         the translation as equates,
7733         * src/pic16/gen.c: inline code is passed unprocessed to the
7734         translation,
7735         * (pic16_popGetLit2): fnuction modified to take second operand as
7736         pCodeOp pointer and not as literal,
7737         * (popRegFromIdx): prefixed with pic16_,
7738         * (pic16_popCombine2): modified to receive already allocated pCode
7739         operands,
7740         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7741         * (genFunction): initializes local stack frame and pushes on stack
7742         all the registers used by this function,
7743         * (genEndFunction): restores all registers from stack and restores
7744         stack frame,
7745         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7746         improvements,
7747         * (pic16glue): changed the program startup sequence,
7748         * added new dbName code 'A' for functions placed in absolute section
7749         * src/pic16/main.c: added function attribute _naked,
7750         * added pragma 'code' to place a fnuction at an absolute address,
7751         * added command line arguments --debug-ralloc and --pcode-verbose,
7752         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7753         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7754         * (pic16_newpCodeOpLit2): modified to take the second operand as
7755         pCodeOp pointer,
7756         * (pic16_printpBlock): modified to emit each function in a separate
7757         section,
7758         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7759         UPPER for immediate operands,
7760         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7761         instruction,
7762         * src/pic16/peeph.def: all peepholes with movff are commented out,
7763         because there is a problem in the pcode peep optimizer,
7764         * src/pic16/ralloc.c: the register allocator can now reuse local
7765         function symbols for another function. This saves register usage.
7766         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7767
7768         Added file src/pic16/NOTES with information about program writing on
7769         the current port version.
7770
7771 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7772
7773         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7774         and peephole 252 (array access)
7775
7776 2004-01-09  Borut Razem <borut.razem AT siol.net>
7777
7778         * src/SDCCmain.c : fixed #872250: -l command line defined library
7779           files are scanned before standard library files
7780
7781 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7782
7783         * src/SDCCast.c (decorateType): fixed bug #874046
7784
7785 2004-01-09  Borut Razem <borut.razem AT siol.net>
7786
7787         * support/scripts/sdcc.nsi: remove previous installation
7788
7789 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7790
7791         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7792         bytes for last interrupt vector (mcs51)
7793         * sdcc.spec: fixed typo
7794
7795 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7796
7797         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7798         gen51Code): more efficient parameter receive for --model-large
7799         ("bug" #845294)
7800
7801 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7802
7803         * src/ds390/main.c,
7804         * src/z80/main.c: added missed needLinkerScript flags (more than
7805         one port structure defined in these file)
7806         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7807         bug #795325
7808
7809 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7810
7811         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7812         * src/port.h: added flag needLinkerScript in port->linker
7813         structure to inform whether to create a .lnk file or not,
7814         * src/avr/main.c,
7815         * src/ds390/main.c,
7816         * src/hc08/main.c,
7817         * src/mcs51/main.c,
7818         * src/pic/main.c,
7819         * src/pic16/main.c,
7820         * src/xa51/main.c,
7821         * src/z80/main.c: changed appropriately to configure
7822         needLinkerScript flag
7823         * src/pic/gen.c,
7824         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7825         * src/pic/glue.c: added variable udata_section_name to
7826         override default uninitialized data segment definition for
7827         devices only with SHAREBANK memory (reported from Erik Epetrich)
7828         * (pic14emitOverlay): modified to emit a commented overlay segment
7829         directive when no overlay data exist
7830         * (picglue): modified to emit uninitialized data segment
7831         according to udata_section_name
7832         * src/pic/main.c (_pic14_parseOptions): added command line
7833         options --udata-section-name=[name] to override default
7834         udata definition name
7835         * modified _linkCmd and _asmCmd to include compiler passed
7836         arguments via -W option
7837         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7838         object file from '.rel' to '.o' in port->linker structure,
7839         changed size of fptr from 2 to 3 in port structure
7840
7841 2004-01-07  Borut Razem <borut.razem AT siol.net>
7842
7843         * support/scripts/sdcc.nsi: update PATH
7844         * support/scripts/sdcc.ico: craeted
7845
7846 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7847
7848         * device/include/Makefile.in: fix install
7849         * doc/Makefile: fix install
7850
7851 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7852
7853         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7854         in bug #860505
7855         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7856         how the function variable allocation summary is displayed; also
7857         include information about variables allocated to the overlay
7858         segment
7859
7860 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7861
7862         * as/mcs51/lkmain.c: Help about -Y option
7863         * as/mcs51/lkarea.c: Fixed gcc warnings
7864
7865 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7866
7867         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7868         fixed warning
7869         * support/valdiag/tests/overflow.c: added
7870         * src/SDCCast.c (decorateType),
7871         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7872         LEFT_OP (left shift)
7873
7874 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7875
7876         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7877         (default behaviour).
7878
7879 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7880
7881         A python script to validate compiler diagnostic messages. It can be
7882         used to verify that sdcc complains about bad c source code and
7883         gives a good location of the error.
7884         * support/valdiag/Makefile,
7885         * support/valdiag/valdiag.py,
7886         * support/valdiag/tests/*
7887
7888 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7889
7890         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7891         * src/SDCCsymt.c (newEnumType),
7892         * src/SDCCsymt.h
7893         * support/Util/SDCCerr.c,
7894         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7895         enum related bugs.
7896         * support/regression/tests/enum.c: added test for enum values that
7897         require at least 2 bytes of storage.
7898
7899 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7900
7901         * src/common.h: added ifndef/define/endif macros
7902         around the header file.
7903         Bug reported from Jesus Calvino-Fraga
7904
7905 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7906
7907         * sdcc.spec: updated
7908         * device/include/Makefile.in: don't install CVS directories
7909         * device/lib/Makefile.in: added removal of CVS directories after install
7910         * doc/Makefile: fixed install, added local_icons
7911         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7912         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7913         * src/ds390/gen.c (genRightShift): fixed bug #870788
7914         * src/SDCCast.c (decorateType): fixed bug #870781
7915
7916 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7917
7918         PIC16 port related changes:
7919         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7920         added variable stackPos,
7921
7922         * gen.c: genCall, assignResultValue: added support for
7923         pushing/retrieving function parameters to/from stack,
7924         genFunction,genEndFunction: setup stack frame for the
7925         generated function,
7926         genAddrOf: will be changed according to bug 863624
7927
7928         * added files genutils.c and genutils.h which contain gen*
7929         debugged and optimised functions extracted from gen.c
7930
7931         * glue.c: added variable 'externs' which holds extern symbols,
7932         pic16emitRegularMap: is modified to properly handle relocatable
7933          symbols under the new scheme,
7934         pic16createInterruptVect: is modified
7935         pic16printPublics: is modified to emit 'global' assembler directives,
7936         added pic16_printExterns to print extern symbols,
7937         pic16glue: initializes stack/frame pointer in the beginning of
7938         the assembly output. Temporary hack, will be corrected later,
7939         because gplink yet does not support stack and SDCC does not
7940         yet support a type of crt0.o object to create the final binary.
7941
7942         * Removed many lines that contain 8051 legacy code.
7943         * The code is finally placed under a 'code' directive.
7944         * Added port specific options.
7945
7946         * _process_pragma: simplified since now we do not need *special*
7947         include file to define SFR registers. But a separate header
7948         will be needed. This will be developed later.
7949         * _pic16_parseOptions: added, parses port specific options:
7950         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7951         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7952         --preplace-udata-with=
7953
7954         * _pic16_setDefaultOptions: modified to initialize section names,
7955         but hack is temporarly out of order since it needs improvement.
7956         * _pic16_genAssemblerPreamble: configuration words are emitted by
7957         their address instead of their name. This part is incomplete and
7958         supports only the 18Fxx2 devices. Other devices will emit an error
7959         during assembly since they do not contain the same set of config
7960         registers
7961         * _pic16_genIVT: is modified,
7962
7963         * pcode.c: added definitions for some hardware registers that are needed
7964         for stack support
7965         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7966         All PCI entries are updated. Now LFSR is supported.
7967         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7968         * added pic16_newpCodeOpLit2 to support instructions with
7969         two literal arguments
7970         * pic16_pCode2str: corrected code that emits assembler instructions
7971         with two literal operands and those that have an access bit modifier
7972         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7973         this fixes a bug which caused some labels to be lost, when an
7974         assembler directive was added, i.e. banksel,
7975         * pic16_FixRegisterBanking: improved logic that causes the insertion
7976         of bank switching,
7977         * InlineFunction: functions that are called once, are not any more
7978         inlined. This can be a port option in the future,
7979
7980         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7981
7982         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7983         hold the corresponding uninitialized symbols,
7984         * pic16_allocProcessorRegister: registers have explicit marked the
7985         accessBank field,
7986         * pic16_allocInternalRegister: registers are explicit marked as
7987         not used,
7988         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7989         processing list, so bit registers were lost,
7990         *
7991
7992         * ralloc.h: added field 'accessBank' and original symbol operand
7993         in register definition,
7994         * removed the field isMapped from register definition,
7995
7996         ** Several functions have been removed from various sources:
7997         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7998         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7999         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
8000         pic16_assignRelocatableRegisters
8001
8002         ** others have been introduced:
8003         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
8004         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
8005
8006 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
8007
8008         * support/scripts/inc2h.pl: changed definition of BIT_AT
8009         to emit 'sbit at' instead of 'bit at'. This was a request.
8010
8011         PIC16 port related preliminary changes:
8012         * gen.c: prefixed function popRegFromString with
8013         pic16_ and all references to it corrected
8014         * pcode.c: all pic16_pc_* hardware registers prefixed
8015         with underscore (_),
8016         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
8017         * ralloc.c: newReg(): when register is REG_SFR then
8018         set address to rIdx,
8019         pic16_allocProcessorRegister(): marks register wasUsed=0
8020         pic16_writeUsedRegs(): added a call to assign processor
8021         registers via pic16_assignFixedRegisters
8022
8023 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8024
8025         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
8026         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
8027         variables in unused register banks.  Also the SSEG is placed
8028         wherever there is enough space for it, and IDATA can be anywhere
8029         in internal RAM.  For now compile using -Wl-Y[stack_size].
8030         The mem file is different for this option as well, since it
8031         makes no sense of talking about DSEG lenght.
8032
8033 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
8034
8035         * src/SDCClrange.c: fixed bug 869095 that caused segfault
8036         in certain cases, e.g. when ROM assignment, patch provided
8037         from Albert den Haan.
8038
8039 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
8040
8041         Many signedness and type propagation fixes:
8042         * src/SDCCicode.c: made geniCodeCast() static
8043         replaced SPEC_ by IS_ (cosmetic)
8044         (operandOperation): fixed div and mod operation
8045         (usualBinaryConversions): added support for promotion of char
8046         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
8047         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
8048         (geniCodeAdd): an array index will stay unsigned, even if promoted
8049         from char to int
8050         (geniCodeArray): ditto
8051         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
8052         * src/SDCCsymt.c (computeType): added more support for char;
8053         promotion of char is selectable by promoteCharToInt, fixed signedness
8054         for all cases
8055         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8056         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8057         * src/SDCCval (val*): replaced signedness calculation by
8058         computeType()
8059         rearranged if-branches (cosmetic)
8060         (valShift): added warning W_SHIFT_CHANGED
8061         (valCompare): fixed problem with different types
8062         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
8063         * support/regression/tests/literalop.c: added many cases
8064         * support/regression/tests/ast_constant_folding.c: changed finally to
8065         'unsigned int'
8066         * .version: new year, new version: 2.3.7
8067         * src/SDCCmain.c (main): applied patch #866468
8068         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
8069         provided by Scott Bronson
8070         * doc/sdccman.lyx: updated documentation for sdcdb
8071         updated and added chapter tips
8072
8073 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8074
8075         * src/SDCCsymt.h: missing from yesterday's commits
8076
8077 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8078
8079         * src/SDCC.y (struct_or_union_specifier),
8080         * support/Util/SDCCerr.c,
8081         * support/Util/SDCCerr.h: verify that struct & union tags are used
8082         as declared.
8083
8084 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8085
8086         * src/SDCCglobl.h: missing from yesterday's commits
8087
8088 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8089
8090         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
8091         sft_attributes, struct_declaration, parameter_declaration,
8092         type_name, start_block, declaration_list),
8093         * src/SDCC.lex (check_type): support redefinition of typedef names
8094
8095 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8096
8097         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
8098         aligned xdata arrays. Erik helped me with the if clause.
8099
8100 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8101
8102         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
8103         warning
8104
8105 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8106
8107         * src/SDCCast.h,
8108         * src/SDCCast.c (newAst_),
8109         * src/SDCCicode.h,
8110         * src/SDCCicode.c (ast2iCode, newiCode),
8111         * src/SDCCglobl.h,
8112         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
8113         expr, statement, expression_statement, selection_statement,
8114         iteration_statement, expr_opt, jump_statement): foundation for tracking
8115         sequence points
8116         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
8117         point code too)
8118
8119 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8120
8121         * support/Util/SDCCerr.c,
8122         * src/SDCCast.h,
8123         * src/SDCCast.c (createCase, createDefault, decorateType),
8124         * src/SDCClabel.c (labelUnreach),
8125         * src/SDCC.y (labeled_statement, jump_statement): More improvements
8126         to error messages.
8127         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
8128         (with thanks to Stas Sergeev)
8129         * device/include/time.h,
8130         * device/lib/time.c (CheckTime): suppress unreachable code warning
8131
8132 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8133
8134         * src/SDCCast.c (createIvalCharPtr),
8135         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
8136         bug #753752)
8137         * support/regression/tests/nullstring.c: tests for these two bugs
8138
8139 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8140
8141         * support/Util/SDCCerr.h,
8142         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
8143         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
8144         about storage class and 'at' used inside struct or union
8145         * src/SDCCBBlock.c (iCodeFromeBBlock),
8146         * src/SDCCcse.c (ifxOptimize),
8147         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
8148         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
8149         printIval, emitStaticSeg, emitOverlay),
8150         * src/SDCClabel.c (deleteIfx),
8151         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
8152         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
8153         gatherAutoInit, processParms),
8154         * support/Util/SDCCerr.h,
8155         * support/Util/SDCCerr.c (werrorfl): Support for better error location
8156         reporting for post-parse errors.
8157
8158 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8159
8160         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
8161         implicit casts via union; they don't work on big endian systems
8162         (possible fix for bug #861138)
8163
8164 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8165
8166         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
8167         * src/mcs51/main.c: fixed the fix for bug #737001
8168
8169 2003-12-15  Borut Razem <borut.razem AT siol.net>
8170
8171         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
8172
8173 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8174
8175         * support/makebin/makebin.c: put output in binary mode
8176
8177 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8178
8179         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
8180         xdata and data memory on startup. Set the environment variable
8181         SDCC_NOGENRAMCLEAR to disable this.
8182         * src/mcs51/peephole.def,
8183         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
8184         (allows non-interrupt and interrupt code to safely compete for a resource
8185         without the non-interrupt code having to disable interrupts)
8186
8187 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8188
8189         * src/SDCCicode.c (geniCodeAdd),
8190         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
8191         with valFromType if type might be a pointer and host is big endian).
8192         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
8193         types, not just integer types.
8194         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
8195         multiply defined with mismatching "at" address.
8196
8197 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8198
8199         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
8200         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
8201         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
8202         with embedded nulls (fixed bug #753752)
8203
8204 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8205
8206         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
8207         Apparently this did not see much testing (endless loop)
8208
8209 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8210
8211         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
8212
8213 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8214
8215         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
8216         gracefully handle NULL memmap pointers
8217
8218 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8219
8220         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
8221         instead of deleting the iCode when an operand is volatile
8222         * src/z80/gen.c (genDummyRead),
8223         * src/mcs51/gen.c (genDummyRead),
8224         * src/ds390/gen.c (genDummyRead),
8225         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
8226         not just IC_RIGHT
8227         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
8228         * src/SDCC.y: fixed bug #850420
8229
8230 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8231
8232         Applied z80 i/o port patch from Peter Townson and fixed some operators
8233         to better handle operands in A register.
8234         * device/include/z180.h
8235         * src/SDCC.y
8236         * src/SDCCglue.c
8237         * src/z80/gen.c
8238         * src/z80/gen.h
8239         * src/z80/main.c
8240         * src/z80/peeph-z80.def
8241         * src/z80/peeph.def
8242         * src/z80/z80.h
8243
8244 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8245
8246         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
8247
8248 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8249
8250         * device/lib/hc08/_mullong.c: Removed extra #endif
8251
8252 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8253
8254         * sim/ucsim/hc08.src/inst.cc,
8255         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
8256         carries from x to h
8257         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
8258         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
8259         * device/include/stdarg.h: fixed varargs for hc08
8260         * device/lib/Makefile.in,
8261         * device/lib/hc08/Makefile,
8262         * device/lib/hc08/_mulint.c,
8263         * device/lib/hc08/_mullong.c: fixed some endian problems
8264
8265 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8266
8267         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
8268         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
8269         * device/lib/_gptrget.c,
8270         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
8271
8272 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8273
8274         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
8275         * src/SDCCast.c (astErrors): fixed bug #846007
8276         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
8277
8278 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8279
8280         * src/SDCCast.c (decorateType): disabled a transformation I added in
8281         revision 1.188 (access to fields of a structure at an absolute address);
8282         it breaks with bitfields, extern declarations, and gcse analysis.
8283         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
8284         could be assigned through a pointer, so don't complain.
8285         * src/SDCCast.c (astErrors),
8286         * src/SDCCast.h,
8287         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
8288
8289 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
8290
8291         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
8292         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
8293         output of __config directives, since gpasm now supports them
8294         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
8295         pre-processor macro, i.e. -DMCU=p18f452
8296         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
8297         and modified to handle 'cast' icode similarly to '=' icode
8298         * src/pic16/device.h (typedef struct PIC_device): added field
8299         'extMIface' to indicate that chip has external memory interface
8300         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
8301         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
8302         18F8720
8303
8304 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8305
8306         * src/SDCC.y (pointer): fixed bug #846006
8307         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
8308         * src/SDCCast.c (decorateType): fixed bug #846009
8309         * src/ds390/peeph.def,
8310         * src/ds390/gen.c (genAnd, genOr),
8311         * src/mcs51/peeph.def,
8312         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
8313
8314 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8315
8316         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
8317         * src/SDCCdflow.c
8318         * src/SDCCcse.c
8319         * src/SDCCcse.h
8320         * src/SDCCBBlock.h
8321         * src/SDCCBBlock.c
8322
8323 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
8324
8325         fixed bug #845089
8326         * src/SDCCbitv.h,
8327         * src/SDCCbitv.c: added function to free a bitvector
8328         * src/SDCClrange.h,
8329         * src/SDCClrange.c: added function to recompute the liveranges
8330         * src/avr/ralloc.c,
8331         * src/ds390/ralloc.c,
8332         * src/hc08/ralloc.c,
8333         * src/mcs51/ralloc.c,
8334         * src/pic/ralloc.c,
8335         * src/pic16/ralloc.c,
8336         * src/xa51/ralloc.c,
8337         * src/z80/ralloc.c: recompute the liveranges after register packing
8338
8339 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
8340
8341         * src/SDCCloop.c (newInduction): fixed bug #845630
8342
8343 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8344
8345         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
8346         inadvertantly left behind from my 2003-11-12 change
8347
8348 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8349
8350         Updated headers I neglected to commit yesterday.
8351         * src/SDCClrange.h,
8352         * src/SDCCicode.h
8353
8354 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8355
8356         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
8357         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
8358         * src/SDCCopt.c (eBBlockFromiCode),
8359         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
8360         the creation of the key hash table from the sequencing so it can be used
8361         earlier (for some GCSE bug fixes still pending)
8362
8363 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8364
8365         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
8366         * support/regression/tests/addsub.c: testing genPlus shortcut
8367
8368 2003-11-15  Borut Razem <borut.razem AT siol.net>
8369
8370         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
8371
8372 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8373
8374         * src/SDCCcse.c (cseBBlock): fixed bug #527779
8375         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
8376         ordering is immaterial.
8377         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
8378
8379 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8380
8381         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
8382         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
8383         (SIGSEV) of bug #840381
8384         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
8385         unlink new file before rename if new and old filenames are the same)
8386
8387 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8388
8389         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
8390         uninitialized variables) for the mcs51. Set environment variable
8391         SDCC_GENRAMCLEAR to test.
8392         xdata initialization slightly shorter
8393
8394 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8395
8396         * src/SDCCsymt.h,
8397         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
8398         #838241 & 780691 (basicly the same bug)
8399         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
8400         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
8401
8402 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
8403
8404         * src/SDCCmain.c (linkEdit): "fix" #834252
8405
8406 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8407
8408         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
8409         * src/SDCCast.h,
8410         * src/SDCC.y: fixed bug #819403
8411
8412 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8413
8414         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
8415         the reentrant attribute.
8416         * src/hc08/gen.c (genPackBits): added missing stack readjustment
8417         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
8418         simulation
8419         * src/SDCCast.c (decorateType): fixed bug with storage class not being
8420         updated during pointer dereference; f.e. ~(((char *)1)*) was being
8421         erroneously reduced to a literal.
8422         * src/hc08/ralloc.c (packRegisters, rematStr),
8423         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
8424         some cases
8425
8426 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8427
8428         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
8429         * doc/sdccman.lyx: changed from 'article' to 'book'
8430         * doc/Makefile: readded test_suite_spec and cdbfileformat
8431
8432 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
8433
8434         * device/include/stdlib.h: include malloc.h to comply with ANSI
8435         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
8436
8437 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8438
8439         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
8440         * doc/clean.mk: also remove *.out files
8441         * doc/sdccman.lyx: some additions, larger top/bottom margins
8442
8443 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8444
8445         * src/SDCC.y: fixed bug #837365
8446         * support/regression/tests/bitopcse.c
8447         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8448         a symbol (might be valop instead)
8449         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8450         * device/lib/clean.mk: added hc08 to the cleaning list
8451
8452 2003-11-04  Borut Razem <borut.razem AT siol.net>
8453
8454         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8455           made 2003-11-04
8456         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8457           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8458           malloc is declared in standard stdlib.h
8459
8460 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8461
8462         * device/lib/hc08/Makefile: need to clean .rel not .o files
8463         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8464
8465 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8466
8467         * src/port.h,
8468         * src/hc08/main.c,
8469         * src/mcs51/main.c,
8470         * src/ds390/main.c,
8471         * src/z80/main.c,
8472         * src/avr/main.c,
8473         * src/pic/main.c,
8474         * src/pic16/main.c,
8475         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8476         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8477         tests (which uses the port's oclsExpense function)
8478         * src/SDCC.y,
8479         * src/SDCCast.c,
8480         * src/SDCCicode.c,
8481         * src/hc08/gen.c,
8482         * src/ds390/gen.c,
8483         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8484
8485 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8486
8487         * src/SDCCcse.c (ifxOptimize),
8488         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8489         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8490         deleting the IFX iCode.
8491         * src/hc08/ralloc.c: reduced unneeded slocs
8492         * src/hc08/gen.c: fixed bug in asmopToBoolean
8493
8494 2003-11-04  Borut Razem <borut.razem AT siol.net>
8495
8496         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8497           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8498           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8499           transferred to configure
8500
8501 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8502
8503         Use headers defined in the C[++] standards:
8504         * sim/ucsim/gui.src/serio.src/fileio.cc
8505         * sim/ucsim/gui.src/serio.src/frontend.cc
8506         * sim/ucsim/gui.src/serio.src/main.cc
8507         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8508         * support/Util/NewAlloc.c
8509         * as/hc08/lklibr.c
8510         * as/mcs51/lklibr.c
8511         * as/z80/aslist.c
8512         * as/z80/assym.c
8513
8514 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8515
8516         * Added MSVC projects for hc08 assembler and linker:
8517         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8518         /as/hc08/link_hc08.dsp
8519
8520 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8521
8522         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8523
8524 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8525
8526         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8527
8528 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8529
8530         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8531
8532 2003-10-31  Borut Razem <borut.razem AT siol.net>
8533
8534         * support/cpp2/cpplib.h,
8535           support/cpp2/cpplib.c,
8536           support/cpp2/cpplex.c,
8537           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8538           to switch _asm block preprocessing on / off. Default is
8539           #pragma preproc_asm +
8540
8541 2003-10-31  Borut Razem <borut.razem AT siol.net>
8542
8543         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8544           when outputting comment blocks (when executed with -C option) and
8545           _asm (SDCPP specific) blocks
8546
8547 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8548
8549         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8550
8551 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8552
8553         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8554
8555 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8556
8557         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8558         * src/SDCCast.c (decorateType): fixed bug #832664
8559
8560 2003-10-31  Borut Razem <borut.razem AT siol.net>
8561
8562         * support/cpp2/cpplex.c: fixed for SDCPP:
8563           comments(when executed with -C option) and _asm blocks
8564           were included even if they where in skipped #if block.
8565           Applied solution from GCC cpp 3.3.2
8566
8567 2003-10-31  Borut Razem <borut.razem AT siol.net>
8568
8569         * src/SDCC.lex: sdcc now understands both formats:
8570           '# <line_number> <file_name>' and
8571           '#line <line_number> <file_name>'
8572         * support/cpp2/cppmain.c: sdcpp now generates the standard
8573           '# <line_number> <file_name>' instead of former
8574           '#line <line_number> <file_name>'
8575
8576 2003-10-30  Borut Razem <borut.razem AT siol.net>
8577
8578         * support/cpp2/cpphash.h,
8579         * support/cpp2/cpplib.h
8580         * support/cpp2/cpplex.c,
8581         * support/cpp2/cppmain.c,
8582         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8583
8584 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8585
8586         Fixed a number of problems revealed by bug #827883.
8587         * src/SDCCloop.c (loopInvariants): Spill location of the
8588         result operand should be recomputed if extracted from
8589         a loop. Also, don't extract assignments of an iTemp
8590         from a literal.
8591         * src/SDCCast.c (isConformingBody): loop reversal should
8592         not occur if the control variable is involved with a
8593         relational operator.
8594
8595 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8596
8597         * .version: bumped to 2.3.6 to reflect the big improvements
8598         made by Erik and Klaus. Thanks!
8599
8600 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8601
8602         Replaced the livrange code.
8603         * src/SDCClrange.c: added new LR code
8604         * src/SDCCloop.c,
8605         * src/SDCCBBlock.h: removed remainig parts from old LR code
8606         * src/ds390/ralloc.c,
8607         * src/ds390/gen.c: minor fixes to make it work with new code
8608
8609 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8610
8611         * as/hc08/asm.h,
8612         * as/hc08/lkrloc.c,
8613         * src/hc08/gen.c,
8614         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8615         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8616         (tweaked fix for bug #818696)
8617
8618 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8619
8620         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8621
8622 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8623
8624         * src/SDCCmain.c,
8625         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8626         * src/mcs51/gen.c (gencjneshort),
8627         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8628         more efficient (per Scott Bronson's suggestion)
8629
8630 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8631
8632         Extended the semantics of the critical keyword to include
8633         individual statements. See RFE #827755 and #799831
8634         * src/SDCC.y
8635         * src/SDCCicode.c
8636         * src/SDCCopt.c
8637         * src/SDCCast.c
8638         * support/Util/SDCCerr.c
8639         * support/Util/SDCCerr.h
8640         * src/mcs51/gen.c
8641         * src/ds390/gen.c
8642         * src/hc08/gen.c
8643
8644 2003-10-19  Borut Razem <borut.razem AT siol.net>
8645
8646         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8647
8648 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8649
8650         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8651         Fixed bug #818696
8652         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8653         and predecrement operand is displayed
8654
8655 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8656
8657         * src/SDCCval.c (valMinus): fixed bug #826041
8658
8659 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8660
8661         Some hc08 related updates that I missed earlier
8662         * sim/ucsim/stypes.h
8663         * support/regression/ports/hc08/spec.mk
8664
8665 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8666
8667         New target "hc08" for the Motorola 68hc08 family of micros
8668
8669         * configure
8670         * configure.in
8671         * Makefile
8672         * src/hc08/*
8673         * src/SDCCmain.c
8674         * src/port.h
8675         * sim/ucsim/hc08.src/*
8676         * sim/ucsim/configure.in
8677         * src/ucsim/configure
8678         * sim/ucsim/packages_in.mk
8679         * as/hc08/*
8680         * as/Makefile
8681         * device/include/mc68hc908qy.h
8682         * device/lib/hc08/*
8683         * device/lib/Makefile.in
8684         * support/regression/ports/hc08/*
8685         * support/regression/Makefile
8686
8687 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8688
8689         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8690         regression test
8691         * src/ds390/gen.c (genCast): fixed bug #821957
8692
8693 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8694
8695         * device/lib/logf.c: "fixed" overlay bug
8696         * support/regression/ports/host/spec.mk: added m library
8697         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8698         * support/regression/tests/float_trans: added (for Eric)
8699
8700 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8701
8702         * src/mcs51/gen.c (genCpl): fixed bug
8703         http://sf.net/mailarchive/message.php?msg_id=6263915
8704
8705 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8706
8707         * src/SDCCast.c (decorateType): added extended constant folding
8708         * src/SDCCsymt.c (computeType): cleanup
8709         * src/SDCCval.c (valShift): minor optimization
8710         * support/regression/tests/ast_constant_folding.c: added
8711
8712 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8713
8714         * src/SDCCmain.c: removed some unintended changes
8715
8716 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8717
8718         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8719         * src/z80/gen.c: fixed part of bug #817589
8720         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8721
8722 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8723
8724         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8725         * src/SDCCcflow.c
8726         * src/SDCCcse.c
8727         * src/SDCCdflow.c
8728         * src/SDCClabel.c
8729         * src/SDCClrange.c
8730         * src/SDCCmem.c
8731         * src/SDCCopt.c
8732         * src/SDCCpeeph.c
8733         * src/SDCCset.c
8734         * src/avr/ralloc.c
8735         * src/ds390/ralloc.c
8736         * src/izt/ralloc.c
8737         * src/mcs51/ralloc.c
8738         * src/pic/ralloc.c
8739         * src/pic16/ralloc.c
8740         * src/xa51/ralloc.c
8741         * src/z80/ralloc.c
8742         * src/z80/gen.c: removed unused label "release:"
8743
8744 2003-10-06  Borut Razem <borut.razem AT siol.net>
8745
8746         * src/SDCC.lex: removed definition of unused variables
8747           save_optimize and save_options
8748
8749 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8750
8751         * clean.mk: removed '=' in "-maxdepth=1"
8752         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8753         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8754
8755 2003-10-06  Borut Razem <borut.razem AT siol.net>
8756
8757         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8758           my_unput() replaced by unput()
8759
8760 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8761
8762         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8763         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8764         type-punned pointer will break strict-aliasing rules"
8765         Old LR behaviour is again default; Klaus' LR can be choosen by
8766         defining the environment variable LRKLAUS
8767         * src/SDCCBBlock.h
8768         * src/SDCCloop.c
8769         * src/SDCClrange.c
8770         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8771         * clean.mk: fixed removal of files in bin/CVS/
8772         * device/lib/clean.mk: fixed removal of directories small and large
8773         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8774         * src/SDCCicode.c,
8775         * src/SDCCval.c: removed superflous test for pedantic
8776
8777 2003-10-05  Borut Razem <borut.razem AT siol.net>
8778
8779         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8780           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8781           message "unmatched #pragma SAVE and #pragma RESTORE"
8782
8783 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8784
8785         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8786           assembly, critical functions, atomic, nojtbound)
8787
8788 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8789
8790         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8791         * src/SDCCBBlock.h
8792         * src/SDCCloop.c
8793         * src/SDCCloop.h
8794         * src/SDCClrange.c
8795
8796 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8797
8798         * src/z80/gen.h,
8799         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8800         * src/mcs51/gen.h
8801         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8802         * src/ds390/gen.h
8803         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8804         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8805         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8806
8807 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8808
8809         * src/z80/gen.c (genRet): fixed bug #524753
8810         * src/z80/gen.c (genCast): fixed internal error on cast from
8811         pointer to long
8812         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8813         fix for bug #477835 to the z80
8814         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8815         for tracking iCodes in the peephole optimizer for z80
8816
8817 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8818
8819         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8820         the other part of bug #814548
8821         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8822
8823 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8824
8825         * src/SDCCcse.c: fixed part of bug #814548
8826
8827 2003-09-28  Borut Razem <borut.razem AT siol.net>
8828
8829         * src/asm.c: rewrite of printILine() to use temporary file instead
8830           a pipe
8831         * src/xa51/main.c: commented out declaration of int rewinds
8832
8833 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8834
8835         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8836
8837 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8838
8839         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8840         * src/asm.c (printILine): Fixed bug #811015
8841
8842 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8843
8844         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8845         freeing.
8846
8847 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8848
8849         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8850         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8851         to correctly handle general case of AOP_PAIRPTR
8852         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8853
8854 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8855
8856         * src/mcs51/ralloc.c (fillGaps),
8857         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8858         register positioning bug)
8859
8860 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8861
8862         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8863
8864 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8865
8866         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8867         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8868         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8869         (ralloc doesn't intentionally do this now, but perhaps later)
8870         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8871         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8872         register positioning bugs (Fixed bug #762602 and #795325)
8873         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8874         (Fixed bug #808779)
8875         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8876         lines that --i-code-in-asm generates
8877
8878 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8879
8880         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8881         trying to fclose a FILE* that was already closed.
8882
8883 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8884
8885         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8886         of const struct should be treated as if const themselves)
8887
8888 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8889
8890         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8891
8892 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8893
8894         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8895         Unix (/n) and DOS (/r/n) line terminations.
8896
8897 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8898
8899         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8900         bug #613775
8901
8902 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8903
8904         * src/mcs51/gen.c (genFunction, genEndFunction),
8905         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8906         and restore of EA so that stack offsets to parameters are
8907         correct when using both critical and reentrant/stack-auto.
8908         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8909         size (can be triggered in error if sloc is shared between
8910         different sized objects)
8911         * device/include/float.h: fixed macros to explicitly use
8912         unsigned long where needed
8913
8914 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8915
8916         Feature req. 799831: added code to allow nesting of critical functions
8917         * src/mcs51/gen.c (genFunction, genEndFunction)
8918         * src/ds390/gen.c (genFunction, genEndFunction)
8919
8920 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8921
8922         * src/SDCCsymt.c (sclsFromPtr),
8923         * src/SDCCsymt.h,
8924         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8925         support for standard C idiom of memory mapped variables; for
8926         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8927         to xdata int at 0x1234 tempvar = 1.
8928         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8929         provided by Akiya ISHIDA
8930
8931 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8932
8933         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8934         * src/SDCCval.c (constVal): added reduction from int to char
8935         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8936         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8937         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8938         to ignore the sign
8939         * support/regression/tests/shifts.c: fixed
8940
8941 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8942
8943         * src/z80/gen.c (genXor): Fixed bug #805445
8944
8945 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8946
8947         Fixed bug #621531 (const & volatile confusion in the type chain).
8948         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8949         refer to the const or volatile state of the pointer itself.
8950
8951         * src/SDCCast.c
8952         * src/SDCCglue.c
8953         * src/SDCCicode.c
8954         * src/SDCCsymt.c
8955         * src/SDCCval.c
8956         * src/SDCC.y
8957         * src/SDCCsymt.h
8958         * src/pic/gen.c
8959         * src/pic/ralloc.c
8960         * src/pic16/gen.c
8961         * src/pic16/ralloc.c
8962         * support/regression/tests/const.c
8963
8964 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8965
8966         When checking for duplicated modules, use absolute paths
8967         instead of relative paths.  Files changed:
8968
8969         * as/mcs51/lklib.c
8970         * link/z80/lklib.c
8971
8972 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8973
8974         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8975
8976 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8977
8978         * device/include/string.h: added size_t typedef, changed
8979         prototypes to use size_t, eliminated separate reentrant and
8980         non-reentrant declarations, added _memmove declaration
8981         * device/lib/_memcpy.c: changed to use size_t instead of int,
8982         changed /4 to >>2 to avoid division library call
8983         * device/lib/_memcmp.c,
8984         * device/lib/_memset.c,
8985         * device/lib/_strncat.c,
8986         * device/lib/_strncpy.c,
8987         * device/lib/_strncmp.c: changed to use size_t instead of int
8988         * device/lib/_memmove.c: new file (fixed bug #772294)
8989         * device/lib/Makefile.in: added _memmove.c
8990         * device/lib/z80/asm_strings.s: fixed bug #772290
8991         * support/regression/tests/bitfields.c: attempt to fix host assertion
8992         failure on amd64-unknown-linux2.2
8993
8994 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8995
8996         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8997         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8998         * as/z80/asmain.c (main): fixed bug #801766
8999
9000 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
9001
9002         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
9003         compilers
9004
9005 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9006
9007         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
9008         reported in bug #800609
9009
9010 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
9011
9012         * Top header beautifications in src/pic16 directory:
9013           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
9014           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
9015           pcoderegs.h, ralloc.c, ralloc.h
9016         * main.c: added top header and GPL license notice
9017         * pcode.c: fixed the if-conditional warning
9018
9019 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
9020
9021         * device/lib/_mullong.c: replaced int by short for gcc
9022
9023 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9024
9025         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
9026         and JUMPTABLE iCodes properly now (worked by accident before)
9027         * src/mcs51/gen.c (leftRightUseAcc),
9028         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
9029         iCode properly now. Use getSize instead of nRegs since a & b
9030         aren't part of the nRegs tally.
9031
9032 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
9033
9034         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
9035         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
9036           before instructions that use the _STATUS register
9037
9038 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
9039
9040         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
9041         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
9042         fetching of the pointer
9043         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
9044         copied from genNearPointerSet()
9045         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
9046         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
9047         If they pop r0/r1 they must be called in the opposite order than aopOp().
9048         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
9049         (resp. --stack-auto), prepared for --xstack
9050
9051 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9052
9053         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
9054
9055 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9056
9057         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
9058         these ports have their own __sdcc_external_start()
9059
9060 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
9061
9062         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9063         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
9064         type for bits was changed. It resulted in bit variables becoming
9065         global, which is not permitted in PIC 14 assembly output.
9066
9067 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9068
9069         * doc/sdccman.lyx: various additions and updates. Rearranged sections
9070
9071 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9072
9073         Z80 and MCS51 linkers complaint if a public symbol is defined
9074         in more than one library module:
9075
9076         * as/mcs51/lklib.c
9077         * link/z80/lklib.c
9078         * as/mcs51/Makefile.in
9079
9080 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9081
9082         A few small changes that speed up the peephole optimizer.
9083
9084         * src/SDCCpeeph.c
9085
9086 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9087
9088         Try to make the peephole optimizer smarter by maintaining
9089         an association between the assembly source code and the
9090         iCodes that originated them. Put this information to use
9091         with a new peephole rule condition "notVolatile" so that
9092         the rules can be aggressive yet still safe.
9093
9094         * src/SDCCpeeph.c
9095         * src/SDCCpeeph.h
9096         * src/mcs51/gen.c
9097         * src/mcs51/peeph.def
9098
9099 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9100
9101         Fixed bug #741761
9102
9103         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
9104         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
9105         if the left or right operand symbols have the accuse flag set.
9106
9107 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9108
9109         Changed the type of the result of the ! (NOT) operator to char;
9110         previously it returned the same type as the source. This allows
9111         us to eliminate all the genFloatNot functions (all of its target
9112         implementations were very buggy) since !float can use the same
9113         code as !long now.
9114
9115         * src/SDCCicode.c (ast2iCode): ! returns char
9116         * src/mcs51/gen.c (genNot, genNotFloat),
9117         * src/ds390/gen.c (genNot, genNotFloat),
9118         * src/z80/gen.c (genNot, genNotFloat),
9119         * src/pic/gen.c (genNot, genNotFloat),
9120         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
9121
9122 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
9123
9124         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9125         1. Interrupt would not compile properly. Ensure PCLATH register is saved
9126            during interrupts. Ensure WSAVE is located at a shared bank address.
9127         2. Fixed page selection in some places
9128         3. Fixed BTFSS/C to where necessary use registers directly and not simply
9129            the registers name strings.
9130         4. Fixed "signed / unsigned compare" compiler warnings.
9131         5. The PIC port manages its own allocation of the general purpose
9132            registers, but makes no attempt to reuse them. As a result when
9133            compiling it soon runs out of general purpose registers. Some
9134            additional code was added to the files pcode.c and device.c to walk
9135            through the function call tree and rename the registers so that they
9136            get reused.
9137
9138         * src/pic/device.c
9139         * src/pic/gen.c
9140         * src/pic/glue.c
9141         * src/pic/pcode.c
9142         * src/pic/pcode.h
9143         * src/pic/ralloc.c
9144         * src/pic/ralloc.h
9145         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
9146         genPlus() & genMinus() when the result is the same as left or right
9147
9148 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9149
9150         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
9151
9152 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9153
9154         Made bitfield a distinct type from bit so that bitfields
9155         convert as per ANSI C and bits retain their traditional
9156         boolean style behaviour. Implemented bitfield support in
9157         the z80 port.
9158
9159         * src/SDCCsymt.h,
9160         * src/SDCCsymt.c,
9161         * src/SDCCast.c,
9162         * src/cdbFile.c,
9163         * src/mcs51/gen.c,
9164         * src/ds390/gen.c: bit v bitfield split
9165         * src/z80/gen.c: New support for bitfields
9166         * support/regression/tests/bitfields.c: reenabled z80,
9167         added more tests
9168
9169 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9170
9171         Rules 246.x, 247.x relate to bitfields, the others speed up
9172         access to xdata mapped I/O devices.
9173
9174         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
9175
9176 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9177
9178         Cleaned up genPackBits and genUnpackBits and added two helper
9179         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
9180         for literal assignments in genPackBits (thanks to Frieder for
9181         reminding me).
9182
9183         * src/mcs51/gen.c
9184         * src/ds390/gen.c
9185
9186 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9187
9188         Fixed bug #748310 (pointer to function type mishandled when the
9189         function name is omitted). Also fixed a SIGSEGV when a function
9190         attribute (reentrant, etc) is used on a non-function or on a
9191         function but misplaced before the parameter list.
9192
9193         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
9194         bug #748310
9195         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
9196         * support/Util/SDCCerr.h,
9197         * support/Util/SDCCerr.c: Added func attr misuse error msg
9198
9199 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9200
9201         Fixed bug #787649 by anonymous
9202         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
9203         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
9204
9205 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9206
9207         Fixed numerous bitfield problems.
9208
9209         * src/SDCC.y: More bitfield related error checking
9210         * src/SDCCsymt.h,
9211         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
9212         * support/Util/SDCCerr.h,
9213         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
9214         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9215         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9216         * support/regression/tests/bitfields.c: tests added
9217
9218 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9219
9220         Made the constant following the "interrupt" keyword optional. If
9221         omitted, the function will not automatically be given an entry
9222         in the interrupt vector table (similar to #pragma NOIV, but
9223         less syntacticly kludgy). The interrupt number is also now
9224         range checked. Also fixed a bug in the high order bit example
9225         in the manual.
9226
9227         * src/SDCC.y
9228         * src/SDCCmem.c
9229         * src/SDCCglue.c
9230         * src/SDCCsymt.h
9231         * support/Util/SDCCerr.c
9232         * support/Util/SDCCerr.h
9233         * doc/sdccman.lyx
9234
9235 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9236
9237         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
9238         * src/SDCCicode.c (operandOperation): rewritten some ops
9239         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
9240         * src/SDCCsymt.c (computeType): literals are handled the same way as any
9241         other type
9242         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
9243         be re-activated by defining REDUCE_LITERALS)
9244         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
9245         unsigned, but are signed by default
9246         * src/SDCCval.c (constVal): rearranged
9247         * src/SDCCval.c (valMod): preliminary fix
9248         * src/SDCCval.c (valCastLiteral): use TYPE_* types
9249         * support/regression/literalop.c: added, work in progress
9250
9251 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9252
9253         Generate warnings for useless declarations like "char data;"
9254         that don't do what new users expect.
9255
9256         * src/SDCC.y
9257         * support/Util/SDCCerr.h
9258         * support/Util/SDCCerr.c
9259
9260 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
9261
9262         * src/SDCCval.c (valMult): fix overflow detection of negative int
9263
9264 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9265
9266         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
9267
9268         Changes to support big endian targets:
9269
9270         * src/ports.h
9271         * src/SDCCglue.c
9272         * src/avr/main.c
9273         * src/ds390/main.c
9274         * src/izt/i186.c
9275         * src/mcs51/main.c
9276         * src/pic/main.c
9277         * src/pic16/main.c
9278         * src/xa51/main.c
9279         * src/z80/main.c
9280
9281 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
9282
9283         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
9284         * device/lib/time.c: fixed warning "integer overflow in expression"
9285
9286 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
9287
9288         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
9289         * src/SDCCval.c (constVal): changed default to signed; hex and octal
9290         constants are unsigned; added recognition of "u" flag for unsigned
9291         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
9292         * src/SDCCval.c (valDiv, valMod): fixed signdness
9293         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
9294         signedness of modulo, left and right shift
9295         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
9296         * support/Util/SDCCerr.h: added warning W_INT_OVL
9297         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
9298         * src/SDCCast.c (ast_print): improved output of constants
9299
9300 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9301
9302         Fixed some warnings when building with MSVC:
9303
9304         * as/mcs51/asdata.c
9305         * as/z80/asdata.c
9306         * as/mcs51/asm.h
9307         * as/z80/asm.h
9308         * link/z80/aslink.h
9309         * link/z80/lkdata.c
9310         * link/z80/lkeval.c
9311         * link/z80/lkgb.c
9312         * link/z80/lkihx.c
9313         * link/z80/lks19.c
9314         * link/z80/lksym.c
9315         * support/cpp2/cpplib.c
9316         * src/ds390/gen.c
9317         * src/mcs51/gen.c
9318
9319 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
9320
9321         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
9322
9323 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9324
9325         * support/librarian/clean.mk: Do not remove Makefile.
9326         * support/librarian/Makefile: added.
9327
9328 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9329
9330         Added librarian to MSVC build:
9331         * all.dsp
9332         * sdcc.dsw
9333         * support/librarian/librarian.dsp
9334
9335         'configure' not needed for librarian, removed:
9336         * support/librarian/configure
9337         * support/librarian/configure.in
9338         * support/librarian/config_in.h
9339         * support/librarian/Makefile.in
9340
9341         Hopefully these ones built the librarian and the rest of sdcc properly:
9342         * Makefile
9343         * Makefile.common.in
9344
9345         Messed up 'configure', so revert to previous version:
9346         * configure
9347         * configure.in
9348
9349 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
9350
9351         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
9352         there, while the mantissa of a double is "only" 53 bits wide.
9353
9354 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9355
9356         Adding sdcclib to the build.  MSVC project coming soon.
9357         Files added/changed:
9358
9359         * support/librarian/clean.mk
9360         * support/librarian/configure
9361         * support/librarian/configure.in
9362         * support/librarian/config_in.h
9363         * support/librarian/Makefile.bcc
9364         * support/librarian/Makefile.in
9365         * support/librarian/sdcclib.c
9366         * Makefile.bcc
9367         * Makefile
9368         * Makefile.common.in
9369         * configure
9370         * configure.in
9371
9372 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9373
9374         Linker now complaints if linked modules have conflicting options, for
9375         example, one compiled using --model-large and another one compiled with
9376         --model-small.  The following files were modified:
9377
9378         * as/mcs51/asdata.c
9379         * as/mcs51/aslink.h
9380         * as/mcs51/asm.h
9381         * as/mcs51/asmain.c
9382         * as/mcs51/asout.c
9383         * as/mcs51/i51pst.c
9384         * as/mcs51/lkdata.c
9385         * as/mcs51/lklibr.c
9386         * as/mcs51/lkmain.c
9387         * as/z80/asdata.c
9388         * as/z80/asm.h
9389         * as/z80/asmain.c
9390         * as/z80/asout.c
9391         * as/z80/z80pst.c
9392         * link/z80/aslink.h
9393         * link/z80/lkdata.c
9394         * link/z80/lklibr.c
9395         * link/z80/lkmain.c
9396         * src/SDCCglue.c
9397
9398 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9399
9400         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
9401         as/mcs51/lklibr.c: Generate a warning when a library is not found.
9402
9403 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
9404
9405         * src/z80/mappings.i: fix _mul[us][int,long] entries
9406
9407 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9408
9409         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
9410
9411 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9412
9413         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
9414         * support/regression/tests/bitopcse.c: added
9415         fixed warning:
9416         * src/avr/gen.c:
9417         * src/pic/gen.c:
9418         * src/pic16/gen.c:
9419         * src/z80/gen.c:
9420         * src/xa51/gen.c:
9421
9422 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9423
9424         added support for new library format to z80, gbz80 linkers:
9425         *link/z80/aslink.h
9426         *link/z80/lklex.c
9427         *link/z80/lklib.c
9428         *link/z80/lklist.c
9429
9430 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
9431
9432         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
9433         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
9434
9435 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
9436
9437         added DUMMY_READ_VOLATILE:
9438         * src/SDCC.y:
9439         * src/avr/gen.c:
9440         * src/xa51/gen.c:
9441         * src/z80/gen.c:
9442         * src/pic/gen.c:
9443         * src/pic16/gen.c:
9444         * src/mcs51/gen.c:
9445         * src/ds390/gen.c:
9446         * src/SDCCcse.c (algebraicOpts): many improvements
9447         * src/SDCCcse.h: removed algebraicOpts()
9448         * src/SDCCicode.c (picDummyRead): added
9449
9450 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9451
9452         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9453         "Insufficient space in data memory".
9454
9455 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9456
9457         * src/mcs51/gen.c: fixed bug #771358
9458         * src/z80/gen.c: fixed bug #759087
9459
9460 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9461
9462         * src/pic16/glue.c: minor cleanup by Vangelis
9463
9464 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9465
9466         * device/include/regc515c.h: fixed #758477
9467         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9468         * device/lib/_gptrput.c: saved a few bytes
9469         * my tab spacing is 8, yours too?)
9470         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9471         * device/lib/serial.c: process RX bytes earlier than TX bytes
9472         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9473
9474 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9475
9476         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9477
9478 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9479
9480     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9481
9482 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9483
9484         * device/lib/Makefile.in: bad fix, reverted to 1.43
9485
9486 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9487
9488         * device/lib/Makefile.in: added missing z80 object files
9489
9490 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9491
9492         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9493         pic16 progress by Vangelis:
9494         * src/SDCCglobl.h:
9495         * src/SDCCmain.c:
9496         * src/pic/Makefile:
9497         * src/pic:
9498         * pic/Makefile:
9499         * pic16/device.c:
9500         * pic16/device.h:
9501         * pic16/gen.c:
9502         * pic16/gen.h:
9503         * pic16/genarith.c:
9504         * pic16/glue.c:
9505         * pic16/main.c:
9506         * pic16/pcode.c:
9507         * pic16/pcode.h:
9508         * pic16/pcodepeep.c:
9509         * pic16/peeph.def:
9510
9511 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9512
9513     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9514
9515 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9516
9517     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9518     added gbz80 build to MSVC project.
9519     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9520     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9521     from 8051 stuff and setup so it links using a .lnk file.
9522
9523 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9524
9525     * support/librarian/sdcclib.c: sdcc librarian.
9526     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9527     with sdcclib.
9528
9529 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9530
9531     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9532
9533 2003-07-02  Borut Razem <borut.razem AT siol.net>
9534
9535         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9536         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9537         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9538         src/xa51/main.c, src/z80/main.c:
9539         virtualization of glue() function: each port has it's own glue function,
9540         which is accessed by do_glue function pointer in PORT.general structure
9541
9542 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9543
9544         * DS800C400 fun, improved ROM interface and tinibios.
9545
9546 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9547
9548         * More support for DS80C400. Now includes beginning of interface to ROM.
9549
9550 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9551
9552         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9553
9554 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9555
9556         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9557
9558 2003-06-19  Borut Razem <borut.razem AT siol.net>
9559
9560         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9561
9562 2003-06-19  Borut Razem <borut.razem AT siol.net>
9563
9564         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9565         fixed Z80 port - crt0.o: cannot open.
9566
9567 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9568
9569         * support/Util/MySystem.c (merge_command): revert bad fix
9570
9571 2003-06-18  Borut Razem <borut.razem AT siol.net>
9572
9573         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9574
9575 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9576
9577         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9578         option --use-stdout sends errors to stdout instead of stderr.
9579
9580 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9581
9582         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9583
9584 2003-06-15  Borut Razem <borut.razem AT siol.net>
9585
9586         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9587         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9588         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9589         fixed width array of pointers replaced with sets;
9590         multiple include and lib paths ared transferred to preprocessor and linker
9591         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9592         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9593         fixed width array of pointers
9594         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9595         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9596         fixupPath(), getPathDifference()
9597         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9598         fixed width array of pointers
9599
9600 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9601
9602         * src/pic16/ralloc.c: fix warnings
9603         * src/pic16/pcode.c: fix warning
9604
9605 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9606
9607          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9608         know all the details, but essentially this set of changes enable
9609         the pic16 port to generate movff instructions and generate assembler
9610         directives,
9611         * src/SDCCmain.c:
9612         * src/pic16/gen.c:
9613         * src/pic16/glue.c:
9614         * src/pic16/pcode.c:
9615         * src/pic16/device.c:
9616         * src/pic16/main.c:
9617         * src/pic16/pcode.h:
9618         * src/pic16/pcoderegs.c:
9619         * src/pic16/ralloc.c:
9620         * src/pic16/ralloc.h:
9621
9622 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9623
9624         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9625         added option --vc, so sdcc errors and warnings are compatible with
9626         Microsoft Visual Studio.
9627
9628 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9629
9630         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9631           device/lib/libfloat.lib: added atof function.
9632
9633 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9634
9635         * doc/sdccman.lyx: updated to Lyx 1.3
9636         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9637         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9638         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9639
9640 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9641
9642         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9643
9644 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9645
9646         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9647           additions to the "related tools/documentation" section
9648
9649 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9650
9651         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9652
9653 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9654
9655         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9656         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9657
9658 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9659
9660         * doc/sdccman.lyx: fix double dash and other minor things
9661         * doc/Makefile: fix double dash
9662
9663 2003-05-28  Karl Bongers(patches from Martin Helmling)
9664         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9665           condition and ignore commands.
9666
9667 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9668
9669         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9670           is in parts still quite out of date, I did changes as far as I felt makes sense
9671           for a non-native english speaker.
9672           Please feel free to add to the manual or to correct my changes.
9673         * doc/Makefile: undid touching the date of intermediate tex files.
9674
9675 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9676
9677         * doc/sdccman.lyx: Manual has an index now
9678
9679 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9680
9681         Finalize muluint/mulsint and mululong/mulslong merging:
9682         * device/lib/_mulint.c
9683         * device/lib/_mullong.c
9684         * device/lib/gbz80/mul.s
9685         * device/lib/gbz80/stubs.s
9686         * device/lib/z80/mul.s
9687         * device/lib/z80/stubs.s
9688         * src/SDCCsymt.c (initCSupport)
9689
9690 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9691
9692         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9693         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9694           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9695           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9696           instead of /Zm500.
9697
9698 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9699
9700         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9701           the regression tests I'm not brave enough to enable 245.b, 245.c
9702         * doc/sdccman.lyx: added latex preamble for hyperref package.
9703           Using pdflatex this will give you a hyperlinked pdf file with
9704           bookmarks. (prepend '%' before /usepackage if this breaks something)
9705
9706 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9707
9708          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9709
9710 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9711
9712         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9713
9714 2003-05-21    <johan AT balder>
9715
9716         * src/SDCCglue.c (printIval): fixed bug #739934
9717
9718 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9719
9720         Applied patch from bug 737905 (renamed yylineo to mylineno):
9721         * src/altlex.c
9722         * src/SDCCast.c
9723         * src/SDCglobl.h
9724         * src/SDCC.lex
9725         * src/SDCCsymt.c
9726         * src/SDCCval.c
9727         * src/pic16/pcode.c: Cleaned warnings
9728         * src/pic16/pcodeflow.c: Cleaned warnings
9729         * src/pic16/pcoderegs.c: Cleaned warnings
9730
9731 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9732
9733         * src/pic16/pcode.c: Cleaned warnings
9734         * src/pic16/pcodepeep.c: Cleaned warnings
9735         * src/pic16/ralloc.c: Cleaned warnings
9736
9737 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9738
9739         * doc/sdccman.lyx: fixed bug 739745
9740         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9741
9742 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9743
9744         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9745         it can be defined with CFLAGS when running configure
9746         * src/SDCCmain.c: fixed compiling + linking with object files
9747
9748 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9749
9750         * configure.in: configure for pic16 port,
9751             added --disable-pic16-port
9752         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9753         * src/SDCCmain.c: linkOptions is changed to set *,
9754             added if/endif conditional macros to remove options help
9755             messages from optionsTable when a port is not configured, added
9756             support for the PIc16 port in the ports table, when executing
9757             the compiler with no port specified on command line, a default
9758             port is selected with the new macro DEFAULT_PORT which is
9759             defined in port.h, in setDefaultOptions() linkOptions is removed
9760             from initialization assignment, since now it is a set,
9761             parseCmdLine uses setParseWithComma for linkOptions, in
9762             linkEdit() linkOptions are accessed with new function indexSet()
9763             which returns the i'th item of a set variable. See SDCCset.c, in
9764             linkEdit() when calling buildCmdLine(), added linkOptions as
9765             last argument. Now users can pass arguments to gplink via the
9766             -Wl option, main() uses pic16glue() to glue up pic16 programs
9767         * src/SDCCpeeph.c: various changes to support pic16
9768         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9769             return the i'th item of the set
9770         * src/SDCCset.h: added function prototype for indexSet()
9771         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9772         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9773         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9774             added macro DEFAULT_PORT
9775         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9776         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9777             generated
9778         * src/pic16/glue.c: commented out some error producing lines
9779         * src/pic16/main.c: __config directives are commented out to stop
9780             gpasm complaining and test the linkage with gplink, _linkCmd and
9781             _asmCmd changed to be more gplink and gpasm friendly
9782         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9783             produced an error when parsed, peep rule 12 is added to utilize
9784             movff, but it is commented out since the pCode does not support
9785             yet a command with 2 address arguments
9786
9787 2003-05-18    <johan AT balder>
9788
9789         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9790         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9791 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9792
9793         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9794   Added feature to script commands from file.
9795
9796 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9797
9798         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9799         * src/SDCCutil.c: include ctype.h for win32
9800
9801 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9802
9803         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9804
9805 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9806
9807         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9808   Fixed so you can set breakpoints prior to run, run does not stop
9809   on entry now.  Add tbreak.  Other enhancements and fixes for use
9810   with ddd.
9811
9812 2003-05-12  Borut Razem <borut.razem AT siol.net>
9813
9814         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9815
9816 2003-05-11  Borut Razem <borut.razem AT siol.net>
9817
9818         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9819         the path of bin directory, so that PATH is the only env. variable, which has to be set
9820         in case of standard installation.
9821         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9822         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9823         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9824
9825 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9826
9827         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9828         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9829         temp files are in the port dir; clean the gen/test directory when
9830         generating new test.c
9831         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9832         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9833         * support/regression/tests/zeropad.c: added
9834
9835 2003-05-09    <johan AT balder>
9836
9837         * src/SDCCglue.c: fixed bug #597940
9838
9839 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9840
9841         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9842   cache sfr, optimize next,step, fix off by one sourceline,
9843   support ddd list function.
9844         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9845
9846 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9847
9848         * support/regression/HTMLgen.py: added compare_s2f()
9849         * support/regression/Makefile: redo 1.27
9850         * support/regression/generate-cases.py: redo 1.5
9851
9852 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9853
9854         * support/regression/tests/float.c: workaround 33 bit hex constant
9855         * support/regression/tests/simplefloat.c: fix division for host
9856
9857 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9858
9859         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9860         that tame's the PIC's over-aggressive optimizer.
9861
9862 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9863
9864          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9865          support for MSVC.
9866
9867 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9868
9869         Initial support for DS80C400. "Hello world" runs on TINIm400
9870         (with polled I/O).
9871
9872 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9873
9874          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9875          * Some notes on ddd usage added in debugger/README
9876          Martin Helmling adding more features and fixes for ddd GUI debugger.
9877          Code added for nexti, stepi, up, down, and other adjustments.
9878
9879 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9880
9881         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9882         * src/pic/peeph.def Added two rules to optimize carry manipulation
9883         * src/pic/* removed debug printfs
9884
9885 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9886
9887         * debugger/mcs51/cmd.c: added header newalloc.h
9888
9889 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9890
9891         * as/Makefile: new EXEEXT
9892         * as/z80/Makefile: remove trailing slash of BUILDIR
9893         * as/z80/clean.mk: new EXEEXT
9894         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9895         * support/cpp2/Makefile.in: new EXEEXT
9896         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9897
9898 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9899
9900         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9901         EXEEXT was introduced to fix all related problems with targets
9902         "clean", "install" and "uninstall"; a couple of further flaws
9903         especially with "clean" have been fixed too
9904         * as/mcs51/Makefile.in
9905         * as/mcs51/clean.mk
9906         * as/z80/Makefile
9907         * Makefile
9908         * clean.mk
9909         * debugger/mcs51/Makefile.in
9910         * debugger/mcs51/clean.mk
9911         * link/z80/Makefile
9912         * link/z80/Makefile.in
9913         * link/z80/clean.mk
9914         * link/Makefile
9915         * packihx/Makefile.in
9916         * packihx/clean.mk
9917         * sim/ucsim/Makefile
9918         * sim/ucsim/clean.mk
9919         * sim/ucsim/avr.src/Makefile.in
9920         * sim/ucsim/avr.src/clean.mk
9921         * sim/ucsim/s51.src/Makefile.in
9922         * sim/ucsim/s51.src/clean.mk
9923         * sim/ucsim/xa.src/Makefile.in
9924         * sim/ucsim/xa.src/clean.mk
9925         * sim/ucsim/z80.src/Makefile.in
9926         * sim/ucsim/z80.src/clean.mk
9927         * sim/ucsim/main_in.mk
9928         * sim/ucsim/packages_in.mk
9929         * sim/ucsim/gui.src/Makefile.in
9930         * sim/ucsim/gui.src/serio.src/Makefile.in
9931         * sim/ucsim/gui.src/serio.src/clean.mk
9932         * src/Makefile.in
9933         * src/clean.mk
9934         * support/cpp2/Makefile.in
9935         * support/cpp2/clean.mk
9936         * support/makebin/Makefile
9937         * support/makebin/clean.mk
9938         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9939         * doc/sdccman.lyx: --program-suffix no longer needed
9940
9941 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9942
9943          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9944          Martin Helmling added support for ddd GUI debugger.
9945          Code added to display assembly, set variables, and other commands
9946          to interface to ddd.
9947
9948 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9949
9950         * as/Makefile: fix target clean
9951         * as/clean.mk: fix target clean
9952         * as/z80/clean.mk: fix target clean
9953
9954 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9955
9956         * Makefile.common.in: added  AT EXEEXT AT
9957         * configure.in: removed all mingw32 stuff
9958         * configure: rebuilt from configure.in
9959         * doc/sdccman.lyx: updated section "installation"
9960         * support/scripts/sdcc_mingw32: adapted to configure
9961         * support/scripts/sdcc_cygwin_mingw32: added
9962
9963 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9964
9965         * src/pic Added object file support for the PIC port
9966         * src/pic Applied patch from Craig Franklin (this started the object file support)
9967         * src/regression Updated the PIC regression tests for object files
9968
9969 2003-04-20  Borut Razem <borut.razem AT siol.net>
9970
9971         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9972           lklex.c: In function `getfid':
9973           lklex.c:203: warning: array subscript has type `char'
9974         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9975           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9976         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9977           stack handling macros
9978
9979 2003-04-19  Borut Razem <borut.razem AT siol.net>
9980
9981         * "handling space characters in file path" task:
9982         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9983         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9984         * support/Util/MySystem.h: make it self-sufficient
9985         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9986           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9987           handling space characters in file path
9988         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9989           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9990         * support/Util/MySystem.c: handling space characters in executable's path
9991
9992 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9993
9994         * as/z80/Makefile: fix permanent rebuild of z80
9995         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9996         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9997
9998 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9999
10000         * src/SDCCopt.c: add special case optimization to replace modulo by
10001           a power of two with a bitwise AND.
10002
10003 2003-04-18    <johan AT balder>
10004
10005         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
10006
10007 2003-04-17    <johan AT balder>
10008
10009         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
10010         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
10011
10012 2003-04-13  Borut Razem <borut.razem AT siol.net>
10013
10014         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
10015         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
10016           fixed mingw problem in adl_NORMALIZE_PATH
10017
10018 2003-04-12  Borut Razem <borut.razem AT siol.net>
10019
10020         * fixed "#pragma SAVE/RESTORE can not be nested":
10021         * src/SDCC.lex: reworked pragma handling functions
10022         * sdcc/src/SDCCglobl.h: reworked stack handling macros
10023         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
10024
10025 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10026
10027         * src/SDCCutil.c (pathEquivalent): defined but not used
10028         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
10029         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
10030         * configure: rebuilt from configure.in
10031         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10032         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10033         * device/include/Makefile.in: replace sdcc_datadir
10034         * device/lib/Makefile.in: replace sdcc_datadir
10035         * Makefile.common.in: add LDFLAGS from configure
10036         * packihx/Makefile.in: use LDFLAGS
10037         * src/Makefile.in: use LDFLAGS
10038         * support/cpp2/Makefile.in: add LDFLAGS from configure
10039         * support/makebin/Makefile: use LDFLAGS
10040         * .version: bumped version number to 2.3.5
10041
10042 2003-04-12  Borut Razem <borut.razem AT siol.net>
10043
10044         * completed "different paths" task:
10045         * src/SDCCmacro.c: fixed bug in handling quotes
10046         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
10047         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
10048
10049 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10050
10051         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
10052
10053 2003-04-11 kevin Vigor <kevin AT vigor.nu>
10054
10055         * ds390/gen.c ds390/peeph.def: fix bug 706781
10056
10057 2003-04-11  Borut Razem <borut.razem AT siol.net>
10058
10059         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
10060
10061 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
10062
10063         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
10064         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
10065          set - this bit used to not be set...).
10066         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
10067           bad code in PIC Port
10068         * src/regression/and2.c added to test bug 609268
10069         * src/regression/Makefile added and2.c to regression test
10070
10071
10072 2003-04-08    <johan AT CP255758-A>
10073
10074         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
10075         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
10076         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
10077
10078 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
10079
10080         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
10081         fix bug #487815
10082         * support/cpp2/Makefile.in: fix bug #487815
10083         * configure: rebuilt from configure.in
10084         * Makefile.common.in: docdir changed, new path suffixes
10085         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10086         * sdcc_vc_in.h: reflect changes from sdccconf.h
10087         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
10088         * src/SDCCutil.h: remove BINDIR hack
10089         * doc/sdccman.lyx: update new path hierarchy
10090
10091 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10092
10093         * src/SDCCpeeph.c: added okToRemoveSLOC test
10094
10095 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10096
10097         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
10098
10099 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10100
10101         * src/SDCCpeeph.c: added labelIsReturnOnly test
10102         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
10103
10104 2003-04-05    <johan AT balder>
10105
10106         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
10107         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
10108         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
10109         * src/SDCCast.c: fixed a warning
10110         * src/SDCCast.h: fixed a warning
10111         * src/SDCCicode.c (operandFromAst): fixed a warning
10112
10113 2003-04-04    <johan AT balder>
10114
10115         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
10116         * src/SDCCast.c (decorateType): fixed bug #715076
10117         * src/SDCC.y: fixed bug #702907
10118
10119 2003-04-03    <johan AT balder>
10120
10121         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
10122         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
10123         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
10124         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
10125         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
10126
10127 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
10128
10129         * _decdptr.c: fix return values
10130         * _gptrget.c: fix return values
10131         * _gptrgetc.c: fix return values
10132         * _gptrput.c: fix return values
10133         * _mulint.c: fix return values
10134         * as/z80/Makefile: fix 'make -j' problem
10135
10136 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
10137
10138         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
10139         * configure.in: big cleanup, updated to autoconf 2.5x
10140         * configure: rebuilt from configure.in
10141         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10142         * sdcc_vc_in.h: reflect changes from sdccconf.h
10143         * doc/Makefile: fixed a flaw in "make install"
10144
10145 2003-04-02    <johan AT balder>
10146
10147         * src/ds390/gen.c (genCmp): no comments
10148         * src/mcs51/gen.c (genCmp): no comments
10149         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
10150         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
10151
10152 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
10153
10154         * support/regression/generate-cases.py: place generated file in given sub directory
10155         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
10156         * support/regression/Makefile: improvements for 'make -j';
10157         side effect: it's simpler and faster now
10158
10159 2003-03-31  Borut Razem <borut.razem AT siol.net>
10160
10161         * src/z80/main.c: link-{port} and as-{port} defined without path
10162         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
10163
10164 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
10165
10166         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
10167
10168 2003-03-30  Borut Razem <borut.razem AT siol.net>
10169
10170         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
10171           changed type of list parameter to set
10172         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
10173         * src/port.h: changed type of do_assemble() parameter to set
10174         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
10175           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
10176           definition of "cppoutfilename" macro with NULL value in preProcess()
10177         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
10178         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
10179         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
10180           replaced with set *binPathSet
10181         * shash_add() deallocates the item, if allready exsists, before adding the new one
10182         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
10183
10184 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
10185
10186         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
10187           a nested for loop bug in the PIC port
10188         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
10189           for loops
10190
10191 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
10192
10193         * support/Util/dbuf.h: remove C++ stuff to make it portable
10194
10195 2003-03-28  Borut Razem <borut.razem AT siol.net>
10196
10197         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
10198           literal strings in stringLiteral()
10199         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
10200         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
10201           to the project
10202
10203 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
10204
10205         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
10206
10207 2003-03-26    <johan AT balder>
10208
10209         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
10210         * src/ds390/gen.c (saveRegisters): catched symbol abuse
10211         * src/SDCCast.c (decorateType): fixed " -v < 3"
10212
10213 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
10214
10215         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
10216         Added Lenny Story's debug infrastructure changes:
10217         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
10218         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
10219         * src/cdbFile.c: added
10220         * src/SDCCdebug.c: added
10221         * src/SDCCdebug.h: added
10222         * src/SDCCast.c (createFunction)
10223         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
10224         * src/SDCCmain.c (parseCmdLine, main)
10225         * src/SDCCmem.c (redoStackOffsets)
10226         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
10227         * src/SDCCsymt.h
10228         * src/common.h
10229         * src/avr/gen.c (genAVRCode)
10230         * src/ds390/gen.c (gen390Code)
10231         * src/mcs51/gen.c (gen51Code)
10232         * src/pic/gen.c (genpic14Code)
10233         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
10234         * src/xa51/gen.c (genXA51Code)
10235         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
10236
10237 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10238
10239         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
10240         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
10241
10242 2003-03-22    <johan AT balder>
10243
10244         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
10245
10246 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
10247
10248         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
10249         * doc/cdbfileformat.lyx: added, written by Lenny Story
10250         * doc/Makefile: added cdbfileformat.lyx
10251         * doc/clean.mk: added cdbfileformat.lyx
10252
10253 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
10254
10255         * src/mcs51/peeph.def: fix bug #705773
10256
10257 2003-03-20    <johan AT balder>
10258
10259         An sfr/sbit can have an "at #" AND an initializer
10260         * src/SDCCsymt.c (checkSClass):
10261         * src/SDCCmem.c (allocGlobal):
10262         * src/SDCCmem.c (allocLocal):
10263         * src/SDCCast.c (createBlock):
10264
10265 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
10266
10267         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
10268
10269 2003-03-16    <johan AT balder>
10270
10271         Undid the hackup of const and volatile, the problem is much bigger
10272         * src/SDCC.y:1.65
10273         * src/SDCCast.c:1.171
10274         * src/SDCCglue.c:1.138
10275         * src/SDCCicode.c:1.146
10276         * src/SDCCsymt.c:1.150
10277         * src/SDCCval.c:1.65
10278
10279 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
10280
10281         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
10282         * src/ds390/gen.c (genAddrOf): fixed bug #704087
10283
10284 2003-03-13    <johan AT balder>
10285
10286         Hackup const and volatile modifiers in type chains a bit:
10287         * src/SDCC.y:1.63
10288         * src/SDCCast.c:1.169
10289         * src/SDCCglue.c:1.136
10290         * src/SDCCicode.c:1.143
10291         * src/SDCCsymt.c1.146
10292         * src/SDCCsymt.h1.59
10293         * src/SDCCval.c:1.63
10294
10295 2003-03-12    <johan AT balder>
10296
10297         * src/SDCCBBlock.h: more LRH debugging junk
10298         * src/SDCCcflow.h: more LRH debugging junk
10299         * src/SDCCloop.c: more LRH debugging junk
10300         * src/SDCC.y (struct_declaration): fixed bug #697590
10301         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
10302         * src/ds390/gen.c (aopForRemat): fixed bug #700031
10303         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
10304
10305 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10306         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
10307         test function names must now match exactly).
10308         * src/SDCCcse.c: added special case in findCheaperOp to allow
10309         extending a short integer. Makes less awful code for bug 700121 test case.
10310
10311 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10312
10313         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
10314         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
10315
10316 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10317
10318         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
10319         actually called (operandsNotEqual() was called for all
10320         operandsNotEqualX tests).
10321
10322 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
10323
10324         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
10325         with shorter literals. Fixes bug 700121.
10326
10327 2003-03-11    <johan AT balder>
10328
10329         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
10330
10331 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
10332
10333         * src/SDCCloop.c (mergeRegions): an evil beast is dead
10334         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
10335
10336 2003-03-10  Borut Razem <borut.razem AT siol.net>
10337
10338         * src/SDCCmain.c: pipe preprocessor's output
10339         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10340         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10341         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10342         which closes all pipes in pipeSet set
10343         * src/SDCCset.c: free deleted item in function deleteSetItem()
10344         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10345         moved from z80 to src subproject
10346         * .version: increased version number to 2.3.4
10347
10348 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
10349
10350         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
10351         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
10352         * support/regression/ports/xa51/spec.mk: fix typo
10353
10354 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
10355
10356         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
10357
10358 2003-03-09  Borut Razem <borut.razem AT siol.net>
10359
10360         * src/SDCCmain.c: pipe preprocessor's output
10361         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
10362         * sdcc_vc_in.h: define pclose as _pclose for WIN32
10363         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
10364         which closes all pipes in pipeSet set
10365         * src/SDCCset.c: free deleted item in function deleteSetItem()
10366         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
10367         moved from z80 to src subproject
10368
10369 2003-03-09  Borut Razem <borut.razem AT siol.net>
10370
10371         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
10372         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
10373         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
10374         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
10375         * src/SDCCglobl.h: unification of WIN32 native definitions
10376
10377 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10378
10379         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
10380
10381 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10382
10383         * src/configure.in:   check for endianess (even while cross-compiling)
10384         * src/configure:      check for endianess (even while cross-compiling)
10385         * src/configure_in.h: check for endianess (even while cross-compiling)
10386         * src/avr/gen.c:        remove old endianess stuff
10387         * src/mcs51/gen.c:      remove old endianess stuff
10388         * src/ds390/gen.c:      remove old endianess stuff
10389         * src/pic/gen.c:        remove old endianess stuff
10390         * src/pic/genarith.c:   remove old endianess stuff
10391         * src/pic/glue.c:       fix endianess check
10392         * src/pic16/gen.c:      remove old endianess stuff
10393         * src/pic16/genarith.c: remove old endianess stuff
10394         * src/pic16/glue.c:     fix endianess check
10395         * src/xa51/gen.c:       remove old endianess stuff
10396         * src/z80/gen.c:        fix endianess check
10397         * src/SDCCglue.c:       fix endianess check
10398         * src/ds390/peeph.def: fix bug 700036
10399
10400 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
10401
10402         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
10403         * src/configure: find appropriate data-types on host for SDCC's int and long
10404         * src/configure.in: find appropriate data-types on host for SDCC's int and long
10405         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
10406         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
10407
10408 2003-03-07    <johan AT balder>
10409
10410         Just a big NOOP:
10411                 some minor cleanups before the big shot
10412                 OP_DEFS and OP_USES now use Kevin's protection
10413                 new option --nolabelopt
10414
10415         * src/SDCCBBlock.c:
10416         * src/SDCCast.c,:
10417         * src/SDCCcflow.c:
10418         * src/SDCCcse.c:
10419         * src/SDCCicode.c:
10420         * src/SDCCicode.h:
10421         * src/SDCClabel.c:
10422         * src/SDCCloop.c:
10423         * src/SDCCmain.c:
10424         * src/ds390/ralloc.c:
10425         * src/mcs51/ralloc.c:
10426         * src/pic/ralloc.c:
10427         * src/xa51/ralloc.c:
10428         * src/z80/ralloc.c:
10429
10430 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
10431
10432         * src/pic/pcode.c (get_op): fix 64 bit warnings
10433         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
10434         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
10435         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
10436         * support/regression/tests/malloc.c: fix 64 bit warnings
10437
10438 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
10439
10440         * src/mcs51/gen.c (genMinus): fixed bug 696436
10441
10442 2003-03-02  Borut Razem <borut.razem AT siol.net>
10443
10444         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
10445
10446 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10447
10448         * configure.in: test for mkstemp
10449         * sdccconf_in.h: add HAVE_MKSTEMP
10450
10451 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10452
10453         * device/include/ctype.h: removed warning while using --stack-auto
10454         * device/include/malloc.h: removed warning while using --stack-auto
10455         * device/include/string.h: removed warning while using --stack-auto
10456
10457 2003-02-23  Borut Razem <borut.razem AT siol.net>
10458
10459         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10460         because NDEBUG is defined (see man assert)
10461         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10462
10463 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10464
10465         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10466         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10467
10468 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10469
10470         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10471         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10472
10473 2003-02-18    <johan AT balder>
10474
10475         * as/mcs51/asmain.c (asmbl): module can start with a digit
10476         * as/z80/asmain.c (asmbl): module can start with a digit
10477
10478 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10479
10480         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10481         * src/asm.c: fix pipe() for Mingw32
10482
10483 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10484
10485         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10486         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10487         make -V work again; --c1mode reads now from stdin
10488         * doc/sdccman.lyx: added --c1mode
10489         * support/Util/SDCCerr.c: new messages for c1 mode
10490         * support/Util/SDCCerr.h: new messages for c1 mode
10491         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10492
10493 2003-02-15    <johan AT balder>
10494
10495         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10496
10497 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10498
10499         * doc/sdccman.lyx: Environment variables, -o and other minor things
10500
10501 2003-02-14    <johan AT balder>
10502
10503         * src/xa51/main.c: before anyone really tries to use it :)
10504
10505         * Install doc's in share/sdcc/doc
10506         * removed some obsolete files
10507         * Do a proper make distclean and uninstall
10508         M Makefile.common.in
10509         R sdccbuild.sh
10510         M as/Makefile
10511         M device/include/Makefile.in
10512         M device/lib/Makefile.in
10513         M doc/sdccman.lyx
10514         M link/Makefile
10515         M sim/ucsim/doc/Makefile.in
10516         M src/clean.mk
10517         R src/avr/peeph.rul
10518         R src/xa51/peeph.rul
10519         M support/cpp2/Makefile.in
10520         M support/makebin/Makefile
10521
10522
10523 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10524
10525         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10526
10527 2003-02-10  Borut Razem <borut.razem AT siol.net>
10528
10529         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10530         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10531         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10532         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10533         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10534         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10535         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10536         src/z80/Makefile.bcc: Borland Makefile cleanup
10537         * as/z80/Makefile.bcc: Added Borland Makefile
10538         * support/cpp2/borland.h: Removed
10539
10540 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10541
10542         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10543         * src/SDCC.lex: new pragma NOIV
10544         * src/SDCCglobl.h: new pragma NOIV
10545         * src/SDCCmem.c: new pragma NOIV
10546
10547 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10548
10549         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10550
10551 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10552
10553         * src/SDCCmain.c: signal handling is switched off by --debug
10554         * doc/Makefile: small fix for install; use clean.mk again
10555         * doc/clean.mk: clean *.pdf and *.html too
10556
10557 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10558
10559         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10560         * device/lib/printfl.c: fix a ds390 bug by making it portable
10561         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10562         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10563         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10564         * debugger/mcs51/cmd.c: converted multi-line string literals
10565         * sim/ucsim/globals.cc: converted multi-line string literals
10566         * src/SDCCmain.c: introduced signal handler to remove temp files
10567         * doc/Makefile: small tweaks, implement clean
10568         * doc: removed generated files
10569
10570 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10571
10572         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10573         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10574         Address Record is not correctly generated for DS390."
10575
10576 2003-02-02  Borut Razem <borut.razem AT siol.net>
10577
10578         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10579         * as/mcs51/asm.h: fixed compilation with Borland C
10580         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10581         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10582         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10583         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10584         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10585         src/z80/Makefile.bcc: delete $(LIB) only if exist
10586         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10587
10588 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10589
10590         * device/include/malloc.h: introduced NULL
10591         * device/include/string.h: introduced NULL
10592         * device/include/stdlib.h: introduced NULL
10593         * device/lib/_memcpy.c: removed NULL
10594         * device/lib/_strcat.c: removed NULL
10595         * device/lib/_strchr.c: removed NULL
10596         * device/lib/_strcmp.c: removed NULL
10597         * device/lib/_strcpy.c: removed NULL
10598         * device/lib/_strcspn.c: removed NULL
10599         * device/lib/_strlen.c: removed NULL
10600         * device/lib/_strncat.c: removed NULL
10601         * device/lib/_strncmp.c: removed NULL
10602         * device/lib/_strncpy.c: removed NULL
10603         * device/lib/_strpbrk.c: removed NULL
10604         * device/lib/_strrchr.c: removed NULL
10605         * device/lib/_strspn.c: removed NULL
10606         * device/lib/_strstr.c: removed NULL
10607         * device/lib/_strtok.c: removed NULL
10608         * device/lib/malloc.c: removed NULL, include own header
10609
10610 2003-02-02    <johan AT balder>
10611
10612         * 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
10613         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10614         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10615         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10616         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10617         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10618
10619 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10620
10621         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10622         area 'DATA'"
10623
10624 2003-02-01    <johan AT balder>
10625
10626         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10627
10628 2003-01-31    <johan AT CP255758-A>
10629
10630         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10631
10632 2003-01-30    <johan AT balder>
10633
10634         * src/SDCCBBlock.c: automatic bug detection
10635         * src/SDCCicode.c: automatic bug detection
10636
10637 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10638
10639         * src/SDCCglobl.h:   now --xram-size 0 works
10640         * src/SDCCmain.c:    now --xram-size 0 works
10641
10642 2003-01-29    <johan AT balder>
10643
10644         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10645
10646 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10647
10648         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10649         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10650         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10651         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10652         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10653         * src/SDCCmain.c:    Added options --xram-size and --code-size
10654
10655 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10656
10657         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10658         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10659
10660 2003-01-27    <johan AT balder>
10661
10662         * src/SDCC.y: fixed bug #613764
10663
10664 2003-01-26    <johan AT balder>
10665
10666         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10667         * src/SDCCsymt.h: fixed bug #673374
10668         * src/SDCCglue.c: fixed bug #661910
10669         * src/SDCCast.c: fixed bug #458099 and 673374
10670
10671 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10672
10673         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10674         * as/mcs51/strcmpi.h: added
10675         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10676         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10677         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10678         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10679         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10680         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10681         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10682         * as/mcs51/Makefile.aslink: new module strcmpi
10683         * as/mcs51/Makefile.asx8051: new module strcmpi
10684         * as/mcs51/Makefil.bcc: new module strcmpi
10685         * as/mcs51/Makefile.in: new module strcmpi
10686         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10687
10688 2003-01-26    <johan AT balder>
10689
10690         * src/SDCCglue.c: reverted back to 1.124
10691         * src/SDCCast.c: reverted back to 1.156
10692         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10693
10694 2003-01-25    <johan AT balder>
10695
10696         * src/SDCCglue.c: A better fix for bug #661910
10697         * src/SDCCast.c: A better fix for bug #661910
10698         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10699
10700 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10701
10702         * src/Makefile.in: remove spawn.o
10703         * src/SDCCmain.c: remove spawn.h
10704         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10705         * src/spawn.c: removed
10706         * src/spawn.h: removed
10707         * support/regression/ports/ds390/spec.mk: link with -r
10708
10709 2003-01-24    <johan AT CP255758-A>
10710
10711         * src/ds390/gen.c (aopOp): fixed bug #667458
10712         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10713         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10714         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10715
10716 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10717
10718         * src/mcs51/peeph.def: better assembler identation by Frieder
10719         * src/mcs51/gen.c: better assembler identation by Frieder
10720
10721 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10722
10723         * as/z80/string.h: removed for gcc 3.2
10724         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10725         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10726
10727 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10728
10729         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10730         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10731         * support/regression/Makefile: separate temp files for ports
10732         * support/regression/generate-cases.py: separate temp files for ports
10733         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10734         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10735
10736 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10737
10738         * moved tinitalk to device/examples/ds390
10739
10740 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10741
10742         * as/mcs51/lkmem.c: rflag is for DS390
10743         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10744         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10745                          (linkEdit): move mem- and map-files the same way as ihx-files
10746         * src/z80/main.c (_setDefaultOptions): removed --generic
10747         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10748         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10749         * src/pic/glue.c (picglue): --c1mode works again
10750         * src/pic16/glue.c (pic16glue): --c1mode works again
10751         * src/asm.c (printCLine): fix #660034
10752
10753 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10754
10755         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10756         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10757         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10758         * as/mcs51/lkmem (summary): better fix for sp problem
10759         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10760         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10761         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10762                                               remove --stack-after-data
10763
10764 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10765
10766         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10767         * src/SDCCutil.c (join): ugly bug: missing '\0'
10768         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10769
10770 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10771
10772         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10773         * src/port.h: typo
10774         * src/pic/main.c (_asmCmd): gpasm supports -o
10775         * src/z80/main.c: more general macros
10776         * device/lib/Makefile.in: remove intermediate files
10777
10778 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10779
10780         * .version: Bumped version number to 2.3.3
10781         * src/SDCCBBlock.c: new option -o
10782         * src/SDCCglobl.h: new option -o
10783         * src/SDCCglue.c: new option -o
10784         * src/SDCCmain.c: new option -o
10785         * src/asm.c: new option -o
10786         * src/ds390/main.c: new option -o
10787         * src/pic/glue.c: new option -o
10788         * src/pic/pcode.c: new option -o
10789         * src/pic/ralloc.c: new option -o
10790         * src/pic16/glue.c: new option -o
10791         * src/pic16/pcode.c: new option -o
10792         * src/pic16/ralloc.c: new option -o
10793         * src/z80/main.c: new option -o
10794         * device/lib/Makefile.in: use -o
10795         * support/regression/ports/ds390/spec.mk: use -o
10796         * support/regression/ports/gbz80/spec.mk: use -o
10797         * support/regression/ports/mcs51/spec.mk: use -o
10798         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10799         * support/regression/ports/z80/spec.mk: use -o
10800         * support/regression/ports/ucz80/spec.mk: use -o
10801         * support/regression/ports/xa51/spec.mk: use -o
10802         * support/regression/fwk/lib/timeout.c: fix usage string
10803
10804 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10805         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10806
10807 2003-01-07    <johan AT balder>
10808
10809         * src/SDCCast.c (decorateType): fixed bug #600035
10810
10811 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10812         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10813         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10814         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10815         * src/pic/pcode.c: outcommented unused variable to remove warnings
10816         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10817
10818 2003-01-06    <karl AT turbobit.com>
10819         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10820    regression tests.
10821
10822 2003-01-06    <johan AT balder>
10823
10824         * src/SDCCicode.c: fixed array add
10825
10826 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10827         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10828         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10829
10830 2003-01-04    <johan AT balder>
10831
10832         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10833
10834 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10835         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10836
10837 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10838         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10839         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10840
10841 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10842         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10843
10844 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10845         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10846
10847 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10848         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10849
10850 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10851
10852     * in /sdcc/as/mcs51/ changed these files in order to create an
10853     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10854     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10855     following files to include the previous two files: aslink.dsp,
10856     Makefile.aslink, Makefile.bcc, and Makefile.in.
10857
10858     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
10859     .adb instead of .cdb
10860
10861 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10862
10863         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
10864         value from option --iram-size.
10865
10866 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10867
10868         * /sdcc/as/mcs51/lklist.c: added boundary check before using
10869         dram[] array.
10870
10871 2002-09-18    <wiml AT hhhh.org>
10872
10873         * SDCClrange.h: exposed setFromRange() and setToRange()
10874         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10875           packRegsForAccUse() (bug 542397)
10876         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10877           multiple times and emitting the fetch operations more than once
10878           added aopGetUsesAcc() function to allow binary operators to
10879           fetch their operands in the correct order; made genMinus() emit
10880           compact code for X = LITERAL - Y
10881
10882 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10883         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
10884         sprintf() in line 1267.
10885
10886 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10887         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10888         like ports.
10889
10890 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10891         Changes to aslink (All the changes are marked with 'JCF'):
10892
10893         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
10894         summary().
10895
10896         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
10897         area BSEG.  Also moves, if possible, the DATA area down into the internal
10898         ram so more space is available.
10899
10900         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
10901         sflag.
10902
10903         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
10904         not bytes.  Function summary() which creates a memory usage summary
10905         file with extension .mem.  Reports of overlaping stack and small stack
10906         size.  If the space for the stack is less than 16 bytes aslink trows a
10907         warning.
10908
10909         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
10910         the 8051.  Option 'y' for memory summary output file.
10911
10912         Changes to sdcc (All the changes are marked with 'JCF'):
10913
10914         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
10915
10916         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
10917         overlaying area for it (uses RegBankUsed[4]).
10918
10919         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
10920         bank zero as used by default.  By default aslink locates the stack
10921         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10922         the creation of the .mem file.  Delegates the allocation of data area
10923         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10924         the begining of the stack area to aslink.
10925
10926         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
10927         glue() in SDCCglue.c creates an area for it.
10928
10929 2002-09-03  Borut Razem <borut.razem AT siol.net>
10930         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10931         sdcc/src/pic/glue.c:
10932         introduced atexit() handler for teporay files removal in case of
10933         errors, assertions, ...
10934
10935 2002-08-29  Borut Razem <borut.razem AT siol.net>
10936         * sdcc/support/cpp2/auto-host_vc_in.h:
10937         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10938         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10939         Maybe there is a similar problem with BORLANDC? It should be checked!
10940
10941         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10942         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10943         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10944         was not executed, and the compiler (cl) launched a warning:
10945         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10946
10947 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10948         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10949
10950 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10951         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10952
10953         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10954           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10955           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10956           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10957           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10958           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10959           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10960         - added Release configuration in VS projects
10961         - review of compiler an linker options
10962         - VC .exe files are generated in bin_vc directory, not to interfere
10963           with binaries generated from other projects (cygwin, mingw, bcc ...)
10964
10965         * sdcc/src/yacc.dsp: added
10966
10967         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10968         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10969         and insert the version number definitions from .version
10970
10971         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10972
10973         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10974         added - genarate auto-host.h using auto-host_vc_in.h as template
10975
10976         * sdcc/sdcc_vc.h,
10977         removed from CVS, generated automatically
10978
10979 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10980         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10981
10982 2002-08-11  Borut Razem <borut.razem AT siol.net>
10983         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10984
10985 2002-08-10  Borut Razem <borut.razem AT siol.net>
10986         * src/SDCCmain.c (main):
10987         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10988         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10989         The consequence was that some temporary files were not removed.
10990
10991         * src/SDCCglue.c:
10992         unification of code in functions tempfilename() and tempfile():
10993         function tempnam() is defined in Visual Studio 6.0 and .NET
10994
10995         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10996
10997         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10998           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10999         - removed compiler command line option /WX: Treats all warnings as errors
11000         - update a list of source files, included into the project
11001
11002         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11003           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
11004         changed project type to Generic Project so that can be correcly converted to VS.NET project
11005
11006         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
11007
11008         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
11009
11010         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
11011
11012         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
11013         added return 0 statements after assert() to make compiler happy
11014
11015         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
11016         added newline in the def file to keep MSC compiler satisfied
11017
11018         * sdcc/src/z80/gen.c:
11019         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
11020           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
11021         - solved MSC error in function aopDump()
11022
11023         * sdcc_vc.h: define PREFIX as "\\sdcc"
11024
11025 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
11026         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
11027
11028 2002-06-22  Scott Dattalo <scott AT dattalo.com>
11029         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
11030         - Rewrote the register banking algorithm.
11031         - Added pCode live-range analysis to registers (for now, only non-used and
11032         singly-used registers optimized away)
11033
11034         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
11035
11036         * 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.
11037
11038 2002-05-10  Scott Dattalo <scott AT dattalo.com>
11039         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
11040
11041 2002-04-22  Michael Hope  <michaelh AT vroom>
11042
11043         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
11044
11045         * configure.in (DD_COPT): Added include support required for gbdk.
11046
11047         * .version: Bumped version number just to increase it.
11048
11049         * src/SDCCmain.c: Added -nostdinc to the default options.
11050
11051 2002-04-15  Michael Hope  <michaelh AT vroom>
11052
11053         * device/lib/z80/printf.c (sprintf): Added.
11054
11055         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
11056
11057         * src/z80/peeph.def: Added transpose redundent load rule.
11058
11059         * src/z80/main.c: Added force callee saves for jaune.
11060
11061         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
11062
11063         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
11064
11065 2002-03-28  Johan Knol  <johan AT balder>
11066
11067         * src/SDCCval.c: fixed bug #532436
11068
11069 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11070         * /src/port.h:
11071         Added "char *Processor" field to the port structure.
11072
11073         * /src/SDCCmain.c:
11074         Added -p option. Allows port dependent processor to be specified.
11075
11076         * all ports:
11077         Initialized the new field char *Processor field to NULL in all ports
11078
11079         * /src/pic/*:
11080         Compiler generated registers for interrupt context saving
11081         were not getting allocated.
11082
11083 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
11084
11085         * /src/SDCCast.c:
11086         Fixed left shift. Will promote the left side of a left shift
11087         if a) left shifting more than size of operand or b) when assigned
11088         to something size > size of left side
11089
11090 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11091         * src/pic/*
11092         tons of changes. Register allocation has been
11093         rewritten. Added customization for the various PICs. Flow
11094         analysis is restructured. ...
11095
11096         * src/pic/device.h:
11097         Added
11098
11099         * src/pic/device.c:
11100         Added. device.c is a PIC port hack to accomodate variations
11101         in PIC devices.
11102
11103 2002-03-13  Michael Hope  <michaelh AT vroom>
11104
11105         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
11106
11107 2002-03-04  johanknol  <johanknol AT manik>
11108
11109         * /src/SDCCval.c: fixed
11110
11111         const unsigned char arr[][2] = { { 0, 1 } };
11112         t18.c:1: error: Initializer element is not constant
11113
11114 2002-03-04  bela  <bela AT manik>
11115
11116         * /device/include/mcs51reg.h:
11117         ds89c420 register definition update
11118
11119 2002-03-03    <johan AT FRIJA>
11120
11121         * support/Util/SDCCerr.c: did something, but don't no why anymore
11122
11123         * support/regression/tests/bug-524691.c: made it a little less shy
11124
11125         * src/SDCCast.c (decorateType): fixed bug #524697
11126
11127         * src/SDCCast.c: made some lineno improvements
11128
11129         * src/SDCCval.c (getNelements): changed warning to error
11130
11131         * src/SDCCglue.c (printIvalArray): changed warning to error
11132
11133         * src/SDCCicode.c: fixed a warning for mingw
11134
11135         * src/SDCCast.c (decorateType): fixed the << promotion for ops
11136
11137         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
11138
11139 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
11140
11141         * src/ds390/peeph.def:
11142         Added some more peephole rules
11143
11144         * src/ds390/gen.c: Various fixes & enhancements
11145
11146         * src/SDCClrange.c, src/SDCClrange.h:
11147         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
11148
11149         * src/ds390/ralloc.c:
11150         various fixes & enhancements (ds390) specific
11151
11152         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
11153         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
11154         from rallocs.
11155
11156         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
11157
11158 2002-03-02    <johan AT FRIJA>
11159
11160         * src/SDCCast.c (decorateType): fixed bug #524708
11161
11162         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
11163
11164         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
11165
11166 2002-03-01  Michael Hope  <michaelh AT vroom>
11167
11168         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
11169
11170         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
11171
11172 2002-03-01    <johan AT FRIJA>
11173
11174         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
11175
11176         * src/SDCCast.c (decorateType): fixed bug #524209
11177
11178         * src/SDCCval.c (valNot): fixed bug #524195
11179
11180 2002-02-26    <johan AT balder>
11181
11182         * src/xa51/gen.c: fixed a warning
11183
11184         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
11185
11186         * src/SDCCast.c (decorateType): fixed bug #522534
11187
11188 2002-02-23    <johan AT balder>
11189
11190         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
11191
11192 2002-02-22    <johan AT balder>
11193
11194         * src/SDCCast.c: fixed bug #514865
11195
11196         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
11197
11198 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
11199
11200         * sdcc/src/SDCCloop.c:
11201         Previous fix was not good. basic blocks that have "break" or "return" are
11202         not really partof a loop , but live ranges used in these blocks should
11203         be live thru the entire loop, so set partOfLoop but don't add them to
11204         loop region
11205
11206 2002-02-21    <johan AT FRIJA>
11207
11208         * src/SDCCcse.c: fixed bug #514308
11209
11210 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
11211
11212         * src/SDCCloop.c:
11213         Fixed BUG #519583. If a conditional block ended in a return/break
11214         statement inside a loop, it was not being considered part of the loop.
11215
11216         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
11217
11218 2002-02-10  Karl Bongers <karl AT turbobit.com>
11219
11220         * debugger/*:
11221         Fixed up SDCDB debugger somewhat.  Updated debugger/README
11222         with lots of comments and notes.
11223
11224         * device/examples/test2.c:
11225         Fix bug, "red" variable not being initialized(compiler complained).
11226
11227         * device/examples/Makefile, examples/test3.c:
11228         Add Makefile in device/examples folder, compiles test3.c
11229         for use as a multiple module SDCDB test case.
11230
11231         * sim/ucsim/cmd.src/cmdset.cc:
11232         Took out debug printfs in ucsim "next" command.
11233
11234         * sim/ucsim/xa.src:
11235         Karl and Johan start ucsim XA support.  Most dissassembly working,
11236         about 75% emulation done(plenty of work remaining).
11237
11238         * sim/ucsim/z80.src:
11239         Add Z80 support to ucsim, add test-ucz80 regression test,
11240         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
11241         Notice z80 compiler fails on examples/test3.c/crc code.
11242
11243 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
11244
11245         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
11246         Added support for --parms-in-bank1
11247
11248         * src/ds390/peeph.def:
11249         added a few more peephole optimzations
11250
11251         * src/ds390/main.c:
11252         1) added __builtin_inp & __builtin_outp used to read in data of given length
11253            from a memory mapped port
11254         2) added __builtin_memcmp
11255         3) added __builtin_swapw swap bytes of a short
11256
11257         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
11258         1) handle multiple send & receives from register bank1
11259         2) ralloc can now allocate DPTR1 to some liveRanges
11260
11261         * src/SDCCsymt.c, src/SDCCsymt.h:
11262         changes to handle multiple sends & receives
11263
11264         * src/SDCCptropt.h:
11265         added some pointer arithmetic optimization
11266
11267         * src/SDCCptropt.c:
11268         added some pointer arithmetic optimizations but not stable yet so not
11269         called from anywhere (will get this working shortly)
11270
11271         * src/SDCCopt.c: fixed for multiple sends & receives
11272
11273         * src/SDCCmain.c:
11274         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
11275         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
11276            set preprocessor defines (depending on options)
11277
11278         * src/SDCCicode.c, src/SDCCicode.h:
11279         changes made to handle multiple sends & receives
11280
11281         * src/SDCCglobl.h:
11282         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
11283
11284         * src/SDCCcse.c, src/SDCCcse.h:
11285         added function findbackward def (to be used in upcoming optimization)
11286
11287         * src/SDCCcflow.c, src/SDCCcflow.h:
11288         added function returnAtEnd - to determine if a basic block terminates with
11289         a RETURN iCode
11290
11291         * src/SDCCast.c, src/SDCCast.h:
11292         added option parms-in-bank1
11293
11294         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
11295         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
11296         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
11297         adjusted for --parms-in-bank1 option
11298
11299         * device/include/string.h:
11300         donot redefine "reentrant" keyword
11301
11302         * device/include/ds80c390.h: Added some more SFRs
11303
11304 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
11305
11306         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
11307
11308 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
11309
11310         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
11311
11312 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
11313
11314         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
11315
11316 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
11317
11318         * Added --xram-movc option
11319
11320 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
11321
11322         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
11323
11324 2002-01-11  Johan Knol
11325
11326         * Added math lib of Jesus Calvino-Fraga
11327
11328 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
11329
11330         * src/SDCCmain.c (processFile): fix processing of ../../src.c
11331         * support/regression/Makefile: new target test-mcs51-stack-auto
11332         * support/regression/ports/mcs51-stack-auto/spec.mk: added
11333
11334 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11335
11336         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
11337
11338 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
11339
11340         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
11341
11342 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
11343
11344         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
11345
11346         * src/SDCCglue.h: add definition for printIvalChar()
11347
11348 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11349
11350         * src/SDCCast.c: fix #498138 by Johan
11351
11352         * src/SDCCglue.c: fix #498138 by Johan
11353
11354 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
11355
11356         * support/regression/Makefile: fix clean
11357
11358         * support/regression/ports/ds390/support.c: fix transmission of last character
11359
11360 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
11361
11362         * /sdcc/src/ds390/gen.c:
11363         a) improved computing address of stack variable
11364         b) took out some #if 0 code
11365         c) improved parmBytes adjustment
11366         d) improved genPlusIncr & genMinusIncr
11367         e) genCmp could generate bad code (when left assigned to DPTR)
11368         f) Fixed bug in hasInc
11369
11370         * /sdcc/src/ds390/ralloc.c:
11371         a) packRegsForSupport could mess up live information (Fixed)
11372         b) packRegsDPTRuse could be incorrect for left & right shift
11373
11374         * /sdcc/src/mcs51/ralloc.c:
11375         packRegsForSupport could mess up the live information (Fixed)
11376
11377         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
11378
11379         * /sdcc/src/SDCCast.c:
11380         can reverse a loop even if function call is present as long
11381         as the loop control variable is local & is not passed as parameter
11382
11383 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11384
11385         * /sdcc/ChangeLog: *** empty log message ***
11386
11387         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
11388         More builtin function additions for TININative
11389
11390         * /sdcc/src/ds390/ralloc.c:
11391         Had broken the regression testsuite
11392
11393         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
11394
11395         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
11396         Added funcattr hasStackParms will be set for reentrant functions when there
11397         are paramteres on the stack, this helps in minimizing frame pointer generation
11398         typeFromStr can handle function pointers now
11399
11400         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
11401         *** empty log message ***
11402
11403 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11404
11405         * /src/ds390/gen.c, /src/ds390/main.c:
11406         More builtin function additions for TININative
11407
11408         * /src/ds390/ralloc.c:
11409         Had broken the regression testsuite
11410
11411         * /src/SDCCast.c: Fixed a bug in dumptree
11412
11413         * /src/SDCCsymt.c, /src/SDCCsymt.h:
11414         Added funcattr hasStackParms will be set for reentrant functions when there
11415         are paramteres on the stack, this helps in minimizing frame pointer generation
11416         typeFromStr can handle function pointers now
11417
11418         * /doc/builtins.txt, /doc/TININative.txt:
11419         *** empty log message ***
11420
11421
11422 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
11423
11424         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
11425         ALPHA version for -mTININative
11426
11427         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
11428         updated to reflect changes in the port structure
11429
11430         * /src/port.h:
11431         added function do_assemble (similar to do_link) if non-null this function
11432         will be called to do assembly (-mTININative) requires a multi command
11433         assembly
11434         added function genAssemblerEnd will be called to generate assembler Epilogue
11435
11436         * /src/SDCCsymt.c:
11437         added _JavaNative to debug info printing
11438
11439         * /src/SDCCmain.c: added option --tini-libid
11440         added port->do_assemble function (-mTININative) has a multi command assemble
11441
11442         * /src/SDCCglue.c: Disabled "constExpr" check
11443         added port->genAssemblerEnd function
11444
11445         * /src/SDCCglobl.h: Added option --tini-libid value
11446
11447         * /src/SDCCast.h:
11448         tookout optimizeCompare from the header (has no external references)
11449
11450         * /src/SDCCast.c: made one more function "static"
11451
11452 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11453
11454         * src/z80/mappings.i: Added z80asm support.
11455
11456         * src/z80/main.c: Added z80asm support on --asm=z80asm
11457
11458         * src/z80/gen.c: Fixed asm portability issues.
11459
11460         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11461
11462         * src/SDCCglue.c (printExterns): Added global/extern split.
11463
11464 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11465
11466         * support/regression/Makefile: added test for mcs51 model large
11467
11468         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11469
11470         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11471
11472 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11473
11474         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11475
11476 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11477
11478         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11479
11480         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11481
11482 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11483
11484         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11485
11486         * support/regression/tests/simplefloat.c: Port to mcs51.
11487
11488 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11489         * support/regression/tests/bug-485362.c: Added.
11490
11491         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11492
11493         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11494
11495         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11496
11497         * src/z80/gen.c (aopDump): Added a dump function.
11498
11499 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11500         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11501
11502         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11503
11504         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11505
11506         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11507
11508         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11509
11510         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11511
11512         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11513
11514         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11515
11516         * support/regression/ports/ds390/support.c: Use tinibios.
11517
11518         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11519
11520 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11521
11522         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11523         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11524
11525         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11526
11527         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11528
11529 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11530
11531         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11532
11533         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11534         (packRegsForIYUse): Created and optimised.
11535
11536 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11537
11538         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11539 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11540
11541         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11542
11543         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11544
11545         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11546
11547 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11548
11549         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11550
11551         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11552
11553 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11554
11555         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11556
11557         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11558
11559         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11560
11561 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11562
11563         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11564         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11565         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11566
11567         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11568
11569         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11570         (genNotFloat): Added.
11571         (genUminusFloat): Added.
11572
11573         * device/lib/z80/Makefile: Added floating pt stubs.
11574
11575         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11576
11577         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11578
11579         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11580
11581 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11582
11583         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11584
11585         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11586
11587         * sdcc/support/regression/Makefile: Add port ds390.
11588
11589         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11590
11591         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11592
11593         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11594
11595         * sdcc/support/regression/ports/ds390/support.c: Added.
11596
11597         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11598
11599         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11600
11601         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11602
11603 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11604
11605         * device/include/malloc.h: Added z80 and gbz80 support.
11606
11607         * device/lib/gbz80/heap.s: Added.
11608
11609         * device/lib/z80/heap.s: Added.
11610
11611         * device/lib/malloc.c: Added z80 and gbz80 support.
11612
11613         * support/regression/tests/malloc.c (testMalloc): Added.
11614
11615         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11616
11617         * support/regression/tests/bug-478094.c: Added.
11618
11619         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11620
11621 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11622
11623         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11624
11625         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11626
11627         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11628
11629         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11630
11631         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11632
11633 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11634
11635         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11636
11637 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11638
11639         * support/regression/tests/bug-477927.c: Added.
11640
11641         * src/z80/peeph.def: Added minor rules.
11642
11643         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11644
11645         * src/z80/peeph.def: Added jump optimisation modification.
11646
11647 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11648
11649         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11650
11651 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11652
11653         * support/regression/tests/funptrs.c: Added.
11654
11655 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11656
11657         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11658
11659 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11660
11661         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11662
11663         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11664
11665         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11666         (movLeft2ResultLong): Created.
11667
11668         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11669         (joinPushes): Added.  Joins two char pushes into a word push.
11670
11671 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11672
11673         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11674
11675         * support/makebin/Makefile (install): Added creation of dest dir.
11676
11677 2001-10-24 Karl Bongers <karl AT turbobit.com>
11678
11679         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11680
11681 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11682
11683         * src/z80/ralloc.c: Turned off faulty pack for one use.
11684
11685         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11686
11687         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11688
11689 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11690
11691         * support/regression/Makefile: Improved clean
11692
11693         * support/regression/ports/gbz80/spec.mk: Added clean
11694
11695         * support/regression/ports/host/spec.mk: Added clean
11696
11697         * support/regression/ports/z80/spec.mk: Added clean
11698
11699         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11700
11701         * support/regression/ports/mcs51/timeout.c: little improvements
11702
11703 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11704
11705         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11706
11707         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11708
11709         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11710
11711 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11712
11713         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11714
11715         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11716
11717 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11718         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11719
11720         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11721
11722         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11723
11724         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11725
11726         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11727
11728         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11729
11730         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11731
11732         * support/regression/tests/longor.c: Added.
11733
11734 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11735
11736         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11737
11738         * as/mcs51/aslink.h: define PATH_MAX
11739
11740         * as/mcs51/asm.h: define PATH_MAX
11741
11742         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11743
11744         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11745
11746         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11747
11748         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11749
11750         * src/SDCCglobl.h: define PATH_MAX
11751
11752         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11753
11754         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11755
11756 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11757
11758         * src/z80/gen.c (gencjneshort): Fixed
11759
11760         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11761
11762 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11763
11764         * support/regression/tests/bug-469671.c: Added.
11765
11766         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11767
11768 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11769
11770         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11771
11772         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11773
11774 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11775
11776         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11777
11778         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11779
11780         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11781
11782         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11783
11784         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11785
11786         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11787
11788         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11789
11790 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11791
11792         * 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.
11793
11794         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11795
11796         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11797
11798 2001-10-07    <johan AT FRIJA>
11799
11800         * device/lib/gets.c (gets): fixed the return value.
11801
11802 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11803         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11804
11805         * 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.
11806
11807         * 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.
11808
11809         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11810
11811         * src/pic/gen.c: Removed Safe_strdup.
11812
11813         * configure.in: Added option to enable libgc support.
11814
11815         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11816         (bitVectUnion): Optimised.
11817         (bitVectIntersect): Optimised.
11818         (bitVectBitsInCommon): Optimised.
11819         (bitVectCplAnd): Optimised.
11820
11821         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11822
11823 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11824
11825         * src/SDCCmain.c: distinguish between assembler debug and plain options
11826
11827         * src/avr/main.c:   remove standard assembler options
11828
11829         * src/ds390/main.c: remove standard assembler options
11830
11831         * src/mcs51/main.c: remove standard assembler options
11832
11833         * src/port.h: removed "PENDING" comment
11834
11835 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11836
11837         * src/device/lib/_mulint.c  : new, with assember functions
11838
11839         * src/device/lib/_mullong.c : new, with assember functions
11840
11841         * src/device/lib/_divuint.c : with assember functions
11842
11843         * src/device/lib/_divsint.c : with assember functions
11844
11845         * src/device/lib/_divulong.c: with assember functions
11846
11847         * src/device/lib/_divslong.c: with assember functions
11848
11849         * src/device/lib/_moduint.c : with assember functions
11850
11851         * src/device/lib/_modsint.c : with assember functions
11852
11853         * src/device/lib/_modulong.c: with assember functions
11854
11855         * src/device/lib/_modslong.c: with assember functions
11856
11857         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11858
11859         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11860
11861         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11862                                       replaced _mululong.c and _mulslong.c by _mullong.c
11863
11864 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11865
11866         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11867
11868 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11869
11870         * src/SDCCglue.c: test, if win32api is available for MINGW
11871
11872 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11873
11874         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11875         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11876         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11877         * support/regression/ports/host/spec.mk: removed GENERIC
11878         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11879         * support/regression/ports/z80/spec.mk: removed GENERIC
11880
11881 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11882
11883         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11884
11885         * support/regression/tests/bug-467035.c: Created.
11886
11887 2001-10-01    <johan AT FRIJA>
11888
11889         * src/SDCC.y: fixed bug #466586 part 1
11890
11891 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11892
11893         * SDCCicode.c: z80 has no generic pointers
11894         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11895
11896 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11897
11898         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11899
11900 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11901
11902         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11903
11904         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11905
11906 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11907
11908         * configure.in: Fixed up so that ucsim is only configured once.
11909
11910         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11911
11912         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11913         (getPathDifference): As above.
11914
11915         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11916
11917         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11918
11919 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11920         * .version: Updated to 2.3.1
11921
11922         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11923         Added copyright header.
11924
11925         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11926         (assemble): Added support for macro based assembler commands.
11927         (linkEdit): Added support for macro based linker commands.
11928         (preProcess): Changed the pre-processor to use macros.
11929         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11930         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11931
11932         * device/lib/z80/crt0.s: Added module name for debugging.
11933
11934 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11935
11936         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11937
11938         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11939
11940         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11941
11942         * src/Makefile.in: Added SDCCmacro and SDCCutil
11943
11944 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11945
11946         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11947
11948 2001-09-16    <johan AT FRIJA>
11949
11950         * 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.
11951
11952 2001-09-15    <johan AT FRIJA>
11953
11954         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11955         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11956
11957 2001-09-11    <johan AT FRIJA>
11958
11959         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11960
11961 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11962
11963         * support/regression/tests/bug-460444.c: Added test case.
11964
11965         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11966         (genCast): Added justification for all of the asserts.
11967
11968 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11969
11970         * support/regression/support.c: _xdata replaced by xdata
11971
11972         * support/regression/spec.mk: removed _generic
11973
11974 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11975
11976         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11977
11978         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11979         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11980
11981         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11982
11983         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11984
11985         * support/regression/tests/bug-460010.c: Added test case.
11986
11987         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11988
11989 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11990
11991         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11992
11993         * support/regression/testfwk.c: removed workaround for bug #436344
11994
11995         * support/regression/tests/bp.c: use less memory with mcs51
11996
11997         * support/regression/tests/bug-441448.c: use less memory
11998
11999         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
12000
12001         * support/regression/collate-results.py: typo
12002
12003 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
12004
12005         * support/regression/tests/fetchoverlap.c: Added new test case.
12006
12007         * support/regression/tests/bp.c: Added new test case.
12008
12009         * support/regression/tests/bug-448984.c: Added new test case.
12010
12011         * support/regression/tests/pow2shifts.c: Added new test case.
12012
12013         * src/z80/gen.c: Turned off the noise it normally generates for the release.
12014         (genlshTwo): Fixed right shift for count > 8.
12015
12016         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
12017
12018 2001-09-08    <johan AT FRIJA>
12019
12020         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
12021
12022 2001-09-07    <johan AT FRIJA>
12023
12024         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
12025
12026         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
12027
12028 2001-09-06    <johan AT FRIJA>
12029
12030         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
12031         * bernhard noted me at this: "() equals to (void)" (1.38)
12032
12033 2001-09-05    <johan AT FRIJA>
12034
12035         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
12036
12037 2001-09-04    <johan AT FRIJA>
12038
12039         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
12040
12041
12042 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
12043
12044         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
12045
12046 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
12047
12048         * link/z80/aslink.h: Fixed path for PATH_MAX
12049
12050 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
12051
12052         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
12053
12054         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
12055
12056         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
12057
12058         * 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.
12059
12060 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
12061
12062         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
12063         (genCmp): Fixed up genCmp for the GB with longs.
12064
12065         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
12066
12067         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
12068
12069         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
12070
12071         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
12072
12073 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
12074
12075         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
12076
12077 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
12078
12079         * 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.
12080
12081         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
12082
12083 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
12084
12085         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
12086
12087         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
12088
12089 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
12090
12091   * sim/ucsim/configure:    little improvement of Cygwin-detection
12092   * sim/ucsim/configure.in: little improvement of Cygwin-detection
12093   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
12094   * support/regression/tests/bug-221100.c: small changes for mcs51
12095   * support/regression/tests/bug-221168.c: small changes for mcs51
12096   * support/regression/tests/bug-227710.c: small changes for mcs51
12097   * support/regression/tests/staticinit.c: small changes for mcs51
12098   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
12099   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12100   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12101
12102 $Revision$