* src/pic16/main.c: fixed pic16 standard library directory bug
[fw/sdcc] / ChangeLog
1 2007-02-12 Borut Razem <borut.razem AT siol.net>
2
3         * src/pic16/main.c: fixed pic16 standard library directory bug
4
5 2007-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
6
7         * src/hc08/gen.c (genSwap): fix swap regression test
8
9 2007-02-10 Borut Razem <borut.razem AT siol.net>
10
11         * src/SDCCsymt.c: fixed bug #1159134: invalid duplicate declarations
12           with same scope
13         * support/regression/tests/bug-1654060.c: added regression test for
14           #1654060
15
16 2007-02-09 Bernhard Held <bernhard AT bernhardheld.de>
17
18         * src/mcs51/gen.c (genRet): fixed RFE 1652561: added code for bit to
19         bit moves in return statement
20
21 2007-02-09 Borut Razem <borut.razem AT siol.net>
22
23         * src/SDCC.y: fixed bug #1654060 typedef within function causes
24           syntax error
25
26 2007-02-07 Maarten Brock <sourceforge.brock AT dse.nl>
27
28         * src/mcs51/gen.c (aopPut): use direct name for pushing registers
29         * src/SDCCmain.c (parseCmdLine): dbuf_s path must be initialised
30
31 2007-02-07 Raphael Neider <rneider AT web.de>
32
33         * src/pic16/devices.inc,
34         * device/include/pic16/pic18fregs.h,
35         * device/include/pic16/pic18f[24][34]31.h,
36         * device/lib/pic16/libdev/pic18f[24][34]31.c,
37         * device/lib/pic16/pics.all: added 18f[24][34]31 family
38         * device/lib/pic16/libio/i2c.ignore: do not build i2c
39
40 2007-02-07 Maarten Brock <sourceforge.brock AT dse.nl>
41
42         * device/lib/printf_large.c (_print_format): fixed compare/assign bug, how
43           can this have lived here for so many years?
44         * src/SDCCicode.c (ast2iCode): return left instead of right for assignment,
45           fixes bug 1273984, see also patch 1645121, thanks Gnther Jehle
46         * support/regression/tests/bug1273984.c: new, added, thanks Gnther Jehle
47
48 2007-02-06 Bernhard Held <bernhard AT bernhardheld.de>
49
50         * src/SDCCBlock.c (addiCodeToeBBlock): fixed bug 1652207: GOTO icodes
51         appended by loop induction must be at the very end of the eBBlock
52
53 2007-02-05 Kevin Vigor
54
55         * src/ds390/gen.c, src/ds390/main.c: Address bug 1469393.
56
57 2007-02-05 Borut Razem <borut.razem AT siol.net>
58
59         * support/regression/fwk/lib/timeout.c: native WIN32 port,
60           implemented #1651830 Reg. tests: rewrite timeout.c to use WIN32 API
61
62 2007-02-03 Borut Razem <borut.razem AT siol.net>
63
64         * src/SDCC.y, src/SDCCmain.c, src/SDCCglobl.h, doc/sdccman.lyx:
65           applied patch #1646602 option to set default signedness of char to
66           unsigned, added -funsigned-char command line option,
67           thanks to Gunther Jehle
68         * device/lib/Makefile.in: added the -f option to rm so it doesn't
69           prompt for file deletion a few hundred times (especially the
70           subversion files, which have ro permissions so it asks for
71           confirmation), thanks to Simon McAuliffe;
72           added {} + option to find in order to remove multiple files from a
73           single rm commad
74
75 2007-02-02 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
76
77         * device/include/mcs51/SST89x5xRDx.h: Added.
78
79 2007-02-02 Raphael Neider <rneider AT web.de>
80
81         * src/pic/glue.c (emitSymbolSet): check sym->etype before use
82         * src/regression/Makefile: use --no-pcode-opt, ignore failing tests
83
84 2007-02-01 Raphael Neider <rneider AT web.de>
85
86         * src/pic/glue.c (picglue,emitSymbolSet,showAllMemmaps): emit the
87           config words again
88
89 2007-01-31 Borut Razem <borut.razem AT siol.net>
90
91         * support/Util/dbuf_string.h: added ATTRIBUTE_PRINTF to dbuf_printf()
92           if compiled with GCC. Thanks to Raphael Neider
93
94 2007-01-31 Raphael Neider <rneider AT web.de>
95
96         * src/pic/pcode.c (isValidIdChar,bankCompare): fuzzy matching of
97             operand names, handles name and (name + n) for all n,
98           (sameBank): restructured, also check bank allocation policy,
99         * src/pic/glue.c (emitPseudoStack): fixed printf arguments,
100           (pic14_operandsAllocatedInSameBank): check whether to operands
101             will be allocated into the same bank (i.e., section) to reduce
102             BANKSEL overhead, queried from pcode.c:sameBank,
103           (pic14printLocals): reintroduced clustering registers into a single
104             section: all compiler generated symbols will now reside in one
105             bank (per file), reducing BANKSEL overhead and code size,
106           (showAllMemmaps): use local dbuf where possible
107
108 2007-01-29 Raphael Neider <rneider AT web.de>
109
110         * src/pic/gen.c (popGetExternal): simplified, mark symbol as used,
111           (call_libraryfunc): retrieve/create symbol and mark as used,
112           (genFunction): mark defined functions as non-extern and add again
113            to code memmap for later output
114         * src/pic/glue.c (emitPseudoStack): put into own subroutine,
115           (pic14printLocals): reworked for new symbol emission,
116           (emitIfNew,pic14_constructAbsMap,emitIvalLabel,emitIvals,emitInitVal,
117           showAllMemmaps): reworked symbol output using dbufs, added handling
118             of string literals (still incomplete),
119           (picglue): removed symbol emission, moved into showAllMemmaps,
120           (emitSymbolSet): new workhorse for symbol output,
121           (pic14emitMaps,pic14printPublics,pic14printExterns): commented out
122
123 2007-01-29 Borut Razem <borut.razem AT siol.net>
124
125         * src/SDCCmain.c, src/SDCCutil.c: dbuf_splitFile: file extension
126           component contains the extension separator.
127
128 2007-01-28 Borut Razem <borut.razem AT siol.net>
129
130         * sim/ucsim/cmd.src/cmdutil.cc: NUL device is detected as CG_FILE type
131           on WIN32
132         * src/SDCCdwarf2.c, src/SDCCglobl.h, src/SDCCmain.c, src/SDCCutil.c,
133           src/SDCCutil.h, src/avr/gen.c, src/ds390/gen.c, src/hc08/gen.c,
134           src/mcs51/gen.c, src/pic/device.c, src/pic/gen.c, src/pic/pcode.c,
135           src/pic/pcodepeep.c, src/pic/ralloc.c, src/pic16/device.h,
136           src/pic16/gen.c, src/pic16/main.c, src/pic16/pcode.c,
137           src/pic16/pcodepeep.c, src/pic16/ralloc.c, src/xa51/gen.c,
138           src/z80/gen.c, support/Util/MySystem.c:
139           accept slash and backslash as directory separator on WIN32 and
140           Cygwin ports
141
142 2007-01-28 Raphael Neider <rneider AT web.de>
143
144         * src/pic16/devices.inc,
145         * device/include/pic16/pic18f[24][23]21.h,
146         * device/include/pic16/pic18fregs.h,
147         * device/lib/pic16/libdev/pic18f[24][23]21.c,
148         * device/lib/pic16/pics.all: added support for the 18f[24][23]21 family
149         * device/lib/pic16/libio/adc.ignore,
150         * device/lib/pic16/libio/i2c.ignore,
151         * device/lib/pic16/libio/usart.ignore: do not build I/O lib for new
152           family, as gputils do not yet support the devices
153         * device/lib/pic16/Makefile.subdir: ignore errors on install
154         * support/scripts/inc2h-pic16.pl: script to generate pic16 device
155           headers and libraries from gputils .inc files
156
157 2007-01-26 Paul Stoffregen <paul AT pjrc.com>
158
159         * doc/sdccman.lyx: add printf_fast_f precision limitation note
160
161 2007-01-26 Paul Stoffregen <paul AT pjrc.com>
162
163         * doc/sdccman.lyx: add printf benchmarks
164
165 2007-01-25 Paul Stoffregen <paul AT pjrc.com>
166
167         * device/lib/printf_fast.c: fix %c, char promoted to int
168         * device/lib/printf_tiny.c: fix %c, char promoted to int
169
170 2007-01-25 Paul Stoffregen <paul AT pjrc.com>
171
172         * device/lib/printf_fast.c: fix float overflow check, bug #1525093
173
174 2007-01-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
175
176         * support/regression/tests/swap.c: 64 bit hosts failed
177         * doc/sdccman.lyx: added preliminary mcs51 printf feature matrix
178
179 2007-01-25 Raphael Neider <rneider AT web.de>
180
181         * src/pic/pcode.c (sameBank,FixRegisterBanking): optimize banksels
182           based on absolute register address, patch by Alex Blond
183
184 2007-01-22 Raphael Neider <rneider AT web.de>
185
186         * src/pic/glue.c (pic14emitRegularMap): mark initialized symbols as
187           emitted, do not emit them again...
188
189 2007-01-22 Raphael Neider <rneider AT web.de>
190
191         * src/regression/bank1.c, src/regression/compare6.c,
192           src/regression/add.c: cosmetic changes
193         * src/pic/pcode.h: moved GPTRTAG_* here from gen.c
194         * src/pic/gen.c: fixed global zero and one,
195           (aopForSym): removed unued code,
196           (aopGet): assert aop is defined, check and use `index' of
197             pCodeImmd operands (fixes #1630908),
198         * src/pic/pcode.c (get_op): added output of generic pointer tag,
199           (register_reassign): prevent accidental register unification,
200           (ReuseReg): cosmetic changes (also above)
201         * src/pic/glue.c (pic14_constructAbsMap,pic14emitRegularMap,
202           pic14emitStaticSeg): do not emit initialized data,
203           (printIval*): replaced with working versions,
204           (pic14createInterruptVect,picglue): use idata for initialized data,
205             now init data should work in all modules (not only main()),
206         * device/lib/pic/libsdcc/idata.c: NEW, handle initialized data
207
208 2007-01-21 Borut Razem <borut.razem AT siol.net>
209
210         * sim/ucsim/configure.in: introduced macro DD_COPT_NO_IGNORE,
211           use -fPIC or -fpic if they are supported and not ignored
212         * src/SDCCval.c: fixed bug introduced by me in rev. #4577
213         * support/cpp2/libcpp/lex.c: fixed gcc 4.1.1 warnings
214
215 2007-01-20 Borut Razem <borut.razem AT siol.net>
216
217         * src/SDCC.lex, src/SDCCmain.c, sdc/SDCCglobl.h, doc/sdccman.lyx:
218           implemented RFE #1470316: allow "$" in variable names
219
220 2007-01-20 Raphael Neider <rneider AT web.de>
221
222         * device/include/pic/pic14regs.h: reverted accidental wipe of the file
223
224 2007-01-20 Raphael Neider <rneider AT web.de>
225
226         * device/lib/pic/libdev/devices.txt: device list for mkall.sh
227         * device/lib/pic/libdev/mkall.sh: script to rebuild all device libs
228         * device/lib/pic/libdev/pic14ports.txt: device PORT specifications
229         * support/scripts/inc2h.pl: fixed major .inc parsing bugs,
230           applied patch from Robert Tate (#1629249) to add PORTs and TRISs
231         * device/lib/pic/libdev/pic*.c,
232         * device/include/pic/pic*.h: regenerated with enhanced inc2h.pl
233         * device/lib/pic/libdev/Makefile.in: show progress
234
235 2007-01-19 Bernhard Held <bernhard AT bernhardheld.de>
236
237         * doc/sdccman.lyx: updated "configure options" for autoconf 2.6
238         * support/scripts/sdcc_cygwin_mingw32,
239         * support/scripts/sdcc_mingw32,
240         * support/scripts/build.mak: replaced --datadir by --datarootdir for
241         conformance with autoconf 2.6
242
243 2007-01-19 Raphael Neider <rneider AT web.de>
244
245         * src/pic/device.c (register_map): fixed list construction
246         * src/pic/gen.c (genDivOneByte,genModOneByte): accept result > 1 byte,
247           (genMod): removed case for genModbits,
248           (genModbits): removed as now unused/unimplemented
249         * src/pic/glue.c (picglue): prevent name clash with sources 'init.c'
250
251 2007-01-18 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
252
253         * support/regression/tests/swap.c: added in response to #1638622
254         * doc/sdccman.lyx: synced version, minor changes
255
256 2007-01-18 Borut Razem <borut.razem AT siol.net>
257
258         * SDCClabel.c: fixed bug #1638651: wrong linenumber presented in warning,
259           thanks to Gunther Jehle
260         * src/asm.c: don't die if the file drfined in #line couldn't be opened
261         * src/SDCC.lex, src/SDCCglobal.h, src/SDCCicode.c, src/SDCCsymt.c,
262           src/SDCCval.c: removed redundant definitions of currFname and mylineno;
263           use filename in lineno instead.
264         * SDCCast.c: removed MSVC warning C4018: '==' : signed/unsigned mismatch,
265           print the file name in ast_print()
266
267 2007-01-18 Borut Razem <borut.razem AT siol.net>
268
269         * support/Util/dbuf_string.c: removed (PTR) cast since it is not
270           defined in MSVC
271         * src/SDCC.lex: stringLiteral() returns const char pointer,
272           EOF detection in stringLiteral(), fixed asmbuf memory leak,
273           fixed column counting
274         * src/SDCCval.[ch]: constVal(), value *strVal() and charVal()
275           accept const char pointer as parameter
276         * src/SDCCdwarf2.c: corrected buffer size
277
278 2007-01-17 Borut Razem <borut.razem AT siol.net>
279
280         * support/Util/dbuf_string.c: fixed for amd64
281
282 2007-01-15 Borut Razem <borut.razem AT siol.net>
283
284         * src/pic16/ralloc.c, src/pic/ralloc.c, src/SDCC.y:
285           removed terminal symbol ELIPSIS, since it was never generated by the
286           lexer and it was wrongly used in parameter_identifier_list rule
287
288 2007-01-15 Raphael Neider <rneider AT web.de>
289
290         * doc/sdccman.lyx: updated PIC14/16 command line args, updated PIC14
291             code page and data banking description
292         * src/pic/genarith.c,
293         * src/pic/gen.h: removed bit arithmetic functions,
294             updated exit(1) to exit(EXIT_FAILURE)
295         * device/lib/pic16/libsdcc/stack/stack.S: default to 256 byte stack
296         * device/include/pic16/pic18f2455.h,
297         * device/lib/pic16/libdev/pic18f2455.c: added PORTD, LATD, LATE,
298             TRISD and TRISE, fixed/added some bit names
299         * device/lib/pic16/libdev/pic18f{2550,4550,4455}.c,
300         * device/include/pic16/pic18f{2550,4550,4455}.h: simply include
301             updated pic18f2455.{c,h} instead of duplicating them
302
303 2007-01-14 Borut Razem <borut.razem AT siol.net>
304
305         * as/mcs51/asnoice.c, as/hc08/asnoice.c: fixed bug #1447412:
306           Cannot debug files that contain spaces in the path name
307           by converting spaces in asm file name to underscores
308
309 2007-01-13 Borut Razem <borut.razem AT siol.net>
310
311         * doc/sdccman.lyx: fixed format errors
312
313 2007-01-10 Borut Razem <borut.razem AT siol.net>
314
315         * src/SDCC.lex, src/SDCCmain.c: fixed bug #1631895:
316           codeseg/constseg #pragma fail
317         * suppoprt/cpp2/Makefile.bcc: reenable Borland C compilation
318         * suppoprt/cpp2/configure.in, suppoprt/cpp2/libcpp/lex.c,
319           suppoprt/cpp2/Makefile.in, suppoprt/cpp2/sdcpp-opts,
320           suppoprt/cpp2/sdcpp.[ch]: house cleaning
321
322 2007-01-09 Borut Razem <borut.razem AT siol.net>
323
324         * get rid of diagnistic.[ch], pretty-print.[ch],
325           c-pretty-print.[ch], ... used just for error, warning, ...
326           message formatting
327         * suppoprt/cpp2/pretty-print.[ch], suppoprt/cpp2/diagnostic.[ch],
328           suppoprt/cpp2/diagnostic.def, suppoprt/cpp2/input.h,
329           suppoprt/cpp2/pretty-print.[ch]:
330           removed
331         * suppoprt/cpp2/Makefile.in, suppoprt/cpp2/opts.c,
332           suppoprt/cpp2/sdcpp-opts.c, suppoprt/cpp2/sdcpp.[ch],
333           suppoprt/cpp2/sdcpp.dsp:
334           changed
335
336 2007-01-08 Maarten Brock <sourceforge.brock AT dse.nl>
337
338         * device/lib/printf_large.c (output_float): removed recursion,
339           use smaller buffer on stack for mcs51,
340           fixed bug printing 1.96
341         * support/regression/tests/snprintf.c: added test
342
343 2007-01-07 Borut Razem <borut.razem AT siol.net>
344
345         * use dynamic memory buffers instead temporary files
346         * support/Util/dbuf_string.c, support/Util/dbuf_string.h:
347           added
348         * src/Makefile.in, src/SDCC.lex, src/SDCCast.c, src/SDCCast.h,
349           src/SDCCcse.c, src/SDCCglobl.h, src/SDCCglue.c, src/SDCCglue.h,
350           src/SDCCicode.c, src/SDCCicode.h, src/SDCCmain.c, src/SDCCmem.c,
351           src/SDCCmem.h, src/SDCCpeeph.c, src/SDCCpeeph.h, src/SDCCsymt.c,
352           src/SDCCsymt.h, src/SDCCutil.c, src/asm.c, src/asm.h, src/avr/gen.c,
353           src/avr/main.c, src/ds390/gen.c, src/ds390/main.c, src/hc08/gen.c,
354           src/hc08/main.c, src/izt/gen.c, src/mcs51/gen.c, src/mcs51/main.c,
355           src/pic/device.c, src/pic/gen.c, src/pic/glue.c, src/pic/main.c,
356           src/pic/ralloc.c, src/pic16/gen.c, src/pic16/glue.c,
357           src/pic16/main.c, src/pic16/ralloc.c, src/port.h, src/src.dsp,
358           src/xa51/gen.c, src/xa51/main.c, src/z80/gen.c, src/z80/main.c,
359           support/Util/dbuf.c, support/Util/dbuf.h:
360           modified
361         * .version, sdcc.spec: bumped version to 2.6.4
362
363 2007-01-07 Maarten Brock <sourceforge.brock AT dse.nl>
364
365         * src/port.h: added TARGET_Z80_LIKE macro
366         * src/SDCCmain.c (linkEdit): use TARGET_Z80_LIKE,
367           output PSEG location if --xram-loc or --xstack-loc was used
368         * as/link/mcs51/lkarea.c (lnksect2): set segment address afterwards
369
370 2007-01-07 Maarten Brock <sourceforge.brock AT dse.nl>
371
372         * as/as_gbz80.dsp, as/z80/as_gbz80.dsp,
373         * as/as_z80.dsp,   as/z80/as_z80.dsp,
374         * as/asx8051.dsp,  as/mcs51/asx8051.dsp,
375         * sdcc.dsw: moved project files into subdir
376         * as/hc08/as_hc08.dsp,
377         * as/hc08/Makefile.bcc,
378         * as/hc08/Makefile.in,
379         * as/mcs51/Makefile.bcc,
380         * as/mcs51/Makefile.in,
381         * as/z80/Makefile.bcc,
382         * as/z80/Makefile.in,
383         * as/link/mcs51/Makefile.bcc: use as/strcmpi.c
384         * as/hc08/asm.h,
385         * as/mcs51/asm.h,
386         * as/z80/asm.h: added as_strcmpi() and as_strncmpi() prototypes
387         * as/hc08/asmain.c,
388         * as/hc08/assym.c,
389         * as/mcs51/asmain.c,
390         * as/mcs51/assym.c,
391         * as/z80/assym.c: removed include "strcmpi.h"
392         * as/hc08/strcmpi.c,
393         * as/hc08/strcmpi.h,
394         * as/mcs51/strcmpi.c,
395         * as/mcs51/strcmpi.h,
396         * support/Util/strcmpi.c,
397         * support/Util/strcmpi.h: removed files
398         * as/strcmpi.c: added as_strncmpi()
399
400 2007-01-05 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
401
402         * sdcc.dsw: Added some dependencies on project config.dsp
403
404 2007-01-05 Maarten Brock <sourceforge.brock AT dse.nl>
405
406         * as/link/mcs51/lkarea.c (lnkarea2, lnksect2): replaced [di]seg_ap->a_addr
407           with [di]ram_start to fix a regresion
408
409 2007-01-03 Bernhard Held <bernhard AT bernhardheld.de>
410
411         * configure.in: added missing mcs51 in status output
412         * Makefile.in: add support/regression to SDCC_EXTRA to distclean this
413         directory
414         * debugger/mcs51/clean.mk (distclean): remove config.h
415         * src/clean.mk (clean): remove SDCCy.c, SDCCy.h, SDCClex.c
416         * support/cpp2/Makefile.in (clean): remove s-options, optionlist,
417         options.h, s-options-h and options.c
418         * support/cpp2/clean.mk: unused, removed
419         * Makefile.common.in,
420         * main_in.mk,
421         * as/Makefile.in,
422         * as/hc08/Makefile.in,
423         * as/hc08/clean.mk,
424         * as/mcs51/Makefile.in,
425         * as/mcs51/clean.mk,
426         * as/z80/clean.mk,
427         * as/z80/conf.mk,
428         * as/z80/Makefile.in,
429         * as/z80/clean.mk,
430         * as/link/Makefile.in,
431         * as/link/hc08/Makefile.in,
432         * as/link/hc08/clean.mk,
433         * as/link/mcs51/Makefile.in,
434         * as/link/mcs51/clean.mk,
435         * as/link/z80/Makefile.in,
436         * as/link/z80/clean.mk,
437         * as/link/z80/conf.mk,
438         * debugger/mcs51/Makefile.in,
439         * debugger/mcs51/clean.mk,
440         * device/include/Makefile.in,
441         * device/lib/Makefile.in,
442         * device/lib/mcs51/Makefile.in,
443         * device/lib/pic/Makefile.in,
444         * device/lib/pic/Makefile.common.in,
445         * device/lib/pic/Makefile.subdir,
446         * device/lib/pic/Makefile.rules,
447         * device/lib/pic16/libio/Makefile.in,
448         * device/lib/pic16/Makefile.subdir,
449         * device/lib/pic16/libdev/Makefile.in,
450         * device/lib/pic16/Makefile.rules,
451         * device/lib/pic16/Makefile.common.in,
452         * sim/ucsim/avr.src/Makefile.in,
453         * sim/ucsim/main_in.mk,
454         * sim/ucsim/cmd.src/Makefile.in,
455         * sim/ucsim/doc/Makefile.in,
456         * sim/ucsim/gui.src/Makefile.in,
457         * sim/ucsim/gui.src/obsolete/portmon.src/Makefile.in,
458         * sim/ucsim/gui.src/serio.src/Makefile.in,
459         * sim/ucsim/hc08.src/Makefile.in,
460         * sim/ucsim/libltdl/Makefile.in,
461         * sim/ucsim/s51.src/Makefile.in,
462         * sim/ucsim/sim.src/Makefile.in,
463         * sim/ucsim/sim.src/conf.mk,
464         * sim/ucsim/xa.src/Makefile.in,
465         * sim/ucsim/z80.src/Makefile.in,
466         * src/Makefile.in,
467         * src/clean.mk,
468         * src/port.mk,
469         * support/cpp2/Makefile.in,
470         * support/librarian/Makefile.in,
471         * support/librarian/clean.mk,
472         * support/makebin/Makefile.in,
473         * support/makebin/clean.mk,
474         * support/packihx/Makefile.in,
475         * support/regression/Makefile.in,
476         * support/regression/ports/ds390/spec.mk,
477         * support/regression/ports/gbz80/spec.mk,
478         * support/regression/ports/hc08/spec.mk,
479         * support/regression/ports/mcs51/spec.mk,
480         * support/regression/ports/mcs51-large/spec.mk,
481         * support/regression/ports/mcs51-medium/spec.mk,
482         * support/regression/ports/mcs51-xstack-auto/spec.mk,
483         * support/regression/ports/pic14/spec.mk,
484         * support/regression/ports/pic16/spec.mk,
485         * support/regression/ports/mcs51-stack-auto/spec.mk,
486         * support/regression/ports/ucz80/spec.mk,
487         * support/regression/ports/xa51/spec.mk,
488         * support/regression/ports/z80/spec.mk: fixed for autoconf 2.6x by
489         adding a slash after $(top_builddir) and/or adding @datarootdir@
490         * configure.in,
491         * debugger/mcs51/configure.in,
492         * device/lib/pic/configure.in,
493         * device/lib/pic16/configure.in,
494         * sim/ucsim/configure.in,
495         * support/cpp2/configure.in,
496         * support/packihx/configure.in: changed AC_PREREQ to 2.60
497         * configure,
498         * debugger/mcs51/configure,
499         * device/lib/pic/configure,
500         * device/lib/pic16/configure,
501         * sim/ucsim/configure,
502         * support/cpp2/configure,
503         * support/packihx/configure: generated with autoconf 2.60
504
505 2007-01-02 Maarten Brock <sourceforge.brock AT dse.nl>
506
507         * as/link/hc08/lkihx.c (newArea),
508         * as/link/hc08/lkrloc.c: renamed newArea() to ihxNewArea()
509
510 2007-01-02 Borut Razem <borut.razem AT siol.net>
511
512         * doc/sdccman.lyx: documented #pragma sdcc_hash
513         * support/cpp2/sdcpp.c: allow_naked_hash (value of #pragma sdcc_hash)
514           initialized to 0
515         * support/cpp2/c-ppoutput.c: fixed warning: no newline at end of file
516
517 2007-01-01 Bernhard Held <bernhard AT bernhardheld.de>
518
519         * src/SDCCast.c (createDo): backPatchLabels() needs falseLabel in
520         empty 'while'-loop to work correctly, see regression test 'while.c'
521         * support/regression/tests/while.c: added
522
523 2007-01-01 Borut Razem <borut.razem AT siol.net>
524
525         * support/cpp2/libcpp/directives.c, support/cpp2/libcpp/identifiers.c,
526           support/cpp2/libcpp/init.c, support/cpp2/libcpp/sdcpp-opts.c,
527           support/cpp2/libcpp/sdcpp.c:
528           sdcpp specific pragma/directive/option handling moved to sdcpp.c
529         * doc/sdccman.lyx: reference to the GCC 4.1.1 CPP Manual
530         * support/cpp2/libcpp/mkdeps.c: synchronized with GCC CPP 4.1.1
531
532 2006-12-31 Borut Razem <borut.razem AT siol.net>
533
534         * SDCPP synchronized with GCC CPP release version 4.1.1,
535           currently the latest release:
536         * support/cpp2/libcpp, support/cpp2/libcpp/include,
537           support/cpp2/libcpp/include/cpp-id-data.h
538           support/cpp2/libiberty/fopen_unlocked.c
539           support/cpp2/libiberty/md5.c
540           support/cpp2/md5.h
541           support/cpp2/opt-functions.awk
542           support/cpp2/opt-gather.awk
543           support/cpp2/optc-gen.awk
544           support/cpp2/opth-gen.awk:
545           added
546         * support/cpp2/Makefile.in, support/cpp2/auto-host_vc_in.h,
547           support/cpp2/c-incpath.c, support/cpp2/c-incpath.h,
548           support/cpp2/c-ppoutput.c, support/cpp2/c-pretty-print.c,
549           support/cpp2/c-pretty-print.h, support/cpp2/cppdefault.c,
550           support/cpp2/cppdefault.h, support/cpp2/diagnostic.c,
551           support/cpp2/diagnostic.h, support/cpp2/except.h,
552           support/cpp2/hwint.h, support/cpp2/input.h,
553           support/cpp2/intl.h, support/cpp2/move-if-change,
554           support/cpp2/opts.c, support/cpp2/opts.h,
555           support/cpp2/output.h, support/cpp2/prefix.c,
556           support/cpp2/prefix.h, support/cpp2/pretty-print.c,
557           support/cpp2/pretty-print.h, support/cpp2/sdcpp-opts.c,
558           support/cpp2/sdcpp.c, support/cpp2/sdcpp.dsp,
559           support/cpp2/sdcpp.h, support/cpp2/sdcpp.opt,
560           support/cpp2/sdcppa.dsp, support/cpp2/symcat.h,
561           support/cpp2/version.c:
562           modified
563         * support/cpp2/libcpp/charset.c, support/cpp2/libcpp/directives.c,
564           support/cpp2/libcpp/errors.c, support/cpp2/libcpp/expr.c,
565           support/cpp2/libcpp/files.c, support/cpp2/libcpp/identifiers.c,
566           support/cpp2/libcpp/include/cpplib.h, support/cpp2/libcpp/include/line-map.h,
567           support/cpp2/libcpp/include/mkdeps.h, support/cpp2/libcpp/include/symtab.h,
568           support/cpp2/libcpp/init.c, support/cpp2/libcpp/internal.h,
569           support/cpp2/libcpp/lex.c, support/cpp2/libcpp/line-map.c,
570           support/cpp2/libcpp/macro.c, support/cpp2/libcpp/mkdeps.c,
571           support/cpp2/libcpp/symtab.c, support/cpp2/libcpp/system.h,
572           support/cpp2/libcpp/traditional.c, support/cpp2/libcpp/ucnid.h,
573           support/cpp2/libiberty/hashtab.c, support/cpp2/libiberty/hashtab.h:
574           moved
575         * support/cpp2/cppcharset.c, support/cpp2/cpperror.c,
576           support/cpp2/cppexp.c, support/cpp2/cppfiles.c,
577           support/cpp2/cpphash.c, support/cpp2/cpphash.h,
578           support/cpp2/cppinit.c, support/cpp2/cpplex.c,
579           support/cpp2/cpplib.c, support/cpp2/cpplib.h,
580           support/cpp2/cppmacro.c, support/cpp2/cpptrad.c,
581           support/cpp2/cppucnid.h, support/cpp2/hashtab.c,
582           support/cpp2/hashtab.h, support/cpp2/hashtable.c,
583           support/cpp2/hashtable.h, support/cpp2/line-map.c,
584           support/cpp2/line-map.h, support/cpp2/mkdeps.c,
585           support/cpp2/mkdeps.h, support/cpp2/options_vc_in.c,
586           support/cpp2/options_vc_in.h, support/cpp2/opts.sh,
587           support/cpp2/system.h:
588           deleted / moved
589
590 2006-12-31 Borut Razem <borut.razem AT siol.net>
591
592         * configure.in, configure: fixed bug #1538756: configure dies if bison
593           and flex are not installed, 2nd try
594
595 2006-12-30 Bernhard Held <bernhard AT bernhardheld.de>
596
597         * src/mcs51/peeph.def: renamed rule 400 to 500, moved rule 253.x to
598         400.x for better code in RFE 899102
599
600 2006-12-30 Bernhard Held <bernhard AT bernhardheld.de>
601
602         * src/SDCCpeeph.c (deadMove),
603         * src/port.h,
604         * src/mcs51/peep.h: renamed 'op' by 'reg'
605         * src/mcs51/peep.c (isFunc, isCallerSaveFunc): added,
606         (scan4op): small change for removeDeadMove(), added support for
607         'callee saves' and/or PACLL function calls,
608         (removeDeadMove): added, removes superflous 'mov r%1,%2',
609         (removeDeadPopPush): renamed from mcs51DeadMove(), common parts
610         left in new dispatcher mcs51DeadMove()
611         (mcs51DeadMove): dispatcher for removeDeadPopPush() and new
612         removeDeadMove()
613         * src/mcs51/peeph.def: added rule 301 removing superflous 'mov r%1,%2'
614
615 2006-12-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
616
617         * support/cpp2/options_vc_in.h, support/cpp2/options_vc_in.c,
618           support/cpp2/sdcppa.dsp: create 'options.h' and 'options.c' under MSVC.
619
620 2006-12-30 Borut Razem <borut.razem AT siol.net>
621
622         * support/cpp2/spacs.h: deleted from svn
623         * configure.in, configure: fixed bug #1538756: configure dies if bison
624           and flex are not installed
625
626 2006-12-29 Maarten Brock <sourceforge.brock AT dse.nl>
627
628         * src/z80/gen.c (assignResultValue): fixed bug when registers overlap,
629           with this z80 passes printf float test when enabled
630         * support/regression/tests/bug1057979.c: typo disabled ds390 float test
631
632 2006-12-28 Borut Razem <borut.razem AT siol.net>
633
634         * support/cpp2/config.in, support/cpp2/configure.in,
635           support/cpp2/configure, support/cpp2/Makefile.in:
636           fix for the solaris build
637
638 2006-12-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
639
640         * src/SDCC.y (type_specifier2, pointer),
641         * src/SDCCsymt.h,
642         * src/SDCCsymt.c (mergeSpec, checkSClass),
643         * support/Util/SDCCerr.c,
644         * support/Util/SDCCerr.h: Parse and validate the restrict keyword
645         * support/valdiag/valdiag.py: Allow test cases to specify
646           required language standard
647         * support/valdiag/tests/restrict.c: New file to test restrict keyword
648         * support/valdiag/tests/tentdecl.c: Supress empty source file error
649
650 2006-12-27 Borut Razem <borut.razem AT siol.net>
651
652         * support/cpp2/cppmain.c, support/cpp2/mbchar.[ch]: removed
653         * support/cpp2/libiberty/Makefile.in, support/cpp2/libiberty/sdcpp.dsp:
654           mbchar removed
655         * support/cpp2/libiberty/getpwd.c, support/cpp2/sdcpp.h:
656           fixed for borland C
657         * support/cpp2/libiberty/Makefile.bcc: updated
658         * src/pic16/main.c: fixed #pragma udata handling
659         * src/mcs51/mcs51.dsp: added peep.[ch] to the project
660
661 2006-12-26 Bernhard Held <bernhard AT bernhardheld.de>
662
663         * src/SDCCpeeph.c: made labelHashEntry global,
664         made pcDistance, FBYNAME static,
665         (pcDistance): made static, use isComment and isLabel,
666         (deadMove): added,
667         (getLabelRef): added, extracted from labelRefCount(),
668         (labelRefCount): use new getLabelRef(),
669         (callFuncByName): made static, added deadMove,
670         use isComment and isLabel,
671         (newPeepRule): made static, set isLabel,
672         (isLabelDefinition): added parameter isPeepRule to allow '%' in
673         labels from peephole rules,
674         (buildLabelRefCountHash): speed up by running isLabelDefinition() only
675         when isComment or isLabel is set
676         * src/SDCCpeeph.h: added "isLabel" and "visited" to struct lineNode,
677         added labelHashEntry, isLabelDefinition, labelHash and getLabelRef
678         to make them global
679         * src/mcs51/peep.h: added
680         * src/mcs51/peep.c: added, implements mcs51DeadMove()
681         * src/port.h: added peep->deadMove to port structure
682         * src/mcs51/main.c: initialize peep->deadMove with mcs51DeadMove
683         * src/mcs51/peeph.def: renumbered rule 300 to 400, added new rule 300
684         deadMove, finally removed no. 1 and 2
685         * src/mcs51/gen.c,
686         * src/pic/gen.c,
687         * src/z80/gen.c,
688         * src/z80/ralloc.c,
689         * src/pic16/gen.c,
690         * src/ds390/gen.c,
691         * src/hc08/gen.c: mark lines with isComment or isLabel
692         * sim/ucsim/s51.src/uc390hw.cc: don't waist 65535 ticks before CKRDY
693         * .version,
694         * sdcc.spec: bumped version to 2.6.3
695
696 2006-12-26 Borut Razem <borut.razem AT siol.net>
697
698         * support/cpp2/Makefile.in: added dependency on options.h
699         * configure: regenerated
700         * support/cpp2/sdcpp.opt, support/cpp2/move-if-change: svn:eol-style native
701         * support/cpp2/Makefile.in: added vasprintf.c
702
703 2006-12-25 Borut Razem <borut.razem AT siol.net>
704
705         * SDCPP synchronized with GCC CPP release version 3.4.6,
706           the latest release before 4.x:
707         * support/cpp2/Makefile.in, support/cpp2/config.h,
708           support/cpp2/configure, support/cpp2/configure.in,
709           support/cpp2/cppdefault.c, support/cpp2/cppdefault.h,
710           support/cpp2/cpperror.c, support/cpp2/cppexp.c,
711           support/cpp2/cppfiles.c, support/cpp2/cpphash.c,
712           support/cpp2/cpphash.h, support/cpp2/cppinit.c,
713           support/cpp2/cpplex.c, support/cpp2/cpplib.c,
714           support/cpp2/cpplib.h, support/cpp2/cppmacro.c,
715           support/cpp2/cpptrad.c, support/cpp2/except.h,
716           support/cpp2/hashtable.c, support/cpp2/hashtable.h,
717           support/cpp2/hwint.h, support/cpp2/intl.h,
718           support/cpp2/line-map.c, support/cpp2/line-map.h,
719           support/cpp2/mkdeps.c, support/cpp2/mkdeps.h,
720           support/cpp2/output.h, support/cpp2/prefix.c,
721           support/cpp2/prefix.h, support/cpp2/sdcpp.dsp,
722           support/cpp2/system.h, support/cpp2/version.c:
723           modified
724         * support/cpp2/c-incpath.c, support/cpp2/c-incpath.h,
725           support/cpp2/c-ppoutput.c, support/cpp2/c-pretty-print.c,
726           support/cpp2/c-pretty-print.h, support/cpp2/cppcharset.c,
727           support/cpp2/cppucnid.h, support/cpp2/diagnostic.c,
728           support/cpp2/diagnostic.def, support/cpp2/diagnostic.h,
729           support/cpp2/hashtab.c, support/cpp2/hashtab.h,
730           support/cpp2/input.h, support/cpp2/libiberty/getpwd.c,
731           support/cpp2/libiberty/vasprintf.c, support/cpp2/libiberty/xmemdup.c,
732           support/cpp2/move-if-change, support/cpp2/opts.c,
733           support/cpp2/opts.h, support/cpp2/opts.sh,
734           support/cpp2/pretty-print.c, support/cpp2/pretty-print.h,
735           support/cpp2/sdcpp.opt, support/cpp2/sdcpp-opts.c,
736           support/cpp2/win32, support/cpp2/win32/dirent.c,
737           support/cpp2/win32/dirent.h:
738           added
739         * support/cpp2/sdcpp.c: renamed from sdcppmain.c
740         * support/cpp2/sdcpp.h: renamed from sdcc.h
741         * sdcppinit.c: deleted
742
743 2006-12-23 Borut Razem <borut.razem AT siol.net>
744
745         * support/cpp2/cpphash.h, support/cpp2/cpplex.c,
746           support/cpp2/cpplib.[ch], support/cpp2/sdcppinit.c, doc/sdccman.lyx,
747           preproc.c: an other try to fix bug #982435: introduced
748           -pedantic-parse-number command line option and pedantic_parse_number
749           pragma
750
751 2006-12-21 Maarten Brock <sourceforge.brock AT dse.nl>
752
753         * as/link/mcs51/lkarea.c (lnkarea2): handle absolute areas, restructured
754            BSEG handling,
755           (lnksect2): use --data-loc and --idata-loc as lower bound for ramstart,
756            corrected overlayed areax addresses, warn about memory overlaps
757         * as/mcs51/asmain.c (asmbl): create a new area for every .org directive
758         * src/avr/main.c,
759         * src/ds390/main.c,
760         * src/hc08/main.c,
761         * src/mcs51/main.c,
762         * src/pic16/main.c,
763         * src/pic/main.c,
764         * src/xa51/main.c,
765         * src/z80/main.c,
766         * src/port.h: added xabs_name and iabs_name
767         * src/SDCCglue.c (emitRegularMap): allocate for absolutes with initializer
768           (glue, emitMaps): create and emit maps d_abs and i_abs
769         * src/SDCCglue.h: cosmetic changes
770         * src/SDCCmain.c (setDefaultOptions): idata can start below 0x80
771         * src/SDCCmem.h,
772         * src/SDCCmem.c (initMem): added x_abs, i_abs and d_abs
773           (allocDefault): put absolute, initialized globals in them
774         * support/regression/tests/absolute.c: added absolute bdata test
775         * device/lib/printf_large.c (output_float): moved fpBuffer to stack/xdata
776
777 2006-12-20 Borut Razem <borut.razem AT siol.net>
778
779         * support/cpp2/cpphash.h, support/cpp2/cpplex.c: fixed bug #982435
780         * support/regression/tests/preproc.c: renamed from bug-1351710.c,
781           added regression test for bug #982435
782
783 2006-12-18 Borut Razem <borut.razem AT siol.net>
784
785         * src/SDCCutil.c: fixed a bug in (get_pragma_token)
786         * src/pic16/main.c, src/SDCC.lex, src/z80/main.c:
787           small cosmetic changes
788         * src/SDCC.lex: (stringLiteral) fixed bug #1351710
789         * support/regression/tests/bug-1351710.c: added regression test
790
791 2006-12-18 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
792
793         * doc/sdccman.lyx: added the long missed iCode table
794           "<where is figure II?>", added links to wiki
795
796 2006-12-17 Borut Razem <borut.razem AT siol.net>
797
798         * doc/sdccman.lyx, src/pic16/main.c, src/pic/main.c, src/port.h,
799           src/SDCC.lex, src/SDCCutil.[ch], src/z80/main.c,
800           support/Util/SDCCerr.[ch]: removed deprecated pragmas,
801           unified table driven pragma handling, pragma argument type checking
802         * support/Util/dbuf.c: (dbuf_set_size) allow to set size equal to the
803           current one - version 1.1.3
804         * src/SDCCmain.c: (setParseWithComma) substituted brain damaged strtok
805
806 2006-12-13 Raphael Neider <rneider AT web.de>
807
808         * src/pic/device.h: removed AssignedMemory structure and macros
809         * src/pic/device.c: removed global finalMapping (linker assigns
810             memory locations),
811           (register_map): add SFRs to remembered memRanges
812           (addMemRange,isSFR,dump_map,dump_sfr,mapRegister,assignRegister,
813           assignFixedRegisters,assignRelocatableRegisters): removed,
814           (setMaxRAM,validAddress): adapted accordingly,
815           (pic14_hasSharebank,pic14_getSharedStack): only report and use
816             reasonably sized sharebanks,
817         * src/pic/ralloc.c (writeUsedRegs): stripped down (remove?),
818           (allDefsOutOfRange): removed unused code,
819         * src/pic/main.c (_process_pragma): removed memmap/maxram pragma
820             handling
821         * src/pic/pcode.c (register_reassign): removed recursion warning,
822             fired far too often,
823         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap): modified
824             to use existing pic14_stringInSet() to avoid duplicate symbols,
825             tidied up the code a bit,
826           (pic14printLocals): added in symmetry to printExterns, replaces
827             writeUsedRegs more or less,
828           (picglue): call new pic14_printLocals(),
829         * device/include/pic/pic*.h: removed #pragma memmap directives,
830             information gathered from include/pic/pic14devices.txt
831         * support/scripts/inc2h.pl: do not emit #pragma memmap lines
832
833 2006-12-10 Maarten Brock <sourceforge.brock AT dse.nl>
834
835         * device/include/mcs51/C8051F520.h: fixed buggy CPT0MX
836
837 2006-12-11 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
838
839         * device/include/mcs51/cc2430.h: fixed missing ';'
840
841 2006-12-10 Raphael Neider <rneider AT web.de>
842
843         * device/lib/pic16/libc/stdio/vfprintf.c,
844         * device/lib/pic16/libc/stdio/printf_small.c,
845         * device/lib/pic16/libc/stdio/printf_timy.c: pop int from stack for
846           char arguments, as char varargs are cast to int by the caller,
847           hopefully fixes #1604915 (other device libraries are still affected)
848
849 2006-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
850
851         * src/mcs51/ralloc.c (packRegsForAssign),
852         * src/hc08/ralloc.c (packRegsForAssign): fixed bug #1605880
853
854 2006-12-10 Maarten Brock <sourceforge.brock AT dse.nl>
855
856         * device/include/malloc.h: removed init_dynamic_memory
857         * device/lib/malloc.c: made init_dynamic_memory static and automatically
858           call it once from malloc. Also use _sdcc_heap[] from _heap.c
859         * device/lib/_heap.c: new, added, contains _sdcc_heap[]
860         * device/lib/libsdcc.lib,
861         * device/lib/Makefile.in,
862         * support/regression/ports/mcs51-xstack-auto/spec.mk: added _heap.c
863         * doc/sdccman.lyx: documented use of new _heap.c
864         * support/regression/tests/malloc.c: removed init_dynamic_memory
865         * src/cdbFile.c(spacesToUnderscores): new function,
866           (cdbWriteEndFunction, cdbWriteCLine): use spacesToUnderscores, fixes bug
867           1068030
868         * device/include/tinibios.h: removed defines for putchar and getchar
869         * device/lib/ds390/Makefile.in: added putchar.c
870         * device/lib/ds390/putchar.c: new, added, fixes bug 1465671
871
872 2006-12-09 Borut Razem <borut.razem AT siol.net>
873
874         * support/cpp2/sdcc.h: prevent multiple inclusion
875         * support/cpp2/options.h: deleted
876
877 2006-12-08 Borut Razem <borut.razem AT siol.net>
878
879         * support/cpp2/sdcc.h: removed x*alloc() macros
880         * support/cpp2/libiberty.h: uncommented out x*alloc() declarations
881         * support/cpp2/Makefile.bcc, support/cpp2/Makefile.in,
882           support/cpp2/sdcpp.sdc: x*alloc files added to the project
883         * support/cpp2/system.h: moved #include "sdcc.h"
884         * support/cpp2/libiberty/xexit.c, support/cpp2/libiberty/xmalloc.c,
885           support/cpp2/libiberty/xstrdup.c, support/cpp2/libiberty/xstrerror.c:
886           added
887         * support/cpp2/sdcppinit.c: added -isysroot, -fsigned-char,
888           -funsigned-char options
889         * support/cpp2/sdcppmain.c: fixed bug 1611411
890
891 2006-12-07 Borut Razem <borut.razem AT siol.net>
892
893         * support/cpp2/cpplib.c: reverted sdcpp special handling of _Pragma()
894           directive
895
896 2006-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
897
898         * src/SDCCsymt.c (addDecl): fixed bug 1609244
899         * src/SDCCmain.c (linkEdit): fixed bug 1609279
900         * doc/sdccman.lyx,
901         * .version: bumped to 2.6.2 because a) it's been a while
902           b) the linker sources have moved c) the preprocessor is upgraded
903
904 2006-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
905
906         * support/regression/tests/snprintf.c: some checks
907         * lib/src/printf_large.c: %bc: read char instead of int from stack
908
909 2006-12-03 Maarten Brock <sourceforge.brock AT dse.nl>
910
911         * device/include/mcs51/cc2430.h: inserted _XPAGE
912
913 2006-12-02 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
914
915         * device/include/mcs51/cc2430.h: added
916
917 2006-12-02 Maarten Brock <sourceforge.brock AT dse.nl>
918
919         * device/include/asm/default/features.h,
920         * device/include/asm/ds390/features.h,
921         * device/include/mcs51/at89s53.h,
922         * device/include/ser.h,
923         * device/include/ser_ir.h,
924         * device/include/serial.h: changed keywords to double underscore variants,
925           fixes bug 1590261 some more, thanks Steven Borley
926
927 2006-12-01 Raphael Neider <rneider AT web.de>
928
929         * src/pic/pcode.c (register_reassign): do not crash on recursive code
930           but emit warning (recursion is not supported for pic14)
931
932 2006-11-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
933
934         * src/mcs51/peeph.def: added 101.a,b (moves to int/long xdata)
935         * doc/sdccman.lyx: various small changes, acknowledged Sourceforge
936
937 2006-11-30 Raphael Neider <rneider AT web.de>
938
939         * src/pic/device.c (dump_sfr): always emit symbols
940         * src/pic/glue.c (pic14printPublics): fixed typo
941
942 2006-11-30 Raphael Neider <rneider AT web.de>
943
944         * src/pic/device.c (create_pic,ram_map): add memRange entries to PIC
945           (pic14_getSharebankSize, pic14_getSharebankAddress): replaced with
946           (pic14_hasSharebank,pic14_isShared,pic14_allRAMShared,
947            pic14_getSharedStack): NEW, evaluate the memRange entries to locate
948            a sharebank, use a non-shared bank for the stack if none available
949         * src/pic/device.h (struct memRange): added linked list next field,
950           added prototypes for above functions
951         * src/pic/ralloc.c (initStack): handle shared and banked stacks,
952           (typeRegWithIdx): accept fixed and unfixed stack registers
953         * src/pic/pcode.c (pCodeInitRegisters): use new functions to create
954           the stack, handle shared and banked stack (except for WSAVE),
955           (insertBankSel): removed useless optimization (will never fire),
956           (FixRegisterBanking): added optimization for devices with only one
957           possibly aliased bank of memory, like 16f84
958         * src/pic/glue.c (pic14_constructAbsMap): back to udata_ovr, as some
959           devices have no SHAREBANK in the linker script
960         * device/include/pic/pic14devices.txt: documented memmap
961         * device/lib/pic/libdev/Makefile.in: removed --stack-loc again
962
963 2006-11-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
964
965         * src/hc08/gen.c (transferRegReg, loadRegFromAop, forceStackedAop,
966           storeRegToAop, freeAsmop, genPlusIncr, genPlus, genPointerGetSetOfs,
967           genAnd, genOr, genXor, genLeftShiftLiteral, genRightShiftLiteral,
968           genhc08Code): switched most of the D (debug) macros to DD (detailed
969           debug) macros to better control clutter in the generated .asm file.
970         * src/hc08/gen.c: (forceStackedAop, genUminus, genLeftShift,
971           genRightShift): fixed bug with non-constant bit shift stored to
972           a volatile result (SF Open Discussion forum thread #1616749).
973           Single byte case is not yet optimized.
974
975 2006-11-28 Maarten Brock <sourceforge.brock AT dse.nl>
976
977         * device/include/asm/mcs51/features.h,
978         * device/include/malloc.h,
979         * device/include/stdio.h: changed keywords to double underscore variants,
980           fixes bug 1590261
981
982 2006-11-27 Borut Razem <borut.razem AT siol.net>
983
984         * support/cpp2/cppexp.c, support/cpp2/hashtable.h,
985           support/cpp2/Makefile.in, support/cpp2/cppfiles.c,
986           support/cpp2/output.h, support/cpp2/cppinit.c,
987           support/cpp2/cpplib.c, support/cpp2/cpplib.h,
988           support/cpp2/Makefile.bcc, support/cpp2/cpphash.c,
989           support/cpp2/cppdefault.c, support/cpp2/system.h,
990           support/cpp2/cpphash.h, support/cpp2/cpplex.c,
991           support/cpp2/cppdefault.h, support/cpp2/mbchar.c,
992           support/cpp2/prefix.c, support/cpp2/except.h,
993           support/cpp2/hwint.h, support/cpp2/cppmacro.c,
994           support/cpp2/line-map.h, support/cpp2/sdcpp.dsp,
995           support/cpp2/sdcc.h, support/cpp2/mkdeps.c,
996           support/cpp2/version.c, support/cpp2/cppmain.c,
997           support/cpp2/version.h, support/cpp2/hashtable.c,
998           support/cpp2/cpperror.c:
999           synchronized with GCC CPP release version 3.3.6,
1000           the latest where cppmain.c still exists.
1001         * support/cpp2/cpptrad.c, support/cpp2/sdcppmain.c,
1002           support/cpp2/sdcppinit.c: added
1003
1004 2006-11-27 Borut Razem <borut.razem AT siol.net>
1005
1006         * support/cpp2/cpplex.c:
1007           fixed _asm ... _endasm handling bug, introduce with GCC CPP
1008           synchronization
1009         * support/cpp2/cpplib.c: removed definitions of unused variables
1010
1011 2006-11-26 Borut Razem <borut.razem AT siol.net>
1012
1013         * support/cpp2/libiberty.h: commented out x*alloc() declarations
1014           since they are redefined by macros in support/cpp2/sdcc.h
1015         * support/cpp2/sdcc.h: x*alloc macro redefinition
1016
1017 2006-11-25 Borut Razem <borut.razem AT siol.net>
1018
1019         * support/cpp2/cppexp.c, support/cpp2/hashtable.h,
1020           support/cpp2/configure, support/cpp2/Makefile.in,
1021           support/cpp2/cppfiles.c, support/cpp2/output.h,
1022           support/cpp2/cppinit.c, support/cpp2/cpplib.c,
1023           support/cpp2/config.h, support/cpp2/cpplib.h,
1024           support/cpp2/Makefile.bcc, support/cpp2/cpphash.c,
1025           support/cpp2/cppdefault.c, support/cpp2/config.in,
1026           support/cpp2/system.h, support/cpp2/cpplex.c,
1027           support/cpp2/cpphash.h, support/cpp2/mbchar.c,
1028           support/cpp2/cppdefault.h, support/cpp2/prefix.c
1029           support/cpp2/hwint.h, support/cpp2/mbchar.h,
1030           support/cpp2/prefix.h, support/cpp2/cppmacro.c,
1031           support/cpp2/configure.in, support/cpp2/intl.h,
1032           support/cpp2/sdcpp.dsp, support/cpp2/acconfig.h,
1033           support/cpp2/sdcc.h, support/cpp2/mkdeps.c,
1034           support/cpp2/version.c, support/cpp2/cppmain.c,
1035           support/cpp2/ansidecl.h, support/cpp2/libiberty.h,
1036           support/cpp2/hashtable.c, support/cpp2/aclocal.m4,
1037           support/cpp2/cpperror.c,
1038           support/cpp2/libiberty/safe-ctype.c,
1039           support/cpp2/libiberty/safe-ctype.h,
1040           support/cpp2/libiberty/splay-tree.c,
1041           support/cpp2/libiberty/obstack.c,
1042           support/cpp2/libiberty/lbasename.c,
1043           support/cpp2/libiberty/splay-tree.h,
1044           support/cpp2/libiberty/obstack.h:
1045           synchronized with GCC CPP release version 3.2.3,
1046           the latest before integration of cpp into gcc
1047         * support/cpp2/except.h, support/cpp2/line-map.c,
1048           support/cpp2/line-map.h,
1049           support/cpp2/libiberty/hex.c,
1050           support/cpp2/libiberty/concat.c,
1051           support/cpp2/libiberty/filenames.h: added
1052         * support/cpp2/intl.c: deleted
1053
1054 2006-11-24 Borut Razem <borut.razem AT siol.net>
1055
1056         * src/SDCC.y: enabled compilation of empty source file
1057         * support/Util/SDCCerr.[ch]: added sdcc warning 190 -
1058           "ISO C forbids an empty source file"
1059         * device/lib/_startup.c, device/lib/printf_tiny.c: disable warning 190
1060           if all the code is ifdefed out.
1061
1062 2006-11-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1063
1064         * src/hc08/gen.c (genPcall): fix for bug #1601032
1065
1066 2006-11-23 Maarten Brock <sourceforge.brock AT dse.nl>
1067
1068         * device/include/mcs51/c8051f000.h, device/include/mcs51/C8051F000.h,
1069         * device/include/mcs51/c8051f018.h, device/include/mcs51/C8051F018.h,
1070         * device/include/mcs51/c8051f020.h, device/include/mcs51/C8051F020.h,
1071         * device/include/mcs51/c8051f040.h, device/include/mcs51/C8051F040.h,
1072         * device/include/mcs51/c8051f060.h, device/include/mcs51/C8051F060.h,
1073         * device/include/mcs51/c8051f120.h, device/include/mcs51/C8051F120.h,
1074         * device/include/mcs51/c8051f200.h, device/include/mcs51/C8051F200.h,
1075         * device/include/mcs51/c8051f300.h, device/include/mcs51/C8051F300.h,
1076         * device/include/mcs51/c8051f310.h, device/include/mcs51/C8051F310.h,
1077         * device/include/mcs51/c8051f320.h, device/include/mcs51/C8051F320.h,
1078         * device/include/mcs51/c8051f326.h, device/include/mcs51/C8051F326.h,
1079         * device/include/mcs51/c8051f330.h, device/include/mcs51/C8051F330.h,
1080         * device/include/mcs51/c8051f340.h, device/include/mcs51/C8051F340.h,
1081         * device/include/mcs51/c8051f350.h, device/include/mcs51/C8051F350.h,
1082         * device/include/mcs51/c8051f410.h, device/include/mcs51/C8051F410.h:
1083           Renamed to all upper case as per the standard set by SiLabs
1084
1085 2006-11-23 Maarten Brock <sourceforge.brock AT dse.nl>
1086
1087         * device/include/mcs51/C8051F520.h: new, added
1088         * device/include/mcs51/compiler.h: added link about predefined macros
1089
1090 2006-11-23 Raphael Neider <rneider AT web.de>
1091
1092         * src/regression/Makefile: add -L path to fresh library
1093         * src/regression/simulate: emphasize FAILED output
1094         * src/regression/create_stc: output _failures from gpsim
1095         * src/regression/compare4.c,
1096         * src/regression/rotate6.c: fixed char literals,
1097           all compile, all run =8-D
1098
1099         * src/pic/pcode.h: added isPCASMDIR macro
1100         * src/pic/gen.c (genAnd): fixed bit offset
1101         * src/pic/ralloc.c (allocNewDirReg,allocDirReg,allocRegByName,
1102           packBits): unified register numbering schemes,
1103           (newReg): do not insert stack registers into hash table,
1104           (initStack): unpinned pseudo stack, simplified,
1105           (typeRegWithIdx): fixed retrieval of stack registers,
1106         * src/pic/pcode.c (addpCodeComment,sameBank): added,
1107           (pCodeReplace): removed invalid assertion,
1108           (insertPCodeInstruction): fixed newly added labels,
1109           (insertBankSwitch,BankSelect,IsBankChange,DoBankSelect,
1110           FixRegisterBankingInFlow,compareBankFlow,FixBankFlow,
1111           DumpFlow): removed unsed (broken?) code,
1112           (insertBankSel): prevent STATUS from being BANKSELed,
1113           (FixRegisterBanking): rewritten from scratch, implemented generic
1114             optimizations (suppress BANKSELs to same register and to registers
1115             present in all banks),
1116           (AnalyzeBanking): update flow after BANKSELection
1117
1118         * src/pic/glue.c (pic14_constructAbsMap): emit pseudo stack in
1119             sharebank, let linker place it, mark STKxx symbols as emitted
1120
1121 2006-11-21 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1122
1123         * src/regression/arrays.c,
1124         * src/regression/bank1.c,
1125         * src/regression/bool2.c,
1126         * src/regression/compare7.c,
1127         * src/regression/compare8.c,
1128         * src/regression/compare9.c,
1129         * src/regression/compare10.c,
1130         * src/regression/configword.c,
1131         * src/regression/for.c,
1132         * src/regression/mult1.c,
1133         * src/regression/pointer1.c,
1134         * src/regression/rotate6.c,
1135         * src/regression/string1.c,
1136         * src/regression/struct1.c,
1137         * src/regression/Makefile: make PIC14 regression tests run again
1138           (3 fail, 6 won't compile)
1139
1140 2006-11-21 Raphael Neider <rneider AT web.de>
1141
1142         * device/include/pic16/pic18f4550.h,
1143         * device/include/pic16/pic18f4455.h,
1144         * device/lib/pic16/libdev/pic18f4550.c,
1145         * device/lib/pic16/libdev/pic18f4455.c: fixed #1578591 and #1595144
1146         * configure.in: removed superfluous closing bracket
1147
1148 2006-11-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1149
1150         * device/lib/expf.c: Fixed bug 1599523: result of expf(x) is
1151           always positive.
1152
1153 2006-11-21 Raphael Neider <rneider AT web.de>
1154
1155         * src/pic/device.{c,h}: added pic14_getPIC()
1156         * src/pic/gen.c (continueIfTrue,jumpIfTrue): added PIC code,
1157           (genAnd): added PIC code for one case, fixes #1597044
1158         * src/pic/pcode.c (BankSelect): Ohoh, added generic optimization for
1159           SFRs that are present in all banks (e.g., STATUS)
1160
1161 2006-11-20 Raphael Neider <rneider AT web.de>
1162
1163         * src/pic/pcode.c: changed inverted ops for DECFSZ/DECFSZW and
1164           INCFSZ/INCFSZW and declared them as changing Z bit,
1165           (insertPCodeInstruction): correctly invert the above instructions,
1166           fixes #1599333,
1167           (DoBankSelect): don't panic on po_immediates
1168
1169 2006-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1170
1171         * as/link/aslink.h,
1172         * as/link/mcs51/lkihx.c (newArea),
1173         * as/link/mcs51/lkrloc.c: renamed newArea() to ihxNewArea()
1174         * as/link/mcs51/lkihx.c (ihx): output reset vector as start address
1175
1176 2006-11-11 Raphael Neider <rneider AT web.de>
1177
1178         * src/pic/pcode.c (newpCodeOpBit): search SymbolTab for referenced
1179           bitfield symbols, fixes #1579535 (once more...).
1180
1181 2006-11-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1182
1183         * support/regression/generate-cases.py,
1184         * support/regression/fwk/include/testfwk.h,
1185         * support/regression/fwk/lib/testfwk.c: used code pointers,
1186           (about 50kByte less code generated for mcs51)
1187
1188 2006-11-06 Borut Razem <borut.razem AT siol.net>
1189
1190         * debugger/mcs51/acinclude.m4, debugger/mcs51/aclocal.m4,
1191           debugger/mcs51/configure: fixed failed check because the function
1192           rl_function_of_keyseq isn't in Readline 5.2. Thanks to Ilya Goldberg
1193           who submitted the patch for gpsim.
1194         * debugger/mcs51/configure.in: removed the result message
1195         * debugger/mcs51/Makefile.in: fixed the config.status warning
1196           "... seems to ignore the --datarootdir setting"
1197
1198 2006-11-03 Maarten Brock <sourceforge.brock AT dse.nl>
1199
1200         * device/include/mcs51/c8051f020.h,
1201         * device/include/mcs51/c8051f040.h,
1202         * device/include/mcs51/c8051f060.h,
1203         * device/include/mcs51/c8051f120.h: added PS0, fixed bug 1589279
1204         * src/z80/gen.c (gencjneshort),
1205         * src/z80/peeph.def: applied patch 1571373, thanks Philipp Krause
1206
1207 2006-10-31 Borut Razem <borut.razem AT siol.net>
1208
1209         * debugger/mcs51/acinclude.m4, debugger/mcs51/aclocal.m4,
1210           debugger/mcs51/configure: get readline version
1211
1212 2006-10-30 Borut Razem <borut.razem AT siol.net>
1213
1214         * debugger/mcs51/sdcdb.c: replaced hardcoded "/" with DIR_SEPARATOR_STRING
1215         * debugger/mcs51/acinclude.m4, debugger/mcs51/aclocal.m4,
1216           debugger/mcs51/configure: locate readline even when cross compiling
1217         * support/scripts/sdcc.nsi: include readline5.dll into the setup package
1218
1219 2006-10-29 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1220
1221         * device/include/mcs51/serial_IO.h: putchar() and getchar() using
1222           serial port.
1223
1224 2006-10-29 Maarten Brock <sourceforge.brock AT dse.nl>
1225
1226         * device/include/malloc.h,
1227         * device/lib/calloc.c,
1228         * device/lib/free.c,
1229         * device/lib/malloc.c,
1230         * device/lib/realloc.c: moved definition of struct into sources
1231         * support/regression/tests/malloc.c: use void* for init_dynamic_memory()
1232
1233 2006-10-29 Maarten Brock <sourceforge.brock AT dse.nl>
1234
1235         * as/asx8051.dsp: corrected output directories
1236         * as/link/hc08: new directory for hc08 linker
1237         * as/hc08/aslink.h,             as/link/aslink.h,
1238         * as/hc08/aslink.mak,           as/link/hc08/aslink.mak,
1239         * as/hc08/clean.mk,             as/link/hc08/clean.mk,
1240         * as/hc08/link_hc08.dsp,        as/link/hc08/link_hc08.dsp,
1241         * as/hc08/lkaomf51.c,           as/link/hc08/lkaomf51.c,
1242         * as/hc08/lkarea.c,             as/link/hc08/lkarea.c,
1243         * as/hc08/lkdata.c,             as/link/hc08/lkdata.c,
1244         * as/hc08/lkelf.c,              as/link/hc08/lkelf.c,
1245         * as/hc08/lkihx.c,              as/link/hc08/lkihx.c,
1246         * as/hc08/lklibr.c,             as/link/hc08/lklibr.c,
1247         * as/hc08/lkmain.c,             as/link/hc08/lkmain.c,
1248         * as/hc08/lkmem.c,              as/link/hc08/lkmem.c,
1249         * as/hc08/lkrloc.c,             as/link/hc08/lkrloc.c,
1250         * as/hc08/lks19.c,              as/link/hc08/lks19.c,
1251         * as/hc08/Makefile.aslink,      as/link/hc08/Makefile.aslink,
1252         * as/hc08/Makefile.bcc,         as/link/hc08/Makefile.bcc,
1253         * as/hc08/Makefile.in,          as/link/hc08/Makefile.in,
1254         * as/link/hc08/conf.mk,
1255         * configure,
1256         * configure.in,
1257         * Makefile.in,
1258         * sdcc.dsw: moved hc08 linker to as/link/hc08
1259         * as/hc08/lkeval.c,     as/link/mcs51/lkeval.c,     as/link/lkeval.c,
1260         * as/hc08/lkhead.c,     as/link/mcs51/lkhead.c,     as/link/lkhead.c,
1261         * as/hc08/lklex.c,      as/link/mcs51/lklex.c,      as/link/lklex.c,
1262         * as/hc08/lklist.c,     as/link/mcs51/lklist.c,     as/link/lklist.c,
1263         * as/hc08/lknoice.c,    as/link/mcs51/lknoice.c,    as/link/lknoice.c,
1264         * as/hc08/lksym.c,      as/link/mcs51/lksym.c,      as/link/lksym.c,
1265         * as/link/mcs51/aslink.dsp,
1266         * as/link/mcs51/Makefile.in: factored out the common files
1267         * as/hc08/lkstore.c: deleted, use the one already in as/link/
1268         * as/clean.mk: extra cleaning common files
1269         * as/link/mcs51/strcmpi.c,      as/strcmpi.c: moved
1270         * as/link/mcs51/strcmpi.h: deleted, moved protoype to aslink.h
1271         * as/mcs51/asm.h: include sdccconf.h or sdcc_vc.h
1272
1273 2006-10-29 Raphael Neider <rneider AT web.de>
1274
1275         * src/pic/ralloc.c (newReg): create aliases for registers with
1276           multiple names to fix #1579535 and #1584001,
1277           (regWithIdx,dirregWithName): resolve aliases on lookup
1278         * src/pic/pcode.c (DoBankSelect): die with error message on failing
1279           bankselect
1280         * device/lib/pic/libdev/Makefile.in: move pseudo stack down to 0x4f
1281           to prevent build errors on small devices
1282
1283 2006-10-28 Raphael Neider <rneider AT web.de>
1284
1285         * src/pic/gen.c (genFunction,genCall): drop "same code page"
1286           assumption within interrupt handlers, fixes #1584940
1287         * src/pic/glue.c (pic14_constructAbsMap): mark absolute symbols as
1288           "emitted" to avoid emitting them again in udata
1289
1290 2006-10-27 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1291
1292         * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c:
1293         Removed.
1294
1295 2006-10-26 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1296
1297         * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c:
1298         Initialize uart only if SM0 and SM1 are zero.  Also, use flag to turn
1299         on/off CR to CRLF conversion.
1300
1301 2006-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1302
1303         * doc/sdccman.lyx: updated IRQ section
1304
1305 2006-10-24 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1306
1307         * device/lib/serial_io.c: removed
1308         * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c
1309         replacements for serial_io.c
1310
1311 2006-10-24 Maarten Brock <sourceforge.brock AT dse.nl>
1312
1313         * src/z80/main.c (_process_pragma, _parseOptions): fixed bug 1583318
1314
1315 2006-10-24 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1316
1317         * device/lib/serial_io.c: Default putchar() and getchar() for
1318           mcs51 uses serial port.
1319
1320 2006-10-23 Maarten Brock <sourceforge.brock AT dse.nl>
1321
1322         * src/mcs51/gen.c (movc): improved check for 0 and 1, see RFE 1582704
1323
1324 2006-10-23 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1325
1326         * support/regression/ports/mcs51/support.c: smaller
1327         _sdcc_external_startup()
1328         * device/lib/mcs51/crtxclear.asm: don't check high byte of l_PSEG
1329
1330 2006-10-20 Maarten Brock <sourceforge.brock AT dse.nl>
1331
1332         * device/lib/gbz80/crt0.s,
1333         * device/lib/gbz80/crt0_rle.s,
1334         * device/lib/gbz80/div.s,
1335         * device/lib/gbz80/fstubs.s,
1336         * device/lib/gbz80/heap.s,
1337         * device/lib/gbz80/mul.s,
1338         * device/lib/gbz80/putchar.s,
1339         * device/lib/gbz80/stubs.s,
1340         * device/lib/z80/crt0.s,
1341         * device/lib/z80/crt0_rle.s,
1342         * device/lib/z80/div.s,
1343         * device/lib/z80/fstubs.s,
1344         * device/lib/z80/heap.s,
1345         * device/lib/z80/mul.s,
1346         * device/lib/z80/putchar.s,
1347         * device/lib/z80/stubs.s: reverted, I was mistaken
1348
1349 2006-10-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1350
1351         * src/mcs51/peeph.def: peephole 238.x added check for notvolatile
1352         * support/regression/ports/mcs51/support.c: removed race
1353         condition on TI in _putchar allowing to use serial port mode 0
1354
1355 2006-10-20 Borut Razem <borut.razem AT siol.net>
1356
1357         * debugger/mcs51/sdcdb.c: replaced isblank() with isspace()
1358
1359 2006-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
1360
1361         * device/lib/gbz80/crt0.s,
1362         * device/lib/gbz80/crt0_rle.s,
1363         * device/lib/gbz80/div.s,
1364         * device/lib/gbz80/fstubs.s,
1365         * device/lib/gbz80/heap.s,
1366         * device/lib/gbz80/mul.s,
1367         * device/lib/gbz80/putchar.s,
1368         * device/lib/gbz80/stubs.s,
1369         * device/lib/z80/crt0.s,
1370         * device/lib/z80/crt0_rle.s,
1371         * device/lib/z80/div.s,
1372         * device/lib/z80/fstubs.s,
1373         * device/lib/z80/heap.s,
1374         * device/lib/z80/mul.s,
1375         * device/lib/z80/putchar.s,
1376         * device/lib/z80/stubs.s: removed all leading underscores from area names
1377
1378 2006-10-17 Maarten Brock <sourceforge.brock AT dse.nl>
1379
1380         * support/regression/ports/mcs51/support.c: use highest baudrate so the
1381           regression tests are not waiting in the simulator for simulated
1382           transmission of debug output
1383
1384 2006-10-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1385
1386         * device/lib/printf_large.c: slightly smaller
1387         * doc/sdccman.lyx: do not use spaces within html links
1388
1389 2006-10-16 Borut Razem <borut.razem AT siol.net>
1390
1391         * configure.in, configure, sdccconf_in.h, src/SDCCglobal,
1392           debugger/mcs51/Makefile.in, debugger/mcs51/sdcdb.[ch],
1393           debugger/mcs51/aclocal.m4, debugger/mcs51/acinclide.m4,
1394           debugger/mcs51/config.h.in, debugger/mcs51/configure.in,
1395           debugger/mcs51/configure:
1396           [ 1185668 ] add gnu readline support to sdcdb - enabled
1397
1398 2006-10-16 Raphael Neider <rneider AT web.de>
1399
1400         * src/pic/pcode.c (BankSelect): another fix on (partial) BANKSELs,
1401           fixes #1577882, removes close to all banking optimizations
1402
1403 2006-10-15 Maarten Brock <sourceforge.brock AT dse.nl>
1404
1405         * src/SDCCsymt.c (checkSClass): no error for uninitialised absolute
1406           variables in code memory
1407         * support/regression/tests/absolute.c: added test for this
1408
1409 2006-10-15 Raphael Neider <rneider AT web.de>
1410
1411         * src/pic/pcode.c (InsertBankSel): suppress BANKSELs for one bank
1412           devices,
1413           (BankSelect): emit BANKSEL before touching linker-placed regs,
1414           fixes #1570934
1415
1416 2006-10-10 Raphael Neider <rneider AT web.de>
1417
1418         * src/SDCCmain.c (optionsTable): accept --stack-size for PICs,
1419         * src/pic/device.c (pic14_getSharebankSize,pic14_getSharebankAddress),
1420         * src/pic/main.c (_pic14_parseOptions),
1421         * src/pic/main.h: mostly reverted to previous state, now use results
1422             from SDCCmain.c's argument parsing
1423
1424 2006-10-10 Borut Razem <borut.razem AT siol.net>
1425
1426         * debugger/mcs51/break.[ch], debugger/mcs51/cmd.c,
1427           debugger/mcs51/sdcdb.[ch], debugger/mcs51/simi.c:
1428           [ 1185668 ] add gnu readline support to sdcdb -
1429           prepared for READLINE, not enabled yet,
1430           thanks to <tal.bav AT gmail.com>
1431
1432 2006-10-10 Raphael Neider <rneider AT web.de>
1433
1434         * src/pic16/pcode.c (pic16_pCode2str): use isACCESS_BANK macro
1435         * src/pic16/devices.inc,
1436         * device/include/pic16 (pic18f[24]620.h),
1437         * device/include/pic18fregs.h,
1438         * device/lib/pic16/pics.all,
1439         * device/lib/pic16/libdev/pic18f[24]{620,525}.c): added support for
1440             18f2620, 18f4620, 18f2525, and 18f4525 devices, thanks to
1441             Gary Plumbridge and Anton Strobl
1442
1443 2006-10-10 Raphael Neider <rneider AT web.de>
1444
1445         * src/pic/main.c (_pic14_parseOptions): added --stack-loc=NUM and
1446           --stack-siz=NUM options to configure the argument passing stack
1447         * src/pic/main.h: added stackLocation and stackSize to pic14_options_t
1448         * src/pic/device.c (mapRegister): catch out-of-memory SIGSEGVs,
1449           (pic14_getSharebankSize): obey --stack-siz=NUM,
1450           (pic14_getSharebankAddress): obey --stack-loc=NUM
1451
1452 2006-10-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1453
1454         * doc/sdccman.lyx: added to the manual
1455         * doc/figures/ddd_example.png: added (neither pdflatex nor
1456         most browsers seem to like the .eps file)
1457
1458 2006-10-06 Bernhard Held <bernhard AT bernhardheld.de>
1459
1460         * src/SDCCglue.c (tempfileandname): changed un*x tmp search paths
1461         to /tmp and /var/tmp acc. LSB
1462         * src/SDCCast.c (addCast): Fixed bug 1571231: promote in case of
1463         RESULT_TYPE_IFX
1464         * support/regression/tests/onebyte.c: added test
1465
1466 2006-10-05 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1467
1468         * src/mcs51/gen.c: emitcode for "add a,0x%02x" requires only 8 bits.
1469
1470 2006-10-05 Borut Razem <borut.razem AT siol.net>
1471
1472         * partially fixed [ 1570701 ] peephole - not replacing code from multiline macros,
1473           thanks to dfulab:
1474           - sdcc.dsw: changed property eol-style to CRLF
1475           - support/scripts/resource.rc: replaced references to "afxres.h" with "winres.h"
1476
1477 2006-10-04 Raphael Neider <rneider AT web.de>
1478
1479         * device/include/pic/{pic16f84.h,pic16f84a.h},
1480         * device/lib/pic/libdev/{pic16f84.c,pic16f84a.c}: added PORT[AB]_bits
1481           from patch #1522504, thanks to Robas Teodor
1482
1483 2006-10-02 Maarten Brock <sourceforge.brock AT dse.nl>
1484
1485         * as/link/z80/lkarea.c: essentially reverted lnksect() to #4380 which
1486           fixes bug 1566015
1487
1488 2006-10-01 Maarten Brock <sourceforge.brock AT dse.nl>
1489
1490         * src/pic16/glue.c (pic16emitMaps),
1491         * src/pic/glue.c (pic14emitMaps): hopefully fixed bug 1568779
1492         * device/lib/gets.c: fixed bug 1568829,thanks Philipp Krause
1493         * device/lib/pic16/libc/string/memcpypgm2ram.c,
1494         * device/lib/pic16/libc/string/memcpyram2ram.c: fixed bug 1568836, thanks
1495           Philipp Krause
1496         * as/mcs51/asmain.c (asmbl, newdot): fixed problems with absolute areas
1497         * as/link/mcs51/lkmem.c (summary2): reverted, do do count abs segments
1498
1499 2006-09-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1500
1501         * support/librarian/sdcclib.c: Added option -l.
1502         * as/link/mcs51/lkmem.c: don't use absolute segments to compute memory
1503           usage totals.
1504         * device/lib/make51lib.bat: added.  Allows building mcs51 libraries easily
1505           using Windows command prompt.
1506
1507 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
1508
1509         * device/lib/libsdcc.lib: added module rand
1510         * src/ds390/ralloc.c (rematStr),
1511         * src/hc08/ralloc.c (rematStr),
1512         * src/mcs51/ralloc.c (rematStr),
1513         * src/z80/ralloc.c (rematStr): made output more consistent
1514         * src/mcs51/gen.c: cosmetic changes
1515
1516 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
1517
1518         * src/port.h: added mem.cabs_name to PORT
1519         * src/ds390/main.c,
1520         * src/hc08/main.c,
1521         * src/mcs51/main.c,
1522         * src/pic16/main.c,
1523         * src/pic/main.c,
1524         * src/xa51/main.c,
1525         * src/z80/main.c: added cabs_name initializers
1526         * src/SDCCglue.c (emitStaticSeg): allocate and initialize absolute
1527           constants
1528           (emitMaps): emit absolutes in code memory into cabs_name
1529         * src/SDCCmem.c,
1530         * src/SDCCmem.h: added memory map c_abs and defined CABS_NAME
1531         * src/ds390/gen.c (genCodePointerGet): fixed bug if left is a literal
1532         * support/regression/fwk/include/testfwk.h: added define for at
1533         * support/regression/tests/absolute.c: added, new
1534
1535 2006-09-29 Maarten Brock <sourceforge.brock AT dse.nl>
1536
1537         * src/mcs51/gen.c (genPlusIncr, genMinusDec, genAddrOf): small
1538           optimizations, see also patch 887161 by Stas Sergeev
1539         * src/mcs51/peeph.def(104, 207, 209, 212): disabled as they do not seem
1540           to be necessary anymore,
1541           (102, 103, 104, 127): renamed all occurances of bp to _bp
1542
1543 2006-09-27 Maarten Brock <sourceforge.brock AT dse.nl>
1544
1545         * device/include/mcs51/at89c51snd1c.h: fixed MSK_SREQ definition
1546           thanks Weston T. Schmidt for patch 1555221
1547         * src/mcs51/peeph.def: renamed rule 257 to 257.a, added 257.b
1548         * src/SDCCicode.c(geniCodeMultiply): small optimization
1549
1550 2006-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1551
1552         * device/include/stdlib.h: added rand prototypes
1553         * device/lib/rand.c: new, added
1554         * device/lib/Makefile.in: added rand.c
1555         * src/z80/peeph.def,
1556         * src/z80/peeph-gbz80.def,
1557         * src/z80/peeph-z80.def: updated conditonals, fixed bug 1565908
1558
1559 2006-09-20 Raphael Neider <rneider AT web.de>
1560
1561         * device/lib/pic16/libio/i2c/i2cnack.c (i2c_nack): fixed ACKDT bit
1562
1563 2006-09-19 Maarten Brock <sourceforge.brock AT dse.nl>
1564
1565         * as/link/aslink.h: cosmetic changes
1566         * as/link/mcs51/Makefile.in,
1567         * as/link/z80/Makefile.in: fixed build on CF where VPATH is used
1568
1569 2006-09-17 Maarten Brock <sourceforge.brock AT dse.nl>
1570
1571         * as/link/aslink.h,
1572         * as/link/mcs51/aslink.h,
1573         * as/link/z80/aslink.h: merged and moved to as/link/
1574         * as/link/lkstore.c,
1575         * as/link/mcs51/lkstore.c: moved to as/link/
1576         * as/link/clean.mk: remove *.o
1577         * as/link/mcs51/alloc.h: deleted
1578         * as/link/mcs51/lkarea.c: added lnksect prototype
1579         * as/link/mcs51/lkdata.c,
1580         * as/link/mcs51/lklex.c,
1581         * as/link/mcs51/lkmain.c: renamed as_getline to lk_getline
1582         * as/link/mcs51/lkmem.c,
1583         * as/link/mcs51/lknoice.c: removed include strcmpi.h
1584         * as/link/mcs51/lksym.c: include stdlib.h instead of malloc.h or alloc.h
1585         * as/link/mcs51/aslink.dsp,
1586         * as/link/mcs51/Makefile.aslink,
1587         * as/link/mcs51/Makefile.bcc,
1588         * as/link/mcs51/Makefile.in: updated for moved files
1589         * as/link/z80/lkarea.c,
1590         * as/link/z80/lkhead.c,
1591         * as/link/z80/lklex.c,
1592         * as/link/z80/lklibr.c,
1593         * as/link/z80/lklist.c,
1594         * as/link/z80/lkmain.c,
1595         * as/link/z80/lkrloc.c,
1596         * as/link/z80/lksym.c: synced with mcs51
1597         * as/link/z80/lkdata.c,
1598         * as/link/z80/lkeval.c,
1599         * as/link/z80/lkihx.c,
1600         * as/link/z80/lks19.c: cosmetic changes
1601         * as/link/z80/Makefile.in,
1602         * as/link/z80/linkgbz80.dsp,
1603         * as/link/z80/linkz80.dsp: updated for moved files
1604
1605 2006-09-16 Borut Razem <borut.razem AT siol.net>
1606
1607         * debugger/mcs51/sdcdb.c: partially fixed
1608           [ 1203664 ] sdcdb fails to open files w. two "." periods
1609         * debugger/mcs51/simi.c, debugger/mcs51/symtab.c,
1610           debugger/mcs51/symtab.h: fixed indenting
1611         * configure.in, configure: up to date with latest Maarten's changes
1612
1613 2006-09-15 Maarten Brock <sourceforge.brock AT dse.nl>
1614
1615         as/link/mcs51
1616         as/aslink.dsp,                  as/link/mcs51/aslink.dsp,
1617         as/link/mcs51/aslink.h,         as/mcs51/aslink.h,
1618         as/link/mcs51/aslink.mak,       as/mcs51/aslink.mak,
1619         as/link/mcs51/lkaomf51.c,       as/mcs51/lkaomf51.c,
1620         as/link/mcs51/lkarea.c,         as/mcs51/lkarea.c,
1621         as/link/mcs51/lkdata.c,         as/mcs51/lkdata.c,
1622         as/link/mcs51/lkeval.c,         as/mcs51/lkeval.c,
1623         as/link/mcs51/lkhead.c,         as/mcs51/lkhead.c,
1624         as/link/mcs51/lkihx.c,          as/mcs51/lkihx.c,
1625         as/link/mcs51/lklex.c,          as/mcs51/lklex.c,
1626         as/link/mcs51/lklibr.c,         as/mcs51/lklibr.c,
1627         as/link/mcs51/lklist.c,         as/mcs51/lklist.c,
1628         as/link/mcs51/lkmain.c,         as/mcs51/lkmain.c,
1629         as/link/mcs51/lkmem.c,          as/mcs51/lkmem.c,
1630         as/link/mcs51/lknoice.c,        as/mcs51/lknoice.c,
1631         as/link/mcs51/lkrloc.c,         as/mcs51/lkrloc.c,
1632         as/link/mcs51/lks19.c,          as/mcs51/lks19.c,
1633         as/link/mcs51/lkstore.c,        as/mcs51/lkstore.c,
1634         as/link/mcs51/lksym.c,          as/mcs51/lksym.c,
1635         as/link/mcs51/Makefile.aslink,  as/mcs51/Makefile.aslink,
1636         as/link/mcs51/alloc.h,
1637         as/link/mcs51/clean.mk,
1638         as/link/mcs51/conf.mk,
1639         as/link/mcs51/Makefile.bcc,
1640         as/link/mcs51/Makefile.in,
1641         as/link/mcs51/readme.390,
1642         as/link/mcs51/strcmpi.c,
1643         as/link/mcs51/strcmpi.h,
1644         as/mcs51/clean.mk,
1645         as/mcs51/Makefile.bcc,
1646         as/mcs51/Makefile.in,
1647         configure,
1648         Makefile.in,
1649         sdcc.dsw: moved mcs51 linker to as/link/mcs51
1650
1651 2006-09-14 Maarten Brock <sourceforge.brock AT dse.nl>
1652
1653         * as/link,
1654         * as/link/Makefile.in,
1655         * as/link/z80/linkgbz80.dsp,
1656         * as/link/z80/linkz80.dsp,
1657         * configure,
1658         * link,
1659         * link/clean.mk,
1660         * link/Makefile.in,
1661         * link/README,
1662         * link/z80,
1663         * link/z80/aslink.h,
1664         * link/z80/clean.mk,
1665         * link/z80/conf.mk,
1666         * link/z80/linkgbz80.dsp,
1667         * link/z80/linkz80.dsp,
1668         * link/z80/lkarea.c,
1669         * link/z80/lkdata.c,
1670         * link/z80/lkeval.c,
1671         * link/z80/lkgb.c,
1672         * link/z80/lkgg.c,
1673         * link/z80/lkhead.c,
1674         * link/z80/lkihx.c,
1675         * link/z80/lklex.c,
1676         * link/z80/lklibr.c,
1677         * link/z80/lklist.c,
1678         * link/z80/lkmain.c,
1679         * link/z80/lkrloc.c,
1680         * link/z80/lks19.c,
1681         * link/z80/lksym.c,
1682         * link/z80/Makefile.in,
1683         * Makefile.in,
1684         * sdcc.dsw: moved link/ to as/link/
1685
1686 2006-09-11 Maarten Brock <sourceforge.brock AT dse.nl>
1687
1688         * as/mcs51/i51mch.c (machine): fixed warning
1689
1690 2006-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1691
1692         * as/mcs51/i51mch.c (machine): S_DJNZ fixed bug 1554318
1693
1694 2006-09-09 Borut Razem <borut.razem AT siol.net>
1695
1696         * debugger/mcs51/sdcdb.c, debugger/mcs51/simi.c:
1697           sdcdb WIN32 native port
1698         * src/clean.mk: fixed
1699
1700 2006-09-08 Borut Razem <borut.razem AT siol.net>
1701
1702         * doc/sdccman.lyx: SDCDB and ucSim are available on Win32 platforms.
1703
1704 2006-09-08 Raphael Neider <rneider AT web.de>
1705
1706         * src/pic16/main.c (_pic16_linkEdit,pic16_linkCmd),
1707         * src/pic/main.c(_pic14_do_link, linkCmd): pass "-w" and "-r"
1708             to gplink to disable processor mismatch warning and to allow
1709             the use of devices with only aliased (shared) memory banks,
1710           (_pic16_genAssemblerPreamble): include pXXX.inc on --mplab-comp
1711
1712 2006-09-07 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1713
1714         * doc/sdccman.lyx: Some re-formating plus example on using
1715           #pragma preproc_asm +/-
1716
1717 2006-09-07 Borut Razem <borut.razem AT siol.net>
1718
1719         * support/scripts/sdcc.nsi: added SDCDB executables in a separate
1720           section
1721
1722 2006-09-06 Borut Razem <borut.razem AT siol.net>
1723
1724         * support/scripts/sdcc.nsi: fixed Error: unterminated string parsing
1725           line at sdcc.nsi:153
1726         * sdcc/debugger/mcs51/simi.c: argsToCmdLine() fixes
1727
1728 2006-09-05 Borut Razem <borut.razem AT siol.net>
1729
1730         * configure.in, configure: support for winsock2
1731         * debugger/mcs51/break.h, debugger/mcs51/cmd.c,
1732           debugger/mcs51/cmd.h, debugger/mcs51/sdcdb.c,
1733           debugger/mcs51/sdcdb.h, debugger/mcs51/simi.c,
1734           debugger/mcs51/simi.h, debugger/mcs51/symtab.c,
1735           debugger/mcs51/symtab.h: sdcdb WIN32 native port
1736
1737 2006-09-05 Maarten Brock <sourceforge.brock AT dse.nl>
1738
1739         * src/SDCCopt.c (cnvToFcall): fixed bug 1551947 by updating OP_USES
1740           and OP_DEFS
1741         * support/regression/tests/bug1551947.c: new, added
1742         * src/SDCCsymt.h: strings are char* not byte*
1743
1744 2006-09-05 Raphael Neider <rneider AT web.de>
1745
1746         * device/lib/pic16/libdev/pic18f4550.c,
1747           device/include/pic16/pic18f4550.h: added PORTD/TRISD
1748             declarations/definitions from patch #1520949
1749
1750 2006-09-05 Raphael Neider <rneider AT web.de>
1751
1752         * src/pic16/gen.c (genPackBits): fix assignment to 8-bit,
1753           byte-aligned bitfields, fixes #1539278
1754
1755 2006-09-05 Raphael Neider <rneider AT web.de>
1756
1757         * src/pic/gen.c (genReceive): skip unreferenced arguments,
1758           fixes #1544120
1759
1760 2006-09-04 Borut Razem <borut.razem AT siol.net>
1761
1762         * support/scripts/sdcc.nsi: move ucSim executables to a separate section
1763         * support/scripts/sdcc_cygwin_mingw32: don't disable ucsim,
1764           -mno-cygwin is a part of the compiler name
1765         * support/scripts/sdcc_mingw32: don't disable ucsim
1766
1767 2006-09-03 Borut Razem <borut.razem AT siol.net>
1768
1769         * sdcc.spec: corrected for 2.6.0. Thanks to Christer Weinigel.
1770         * device/lib/Makefile.in device/lib/clean.mk: small but essential corrections
1771
1772 2006-09-03 Raphael Neider <rneider AT web.de>
1773
1774         * src/pic/ralloc.c,
1775         * src/pic/pcode.c (InitReuseRegs): allocate registers with pseudo
1776           indices >= 0x1000 to disambiguate them from fixed regs __at(addr),
1777           fixes #1550049
1778
1779 2006-09-01 Borut Razem <borut.razem AT siol.net>
1780
1781         * sim/ucsim/cmd.src/cmdutil.cc: #include <sys/time.h> and <unistd.h>
1782           to make ppc-osx happy
1783
1784 2006-08-31 Borut Razem <borut.razem AT siol.net>
1785
1786         * sim/ucsim/cmd.src/newcmdposix.cc: #include <assert.h>
1787         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
1788         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
1789         * support/regression/ports/ds390/spec.mk,
1790           support/regression/ports/mcs51/spec.mk,
1791           support/regression/ports/xa51/spec.mk: introduced DEV_NULL variable.
1792           To run regression tests in mingw environment:
1793           make DEV_NULL=NUL CC=gcc
1794
1795 2006-08-30 Borut Razem <borut.razem AT siol.net>
1796
1797         * sim/ucsim/cmd.src/newcmdposix.cc, sim/ucsim/cmd.src/newcmdposixcl.h,
1798           sim/ucsim/cmd.src/newcmdwin32.cc, sim/ucsim/cmd.src/newcmdwin32cl.h,
1799           sim/ucsim/app.cc, sim/ucsim/appcl.h, sim/ucsim/configure,
1800           sim/ucsim/configure.in, sim/ucsim/ddconfig_in.h, sim/ucsim/error.cc,
1801           sim/ucsim/errorcl.h, sim/ucsim/option.cc, sim/ucsim/optioncl.h,
1802           sim/ucsim/utils.cc, sim/ucsim/utils.h, sim/ucsim/cmd.src/Makefile.in,
1803           sim/ucsim/avr.src/avr.cc, sim/ucsim/avr.src/avrcl.h,
1804           sim/ucsim/cmd.src/bp.cc, sim/ucsim/cmd.src/bpcl.h,
1805           sim/ucsim/cmd.src/cmdconf.cc, sim/ucsim/cmd.src/cmdgui.cc,
1806           sim/ucsim/cmd.src/cmdmem.cc, sim/ucsim/cmd.src/cmdset.cc,
1807           sim/ucsim/cmd.src/cmdsetcl.h, sim/ucsim/cmd.src/cmdstat.cc,
1808           sim/ucsim/cmd.src/cmduc.cc, sim/ucsim/cmd.src/cmduccl.h,
1809           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
1810           sim/ucsim/cmd.src/command.cc, sim/ucsim/cmd.src/commandcl.h,
1811           sim/ucsim/cmd.src/get.cc, sim/ucsim/cmd.src/getcl.h,
1812           sim/ucsim/cmd.src/info.cc, sim/ucsim/cmd.src/newcmd.cc,
1813           sim/ucsim/cmd.src/newcmdcl.h, sim/ucsim/cmd.src/set.cc,
1814           sim/ucsim/cmd.src/show.cc, sim/ucsim/cmd.src/timer.cc,
1815           sim/ucsim/hc08.src/hc08.cc, sim/ucsim/hc08.src/hc08cl.h,
1816           sim/ucsim/s51.src/Makefile.in, sim/ucsim/s51.src/interrupt.cc,
1817           sim/ucsim/s51.src/interruptcl.h, sim/ucsim/s51.src/pca.cc,
1818           sim/ucsim/s51.src/pcacl.h, sim/ucsim/s51.src/port.cc,
1819           sim/ucsim/s51.src/portcl.h, sim/ucsim/s51.src/serial.cc,
1820           sim/ucsim/s51.src/serialcl.h, sim/ucsim/s51.src/timer0.cc,
1821           sim/ucsim/s51.src/timer0cl.h, sim/ucsim/s51.src/timer1.cc,
1822           sim/ucsim/s51.src/timer1cl.h, sim/ucsim/s51.src/timer2.cc,
1823           sim/ucsim/s51.src/timer2cl.h, sim/ucsim/s51.src/uc390.cc,
1824           sim/ucsim/s51.src/uc390cl.h, sim/ucsim/s51.src/uc390hw.cc,
1825           sim/ucsim/s51.src/uc390hwcl.h, sim/ucsim/s51.src/uc51.cc,
1826           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/wdt.cc,
1827           sim/ucsim/s51.src/wdtcl.h, sim/ucsim/sim.src/hw.cc,
1828           sim/ucsim/sim.src/hwcl.h, sim/ucsim/sim.src/mem.cc,
1829           sim/ucsim/sim.src/memcl.h, sim/ucsim/sim.src/obsolete.cc,
1830           sim/ucsim/sim.src/obsolete.h, sim/ucsim/sim.src/sim.cc,
1831           sim/ucsim/sim.src/simcl.h, sim/ucsim/sim.src/stack.cc,
1832           sim/ucsim/sim.src/stackcl.h, sim/ucsim/sim.src/test_mem_speed.cc,
1833           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1834           sim/ucsim/xa.src/xa.cc, sim/ucsim/xa.src/xacl.h,
1835           sim/ucsim/z80.src/z80.cc, sim/ucsim/z80.src/z80cl.h:
1836           ucsim WIN32 native port
1837
1838 2006-08-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1839
1840         * doc/sdccman.lyx: added note on dynamic memory heap initialization
1841
1842 2006-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
1843
1844         * src/mcs51/gen.c (genAnd, genOr, genXor): fixed bug 1546986
1845         * src/ds390/gen.c (aopGetUsesAcc): handle AOP_DPTR2 and AOP_DPTRn too
1846
1847 2006-08-26 Maarten Brock <sourceforge.brock AT dse.nl>
1848
1849         * src/ds390/gen.c (genAnd, genOr, genXor): fixed bug 1546986
1850         * support/regression/tests/bug1546986.c: new, added
1851         * as/mcs51/.cvsignore,
1852         * debugger/mcs51/.cvsignore,
1853         * src/.cvsignore: deleted
1854
1855 2006-08-25 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1856
1857         * device/include/mcs51/P89c51RD2.h: fixed bug 1546936 (error in sbit
1858           definitions)
1859
1860 2006-08-20 Borut Razem <borut.razem AT siol.net>
1861
1862         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h:
1863           removed cl_listen_console::match(), cl_console::match(),
1864           restructured cl_commander::proc_input()
1865
1866 2006-08-16 Borut Razem <borut.razem AT siol.net>
1867
1868         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h,
1869           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
1870           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/uc.cc: code cleaning
1871
1872 2006-08-14 Borut Razem <borut.razem AT siol.net>
1873
1874         * support/regression/Makefile.in,
1875           support/regression/ports/pic14/gpsim.cmd,
1876           support/regression/ports/pic14/spec.mk,
1877           support/regression/ports/pic14/support.c:
1878           added pic14 regression test
1879
1880 2006-08-14 Maarten Brock <sourceforge.brock AT dse.nl>
1881
1882         * as/doc/asxhtm.html: documented changed ABS behaviour
1883         * as/doc/README: fixed some typos
1884
1885 2006-08-13 Maarten Brock <sourceforge.brock AT dse.nl>
1886
1887         * support/regression/tests/float_trans.c: disabled test if __STDC_IEC_559__
1888           not defined on host
1889
1890 2006-08-12 Borut Razem <borut.razem AT siol.net>
1891
1892         * support/regression/fwk/include/testfwk.h,
1893           support/regression/fwk/lib/testfwk.c,
1894           support/regression/generate-cases.py,
1895           support/regression/Makefile.in:
1896           regression test framework does not depend on function pointers and
1897           variable arguments
1898
1899 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
1900
1901         * device/include/stddef.h: c temporary hack to fix bug 1518273
1902
1903 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1904
1905         * device/include/mcs51/cc2510fx.h: added
1906         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
1907           to projects.
1908
1909 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
1910
1911         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
1912         * as/z80/Makefile.in: added strcmpi.c
1913         * as/z80/z80adr.c: added upper case registers and lower case conditionals
1914         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
1915
1916 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
1917
1918         * device/lib/gbz80/asm_strings.s,
1919         * device/lib/gbz80/crt0_rle.s,
1920         * device/lib/gbz80/div.s,
1921         * device/lib/gbz80/mul.s,
1922         * device/lib/gbz80/shift.s,
1923         * device/lib/z80/asm_strings.s,
1924         * device/lib/z80/crt0_rle.s,
1925         * device/lib/z80/div.s,
1926         * device/lib/z80/mul.s,
1927         * device/lib/z80/shift.s: changed to all lower case menmonics except the
1928           flags which are all upper case
1929
1930 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
1931
1932         * as/z80/asm.h: made CASE_SENSITIVE 1
1933         * link/z80/aslink.h: made CASE_SENSITIVE 1
1934         * src/z80/gen.c (throughout): made all conditionals upper case
1935         * support/regression/tests/bug1503067.c: new
1936
1937 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
1938
1939         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
1940           (shiftIntoPair): added case 2 for PAIR_IY,
1941           (setupToPreserveCarry): replaced parameters with iCode and check if
1942            PAIR_DE is in use to fix bug 1399290,
1943           (genPlus, genMinus): updated call to setupToPreserveCarry
1944         * support/regression/tests/bug1399290.c: new
1945
1946 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
1947
1948         * device/lib/Makefile.in (Z80SOURCES): enabled float support
1949         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
1950         * src/ds390/gen.c (shiftRLong),
1951         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
1952         * src/mcs51/gen.c (sameReg): changed to sameByte,
1953           (xch_a_aopGet): new,
1954           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
1955            shiftRLong): fixed bug 1533966
1956         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
1957           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
1958         * support/regression/Makefile.in: disabled z80, enabled ucz80
1959         * support/regression/tests/float_trans.c: enabled test for z80 and host
1960         * support/regression/tests/shifts2.c: new, for testing bug 1533966
1961
1962 2006-08-01 Borut Razem <borut.razem AT siol.net>
1963
1964         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
1965           comparison is always false due to limited range of data type
1966           on PPC64 machine (openpower-linux1) where "char = unsigned char"
1967
1968 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
1969
1970         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
1971         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
1972         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
1973         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
1974
1975 2006-07-31 Borut Razem <borut.razem AT siol.net>
1976
1977         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
1978           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
1979           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
1980           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
1981           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
1982           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
1983           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
1984           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
1985           enable ucsim mingw compilation. Serial port is disabled,
1986           since it uses termios.h API, which is not available on native
1987           WIN32
1988
1989 2006-07-31 Borut Razem <borut.razem AT siol.net>
1990
1991         * Small Device C Compiler 2.6.0 released
1992         * support/scripts/sdcc.nsi: added FULL_DOC option
1993         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
1994
1995 2006-07-28 Borut Razem <borut.razem AT siol.net>
1996
1997         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
1998         * doc/INSTALL.txt: updated
1999
2000 2006-07-27 Borut Razem <borut.razem AT siol.net>
2001
2002         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
2003           device/lib/pic/libdev/Makefile.in: fixed bug
2004           [ 1438354 ] pic libsdcc: distclean doesn't work
2005         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
2006           device/lib/pic16/libio/Makefile.in: fixed bug
2007           [ 1438344 ] pic16 lib: clean doesn't work properly
2008         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
2009
2010 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
2011
2012         * device/lib/pic/libsdcc/fsdiv.c,
2013         * device/lib/pic/libsdcc/fsmul.c,
2014         * device/lib/pic16/libsdcc/float/fsdiv.c,
2015         * device/lib/pic16/libsdcc/float/fsmul.c,
2016         * device/lib/_fsdiv.c,
2017         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
2018         * support/regression/tests/bug1520966.c: added
2019         * doc/knownbugs.html: removed [ 1520966 ] from the list
2020
2021 2006-07-25 Borut Razem <borut.razem AT siol.net>
2022
2023         * configure.in, configure, sdccconf_in.h: fixed bug
2024           [ 1519095 ] regression test onebyte.c fails on ppc64 host
2025         * doc/knownbugs.html: removed [ 1519095 ] from the list
2026
2027 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
2028
2029         * doc/knownbugs.html: added, contains list of known bugs at release
2030         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
2031
2032 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2033
2034         * device/include/mcs51/compiler.h: added SFRX for xdata based special
2035           function registers and corrected defaults with additional warning
2036         * device/lib/malloc.c: cosmetic changes
2037         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
2038         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
2039           (fillGaps): and used it
2040
2041 2006-07-20 Raphael Neider <rneider AT web.de>
2042
2043         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
2044           output unless SDCCPICDEBUG is set
2045         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
2046           output if SILENT is set
2047
2048 2006-07-11 Borut Razem <borut.razem AT siol.net>
2049
2050         * doc/README.txt: updated
2051
2052 2006-07-10 Borut Razem <borut.razem AT siol.net>
2053
2054         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
2055           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
2056           in WIN32 installation
2057         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
2058           release candidate 1
2059
2060 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
2061
2062         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
2063         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
2064
2065 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
2066
2067         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
2068
2069 2006-07-06 Borut Razem <borut.razem AT siol.net>
2070
2071         * support/regression/tests/bitfields.c:
2072           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
2073         * support/regression/tests/constantRange.c:
2074           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
2075
2076 2006-07-04 Borut Razem <borut.razem AT siol.net>
2077
2078         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
2079           src/port.mk,
2080           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
2081           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
2082           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
2083           reverted changes from 2006-07-03
2084         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
2085         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
2086           added CPPFLAGS, used by the host port
2087
2088 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
2089
2090         * support/regression/valdiag/tests/switch.c,
2091         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
2092         * support/regression/tests/libmullong.c: fixed for host
2093         * support/regression/ports/host/spec.mk: disable all warnings for host,
2094         SDCC runs with --less-pedantic too
2095
2096 2006-07-03 Borut Razem <borut.razem AT siol.net>
2097
2098         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
2099           defined CPPFLAGS
2100         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
2101         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
2102           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
2103           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
2104           include ../port.mk
2105         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
2106           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2107           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
2108           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
2109
2110 2006-07-02 Raphael Neider <rneider AT web.de>
2111
2112         * src/pic16/devices.inc,
2113         * device/include/pic16/pic18fregs.h,
2114         * device/include/pic16/pic18f4550.h,
2115         * device/lib/pic16/pics.all,
2116         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
2117
2118 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
2119
2120         * as/hc08/lkaomf51.c (OutputName),
2121         * as/mcs51/lkaomf51.c (OutputName),
2122         * as/z80/asmain.c (asmbl),
2123         * src/ds390/main.c (asmLineNodeFromLineNode),
2124         * src/hc08/ralloc.c (hc08_assignRegisters),
2125         * src/mcs51/main.c (asmLineNodeFromLineNode),
2126         * src/xa51/ralloc.c (checkRegMask),
2127         * src/xa51/gen.c (emitcode),
2128         * src/z80/gen.c (_emit2),
2129         * src/SDCCast.c (searchLitOp),
2130         * src/SDCCglobl.h,
2131         * support/packihx/packihx.c,
2132         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
2133         * src/ds390/gen.c (aopPutUsesAcc),
2134         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
2135         * support/regression/tests/libmullong.c (mullong_wrapper),
2136         * src/SDCCsymt.c (powof2),
2137         * src/SDCCast.c,
2138         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
2139         * src/SDCCsymt.h: added TYPE_TARGET_*
2140         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
2141         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
2142         SDCCast because 1) header problems 2) this is the right place
2143         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
2144         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
2145         prototype
2146
2147 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
2148
2149         * src/SDCCicode.h: removed buggy semicolon in unused macro
2150         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
2151         search for previous definiton of auto symbols too,
2152         (findPrevUse): fixed logic of emitWarnings
2153
2154 2006-06-26 Raphael Neider <rneider AT web.de>
2155
2156         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
2157           PCLATH and PCLATU on interrupts, potentially fixes #1505141
2158
2159 2006-06-25 Raphael Neider <rneider AT web.de>
2160
2161         * device/lib/pic/libm: NEW, added math library functions
2162         * device/lib/pic/libsdcc: NEW; added float support functions
2163         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
2164         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
2165           NEW, added math related headers
2166         * device/include/asm/pic/features.h: NEW
2167         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
2168           (popGet): allow larger offsets for AOP_PCODE,
2169           (genDataPointerSet): handle literals explicitly, more debug output,
2170           (genAssign): fixed for float using aopLiteral ;-)
2171         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
2172           GOTO initialisation routine
2173         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
2174           flag on registers, fixes #1469043 (local variables do not work)
2175         * src/pic/main.c (_pic14_do_link),
2176         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
2177           available
2178
2179 2006-06-25 Borut Razem <borut.razem AT siol.net>
2180
2181         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
2182           characters printed (not including the trailing '\0' used to end
2183           output to strings). Problem detected in regression test bug-927659.c.
2184           NOTE: printf() family functions should return int instead
2185           unsigned int!
2186         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
2187           specifier are printed as themselves
2188         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
2189           support flags, width and precision specifiers
2190
2191 2006-06-24 Borut Razem <borut.razem AT siol.net>
2192
2193         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
2194           to the list of sdcc tagrets not supporting bit type
2195         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
2196           testfor pic16 due to bug:
2197           [ 1511794 ] pic16: regression test bug-895992.c fails
2198
2199 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
2200
2201         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
2202         * src/SDCCglue.c (initPointer), fixed bug 1496419
2203         * support/regression/tests/bug1496419.c: new, added
2204
2205 2006-06-22 Borut Razem <borut.razem AT siol.net>
2206
2207         * support/regression/ports/pic16/support.c: use gpsim usart module from
2208           libgpsim_modules library
2209
2210 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
2211
2212         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
2213         IP0H to IPH0.
2214
2215 2006-06-19 Raphael Neider <rneider AT web.de>
2216
2217         * src/pic/glue.h,src/pic16/glue.h: added prototypes
2218         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
2219           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
2220           (pic14printExterns,pic14printPublics,pic16printPublics,
2221           pic16_printExterns): use new functions to emit symbols
2222           (picglue,pic16glue): emit publics before emitting externs
2223         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
2224           locally defined functions to avoid bug #1443651
2225         * support/regression/tests/bug-716242.c: removed pic16 workaround
2226         * support/regression/ports/pic16/spec.mk: ignore errors during build
2227
2228 2006-06-19 Raphael Neider <rneider AT web.de>
2229
2230         * src/pic/glue.h: added pic14aopLiteral prototype
2231         * src/pic/glue.c (pic14aopLiteral): return unsigned int
2232         * src/pic/gen.c: removed stdint.h dependency
2233           (aopGet): use Safe_strdup()
2234           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
2235           (genDataPointerSet): use pic14aopLiteral()
2236         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
2237           for pic16; thanks to Bernhard and Maarten
2238
2239 2006-06-18 Borut Razem <borut.razem AT siol.net>
2240
2241         * support/regression/tests/structflexarray.c: flexible array members
2242           not supported by gcc < 3
2243         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
2244           GUI tool by default
2245         * src/pic/gen.c: don't include [p]strdin.h on solaris
2246         * support/Util/pstdint.h: addad svn attributes
2247         * support/regression/tests/constantRange.c,
2248           support/regression/tests/rotate.c: include inttypes.h instead
2249           stdint.h on solaris, addad svn attributes
2250
2251 2006-06-18 Raphael Neider <rneider AT web.de>
2252
2253         * src/SDCCsymt.c (initCSupport): change return type of divschar to
2254           int for PIC16
2255         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
2256           (pic16_genMinusBits): simplified sign-extension
2257           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
2258             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
2259             adjusted to correctly handle mixed-signed operands, disabled
2260             now unused multiplciation routines
2261         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
2262           (assignResultValue): added argument denoting the size of the result
2263             as returned by the function (fixes upcasts in assigning from
2264             function calls: char foo(); int i = foo();)
2265           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
2266             function result to assignResultValue
2267           (genMult): disabled inlined multiplication code
2268           (genDiv): augmented to also handle the modulus operator, fixed to
2269             handle mixed-signed operands correctly
2270           (genMod): simply call genDiv, disabled unused code
2271           (genAssign): fixed missing (sign-)extension on result
2272         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
2273             valid char operands, allow signed operands for native code, added
2274             division and modulo operator handling
2275         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
2276
2277         As a consequence, onebyte.c (if split into two files) and muldiv.c
2278         pass regression tests.
2279
2280 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2281
2282         * doc/Makefile.in: two runs of makeindex seem needed to get
2283         correct page references in the index of sdccman.pdf
2284         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
2285
2286 2006-06-17 Borut Razem <borut.razem AT siol.net>
2287
2288         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
2289
2290 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2291
2292         * doc/sdccman.lyx: updated, added (porting source code, debugging),
2293         mentioned ec2drv and paulmon
2294
2295 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
2296
2297         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
2298           consecutive abs areas
2299           (find_empty_space, allocate_space): added map to handle codemap or
2300            xdatamap,
2301           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
2302            absolute idata and xdata
2303         * as/mcs51/lkmem.c (summary2): updated legend
2304
2305 2006-06-16 Raphael Neider <rneider AT web.de>
2306
2307         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
2308
2309 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
2310
2311         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
2312           1208515
2313         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
2314
2315 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
2316
2317         * src/port.h (struct PORT): added field gp_tags, to hold the tag
2318         value of generic pointers,
2319         * src/avr/main.c,
2320           src/ds390/main.c,
2321           src/hc08/main.c,
2322           src/izt/i186.c,
2323           src/izt/tlcs900h.c,
2324           src/mcs51/main.c,
2325           src/pic/main.c,
2326           src/pic16/main.c,
2327           src/xa51/main.c,
2328           src/z80/main.c: PORT structure, added elements for gp_tags field,
2329         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
2330         fields in the PORT structure of each port,
2331         * src/SDCCast.c (decorateType): allow processing of generic pointers
2332         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
2333         S_FIXED symbols
2334
2335 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
2336
2337         * link/z80/lkgb.c,
2338         * link/z80/lkgg.c,
2339         * src/pic16/gen.c,
2340         * src/pic16/main.c,
2341         * src/pic16/pcode.c,
2342         * src/pic/main.c,
2343         * src/pic/pcoderegs.c,
2344         * src/SDCCicode.c,
2345         * src/SDCCmain.c,
2346         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
2347           bug 1504689 on minGW
2348
2349 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2350
2351         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
2352
2353 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
2354
2355         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
2356
2357 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
2358
2359         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
2360           for optimization
2361
2362 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
2363
2364         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
2365         to a char variable. Fixed bug #1504211
2366         * device/include/pic16/adc.h,
2367         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
2368         and fixed bug #1364390
2369
2370 2006-06-10 Borut Razem <borut.razem AT siol.net>
2371
2372         * CVSROOT: removed the CVS left-over
2373
2374 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
2375
2376         * as/hc08/asmain.c (asexit),
2377         * as/hc08/lkmain.c (lkexit),
2378         * as/mcs51/asmain.c (asexit),
2379         * as/mcs51/lkmain.c (lkexit),
2380         * src/SDCCglue.c (DEFSETFUNC),
2381         * src/SDCCmain.c (linkEdit, assemble),
2382         * support/librarian/sdcclib.c (AddRel),
2383           replaced unlink() by standard C remove()
2384         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
2385         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
2386           gatherImplicitVariables): new, added to fix bug 608752,
2387           (createFunction): added gatherImplicitVariables()
2388         * src/SDCCast.h: added createRMW prototype
2389         * src/SDCCsymt.h (struct symbol): added infertype
2390         * support/regression/tests/bug608752.c: new, added
2391
2392 2006-06-10 Raphael Neider <rneider AT web.de>
2393
2394         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
2395           multibyte dummy reads (fixes #1503234)
2396
2397 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
2398
2399         * device/include/mcs51/compiler.h: new, added header file to enable
2400           creating common sfr definition header files for different compilers
2401
2402 2006-06-05 Raphael Neider <rneider AT web.de>
2403
2404         * src/pic16/{pcode.h,genarith.c}:
2405           introduced pCodeOp combining any two pCodeOps (previously only
2406           two register operands could be combined), removed pcop2 from
2407           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
2408         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
2409         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
2410           rewritten to use new PO_TWO_OPS
2411         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
2412         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
2413           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
2414           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
2415           (pic16_get_op): embraced return arg to allow #define return(x),
2416             added new case for combined opcodes
2417           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
2418           (pic16_pCode2str,pic16_getRegFrompCodeOp,
2419            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
2420
2421 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
2422
2423         * src/SDCCval.c (checkConstantRange): added
2424         * src/SDCCval.h: added checkConstantRange
2425         * support/Util/SDCCerr.c,
2426         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
2427         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
2428         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
2429         * src/SDCCast.c (decorateType): added checkConstantRange,
2430         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
2431         can be emitted with the correct always true/false warning,
2432         added optimization for double '!';
2433         result of decorateType() must be assigned back to the tree, because
2434         decorateType() can change the tree
2435         * src/SDCCicode.c (geniCodeLogic),
2436         (geniCodeAssign): replaced new checkConstantRange, added warnings,
2437         (checkConstantRange): removed, it was only a fragment which never
2438         emitted a warning
2439         * src/SDCCsymt.c (computeType): fixed promotion for
2440         "-1 < (unsigned bit) b"
2441         * src/pic/ralloc.c (packRegsForAssign),
2442         * src/pic16/ralloc.c (packRegsForAssign),
2443         * src/hc08/ralloc.c (packRegsForAssign),
2444         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
2445         from mcs51
2446         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
2447         * support/regression/tests/constantRange.c: added
2448         * support/valdiag/tests/constantRange.c: added
2449         * support/valdiag/valdiag.py: added -DPORT_HOST=1
2450
2451 2006-06-02 Borut Razem <borut.razem AT siol.net>
2452
2453         * support/regression/ports/pic16/support.c: increase stack size
2454           to 255 bytes
2455         * support/regression/Makefile.in: sort tests by name so that the
2456           resutlts can be compared on different machines / platforms
2457
2458 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
2459
2460         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
2461         * src/ds390/gen.c (emitLabel): new, added,
2462           (genDjnz): fixed stack overflow bug,
2463           (throughout): cosmetic changes to sync with mcs51/gen.c,
2464           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
2465         * src/mcs51/gen.c (genEndFunction): small optimization,
2466           (throughout): cosmetic changes to sync with ds390/gen.c
2467
2468 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
2469
2470         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
2471           (_print_format): fixed printing pointers
2472         * src/mcs51/gen.c (emitLabel, movb): new, added,
2473           (genAssign): small optimization,
2474           (genDjnz): fixed stack overflow bug,
2475           (throughout): replaced sprintf with SNPRINTF,
2476           replaced mcs51_regWithIdx with REG_WITH_INDEX,
2477           replaced emitcode("mov", "b,...") with MOVB(...),
2478           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
2479           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
2480         * src/mcs51/peeph.def: added rules 140 and 264
2481         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
2482           so they may get optimized into registers
2483
2484 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
2485
2486         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
2487           immediately when encountered,
2488           (printUsage): always use stderr even on windows
2489
2490 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
2491
2492         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
2493         (processParms): fixed bug #1247551
2494         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
2495         parseCmdLine, main): print '--version' to stdout,
2496         print 'help' to stdout if --help is given,
2497         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
2498         arguments are given; fixed --help
2499
2500 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
2501
2502         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
2503         * support/regression/tests/bug-1493710.c: added
2504
2505 2006-05-27 Borut Razem <borut.razem AT siol.net>
2506
2507         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
2508           static instead auto
2509         * support/regression/ports/pic16/support.c: increase stack size
2510           from default 64 bytes to 128 bytes
2511         * support/regression/tests/staticinit.c,
2512           support/regression/tests/float.c: regression tests fully enabled
2513           for pic16 port by putting the initialized data arrays into the code
2514           section
2515         * support/regression/ports/pic16/spec.mk: don't link default libraries.
2516           This was changed by mistake in the previous version.
2517
2518 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
2519
2520         * src/pic16/gen.c (genFunction, genEndFunction): some
2521         beautifications, fixed bug with falsely restoring FSR2 in large
2522         stack model, thanks to Beau E. Cox for reporting the bug
2523
2524 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2525
2526         * debugger/mcs51/break.c,
2527         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
2528           use %p to print pointers, made address variables unsigned
2529         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
2530         * debugger/mcs51/symtab.c (parseSymbol): must return something
2531         * src/mcs51/gen.c (aopForSym): small optimization,
2532            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
2533           (freeAsmop): added missing break,
2534           (aopPut): removed parameter bvolatile, determine it inside the function,
2535           (saveRegisters, unsaveRegisters): small optimization,
2536           (genIpush): removed pointless check,
2537           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
2538           replaced sprintf with SNPRINTF,
2539           replaced strcpy with strncpyz,
2540           updated aopPut calls,
2541           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
2542         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
2543
2544 2006-05-24 Borut Razem <borut.razem AT siol.net>
2545
2546         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
2547           modification of test for the pic16 port, put the array to the code
2548           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
2549
2550 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
2551
2552         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
2553         * support/Util/pstdint.h: added
2554
2555 2006-05-22 Borut Razem <borut.razem AT siol.net>
2556
2557         * src/regression/Makefile: removed bool2.c test, added -q linker option
2558         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
2559           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
2560           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
2561           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
2562           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
2563           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
2564           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
2565           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
2566           define SUPPORT_BIT_TYPES 0, removed unused bit variables
2567
2568 2006-05-22 Raphael Neider <rneider AT web.de>
2569
2570         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
2571           bug #1492360 (problematic due to generic pointers, see code)
2572
2573 2006-05-22 Borut Razem <borut.razem AT siol.net>
2574
2575         * support/regression/ports/pic16/specs.mk: removed stack size linker
2576           directive
2577         * support/regression/tests/array.c,
2578           support/regression/tests/bitopcse.c,
2579           support/regression/tests/bug-908454.c,
2580           support/regression/tests/malloc.c: modified for pic16 regression test
2581         * support/regression/tests/bitfields.c:
2582           pic16 - excluded bitfileds of size > 8
2583         * support/regression/tests/bp.c: pic16 - reduced data size
2584         * support/regression/tests/bug-221100.c: pic16 - reduced data size
2585         * support/regression/tests/bug-460010.c:
2586           pic16 - used the absolute address the fits in memory
2587         * support/regression/tests/bug-716242.c:
2588           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
2589         * support/regression/tests/float.c:
2590           pic16 - excluded - data size too big
2591         * support/regression/tests/onebyte.c:
2592           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
2593         * support/regression/tests/shifts.c:
2594           pic16 - function names probably have to differ in first X characters
2595           (gpasm limitation?)
2596         * support/regression/tests/staticinit.c:
2597           pic16 - excluded some tests due error: no target memory available for
2598           section ".idata"
2599
2600 2006-05-22 Borut Razem <borut.razem AT siol.net>
2601
2602         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
2603           second try. Thanks Stas Sergeev once more.
2604
2605 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2606
2607         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
2608           (genLeftShift, genRightShift): fixed bug 1491627
2609         * src/hc08/peeph.def (rules 7, 8.x): added
2610         * support/regression/tests/shifts.c (ShiftLeftByParam,
2611           ShiftRightByParam, testShiftByParam): added to test variable shifting
2612
2613 2006-05-20 Raphael Neider <rneider AT web.de>
2614
2615         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
2616         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
2617           (allocReg): add only new registers to dynAllocRegs,
2618           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
2619             #1489055, #1445850, and probably #1483693
2620
2621 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
2622
2623         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
2624         bug in for-loop that didn't emit the last of CONFIG and ID registers
2625
2626 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
2627
2628         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
2629           with offset
2630         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
2631           1489016, 1434401 and 1490124
2632         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
2633           1489016, 1434401 and 1490124
2634
2635 2006-05-17 Borut Razem <borut.razem AT siol.net>
2636
2637         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
2638           thanks Stas Sergeev
2639
2640 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2641
2642         * device/include/mcs51/P89c51RD2.h,
2643         * device/include/mcs51/P89LPC901.h,
2644         * device/include/mcs51/P89LPC922.h,
2645         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
2646
2647 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2648
2649         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
2650         to fix missing stack pragma in compiled binary object file,
2651
2652 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
2653
2654         * support/packihx/configure.in,
2655         * support/packihx/configure: removed warning, autoconf >= 2.5x can
2656         determine sizeof basic types even while cross compiling
2657
2658 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
2659
2660         * src/avr/gen.c (aopop),
2661         * src/ds390/gen.c (aopOp),
2662         * src/hc08/gen.c (aopOp),
2663         * src/mcs51/gen.c (aopop),
2664         * src/pic16/gen.c (pic16_aopOp),
2665         * src/pic/gen.c (aopOp),
2666         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
2667         if size of operand is smaller than spill location
2668
2669 2006-05-12 Borut Razem <borut.razem AT siol.net>
2670
2671         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
2672           have to have CR/LF line endings even if they are checked out on *nix
2673           or on WIN32 in cygwin binmode
2674
2675 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
2676
2677         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
2678         * device/include/ds80c390.h: added sfr16 definitions
2679         * src/ds390/gen.c,
2680         * src/ds390/gen.h,
2681         * src/ds390/main.c,
2682         * src/ds390/ralloc.c,
2683         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
2684           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
2685           bit returning functions
2686         * support/regression/tests/sfr16.c: enabled test on ds390
2687
2688 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2689
2690         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
2691         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
2692
2693 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
2694
2695         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
2696         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
2697           (cl_address_space constructor): removed expensive initialization,
2698           (cl_address_space::get_cell): extended for late initialization,
2699           (cl_address_space::*): use late initialization,
2700           (cl_address_decoder::activate): removed expensive initialization,
2701           This reduced regression test running time by 25%
2702
2703 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
2704
2705         * packihx/,
2706         * configure.in,
2707         * configure,
2708         * sdcc.dsw,
2709         * Makefile.bcc,
2710         * Makefile.in,
2711         * support/packihx/Makefile.in,
2712         * support/packihx/clean.mk,
2713         * support/packihx/Makefile.bcc,
2714         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
2715
2716 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2717
2718         * src/SDCCval.c (valNot): fix for regression test failure
2719           of not.c on big endian hosts
2720
2721 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
2722
2723         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
2724
2725 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2726
2727         * device/lib/mcs51/Makefile.in: changed string comparison operator
2728           to = for POSIX compliance; == is bash extension
2729
2730 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
2731
2732         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
2733           kosmonaut_pirx
2734
2735 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
2736
2737         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
2738         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
2739         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
2740         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
2741         bug report #1478657,
2742
2743 2006-05-05 Borut Razem <borut.razem AT siol.net>
2744
2745         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
2746           making the html
2747
2748 2006-05-02 Borut Razem <borut.razem AT siol.net>
2749
2750         * doc/Makefile.in: removed *.ind dependency since there is no rule to
2751           create *.ind, which made make to fail if invoked with -j 2
2752
2753 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
2754
2755         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
2756           Hubert Sack for patch 1479782
2757
2758 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
2759
2760         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
2761
2762 2006-05-01 Raphael Neider <rneider AT web.de>
2763
2764         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
2765           (create_pic): store only prefix-free device name,
2766           (init_pic): check for device names with "16" prefix,
2767           (list_valid_pics),
2768         * src/pic/device.h (struct PIC_device),
2769         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
2770             stored device name,
2771         * device/include/pic/pic12f{635,675,629,683}.h,
2772         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
2773         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
2774         * device/include/pic/pic16f505.h,
2775         * device/lib/pic/libdev/pic16f505.c: removed
2776         * device/include/pic/pic14devices.txt: added support for pic12f
2777             devices, removed unsupported non 16-bit devices
2778             [above changes provided by patch from Zik Saleeba]
2779         * src/pic/*, src/pic16/*, device/include/pic16/*,
2780           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
2781
2782 2006-05-01 Borut Razem <borut.razem AT siol.net>
2783
2784         * configure.in, configure, doc/Makefile.in:
2785           sync with nightly build makefile - latex, dvipdf and dvips
2786           not needed any more
2787
2788 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
2789
2790         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
2791         in the library source
2792
2793 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
2794
2795         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
2796
2797 2006-04-28 Raphael Neider <rneider AT web.de>
2798
2799         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
2800         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
2801           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
2802         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
2803
2804 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
2805
2806         * device/lib/pic/libdev/Makefile.in,
2807         * device/lib/hc08/Makefile.in,
2808         * device/lib/gbz80/Makefile.in,
2809         * device/lib/z80/Makefile.in,
2810         * device/lib/ds390/Makefile.in,
2811         * device/lib/ds400/Makefile.in: added srcdir to include search path,
2812         thanks to Borut for the bug report
2813         * configure.in,
2814         * configure: always create doc/Makefile independent from --enable-doc
2815         * Makefile.in: always install from directory doc independent from
2816         --enable-doc
2817         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
2818         removed
2819         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
2820         * doc/Makefile.in: install *.txt if present
2821         * device/include/Makefile.in (install): added installation of pic/*.inc
2822         and pic/*.txt files again, they were erroneously removed
2823
2824 2006-04-28 Raphael Neider <rneider AT web.de>
2825
2826         * src/pic/{gen.c,main.h,pcode.c},
2827         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
2828             concerning signedness with casts
2829
2830 2006-04-28 Raphael Neider <rneider AT web.de>
2831
2832         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
2833             definition of an interrupt handler,
2834         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
2835             interrupt handler stuff from picglue() to separate routine,
2836           (picglue): enabled definition of intr handlers in files w/o main()
2837
2838 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2839
2840         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
2841           compilation with MSVC 2005 Express Edition (VC8)
2842
2843 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
2844
2845         * device/lib/Makefile: fixed build of gbz80 lib
2846
2847 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2848
2849         * support/regression/tests/bug-460010.c,
2850         * support/regression/tests/bug-524691.c,
2851         * support/regression/tests/bug-716242.c: removed conditional defines
2852           that are already in testfwk.h
2853
2854 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2855
2856         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
2857           (AccAXRsh1): added, shift right by 1,
2858           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
2859            AccAXLrl1
2860         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
2861
2862 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
2863
2864         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
2865         remove cast to same type
2866         * src/SDCCast.c (decorateType): fix for RFE 1475742,
2867         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
2868         * as/z80/Makefile,
2869         * link/z80/Makefile: removed, they have moved to
2870         Makefile.in files
2871         * configure,
2872         * configure.in: replaced duplicate message about ucsim by missing sdcpp
2873         * install-sh: fix bug #1204398 by setting umask 0022
2874         * device/lib/Makefile: separate build of z80 and gbz80 lib
2875
2876 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
2877
2878         Enabled VPATH feature: changed nearly all Makefiles (149 files).
2879         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
2880
2881         One basic decision: e.g. src/clean.mk includes further files. In order
2882         to make this work there are two solutions:
2883         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
2884           run configure on them. This way they can use
2885           'include $(srcdir)/port-clean.mk'
2886         - always include clean.mk by the Makefile at the same level. To avoid
2887           that `make clean` tries to include and build Makefile.dep the
2888           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
2889           implemented, because now even `make uninstall` doesn't create
2890           Makefile.in. clean.mk could be eliminated by pasting it in
2891           Makefile.in.
2892
2893         * debugger/mcs51/Makefile.in: build own objects from library sources
2894         (SLIB, SDCC) in current directory
2895
2896         * configure, configure.in: renamed --disable-device-lib-build in
2897         --disable-device-lib; added --enable-doc, the required tools are
2898         searched by configure; added result message; the toolchain for the
2899         belonging ports are now only built, if the port is enabled.
2900
2901         * support/regression/*: all output is written in directory gen, because
2902         the fwk and ports directories don't livet in the build tree using vpath
2903
2904         * doc/sdccman.lyx: renamed --disable-device-lib-build to
2905         --disable-device-lib, added --enable-doc, added section VPATH
2906
2907         * sim/ucsim/configure.in,
2908         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
2909         z80 are enabled by default
2910
2911 2006-04-24 Raphael Neider <rneider AT web.de>
2912
2913         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
2914             to config word, "pic14_"-prefixed some extern functions
2915           (pic14_emitConfigWord): emit __config directive(s) if assignment to
2916             config word has been found
2917         * src/pic/device.h: added prototypes
2918         * src/pic/pcode.c: added "pic14_"-prefix where needed
2919         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
2920             fixup
2921         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
2922             words,
2923           (pic14emitRegularMap): ignore config words,
2924           (pic14createInterruptVect): moved generating __config directives away
2925           (picglue): have __config directives emitted
2926
2927 2006-04-24 Borut Razem <borut.razem AT siol.net>
2928
2929         * doc/Makefile: sync with nightly build makefile
2930
2931 2006-04-24 Raphael Neider <rneider AT web.de>
2932
2933         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
2934             registers that have not been assigned proper liveranges,
2935             fixes #1469504 and #1474602,
2936           (pCodeRegOptimizeRegUsage): fixed typo in comment
2937
2938 2006-04-24 Borut Razem <borut.razem AT siol.net>
2939
2940         * device/examples/main8051.c: deleted - it was removed from CVS
2941           24.mar.2000 and after that modified 18.feb.2001, so it reappered
2942           after the transition to Subversion
2943         * src/SDCCalloc.h: deleted - it was removed  from CVS
2944           3.feb.2001 and after that modified 18.feb.2001, so it reappered
2945           after the transition to Subversion
2946         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
2947           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
2948           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
2949           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
2950
2951 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
2952
2953         * as/asx8051.dsp: added mcs51/strcmpi.h
2954         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
2955         * as/hc08/aslink.h: updated lnksect prototype
2956         * as/hc08/asm.h,
2957         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
2958         * as/hc08/asmain.c,
2959         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
2960           (newdot): handle A_ABS
2961         * as/hc08/asout.c,
2962         * as/mcs51/asout.c (outarea): output address
2963         * as/hc08/lkaomf51.c,
2964         * as/mcs51/lkaomf51.c: disabled unused array UsageType
2965         * as/hc08/m08pst.c,
2966         * as/mcs51/i51pst.c,
2967         * as/z80/z80pst.c: "ABS" is not A_OVR
2968         * as/hc08/lkarea.c (newarea): read a_addr,
2969           (lnkarea): added codemap array, sort absolute areas to the front,
2970            combine all GSINITx/GSFINAL,
2971           (find_empty_space, allocate_space): new functions,
2972           (lnksect): return next address, handle absolute sections
2973         * as/mcs51/lkarea.c (newarea): read a_addr,
2974           lnksect2 prototype changed,
2975           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
2976           (find_empty_space, allocate_space): new, factored out of lnksect2,
2977           (lnksect2): return next address, handle absolute sections
2978         * as/hc08/lkhead.c,
2979         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
2980         * as/hc08/lklibr.c (addfile, fndsym),
2981         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
2982           index out of range and detect both '\' and '/'
2983         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
2984         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
2985           regression tests (ds390 cannot return bool yet)
2986         * doc/sdccman.lyx: changed version number, document changed --no-peep,
2987           document critical interrupts on z80, document changed SDCC define
2988         * src/asm.c (_asxxxx_mapping): fixed .org directive,
2989           (_a390_mapping): added .org directive
2990         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
2991           (genMultOneByte): fixed warnings
2992         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
2993           ones
2994         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
2995         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
2996           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
2997         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
2998         * src/pic16/main.c: removed newReg prototype
2999         * src/pic16/pcode.c,
3000         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
3001           warnings
3002         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
3003           ones
3004         * src/pic16/ralloc.c
3005         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
3006           to fix warnings
3007         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
3008           from short to PIC_OPTYPE
3009         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
3010         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
3011           optype from short to PIC_OPTYPE
3012         * src/port.h: made int_size unsigned to fix warnings
3013         * src/SDCC.y: fixed warning on MSVC
3014         * src/SDCCicode.c (getArraySizePtr): return unsigned int
3015         * src/SDCCopt.c (convertToFcall): fixed warnings
3016         * src/SDCCsymt.h: removed double prototype for genSymName
3017         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
3018           offset int to fix warnings
3019
3020 2006-04-22 Borut Razem <borut.razem AT siol.net>
3021
3022         * doc/sdccman.lyx, */Makefile, */Makefile.in:
3023           references to CVS replaced with Subversion
3024
3025 2006-04-21 Borut Razem <borut.razem AT siol.net>
3026
3027         * doc/sdccman.lyx, */Makefile, */Makefile.in:
3028           references to CVS replaced with Subversion
3029
3030 2006-04-19 Borut Razem <borut.razem AT siol.net>
3031
3032         * src/version.awk: adapted for svn
3033         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
3034           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
3035           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
3036           /binutils-avr/etc/*.vi, *.jin: removed all properties
3037           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
3038
3039 2006-04-19 Borut Razem <borut.razem AT siol.net>
3040
3041         * CVS to Subversion migration completed
3042
3043 2006-04-18 Borut Razem <borut.razem AT siol.net>
3044
3045         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
3046           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
3047
3048 2006-04-17 Borut Razem <borut.razem AT siol.net>
3049
3050         * device/include/Makefile.in: added pic/*.inc to the installation
3051
3052 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
3053
3054         * support/regression/collate-results.py: fixed output in case of
3055         a valdiag error
3056         * support/regression/generate-cases.py: fixed splitting of pathnames
3057         with dots
3058         * as/hc08/lklibr.c (addfile),
3059         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
3060
3061 2006-04-11 Raphael Neider <rneider AT web.de>
3062
3063         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
3064         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
3065         * src/pic16/pcode.c (assignValnums): fixed #1460578
3066
3067 2006-04-11 Raphael Neider <rneider AT web.de>
3068
3069         * device/lib/pic/libdev/*.c,
3070         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
3071           fixes #1468739, enables compilation in --std-c99 mode
3072         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
3073
3074 2006-04-11 Raphael Neider <rneider AT web.de>
3075
3076         * src/pic/device.c (find_device): removed debug output
3077           (list_valid_pics): enabled verbose listing of supported devices
3078         * device/include/stdbool.h: define bool as char for pic14/16 as well
3079
3080 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3081
3082         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
3083
3084 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
3085
3086         * .version: bumped version to 2.5.6
3087         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
3088
3089 2006-04-06 Raphael Neider <rneider AT web.de>
3090
3091         * .version: bumped version to 2.5.6 (pic14 ABI changed)
3092         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
3093         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
3094           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
3095             pic14_constructAbsMap
3096           (pic14printPublics): declare absolute global symbols as global
3097           (pic14createInterruptVect),
3098         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
3099           (newReg): assume new registers unused, use correct name in
3100             hashtable (reg->name instead of name), more debugLog output
3101         * src/pic/device.h (PIC_device): added fields for verbose output
3102         * src/pic/device.c: moved device definition to pic14devices.txt,
3103             added routines for runtime parsing of pic14devices.txt,
3104             added support for second config word
3105         * src/pic/main.c (_process_pragma): removed #pragma maxram,
3106           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
3107           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
3108           (_pic14_parseOptions): moved pCodeInitRegisters here
3109           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
3110         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
3111           (pCodeInitRegisters): rewrapped comments, perpared new approach to
3112             handling the pseudo stack
3113         * device/lib/Makefile.in: ignore failures in objects-pic16,
3114         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
3115         * device/lib/pic/NEWS: document new dependency on picXXX.lib
3116         * device/lib/pic/Makefile.subdir,
3117         * device/lib/pic16/Makefile.subdir: improved clean rules
3118         * device/lib/pic/libdev/: NEW, pic14 device libraries
3119         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
3120         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
3121         * device/include/Makefile.in: create subdir and install pic14 headers
3122         * device/include/pic/p16f_common.inc: removed unused declarations
3123         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
3124             PICs from inc2h.pl v1.6,
3125             replaced BIT_AT macros with struct declarations
3126         * device/include/pic/pic14devices.txt: definition of supported devices,
3127             all above improvements contributed by Zik Saleeba, thanks
3128         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
3129         * support/scripts/sdcc.nsi: also install pic14 device libraries and
3130             headers
3131
3132 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3133
3134         * device/include/mcs51/c8051f410.h: added interrupt numbers,
3135         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
3136           thanks to Charles Olds
3137
3138 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3139
3140         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
3141
3142 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
3143
3144         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
3145         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
3146         * support/regression/bug1464657.c: added, new test
3147
3148 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
3149
3150         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
3151           version number
3152
3153 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
3154
3155         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
3156           --no-peep and --peep-file <file> are used don't use default rules but
3157           do use the <file>
3158
3159 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
3160
3161         * src/mcs51/gen.c (genCall): fixed bug 1457608
3162
3163 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3164
3165         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
3166         changes seem to cause (trigger?) problems with the build system.
3167
3168 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
3169
3170         * src/SDCCpeeph.c (operandsLiteral): new, added,
3171           (callFuncByName): inserted operandsLiteral
3172         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
3173
3174 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3175
3176         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
3177         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
3178
3179 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3180
3181         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
3182           implemented patch 1120823 Thanks to Willy De la Court (normal
3183           interrupts need an interrupt number now if they are made critical),
3184           and enabled nesting of critical functions though not for gbz80
3185           (genCritical, genEndCritical): added functions
3186           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
3187         * src/z80/mappings.i: added "ei" to all mappings
3188
3189 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3190
3191         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
3192         submitted by the Debian SDCC maintainer Aurelien Jarno:
3193         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
3194         archive with gcc 4.1 on mips and wrote the patch"
3195
3196 2006-03-16 Raphael Neider <rneider AT web.de>
3197
3198         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
3199           the left operand is shorter than the result (c* = lit-c* + int),
3200           fixes bug #1450796
3201         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
3202           OP_SYMBOL
3203
3204 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3205
3206         * src/.version: increased version number to 2.5.5
3207         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
3208         linking is done manually in pic16 port's _linkEdit,
3209         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
3210         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
3211         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
3212         allocate asmop as AOP_ACC,
3213         (aopForRemat): added parameter 'bool result' in function declaration,
3214         (pic16_aopGet): return AOP_ACC when accessing WREG,
3215         (pic16_popGetTempReg): minor modification,
3216         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
3217         'pic16_allocWithIdx',
3218         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
3219         calling function in absolute addresses,
3220         (genAssign): take into account AOP_ACC asmop,
3221         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
3222         * src/pic16/pcoderegs.c: some debug functions and lines added,
3223         * src/pic16/ralloc.c (decodeRegType): added but commented out,
3224         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
3225         register too,
3226         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
3227         call to allocReg, not by manually allocating a new one,
3228         (pic16_assignRegisters): now before going through the register
3229         allocating functions mark all registers as free. This eliminates some
3230         side effects resulting from peephole parser done earlier in the backbone
3231
3232 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
3233
3234         * src/SDCCicode.c (geniCodeLogic),
3235         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
3236
3237 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
3238
3239         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
3240           (genSend): bugfix, do not allocate and free twice,
3241           (shiftRLong): handle partially overlapping aops
3242         * support/regression/tests/bitopcse.c: fixed warning redefined idata
3243
3244 2006-03-08 Borut Razem <borut.razem AT siol.net>
3245
3246         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
3247           for pic16
3248
3249 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
3250
3251         * support/regression/tests/bug1409955.c: new, added
3252         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
3253         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
3254           (aopForSym, aopOp): increment asmop.allocated if reused,
3255           (freeAsmop): decrement asmop.allocated and check for zero instead of
3256           using asmop.freed,
3257           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
3258           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
3259            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
3260            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
3261            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
3262            genSignedRightShift, genRightShift, genDataPointerGet,
3263            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
3264            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
3265             in reverse order from allocation,
3266           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
3267             added swappedLR to keep track
3268         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
3269           pdata & code for GCC, z80, gbz80 & hc08
3270         * support/regression/tests/zeropad.c: moved defines to testfwk.h
3271
3272 2006-03-08 Raphael Neider <rneider AT web.de>
3273
3274         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
3275
3276 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
3277
3278         * device/include/mcs51/c8051f410.h: new SiLabs mcu
3279         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
3280         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
3281
3282 2006-03-06 Borut Razem <borut.razem AT siol.net>
3283
3284         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
3285           made the linker quiet
3286
3287 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
3288
3289         * src/pic16/gen.c (genPcall): fixed bug #1443644
3290         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
3291         which dumps before the function entry point a data byte which represents
3292         the number of the local variables used by the specified function, added
3293         'xinst' for initial support for Extended Instruction Support,
3294         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
3295         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
3296         port->fun_prefix anymore (may change later),
3297         (genFunction, genEndFunction): do not store/restore local registers for
3298         _main (this should take care the --main-return command line option in
3299         the future),
3300         (genOr): removed some legacy pic-port instructions,
3301         * src/pic16/genarith.c (genAddLit): re-enabled old code because
3302         performing operations with SFR's causes data to be written more than
3303         once to each SFR. Perhaps SFRs should be handled in special cases...
3304         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
3305         pcode.h
3306         * src/pic16/main.c (_process_pragma): stack bound checking did not take
3307         into account for stack starting position,
3308         (struct OPTIONS pic16_optionsTable): added command line argument
3309         --extended or -y for Extended Instruction Support,
3310         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
3311         (deassignLRs): *** perhaps the most important change, old 'for' code
3312         (commented out for reference), didn't account for some registers which
3313         were left marked 'not free' after a pointer operation. The change
3314         reduces register usage a lot in some cases
3315
3316 2006-03-04 Borut Razem <borut.razem AT siol.net>
3317
3318         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
3319           _clean
3320         * support/regression/tests/bug-524697.c: decreased array size for
3321           mcs51 to fit into the internal RAM
3322         * support/regression/Makefile.in: a little bit more verbose
3323
3324 2006-03-03 Borut Razem <borut.razem AT siol.net>
3325
3326         * support/regression/fwk/lib/testfwk.c,
3327           support/regression/fwk/include/testfwk.h: introduced function
3328           _prints(), nonrecursive _printn(), call _initEmu() from main()
3329         * support/regression/ports/gbz80/support.asm,
3330           support/regression/ports/ucz80/support.asm,
3331           support/regression/ports/z80/support.asm,
3332           support/regression/ports/ds390/support.c,
3333           support/regression/ports/hc08/support.c,
3334           support/regression/ports/host/support.c,
3335           support/regression/ports/mcs51/support.c,
3336           support/regression/ports/xa51/support.c: added empty _initEmu()
3337           function
3338         * support/regression/ports/pic16/gpsim.cmd,
3339           support/regression/ports/pic16/spec.mk,
3340           support/regression/ports/pic16/support.c,
3341           support/regression/Makefile.in: added pic16 regression test
3342
3343 2006-03-01 Raphael Neider <rneider AT web.de>
3344
3345         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
3346           genConstPointerGet): use safe way of generating MOVFF to cover
3347             literals as well as registers, fixes bug #1440527
3348         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
3349             dereference
3350           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
3351             more correctly, fixes bug #1232186
3352           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
3353         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
3354             gplink guess the correct processor in more cases, applied patch
3355             from Till Riedel attached to and fixing bug #1436552
3356
3357 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3358
3359         * support/regression/tests/array.c: added, contains check for #1434401
3360         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
3361
3362 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
3363
3364         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
3365         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
3366         * device/include/mcs51/c8051f326.h,
3367         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
3368         * device/include/mcs51/c8051f000.h,
3369         * device/include/mcs51/c8051f018.h,
3370         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
3371           PCON_IDLE,PCON_STOP and added sfr16 definitions
3372
3373 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
3374
3375         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
3376           genGetWord): fixed bug 1409955
3377
3378 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
3379
3380         * device/include/hc08/mc68hc908gp32.h,
3381         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
3382
3383 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
3384
3385         * src/SDCCast.c (constExprValue): return NULL if not a value
3386         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
3387         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
3388         * support/regression/tests/bitfields.c: enabled signed bitfield for all
3389
3390 2006-02-13 Borut Razem <borut.razem AT siol.net>
3391
3392         * src/regression/ptrarg.c: added, fails due to bug #1430967
3393         * src/regression/Makefile: ptrarg.c added, ...
3394
3395 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
3396
3397         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
3398         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
3399
3400 2006-02-11 Borut Razem <borut.razem AT siol.net>
3401
3402         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
3403           print "Processor: xxx" message to stdout only if --verbose
3404
3405 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3406
3407         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
3408         * support/regression/tests/bug1426356.c: added
3409         * support/regression/tests/bitfields.c: removed 2 tests
3410
3411 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3412
3413         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
3414         * device/include/mcs51/c8051f330.h,
3415         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
3416           PCON_IDLE,PCON_STOP and added sfr16 definitions
3417         * device/lib/_divsint.c,
3418         * device/lib/_divuint.c,
3419         * device/lib/_divulong.c,
3420         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
3421           register bank bug for small stackauto
3422
3423 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3424
3425         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
3426
3427 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
3428
3429         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
3430         * all.dsp: corrected several bin paths
3431         * device/include/mcs51/c8051f120.h,
3432         * device/include/mcs51/c8051f300.h,
3433         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
3434           to PCON_IDLE,PCON_STOP
3435         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
3436         * device/lib/printf_large.c (output_float): fixed bug 1388703
3437         * support/regression/tests/bug1057979.c: added test for bug 1388703
3438
3439 2006-02-08 Raphael Neider <rneider AT web.de>
3440
3441         * src/pic/pcode.c (pciTRIS): fixed typo,
3442           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
3443           (LinkFlow): fixed handling of flows that end in a call,
3444           (ReuseReg): perform safety check earlier
3445         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
3446             to work with flows at the beginning of a pBlock,
3447             fixes #1426557 (Symbol not previously defined),
3448           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
3449             usage information
3450           (RemoveUnusedRegisters): update register usage info
3451         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
3452             created, reuse existing ones instead
3453         * src/pic/gen.c (genPcall): fixed #1424719
3454
3455 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
3456
3457         * link/z80/lkmain.c,
3458         * link/z80/lklex.c,
3459         * link/z80/lkdata.c,
3460         * link/z80/aslink.h: fixed build on current cygwin:
3461         replaced getline() by lk_getline()
3462
3463 2006-02-01 Borut Razem <borut.razem AT siol.net>
3464
3465         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
3466           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
3467           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
3468           src/regression/bool1.c, src/regression/bool2.c,
3469           src/regression/bool3.c, src/regression/call1.c,
3470           src/regression/compare.c, src/regression/compare10.c,
3471           src/regression/compare2.c, src/regression/compare3.c,
3472           src/regression/compare4.c, src/regression/compare5.c,
3473           src/regression/compare6.c, src/regression/compare7.c,
3474           src/regression/compare8.c, src/regression/compare9.c,
3475           src/regression/configword.c, src/regression/for.c,
3476           src/regression/inline.c, src/regression/mult1.c,
3477           src/regression/nestfor.c, src/regression/or1.c,
3478           src/regression/pointer1.c, src/regression/ptrfunc.c,
3479           src/regression/rotate1.c, src/regression/rotate2.c,
3480           src/regression/rotate3.c, src/regression/rotate4.c,
3481           src/regression/rotate5.c, src/regression/rotate6.c,
3482           src/regression/rotate7.c, src/regression/string1.c,
3483           src/regression/struct1.c, src/regression/sub.c,
3484           src/regression/sub2.c, src/regression/switch1.c,
3485           src/regression/while.c, src/regression/xor.c,
3486           src/regression/create_stc, src/regression/simulate,
3487           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
3488           regression tests
3489         * src/regression/gpsim_assert.h: added
3490
3491 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
3492
3493         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
3494         ((void (code *) (void)) 0) ();
3495         * as/hc08/aslex.c,
3496         * as/hc08/aslink.h,
3497         * as/hc08/asm.h,
3498         * as/hc08/asmain.c,
3499         * as/hc08/lkdata.c,
3500         * as/hc08/lklex.c,
3501         * as/hc08/lkmain.c,
3502         * as/mcs51/aslex.c,
3503         * as/mcs51/aslink.h,
3504         * as/mcs51/asm.h,
3505         * as/mcs51/asmain.c,
3506         * as/mcs51/lkdata.c,
3507         * as/mcs51/lklex.c,
3508         * as/mcs51/lkmain.c,
3509         * as/z80/aslex.c,
3510         * as/z80/asm.h,
3511         * as/z80/asmain.c: fixed build on current cygwin:
3512         replaced getline() by as_getline()
3513
3514 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
3515
3516         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
3517         declarator in the symbol chain
3518         * src/SDCCsymt.h,
3519         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
3520         parameter list for function pointers
3521         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
3522         * support/regression/tests/bug-716242.c: added
3523
3524 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
3525
3526         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
3527         offset if possible
3528         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
3529
3530 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
3531
3532         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
3533         inifinitely recurseable, added static
3534         * support/regression/tests/bug-1408066.c: added
3535
3536 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
3537
3538         * src/SDCCicode.h,
3539         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
3540         renamed, added possibility to create "postLoopLbl"-labels
3541         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
3542         newiTempLoopHeaderLabel
3543         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
3544         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
3545         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
3546         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
3547         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
3548         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
3549         (basicInduction): fixed bug #136564, made static,
3550         (loopInduction): changed parameter of basicInduction, made static,
3551         (addPostLoopBlock): added
3552         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
3553         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
3554         findLoopEndSeq
3555         * support/regression/tests/bug-136564.c: added
3556         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
3557         --std-sdcc99 to LIBSDCCFLAGS
3558
3559 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
3560
3561         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
3562         while loop
3563         * support/regression/tests/bug-1406131.c: added
3564
3565 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
3566
3567         * src/SDCCast.c (decorateType): fix promotion of unary minus
3568         * src/SDCCsymt.c (computeType): beautified
3569         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
3570         (valUnaryPM, valComplement): fix sign and promotion,
3571         (valNot): ANSI: result type is int (SDCC: unsigned char)
3572         * support/regression/tests/uminus.c: speedup by removing superflous
3573         test case 'int'
3574         * support/regression/tests/onebyte.c: added promotion and signedness
3575         tests for unary minus
3576         * support/regressions/tests/bug-477927.c: disable warning about
3577         uninitialized variables
3578         * support/regression/tests/not.c: added
3579
3580 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
3581
3582         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
3583         * src/mcs51/gen.c (gen51Code): show final register usage after
3584         fillGaps in asm with --i-code-in-asm
3585         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
3586         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
3587         incUsed, rliveClear, adjustIChain): made static,
3588         (setFromRange): excluded because it's unused,
3589         (findPrevUseSym, markWholeLoop): added,
3590         (findPrevUse): rewritten; fixes bug 895992; now a complete search
3591         through all branches of predecessors enables sdcc to emit the warning
3592         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
3593         (rlivePoint): made static, added parameter emitWarnings which is only
3594         true during the first run out of two,
3595         (findRecursiveSucc, findRecursivePred): removed,
3596         (computeLiveRanges): made static, added parameter emitWarnings,
3597         (dumpIcRlive): added for debugging only
3598         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
3599         removed prototype of setFromRange()
3600         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
3601         in call of computeLiveRanges()
3602         * support/regression/tests/bug-895992.c: added
3603         * support/regression/tests/bug-971834.c: added
3604         * support/valdiag/tests/bug-895992.c: added
3605         * support/valdiag/tests/bug-971834.c: added
3606
3607 2005-12-18 Raphael Neider <rneider AT web.de>
3608
3609         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
3610           (genUnpackBits): improved code for direct operands,
3611           (genPackBits): improved code for literal assignment to bitfields
3612             and for direct destination operands (no FSR indirection),
3613             prevented redundant AND, fixes #1362800,
3614           (AccLsh): added parameter to disable masking of the result
3615         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
3616           skip instructions with side-effects (like incfsz),
3617           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
3618         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
3619         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
3620           fixes #1375263
3621
3622 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
3623
3624         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
3625         volatile variables as spill location
3626
3627 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
3628
3629         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
3630         replacing literals
3631         * support/regression/tests/bug-1376320.c: added
3632
3633 2005-12-08 Raphael Neider <rneider AT web.de>
3634
3635         * src/pic/device.c: renamed is_shared to pic14_is_shared
3636         * src/pic/gen.c (genIfx): re-enabled handling of sbits
3637         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
3638           (is_valid_identifier): added for above workaround
3639
3640 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
3641
3642         * device/lib/Makefile.in: fixed to enable port-specific-objects
3643         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
3644           char, thanks Hubert Sack
3645         * doc/sdccman.lyx: documented --xstack-loc,
3646           elaborated a bit more on interrupts and pitfalls,
3647           removed "setjmp/longjmp unsupported",
3648           documented some unsupported C99 features
3649         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
3650         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
3651           if, thanks Hubert Sack
3652         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
3653         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
3654           make make_library
3655         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
3656           regression tests can report resource usage (rfe 700441)
3657         * support/regression/collate-results.py: report resource usage
3658         * support/regression/ports/ds390/spec.mk,
3659         * support/regression/ports/hc08/spec.mk,
3660         * support/regression/ports/mcs51/spec.mk,
3661         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
3662         * support/regression/ports/ds390/uCsim.cmd,
3663         * support/regression/ports/hc08/uCsim.cmd,
3664         * support/regression/ports/mcs51/uCsim.cmd,
3665         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
3666         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
3667           library, use the default one
3668         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
3669           building the library
3670
3671 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
3672
3673         * config.dsp: added dependency on .version and configure_vc.awk
3674         * device/include/setjmp.h: updated for --stack-auto and --xstack
3675         * device/include/mcs51/at89c51snd1c.h: corrected line endings
3676         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
3677         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
3678         * device/lib/libsdcc.lib: added _setjmp
3679         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
3680           (decorateType): fixed bug 1372851,
3681           (optimizeGetHbit): fixed warning
3682         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
3683           array initialisation
3684         * support/regression/tests/bug1057979.c: added test for bug 1358192
3685         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
3686
3687 2005-12-03 Borut Razem <borut.razem AT siol.net>
3688
3689         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
3690           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
3691
3692 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
3693
3694         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
3695         createIval): implement symbol independant "flexible array member",
3696         (createIvalCharPtr): implemented flexible array initialisation with a
3697         string
3698         * src/SDCCsymt.c (copyStruct): removed,
3699         (getSize): fixed misleading comment,
3700         (getAllocSize): removed, the additional allocation size is now in
3701         sym->flexArrayLength,
3702         (checkStructFlexArray): new, syntax checks for flexible array members,
3703         (compStructSize): added syntax checks for "flexible array members"
3704         (copyStruct): removed,
3705         (copyLinkChain): removed inefficient fix for bug 770487
3706         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
3707         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
3708         symbol->flexArrayLength
3709         * src/SDCCerr.c,
3710         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
3711         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
3712         * support/regression/tests/structflexarray.c: added
3713         * support/valdiag/tests/structflexiblearray.c: added
3714
3715 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
3716
3717         * src/SDCCast.c (decorateType): fixed bug 1368489
3718         * support/Util/SDCCerr.c,
3719         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
3720
3721 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3722
3723         * device/include/mcs51/at89c51snd1c.h: added file submitted by
3724           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
3725
3726 2005-11-27 Borut Razem <borut.razem AT siol.net>
3727
3728         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
3729           support/cpp2/mkdeps.h: added command line option
3730           -obj-ext=<extension> to SDCPP to define object file externion, used
3731           for generation of make dependencies (-M)
3732         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
3733
3734 2005-11-26 Borut Razem <borut.razem AT siol.net>
3735
3736         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
3737           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
3738           added pic and pic16 libraries
3739
3740 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3741
3742         * device/include/float.h: Corrected typo in prototype of __fsgt
3743
3744 2005-11-25 Borut Razem <borut.razem AT siol.net>
3745
3746         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
3747           added creation of model-mcs51-stack-auto libraries
3748
3749 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
3750
3751         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
3752         and fields-list too
3753         * src/SDCCast.c (createIvalArray): removed obsolete comment
3754
3755 2005-11-24 Borut Razem <borut.razem AT siol.net>
3756
3757         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
3758           added missing device/lib/mcs51/crt*.asm sources
3759
3760 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
3761
3762         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
3763
3764 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
3765
3766         * device/lib/_fs2schar.c,
3767         * device/lib/_fs2sint.c,
3768         * device/lib/_fs2slong.c: optimized inline asm
3769
3770 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3771
3772         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
3773           Better handling of floats between -1.0 and 0.0.
3774
3775 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3776
3777         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
3778           (the missing "if"s prohibited removal of redundant labels)
3779
3780 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3781
3782         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
3783           Properly convert floats between -1.0 and 0.0 to long, int, and char
3784           types (max integer value of negative floats tends to zero).
3785         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
3786           Removed changes made so to work properly with floats between
3787           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
3788           and _fs2char.c
3789
3790 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
3791
3792         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
3793         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
3794         (genCast) cosmetic change
3795         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
3796         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
3797         from mcs51
3798         * support/regression/tests/bitfields (testSignedBitfields): added
3799
3800 2005-11-18 Borut Razem <borut.razem AT siol.net>
3801
3802         * sdcc/device/lib/Makefile.in: remove all unnecessary files
3803         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
3804           introduced SILENT option to make building of pic16 libraries less
3805
3806 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3807
3808         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
3809           Now they work properly with floats between -1.0 and 0.0
3810         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
3811
3812 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3813
3814         * src/SDCCicode.c (printOperand): added missing else
3815
3816 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
3817
3818         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
3819         reformatted for better readability
3820         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
3821         signed bitfields
3822
3823 2005-11-17 Borut Razem <borut.razem AT siol.net>
3824
3825         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
3826           introduced SILENT option to make building of pic16 libraries less
3827           verbose - used for nightly snapshot build
3828         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
3829           available on Win32 platforms.
3830         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
3831           medium, large, pic and pic16
3832
3833 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3834
3835         * device/lib/printf_large.c: Temporary patch for bug 1358192:
3836           printf("%f"...) sets fraction to zero.
3837
3838 2005-11-16 Raphael Neider <rneider AT web.de>
3839
3840         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
3841           fixes #1357221
3842         * src/pic/gen.c (genIfx): implemented for CARRY bit
3843         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
3844           to generic pointers, fixes #1357332,
3845           (pic16_movLit2f): NEW,
3846           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
3847
3848 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3849
3850         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
3851
3852 2005-11-11 Raphael Neider <rneider AT web.de>
3853
3854         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
3855         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
3856           compute pointer's type from operand,
3857           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
3858           improved single bit reads, fixes bug #1353379
3859
3860 2005-11-09 Borut Razem <borut.razem AT siol.net>
3861
3862         * support/scripts/sdcc.nsi: added lib/pic to the package
3863
3864 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
3865
3866         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
3867
3868 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3869
3870         * support/regression/tests/bug1348008.c: added
3871         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
3872         * support/regression/tests/bug1337835.c: updated comment
3873
3874 2005-11-06 Borut Razem <borut.razem AT siol.net>
3875
3876         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
3877           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
3878           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
3879           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
3880           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
3881           dynamic construction of cl_error_class and derivates - 2.nd try
3882
3883 2005-11-05 Borut Razem <borut.razem AT siol.net>
3884
3885         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
3886           bug, which caused Bus Errors on sparc solaris
3887
3888 2005-11-04 Borut Razem <borut.razem AT siol.net>
3889
3890         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
3891           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
3892           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
3893           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
3894           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
3895           and derivates to resolve the initialization problem on OSX
3896
3897 2005-11-02 Borut Razem <borut.razem AT siol.net>
3898
3899         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
3900           corrected typo - #include <winsock2.h>
3901
3902 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
3903
3904         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
3905           (_asxxxx_mapping): added org directive for future enhancements
3906
3907 2005-11-01 Borut Razem <borut.razem AT siol.net>
3908
3909         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
3910           enabled sockets on WIN32
3911         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
3912
3913 2005-10-31 Borut Razem <borut.razem AT siol.net>
3914
3915         * support/regression/generate-cases.py: escape backslashes in {testcase}:
3916           WIN32 backslash path delimiters should be escaped when used in C strings
3917         * support/regression/tests/bitfields.c: exclude failing assertions for
3918           __CYGWIN32__ and __MINGW32__ hosts
3919
3920 2005-10-30 Borut Razem <borut.razem AT siol.net>
3921
3922         * src/SDCCutil.c: corrected double comparison typo
3923
3924 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
3925
3926         * device/lib/medium/Makefile: added for new memory model medium
3927         * device/include/asm/mcs51/features.h: updated for medium/pdata
3928         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
3929           added Multiply & Accumulate sbit's and MAC0_PAGE define
3930         * device/include/mcs51/c8051f300.h: added sfr16 definitions
3931         * device/include/mcs51/c8051f310.h: added sfr16 definitions
3932         * device/lib/_mullong.c: update for medium model
3933         * device/lib/incl.mk: added medium model
3934         * doc/sdccman.lyx: documented medium model
3935         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
3936         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
3937         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
3938         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
3939           (allocParms): set SCLS and OCLS to pdata for medium model
3940         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
3941           for pdata,
3942           (powof2): return <0 if not power of 2
3943         * src/avr/gen.c (genBitWise): use updated powof2
3944         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
3945           (shiftR2Left2Result): small optimization in setup, save acc when storing,
3946           (shiftLLeftOrResult): use B if necessary
3947         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
3948         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
3949         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
3950         * support/regression/Makefile.in: added test-mcs51-medium
3951         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
3952
3953 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
3954
3955         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
3956         specifier unsigned
3957         * device/lib/time.c (mktime): fixed bug 1334315
3958
3959 2005-10-28 Raphael Neider <rneider AT web.de>
3960
3961         * device/include/pic/p16f_common.inc: added common declarations
3962         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
3963
3964 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
3965
3966         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
3967           (aopPutUsesAcc): added to predict accumulator use,
3968           (assignResultValue): save acc if necessary,
3969           (genMinusDec): store result if indirectly addressed,
3970           (genDivOneByte):  save acc if necessary,
3971           (movLeft2Result): bugfix if left already in acc,
3972           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
3973             attention to accumulator use (esp. pdata),
3974           (genReceive): receive pdata correctly
3975         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
3976         * src/SDCCicode.h: added isOperandInPagedSpace prototype
3977
3978 2005-10-27 Raphael Neider <rneider AT web.de>
3979
3980         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
3981
3982 2005-10-27 Raphael Neider <rneider AT web.de>
3983
3984         * .version: changed version to 2.5.4
3985         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
3986         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
3987           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
3988             arithmetics support routines
3989         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
3990         * device/lib/Makefile.in: also create installdir for pic
3991
3992         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
3993           pic14 port as well
3994         * src/pic/device.c (dump_sfr): rewritten to delegate register
3995           placement to the linker (use `extern sym' rather than sym EQU addr),
3996           (validAddress): fixed to check last specified address
3997         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
3998           (popGetLit): truncate literal value to 8 bit,
3999           (popGet): moved assert to more appropriate place
4000           (popGetExternal): create pCode operand from and mark the according
4001             symbol as being `extern'
4002           (popGetAddr): added sanity check on immediate's offset, provide
4003             GPOINTER tag on demand
4004           (aopPut): fixed for immediates,
4005           (mov2w_op): move operand's address or contents to WREG (depending on
4006             operand type), safer variant of mov2w,
4007           (movwf,call_libraryfunc): NEW, handy abbreviations,
4008           (get_argument_pcop,get_return_val_pcop,pass_argument,
4009           get_returnvalue): interface for accessing function parameters and
4010             return values,
4011           (assignResultValuei,genRet): use new parameter/return value interface
4012           (pic14_getDataSize): back to old version handling generic pointers,
4013           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
4014             provided implementation and/or fixed old one,
4015           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
4016             calls, removed legacy 8051 reference code
4017           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
4018           (loadSignToC): NEW, move the operands sign bit to CARRY,
4019           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
4020             genRightShiftSigned, accepts negative shift counts,
4021           (setup_fsr): load FSR and adjust IRP (indirect memory access),
4022           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
4023             generic pointers, __data pointers and __code pointers,
4024           (genUnpackBits,genPackBits): rewritten to work with generic pointers
4025             and signed bitfields, limit bitfields to 8 bit,
4026           (genDataPointerGet): fixed number of bytes read,
4027           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
4028           (genPointerGet,genPointerSet): fixed handling of __code pointers,
4029             pointers to constant data are no longer assumed to point to __code
4030             space, removed invalid pointer types,
4031           (bitpatternFromVal): retrieve the PICs representation of an integer
4032             or float literal,
4033           (genDataPointerSet): fixed assigning to po_immediate operands,
4034           (genGenPointerSet): implemented as library call,
4035           (genIfx): fixed incorrect condition,
4036           (genAddrOf): limit generic pointers' addresses to 2 bytes,
4037             provide GPOINTER tag according to destination's storage class,
4038           (genCast): added code to handle casting to generic pointers, added
4039             sign-/zero extension of the result
4040           (aop_isLitLike,op_isLitLike): fixed handling of immediates
4041         * src/pic/gen.h: added macros to access IRP bit in STATUS register
4042         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
4043           extend the result
4044         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
4045           address/register resides in the shared banks
4046           (emitSymbolToFile): improved to handle global and `pinned' symbols,
4047             put all variables into separate sections (have the linker arrange
4048             them)
4049           (picglue): put init code and interrupt handlers in separate sections
4050         * src/pic/main.c: added port specific options table, modified to PORT
4051           structure to make GPOINTERs 3 byte, added pic14_options
4052           (_pic14_do_link): private linking routine (update paths to libraries,
4053             add libsdcc.lib by default)
4054         * src/pic/main.h: declare pic14_options
4055         * src/pic/pcode.c: fixed instructions i/o relations,
4056           (RegCond): reverted to correct version,
4057           (newpCodeOpLit): truncate literals to 8 bit,
4058           (genericPrint): added debug output,
4059           (getRegFromInstruction): fixed for various operand types, simplified
4060           (BuildFlow): fixed broken handling of isntructions with labels
4061           (LinkFlow): start at last instruction in flow (skip trailing comments),
4062             pass the flow on to the next instruction after CALL
4063           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
4064           (insertPCodeInstruction): fixed inserting after a skip instruction,
4065           (DoBankSelect): fixed for labeled instructions
4066           (OptimizepBlock): honor --nopeep switch
4067           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
4068         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
4069         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
4070           (pCodeOptime2pCodes): allow disabling this optimization via
4071             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
4072             but is still buggy), started implementation of a dataflow based
4073             pCode optimization (CSE + dead code elimination)
4074           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
4075         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
4076           names are independant of the stack location and therefore portable across
4077           devices
4078
4079 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
4080
4081         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
4082           (selectSpil): fixed bug 1337835 by not spilling bit variables
4083         * support/regression/tests/bug1337835.c: added test for this bug
4084         * src/mcs51/peeph.def: restart after rule 3.c,
4085           addded rules 263.x to optimize loading constants
4086
4087 2005-10-26 Raphael Neider <rneider AT web.de>
4088
4089         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
4090         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
4091           (genAssign): emit warning when casting literals to generic pointer
4092             type, also applies when taking the address of a fixed variable,
4093           (genCast): improved casting to generic pointers
4094         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
4095           extern variables, added verbose error message
4096         * device/include/pic16/{string.h,errno.h}: added #pragma library c
4097
4098 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
4099
4100         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
4101         carry must be complemented too
4102         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
4103         could be emitted by genMinus
4104         * src/SDCCval.c (constVal): fixed bug 1305065
4105
4106 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
4107
4108         * src/SDCCast.c (addCast): added promotion for bit variables
4109         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
4110         promotion casts + optimisation
4111         (optimizeGetWord): fix warning 'i' might be used uninitialized
4112         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
4113         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
4114
4115 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
4116
4117         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
4118         all chars are promoted to int; promotion should be handled in SDCCast.c
4119
4120 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4121
4122         * device/lib/_strcmp.c: Fixed bug 1326457
4123
4124 2005-10-11 Raphael Neider <rneider AT web.de>
4125
4126         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
4127         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
4128
4129 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4130
4131         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
4132         * support/regression/tests/sfr16.c: added test for the sfr32 bug
4133
4134 2005-10-04 Raphael Neider <rneider AT web.de>
4135
4136         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
4137           device/lib/pic16/pics.all: added pic18f1320
4138         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
4139
4140 2005-09-30 Raphael Neider <rneider AT web.de>
4141
4142         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
4143         * src/pic16/devices.inc: NEW, provides device descriptions
4144         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
4145
4146 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
4147
4148         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
4149           GETHBIT
4150
4151 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
4152
4153         * doc/sdccman.lyx: updated Highest Order Bit documentation,
4154           documented Any Order Bit, Higher Order Byte and Higher Order Word
4155         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
4156         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
4157           (optimizeGetAbit): new, to get any bit, not only the high bit,
4158           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
4159           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
4160           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
4161           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
4162             RIGHT_OP: also try GETBYTE, GETWORD optimization,
4163             GETABIT, GETBYTE, GETWORD: decorate them,
4164           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
4165           (ast_print): added GETABIT, GETBYTE, GETWORD
4166         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
4167         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
4168           (geniCodeBinary): new generic binary icode,
4169           (ast2iCode): added GETABIT, GETBYTE, GETWORD
4170         * src/port.h: updated comment for PORT.hasExtBitOp
4171         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
4172           (genGetByte): new, to get a single byte,
4173           (genGetWord): new, to get a word from a long,
4174           (gen51Code): added GETABIT, GETBYTE, GETWORD
4175         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
4176
4177 2005-09-23 Raphael Neider <rneider AT web.de>
4178
4179         * configure.in, configure: have device/lib/pic configured
4180         * device/lib/Makefile.in: added model-pic14
4181         * device/lib/clean.mk: added pic/ to clean rule
4182         * device/lib/pic: added rudimentary pic14 library providing support
4183           functions for multiplication/division/generic pointer access
4184         * src/SDCCopt.c (convilong): mark support functions as extern
4185           for pic14 port as well
4186         * src/pic/gen.c (genMult): added assertions,
4187           (genpic14Code): emit warning on unhandled iCodes
4188         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
4189         * src/pic/pcode.c (pCodeOpCopy),
4190         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
4191           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
4192           SFR_REGISTER}), made safe for future extensions
4193         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
4194           instructions even if preceeded by SKIP instructions (also remove
4195           them); removed unused code
4196         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
4197           prevents leaving parts of the structure uninitialized after copying
4198
4199 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
4200
4201         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
4202           ago by me
4203         * support/regression/tests/addsub.c: added test for the bug
4204
4205 2005-09-21 Raphael Neider <rneider AT web.de>
4206
4207         * device/include/pic16/pic18f1220.h,
4208           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
4209         * device/lib/pic16/Makefile.rules: added missing opening paren
4210         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
4211           are provided in genutils.c,
4212           (genUminusFloat,genUminus,genCmpEq): added asserts on different
4213           operand/result sizes,
4214           (genCmp): assert on NULL pointers first, then check deref'ed values
4215         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
4216           result size
4217
4218 2005-09-18 Raphael Neider <rneider AT web.de>
4219
4220         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
4221           as these are now unused,
4222           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
4223         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
4224           local, avoids uninitialized pointer dereference on r->name
4225         * src/pic16/ralloc.c (newReg): fixed indentation
4226
4227 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
4228
4229         * src/SDCCval.c (constVal): fixed bug 730366
4230         * support/Util/SDCCerr.c,
4231         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
4232
4233 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
4234
4235         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
4236
4237 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
4238
4239         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
4240
4241 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4242
4243         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
4244           (hex2dec): made hex_digit unsigned char, removed ascii dependance
4245         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
4246           (hex2dec): made hex_digit unsigned char, removed ascii dependance
4247         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
4248         * packihx/packihx.c (hexDigit): made c unsigned char
4249         * as/mcs51/lklibr.c (fndsym),
4250         * link/z80/lkgb.c (gb),
4251         * link/z80/lklibr.c (fndsym),
4252         * link/z80/lkrloc.c (relr),
4253         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
4254         * src/SDCC.lex (checkCurrFile, process_pragma),
4255         * src/SDCCglue.c (spacesToUnderscores),
4256         * src/SDCCmain.c (setParseWithComma, processFile),
4257         * src/asm.c (tvsprintf, printCLine),
4258         * src/avr/gen.c (emitcode, aopPut),
4259         * src/ds390/gen.c (emitcode),
4260         * src/hc08/gen.c (emitcode, emitinline),
4261         * src/mcs51/gen.c (emitcode, genInline),
4262         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
4263           tokenizeLineNode),
4264         * src/pic/ralloc.c (debugLog),
4265         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
4266           tokenizeLineNode),
4267         * src/pic16/ralloc.c (debugLog),
4268         * src/z80/main.c (_process_pragma):
4269            made all ctype.h function calls safe
4270         * src/SDCCopt.c: include math.h for fabs
4271         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
4272           and used them throughout the code to make ctype.h function calls safe
4273         * src/ds390/main.c (asmLineNodeFromLineNode),
4274         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
4275         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
4276            unsigned char*
4277         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
4278           (newpCodeAsmDir): made ctype.h function calls safe
4279         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
4280           pic16_emitcode):  made lbp unsigned char*
4281         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
4282           (pic16_newpCodeAsmDir): made ctype.h function calls safe
4283         * src/xa51/gen.c (emitcode),
4284         * src/z80/gen.c (_emit2): made lbp unsigned char*
4285         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
4286            char*
4287
4288 2005-09-05 Raphael Neider <rneider AT web.de>
4289
4290         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
4291           access bank splitpoint
4292
4293 2005-09-05 Raphael Neider <rneider AT web.de>
4294
4295         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
4296
4297 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
4298
4299         * .version: changed to version 2.5.3
4300         * doc/sdccman.lyx: changed version to 2.5.3,
4301           documented --codeseg and --constseg and pragma codeseg and constseg,
4302           documented bit parameters (reentrant) and bit returning
4303         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
4304            currFunc->recvSize, but is this ok for all ports?
4305           (ast2iCode): result of ~ on unsigned char must be cast to int for
4306            bool to work
4307         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
4308           function pointers in bit space
4309         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
4310           (processFuncArgs): call port.reg_parm() with reentrancy info
4311         * src/port.h,
4312         * src/avr/main.c,
4313         * src/ds390/main.c,
4314         * src/hc08/main.c,
4315         * src/pic/main.c,
4316         * src/pic16/main.c,
4317         * src/xa51/main.c,
4318         * src/z80/main.c: port.reg_parm prototype extended with
4319           "bool reentrant" parameter
4320         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
4321           options.stackAuto for allocating bit register parameters
4322         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
4323           (genSend): set BitBankUsed if it is,
4324           (selectRegBank): factored out of genCall for use in genPcall,
4325           (genCall): removed redundant dtype assignmen, use selectRegBank,
4326           (genPcall): handle returning in Carry properly, save in F0 if needed,
4327           (genReceive): handle bit register parameters
4328         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
4329           (mcs51_assignRegisters): enable bit registers for all reentrant
4330            functions and don't set BitBankUsed unconditionally
4331         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
4332         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
4333         * support/regression/tests/funptrs.c: added tests for BOOL and for return
4334
4335 2005-08-27 Borut Razem <borut.razem AT siol.net>
4336
4337         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
4338         ppc-osx (Darwin) does not support -u option. It seems that it is
4339         supported only on Linux - GNU cp
4340
4341 2005-08-25 Borut Razem <borut.razem AT siol.net>
4342
4343         * sim/ucsim/gui.src/serio.src/Makefile.in,
4344           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
4345           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
4346           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
4347           install and strip, since the strip at /usr/ccs/bin should be used
4348           on solaris
4349
4350 2005-08-24 Borut Razem <borut.razem AT siol.net>
4351
4352         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
4353
4354 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
4355
4356         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
4357         ffffffffu
4358
4359 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
4360
4361         * as/mcs51/aslink.h: completed lkrloc.c prototypes
4362         * as/mcs51/lkmain.c (link_main): fixed warning
4363         * device/include/stdbool.h: ds390 has no advanced bit support yet
4364         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
4365         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
4366         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
4367           and updated their macros
4368         * src/SDCCval.c (constVal): updated comment for renamed b_long
4369
4370 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
4371
4372         * as/mcs51/asdata.c: changed ctype['['] to BINOP
4373         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
4374           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
4375           (oprio): set priority for '['
4376         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
4377            and adb_24_bit
4378         * as/mcs51/asm.h: added defines R_BIT and S_BIT
4379         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
4380         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
4381         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
4382           added overlayable BIT_BANK area
4383         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
4384           (summary2): explain 'T' in legenda
4385         * as/mcs51/lkrloc.c: replaced old K&R style,
4386           (relr): added R_BIT processing,
4387           (errmsg): added "Bit-addressable relocation error",
4388           (adb_bit): added for converting from byte- to bit-addressable space,
4389           (adb_24_bit): added for converting from byte- to bit-addressable space
4390         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
4391            used in reentrant functions now even as return value
4392         * device/lib/_gptrput.c (_gptrput): removed obsolete code
4393         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
4394           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
4395         * src/SDCCglobl.h: added indicator BitBankUsed
4396         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
4397            the bit registers b0-b7
4398         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
4399           (geniCodeCast): fixed bug 1263853,
4400           (geniCodeLogicAndOr): put result in bool or char,
4401           (geniCodeReceive): added parameter func for accessing the return type,
4402           (geniCodeFunctionBody): pass func to geniCodeReceive
4403         * src/SDCCmain.c: added indicator BitBankUsed
4404         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
4405         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
4406           (checkSClass): don't put automatic bool/bit on stack,
4407           (checkFunction): removed check on function cannot return bit
4408         * src/SDCCsymt.h: added newBoolLink prototype
4409         * src/mcs51/gen.c (rb1regs): added bit registers,
4410           (movc): created for assigning to carry,
4411           (pushReg, popReg): created for pushing registers,
4412           (sameRegs): check both AOP_REG and AOP_CRY types,
4413           (aopOp): handle bit registers,
4414           (aopPut): optimization no self-assign,
4415           (saveRegisters): push reg->base (bits) only once for bit registers,
4416            and use pushReg,
4417           (unsaveRegisters): pop reg->base only once and use popReg,
4418           (assignResultValue): added parameter func and return in carry for bits,
4419           (genIpush): optimization no reload in A if not changed,
4420           (genSend): bit parameters in reentrant functions are passed in bit
4421            registers by first assigning to bits in B, then save registers and
4422            copy B to bits,
4423           (genCall): handle returning in Carry properly, save it in F0 if needed,
4424           (genPcall): updated assignResultValue call, this is not safe yet for bit
4425            returning function !!!
4426           (genFunction): don't generate equ's for bit registers and use pushReg,
4427           (genEndFunction): take care of bit returning functions and use popReg,
4428           (genRet): return bit in Carry,
4429           (genIfx): optimize bit registers and other directly addressable bits,
4430           (genReceive): updated assignResultValue call
4431         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
4432           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
4433            registers when using stack-auto
4434         * src/mcs51/ralloc.c (_G): added allBitregs,
4435           (regs8051): added the bit registers,
4436           (createStackSpil): use macro IS_BIT,
4437           (getRegBit): added to allocate a bit register, else spill,
4438           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
4439           (updateRegUsage): factored out to ease stepping while debugging,
4440           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
4441            also allocate bit registers,
4442           (fillGaps): handle bit registers,
4443           (findAllBitregs): added to create bit vector with all bit registers,
4444           (mcs51_allBitregs): returns this bit vector,
4445           (mcs51_assignRegisters): when using stack-auto use bit registers for
4446            passing parameters and creating local variables
4447         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
4448
4449 2005-08-22 Borut Razem <borut.razem AT siol.net>
4450
4451         * device/lib/Makefile.in: replaced find option -or with -o
4452           to make it run on solaris
4453
4454 2005-08-22 Raphael Neider <rneider AT web.de>
4455
4456         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
4457           fixes #1265442 (crash on Solaris)
4458
4459 2005-08-20 Borut Razem <borut.razem AT siol.net>
4460
4461         * configure, configure.in: added tests for libsocket and libnsl libraries,
4462           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
4463           from support/regression/Makefile.in
4464         * support/regression/Makefile.in: added
4465         * device/lib/pic16/Makefile.common.in: force make to use bash shell
4466         * sim/ucsim/libtool: regenerated on sparc-solaris
4467         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
4468           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
4469           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
4470           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
4471           sparc-solaris, which doesn't use GNU ld linker
4472         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
4473         * as/Makefile: find on sparc-solaris does not support -maxdepth option
4474
4475 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
4476
4477         * src/mcs51/peeph.def: updated comments
4478
4479 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4480
4481         * device/lib/_gptrget.c,
4482         * device/lib/_gptrput.c: slightly shorter
4483         * doc/sdccman.lyx: incremented version
4484         * src/mcs51/peeph.def: moved peephole comments to the line of first
4485           change to better keep line correlation, reanimated 186.e
4486         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
4487
4488 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4489
4490         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
4491           David Saxton with quotes around file name.
4492
4493 2005-08-15 Borut Razem <borut.razem AT siol.net>
4494
4495         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
4496           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
4497           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
4498           make tests run on x86_64 platform
4499
4500 2005-08-13 Raphael Neider <rneider AT web.de>
4501
4502         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
4503           as it might be executed DURING a build (parallel make is wonderful)
4504
4505 2005-08-13 Raphael Neider <rneider AT web.de>
4506
4507         * device/lib/Makefile.in (port-specific-objects-pic16):
4508           revert to cp $(PORT)/bin/*.* $(PORTDIR)
4509         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
4510           dependency
4511         * device/lib/pic16/Makefile.rules: build subdirs before creating
4512           the library, removed builddir rule, create $(builddir) early in
4513           recurse rule, use empty recurse rule for leaf directories
4514         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
4515           mkdir errors (race condition), removed duplicate suffix "hex"
4516           from clean rules
4517         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
4518         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
4519           prevents mkdir -p from aborting on Alpha
4520
4521 2005-08-12 Raphael Neider <rneider AT web.de>
4522
4523         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
4524           db-statements in order to allow for arrays of pointers in code
4525           sections to be placed without interspersed 0-padding, fixes
4526           bug #1256215
4527         * (emitStatistics): fixed division by zero for pic18f1220
4528         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
4529           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
4530         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
4531         * (pic16_pCodeConstString): keep track of already emitted string
4532           literals to prevent "duplicate definitions of symbol _str_NR"
4533         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
4534           debug message
4535         * device/lib/Makefile.in: ignore failing PIC16 library builds
4536         * device/lib/pic16/Makefile: do not build if gputils are missing
4537         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
4538
4539 2005-08-10 Raphael Neider <rneider AT web.de>
4540
4541         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
4542           my last commit)
4543
4544 2005-08-10 Raphael Neider <rneider AT web.de>
4545
4546         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
4547           Rokas' patch to add the new fixed point type "__fixed16x16"
4548         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
4549           functions for __fixed16x16 arithmetics
4550         * device/lib/pic16: reimplemented the build system to support
4551           a separate build directory, better handling of libio (create
4552           the library in a separate subdir for each architecture) and
4553           easier configuration (centralized in Makefile.common)
4554
4555 2005-08-07 Raphael Neider <rneider AT web.de>
4556
4557         * src/pic16/gen.c (genrshTwo): fixed sign extension
4558         * src/pic16/device.c: added pic18f2320, 4220 and 4320
4559         * device/include/pic16/pic18f2220.h: changed some bit definitions,
4560           added T0CONbits
4561         * device/include/pic16/pic18f4220.h: NEW, header for
4562           pic18f4220 and pic18f4320
4563         * device/include/pic16/pic18fregs.h: added new devices,
4564           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
4565         * device/include/pic16/signal.h: resolved name clashes
4566           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
4567           to also allow testing for interrupt enable bits, added
4568           comments on how to use the macros
4569         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
4570         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
4571           register definitions for the devices
4572         * device/lib/pic16/pics.all: added new devices
4573         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
4574           allocated memory
4575         * device/lib/pic16/libc/stdlib/memfree: do not count
4576           the block header as free memory
4577         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
4578           simplified and added missing end-of-blocklist-marker
4579           (reported by Peter Onion, fixes #1252814)
4580         * (_mergeHeapBlock): fixed loop condition
4581         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
4582           len==0, restructured code
4583         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
4584           up a bit, reduced bitfield accesses, prevent endless loops
4585           in case of heap corruption
4586         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
4587           "unreferenced arguments/must return a value" warnings
4588         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
4589           replaced BAUDREG with SPBRG
4590         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
4591           device/lib/pic16/debug/gstack/gstack.c: replaced
4592           _naked, _asm, _endasm with __naked, __asm, __endasm
4593
4594 2005-08-05 Raphael Neider <rneider AT web.de>
4595
4596         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
4597           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
4598
4599 2005-08-05 Borut Razem <borut.razem AT siol.net>
4600
4601         * device/lib/Makefile.in: added missing ';'
4602         * configure: removed ^M characters
4603
4604 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4605
4606         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
4607           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
4608           License
4609
4610 2005-08-04 Borut Razem <borut.razem AT siol.net>
4611
4612         * configure.in: pic16 libraries build 2nd try - enable running
4613           configure in device/lib/pic16
4614         * configure: regenerated from configure.in
4615         * device/lib/Makefile.in: create $(PORT)/bin directory
4616
4617 2005-08-03 Raphael Neider <rneider AT web.de>
4618
4619         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
4620           to get/set values via pointers
4621         * (genUnpackBits,genPackBits): changed detection of
4622           ptr->bitfield vs. sym.bitfield, fixed access via generic
4623           pointers, removed dead (wrong) code for multibyte bitfields
4624         * (genNearPointerGet, genGenPointerGet): removed useless code,
4625           fixed bitfield detection, fixes #1250594
4626         * (genNearPointerSet): removed useless code
4627         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
4628           and introduced macro pic16_emitpcode that conditionally emits
4629           the origin of the following pCode (useful for debugging SDCC)
4630         * src/pic16/pcode.c: changed (and disabled) some debug outputs
4631         * (createDefmap): fixed handling of LFSR for --optimize-df
4632
4633 2005-08-02 Borut Razem <borut.razem AT siol.net>
4634
4635         * device/lib/Makefile.in: pic16 libraries build enabled since
4636           gputils-0.13.2 are now localy installed at sourceforge's compile farm
4637
4638 2005-08-02 Raphael Neider <rneider AT web.de>
4639
4640         * src/pic16/gen.c (genPackBits): removed deprecated warning
4641         * (genGenPointerSet): fixed bitfield detection
4642
4643 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4644
4645         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
4646
4647 2005-07-31 Raphael Neider <rneider AT web.de>
4648
4649         * device/lib/pic16/libdev/pic18f458.c,
4650           device/include/pic16/pic18f458.h: added missing T0CONbits
4651
4652 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4653
4654         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
4655
4656 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
4657
4658         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
4659
4660 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4661
4662         * device/include/mcs51/at89c51ed2.h: added.
4663
4664 2005-07-23 Raphael Neider <rneider AT web.de>
4665
4666         * src/pic/gen.h: added emitpcode macro for debugging
4667         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
4668           and replace by macro adding debug information on demand
4669         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
4670         * (gencjne): tried to fix; replaced with correct (slower) code
4671         * (gen{Unp,P}ackBits): fixed single bit access
4672         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
4673         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
4674           previous instruction
4675         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
4676           register has to be handled with care (forbidding movement
4677           of assignments/uses, removing assignments completely, ...)
4678         * (pCodeOptime2pCodes): make use of regIsSpecial
4679         * added lots of debugging output (commented out)
4680         * src/pic/rallloc.c (deassignLRs): prevent operand registers
4681           from being reused as result UNLESS it is known to work
4682
4683 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
4684
4685         * support/Util/dbuf.h: include <stddef.h> for size_t
4686         * .version: changed to version 2.5.2
4687
4688 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4689
4690         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
4691
4692 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4693
4694         * src/hc08/gen.c (genMinus): fixed bug #1241835,
4695           (genModOneByte): removed needless psha/pula
4696
4697 2005-07-22 Raphael Neider <rneider AT web.de>
4698
4699         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
4700           have PIC14 handled like PIC16, fixes broken pic14 linker calls
4701         * src/pic/gen.c (resolveIfx): do not "invent" labels
4702         * (genSkipc): changed to positive logic
4703         * (genSkipCond): removed as no longer needed
4704         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
4705           backport from PIC16
4706         * (genLeftShift): check operands are in different registers
4707         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
4708           INCF does not update CARRY...
4709         * src/pic/main.c: fixed _linkCmd
4710         * src/pic/pcode.c (unlinkpCode): added inactive code
4711         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
4712           alive (do not assign result and operand overlapping registers)
4713
4714 2005-07-22 Raphael Neider <rneider AT web.de>
4715
4716         * src/pic/device.c (dump_sfr): replaced register declaration with
4717           call to emitSymbolToFile() to avoid duplicate symbols
4718         * (assignRelocatableRegisters): do not declare external symbols
4719         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
4720           right (take size of type, not etype)
4721         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
4722         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
4723         * (packRegsForAccUse): disabled assignment of WREG as
4724           the result reg to prevent occurence of just fixed #1235003,
4725           fixes #1242954
4726         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
4727           symbols (avoids duplicate symbols in .asm file)
4728         * (pic14emitRegularMap): use emitSymbolToFile()
4729         * src/pic/gen.c (aopOp): fixed spillLocation handling
4730         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
4731         * (genDataPointerSet): removed unneccessary variables/output
4732
4733 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
4734
4735         * as/mcs51/lkarea.c: enlarged codemap for banked memory
4736         * device/lib/mcs51/crtbank.asm: added # to 0x0F
4737
4738 2005-07-21 Raphael Neider <rneider AT web.de>
4739
4740         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
4741           architecture cannot handle them efficiently, fixes bug #1235003
4742         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
4743           check for empty sets before using them (fixes bug #1232190)
4744
4745 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
4746
4747         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
4748           (lnksect2): generate warnings for memory overlap
4749         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
4750           constseg to set the name of these segments so you can instruct the linker
4751           to place them in banks
4752         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
4753         * src/SDCCglobl.h: added MODEL_HUGE to enum,
4754           added code_seg and const_seg to options
4755         * src/SDCCglue.c (emitMaps): use options.const_seg,
4756           (createInterruptVect): put interrupt vectors in segment HOME,
4757           (glue): put HOME before static segment and put the main glue in HOME,
4758           (glue): use options.code_seg
4759         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
4760         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
4761           these segments so you can instruct the linker to place them in banks
4762           (linkEdit): use code_loc for HOME segment which should be the first
4763           segment in code memory now
4764         * src/SDCCmem.c: fixed more stuff like bug 1238386
4765         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
4766           (changePointer): don't change function pointers to code pointers for
4767           banked functions,
4768           (compareType): added exceptional check for banked function pointers
4769         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
4770         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
4771           after static in code memory
4772         * src/mcs51/gen.c: added aopLiteralLong prototype,
4773           (aopForSym): use getSize for functions,
4774           (genCall): generate banked calls over one trampoline __sdcc_banked_call
4775           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
4776           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
4777           the segment,
4778           (genPcall): use call for literal function pointers and generate banked
4779           calls over the one trampoline so there's only one place for the user to
4780           modify according to his/hers hardware,
4781           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
4782           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
4783         * src/mcs51/main.c: added keyword banked,
4784           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
4785         * support/Util/SDCCerr.c,
4786         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
4787           needed for passing the bank and address to the trampoline
4788         * device/lib/mcs51/crtbank.asm: added for bankswitching
4789         * device/lib/mcs51/Makefile: added crtbank
4790
4791 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4792
4793         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
4794           for fields at offset 0 of a struct or union as reported
4795           on 2005-07-07 in the developer mailing list.
4796
4797 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
4798
4799         * src/SDCCmem.c: fixed bug 1238386
4800
4801 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4802
4803         * src/mcs51/peeph.def: added labelrefcounting for peepholes
4804           (patch #1144962), added peephole 300, enabled 259.x
4805         * doc/sdccman.lyx: removed screenshot and provided link instead
4806
4807 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4808
4809         * doc/sdccman.lyx: added section about debugging with ddd
4810         * doc/figures/ddd_example.eps: screenshot of debugging session
4811
4812 2005-07-04 Raphael Neider <rneider AT web.de>
4813
4814         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
4815           like CODE pointers, fixes #1115683
4816         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
4817           call, fixes bugs #1232211, #1228110,
4818           fixed wrong casts to pCodeFlow from pCodeInstructions
4819
4820 2005-07-04 Raphael Neider <rneider AT web.de>
4821
4822         * src/pic/gen.c (popGet): changed assert to allow for
4823           bit operands
4824         * (popGetAddr): changed signature to provide
4825           an additional index, patched all call sites
4826         * (genCmpEq): handle literal-like operands correctly
4827         * (genAddrOf): added sanity checks on __code/__data pointers
4828         * (genAssign): added handling of symbols from __code section
4829         * (gencjne): do not generate code for comparisons whose result
4830           is neither stored nor used, fixes bug #1171114
4831         * (AccLsh, AccRsh): operate on operand instead of WREG
4832         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
4833           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
4834           by known count
4835         * rewrote complete shift-by-literal logic, commented unused
4836           functions out
4837         * (genConstPointerGet): get multiple bytes (if result size > 1),
4838           fixed handling of non-immediate addresses
4839         * (genPointerGet): handle CODE pointers like CONST pointers
4840         * (genpic14Code): insert C-SRC lines as Cource-pCodes
4841         * ({aop,op}_isLitLike): NEW, single place to decide whether an
4842           operand is to be treated as a literal or not
4843         * (mov2w,genPcall,genCmpEq),
4844           src/pic/genarith.c: use aop_isLitLike() to decide between
4845           literal/register contents
4846         * (addSign): added missing offset
4847         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
4848           only emit comment in debug-mode,
4849           use {aop,op}_isLitLike throughout the file
4850         * src/pic/glue.c: fix initializers for pointers (work in progress)
4851         * src/pic/pcode.c (get_op): honor index on _const symbols
4852         * ({reset,dump}pCodeStatistics): NEW, estimate code size
4853         * (dumppBlock): added pCode size estimation
4854         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
4855           check for IS_SYMOP before OP_SYMBOL'ing
4856         * fixed indentation, compacted switch-statements
4857         * (allocReg): find free register and allocate it instead of
4858           allocating new registers all the time
4859         * (deassignLRs): prevent POINTER_GET's from being assigned the same
4860           registers as its operands (necessary only for multibyte GETs)
4861
4862 2005-07-01 Raphael Neider <rneider AT web.de>
4863
4864         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
4865           debugging .asm-output macros FENTRY + FEXIT
4866         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
4867           way... I wonder...
4868         * (emitpComment): NEW, printf to pCode
4869         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
4870           offset handling
4871         * (popGetAddr): NEW, variant of popGet to access an immediates
4872           high(er) bytes instead of the n'th byte of memory they reference,
4873           replaced popGet with popGetAddr where neccessary
4874         * (genDataPointerGet): reactivated and fixed implementation
4875         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
4876           accesses
4877         * (genDataPointerSet): fixed multibyte assignments
4878         * (genpic14Code): fixed --i-code-in-asm handling
4879         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
4880         * (genPlus): fixed index-out-of-bounds error
4881         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
4882         * src/pic/ralloc.c: added debugging output macro FENTRY2
4883         * (spillThis): fixed indentation, enbraced for-body for clarity
4884         * (rematStr): commented out as now unused
4885         * (regTypeNum): commented out special spill case (overwrites
4886           arbitrary values)
4887         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
4888
4889 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
4890
4891         * doc/sdccman.lyx: documented sfr16/sfr32,
4892           added example for using storage class with function pointers
4893         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
4894
4895 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
4896
4897         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
4898         * device/lib/_itoa.c,
4899         * device/lib/_ltoa.c: optimized codesize
4900         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
4901           but don't know how to suppress the double warning.
4902         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
4903         * support/Util/SDCCerr.c,
4904         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
4905
4906 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
4907
4908         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
4909           fixed old K&R prototypes
4910         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
4911         * device/lib/_gptrget.c,
4912         * device/lib/_gptrgetc.c,
4913         * device/lib/_gptrput.c: changed versions for new memory indicator values,
4914           also new versions for small generic pointers and banked generic pointers
4915         * src/port.h: added const_name
4916         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
4917         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
4918         * src/SDCCcse.c (findPrevIc): check all associative operators
4919         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
4920         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
4921         * src/SDCCmem.c: updated comments,
4922           set far-space to 0 for pdata, results in optimized code
4923         * src/SDCCmem.h: added macro CONST_NAME
4924         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
4925           moving the info into the highest bits, see also gptrget/gptrput
4926         * src/src.dsp: added sdcc.ico to project files
4927         * src/avr/gen.c (genCast): fixed bug 0x%d
4928         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
4929         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
4930           relation between ptr_type and DCL_TYPE,
4931           (genCast): fixed bug 0x%d
4932         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
4933           (CODE)" for const_name
4934         * src/hc08/gen.c (genCast): fixed bug 0x%d
4935         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
4936           (hc08_port): added "CONST (CODE)" for const_name
4937         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
4938           (aopForRemat, adjustArithmeticResult): disconnected direct relation
4939           between ptr_type and DCL_TYPE,
4940           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
4941           operand* and took AOP() inside function so sfr-ness can be checked,
4942           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
4943           new prototype,
4944           (genFunction, genEndFunction): optimized stack setup,
4945           (genMinus): optimized for literals with ending zeroes (in bytes),
4946           (genCast): fixed bug 0x%d
4947         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
4948           (mcs51_port): added "CONST (CODE)" for const_name
4949         * src/mcs51/peeph.def: made rule 226 more generic
4950         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
4951         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
4952         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
4953         * src/z80/main.c (z80_port): added NULL for const_name,
4954           (gbz80_port): added NULL for const_name
4955         * support/regression/tests/bug663539.c,
4956         * support/regression/tests/sfr16.c: new tests
4957
4958 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4959
4960         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
4961
4962 2005-06-24 Raphael Neider <rneider AT web.de>
4963
4964         * device/lib/pic16/libdev/pic18f[68][567]20.c:
4965           corrected typos...
4966         * device/include/pic16/signal.h: added USBIF
4967           and SIG_USB
4968
4969 2005-06-24 Raphael Neider <rneider AT web.de>
4970
4971         * device/lib/pic16/libdev/pic18f2455.c,
4972           device/include/pic16/pic18f2455.h: NEW
4973         * device/include/pic16/pic18fregs.h,
4974           device/lib/pic16/pics.all,
4975           src/pic16/device.c: added 18f2455
4976         * device/lib/pic16/libdev/pic18f[68][567]20.c,
4977           device/include/pic16/{pic18f[68][567].h,usart.h}:
4978           replaced MULTIPLE_USARTS define with more relaible
4979           compatibility sfrs (for USART access)
4980
4981 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
4982
4983         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
4984           and the output asm file line is printed on two lines.
4985
4986 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4987
4988         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
4989           BGT, BLE, BHI, and BLS instructions
4990         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
4991           genCmpEq): removed
4992         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
4993           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
4994           fixes bug #1216342
4995         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
4996
4997 2005-06-15 Raphael Neider <rneider AT web.de>
4998
4999         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
5000         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
5001         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
5002           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
5003           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
5004
5005 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5006
5007         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
5008           Marcel Telka in bug #1215704
5009
5010 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
5011
5012         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
5013           located in shared memory bank.
5014
5015 2005-05-31 Raphael Neider <rneider AT web.de>
5016
5017         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
5018           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
5019           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
5020
5021 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
5022
5023         * device/lib/_strncpy.c: fixed the fix
5024
5025 2005-05-26 Raphael Neider <rneider AT web.de>
5026
5027         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
5028           initializers with \0, bug #1208187
5029         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
5030           intializers with \0, bug #1208187
5031
5032 2005-05-26 Raphael Neider <rneider AT web.de>
5033
5034         * src/pic16/glue.c (pic16_printIvalChar): fixed string
5035           initializers with \0, bug #1208187
5036         * src/pic16/main.c (_process_pragma): added sanity checks
5037           for stack position and size, emit warnings when appropriate
5038
5039 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
5040
5041         * device/lib/_strncpy.c: fixed not filling with \0
5042
5043 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5044
5045         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
5046           createFunction),
5047         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
5048           compound_statement),
5049         * src/SDCCsymt.h,
5050         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
5051
5052 2005-05-24 Raphael Neider <rneider AT web.de>
5053
5054         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
5055
5056 2005-05-24 Raphael Neider <rneider AT web.de>
5057
5058         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
5059           TRISE definitions, closes bug #1162453
5060
5061 2005-05-22 Raphael Neider <rneider AT web.de>
5062
5063         * src/pic16/main.c (_process_pragma): check for missing
5064           arguments to pragmas code and udata
5065         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
5066           consistency fixes to match other headers (thanks to Jim Paris)
5067         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
5068
5069 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
5070
5071         * src/SDCCicode.c (isOperandEqual): fixed missing ;
5072
5073 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
5074
5075         * support/regression/tests/bug1198642.c: new test
5076         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
5077         * src/SDCCcse.c (findPrevIc): added comment, please have a look
5078         * support/scripts/resource.h,
5079         * support/scripts/resource.rc,
5080         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
5081         * support/scripts/sdcc.ico: added 32x32 icon
5082
5083 2005-05-18 Raphael Neider <rneider AT web.de>
5084
5085         * device/lib/pic16/libdev/pic18f*.c,
5086         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
5087           keywords to "__sfr" and "__at (X)"
5088         * device/include/pic16/pic18fregs.h: added pic18f4520
5089         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
5090           #1203088 (MPLAB compatibility)
5091
5092 2005-05-17 Raphael Neider <rneider AT web.de>
5093
5094         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
5095         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
5096         * device/lib/pic16/pics.all: added new devices
5097         * src/pic16/device.c: added support for pic18f4520
5098
5099 2005-05-16 Raphael Neider <rneider AT web.de>
5100         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
5101         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
5102         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
5103           convenience function for bit access
5104
5105 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5106
5107         * device/lib/printf_large.c: fixed bug 1193299
5108         * support/regression/tests/bug1057979.c: added test %3.3s
5109
5110 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5111
5112         * device/include/mcs51/8051.h,
5113         * device/include/mcs51/8052.h: made parseable with lint
5114         * device/include/mcs51/lint.h: added include file for (sp)lint
5115         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
5116         * doc/cdbfileformat.lyx,
5117         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
5118
5119 2005-05-14 Raphael Neider <rneider AT web.de>
5120
5121         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
5122         * device/lib/pic16/libc/stdlib/itoa.c (new)
5123         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
5124         * device/lib/pic16/libio/Makefile: exclude subdir according to
5125           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
5126         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
5127         * src/pic16/gen.c (genFunction): prevent annoying warning
5128         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
5129           nameclashes on BeOS
5130         * support/cpp2/cppmain.c (cpp_output_string): new
5131         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
5132           fixes bug 1116802
5133
5134 2005-05-13 Borut Razem <borut.razem AT siol.net>
5135
5136         * src/SDCCmain.c (linkEdit): fixed bug 1195202
5137
5138 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5139
5140         * .version: changed to version 2.5.1; back to bleeding edge development
5141
5142 2005-05-11 Borut Razem <borut.razem AT siol.net>
5143
5144         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
5145           generate PDF version 1.3 documents
5146
5147 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5148
5149         * .version: changed to version 2.5.0
5150
5151 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5152
5153         * doc/sdccman.lyx: updated weblinks, index and smaller updates
5154
5155 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5156
5157         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
5158         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
5159         well as many smaller updates.
5160         * .version: changed to version 2.5.0-pre1
5161
5162 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5163
5164         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
5165
5166 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
5167
5168         * support/regression/tests/bug1185672.c: added
5169         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
5170           bug 1185672
5171         * src/mcs51/gen.c (genCall): added comments, made it look safer
5172         * src/mcs51/gen.c (genEndFunction): simplified
5173
5174 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
5175
5176         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
5177
5178 2005-04-14 Borut Razem <borut.razem AT siol.net>
5179
5180         * fixed bug 1045046 - SIGSEGV with really simple code?:
5181           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
5182           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
5183
5184 2005-04-14 Borut Razem <borut.razem AT siol.net>
5185
5186         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
5187           src/pic16/device.h: temporarily disabled experimental #inline pragma
5188           for 2.5.0 release
5189
5190 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
5191
5192         * device/include/z80/stdio.h,
5193         * device/include/z80/string.h: removed these highly incomplete files so
5194           SDCC can use the default ones in device/include/
5195
5196 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5197
5198         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
5199         gcc warning.
5200         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
5201         fix sdcpp warnings.
5202
5203 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
5204
5205         * device/include/malloc.h: removed redundant __reentrant prototypes
5206         * device/lib/_mullong.c: added working xstack variant in asm (C version
5207           doesn't pass regression tests)
5208         * device/lib/bpx.c: used __data and made bpx char for mcs51
5209         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
5210           (createFunction): fixed bug with xstackPtr
5211         * src/SDCCcse.c: corrected comments
5212         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
5213           (killDeadCode, eBBlockFromiCode): removed unused code
5214         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
5215           corrected comments
5216         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
5217           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
5218           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
5219           (genModOneByte): fixed warning in MSVC
5220         * src/mcs51/main.c (): added comments
5221         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
5222
5223 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
5224
5225         * src/SDCCmain.c (linkEdit): oops, changed one line too many
5226
5227 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
5228
5229         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
5230
5231 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
5232
5233         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
5234         characters arrays of larger size than the declared one.
5235
5236 2005-04-10 Borut Razem <borut.razem AT siol.net>
5237
5238         * src/pic/gen.c (genInline),
5239           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
5240           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
5241           (findNextInstruction), (findPrevInstruction),
5242           (findInstructionUsingLabel),
5243           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
5244         * src/pic/pcode.c (findLabel): added missing '\n'
5245         * src/src.dsp: added SDCCdwarf2.c to the project
5246
5247 2005-04-09 Borut Razem <borut.razem AT siol.net>
5248
5249         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
5250
5251 2005-04-08 Raphael Neider <rneider AT web.de>
5252
5253         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
5254           into the chain after a given one) and mergeDefmapSymbols (combine
5255           defmap entries for each symbol per pcode)
5256         * (createDefmap): have defmap entries merged in the end
5257         * (defmapReplaceSymRef): split defmap entries covering two accesses to
5258           a symbol before replacing one access type's symbol, merge symbols in
5259           the end (replacement symbol might already have an entry)
5260         * (assignValnums): keep reference to written WREG intact
5261
5262 2005-04-08 Raphael Neider <rneider AT web.de>
5263
5264         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
5265           Alpha)
5266
5267 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
5268
5269         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
5270         bytes
5271
5272 2005-04-07 Raphael Neider <rneider AT web.de>
5273
5274         * device/include/pic16/usart.h: added compatibility defines for
5275           devices with more than one USART
5276         * device/include/pic16/pic18f[68][567]20.h: activated above defines
5277
5278 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
5279
5280         * device/lib/Makefile.in: updated for port specific include
5281
5282 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
5283
5284         * support/regression/ports/mcs51/spec.mk: added mcs51 include
5285
5286 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
5287
5288         * device/include/8051.h,
5289         * device/include/8052.h,
5290         * device/include/at89S8252.h,
5291         * device/include/at89c55.h,
5292         * device/include/at89x051.h,
5293         * device/include/at89x51.h,
5294         * device/include/at89x52.h,
5295         * device/include/mcs51reg.h,
5296         * device/include/reg51.h,
5297         * device/include/reg764.h,
5298         * device/include/regc515c.h,
5299         * device/include/sab80515.h: (re)moved these 12 files
5300         * device/include/mcs51/8051.h,
5301         * device/include/mcs51/8052.h,
5302         * device/include/mcs51/at89S8252.h,
5303         * device/include/mcs51/at89c55.h,
5304         * device/include/mcs51/at89x051.h,
5305         * device/include/mcs51/at89x51.h,
5306         * device/include/mcs51/at89x52.h,
5307         * device/include/mcs51/mcs51reg.h,
5308         * device/include/mcs51/reg51.h,
5309         * device/include/mcs51/reg764.h,
5310         * device/include/mcs51/regc515c.h,
5311         * device/include/mcs51/sab80515.h: and added them here
5312
5313 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
5314
5315         * device/include/stdarg.h: changed SDCC specific keywords to double
5316           underlined form.
5317         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
5318           mcs51 and ds390.
5319         * device/include/hc08/mc68hc908gp32.h,
5320         * device/include/hc08/mc68hc908jb8.h,
5321         * device/include/hc08/mc68hc908jkjl.h,
5322         * device/include/hc08/mc68hc908qy.h: fixed comments
5323         * device/include/mcs51/README: updated
5324         * device/include/mcs51/c8051f120.h: added PINRSF
5325         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
5326         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
5327           amidst code. Also inline is not supported.
5328
5329 2005-04-06 Raphael Neider <rneider AT web.de>
5330
5331         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
5332         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
5333           callers stack/frame pointers
5334
5335 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
5336
5337         * device/include/pic16/usart.h: added, missing in previous commit,
5338         * device/include/pic16/adc.h: fixed typo,
5339         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
5340         commit,
5341         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
5342         <p18fxxx.inc>
5343         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
5344         uninitialized because a bug appears with gplink
5345         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
5346         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
5347         complains for unrecognised option
5348
5349 2005-04-05 Raphael Neider <rneider AT web.de>
5350
5351         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
5352           structs as well (using memcpy)
5353         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
5354           on ISRs (GOTO has no label)
5355         * src/pic16/device.h: added OF_OPTIMIZE_DF
5356         * src/pic16/main.c: added compiler switch --optimize-df to enable the
5357           new data flow analysis/optimization
5358         * src/pic16/pcode.c: added (prototypes for and implementation of)
5359           dataflow analysis functions, fixed pCodeInstructions' inCond and
5360           outCond values, made RCALL a branch instruction
5361         * (pic16_unlinkpCode): keep C line if possible
5362         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
5363           C line moved if possible
5364         * (pic16_getRegFrompCodeOp): NEW, improved version of...
5365         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
5366           to use new pic16_getRegFrompCodeOp (works for more SFRs)
5367         * (pic16_BuildFlow): fixed skip instructions with label (did not start
5368           new flow)
5369         * (pic16_getJumptabpCode): NEW, needed in...
5370         * (LinkFlow): fixed handling of jumptables, calls and conditional
5371           branches
5372         * (pic16_InsertCommentAfter): NEW
5373         * (pic16_pCodeReplace): made verbose and flow preserving
5374         * (AnalyzeFlow): added call to data flow analysis
5375         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
5376         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
5377         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
5378
5379 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5380
5381         * src/SDCCast.c (decorateType): fixed bug #1105626
5382
5383 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
5384
5385         * device/include/asm/pic16/features.h,
5386         * pic18f*.h headers,
5387         * device/include/pic16/adc.h,
5388         * device/include/pic16/delay.h,
5389         * device/include/pic16/i2c.h,
5390         * device/include/pic16/malloc.h,
5391         * device/include/pic16/stdio.h,
5392         * device/include/pic16/stdlib.h,
5393         * device/include/pic16/string.h,
5394         * device/lib/pic16/libc/stdio/printf_tiny.c,
5395         * device/lib/pic16/libc/stdio/printf_small.c,
5396         * device/lib/pic16/libc/stdio/strmgpsim.c,
5397         * device/lib/pic16/libc/stdio/strmmssp.c,
5398         * device/lib/pic16/libc/stdio/strmusart.c,
5399         * device/lib/pic16/libc/stdio/vfprintf.c,
5400         * device/lib/pic16/libc/stdlib/ltoa.c,
5401         * device/lib/pic16/libc/stdlib/putchar.c,
5402         * device/lib/pic16/libc/stdlib/x_ftoa.c,
5403         * device/lib/pic16/libc/stdlib/memchrpgm.c,
5404         * device/lib/pic16/libc/stdlib/memchrram.c,
5405         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
5406         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
5407         * device/lib/pic16/libio/adc/adcbusy.c,
5408         * device/lib/pic16/libio/adc/adcread.c,
5409         * device/lib/pic16/libio/adc/adcsetch.c,
5410         * device/lib/pic16/libio/usart/ubaud.c,
5411         * device/lib/pic16/libio/usart/ubusy.c,
5412         * device/lib/pic16/libio/usart/udrdy.c,
5413         * device/lib/pic16/libio/usart/uopen.c,
5414         * device/lib/pic16/libio/usart/uputc.c,
5415         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
5416         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
5417         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
5418         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
5419         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
5420         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
5421         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
5422         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
5423         specific keywords to double underlined form,
5424         * device/lib/pic16/libc/Makefile.rules,
5425         * device/lib/pic16/libsdcc/Makefile.rules,
5426         * device/lib/pic16/libm/Makefile,
5427         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
5428         to compile with C standard set in Makefile.common
5429         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
5430         rand.c and crc.c in compilation process,
5431         * device/lib/pic16/libsdcc/int/divuint.c,
5432         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
5433         `c' from signed to unsigned,
5434         * device/lib/pic16/startup/crt0.c,
5435         * device/lib/pic16/startup/crt0i.c,
5436         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
5437         keywords to double underlined form, bug fixes in _do_cinit function
5438         which prevented the correct initialization of the .idata segment,
5439         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
5440         core to enter a infinite loop
5441         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
5442
5443 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5444
5445         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
5446
5447 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5448
5449         * device/include/Makefile.in: add support for hc08 subdirectory
5450         * device/include/hc08/: new subdirectory
5451         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
5452         Lucas Loizaga, thanks!
5453         * device/include/hc08/mc68hc908qy.h,
5454         * device/include/hc08/mc68hc908gp32.h,
5455         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
5456         their own directory. Changed internal macro names to use the compiler
5457         reserved namespace. Changed SDCC specific keywords to double
5458         underlined form.
5459         * device/include/math.h,
5460         * device/include/malloc.h,
5461         * device/include/stdarg.h,
5462         * device/include/stdbool.h
5463         * device/include/string.h,
5464         * device/include/tinibios.h,
5465         * device/include/ds400rom.h,
5466         * device/include/8051.h,
5467         * device/include/8052.h,
5468         * device/include/80c51xa.h,
5469         * device/include/at89c55.h,
5470         * device/include/at89S8252.h,
5471         * device/include/at89x51.h,
5472         * device/include/at89x52.h,
5473         * device/include/ds80c390.h,
5474         * device/include/reg764.h,
5475         * device/include/regc515c.h,
5476         * device/include/sab80515.h,
5477         * device/include/mcs51/c8051f000.h,
5478         * device/include/mcs51/c8051f018.h,
5479         * device/include/mcs51/c8051f020.h,
5480         * device/include/mcs51/c8051f040.h,
5481         * device/include/mcs51/c8051f060.h,
5482         * device/include/mcs51/c8051f120.h,
5483         * device/include/mcs51/c8051f300.h,
5484         * device/include/mcs51/c8051f310.h,
5485         * device/include/mcs51/c8051f320.h,
5486         * device/include/mcs51/c8051f330.h,
5487         * device/include/mcs51/c8051f350.h,
5488         * device/include/z180.h: Changed SDCC specific keywords to double
5489         underlined form.
5490
5491 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
5492
5493         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
5494         18F4455,
5495         * (pic16_assignConfigWordValue): disable testing of configuration
5496         register value with config mask,
5497         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
5498         function with port->fun_prefix,
5499         * (genFunction): when generating a naked interrupt function never
5500         create an absolute segment placed in interrupt vector address, place
5501         the actual interrupt function at IVA instead, when an interrupt
5502         function is generated with unspecified interrupt then do not create
5503         the absolute section,
5504         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
5505         code for generating a call to generic pointer get/put function with
5506         a call to function pic16_callGenericPointer(),
5507         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
5508         the call to the generic pointer get/put functions with prefixing the
5509         function name with port->fun_prefix,
5510         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
5511         * src/pic16/main.c (_process_pragma): prefix function with
5512         port->fun_prefix,
5513         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
5514         calling assembler, old 18Fxxxx macro is deprecated,
5515         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
5516         PC_ASMDIR in while condition,
5517         * (findInstruction): add PC_ASMDIR in while condition,
5518         * (buildCallTree): prefix main with port->fun_prefix,
5519         * (pic16_pCode2str): fixed bug that didn't emit the memory access
5520         identifier for variable with banked access in instructions BTFSS,
5521         BTFSC, BCF, BSF, BTG
5522         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
5523         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
5524         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
5525         perform optimization when enviroment variable NO_REG_OPT is set,
5526         * (insideLRBlock): NEW, return 1 if register is inside an
5527         INF_LOCALREGS block,
5528         * (RemoveRegFromLRBlock): remove a register that is completely
5529         eliminated by register optimization, but it is still left in local
5530         register store/restore in/from stack block,
5531         * (Remove2pcodes): after removing register, check to see if it
5532         should be removed from local register store/restore in/from stack
5533         block,
5534         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
5535         DUMMY_READ_VOLATILE,
5536
5537         * device/include/pic16/adc.h: minor prototype modifications and
5538         update,
5539         * device/include/pic16/malloc.h: added GPL notice various
5540         modifications,
5541         * device/include/pic16/stdint.h: NEW, standard header for ints
5542         * device/include/pic16/delay.h: NEW, header for delay functions,
5543         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
5544         delay1mtcy,
5545         * device/include/pic16/signal.h: NEW, header providing helper macros
5546         for implementing signal handlers,
5547         * device/include/pic16/stdio.h: added prototypes for functions,
5548         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
5549         prototypes for stdin and stdout, added macro PUTCHAR to
5550         automatically implement putchar function prototype,
5551         * device/include/pic16/usart.h: modified and updated USART library,
5552         * device/lib/pic16/libio/adc/,
5553         * device/lib/pic16/libio/i2c: some modifications to improve library
5554         performance,
5555         * device/lib/pic16/libc/stdio/: modifications for the new printf*
5556         family of functions,
5557         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
5558         family of functions and other sources,
5559         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
5560         of the PIC18Fxx[28] devices,
5561         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
5562         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
5563         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
5564         _do_cinit function, because the previous failed when local variables
5565         where not placed in the same memory bank,
5566         * device/lib/pic16/libsdcc/char/: various modifications to improve
5567         library performance,
5568         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
5569         information on the new functions of the c library and more...
5570
5571 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5572
5573         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
5574
5575 2005-03-26 Raphael Neider <rneider AT web.de>
5576
5577         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
5578           if condition == CARRY)
5579         * (genCmp): adapted to new genSkipc semantics
5580         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
5581           on rIfx (genCmp was broken)
5582
5583 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5584
5585         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
5586         * src/z80/main.c (_keywords[]),
5587         * src/SDCCglobal.h (struct options),
5588         * src/SDCC.y,
5589         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
5590         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
5591         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
5592         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
5593         always available in leading double underscore form. The C99 support is
5594         mostly missing, but it's a start.
5595         * support/regression/tests/bug-227710.c: fixed nonconforming use of
5596         reserved identifier "__data".
5597
5598 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
5599
5600         * src/mcs51/peeph.def: fixed bug 1170013
5601
5602 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
5603
5604         * device/include/mcs51reg.h: fixed bug 842007
5605
5606 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5607
5608         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
5609         last time.
5610
5611 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5612
5613         * src/port.h (struct PORT),
5614         * src/avr/ralloc.c (avr_assignRegisters),
5615         * src/avr/main.c,
5616         * src/ds390/ralloc.c (ds390_assignRegisters),
5617         * src/ds390/main.c,
5618         * src/hc08/ralloc.c (hc08_assignRegisters),
5619         * src/hc08/main.c,
5620         * src/mcs51/ralloc.c (mcs51_assignRegisters),
5621         * src/mcs51/main.c,
5622         * src/pic/ralloc.c (pic14_assignRegisters),
5623         * src/pic/main.c,
5624         * src/pic16/ralloc.c (pic16_assignRegisters),
5625         * src/pic16/main.c,
5626         * src/xa51/ralloc.c (xa51_assignRegisters),
5627         * src/xa51/main.c,
5628         * src/z80/ralloc.c (z80_assignRegisters),
5629         * src/z80/ralloc.h,
5630         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
5631         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
5632         * src/SDCCcse.h,
5633         * src/SDCCdflow.c (computeDataFlow),
5634         * src/SDCCdflow.h,
5635         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
5636         * src/SDCCloop.h,
5637         * src/SDCCcflow.c (*),
5638         * src/SDCCcflow.h,
5639         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
5640         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
5641         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
5642         immedDom() returning wrong block; probably fixes bug #1160833)
5643
5644 2005-03-20 Borut Razem <borut.razem AT siol.net>
5645
5646         * support/scripts/inc2h.pl: WIN32 port
5647
5648 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
5649
5650         * device/lib/makefile.in: added abs.c and labs.c
5651
5652 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
5653
5654         * device/include/stdint.h: added
5655         * device/lib/abs.c: added
5656         * device/lib/labs.c: added
5657         * device/include/stdlib.h: added abs() and labs() prototypes
5658         * device/lib/libsdcc.lib: added abs and labs
5659         * device/include/float.h,
5660         * device/lib/_fsmul.c,
5661         * device/lib/printf_fast.c,
5662         * device/lib/printf_tiny.c: updated comments
5663
5664 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5665
5666         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
5667         bug #1164313
5668
5669 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5670
5671         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
5672         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
5673
5674 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
5675
5676         * device/lib/printf_large.c: removed inline assembly for portability and
5677           readability. Use printf_fast if speed or size are more important.
5678         * src/pic16/gen.c: removed conditions around use of DEBUGpc
5679         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
5680
5681 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
5682
5683         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
5684         prevent compiler warning
5685
5686 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
5687
5688         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
5689         moved to level 0 and declared as static. Also they are explicit
5690         placed in access bank. This was necessery because some times they
5691         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
5692         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
5693         optimizations. Currently only compare to unsigned char is implemented,
5694         * src/pic16/gen.c: added fReturnIdx array,
5695         * (struct resolvedIfx) is moved to gen.h and made public,
5696         * (struct _G): added sregsAlloc and sregsAllocSet fields,
5697         * (aopForSym): added an optimization to directly store in stack of
5698         the operand of a SEND iCode,
5699         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
5700         but as registers instead (AOP_REG) using the fReturnIdx array,
5701         * (pic16_freeAsmop): remove the freed register from the
5702         _G.sregsAlloc field,
5703         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
5704         a compare of 'WREG',
5705         * (pic16_popGetTempRegCond): changed function prototype, now
5706         function takes also a bitVector argument v which holds the current
5707         set of registers that are allocated for stack access by aopForSym,
5708         registers allocated in aopForSym for accessing stack symbols are not
5709         any more part of the functions usedRegs field,
5710         * (genCall): some times aopOp is called for a stack variable to be
5711         send, aopForSym might perform the push, if this is true make sure
5712         that genCall doesn't push the variable twice by testing _G.resDirect,
5713         * (genFunction): changed testing for unspecified interrupt number
5714         from 256 to INTNO_UNSPEC,
5715         * modified selection scheme of frame pointer generation. Previously
5716         if function did use local registers a frame pointer was generated,
5717         now a frame pointer is generated only if function has arguments
5718         (that need PLUSW2 register access), or has stack arguments, or the
5719         compiler is not instructed to omit the frame pointer,
5720         * (genEndFunction): before restoring local registers that were saved
5721         in the function preamble, also restore the registers that *might*
5722         have been allocated for stack access,
5723         * (genRet): removed some old comments,
5724         * (genCmp, the active (RN's) version): added a call to the
5725         pic16_genCmp_special function to perform the compare with a more
5726         robust and optimized way,
5727         * (genInline): a feature has been added in inline code generation,
5728         which allows a wildcard variable substitution when writing inline
5729         assembly. Code is incomplete and experimental therefore undocumented,
5730         * (genCast): changed order of aopOp for result and right to allow
5731         aopForSym to directly load the result if possible,
5732         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
5733         perform an optimized compare on some selected special occasions,
5734         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
5735         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
5736         generate an IVT any more,
5737         * src/pic16/main.c (pic16_optionsTable): added command line option
5738         --optimize-cmp,
5739         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
5740         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
5741         macros,
5742         * src/pic16/NOTES: Raphael Neider added in list of active developers
5743         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
5744         jumptable_end to prevent bug #,
5745         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
5746         inCond and outCond fields,
5747         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
5748         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
5749         turn off register spilling,
5750         * (packRegsForOneUse): synced with other ports' versions although it
5751         is not used currently,
5752         * (pic16_packRegisters): added an optimization while reading
5753         structure bitfields, some registers may be saved (malloc code is
5754         decreased by 80 bytes)
5755
5756 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
5757
5758         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
5759         left is a bitfield, if yes, then don't optimize assignment. Perhaps
5760         this can be optimized more?
5761
5762 2005-03-10 Raphael Neider <rneider AT web.de>
5763
5764         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
5765           genNearPointerGet): (hopefully) fixed access to bitfields via
5766           pointers (p->bitN = x; and x = p->bitN; failed)
5767
5768 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
5769
5770         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
5771
5772 2005-03-09 Raphael Neider <rneider AT web.de>
5773
5774         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
5775
5776 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
5777
5778         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
5779         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
5780           (regTypeNum): set REG_BIT type if necessary
5781         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
5782         * support/regression/tests/critical.c: check bug 1144613
5783
5784 2005-03-02 Raphael Neider <rneider AT web.de>
5785
5786         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
5787
5788 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5789
5790         * src/avr/ralloc.c (serialRegAssign),
5791         * src/ds390/ralloc.c (serialRegAssign),
5792         * src/hc08/ralloc.c (serialRegAssign),
5793         * src/mcs51/ralloc.c (serialRegAssign),
5794         * src/pic/ralloc.c (serialRegAssign),
5795         * src/pic16/ralloc.c (serialRegAssign),
5796         * src/xa51/ralloc.c (serialRegAssign),
5797         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
5798
5799 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
5800
5801         * src/SDCCast.c (decorateType): fixed bug 1124787
5802
5803 2005-02-20 Hubert Sack <sack AT digiplan.de>
5804         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5805
5806         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
5807         patch #1121755
5808
5809 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5810
5811         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
5812         to keep the correct label reference count when adding/removing references
5813         to labels. A peephole file using this is appended to patch #1144962.
5814
5815 2005-02-14 Raphael Neider <rneider AT web.de>
5816
5817         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
5818         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
5819         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
5820           retrievals of result operand's value on assignment
5821
5822 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
5823
5824         * device/include/pic16/string.h: modified prototype for memccpy()
5825         to memccpy(void *, void *, char, size_t)
5826         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
5827         check whether to omit frame pointer or not,
5828         * (genInline): convert all occurences of "\n" to LF in inline
5829         assembler blocks, this helps formatting the inline text,
5830         * (pic16_loadFSR0): modified prototype,
5831         * (genNearPointerGet, genNearPointerSet): reorganization of code,
5832         removed some 8051 legacy code,
5833         * (genPackBits): enabled handling bitfields exceeding one byte in size,
5834         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
5835         before allocating temporary registers in functions,
5836
5837 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
5838
5839         * support/regression/tests/bitvars.c: corrected the "fix"
5840
5841 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
5842
5843         * support/regression/tests/bitvars.c,
5844         * support/regression/tests/bitwise.c,
5845         * support/regression/tests/rotate.c: "fixed" problems on Alpha
5846
5847 2005-02-10 Raphael Neider <rneider AT web.de>
5848
5849         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
5850           different size for Alpha
5851         * src/pic16/gen.c (genCmpEq) : improved compare with 0
5852
5853 2005-02-09 Raphael Neider <rneider AT web.de>
5854
5855         * src/SDCC.lex(doPragma) : save and restore warning options as well
5856           (also added new stack plus clone- and copyAndFreeSDCCERRG())
5857         * have #pragma less_pedantic set the errorlevel to WARNING
5858           (fixes #1117001)
5859         * (cloneOptimize) : fixed wrong malloc's size
5860         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
5861           facilitate correct handling of #pragma (save|restore)
5862
5863 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
5864
5865         * src/mcs51/gen.c: removed non-standard C nameless struct/union
5866
5867 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
5868
5869         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
5870
5871 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
5872
5873         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
5874
5875 2005-02-02 Raphael Neider <rneider AT web.de>
5876
5877         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
5878         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
5879         * (pic16_storeForReturn): fixed to allow returning function pointers
5880         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
5881         * device/include/pic16/{stddef.h,stdbool.h}: added
5882
5883 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
5884
5885         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
5886
5887 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
5888
5889         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
5890         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
5891          appeared to be required
5892
5893 2005-01-31 Borut Razem <borut.razem AT siol.net>
5894
5895         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
5896           include/mcs51 and include/z80 directories to the package
5897
5898 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5899
5900         * src/hc08/gen.c (genFunction): fixed bug #1112752
5901
5902 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5903
5904         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
5905
5906 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5907
5908         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
5909
5910 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
5911
5912         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
5913
5914 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
5915
5916         * device/include/c8051fxxx.h: removed these 6 files
5917         * device/include/mcs51/c8051fxxx.h: added these 11 new files
5918
5919 2005-01-26 Raphael Neider <rneider AT web.de>
5920
5921         * src/pic16/gen.c (genAssign): fixed assignment from longs
5922           in codespace (were cut to three bytes)
5923         * (genDummyRead): implemented (except for CODESPACE...),
5924           fixed bug #1108575
5925         * src/pic16/glue.c (emitStatistics): beautified
5926         * device/lib/pic16/libm/Makefile: added include path
5927
5928 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5929
5930         * src/z80/gen.c (aopPut): fixed bug #1103902
5931
5932 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5933
5934         * device/lib/expf.c: fixed bug #1095792
5935
5936 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
5937
5938         * device/lib/pic16/libm: added Math library sources
5939
5940 2005-01-24 Raphael Neider <rneider AT web.de>
5941
5942         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
5943           to enable upcast to pCodeOpReg2 (there is no type tag to
5944           differenciate the two and pic16_popGet2p cast into PCOR2)
5945         * src/pic16/main.c (_process_pragma): fixed another malloc bug
5946           (sizeof(sectNames) changed to sizeof(sectName))
5947           Both patches fix segfaults under MinGW.
5948
5949 2005-01-23 Raphael Neider <rneider AT web.de>
5950
5951         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
5952           Safe_[mc]?alloc()'ed variables
5953         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
5954           of (byte sized) temporaries (assign them to WREG for now)
5955         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
5956           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
5957           this might fix SIGSEGVs on MinGW...
5958         * src/SDCCopt.c (killDeadCode): restored original behaviour
5959           (volatile operands might get thrown away though)
5960
5961 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
5962
5963         * src/pic16/gen.c: fixed bug #1106975,
5964         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
5965         pointer update, INTCON is saved, global interrupts are disabled and
5966         restored after updateing TOS.
5967         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
5968         * added function attribute 'shadowregs' to take advantage of shadow
5969         registers,
5970         * added function attribute 'wparam' as an alternative to the wparam
5971         pragma,
5972         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
5973         user declares a non-ISR function as 'shadowregs',
5974         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
5975
5976 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
5977
5978         * .version: bumped version number to 2.4.8
5979         * device/lib/pic16/pics.all: list of PIC18F devices supported by
5980         pic16 port,
5981         * device/lib/pic16/libio/i2c/: I2C module support library,
5982         * device/include/pic16/i2c.h: I2C support library header,
5983         * device/lib/pic16/libc/stdio/: standard IO support sources,
5984         * (printf_small.c): printf_small() source, supports float print,
5985         * (printf_tiny.c): printf_tiny() source, does not support floats,
5986         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
5987         enable global optimizations for entire library source, other
5988         Makefiles in the source tree are also modified to reflect this,
5989         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
5990         function,
5991         * doc/sdccman.lyx: updated to reflect new changes,
5992         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
5993         sym->onStack if-case,
5994         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
5995         sbit, idata, _idata, xdata, _xdata,
5996         * added pragma library, to link an external library, (see doc),
5997         * removed command line options, --pomit-config-words, --pomit-ivt,
5998         --pleave-reset-vector,
5999         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
6000         when calling assembler to reflect memory model used, also define
6001         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
6002         reflect stack model used,
6003         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
6004         on stack return NULL,
6005
6006 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
6007
6008         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
6009           of the operands is volatile. Fixes #1020220
6010
6011 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
6012
6013         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
6014         * (OptimizeRegUsage): make sure that there is really no other flow where
6015           the first pCode is used
6016
6017 2005-01-22 Raphael Neider <rneider AT web.de>
6018
6019         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
6020           to fix #1106967 (pCode->seq are not set up correctly)
6021
6022 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6023
6024         * src/SDCCglue.c (glue): make sure code area is declared before the
6025         static initialization area.
6026
6027 2005-01-21 Raphael Neider <rneider AT web.de>
6028
6029         * device/lib/Makefile.in: fixed test for pic16 install dir
6030         * device/lib/pic16/*/Makefile*: modified compile flags to enable
6031           optimizations
6032         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
6033           added --optimize-goto compiler switch and pragma wparam documentation
6034         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
6035         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
6036           and PRODH closing bug #1071770 (peephole optimizer)
6037
6038 2005-01-19 Raphael Neider <rneider AT web.de>
6039
6040         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
6041           cmdLine buffers (used when calling sdcpp...) are large enough
6042           (MAX_PATH=256 truncates arguments leading to system halts when
6043           used in MinGW...)
6044         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
6045         * (genUminus): rewritten to for efficiency
6046         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
6047           used uninitialized in some cases)
6048         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
6049           copy the third byte from the int -- now assumes 0x80 (data memory)
6050         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
6051           operands (genAddLit expects the iCode's operands to swapped as
6052           well), fixed leftover bytes (crashed for short left operands)
6053         * (pic16_genMinusDec): performance improvements, removed false
6054           PIC14 emitSKPNCs
6055         * (pic16_genMinus): fixed to cope with differently sized operands
6056         * src/pic16/glue.c (pic16_glue): added new banksel optimization
6057           for --obanksel > 1
6058         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
6059         * src/pic16/graph.[ch]: implementation of directed graphs, used by
6060           new banksel optimization
6061         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
6062           analysis for temporary registers (segfaults...)
6063         * src/pic16/peeph.def: added rule
6064
6065 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
6066
6067         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
6068         which converts a float number to its ASCII representation
6069         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
6070         functions to convert the fractional and integer part of a float to ASCII,
6071         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
6072         realloc.c): added _MALLOC_SPEC to explicit place variables in data
6073         ram
6074         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
6075         _STATMEM macros,
6076         * device/include/pic16/adc.h: added GPL info,
6077         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
6078         a pCodeOp as tested operand,
6079         * (genNearPointerGet): optimized bit testing, does not use
6080         intermediate register for bit value, test directly instead with
6081         BTFSS, BTFSC, works only for single bits,
6082         * (genpic16Code): dump the name of the iCode in the asm,
6083         * src/pic16/ralloc.c (decodeOp): removed static declaration and
6084         renamed to pic16_decodeOp,
6085         * (serialRegAssign): do not allocate a temporary register for iCode
6086         sequences that test a single bit for 1/0
6087
6088 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
6089
6090         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
6091         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
6092         access stack and frame pointers. They are initially assigned to
6093         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
6094         accessing SFRs. Updated all occurences of modification of stack or
6095         frame pointer in gen.c and pcode.c,
6096         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
6097         assigning of a literal value to pointers,
6098         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
6099         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
6100         selected
6101
6102 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6103
6104         * doc/sdccman.lyx: update documentation about stack pragma, added
6105         some info for stack memory models
6106
6107 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6108
6109         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
6110
6111 2005-01-08 Raphael Neider <rneider AT web.de>
6112
6113         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
6114           udata sections to fix bug #1097823
6115
6116 2005-01-05 Raphael Neider <rneider AT web.de>
6117
6118         * src/pic16/gen.c (genGenericShift): added handling of differently
6119           sized left operand and result
6120
6121 2005-01-04 Raphael Neider <rneider AT web.de>
6122
6123         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
6124         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
6125           to hold the condition bit)
6126         * added new version of genCmp (old code available via #define)
6127         * added new version of genShiftLeft/genShiftRight in a generic
6128           way, now supports shifting by negative values
6129         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
6130           shiftCount (expected by genGenericShift)
6131         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
6132         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
6133           dump
6134         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
6135           is an invalid literal too...)
6136
6137 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
6138
6139         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
6140         from Raphael Neider,
6141         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
6142         for 8-bit literals. This fixes some literal operands which are sign
6143         extended to 16-bits ints when instruction needs only 8-bits.
6144
6145 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
6146
6147         * device/lib/logf.c: added mcs51 assembly version
6148         * device/lib/expf.c: added mcs51 assembly version
6149         * device/lib/_logexpf.c: new shared asm code for expf and logf
6150         * device/include/math.h: add defines for assembly math library
6151         * device/lib/Makefile.in: build new _logexpf.c
6152         * device/lib/libfloat.lib: use new _logexpf.c
6153
6154 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
6155
6156         * src/pic/device.c
6157         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
6158           device types which have less than 0x7f registers.
6159
6160 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
6161
6162         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
6163
6164 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
6165
6166         * device/lib/printf_fast.c: only build on supported arch.
6167         * device/lib/printf_tiny.c: only build on supported arch.
6168         * device/lib/printf_fast_f.c: only build if asm float lib
6169         * device/lib/_fsget1arg.c: only build if asm float lib
6170         * device/lib/_fsget2args.c: only build if asm float lib
6171         * device/lib/_fsnormalize.c: only build if asm float lib
6172         * device/lib/_fsreturnval.c: only build if asm float lib
6173         * device/lib/_fsrshift.c: only build if asm float lib
6174         * device/lib/_fsswapargs.c: only build if asm float lib
6175         * device/include/stdio.h: don't provide print_fast,
6176           print_fast_f, print_tiny prototypes if --xstack used
6177
6178 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
6179
6180         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
6181         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
6182           to the SOURCES
6183
6184 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
6185
6186         * device/lib/printf_fast_f.c: same as printf_fast, but
6187           with floating point enabled
6188         * device/lib/printf_fast.c: minor tweaks
6189         * device/include/stdio.h: add printf_fast_f
6190
6191 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
6192
6193         * src/SDCCmain.c: make --float-reent default for mcs51
6194         * device/lib/_fsadd.c: added mcs51 assembly version
6195         * device/lib/_fssub.c: added mcs51 assembly version
6196         * device/lib/_fsmul.c: added mcs51 assembly version
6197         * device/lib/_fsdiv.c: added mcs51 assembly version
6198         * device/lib/_fseq.c: added mcs51 assembly version
6199         * device/lib/_fsneq.c: added mcs51 assembly version
6200         * device/lib/_fsgt.c: added mcs51 assembly version
6201         * device/lib/_fslt.c: added mcs51 assembly version
6202         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
6203         * device/lib/Makefile.in: add _fscmp to build
6204         * device/lib/libfloat.lib: add _fscmp to build
6205
6206 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
6207
6208         * device/lib/_fs2slong.c: added mcs51 assembly version
6209         * device/lib/_fs2sint.c: added mcs51 assembly version
6210         * device/lib/_fs2schar.c: added mcs51 assembly version
6211         * device/lib/_fs2ulong.c: added mcs51 assembly version
6212         * device/lib/_fs2uint.c: added mcs51 assembly version
6213         * device/lib/_fs2uchar.c: added mcs51 assembly version
6214         * device/lib/_slong2fs.c: added mcs51 assembly version
6215         * device/lib/_sint2fs.c: added mcs51 assembly version
6216         * device/lib/_schar2fs.c: added mcs51 assembly version
6217         * device/lib/_ulong2fs.c: added mcs51 assembly version
6218         * device/lib/_uint2fs.c: added mcs51 assembly version
6219         * device/lib/_uchar2fs.c: added mcs51 assembly version
6220         * device/include/float.h: added #define to select asm vs c
6221
6222 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
6223
6224         * device/lib/printf_fast.c: improvements to float output
6225         * device/include/float.h: add defines for assembly float library
6226         * device/lib/_fsget1arg.c: receive 1 float arg
6227         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
6228         * device/lib/_fsnormalize.c: normalize a float
6229         * device/lib/_fsreturnval.c: return float, various helper routines
6230         * device/lib/_fsrshift.c: right shift a float's mantissa
6231         * device/lib/_fsswapargs.c: swap 2 floats
6232         * device/lib/Makefile.in: build these 6 new files for mcs51
6233         * device/lib/libfloat.lib: add these 6 files to the library
6234
6235 2004-12-26 Borut Razem <borut.razem AT siol.net>
6236
6237         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
6238           built by gcc 3.4.2
6239
6240 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
6241
6242         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
6243           and fully reentrant and register bank neutral.
6244         * device/lib/printf_fast.c: added float (not enabled by default),
6245           added compact/slower integer (also not enabled by default),
6246           improved size/speed of fast integer code, other minor changes
6247         * device/include/stdio.h, device/lib/Makefile.in,
6248           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
6249
6250 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
6251
6252         * src/pic16/pcode.c: declaring variables other than at the start of a
6253           block is not supported in C by VC6.
6254
6255 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
6256
6257         * applied a previous patch from Raphael Neider that wasn't included
6258         in the previous commits, which fixes infinite loops within jumptable
6259         improvements,
6260         * made some fixes that previous patches introduced
6261
6262 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
6263
6264         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
6265         that fixes an issue with AOP_PCODE asmop's offset,
6266         * (pic16_popCopyReg): update instance field too,
6267         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
6268         function of pic port,
6269         * (genCmp, genAnd, genAssign),
6270         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
6271
6272 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
6273
6274         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
6275         variables initial values to idata section,
6276         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
6277         variables in some functions. This utilizes parmBytes field of iCode
6278         structure to hold the offset of the variable in stack. (might be
6279         able to use the stack field too?)
6280         * applied patch from Raphael Neider # ### , # ###
6281         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
6282         variable initial values in idata section,
6283         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
6284         for static variables with initial value
6285         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
6286         applied fix in while loop from Raphael Neider.
6287
6288 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
6289
6290         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
6291         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
6292         * src/ds390/ralloc.c (serialRegAssign): spill bits
6293         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
6294         * support/Util/SDCCerr.c,
6295         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
6296         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
6297         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
6298
6299 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
6300
6301         * device/include/sdcc-lib.h: inserted LGPL, added includes
6302           asm/ds390/features.h and asm/mcs51/features.h
6303         * device/include/asm/default/features.h,
6304         * device/include/asm/gbz80/features.h,
6305         * device/include/asm/z80/features.h: added empty _AUTOMEM
6306           and _STATMEM
6307         * device/include/asm/ds390/features.h,
6308         * device/include/asm/mcs51/features.h: added files with defines for
6309           _AUTOMEM and _STATMEM indicating automatic and static storage class
6310         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
6311         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
6312         * src/SDCCicode.c (geniCodeCast),
6313         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
6314         * src/SDCCloop.c (loopInduction): removed unused variable lr
6315         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
6316           to convertToFcall to include char modulo (RFE 1065037), added check
6317           if left operand is unsigned and use abs of literal value
6318         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
6319           as it doesn't work after conversion from peephole.def to peephole.rul
6320         * src/mcs51/gen.c (toBoolean): added check for size,
6321           (genModOneByte): optimized code for signed char modulo a literal
6322           power of 2 (thanks to Hubert Sack),
6323           (genRRC): removed unnecessary "clr c",
6324           (genRLC): replaced "add a,acc" with cheaper "rlc a"
6325         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
6326           jump optimization,
6327           swapped rules 256.c and 256.d,
6328           extended 256.d by using new multiple checks (thanks Erik),
6329           added rules 256.e and 256.f,
6330           updated rule 261.a and 261.b to new generated code
6331         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
6332
6333 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6334
6335         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
6336           induction related bugs, including first part of bug #1074377
6337
6338 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
6339
6340         * applied patch from bug-report #1076292,
6341         * applied patches for genAnd and Goto-optimizations for Raphael
6342         Neider,
6343         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
6344         dump a less iCode information,
6345         * src/pic16/device.h (pic16_options_t): added field debgen,
6346         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
6347         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
6348         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
6349         puclic,
6350         * (various functions): added macros FENTRY and FENTRY2 to functions,
6351         to emit function prologue,
6352         * (various functions): fixed indentation,
6353         * (genNearPointerGet): fixed loading of FSR0,
6354         * (genPackBits): applied patch from Raphael Neider to fix updating
6355         of FSR0 and touching only the modified bits,
6356         * src/pic16/genarith.c (various functions): added macros FENTRY to
6357         emit function prologue in comments,
6358         * src/pic16/pcode.h: added functions debugf2, debugf3,
6359         * src/pic16/ralloc.c: partial fix for packForPush caused
6360         segmentation fault,
6361
6362 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6363
6364         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
6365           <stsp AT users.sourceforge.net> with reversed byte order
6366         * support/regression/tests/rotate.c: added (ds390 skips some tests)
6367
6368 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6369
6370         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
6371           bug #1074377
6372         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
6373         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
6374
6375 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
6376
6377         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
6378
6379 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6380
6381         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
6382           conditions,
6383           (setFromConditionArgs): friendly operand parser for peephole rules,
6384           (operandBaseName, operandsNotRelated): new peephole condition
6385           "operandsNotRelated" -- similar to "operandsNotSame", but takes
6386           architecture specific register naming into account, handles n-way
6387           comparisons, and supports quoted literals
6388         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
6389
6390 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6391
6392         * src/mcs51/peeph.def: fixed bug #1076940
6393
6394 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
6395
6396         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
6397
6398 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6399
6400         Adding support for replacing ljmps with sjmps in jumptables
6401         generated for switch statements. For now you need to set the
6402         environment variable SDCC_SJMP_JUMPTABLE to enable this.
6403         Now 4 algorithms for mcs51 jumptable generation are used:
6404         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
6405         addresses loaded pc-relative for up to 112 cases and stack-pushing
6406         target addresses loaded with offset from dptr for up to 256 cases.
6407
6408         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
6409         * src/mcs51/main.c: adapted constants for switch table generation
6410         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
6411
6412 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
6413
6414         * device/lib/printf_large.c (_print_format): fixed bug 1073386
6415         * support/regression/tests/bug1057979.c: added test for bug 1073386
6416
6417 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
6418
6419         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
6420         compilers
6421
6422 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
6423
6424         * src/pic16/device.h,
6425         * src/pic16/genarith.c,
6426         * src/pic16/glue.c,
6427         * src/pic16/main.c,
6428         * src/pic16/pcode.c: applied patches #1068154 and #1070213
6429
6430 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
6431
6432         Large cummulative patch for pic16 port.
6433         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
6434         to call when a stack overflow occurs,
6435         * (malloc.h): added CVS Id tag,
6436         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
6437         variable,
6438         * added libc directory. The current version of LibC contains string
6439         functions, ctype functions and macros and some functions of the
6440         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
6441         be extensively tested in the future. Standard disclaimer here.
6442         Library is not automatically build yet. But one can build it by
6443         invoking 'make' inside the libc directory.
6444         * added ADC library under libio. Preliminary version yet.
6445
6446         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
6447         * src/pic16/gen.c (aopForRemat): asmop size is filled by
6448         aopForRemat() now and not by pic16_aopOp(),
6449         * (pic16_popGetTempReg): removed warning messgae when allocating
6450         temporary registers, its a buggy feature and will be removed,
6451         * (pic16_popGet): set register instance field in AOP_CRY,
6452         * (pic16_outBitC): fixed for results in size greater than 1,
6453         * (genUminusFloat): fixed for pic16, ported code from mcs51,
6454         * (pic16_storeForReturn): optimized return of 0,
6455         * (genCmp): experimental code for new genCmp which uses PIC18's
6456         special compare&skip instructions. Initial tests fail some times
6457         with variables grater than 1 byte in size, so new code is disabled,
6458         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
6459         a single bit,
6460         * (genCast): began a fix to optimize the casting of a bit to another
6461         bit, now assigning a bitfield to another bitfield will fail, sorry,
6462         * src/pic16/main.c: disabled the use of lr-support feature,
6463         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
6464         * added some function prototypes, added function _debugf prototype,
6465         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
6466         bits with offset (case PO_GPR_BIT),
6467         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
6468         command line,
6469         * (isBankInstruction): modified to return 0 for no banking instruction,
6470         and 1 for banking instruction,
6471         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
6472         caused stop processing pCodes after a inline assembly block,
6473         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
6474         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
6475         registers when it shouldn't,
6476         * src/pic16/ralloc.c (allocReg): add preliminary support for
6477         supporting a limited set of temporary registers,
6478
6479 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6480
6481         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
6482           genDataPointerSet): ensure assignments always copy in MSB to LSB
6483           order,
6484           (loadRegFromAop): recognize CLRH optimization,
6485           (genFunction): optimize RECEIVE iCodes in reentrant functions
6486
6487 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6488
6489         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
6490           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
6491           selected.
6492         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
6493         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
6494           contiguous with data
6495
6496 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6497
6498         * device/lib/_gptrget.c (_gptrget),
6499         * device/lib/_gptrgetc.c (_gptrgetc),
6500         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
6501           instead of sjmp to ret
6502         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
6503           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
6504
6505 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
6506
6507         * .version: bumped version to 2.4.7
6508         * device/lib/_gptrget.c (_gptrget): is now _naked
6509         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
6510         * device/lib/_gptrput.c (_gptrput): is now _naked
6511         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
6512           (createFunction): fixed xstack
6513         * src/SDCCglue.c (emitMaps): set allocation required for bit area
6514         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
6515           or bit either,
6516           (geniCodeCritical): store original interrupt state in an iTemp bit
6517           var unless stack-auto
6518         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
6519         * src/SDCCmain.c (setIncludePath): added include/target to search path
6520         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
6521         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
6522           prototype,
6523           (processFuncArgs): put bit vars in bit area
6524         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
6525           unsaveRBank): fixed xstack,
6526           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
6527           (genFunction, genEndFunction): fixed xstack,
6528           (genAssign): optimization don't walk backwards through mem
6529         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
6530         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
6531         * support/regression/Makefile: also make library (for stack-auto) when
6532           making "all" and added "test-mcs51-xstack-auto"
6533         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
6534         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
6535         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
6536         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
6537         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
6538           make-library by MAKE_LIBRARY
6539         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
6540           regression tests for xstack
6541         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
6542         * support/regression/tests/critical.c: test for critical on mcs51
6543
6544 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6545
6546         * support/regression/ports/ucz80/spec.mk: use include and lib files from
6547           built version of sdcc instead of installed version
6548
6549 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
6550
6551         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
6552         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
6553           vprintf.c now
6554         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
6555         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
6556           WARNING: remove device/lib/build/z80/printf.o by hand when
6557           updating from previous build!
6558         * device/lib/z80/printf.c: updated comment
6559         * support/regression/tests/bug1057979.c: test all ports now
6560         * support/regression/tests/bug1065458.c: file added
6561
6562 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6563
6564         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
6565           *_start and *_end symbols for static functions
6566
6567 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
6568
6569         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
6570           and search crt0.o in all library paths,
6571           (setIncludePath): proper handling of --nostdinc,
6572           (setLibPath): proper handling of --nostdlib
6573         * support/regression/Makefile,
6574         * support/regression/ports/ds390/spec.mk,
6575         * support/regression/ports/gbz80/spec.mk,
6576         * support/regression/ports/hc08/spec.mk,
6577         * support/regression/ports/mcs51/spec.mk,
6578         * support/regression/ports/mcs51-large/spec.mk,
6579         * support/regression/ports/mcs51-stack-auto/spec.mk,
6580         * support/regression/ports/z80/spec.mk: use include and lib files from
6581           built version of sdcc instead of installed version
6582         * doc/sdccman.lyx: fixed typo in --nostdinc
6583
6584 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
6585
6586         * src/pic/pcode.c,
6587         * src/pic/device.c,
6588         * src/pic/ralloc.c,
6589         * src/pic/gen.c : added support to generate code for struct bit fields.
6590
6591 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
6592
6593         * as/xa51/xa_version.h,
6594         * device/include/errno.h,
6595         * device/include/regc515c.h,
6596         * device/lib/_itoa.c,
6597         * device/lib/_ltoa.c,
6598         * device/lib/ser_ir_cts_rts.c,
6599         * sim/ucsim/xa.src/glob.cc,
6600         * sim/ucsim/xa.src/inst_gen.cc,
6601         * sim/ucsim/xa.src/xa_bit.cc,
6602         * sim/ucsim/xa.src/xa_sfr.cc,
6603         * sim/ucsim/z80.src/inst_dd.cc,
6604         * sim/ucsim/z80.src/inst_fdcb.cc,
6605         * support/scripts/keil2sdcc.pl,
6606         * src/pic16/pic16.dsp,
6607         * src/pic16/pic16a.dsp: corrected cvs line endings
6608         * device/lib/printf_large.c: fixed bug 1057979
6609         * src/pic16/gen.c: fixed non-C standard code
6610         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
6611         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
6612         * support/regression/ports/mcs51/support.c: reload T1 asap
6613         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
6614           pdata use and clear idata startup behaviour
6615         * support/regression/tests/bug1057979.c: added
6616
6617 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
6618
6619         * device/examples/ds390/ow390/ad26.h,
6620         * device/examples/ds390/ow390/cnt1d.h,
6621         * device/examples/ds390/ow390/crcutil.c,
6622         * device/examples/ds390/ow390/ownet.h,
6623         * device/examples/ds390/ow390/owsesu.c,
6624         * device/examples/ds390/ow390/swt12.h,
6625         * device/examples/ds390/ow390/swtoper.c,
6626         * device/examples/ds390/ow390/temp10.h,
6627         * device/examples/ds390/ow390/thermodl.c,
6628         * device/examples/ds390/tinitalk/tinitalk.dsp,
6629         * device/examples/ds390/tinitalk/tinitalk.dsw,
6630         * device/examples/mcs51/clock/hw.h,
6631         * device/examples/mcs51/simple2/go.bat,
6632         * device/examples/serialcomm/windows/serial.h,
6633         * device/examples/xa51/dummy.c,
6634         * device/examples/xa51/hello.c,
6635         * device/include/80c51xa.h,
6636         * device/include/at89x051.h: corrected cvs line endings
6637
6638 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
6639
6640         * src/pic16/main.c (options): added command line --gstack, to trace
6641         stack over/under flows,
6642         * added pragma 'wparam' to allow passing first byte of function
6643         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
6644         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
6645         call to __gstack_test function and sets up the symbol as extern,
6646         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
6647         * popaop): added call to pic16_testStackOverflow,
6648         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
6649         wparamList list,
6650         * (genCall, genPcall): now all parameters are passed via stack
6651         except in functions that are pass to wparam pragma in which WREG is
6652         used too,
6653         * (genPcall): REENTRANT flag is checked to see if variable prototype
6654         contains reentrant keyword, don't call a non-reentrant function, via
6655         a reentrant function pointer or vice versa, functions are never
6656         passed via WREG,
6657         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
6658         D.Winkler,
6659         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
6660         SIGSEGV when accessing a NULL register stucture,
6661         * (pic16_printGPointerType): modified to handle UPPER modifier for
6662         function initializers, changed prototype of function to simpler one,
6663         * (pic16_printIvalFuncPtr): check to see if function is already
6664         added in externs list,
6665         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
6666         optimized a move from W to SFR with a move to the same register
6667         later after a CALL,
6668         * device/lib/pic16/debug: NEW directory, contains debug features
6669         which are enabled when linking with libdebug.lib, currently command
6670         line option --gstack enables stack pointer tracing for over/under
6671         flow, corresponding sources are in debug/gstack
6672
6673 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
6674
6675         * doc/sdccman.lyx: updated SDCC version,
6676         * (PIC16 port): update list of command line options,
6677         * src/pic16/device.h (structure pic16_options_t): added field gstack
6678         to enable stack overflow tracing on push/pops,
6679         * src/pic16/device.c (statistics structure): added statistics
6680         structure,
6681         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
6682         pic16_dump_int_registers): increase statistics counters for each
6683         * variable which is encountered
6684         * (pic16_dump_usection): emit each .udata variable to its own udata
6685         section,
6686         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
6687         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
6688         parameters via stack, otherwise use old scheme,
6689         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
6690         assembler output file,
6691         * src/pic16/main.c: added command line options --gstack to enable
6692         push/pop tracing for stack overflow,
6693         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
6694         instructions): added size of each instruction,
6695         * (pic16_countInstruction): estimate size of instructions in
6696         the_pFile list, inline assembly blocks are not counted,
6697         * (pic16_FixRegisterBanking): trace previous register usage, when
6698         banksel optimizations is greater than 0, don't emit a redudant
6699         banksel directive,
6700
6701 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
6702
6703         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
6704         * src/pic16/ralloc.c : applied same fix for pic16.
6705         * src/pic/gen.c : tidied it up a little.
6706
6707 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6708
6709         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
6710         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
6711
6712 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6713
6714         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
6715
6716 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6717
6718         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
6719         non-reentrant function __modsint in the interrupt function (thus
6720         corrupting math operations during serial I/O)
6721         * device/lib/ser_ir.c: as above, changed buffersize
6722         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
6723         256.c,d for zeroing
6724         * doc/Makefile: added option -t for rsync
6725
6726 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6727
6728         * src/SDCCast.h (struct ast),
6729         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
6730
6731 2004-10-20 Borut Razem <borut.razem AT siol.net>
6732
6733         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
6734         package
6735
6736 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
6737
6738         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
6739         makefile targets,
6740         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
6741         support functions to replace long sequences of MOVFF's from access
6742         bank registers to stack and vice versa,
6743         * src/pic16/device.h: added new field opt_flags, where optimization
6744         flags can be set to enable certain features,
6745         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
6746         * pBlock, (genFunction, genEndFunction): surroung loop for
6747         saving/loading used registers in stack with PC_INFO pCodes,
6748         INF_LREGS. Code in between can then be optimized by pCode optimizer
6749         to support function calls,
6750         * (genDataPointerSet): fixed bug which loaded float fields in
6751         structures with corrupt data,
6752         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
6753         in a standard way debug info on stderr. Feature used for developing
6754         and debugging only,
6755         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
6756         obsolete chunks of code,
6757         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
6758         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
6759         * pic16/src/pcode.c (pic16_newpCodeInfo,
6760         * (pic16_newpCodeOpLocalRegs),
6761         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
6762         feature,
6763         * (pic16_pCodeConstString): printing of the initial value of a
6764         symbol as a comment is inhibited since parsing was already done by
6765         copyStr and output is corrupt,
6766         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
6767
6768 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6769
6770         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
6771
6772 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
6773
6774         * as/mcs51/lkarea.c: removed old K&R style,
6775           (lnksect): changed check on boundary error,
6776           (lnksect2): changed check on boundary error,
6777           (lnksect2): extend XSTK to end of page if size = 1
6778         * as/mcs51/lkmain.c: removed old K&R style,
6779           (Areas51): create l_IRAM symbol
6780         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
6781         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
6782           model-mcs51-stack-auto, added model-mcs51-xstack-auto
6783         * device/lib/_mullong.c: added version to be compiled with xstack
6784         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
6785         * device/lib/mcs51/crtxclear.asm: clear pdata as well
6786         * device/lib/mcs51/crtxstack.asm: fixed comment
6787         * src/SDCCglue.c: maxInterrupts defaults to 0,
6788           (emitMaps): added pdata,
6789           (createInterruptVect): (re)moved default,
6790           (glue): added pdata,
6791           (glue): moved __start__xstack to XSTK with default size 1
6792         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
6793           and options.float_rent when options.stackAuto is set,
6794           (linkEdit): only write XDATA_NAME if provided on command line
6795         * src/SDCCmem.h,
6796         * src/SDCCmem.c: added pdata
6797         * src/port.h: added pdata_name to PORT
6798         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
6799           (saveRegisters, unsaveRegisters): removed usage of B,
6800           (genMinus): fixed accumulator clash,
6801           (genJumpTab): added comment, this needs another look
6802         * src/mcs51/gen.c: added check for "B in use" paranoia,
6803           added pushB() and popB()
6804         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
6805           chance
6806         * src/avr/main.c,
6807         * src/ds390/main.c,
6808         * src/hc08/main.c,
6809         * src/mcs51/main.c,
6810         * src/pic/main.c,
6811         * src/pic16/main.c,
6812         * src/xa51/main.c,
6813         * src/z80/main.c: (reset_regparms) made void parameter explicit and
6814           added PSEG (PAG,XDATA) or NULL to port specifier
6815         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
6816         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
6817           (_mcs51_genInitStartup): removed __start__xstack equ,
6818           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
6819         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
6820         * src/z80/gen.c (_rleAppend): fixed warnings
6821         * support/regression/tests/zeropad.c: added pdata test
6822         * .version: bumped to 2.4.6
6823
6824 2004-10-17 Borut Razem <borut.razem AT siol.net>
6825
6826         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
6827         as a part of nightly build
6828
6829 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
6830
6831         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
6832         WREG holds the first byte function parameters,
6833         * (aopForSym): take special case for symbols which are in FARSPACE
6834         but in CODESPACE too,
6835         * (assignResultValue): modified to take into account _G.useWreg,
6836         * (genCall): don't use wreg for parameter passing when function is
6837         declared as reentrant, too, added optimization INCF to stack
6838         pointer when stack parameter count is 1,
6839         * (genFunction, genEndFunction): refurnished and fixed to not using
6840         wreg for passing parameters when function has varargs or is
6841         reentrant, fixed bug with symbol name compare for generating
6842         functions in absolute address,
6843         * (pic16_storeForReturn): refurnished,
6844         * (genCmp): began writing a new version of the function, not ready
6845         yet, therefore it is disabled,
6846         * (genAssign): do not read code memory when assigning a function to
6847         a pointer function,
6848         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
6849         array of characters, not pointer,
6850         * (pic16initialComments): in debug mode emit an .ident directive for
6851         the assembler,
6852         * (_process_pragma): emit a new warning type (internal to pic16)
6853         when setting stack to default length, emit a similar warning when
6854         placing a function at absolute address and address is not word aligned
6855         * (_pic16_parseOptions): added 'return TRUE' statement,
6856         * (_pic16_linkEdit): if compiling a source, then add the source's
6857         file object, first in the list of objects to link,
6858
6859 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
6860
6861         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
6862         * src/pic/main.c : removed VC warning.
6863         * src/pic/gen.c : changed comment.
6864
6865 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
6866
6867         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
6868         reference to a deprecated symbol _GPTRREG was causing failure to
6869         link. Thanks G. M. Gallant for the info.
6870
6871 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
6872
6873         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
6874         comments for Bugs item #954788.
6875
6876 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
6877
6878         * src/pic16/device.c (pic16_dump_gsection,
6879         * pic16_groupRegistersInSection): handle symbols declared to be in
6880         access bank differently,
6881         * src/pic16/gen.c (struct _G): added field resDirect,
6882         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
6883         send values read from stack directly to result and don't allocate
6884         temporary values,
6885         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
6886         same registers,
6887         * (pic16_sameRegsOfs): NEW,
6888         * (freeAsmop): if _G.resDirect is set then do not mark registers as
6889         free because they were not allocated from temporary pool,
6890         * pic16_popRegFromString): workaround to fix a problem with
6891         allocating variables twice or never,
6892         * (genGenPointerGet): using PRODL instead of FSR0H,
6893         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
6894         instead of FSR0H,
6895         * (genAssign): take advantage of the _G.resDirect flag,
6896         * (genCast): around line 11844, use mov2f instead of directly
6897         MOVFF'ing between operands to account for literal values,
6898         * src/pic16/genutils.c: some new debug functions for gpsim have been
6899         added,
6900         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
6901         float with integer part only,
6902         * src/pic16/main.c (_process_pragma): handle pragma udata access to
6903         place variables in access bank
6904         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
6905         updated sources to reflect recent changes in gen.c
6906
6907 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
6908
6909         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
6910         sources that searched for headers in installation path, now the
6911         device/include/pic16 is used,
6912         * src/pic16/glue.c (pic16glue),
6913         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
6914         .line directives if not in debug mode, this suppresses assembler's
6915         warnings for ignored directives
6916
6917 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
6918
6919         * src/port.h: made reset_regparms prototype void parameter explicit.
6920         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
6921         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
6922         * doc/sdccman.lyx: documented warning disabling and how to use
6923           printf_large to make it print floats.
6924         * device/include/stdbool.h: NEW
6925         * device/lib/_atof.c,
6926         * device/lib/_divuint.c,
6927         * device/lib/_divulong.c,
6928         * device/lib/expf.c,
6929         * device/lib/printf_large.c,
6930         * device/lib/sincosf.c,
6931         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
6932         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
6933           a completely reentrant lib.
6934
6935 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
6936
6937         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
6938         * device/include/pic16/stdio.h: fixed bug with colon
6939
6940 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
6941
6942         * device/include/pic16/stdio.h,
6943         * device/include/pic16/stdlib.h,
6944         * device/include/pic16/math.h: NEW
6945         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
6946         declared as _naked to reduce overhead
6947         * device/lib/Makefile.in (target port-specific-objects-pic16):
6948         changed * to *.* so to ignore the CVS directory,
6949         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
6950         stacked variables back in stack,
6951         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
6952         corruption
6953
6954 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
6955
6956         * .version: bumped version number to 2.4.5
6957         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
6958         * support/Util/SDCCerr.c (messages structure): added entry for
6959         W_POSSBUG2
6960
6961         Large cumulative patch for pic16 port and libraries.
6962         * device/include/pic16/sdcc-lib.h,
6963         * device/include/pic16/stdarg.h,
6964         * device/include/asm/pic16/features.h,
6965         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
6966         * device/include/pic16/float.h: changes reentrant keyword with
6967         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
6968         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
6969         updated target build-libraries to include objects from gptr,
6970         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
6971         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
6972         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
6973         all function headings,
6974         * src/SDCCmain.c: added global parameter userIncDirsSet,
6975         * (parseCmdLine): when option -I is encountered add directory to
6976         userIncDirsSet too,
6977         * src/version.awk: added space between control and long,
6978         * src/pic16/NOTES: added some notes for the port,
6979         * src/pic16/gen.c: added prototype for mov2fp function,
6980         * (fReturnpic16[]): properly named return value registers,
6981         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
6982         * (aopForSym): added code to handle symbols with onStack flag set,
6983         symbols onStack are allocated PTRSIZE bytes,
6984         * (aopFreeAsmop): handles special case where asmops are stack objects,
6985         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
6986         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
6987         added argument lock to trace flaws in allocating temporary registers
6988         when developing port,
6989         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
6990         * (pic16_popRegFromString): reenabled allocating a direct register
6991         from string,
6992         * (assignResultValue): various beautifications,
6993         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
6994         referenced function argument,
6995         * (genIpush): reenabled to allow stacked arguments, handles only
6996         ic->parmPush iCodes,
6997         * (genCall, genPcall): major changes to allow for variable argument
6998         functions, fixed a bug with falsely restoring stack pointer after
6999         returning from call,
7000         * (genFunction): pending code for critical function,
7001         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
7002         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
7003         * (genNearPointerGet): fixed bug with indirect reading, was always
7004         reading from INDF0
7005         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
7006         pointers,
7007         * (genAddrOf): rewrote code to take address of a stacked function parameter
7008         * (genCast): fixed casting to generic pointer type,
7009         * src/pic16/gen.h: added AOP_STA,
7010         * (struct asmop): added field stk,
7011         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
7012         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
7013         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
7014         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
7015         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
7016         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
7017         generic pointers,
7018         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
7019         and library paths,
7020         * (pic16_port structure): generic pointer size is set to 3,
7021         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
7022         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
7023         compiler warning,
7024         * src/pic16/ralloc.c (allocReg): prevent allocating register when
7025         operand is an iTemp,
7026
7027 2004-09-24 Martin Helmling <mh AT octo-soft.de>
7028
7029         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
7030         * debugger/mcs51/simi.c: addapt new syntax of s51
7031
7032 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
7033
7034         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
7035         * src/pic16/pcode.c: commented out some calls to free() in order to
7036         fix bug #989576,
7037
7038 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7039
7040         * src/SDCCicode.h,
7041         * src/SDCCicode.c (isiCodeInFunctionCall),
7042         * src/avr/ralloc.c (selectSpil),
7043         * src/pic/ralloc.c (selectSpil),
7044         * src/pic16/ralloc.c (selectSpil),
7045         * src/ds390/ralloc.c (selectSpil),
7046         * src/hc08/ralloc.c (selectSpil),
7047         * src/xa51/ralloc.c (selectSpil),
7048         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
7049         stack in the middle of a function call sequence (fixes bug #1020268)
7050         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
7051         costs associated with the minimum switch case.
7052
7053 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7054
7055         * src/SDCC.lex: fixed bug #1030549
7056
7057 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7058
7059         * src/SDCCcse.h (struct cseDef),
7060         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
7061         over a function call if the CSE is derived from a symbol whose
7062         address has been taken (fixes bug #1029883)
7063         * support/regression/tests/bug-1029883: a new regression test for
7064         this bug
7065
7066 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7067
7068         * src/hc08/gen.c (emitinline): fixed bug #1029778
7069         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
7070         to a cast object is no longer a syntax error ("fixes" bug #1030006,
7071         and starts toward RFE #905167)
7072
7073 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
7074
7075         * src/pic16/gen.c (mov2f): New function to move an operand to
7076         another without considering if it is a literal or a register,
7077         * (pic16_sameRegs): don't check if they are both AOP_REG,
7078         * (AccRsh): removed andmask=0 lines,
7079         * (genLeftShift): duplicated to be improved in future versions,
7080         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
7081         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
7082         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
7083         * (pic16initMnemonics): added initialization for POC_INFSNZW,
7084         * (insertBankSwitch): fixed inserting banksel directives algorithm
7085         for instructions that follow a skip instruction, this fixes a report
7086         for broken subtraction code generation,
7087         * src/pic16/ralloc.c (deassignLRs): do not free register if current
7088         iCode is a left op, just in case result and right share the same
7089         registers
7090
7091 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7092
7093         * src/hc08/main.c,
7094         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
7095         preservation of HX
7096         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
7097         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
7098         on 2004-09-12; it was buggy
7099
7100 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
7101
7102         * src/SDCCsymt.h: removed RESULT_CHECK
7103         * src/SDCCast.c,
7104         * src/SDCCglue.c,
7105         * src/SDCCval.c,
7106         * src/pic/glue.c,
7107         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
7108
7109 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
7110
7111         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
7112         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
7113         configuration values no more rejected by compiler, they are assigned
7114         to configuration registers with a warning message instead,
7115         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
7116         the for-loop so last conf register is emitted too,
7117         * (_pic16_initPaths): link library libsdcc.lib by default,
7118         * (_hasNativeMulFor): modified test for multiplication according to
7119         Raphael Neider's remarks. Integer multiplication is also done with
7120         support functions,
7121         * device/include/pic16/pic18fregs.h: corrected type error in while
7122         testing and including 18f6720 header file
7123
7124 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
7125
7126         * src/pic16/device.h (pic16_options): removed field use_crt,
7127         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
7128         until an optimization to handle single bits is added,
7129         * (pic16_loadFSR0): moved before genUnpackBits,
7130         * (genAnd): some white lines removed,
7131         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
7132         leave_reset flags in pic16_options when using crt modules,
7133
7134 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
7135
7136         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
7137           for bugs 898889 & 979599. Also used some safer print instructions.
7138
7139 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
7140
7141         * src/pic16/device.h (pic16_options_t): added field use_crt,
7142         crt_name, no_crt,
7143         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
7144         catch a probable future bug,
7145         * src/pic16/gen.c: aopIdx function commented out,
7146         * (genAssign): commented out old code which used aopIdx,
7147         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
7148         code, added if conditionals to take into account the --use-crt
7149         command line options,
7150         * src/pic16/main.c (pic16_optionsTable): added new command line
7151         options, --use-crt= and --no-crt,
7152         * (_pic16_linkEdit): now the proper crt object is added in the
7153         linker command line except than when --no-crt is specified,
7154         * src/pic16/pcode.c,
7155         * src/pic16/pcode.h: added some structures and functions for a new
7156         optimization scheme to compansate for instruction overhead between
7157         same iCodes, this scheme is currently under development and is not
7158         working in any way,
7159         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
7160         to && operator,
7161         * device/lib/pic16/startup/crt0i.c,
7162         * device/lib/pic16/startup/crt0iz.c: added global char variable
7163         __uflags to force the generation of an idata section
7164
7165 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
7166
7167         * doc/Makefile,
7168         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
7169         * doc/sdccman.lyx: updated sdcc version to 2.4.4
7170
7171 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7172
7173         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
7174         Frieder) and clarified the default code optimization mode
7175
7176 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7177
7178         * src/SDCC.lex (doPragma, process_pragma),
7179         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
7180         "opt_code_size", and "opt_code_balanced"
7181         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
7182         regrouped options by category, added support for category headers
7183         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
7184         and "--opt-code-size"
7185         * doc/sdccman.lyx: documented these new options and pragmas
7186         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
7187         preference into account
7188
7189 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
7190
7191         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
7192           geniCodePreDec): Fixed bug 904237 by generating a warning
7193         * src/SDCCerr.h,
7194         * src/SDCCerr.c: added warning W_SIZEOF_VOID
7195
7196 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
7197
7198         * src/pic/device.c : When no max ram set validate full memory range.
7199         * src/pic/pcode.c,
7200         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
7201
7202 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
7203
7204         * device/lib/_gptrget.c,
7205         * device/lib/_gptrput.c: updated comment
7206         * device/lib/calloc.c,
7207         * device/lib/free.c,
7208         * device/lib/malloc.c,
7209         * device/lib/realloc.c: added LGPL, made them reentrant-safe
7210         * src/SDCCcse.c (cseBBlock),
7211         * src/SDCCicode.c (printOperand, geniCodeArray),
7212         * src/SDCCicode.h (struct operand): fixed bug 868103
7213         * support/regression/tests/bug-868103.c: added
7214         * src/SDCCast.c (searchLitOp),
7215         * src/SDCCcse.h (struct cseDef),
7216         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
7217         * src/SDCCicode.h (struct operand),
7218         * src/SDCCsymt.h (struct sym_link),
7219         * src/avr/gen.c (hasInc),
7220         * src/ds390/gen.c (hasInc),
7221         * src/hc08/gen.c (genPlusIncr, hasInc),
7222         * src/mcs51/gen.c (hasInc),
7223         * src/pic16/glue.c (pic16_printIvalChar),
7224         * src/pic16/ralloc.c (regWithIdx),
7225         * src/xa51/gen.c (hasInc) : removed warnings
7226         * src/SDCCast.c (createBlock): added comment ???
7227         * src/hc08/ralloc.c: updated comments
7228
7229 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7230
7231         * doc/sdccman.lyx: updated section on switch statements, added
7232         section about semaphore locking
7233         * doc/Makefile: added option -info for latex2html
7234         * device/lib/_gptrget.c,
7235         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
7236
7237 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
7238
7239         * src/pic/device.h,
7240         * src/pic/device.c,
7241         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
7242          maxram is less than 0x100.
7243
7244 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
7245
7246         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
7247
7248 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7249
7250         * src/port.h,
7251         * src/mcs51/main.c,
7252         * src/ds390/main.c,
7253         * src/z80/main.c,
7254         * src/hc08/main.c,
7255         * src/pic/main.c,
7256         * src/pic16/main.c,
7257         * src/avr/main.c,
7258         * src/xa51/main.c
7259         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
7260         a jump table is the best form for a switch statement, including
7261         automatic insertion of missing cases to make the case range
7262         continuous. Developed in collaboration with Frieder Ferlemann.
7263
7264 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7265
7266         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
7267         accumulator result if it needs sign extension
7268
7269 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
7270
7271         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
7272
7273 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
7274
7275         * device/lib/gbz80/printf.c,
7276         * device/lib/z80/printf.c: removed define for NULL
7277
7278 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
7279
7280         * as/xa51/xa_link.c,
7281         * device/examples/ds390/ow390/ad26.c,
7282         * device/examples/ds390/ow390/cnt1d.c,
7283         * device/examples/ds390/ow390/counter.c,
7284         * device/examples/ds390/ow390/ds2480.h,
7285         * device/examples/ds390/ow390/ds2480ut.c,
7286         * device/examples/ds390/ow390/findtype.c,
7287         * device/examples/ds390/ow390/gethumd.c,
7288         * device/examples/ds390/ow390/owllu.c,
7289         * device/examples/ds390/ow390/ownetu.c,
7290         * device/examples/ds390/ow390/swt12.c,
7291         * device/examples/ds390/ow390/swtloop.c,
7292         * device/examples/ds390/ow390/temp.c,
7293         * device/examples/ds390/ow390/temp10.c,
7294         * device/examples/ds390/ow390/thermo21.c,
7295         * device/examples/ds390/ow390/tinilnk.c,
7296         * device/examples/ds390/ow390/tstfind.c,
7297         * device/examples/serialcomm/windows/serial.cpp,
7298         * device/examples/serialcomm/windows/test_serialcomm.cpp,
7299         * device/include/reg51.h: fixed line endings for cvs
7300
7301 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7302
7303         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
7304         packRegsForAccUse, packRegisters): new accumulator register
7305         packing algorithm
7306         * support/regression/ports/hc08/support.c (_putchar): suppress
7307         warning of unused variable
7308         * src/SDCCicode.c: added SWAP entry to codeTable
7309
7310 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
7311
7312         * device/lib/sprintf.c: forgot to add this file before previous commit
7313
7314 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
7315
7316         * src/pic16/gen.c (genPackBits): added operand right in function
7317         parameters, load result directly if p_type is POINTER (that is
7318         called by genNearPointerSet)
7319         * (genUnPackBits): added operand left in function parameters,
7320         * (genNearPointerGet, genNearPointerSet): prevent the loading of
7321         FSR0 if accessing bitfields,
7322
7323 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
7324
7325         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
7326           _print_format; updated printf, sprintf, vsprintf
7327         * device/include/asm/default/features.h: corrected comment/define
7328         * device/lib/Makefile.in: added sprintf.c
7329         * device/lib/libsdcc.lib: added sprintf module
7330         * device/lib/printf_large.c,
7331         * device/lib/vprintf.c,
7332         * device/lib/sprintf.c: totally refactored printf_large and vprintf
7333           into these 3 files
7334         * support/regression/Makefile: changed ALL_PORTS into a usefull default
7335         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
7336         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
7337           hc08 test
7338         * support/regression/tests/zeropad.c: define idata as data for hc08
7339
7340 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7341
7342         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
7343         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
7344         labels are referenced at least once (even if a reference is not found)
7345         * src/hc08/gen.c (emitcode): set isComment flag for comments
7346         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
7347         loads), rules 6a..6b (optimize jumps to return)
7348
7349 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7350
7351         * device/lib/acosf.c (acosf),
7352         * device/lib/asinf.c (asinf),
7353         * device/lib/atanf.c (atanf),
7354         * device/lib/ceilf.c (ceilf),
7355         * device/lib/cosf.c (cosf),
7356         * device/lib/coshf.c (coshf),
7357         * device/lib/cotf.c (cotf),
7358         * device/lib/fabsf.c (fabsf),
7359         * device/lib/floorf.c (floorf),
7360         * device/lib/log10f.c (log10f),
7361         * device/lib/logf.c (logf),
7362         * device/lib/sinf.c (sinf),
7363         * device/lib/sinhf.c (sinhf),
7364         * device/lib/sqrtf.c (sqrtf),
7365         * device/lib/tanf.c (tanf),
7366         * device/lib/tanhf.c (tanhf),
7367         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
7368         replaced all instances of "reentrant" in the library functions
7369         defined in math.h with this macro.
7370         * support/regression/tests/float_trans.c: reenabled test for hc08
7371
7372 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
7373
7374         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
7375         erroneously deleted
7376
7377 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7378
7379         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
7380         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
7381         multi-byte volatile operands are used
7382         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
7383         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
7384         initialization to area GSINIT0 so that it would always precede
7385         any static initializers in GSINIT
7386         * support/regression/tests/zeropad.c: fixed idata define for hc08
7387         * support/regression/tests/bug-927659.c,
7388         * support/regression/tests/float_trans.c: disabled tests for hc08
7389         pending missing library routines
7390         * .version: increased version number to 2.4.4 - hc08 port now passes
7391         regression tests
7392
7393
7394 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
7395
7396         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
7397         * Makefile.common.in,
7398         * as/Makefile,
7399         * as/hc08/Makefile.in,
7400         * as/mcs51/Makefile.in,
7401         * as/z80/Makefile.in,
7402         * debugger/mcs51/Makefile.in,
7403         * device/include/Makefile.in,
7404         * device/lib/Makefile.in,
7405         * doc/Makefile,
7406         * link/Makefile,
7407         * link/z80/Makefile.in,
7408         * packihx/Makefile.in,
7409         * sim/ucsim/main_in.mk,
7410         * sim/ucsim/avr.src/Makefile.in,
7411         * sim/ucsim/doc/Makefile.in,
7412         * sim/ucsim/gui.src/serio.src/Makefile.in,
7413         * sim/ucsim/hc08.src/Makefile.in,
7414         * sim/ucsim/s51.src/Makefile.in,
7415         * sim/ucsim/xa.src/Makefile.in,
7416         * sim/ucsim/z80.src/Makefile.in,
7417         * src/Makefile.in,
7418         * support/cpp2/Makefile.in,
7419         * support/librarian/Makefile,
7420         * support/makebin/Makefile: added DESTDIR to the install path proposed
7421         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
7422         * doc/sdccman.lyx: added DESTDIR documentation
7423
7424 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
7425
7426         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
7427         instruction for interrupt handlers, use fast returns when returning
7428         from high priority interrupts
7429
7430 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7431
7432         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
7433         code generation
7434         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
7435         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
7436         bugs, ported much of Bernhard's code from mcs51
7437         * src/mcs51/gen.c (genSend),
7438         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
7439         than one when calling a reentrant function
7440         * device/lib/_mullong.c: defined an alternate struct layout for big
7441         endian ports (hc08)
7442
7443 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7444
7445         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
7446         test
7447
7448 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7449
7450         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
7451         are sane and complete before asking the port its prefered parameter
7452         passing method (fixes bug #1017633)
7453         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
7454         and _ret3
7455
7456 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7457
7458         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
7459         problem in bitfields >= 8 bits.
7460
7461 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
7462
7463         * src/SDCCsymt.c: undid changes that were not meant to be committed
7464
7465 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
7466
7467         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
7468
7469 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
7470
7471         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
7472           copied and wrong bit got inverted
7473
7474 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7475
7476         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
7477         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
7478         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
7479         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
7480         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
7481         assignments to bitfields at known addresses
7482         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
7483         reads from bitfields at known addresses
7484         * src/hc08/ralloc.c (packRegisters),
7485         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
7486         genhc08Code): optimize pointer get values used as conditionals
7487         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
7488         and branch
7489
7490 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7491
7492         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
7493         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
7494         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
7495         as conditionals
7496
7497 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7498
7499         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
7500
7501 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7502
7503         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
7504         related problems
7505
7506 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
7507
7508         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
7509
7510 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7511
7512         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
7513         mcs51 port
7514
7515 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
7516
7517         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
7518
7519 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7520
7521         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
7522         cases use more compact code.
7523
7524 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
7525
7526         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
7527
7528 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7529
7530         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
7531
7532 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7533
7534         * src/SDCCsymt.h,
7535         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
7536         parameter of changePointer() from symbol* to sym_link*
7537         * src/SDCCast.c (decorateType): call changePointer() for CAST op
7538         * src/SDCCsymt.c (compareType): void* type is castable to other
7539         pointers, but not necesarily an exact match.
7540         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
7541         is no longer blindly treated as an exact match.
7542         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
7543
7544 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
7545
7546         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
7547
7548 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
7549
7550         * src/pic/gen.c,
7551         * src/pic/pcode.c,
7552         * src/pic/ralloc.h,
7553         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
7554
7555 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
7556
7557         * src/pic/device.c,
7558         * src/pic/device.h,
7559         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
7560
7561 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7562
7563         * src/mcs51/gen.c (emitcode): fixed bug #992819
7564
7565 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
7566
7567         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
7568           there's no need to make it worse
7569
7570 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7571
7572         * src/mcs51/ralloc.c (deassignLR),
7573         * src/ds390/ralloc.c (deassignLR),
7574         * src/hc08/ralloc.c (deassignLR),
7575         * src/z80/ralloc.c (deassignLR),
7576         * src/pic/ralloc.c (deassignLR),
7577         * src/pic16/ralloc.c (deassignLR),
7578         * src/avr/ralloc.c (deassignLR),
7579         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
7580         rlivePoint): fixed another part of bug #971834
7581
7582 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7583
7584         * src/z80/main.c: enabled "critical" keyword
7585         * src/z80/mappings.i,
7586         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
7587         functions (fixes bug #979646)
7588         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
7589
7590 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7591
7592         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
7593           such as c:\mydir.
7594
7595 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
7596
7597         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
7598           doesn't disable too much optimizations
7599
7600 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
7601
7602         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
7603
7604 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
7605
7606         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
7607
7608 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
7609
7610         * src/pic/gen.c tidied up tabs
7611         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
7612         * src/pic/main.c tidied up tabs
7613         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
7614         * src/pic/pcoderegs.c tidied up tabs
7615         * src/pic/ralloc.c tidied up tabs
7616
7617 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
7618
7619         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
7620         to S_FIXED for pic16 port and when symbol is not in level 0,
7621         allocate for S_REGISTER storage class and pic16 port, too,
7622         * src/pic16/device.h: prototype for checkSym,
7623         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
7624         * (pic16_assignConfigWordValue): test the value and the mask to
7625         validate that the value is suitable for the configuration word,
7626         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
7627         collect extern declared symbols, don't emit symbol twice, check
7628         first if symbol is in publics set first,
7629         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
7630         * added command line '--fstack' which enables an experimental
7631         feature for stack access, too buggy to be used yet...
7632         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
7633         * (pic16_allocDirReg): when register has storage class S_REGISTER
7634         allocate in pic16_dynAccessRegs,
7635         * device/include/pic16/pic18f????.h: modified configuration word
7636         naming convention, words started as CONFIG0H but should be CONFIG1H
7637
7638 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
7639
7640         * device/include/mcs51reg.h: fixed bug 970993
7641
7642 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
7643
7644         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
7645         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
7646         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
7647         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
7648         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
7649         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
7650           error/warning numbers,
7651           added function setWarningDisabled()
7652         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
7653         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
7654           _memcmp.c _memmove.c calloc.c realloc.c free.c
7655         * support/regression/tests/malloc.c: added tests for new functionality
7656         * support/regression/tests/zeropad.c: added tests for truncated initializers
7657           and initialized char arrays starting with '\x0'
7658         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
7659
7660 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
7661
7662         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
7663
7664 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7665
7666         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
7667         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
7668         peephole 177.e. Thanks to anonymous
7669
7670 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
7671
7672         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
7673         function isn't used in the source but referenced as a
7674         variable initializer then declare it as extern in .asm file
7675
7676 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
7677
7678         * .version: increased version number to 2.4.3
7679
7680         Adding version extension according to ChangeLog CVS revision
7681         * src/Makefile.in (target all): added dependency 'version.h'
7682         * (rule version.h): added rule to create version.h from ChangeLog,
7683         * (rule dep): added dependency version.h,
7684         * src/version.awk: AWK script to create version.h
7685         * src/SDCCdwarf2.c (dwWriteModule),
7686         * src/SDCCglue.c (initialComments),
7687         * src/SDCCmain.c (printVersionInfo): modified to write after
7688         version string the version extension number,
7689         * src/SDCCutil.c: included "version.h"
7690         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
7691         number,
7692         * src/SDCCutil.h: added prototype for getBuildNumber
7693
7694         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
7695         includeDirsSet, too,
7696         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
7697         const char [] is found in function prototype...
7698
7699         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
7700         moving to WREG with source is already in WREG,
7701         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
7702         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
7703         * (aopForSym): stack'ed symbols are partially supported, added
7704         if-clause to support symbols in FARSPACE,
7705         * (sameRegs): added test for AOP_ACC to see if registers are same,
7706         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
7707         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
7708         * (pic16_popRegFromString): will not allocate a new register if it
7709         doesn't find one by name, bug may have introduced...
7710         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
7711         * (genIpush): revived to use pic16 port's stack,
7712         * (genAddrOf): added incomplete case for stack'ed operand,
7713         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
7714         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
7715         can handle multibyte operands,
7716         * src/pic16/glue.c (pic16_printIval*): some debug info added,
7717         * (pic16initialComments): added message for MPLAB compatibility
7718         mode enabled,
7719         * src/pic16/main.h: prototype for pic16_mplab_comp,
7720         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
7721         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
7722         * (_pic16_linkEdit): NEW, handles link stage, transferred here
7723         because of increased complexity of procedure,
7724         * (_process_pragma): stack pragma changed to format 'stack pos len',
7725         emit symbol '_stack_end' to conform with gplink,
7726         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
7727         to search for register,
7728         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
7729         PO_GPR_REGISTER,
7730         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
7731         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
7732         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7733         case for PO_GPR_REGISTER,
7734         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
7735         dies, the new era is ahead !...
7736         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
7737         pic16_dynInternalRegs,
7738         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
7739         * (pic16_allocDirReg): minor optimizations and bug fixes,
7740         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
7741
7742         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
7743         load stack and frame pointer with address of 'stack_end' symbol
7744
7745 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
7746
7747         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
7748         without source code but only variable initializers
7749
7750 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
7751
7752         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
7753         external are not declared as extern to reduce overhead while linking
7754
7755 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
7756
7757         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
7758
7759 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
7760
7761         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
7762           Yee Keat for the patch
7763         * src/SDCCast.c (decorateType): fixed bug #979599
7764         * src/ds390/gen.h: removed local fReturnSizeDS390
7765         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
7766         * src/ds390/gen.c (genAnd, genOr, genXor),
7767         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
7768
7769 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
7770
7771         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
7772         add relFilesSet to $3, manipulate $2 to handle linking of object
7773         files without source files in command line,
7774         * device/include/pic16 (all headers): added ID location macros,
7775         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
7776         entries for ID location bytes,
7777         * (pic16_assignIdByteValue): NEW,
7778         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
7779         added field dumpcalltree to pic16_options_t,
7780         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
7781         is used instead of pic16_Gstack_base_addr, check if (ifx) before
7782         emitting rFalseIfx label after check_carry label,
7783         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
7784         pic16_emitDIRegs), NEW
7785         * (pic16glue): dump .calltree file when option --calltree found,
7786         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
7787         * (_pic16_genAssemblerPreamble): emit ID locations after
7788         configuration registers,
7789         * (pic16_linkCmd): modifications of the link command,
7790         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
7791         * (pic16_pCodeInitRegisters): don't init stack registers,
7792         * (pic16_findPrevInstruction): fixed bug,
7793         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
7794         bug with immediate registers,
7795         * (buildCallTree): traces stack push and pop,
7796         * (pct2): dump also stack usage for each function,
7797         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
7798         * (pic16_allocDirReg): various modifications,
7799         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
7800         fixed to 1,
7801
7802 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
7803
7804         * src/pic16/pcode.c: removed buggy double colon
7805
7806 2004-07-01 Borut Razem <borut.razem AT siol.net>
7807
7808         * support/scripts/sdcc.nsi: added include/pic16 to setup
7809
7810 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
7811
7812         * device/lib/Makefile.in: fixed bug in target objects-pic16,
7813         * device/lib/pic16/Makefile: prefixed with dash (-) command under
7814         target 'clean',
7815         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
7816         specific command line arguments. Also added sample lkr script
7817         for placing a variable at a specific memory bank.
7818         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
7819         at a specific memory bank,
7820         * (pic16_dump_isection): fixed bug which caused string literals to
7821         be omitted when dumping idata section,
7822         * (pic16_groupRegistersInSection): added code to handle registers
7823         in specific memory banks,
7824         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
7825         public, all references are renamed too,
7826         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
7827         AOP_DPTR2,
7828         * (pic16_storeForReturn): added case to handle when dest is WREG,
7829         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
7830         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
7831         pic16_rel_udata, check to see if that register is marked as being
7832         a member of a specific memory bank,
7833         * (pic16_printIvalCharPtr): added code to add string literals either
7834         to code or the idata sections,
7835         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
7836         also accept the 'udata' pragma,
7837         * src/pic16/main.h: new structure types sectName and sectSym
7838         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
7839         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
7840         * (pic16_findPrevInstruction): fixed, it returned nothing,
7841         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
7842         instruction combinations,
7843         * (pic16_FixRegisterBanking): heavily reorganised,
7844         * (pic16_AnalyzeBanking): if generating banksel directives is
7845         disabled, then don't call FixRegisterBanking at all,
7846         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
7847         completely removed,
7848         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
7849
7850 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
7851
7852         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
7853         Phuah Yee Keat <yk.phuah AT nestac.com>
7854
7855 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
7856
7857         * src/pic16/glue.c (pic16createInterruptVect): function now emits
7858         correctly the IVT even if it is relocated to some other location
7859
7860 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
7861
7862         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
7863         * device/include/pic16/pic18f2220.h: NEW,
7864         * device/lib/pic16/libdev/pic18f2220.c: NEW,
7865         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
7866         * src/pic16/device.c (struct Pics16): added info for 18f2220,
7867         * src/pic16/device.h (struct pic16_options): added ivt_loc and
7868         nodefaultlibs, ivt_loc is the location of the interrupt vector
7869         table, and nodefaultlibs signs that default libraries should not be
7870         linked in link stage,
7871         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
7872         according to --ivt-loc argument,
7873         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
7874         when pragma stack is found,
7875
7876 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7877
7878         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
7879         256 (range check), 257 (do while), 258.a-f (bit banging
7880         f.e. on 3-wire SPI bus)
7881
7882 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7883
7884         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
7885         variables used exclusively within a loop
7886
7887 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
7888
7889         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
7890
7891 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7892
7893         * src/SDCClrange.c (computeClash): fixed bug #971834
7894
7895 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7896
7897         * src/mcs51/gen.c (genCmp): fixed bug #975903
7898         * src/hc08/gen.c (operandsEqu),
7899         * src/ds390/gen.c (operandsEqu),
7900         * src/z80/gen.c (operandsEqu),
7901         * src/pic/gen.c (operandsEqu),
7902         * src/pic16/gen.c (operandsEqu),
7903         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
7904         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
7905
7906 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7907
7908         * src/SDCCcse.c (cseBBlock): fixed bug #966963
7909
7910 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
7911
7912         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
7913         default case in switch statement,
7914         * glue.c (pic16_initPointer): expr is initialised via decoarteType
7915         to eliminate problem with initialisation of pointers, but problem
7916         still exists,
7917         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
7918         * (emitStaticSegment): removed various lines emitting debug info,
7919         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
7920         added processor registers for utilizing EEPROM,
7921         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
7922         configurable and set 8
7923
7924 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
7925
7926         * .version: increased version number to 2.4.2,
7927
7928         Cumulative patch for pic16 port
7929         * src/pic16/device.c: changed scheme to dump initial values for
7930         variables in idata segment, all print_idata* functions were removed,
7931         now the pic16_printIval* will be called,
7932         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
7933         * _pic16_printPointerType, pic16_printPointerType,
7934         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
7935         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
7936         NEW, similar to the respective functions in SDCCglue.c,
7937         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
7938         way, emitting hex bytes,
7939         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
7940
7941 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7942
7943         * src/avr/ralloc.c (serialRegAssign),
7944         * src/xa51/ralloc.c (serialRegAssign),
7945         * src/pic/ralloc.c (serialRegAssign),
7946         * src/pic16/ralloc.c (serialRegAssign),
7947         * src/hc08/ralloc.c (serialRegAssign),
7948         * src/z80/ralloc.c (serialRegAssign),
7949         * src/ds390/ralloc.c (serialRegAssign),
7950         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
7951
7952 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7953
7954         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
7955         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
7956
7957 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
7958
7959         Cumulative patch for pic16 port:
7960         * src/pic16/device.h (typedef PIC16_device) modified fields for
7961         defining microcontrollers,
7962         * src/pic16/device.c: added new info for all devices in Pics16 array,
7963         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
7964         to be optimised out by the pCode optimiser,
7965         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
7966         specially, bug reported by G.M. Gallant,
7967         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
7968         as force'd so that cannot be optimised out by pCode optimiser,
7969         * src/pic16/pcode.c,
7970         * src/pic16/pcodepeeph.c,
7971         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
7972         they are disabled by default, but can be enabled explicit with
7973         command argument --denable-peeps, for testing,
7974         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
7975         --pomit-ivt in COMPILE_FLAGS
7976
7977 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
7978
7979         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
7980           compilation on MSVC
7981
7982 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
7983
7984         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
7985
7986 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7987
7988         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
7989         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
7990
7991 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
7992
7993         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
7994         would only assign 0x300001 register.
7995
7996 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
7997
7998         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
7999         in COMPILE_FLAGS. Thanks to G. Gallant for report.
8000
8001 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8002
8003         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
8004         for ds80c400
8005         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
8006         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
8007         added peephole 254 (left shift), 255 (jump table)
8008
8009 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
8010
8011         * device/lib/Makefile.in: removed comment line with model-pic16,
8012         * (target port-specific-objects-pic16): the libraries and objects
8013         are copied to the build directory form the device/lib/pic16/bin
8014         directory
8015
8016         Cumulative patch concerning pic16 port:
8017         * library directory has been re-organized,
8018         * added support for PIC18F1220,
8019         * added headers and library sources for chips 18f1220,18f6520,
8020         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
8021
8022         * configuration registers setting has changed, now each supported
8023         device has a complete description of the registers it uses,
8024         * all initialisations are moved to idata sections, these section
8025         can be absolute or relocatable,
8026         * fixed initialisation of codespace variables,
8027         * fixed warning about PCLATU and gpsim,
8028         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
8029         * (genAssign): use table reads when assigning from variables in codespace,
8030         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
8031         char/int variables placed in codespace,
8032         * (pic16_emitConfigRegs): NEW, emits a list with configuration
8033         registers set in .asm file, no need for --pomit-config-words anymore,
8034         * (pic16glue): some 8051 legacy segments are commented out
8035         (to be removed completely),
8036         * added support for alternative assembler and linker with --asm=
8037         and --link= command line arguments,
8038         * peepholes are disabled automatically in the port, no need to
8039         specify on command line,
8040         * port supports natively char/int/long multiplication, but converts
8041         all divisions to support functions,
8042         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
8043         to the file set in variable $2,
8044         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
8045         strings in ASCII format and not in hex,
8046         * ralloc.c (serialRegAssign): added a triplet of conditional calls
8047         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
8048         allocate proper register if iCodes aren't temporary,
8049
8050 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
8051
8052         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
8053
8054 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
8055
8056         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
8057         is commented out
8058
8059 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8060
8061         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
8062         computed address is reused
8063         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
8064         multi-byte bitfields
8065
8066 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
8067
8068         * src/z80/gen.c: (genArrayInit): must check for pointers too
8069
8070 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
8071
8072         * support/regression/tests/zeropad.c: never meant to commit the
8073           nestedstruct test: removed, added check for GCC version
8074
8075 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
8076
8077         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
8078         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
8079         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
8080           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
8081           bugs 928906 and 954082 half-empty initializers
8082         * src/SDCCsymt.h,
8083         * src/SDCCsymt.c (getAllocSize): added for above fix
8084         * src/z80/gen.c (genArrayInit): fixed bug 741044
8085         * support/regression/tests/zeropad.c: added tests
8086
8087 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
8088
8089         * src/pic16/device.c (pic16_dump_section): corrected bug which
8090         caused some symbols of the libraries to be misplaced
8091
8092 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
8093
8094         * src/pic16/glue.c,
8095         * src/pic16/ralloc.h,
8096         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
8097         to fix conflict with pic port
8098
8099 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
8100
8101         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
8102         externs configuration variables,
8103         * src/pic16/ralloc.h,
8104         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
8105         prototype in header, commented out some debug messages
8106
8107 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
8108
8109         * src/pic16/glue.c,
8110         * src/pic16/main.c,
8111         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
8112         for gpasm COFF object generation. Thanks to D. Hawkins for
8113         his patch info
8114
8115 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8116
8117         * src/ds390/main.c,
8118         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
8119         Brock for spotting this)
8120         * src/ds390/gen.c (genEndFunction),
8121         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
8122         interrupt handler and critical. Disable push/pop optimizations when
8123         peephole optimizations disabled.
8124
8125 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
8126
8127         Updated pic16 library sources and headers.
8128         * device/lib/pic16/pic18f*/ ,
8129         * device/include/pic16/*.h: modified to handle structured SFR
8130         definitions
8131
8132 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
8133
8134         * src/port.h (PORT structure): added hook initPaths, now each
8135         port can declare its own default search paths,
8136         which can been seen with the --print-search-dirs option,
8137         see pic16 port for example,
8138         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
8139         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
8140         * (doPrintSearchDirs): NEW, replaces in a central manner the
8141         printing of search dirs which was split in set*Paths functions,
8142         * (main): added call to port->initPaths and doPrintSearchDirs,
8143         * src/avr/main.c,
8144         * src/ds390/main.c,
8145         * src/hc08/main.c,
8146         * src/izt/i186.c,
8147         * src/izt/tlcs900h.c,
8148         * src/mcs51/main.c,
8149         * src/pic/main.c,
8150         * src/pic16/main.c: modified port structures to reflect addition of
8151         initPaths hook,
8152
8153         * src/pic16/device.c (regCompare): registers are finally sorted by name,
8154         * (pic16_dump_section): for registers in same address reserve memory once,
8155         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
8156         to no_banksel,
8157         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
8158         result is greater in size than right or left,
8159         * (pic16_genUMult8X8_8): there are some cases where the result can
8160         be 16 bits size, so handle these,
8161         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
8162         * (pic16_outBitC): modified to emit pcodes,
8163         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
8164         or not,
8165         * (genDivOneByte): implemented algorithm to divide 8-bits,
8166         * (genCmp): uncommented goto, but issues still exist,
8167         * (genAnd): fixed a bug with variables >8bits,
8168         * (genPackBits): optimization added that uses BCF/BSF to change a
8169         single bit,
8170         * (genAssign): fixed bug when assigning floating point literals,
8171         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
8172         __sdcc_gsinit_startup label,
8173         * src/pic16/main.c (_pic16_init): removed search directory
8174         initialisations,
8175         * (_pic16_initPaths): NEW, used to initialise search directories,
8176         * (_hasNativeMulFor): support functions for all except char/int
8177         multiplication, and char division,
8178         * (PIC16_port struct): modified entry for native mul support,
8179         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
8180         no_banksel option,
8181         * (buildCallTree): call to register_usage is ifdef'ed out,
8182
8183 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8184
8185         * device/include/string.h: applied Stas Sergeev's patch to make this
8186         header file compatible with the preprocessor -Wundef option
8187         * src/SDCCmain.c (main): abort compilation if preprocessor reports
8188         failure (fixes bug #941458)
8189
8190 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8191
8192         * src/SDCCopt.c (killDeadCode): fixed bug #907733
8193         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
8194         that the variable, not the function, should be static
8195         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
8196         to be consistent with non-literal case
8197
8198 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8199
8200         * src/SDCCast.c (isConformingBody): fixed bug #949967
8201         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
8202         convilong): fixed bug #952086
8203
8204 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8205
8206         * src/SDCCmem.c (allocVariables): fixed bug #955321
8207
8208 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8209
8210         * src/hc08/main.c (_hc08_genAssemblerEnd),
8211         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
8212         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
8213         completely eliminated the use of a temporary file
8214         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
8215         when more than one file linked
8216         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
8217
8218 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8219
8220         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
8221         which fixes bug #543481
8222         * support/regression/tests/bug-751703.c: fixed comments left from a
8223         cut and paste error
8224         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
8225         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
8226         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
8227         scopes
8228         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
8229         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
8230         are now changed to underscores in moduleName
8231
8232 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8233
8234         * as/mcs51/lkmem.c: better fix for bug #954173
8235
8236 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
8237         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8238
8239         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
8240         * device/include/c8051f000.h,
8241         * device/include/c8051f120.h,
8242         * device/include/c8051f300.h,
8243         * device/include/c8051f310.h,
8244         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
8245         PWM16) and detab'ed
8246
8247 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8248
8249         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
8250         and mailing lists, doc'ed --no-peep-comments, removed reference
8251         to knoppix (newest version has no LyX/LaTeX), other minor changes
8252         * src/SDCCglue.c (glue): save 2 bytes stack space with
8253         option --main-return. The ljmp could probably be avoided too
8254
8255 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8256
8257         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
8258
8259 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8260
8261         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
8262         * src/SDCCopt.c (isLocalWithoutDef),
8263         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
8264         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
8265         (credit to Maarten Brock for patch #949363, on which this is based)
8266         * support/regression/tests/bug-751703.c: some test cases of extern used
8267         within inner scopes.
8268
8269 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8270
8271         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
8272         SPEC_STRUCT
8273         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
8274         struct definitions
8275         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
8276         dwWriteLabel): fix to create valid debugger symbols even when
8277         the module name has non-alphanumeric symbols in it
8278         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
8279         when a variable's allocation has been optimized away
8280
8281
8282 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8283
8284         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
8285         * src/hc08/main.c,
8286         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
8287         * src/mcs51/main.c,
8288         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
8289         * src/ds390/main.c,
8290         * src/z80/gen.c (z80_emitDebuggerSymbol),
8291         * src/z80/main.c,
8292         * src/pic/gen.c (pic14_emitDebuggerSymbol),
8293         * src/pic/main.c,
8294         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
8295         * src/pic16/main.c,
8296         * src/avr/gen.c (avr_emitDebuggerSymbol),
8297         * src/avr/main.c,
8298         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
8299         * src/xa51/main.c,
8300         * src/SDCCdebug.c (emitDebuggerSymbol),
8301         * src/SDCCdebug.h,
8302         * src/port.h: added a debugger struct to the port struct. Added a
8303         callback for defining debugger symbols
8304
8305         * src/SDCCast.c (createLabel),
8306         * src/SDCC.y (labeled_statement): mark all compiler generated labels
8307         with isitmp = 1
8308         * src/SDCCicode.h,
8309         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
8310         iCode back to the ast for the function
8311
8312         * src/hc08/ralloc.c (hc08_assignRegisters),
8313         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
8314         unneeded fields from the regs struct.
8315         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
8316         pushReg() & pullReg() functions instead of emitcode()
8317
8318         * src/hc08/gen.c (genLabel, genhc08Code),
8319         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
8320
8321         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
8322         debugger hooks
8323
8324         * src/hc08/gen.c (genEndFunction, genhc08Code),
8325         * src/hc08/gen.h,
8326         * src/mcs51/gen.c (genEndFunction, gen51Code),
8327         * src/mcs51/gen.h,
8328         * src/ds390/gen.c (genEndFunction, gen390Code),
8329         * src/ds390/gen.h,
8330         * src/z80/gen.c (genEndFunction, genZ80Code),
8331         * src/z80/gen.h,
8332         * src/z80/z80.h,
8333         * src/pic/gen.c (genEndFunction, genpic14Code),
8334         * src/pic/gen.h,
8335         * src/pic16/gen.c (genEndFunction, genpic16Code),
8336         * src/pic16/gen.h,
8337         * src/avr/gen.c (genEndFunction, genAVRCode),
8338         * src/avr/gen.h,
8339         * src/xa51/gen.c (genEndFunction, genXA51Code),
8340         * src/xa51/gen.h,
8341         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
8342         specific code to cdbFile.c and out of the backend code generators
8343
8344         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
8345         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
8346         starting address is now 0
8347
8348         * as/hc08/asm.h,
8349         * as/hc08/m08pst.c,
8350         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
8351         assembler directive for DWARF support
8352         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
8353
8354         * src/src.dsp,
8355         * src/Makefile.in,
8356         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
8357
8358 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8359
8360         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
8361         and inappropriate peephole optimization in jump tables
8362
8363 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8364
8365         * as/hc08/m08pst.c,
8366         * src/SDCCglue.c: sdccopt works for the hc08 port now
8367
8368 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
8369
8370         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
8371
8372 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8373
8374         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
8375
8376 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8377
8378         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
8379         rules
8380         * src/SDCCmain.c,
8381         * src/SDCCglobl.h,
8382         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
8383         comments from the peephole optimizer replacement rules
8384         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
8385         symbols
8386         * src/SDCCcse.c (updateSpillLocation),
8387         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
8388         equivalents
8389         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
8390         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
8391         objects far pointers
8392
8393 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8394
8395         * src/SDCCsymt.h: a missing part of my last change
8396         * src/pic/ralloc.c (regTypeNum),
8397         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
8398
8399 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8400
8401         * src/SDCCicode.h,
8402         * src/SDCCicode.c (aggrToPtrDclType),
8403         * src/SDCCptropt.h,
8404         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
8405         ptrPseudoSymConvert),
8406         * src/pic/ralloc.c (regTypeNum),
8407         * src/pic16/ralloc.c (regTypeNum),
8408         * src/hc08/ralloc.c (regTypeNum),
8409         * src/ds390/ralloc.c (regTypeNum),
8410         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
8411         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
8412
8413 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8414
8415         * link/z80/lkmain.c (afile),
8416         * as/hc08/lkmain.c (afile),
8417         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
8418         prevent a pointer problem when a filename has no directory and
8419         no extension specified.
8420
8421 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8422
8423         * link/z80/lkmain.c (afile): allow periods in directory names
8424         * link/z80/lkmain.c (afile),
8425         * as/mcs51/lkmain.c (afile),
8426         * as/hc08/lkmain.c (afile): allow linker script file to have an
8427         extension other than ".lnk"
8428         * link/z80/lklex.c (getfid),
8429         * link/z80/lkmain.c (parse),
8430         * as/mcs51/lklex.c (getfid),
8431         * as/mcs51/lkmain.c (parse),
8432         * as/hc08/lklex.c (getfid),
8433         * as/hc08/lkmain.c (parse): Support comments in the linker script
8434         file on lines by themselves and after filenames
8435
8436 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8437
8438         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
8439
8440 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8441
8442         * src/z80/peeph-z80.def: removed some peephole rules that don't
8443         work with multibyte arithmetic (fixed bug #937126)
8444         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
8445         to registers and not global variables
8446         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
8447         geniCodePreInc, geniCodePostDec, geniCodePreDec,
8448         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
8449         checking for assignments not internally generated (fixed bug #931895)
8450         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
8451         structure member (fixed bug #930072)
8452
8453 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8454
8455         * src/SDCCmain.c (linkEdit),
8456         * src/hc08/main.c (_hc08_parseOptions),
8457         * as/hc08/Makefile.in,
8458         * as/hc08/aslink.h,
8459         * as/hc08/asm.h,
8460         * as/hc08/m08pst.c,
8461         * as/hc08/lkrloc.c (relr, rele),
8462         * as/hc08/lkarea.c (lnkarea)
8463         * as/hc08/lkmain.c (afile, parse),
8464         * as/hc08/lkelf.c: support for ELF output
8465         * as/hc08/lks19.c (s19),
8466         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
8467
8468 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8469
8470         * as/mcs51/lkihx.c: Fixed bug #899105.
8471
8472 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8473
8474         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
8475         .dsp files from Unix to DOS.
8476
8477 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8478
8479         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
8480         function pointers; we have been compliant for several months now.
8481         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
8482         change that was accidently commented out
8483         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
8484         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
8485         bug #922319
8486
8487 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8488
8489         * src/hc08/gen.c: output of all of the internal debugging information
8490         is now controlled by the D() macro; it is disabled by default
8491
8492 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8493
8494         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
8495         harder to keep the same registers during a CAST iCode
8496         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
8497         long via int can be done in a single cast, if the signedness is
8498         correct.
8499         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
8500         putchar() in tinibios.c in ds390's library
8501
8502 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
8503
8504         * src/SDCCast.c (decorateType): fixed bug #898889,
8505         cast result of a literal complement too
8506         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
8507         fixed check for bitfields
8508
8509 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
8510
8511         * src/SDCCicode.c (geniCodeLogic): made it static,
8512         (geniCodeLogicAndOr): added in order to fix bug #905492,
8513         (ast2iCode): fixed bug #905492
8514         * support/regression/tests/bug-905492.c: added
8515         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
8516         (processParms): fixed bug #927659: don't copy parms, this will clear
8517         decorated flag
8518         * support/regression/tests/bug-927659.c: added
8519
8520 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
8521
8522         * src/SDCCast.c (addCast): don't cast float to char
8523         * device/lib/libsdcc.lib: added _memmove
8524
8525 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
8526
8527         * device/lib/large/Makefile: fixed parallel execution by
8528         replacing `make` by `$(MAKE)`
8529
8530 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8531
8532         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
8533         offsets (fixes bug #923936)
8534
8535 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
8536
8537         * device/lib/small/Makefile: fixed parallel execution by
8538         replacing `make` by `$(MAKE)`
8539
8540 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
8541
8542         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
8543
8544 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
8545
8546         * src/pic/gen.c (genCpl): multi-byte complements were not working.
8547         * src/regression/Makefile: Regression test was not running.
8548
8549 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
8550
8551         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
8552         complement if possible
8553         * src/SDCCval.c (valComplement),
8554         * src/SDCCicode.c (operandOperation): fixed complement of literal
8555         * support/regression/tests/onebyte.c (testComplement): added
8556
8557 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
8558
8559         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
8560         return an optimized tree; actually replace actParm with the new tree
8561         * src/SDCCast.h: added some parantheses to remove side effects
8562         * support/regression/tests/bug-920866.c
8563
8564 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
8565         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
8566         Bit operands were not being handled properly in the pic14 port.
8567         (now src/regression/add.c passes again).
8568
8569 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8570
8571         * src/SDCC.y (labeled_statement): case and default no longer require
8572         a following statement (RFE #893037)
8573
8574 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8575
8576         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
8577         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
8578         disabled (fixes bug #916294)
8579         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
8580         "mov a,acc"; patch provided by Lenny Story
8581         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
8582
8583 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8584
8585         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
8586         functions
8587         * src/ds390/gen.c (genFunction, genEndFunction),
8588         * src/ds390/ralloc.c (ds390_assignRegisters),
8589         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
8590         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
8591         pushed if there are parameters passed on the stack. Also, a cleaner
8592         way to decide if r0/r1 should be pushed/popped. (Together they fix
8593         bug #918693)
8594
8595 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8596
8597         * doc/sdccman.lyx,
8598         * device/lib/mcs51/crtpagesfr.asm,
8599         * device/lib/mcs51/crtxinit.asm,
8600         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
8601         to avoid confusion with Si Lab's SFRPAGE register.
8602
8603 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8604
8605         * src/SDCCglue.c (emitMaps): allow public sfr variables
8606         * src/SDCCglue.c (initialComments): include compiler build date
8607         with compiler version and put the timestamp of the generated
8608         assembly file on a serperate line to be less confusing.
8609         * src/port.h: added genInitStartup hook
8610         * src/avr/main.c,
8611         * src/ds390/main.c,
8612         * src/hc08/main.c,
8613         * src/pic/main.c,
8614         * src/pic16/main.c,
8615         * src/xa51/main.c,
8616         * src/z80/main.c: genInitStartup initialize as NULL (default to
8617         historical behaviour)
8618         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
8619         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
8620         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
8621         library instead of hard coding it into the compiler.
8622         * support/regression/ports/mcs51-stack-auto/spec.mk,
8623         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
8624         * device/lib/mcs51/Makefile,
8625         * device/lib/small/Makefile,
8626         * device/lib/large/Makefile,
8627         * device/lib/mcs51/crtpagesfr.asm,
8628         * device/lib/mcs51/crtstart.asm,
8629         * device/lib/mcs51/crtxclear.asm,
8630         * device/lib/mcs51/crtxinit.asm,
8631         * device/lib/mcs51/crtclear.asm,
8632         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
8633         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
8634         and into user configurable files.
8635         * device/lib/clean.mk: clean mcs51 directory too
8636         * support/regression/tests/longlit.c: added static to T1 declaration
8637         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
8638         accesses in the initialization code
8639
8640 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8641
8642         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
8643         OSCTRIMVAL as noted in bug #916008
8644
8645 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8646
8647         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
8648         in loops with multiple exits (reported as incorrect registers
8649         used by Martin Helmling in Sdcc-user list)
8650
8651 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8652
8653         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
8654         made ds390 register extensions look less like error messages
8655
8656 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8657
8658         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
8659         reported by Adam Wozniak in Sdcc-user list
8660
8661 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
8662
8663         * src/SDCCast.c (decorateType): fixed with bug and promotion in
8664         arithmetic optimizations, added debug output
8665
8666 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
8667
8668         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
8669         * sdcc.spec: updated and split sdcc into 3 rpms
8670         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
8671         needed for literals of LEFT_OP and '+'
8672         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
8673         introduced RESULT_TYPE_NOPROM
8674         (geniCodeMultiply): fixed logic for decision if mul is optimized to
8675         left shift
8676         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
8677         limited promotion to int only for '*'
8678         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
8679
8680 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
8681
8682         * src/pic16/gen.c (genSkip),
8683         (genc16bit2lit), (gencjneshort): commented out
8684         (is_LitOp): new helper function, checks operand type
8685         (genCmpEq): rewritten
8686
8687 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
8688
8689         * support/regression/tests/bug-908454.c: added
8690
8691 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
8692
8693         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
8694         * src/SDCCicode.c (usualBinaryConversions): op needs int type
8695         (geniCodeCast): cosmetic, don't preserve bit storage class
8696         (geniCodeLeftShift): added promotion
8697         (geniCodeLogic): fixed regression
8698         * src/SDCCsymt.c (computeTypeOr): accept bits too
8699         (compareType): 2nd part of fix for bug #908454, needed for bitfields
8700
8701 2004-03-07  Borut Razem <borut.razem AT siol.net>
8702
8703         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
8704
8705 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
8706
8707         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
8708         version of pic16_genPackRegisters which does not check if ic is a
8709         CAST operator,
8710         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
8711         function cause string1.c regression test fails
8712
8713 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
8714
8715         * sim/ucsim/configure.in,
8716         * sim/ucsim/configure,
8717         * sim/ucsim/doc/Makefile.in: use docdir
8718         * src/SDCC.y: fixed sbit atrributes
8719         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
8720         * src/SDCCast.c (decorateType): |^& need special promotion handling
8721         * src/SDCCast.h,
8722         * src/SDCCsymt.h: moved definition of RESULT_TYPE
8723         * src/SDCCsymt.h (computeType),
8724         * src/SDCCicode.c: computeType() needs op
8725         * src/SDCCsymt.c (checkTypeSanity),
8726         * doc/sddman.lyx: "plain" bitfields are unsigned
8727         * src/SDCCsymt.c (computeTypeOr): added
8728         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
8729         |^& ops
8730         * src/SDCCval.c (val*): computeType() needs op
8731         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
8732         * support/regression/tests/onebyte.c: added tests for |^&
8733
8734 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
8735
8736         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
8737         for writing icode into asm output.
8738
8739 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
8740
8741         * src/pic16/device.c: added some debug lines enabled
8742         with macro DEBUG_CHECK,
8743         * src/pic16/genarith.c: more debug in genPlus,
8744         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
8745         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
8746         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
8747         * (aopForSym): onStack symbols are re-placed in data memspace,
8748         and onStack flag is cleared,
8749         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
8750         copy temporary pcodeop,
8751         * (genPcall): added warning for not updating PCLATU,
8752         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
8753         always true for pic16 port,
8754         * (genMultOneWord): NEW, supports integer multiplication,
8755         * (genMult): modified to call genMultOneWord,
8756         * (ifxForOp): added warning when return NULL,
8757         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
8758         flag is set before call to operandFromSymbol for implicit
8759         added structures,
8760         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
8761         options.intlong_rent are set by default,
8762         * (_hasNativeMulFor): modified to allow port generation of integer
8763         multiplication,
8764         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
8765         set regtype to REG_SFR for all registers, restricting seting the
8766         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
8767
8768 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8769
8770         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
8771         more than 500 times in the regression tests
8772
8773 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8774
8775         * support/Util/SDCCerr.h,
8776         * support/Util/SDCCerr.c,
8777         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
8778         enumerator_list),
8779         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
8780         for symbol conflicts.
8781         * support/valdiags/tests/enum.c,
8782         * support/valdiags/tests/tentdecl.c,
8783         * support/valdiags/tests/struct.c: expect possible error messages
8784         referring to original symbol definitions.
8785         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
8786         * src/SDCCsymt.h,
8787         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
8788
8789 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
8790
8791         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
8792
8793 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
8794
8795         * src/pic16/ralloc.c (newReg): fixed bug #908929
8796
8797 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8798
8799         * src/ds390/gen.c: added missing #include "main.h"
8800
8801 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
8802
8803         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
8804         checking if symbol is already in set,
8805         * src/pic16/device.h: prototype for checkAddSym,
8806         * src/pic16/gen.c: (_G): added entry interruptvector,
8807         * (assignResultValue): removed some commented out lines,
8808         * (genFunction): check for ISR via sym->type, absolute section for
8809         interrupt code is created via a new pBlock, the goto instruction is
8810         placed now correctly at the interrupt vector position, changed all
8811         references from ivec to _G.interruptvector,
8812         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
8813         is the interrupt is a high priority one, same for return from ISR,
8814         * src/pic16/glue.c: changed all calls of addSetHead for publics and
8815         externs to calls of checkAddSym,
8816         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
8817         pic16_pcode_verbose flag is set,
8818         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
8819         * src/pic16/pcoderegs.c: message about how many registers are saved
8820         will only be emitted if pic16_pcode_verbose flag is set,
8821
8822 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8823
8824         * src/ds390/ralloc.h,
8825         * src/ds390/ralloc.c (ds390_regWithIdx),
8826         * src/ds390/gen.c (emitcode),
8827         * src/ds390/main.h,
8828         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
8829         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
8830         ds390operandCompare, getRegsRead, getRegsWritten,
8831         initializeAsmLineNode): customized instruction size calculation for
8832         ds390, started basis for some register optimizations
8833         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
8834         corresponding assembly output
8835         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
8836         missing push/pop of r0/r1. Optimized push/pops
8837
8838 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8839
8840         * src/mcs51/main.c (instructionSize): fixed ACALL size
8841         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
8842
8843 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
8844
8845         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
8846         the sorting of rlist with NULL elements
8847         * (print_idataType, print_idata): NEW to create idata sections
8848         * src/pic16/device.h: idataSymSet new variable
8849         * src/pic16/gen.c (genFunction): fixed some bugs in string
8850         comparing, improved the absolute section creation for ISRs,
8851         added FSR0L/FSR0H in registers that are saved in an ISR,
8852         * (genInline): fixed the processing of inline snippets,
8853         now they undergo no process by the peephole optimizer
8854         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
8855         are placed in idataSymSet,
8856         * (pic16emitStaticSeg): extern symbols are added in externs,
8857         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
8858         switching when aboslute variables are placed in access bank memory
8859         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
8860         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
8861         commented out with #if,
8862         * (pic16_packRegisters): reintroduce the check for CAST because some
8863         symbols are not correctly handled,
8864         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
8865         pCodeInstruction instead of pCode,
8866         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
8867         pCodeAsmDir definition,
8868         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
8869         directive, then the argument directive is emitted without the leading
8870         tab, hack for inline labels which must be in the first column,
8871         * (compareLabel,pic16_findNextInstruction),
8872         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
8873         * (insertBankSwitch): modified for the new pCodeAsmDir,
8874
8875 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
8876         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
8877
8878         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
8879         instance,
8880         * (pushSide): commented out with #if,
8881         * (assignResultValue): fixed some typos in saving
8882         registers,
8883         * (genPcall): FIXED and sync'ed with genCall,
8884         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
8885         * (genNearPointerGet): fixed to handle some more cases,
8886         implementation scheme via table reads,
8887         * (genConstPointerGet): modified to access code memory correct,
8888         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
8889         and improved to handle some cases
8890         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
8891         instead of "RETLW" for init data
8892         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
8893         not IN_DIRSPACE, work around to reduce bank switching when aboslute
8894         variables are placed in access bank memory (<0x80 and >=0xf80),
8895         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
8896         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
8897         TBLWT_POSTDEC,TBLWT_PREINC
8898         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
8899         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
8900         directives
8901         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
8902         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
8903         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
8904         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
8905
8906 2004-02-29  Borut Razem <borut.razem AT siol.net>
8907
8908         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
8909         support/Util/findme.h, support/Util/system.h: enhance binary relative
8910         search for lib and include by using findProgramPath()
8911
8912 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8913
8914         * src/SDCCpeeph.h,
8915         * src/SDCCpeeph.c (pcDistance),
8916         * src/port.h,
8917         * src/mcs51/ralloc.h,
8918         * src/mcs51/ralloc.c (mcs51_regWithIdx),
8919         * src/mcs51/main.h,
8920         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
8921         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
8922         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
8923         size calculation port specific, started basis for some register
8924         optimizations
8925         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
8926         missing push/pop of r0/r1. Optimized push/pops
8927         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
8928         * device/lib/_modsint.c (_modsint),
8929         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
8930         and stack version so regression tests pass
8931
8932 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
8933
8934         * src/Makefile.in (dep): include SLIBOBJS in dependency check
8935         * src/SDCCast.c (decorateType): catch another small optimization
8936         with '?' operator
8937         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
8938         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
8939         modified to finally use computeType() all over SDCC,
8940         see Feature Request #877103
8941         * src/SDCCval.h: cosmetic
8942         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
8943         valCompare(); regression tested in muldiv.c
8944         * support/regression/tests/muldiv.c (testMod): mod sign follows
8945         dividend only
8946
8947 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
8948
8949         * src/SDCCast.c (decorateType): fixed bug #902362
8950         * doc/INSTALL.txt: fixed install instructions for win32
8951
8952 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
8953
8954         * device/include/Makefile.in (install): fixed by replacing spaces
8955         by tabs
8956         * doc/README.txt,
8957         * doc/INSTALL.txt: updated for release
8958         * doc/sdccman.lyx: added warning for --xstack being buggy
8959
8960 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
8961
8962         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
8963         to eliminate build warnings.
8964         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
8965
8966 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
8967            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
8968
8969         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
8970         removed -penable-stack, added comment for stack pragma, added
8971         warning for not initializing the stack/frame registers, removed
8972         comment at interrupts section
8973
8974         Stack is made permanent, there is no ability to disable stack usage.
8975         * src/pic16/device.h,
8976         * src/pic16/device.c: removed all references to USE_STACK macro,
8977         * src/pic16/device.c (pic16_dump_section): when no elements in
8978         rlist, free rlist before return,
8979         * (pic16_dump_int_registers): NEW, internal registers are a new set
8980         of general purpose registers reused by each function,
8981         * (checkAddReg): returns 1 if registers is added to set,
8982         * (pic16_groupRegistersInSection): when a registers is of type
8983         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
8984         * src/pic16/device.h: memRange and Assigned Memory are deleted,
8985         SRCASECMP macro is moved here from device.c
8986         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
8987         PO_PCLATU, PO_PRODL, PO_PRODH,
8988         * (pic16_pCodeOpType, genMinus,
8989         changed compares to "a" register, with AOP_ACC,
8990         * (pic16_genPlus): fixed some bugs and indented properly,
8991         * (pic16_addSign): changed size to size+offset in the MOVWF
8992         instruction,
8993         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
8994         multiply 8-bit operand by literal, result is 8-bit,
8995         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
8996         multiply 2 8-bit operand, result is 8-bit,
8997         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
8998         genUMult8X*_16,
8999         * src/pic16/gen.c: changed accUse to contain WREG only,
9000         * (pic16_emitcomment): renamed to pic16_emitpcomment,
9001         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
9002         true, do not use immediate addressing any more unless sym is a
9003         pointer in codespace,
9004         * (aopForRemat): do not use immediate addressing when symbol not in
9005         codespace and when symbol's address is requested,
9006         * (aopOp): for-loop in if(sym->accUse) is modified for the new
9007         accUse size (= 1),
9008         * (aopGet): added case for AOP_ACC and don't return "accumulator
9009         bug" but WREG instead,
9010         * (popGetTempReg): pushes contents of temporary register in stack,
9011         * (popReleaseTempReg): pops contents of temporary register from
9012         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
9013         * (pic16_popGet): separated case AOP_ACC to return register WREG
9014         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
9015         or PO_IMMEDIATE and initializes their instance/offset appropriately,
9016         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
9017         the use of immediate pointers to certain cases only.
9018
9019         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
9020         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
9021         * (assignResultValue, genCall, genRet): modified to use the new
9022         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
9023         genPcall is still broken,
9024         * (genFunction): added code to create 'A' type pBlocks when
9025         interrupt functions are generated, code not extensively tested yet,
9026         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
9027         * (genEndFunction): modified so ISRs pop stored registers from stack,
9028         * (genMultOneByte): cleanup,
9029         * (AccRsh): added flag andmask, to and result with appropriate mask,
9030         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
9031         * (genDataPointerGet): fixed and reenabled its use,
9032         * (genNearDataPointerGet): bugs fixed,
9033         * (genDataPointerSet): bugs fixed,
9034         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
9035         pic16_DumpSymbol, pic16_DumpOp,
9036         * src/pic16/genutils.h: function prototypes for the above functions,
9037         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
9038         pointers,
9039         * (pic16emitRegularMap): many many many improvements, but needs a
9040         major cleanup,
9041         * src/pic16/main.c: enable_stack in pic16_options is removed,
9042         * (_pic16_parseOptions): removed command line options -penable-stack,
9043         * (_process_pragma): emit stack symbol only when stack pragma is
9044         processed,
9045         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
9046         redirected to FSR0L/FSR0H pair,
9047         * (pic16_get_op, pic16_get_op2): modifications and improvements,
9048         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
9049         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
9050         for immediates,
9051         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
9052         * (dumpPicOptype): NEW,
9053         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
9054         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
9055         with movff instruction,
9056         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
9057         added pic16_int_regs, some packRegsFor* functions are commented out,
9058         because produce errors,
9059         * src/pic16/NOTES: minor modifications
9060
9061 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9062
9063         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
9064         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
9065         --pack-iram.
9066         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
9067         * as/mcs51/lkaomf51.c: fixed bug #895763
9068
9069 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
9070
9071         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
9072
9073 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9074
9075         * doc/sdccman.lyx: added details about the HC08 storage classes and
9076         interrupts, fixed the register usage info for z80 & gbz80
9077
9078 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
9079
9080         * doc/sdccman.lyx: added more pic16 port documentation
9081         * device/include/pic16/: added header pic18fregs.h
9082
9083 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
9084
9085         * doc/sdccman.lyx: added Vangelis' contribution
9086
9087 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9088
9089         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
9090         extend to the next CALL or PCALL, not just to the next CALL.
9091
9092 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
9093
9094         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
9095
9096 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9097
9098         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
9099         bug #895752 and a better fix for bug #716790
9100
9101 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9102
9103         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
9104
9105 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9106
9107         * doc/sdccman.lyx: minor changes, minor changed
9108
9109 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
9110
9111         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
9112         which can't handle SDCC_NEWONEBYTEOPS,
9113         (geniCodeMultiply): removed conversion from mult to shift for pic14
9114         and pic16
9115
9116 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9117
9118         * src/hc08/gen.h,
9119         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
9120         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
9121         thus fixing bug #895406
9122
9123 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
9124
9125         * device/lib/_modsint.c,
9126         * device/lib/_modslong.c: sign follows divisor only
9127         * src/hc08/gen.c (genMultOneByte): if result size is 1,
9128         signs or signedness can be ignored
9129         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
9130         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
9131         added optimization for IFX,
9132         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
9133         arguments;
9134         reenabled optimization for IFX, which was removed on 2004-01-11
9135         * src/SDCCast.h: added return type IFX
9136         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
9137         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
9138         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
9139         SDCC_OLDONEBYTEOPS selects the old behaviour
9140         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
9141         changed again and commented promotion rule
9142         * src/SDCCval.c (valDiv): promotion no longer necessary
9143         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
9144         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
9145         rewritten
9146         * support/regression/tests/onebyte.c: added
9147
9148 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
9149
9150         * gen.c (genInline): reverted to old code for assemnling inline
9151         code because of bug reported James Chadd
9152
9153 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
9154
9155         * ralloc.h: missing declarations from previous patch,
9156         seems that patch for ralloc.h was never applied, fixed
9157
9158 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
9159            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
9160
9161         * pcode.c,
9162         * pcode.h,
9163         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
9164         indirect addressing. Marked FSR0 as deprecated
9165         * gen.c (pointerCode): commented out, not needed now
9166         (pic16_popGet2p): new MOVFF helper function
9167         (genGenPointerGet),
9168         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
9169         (shiftRLong): removed duplicate debugging info
9170
9171 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9172
9173         * src/ds390/gen.c (genNearPointerGet),
9174         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
9175         optimization with bits, but not bitfields.
9176         * src/ds390/ralloc.c (packRegisters),
9177         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
9178
9179 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
9180
9181         * src/SDCCcse.c (algebraicOpts): copy operands before modification
9182
9183 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9184
9185         * src/SDCCsymt.h,
9186         * src/SDCCicode.c (operandFromSymbol),
9187         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
9188         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
9189         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
9190         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
9191         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
9192         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
9193         bug #892038
9194         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
9195         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
9196         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
9197         * src/SDCCsymt.c (newSymbol),
9198         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
9199         enumerator_list),
9200         * src/SDCCval.h,
9201         * src/SDCCval.c (newiList): fixed bug #885705
9202
9203 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9204
9205         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
9206         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
9207
9208 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9209
9210         * device/include/c8051f120.h,
9211         * device/include/c8051f300.h,
9212         * device/include/c8051f310.h: added/updated header files for Silicon
9213         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
9214         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
9215         in new section Submitting patches
9216
9217 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9218
9219         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
9220         genFarPointerGet, genCodePointerGet, genGenPointerGet,
9221         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
9222         genGenPointerSet),
9223         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
9224         genFarPointerGet, genCodePointerGet, genGenPointerGet,
9225         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
9226         genGenPointerSet),
9227         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
9228         genFarPointerGet, genCodePointerGet, genGenPointerGet,
9229         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
9230         genGenPointerSet),
9231         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
9232         genFarPointerGet, genCodePointerGet, genGenPointerGet,
9233         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
9234         genGenPointerSet): fixed bug #892400
9235         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
9236         to eliminate build warnings.
9237         * src/SDCCast.c (processParms),
9238         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
9239         fixed bug 751859
9240         * support/valdiag/valdiag.py: added GCC to the list of defines active
9241         when compiling with gcc
9242
9243 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9244
9245         * support/Util/SDCCerr.h,
9246         * support/Util/SDCCerr.c,
9247         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
9248         with an incomplete type (fixed bug #883734)
9249         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
9250
9251 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9252
9253         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
9254
9255 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9256
9257         * src/SDCCast.c (decorateType),
9258         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
9259         function pointer implementation
9260         * support/regression/tests/funptrs.c: added tests to verify both forms
9261         of function pointers work correctly. Added tests to verify parameters
9262         are passed in the correct order.
9263
9264 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
9265
9266         * device.c (regCompare): registers are sorted by ascending
9267         address and increasing size,
9268         * main.c (_pic16_finaliseOptions): removed the declaration
9269         of compiler macro MCU. Now a macro of the format pic18fxxxx
9270         will be defined from the command line
9271
9272 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
9273             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
9274
9275         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
9276         PCOP_RLCF was overwritten!
9277         * gen.c (genSkip): commented out calls to pic16_emitcode,
9278         * (genCmpEQ): fixed "long" compares, only high word did get compared,
9279         * (genlshTwo),
9280         * (genRRC): added debugging info,
9281         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
9282         overwritten while shifting,
9283         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
9284         overwritten while shifting,
9285         * (AccLsh),
9286         * (AccRsh),
9287         * (shiftLLeftOrResult),
9288         * (shiftRLeftOrResult),
9289         * (shiftRLong),
9290         * (shiftLLong): Implemented with pic16_emitpcode
9291         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
9292         * (genLeftShift): Fixed bug, operand for shift by variable always
9293         was "and"ed with 0x0f,
9294         * (genLeftShiftLiteral),
9295         * (genrshTwo),
9296         * (genRightShiftLiteral): added debugging info,
9297         * (genrshFour): added comment,
9298         * (genRightShift): determined signedness from operand "left"
9299         instead of "result"
9300
9301 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9302
9303         * src/SDCCicode.c (geniCodeParms),
9304         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
9305         function pointers, fixed function pointer bugs #861242 and #861896
9306
9307 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9308
9309         * device/include/c8051f000.h,
9310         * device/include/c8051f120.h,
9311         * device/include/c8051f300.h: added header files for Silicon
9312         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
9313
9314 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
9315
9316         * src/SDCCast.c (processParams): added new type flow and restructured
9317         (gatherAutoInit): added new type flow
9318         (addCast): cosmetic changes
9319         (getLeftResultType): added new type flow for array indices, patch
9320         provided by Stas, see FR #877103
9321         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
9322         array index patch by Stas
9323         * src/SDCCast.h: added prototype getResultTypeFromType()
9324         * src/SDCCval.h,
9325         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
9326         * src/pic/glue.c (pic14emitStaticSeg),
9327         * src/pic16/glue.c (pic16emitStaticSeg),
9328         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
9329         for initialization of symbols
9330         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
9331         * support/Util/SDCCerr.h:
9332         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
9333         * .version: bumped version number to 2.3.8
9334         * device/include/Makefile.in (install),
9335         * doc/Makefile (install): changed to 'rm `find ...`' construct to
9336         avoid warnings
9337
9338 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
9339
9340         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
9341         Slade Rich fixed an optimization bug
9342         * src/pic/pcodepeep.c,
9343         * src/pic/pcoderegs.c
9344         * doc/Makefile (install): added test for directory
9345
9346 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9347
9348         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
9349         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
9350         * src/pic/ralloc.c (getRegPtr, getRegGpr),
9351         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
9352         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
9353         * as/mcs51/asexpr.c (term),
9354         * as/hc08/asexpr.c (term): fixed bug #887146
9355
9356 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9357
9358         * src/z80/gen.c (genMult): handle single byte result product
9359         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
9360         DUMMY_READ_VOLATILE (fixed bug #886367)
9361
9362 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
9363
9364         * support/regression/tests/libmullong.c: fixed logic, on little endian
9365         hosts we ended without a mullong_wrapper()
9366
9367 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9368
9369         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
9370         virus/worm forged address usage.
9371
9372 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
9373
9374         Fixed promotion, it should be done on AST level:
9375         * src/SDCCast.c (addCast): added promotion to int
9376         (decorateType): updated call to upCast()
9377         * src/SDCCicode.c (geniCodeLeftShift): removed call to
9378         usualUnaryConversions()
9379
9380 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
9381
9382         * support/regression/tests/literalop.c (mulWrapper): Added a
9383         wrapper to remove integer overflow warnings.
9384
9385         * support/regression/tests/float_trans.c: Made work on host.
9386
9387         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
9388         location of sz80.
9389
9390         * support/regression/generate-cases.py (main): Changed from inline
9391         to a main method.
9392
9393         * doc/Makefile (install): Changed to depth first to get rid of
9394         missing directory install warning.
9395
9396         * as/Makefile (install-doc): Made work on Mac.
9397
9398 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
9399
9400         * src/SDCCast.c: added an additional type flow in decorateType() of
9401         opposite direction, see feature request #860006; it's enabled at runtime
9402         by setting the environment variable SDCC_NEWTYPEFLOW
9403         * src/SDCCast.h: changed prototype of decorateType()
9404         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
9405         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
9406         'char' to 'int' can be omitted, if both operands are 'unsigned char';
9407         see feature request #877103
9408         * src/SDCCval.c: updated call of decorateType()
9409         (valBitwise): fixed bug #882876
9410         (valMinus): added promotion
9411         (valLogicAndOr): result is unsigned
9412         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
9413         * src/SDCCsymt.c (computeType),
9414         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
9415         must not cause an unsigned operation
9416         * src/pic/glue (pic14emitRegularMap),
9417         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
9418
9419 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
9420
9421         * src/pic/pcode.c (PCodeID): commented out left over debug code
9422
9423 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
9424
9425         * support/valdiag/tests/overflow.c: added shift tests
9426         * src/pic/device.c,
9427         * src/pic/gen.c,
9428         * src/pic/gen.h,
9429         * src/pic/glue.c,
9430         * src/pic/main.c,
9431         * src/pic/pcode.c,
9432         * src/pic/pcode.h,
9433         * src/pic/pcodepeep.c,
9434         * src/pic/pcoderegs.c,
9435         * src/pic/ralloc.c,
9436         * src/pic/ralloc.h: applied patch from Slade Rich;
9437         added support for multiple code pages and multiple RAM banks on the
9438         PIC 14 port. The ASM files now no longer simply assume all the
9439         code / RAM are in the same page / bank. This means the linker can
9440         safely allocate code/RAM of separate ASM files to different pages/banks.
9441         * doc/sdccman.lyx: added Slade's tips
9442         * src/mcs51/peeph.def: fixed bug #880768
9443
9444 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9445
9446         * src/hc08/ralloc.c (rematStr): fixed bug #879282
9447         * src/SDCCast.c (decorateType): fixed bug #880197
9448
9449 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
9450
9451         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
9452         getopt.h.
9453
9454         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
9455         strtof is not part of C89 and isn't included with Mac OS X.
9456
9457 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9458
9459         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
9460         shiftL2Left2Result): fixed bug #879326
9461         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
9462         (genMultOneByte): fixed bug in signed vs unsigned multiplication
9463         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
9464         address fetch for clr instruction
9465         * device/lib/hc08/_mulint.c: created optimized assembly version
9466         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
9467
9468 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
9469
9470         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
9471         proposed in FR #877103
9472
9473 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
9474
9475         * src/SDCCval.c (cheapestVal): added missing checks
9476         * src/SDCCicode.c (usualBinaryConversions): fixed condition
9477         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
9478
9479 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
9480
9481         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
9482         equal operands
9483
9484 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
9485
9486         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
9487         loaded with the linker search paths (-L arguments) and the libraries
9488         to be linked with the current source (-l arguments). Changes
9489         currently will affect only the pic16 port.
9490         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
9491         include path the port specific paths and port specific libraries,
9492         * gplink command now contains the $3 argument,
9493         * src/pic16/device.h,
9494         * src/pic16/device.c,: structure PIC_device is made public and
9495         renamed to PIC16_device, the same for variable Pics which is renamed
9496         to Pics16. Updated all references to them.
9497         * src/pic16/glue.c (pic16glue): corrected bug with code
9498         initialization which bypassed the variable initializations block.
9499
9500         * device/lib/pic16/Makefile.rules: removed --penable-stack from
9501         COMPILE_FLAGS and added the --nostdinc option
9502
9503 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9504
9505         * device/include/mc68hc908jb8.h: Register defs for another member
9506         of the hc08 family. Contributed by Bjorn Bringert - thanks!
9507
9508 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
9509
9510         Documenting changes from previous commits.
9511         * configure.in (version 1.56),
9512         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
9513         when generating output files to configure the pic16 library,
9514         but now I've commented it out, since gputils aren't installed in the
9515         SF compile farm, so library won't compile
9516
9517         * device/lib/Makefile.in (version 1.56): initially I've added in
9518         target 'all' the prerequestive 'model-pic16' so it compiled the
9519         pic16 library, but now I've commented it out for the same reasons
9520         above,
9521         * added targets 'model-pic16' and 'objects-pic16' to compile the
9522         library
9523         * added target 'port-specific-objects-pic16' to handle the
9524         generated libraries and copy them into the build/ directory
9525         * added target 'clean-intermediate-pic16' to clean intermediate
9526         files into pic16 directory
9527         * in target 'installdirs' added line to create directory pic16 in
9528         the installation path
9529
9530         * device/include/Makefile.in (version 1.11): in target 'install'
9531         added lines to copy all header files to installation path,
9532         * in target 'installdirs' added line create directory for pic16
9533         headers in the installation path
9534
9535 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
9536
9537         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
9538          a function call
9539
9540 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
9541
9542         * configure,
9543         * device/lib/configure.in,
9544         * device/lib/configure: fixed for autoconf 2.57
9545
9546 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9547
9548         * src/z80/main.c (_parseOptions): fixed the portmode= command line
9549         option so that it actually works. Made it specific to the z80, since
9550         the gbz80 doesn't have these kinds of I/O ports.
9551
9552 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9553
9554         * device/include/z180.h,
9555         * device/lib/_memcpy.c,
9556         * device/lib/_memmove.c,
9557         * device/lib/_mulint.c,
9558         * device/lib/ser_ir.c,
9559         * device/lib/ser_ir_cts_rts.c,
9560         * device/lib/_strcmp.c,
9561         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
9562         * src/z80/main.c (_process_pragma): add support for pragmas bank and
9563         portmode; added deprecation warning for bank= and protmode= forms.
9564         Also, guard against buffer overflow.
9565         * src/z80/gen.c (aopGet): generate better code for sfr banked read
9566
9567 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9568
9569         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
9570         changed interrupt vector table generation to only emit declared vectors.
9571         * device/include/Makefile.in: added missing backslash
9572         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
9573
9574 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
9575
9576         Mainly changes to support compilation of the device libraries
9577         * src/pic16/device.c: stack is allocated via symbol and not
9578         via literal number. The symbol is placed in the corresponding
9579         position of the data ram
9580         * (pic16_dump_section): relocatable and absolute uninitialized
9581         data are now emitted in sorted order to reduce section naming,
9582         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
9583         weren't marked as being in the access bank,
9584
9585 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
9586
9587         Added portion of GNU PIC Library under the directory
9588         device/include/pic16 and device/lib/pic16. These files
9589         contain the declarations of SFRs for the PIC18Fxx2 devices.
9590         The directory is initialized via configure from toplevel.
9591
9592 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
9593
9594         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
9595         the spilllocations to be compared correctly
9596
9597 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
9598
9599         * src/SDCCast.c (decorateType): fixed bug introduced today
9600
9601 2004-01-12  Borut Razem <borut.razem AT siol.net>
9602
9603         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
9604         doc/sdccman.lyx: upper case pragmas are deprecated
9605
9606 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
9607
9608         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
9609         in simpler and even better code
9610
9611 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
9612
9613         * src/SDCCicode.c (operandOperation): fixed bug #874819
9614         * src/SDCCast.c (decorateType): fixed
9615         char foo (unsigned long ul) { return ul > 0; }
9616
9617 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9618
9619         * doc/sdccman.lyx: Moved and added some sections, small changes
9620         all over. Telling LaTeX to be less strict with word spacing
9621         to better keep the right margin. Changed some notes about
9622         maintainance of the ports in section 3.2.1 - is it OK like this?
9623
9624 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
9625
9626         SDCC source changes:
9627         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
9628         convilong): modified to inform the pic16 port that builtin functions
9629         are external
9630
9631         PIC16 PORT specific changes:
9632         * src/pic16/device.c pic16_dump_equates() added,
9633         processor registers declared internally by the port are emitted in
9634         the translation as equates,
9635         * src/pic16/gen.c: inline code is passed unprocessed to the
9636         translation,
9637         * (pic16_popGetLit2): fnuction modified to take second operand as
9638         pCodeOp pointer and not as literal,
9639         * (popRegFromIdx): prefixed with pic16_,
9640         * (pic16_popCombine2): modified to receive already allocated pCode
9641         operands,
9642         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
9643         * (genFunction): initializes local stack frame and pushes on stack
9644         all the registers used by this function,
9645         * (genEndFunction): restores all registers from stack and restores
9646         stack frame,
9647         * src/pic16/glue.c (pic16emitRegularMap): various changes and
9648         improvements,
9649         * (pic16glue): changed the program startup sequence,
9650         * added new dbName code 'A' for functions placed in absolute section
9651         * src/pic16/main.c: added function attribute _naked,
9652         * added pragma 'code' to place a fnuction at an absolute address,
9653         * added command line arguments --debug-ralloc and --pcode-verbose,
9654         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
9655         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
9656         * (pic16_newpCodeOpLit2): modified to take the second operand as
9657         pCodeOp pointer,
9658         * (pic16_printpBlock): modified to emit each function in a separate
9659         section,
9660         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
9661         UPPER for immediate operands,
9662         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
9663         instruction,
9664         * src/pic16/peeph.def: all peepholes with movff are commented out,
9665         because there is a problem in the pcode peep optimizer,
9666         * src/pic16/ralloc.c: the register allocator can now reuse local
9667         function symbols for another function. This saves register usage.
9668         * src/pic16/ralloc.h: added flag isLocal in structure regs,
9669
9670         Added file src/pic16/NOTES with information about program writing on
9671         the current port version.
9672
9673 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9674
9675         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
9676         and peephole 252 (array access)
9677
9678 2004-01-09  Borut Razem <borut.razem AT siol.net>
9679
9680         * src/SDCCmain.c : fixed #872250: -l command line defined library
9681           files are scanned before standard library files
9682
9683 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9684
9685         * src/SDCCast.c (decorateType): fixed bug #874046
9686
9687 2004-01-09  Borut Razem <borut.razem AT siol.net>
9688
9689         * support/scripts/sdcc.nsi: remove previous installation
9690
9691 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9692
9693         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
9694         bytes for last interrupt vector (mcs51)
9695         * sdcc.spec: fixed typo
9696
9697 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9698
9699         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
9700         gen51Code): more efficient parameter receive for --model-large
9701         ("bug" #845294)
9702
9703 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9704
9705         * src/ds390/main.c,
9706         * src/z80/main.c: added missed needLinkerScript flags (more than
9707         one port structure defined in these file)
9708         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
9709         bug #795325
9710
9711 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
9712
9713         * src/SDCCmain.c: removed various references to DEFAULT_PORT
9714         * src/port.h: added flag needLinkerScript in port->linker
9715         structure to inform whether to create a .lnk file or not,
9716         * src/avr/main.c,
9717         * src/ds390/main.c,
9718         * src/hc08/main.c,
9719         * src/mcs51/main.c,
9720         * src/pic/main.c,
9721         * src/pic16/main.c,
9722         * src/xa51/main.c,
9723         * src/z80/main.c: changed appropriately to configure
9724         needLinkerScript flag
9725         * src/pic/gen.c,
9726         * src/pic16/gen.c (genAddrOf): fixed bug #863624
9727         * src/pic/glue.c: added variable udata_section_name to
9728         override default uninitialized data segment definition for
9729         devices only with SHAREBANK memory (reported from Erik Epetrich)
9730         * (pic14emitOverlay): modified to emit a commented overlay segment
9731         directive when no overlay data exist
9732         * (picglue): modified to emit uninitialized data segment
9733         according to udata_section_name
9734         * src/pic/main.c (_pic14_parseOptions): added command line
9735         options --udata-section-name=[name] to override default
9736         udata definition name
9737         * modified _linkCmd and _asmCmd to include compiler passed
9738         arguments via -W option
9739         * src/pic16/main.c: added $l in _asmCmd, changed extension for
9740         object file from '.rel' to '.o' in port->linker structure,
9741         changed size of fptr from 2 to 3 in port structure
9742
9743 2004-01-07  Borut Razem <borut.razem AT siol.net>
9744
9745         * support/scripts/sdcc.nsi: update PATH
9746         * support/scripts/sdcc.ico: craeted
9747
9748 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
9749
9750         * device/include/Makefile.in: fix install
9751         * doc/Makefile: fix install
9752
9753 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9754
9755         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
9756         in bug #860505
9757         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
9758         how the function variable allocation summary is displayed; also
9759         include information about variables allocated to the overlay
9760         segment
9761
9762 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9763
9764         * as/mcs51/lkmain.c: Help about -Y option
9765         * as/mcs51/lkarea.c: Fixed gcc warnings
9766
9767 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
9768
9769         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
9770         fixed warning
9771         * support/valdiag/tests/overflow.c: added
9772         * src/SDCCast.c (decorateType),
9773         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
9774         LEFT_OP (left shift)
9775
9776 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9777
9778         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
9779         (default behaviour).
9780
9781 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9782
9783         A python script to validate compiler diagnostic messages. It can be
9784         used to verify that sdcc complains about bad c source code and
9785         gives a good location of the error.
9786         * support/valdiag/Makefile,
9787         * support/valdiag/valdiag.py,
9788         * support/valdiag/tests/*
9789
9790 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9791
9792         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
9793         * src/SDCCsymt.c (newEnumType),
9794         * src/SDCCsymt.h
9795         * support/Util/SDCCerr.c,
9796         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
9797         enum related bugs.
9798         * support/regression/tests/enum.c: added test for enum values that
9799         require at least 2 bytes of storage.
9800
9801 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
9802
9803         * src/common.h: added ifndef/define/endif macros
9804         around the header file.
9805         Bug reported from Jesus Calvino-Fraga
9806
9807 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
9808
9809         * sdcc.spec: updated
9810         * device/include/Makefile.in: don't install CVS directories
9811         * device/lib/Makefile.in: added removal of CVS directories after install
9812         * doc/Makefile: fixed install, added local_icons
9813         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
9814         * src/mcs51/gen.c (genRightShift): fixed bug #870788
9815         * src/ds390/gen.c (genRightShift): fixed bug #870788
9816         * src/SDCCast.c (decorateType): fixed bug #870781
9817
9818 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
9819
9820         PIC16 port related changes:
9821         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
9822         added variable stackPos,
9823
9824         * gen.c: genCall, assignResultValue: added support for
9825         pushing/retrieving function parameters to/from stack,
9826         genFunction,genEndFunction: setup stack frame for the
9827         generated function,
9828         genAddrOf: will be changed according to bug 863624
9829
9830         * added files genutils.c and genutils.h which contain gen*
9831         debugged and optimised functions extracted from gen.c
9832
9833         * glue.c: added variable 'externs' which holds extern symbols,
9834         pic16emitRegularMap: is modified to properly handle relocatable
9835          symbols under the new scheme,
9836         pic16createInterruptVect: is modified
9837         pic16printPublics: is modified to emit 'global' assembler directives,
9838         added pic16_printExterns to print extern symbols,
9839         pic16glue: initializes stack/frame pointer in the beginning of
9840         the assembly output. Temporary hack, will be corrected later,
9841         because gplink yet does not support stack and SDCC does not
9842         yet support a type of crt0.o object to create the final binary.
9843
9844         * Removed many lines that contain 8051 legacy code.
9845         * The code is finally placed under a 'code' directive.
9846         * Added port specific options.
9847
9848         * _process_pragma: simplified since now we do not need *special*
9849         include file to define SFR registers. But a separate header
9850         will be needed. This will be developed later.
9851         * _pic16_parseOptions: added, parses port specific options:
9852         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
9853         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
9854         --preplace-udata-with=
9855
9856         * _pic16_setDefaultOptions: modified to initialize section names,
9857         but hack is temporarly out of order since it needs improvement.
9858         * _pic16_genAssemblerPreamble: configuration words are emitted by
9859         their address instead of their name. This part is incomplete and
9860         supports only the 18Fxx2 devices. Other devices will emit an error
9861         during assembly since they do not contain the same set of config
9862         registers
9863         * _pic16_genIVT: is modified,
9864
9865         * pcode.c: added definitions for some hardware registers that are needed
9866         for stack support
9867         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
9868         All PCI entries are updated. Now LFSR is supported.
9869         * Removed pic16_pciTRIS is mentioned by mdubuc in source
9870         * added pic16_newpCodeOpLit2 to support instructions with
9871         two literal arguments
9872         * pic16_pCode2str: corrected code that emits assembler instructions
9873         with two literal operands and those that have an access bit modifier
9874         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
9875         this fixes a bug which caused some labels to be lost, when an
9876         assembler directive was added, i.e. banksel,
9877         * pic16_FixRegisterBanking: improved logic that causes the insertion
9878         of bank switching,
9879         * InlineFunction: functions that are called once, are not any more
9880         inlined. This can be a port option in the future,
9881
9882         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
9883
9884         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
9885         hold the corresponding uninitialized symbols,
9886         * pic16_allocProcessorRegister: registers have explicit marked the
9887         accessBank field,
9888         * pic16_allocInternalRegister: registers are explicit marked as
9889         not used,
9890         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
9891         processing list, so bit registers were lost,
9892         *
9893
9894         * ralloc.h: added field 'accessBank' and original symbol operand
9895         in register definition,
9896         * removed the field isMapped from register definition,
9897
9898         ** Several functions have been removed from various sources:
9899         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
9900         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
9901         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
9902         pic16_assignRelocatableRegisters
9903
9904         ** others have been introduced:
9905         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
9906         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
9907
9908 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
9909
9910         * support/scripts/inc2h.pl: changed definition of BIT_AT
9911         to emit 'sbit at' instead of 'bit at'. This was a request.
9912
9913         PIC16 port related preliminary changes:
9914         * gen.c: prefixed function popRegFromString with
9915         pic16_ and all references to it corrected
9916         * pcode.c: all pic16_pc_* hardware registers prefixed
9917         with underscore (_),
9918         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
9919         * ralloc.c: newReg(): when register is REG_SFR then
9920         set address to rIdx,
9921         pic16_allocProcessorRegister(): marks register wasUsed=0
9922         pic16_writeUsedRegs(): added a call to assign processor
9923         registers via pic16_assignFixedRegisters
9924
9925 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9926
9927         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
9928         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
9929         variables in unused register banks.  Also the SSEG is placed
9930         wherever there is enough space for it, and IDATA can be anywhere
9931         in internal RAM.  For now compile using -Wl-Y[stack_size].
9932         The mem file is different for this option as well, since it
9933         makes no sense of talking about DSEG lenght.
9934
9935 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
9936
9937         * src/SDCClrange.c: fixed bug 869095 that caused segfault
9938         in certain cases, e.g. when ROM assignment, patch provided
9939         from Albert den Haan.
9940
9941 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
9942
9943         Many signedness and type propagation fixes:
9944         * src/SDCCicode.c: made geniCodeCast() static
9945         replaced SPEC_ by IS_ (cosmetic)
9946         (operandOperation): fixed div and mod operation
9947         (usualBinaryConversions): added support for promotion of char
9948         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
9949         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
9950         (geniCodeAdd): an array index will stay unsigned, even if promoted
9951         from char to int
9952         (geniCodeArray): ditto
9953         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
9954         * src/SDCCsymt.c (computeType): added more support for char;
9955         promotion of char is selectable by promoteCharToInt, fixed signedness
9956         for all cases
9957         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
9958         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
9959         * src/SDCCval (val*): replaced signedness calculation by
9960         computeType()
9961         rearranged if-branches (cosmetic)
9962         (valShift): added warning W_SHIFT_CHANGED
9963         (valCompare): fixed problem with different types
9964         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
9965         * support/regression/tests/literalop.c: added many cases
9966         * support/regression/tests/ast_constant_folding.c: changed finally to
9967         'unsigned int'
9968         * .version: new year, new version: 2.3.7
9969         * src/SDCCmain.c (main): applied patch #866468
9970         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
9971         provided by Scott Bronson
9972         * doc/sdccman.lyx: updated documentation for sdcdb
9973         updated and added chapter tips
9974
9975 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9976
9977         * src/SDCCsymt.h: missing from yesterday's commits
9978
9979 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9980
9981         * src/SDCC.y (struct_or_union_specifier),
9982         * support/Util/SDCCerr.c,
9983         * support/Util/SDCCerr.h: verify that struct & union tags are used
9984         as declared.
9985
9986 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9987
9988         * src/SDCCglobl.h: missing from yesterday's commits
9989
9990 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9991
9992         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
9993         sft_attributes, struct_declaration, parameter_declaration,
9994         type_name, start_block, declaration_list),
9995         * src/SDCC.lex (check_type): support redefinition of typedef names
9996
9997 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9998
9999         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
10000         aligned xdata arrays. Erik helped me with the if clause.
10001
10002 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10003
10004         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
10005         warning
10006
10007 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10008
10009         * src/SDCCast.h,
10010         * src/SDCCast.c (newAst_),
10011         * src/SDCCicode.h,
10012         * src/SDCCicode.c (ast2iCode, newiCode),
10013         * src/SDCCglobl.h,
10014         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
10015         expr, statement, expression_statement, selection_statement,
10016         iteration_statement, expr_opt, jump_statement): foundation for tracking
10017         sequence points
10018         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
10019         point code too)
10020
10021 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10022
10023         * support/Util/SDCCerr.c,
10024         * src/SDCCast.h,
10025         * src/SDCCast.c (createCase, createDefault, decorateType),
10026         * src/SDCClabel.c (labelUnreach),
10027         * src/SDCC.y (labeled_statement, jump_statement): More improvements
10028         to error messages.
10029         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
10030         (with thanks to Stas Sergeev)
10031         * device/include/time.h,
10032         * device/lib/time.c (CheckTime): suppress unreachable code warning
10033
10034 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10035
10036         * src/SDCCast.c (createIvalCharPtr),
10037         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
10038         bug #753752)
10039         * support/regression/tests/nullstring.c: tests for these two bugs
10040
10041 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10042
10043         * support/Util/SDCCerr.h,
10044         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
10045         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
10046         about storage class and 'at' used inside struct or union
10047         * src/SDCCBBlock.c (iCodeFromeBBlock),
10048         * src/SDCCcse.c (ifxOptimize),
10049         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
10050         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
10051         printIval, emitStaticSeg, emitOverlay),
10052         * src/SDCClabel.c (deleteIfx),
10053         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
10054         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
10055         gatherAutoInit, processParms),
10056         * support/Util/SDCCerr.h,
10057         * support/Util/SDCCerr.c (werrorfl): Support for better error location
10058         reporting for post-parse errors.
10059
10060 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10061
10062         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
10063         implicit casts via union; they don't work on big endian systems
10064         (possible fix for bug #861138)
10065
10066 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10067
10068         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
10069         * src/mcs51/main.c: fixed the fix for bug #737001
10070
10071 2003-12-15  Borut Razem <borut.razem AT siol.net>
10072
10073         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
10074
10075 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10076
10077         * support/makebin/makebin.c: put output in binary mode
10078
10079 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10080
10081         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
10082         xdata and data memory on startup. Set the environment variable
10083         SDCC_NOGENRAMCLEAR to disable this.
10084         * src/mcs51/peephole.def,
10085         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
10086         (allows non-interrupt and interrupt code to safely compete for a resource
10087         without the non-interrupt code having to disable interrupts)
10088
10089 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10090
10091         * src/SDCCicode.c (geniCodeAdd),
10092         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
10093         with valFromType if type might be a pointer and host is big endian).
10094         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
10095         types, not just integer types.
10096         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
10097         multiply defined with mismatching "at" address.
10098
10099 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10100
10101         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
10102         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
10103         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
10104         with embedded nulls (fixed bug #753752)
10105
10106 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10107
10108         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
10109         Apparently this did not see much testing (endless loop)
10110
10111 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10112
10113         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
10114
10115 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10116
10117         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
10118         gracefully handle NULL memmap pointers
10119
10120 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10121
10122         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
10123         instead of deleting the iCode when an operand is volatile
10124         * src/z80/gen.c (genDummyRead),
10125         * src/mcs51/gen.c (genDummyRead),
10126         * src/ds390/gen.c (genDummyRead),
10127         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
10128         not just IC_RIGHT
10129         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
10130         * src/SDCC.y: fixed bug #850420
10131
10132 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10133
10134         Applied z80 i/o port patch from Peter Townson and fixed some operators
10135         to better handle operands in A register.
10136         * device/include/z180.h
10137         * src/SDCC.y
10138         * src/SDCCglue.c
10139         * src/z80/gen.c
10140         * src/z80/gen.h
10141         * src/z80/main.c
10142         * src/z80/peeph-z80.def
10143         * src/z80/peeph.def
10144         * src/z80/z80.h
10145
10146 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10147
10148         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
10149
10150 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10151
10152         * device/lib/hc08/_mullong.c: Removed extra #endif
10153
10154 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10155
10156         * sim/ucsim/hc08.src/inst.cc,
10157         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
10158         carries from x to h
10159         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
10160         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
10161         * device/include/stdarg.h: fixed varargs for hc08
10162         * device/lib/Makefile.in,
10163         * device/lib/hc08/Makefile,
10164         * device/lib/hc08/_mulint.c,
10165         * device/lib/hc08/_mullong.c: fixed some endian problems
10166
10167 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10168
10169         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
10170         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
10171         * device/lib/_gptrget.c,
10172         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
10173
10174 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10175
10176         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
10177         * src/SDCCast.c (astErrors): fixed bug #846007
10178         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
10179
10180 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10181
10182         * src/SDCCast.c (decorateType): disabled a transformation I added in
10183         revision 1.188 (access to fields of a structure at an absolute address);
10184         it breaks with bitfields, extern declarations, and gcse analysis.
10185         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
10186         could be assigned through a pointer, so don't complain.
10187         * src/SDCCast.c (astErrors),
10188         * src/SDCCast.h,
10189         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
10190
10191 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
10192
10193         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
10194         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
10195         output of __config directives, since gpasm now supports them
10196         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
10197         pre-processor macro, i.e. -DMCU=p18f452
10198         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
10199         and modified to handle 'cast' icode similarly to '=' icode
10200         * src/pic16/device.h (typedef struct PIC_device): added field
10201         'extMIface' to indicate that chip has external memory interface
10202         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
10203         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
10204         18F8720
10205
10206 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10207
10208         * src/SDCC.y (pointer): fixed bug #846006
10209         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
10210         * src/SDCCast.c (decorateType): fixed bug #846009
10211         * src/ds390/peeph.def,
10212         * src/ds390/gen.c (genAnd, genOr),
10213         * src/mcs51/peeph.def,
10214         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
10215
10216 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10217
10218         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
10219         * src/SDCCdflow.c
10220         * src/SDCCcse.c
10221         * src/SDCCcse.h
10222         * src/SDCCBBlock.h
10223         * src/SDCCBBlock.c
10224
10225 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
10226
10227         fixed bug #845089
10228         * src/SDCCbitv.h,
10229         * src/SDCCbitv.c: added function to free a bitvector
10230         * src/SDCClrange.h,
10231         * src/SDCClrange.c: added function to recompute the liveranges
10232         * src/avr/ralloc.c,
10233         * src/ds390/ralloc.c,
10234         * src/hc08/ralloc.c,
10235         * src/mcs51/ralloc.c,
10236         * src/pic/ralloc.c,
10237         * src/pic16/ralloc.c,
10238         * src/xa51/ralloc.c,
10239         * src/z80/ralloc.c: recompute the liveranges after register packing
10240
10241 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
10242
10243         * src/SDCCloop.c (newInduction): fixed bug #845630
10244
10245 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10246
10247         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
10248         inadvertantly left behind from my 2003-11-12 change
10249
10250 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10251
10252         Updated headers I neglected to commit yesterday.
10253         * src/SDCClrange.h,
10254         * src/SDCCicode.h
10255
10256 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10257
10258         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
10259         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
10260         * src/SDCCopt.c (eBBlockFromiCode),
10261         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
10262         the creation of the key hash table from the sequencing so it can be used
10263         earlier (for some GCSE bug fixes still pending)
10264
10265 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10266
10267         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
10268         * support/regression/tests/addsub.c: testing genPlus shortcut
10269
10270 2003-11-15  Borut Razem <borut.razem AT siol.net>
10271
10272         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
10273
10274 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10275
10276         * src/SDCCcse.c (cseBBlock): fixed bug #527779
10277         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
10278         ordering is immaterial.
10279         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
10280
10281 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10282
10283         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
10284         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
10285         (SIGSEV) of bug #840381
10286         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
10287         unlink new file before rename if new and old filenames are the same)
10288
10289 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10290
10291         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
10292         uninitialized variables) for the mcs51. Set environment variable
10293         SDCC_GENRAMCLEAR to test.
10294         xdata initialization slightly shorter
10295
10296 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10297
10298         * src/SDCCsymt.h,
10299         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
10300         #838241 & 780691 (basicly the same bug)
10301         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
10302         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
10303
10304 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
10305
10306         * src/SDCCmain.c (linkEdit): "fix" #834252
10307
10308 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10309
10310         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
10311         * src/SDCCast.h,
10312         * src/SDCC.y: fixed bug #819403
10313
10314 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10315
10316         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
10317         the reentrant attribute.
10318         * src/hc08/gen.c (genPackBits): added missing stack readjustment
10319         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
10320         simulation
10321         * src/SDCCast.c (decorateType): fixed bug with storage class not being
10322         updated during pointer dereference; f.e. ~(((char *)1)*) was being
10323         erroneously reduced to a literal.
10324         * src/hc08/ralloc.c (packRegisters, rematStr),
10325         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
10326         some cases
10327
10328 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10329
10330         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
10331         * doc/sdccman.lyx: changed from 'article' to 'book'
10332         * doc/Makefile: readded test_suite_spec and cdbfileformat
10333
10334 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
10335
10336         * device/include/stdlib.h: include malloc.h to comply with ANSI
10337         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
10338
10339 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10340
10341         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
10342         * doc/clean.mk: also remove *.out files
10343         * doc/sdccman.lyx: some additions, larger top/bottom margins
10344
10345 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10346
10347         * src/SDCC.y: fixed bug #837365
10348         * support/regression/tests/bitopcse.c
10349         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
10350         a symbol (might be valop instead)
10351         * device/lib/Makefile.in: added errno.c to HC08SOURCES
10352         * device/lib/clean.mk: added hc08 to the cleaning list
10353
10354 2003-11-04  Borut Razem <borut.razem AT siol.net>
10355
10356         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
10357           made 2003-11-04
10358         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
10359           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
10360           malloc is declared in standard stdlib.h
10361
10362 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10363
10364         * device/lib/hc08/Makefile: need to clean .rel not .o files
10365         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
10366
10367 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10368
10369         * src/port.h,
10370         * src/hc08/main.c,
10371         * src/mcs51/main.c,
10372         * src/ds390/main.c,
10373         * src/z80/main.c,
10374         * src/avr/main.c,
10375         * src/pic/main.c,
10376         * src/pic16/main.c,
10377         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
10378         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
10379         tests (which uses the port's oclsExpense function)
10380         * src/SDCC.y,
10381         * src/SDCCast.c,
10382         * src/SDCCicode.c,
10383         * src/hc08/gen.c,
10384         * src/ds390/gen.c,
10385         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
10386
10387 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10388
10389         * src/SDCCcse.c (ifxOptimize),
10390         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
10391         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
10392         deleting the IFX iCode.
10393         * src/hc08/ralloc.c: reduced unneeded slocs
10394         * src/hc08/gen.c: fixed bug in asmopToBoolean
10395
10396 2003-11-04  Borut Razem <borut.razem AT siol.net>
10397
10398         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
10399           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
10400           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
10401           transferred to configure
10402
10403 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
10404
10405         Use headers defined in the C[++] standards:
10406         * sim/ucsim/gui.src/serio.src/fileio.cc
10407         * sim/ucsim/gui.src/serio.src/frontend.cc
10408         * sim/ucsim/gui.src/serio.src/main.cc
10409         * sim/ucsim/gui.src/serio.src/posix_signal.cc
10410         * support/Util/NewAlloc.c
10411         * as/hc08/lklibr.c
10412         * as/mcs51/lklibr.c
10413         * as/z80/aslist.c
10414         * as/z80/assym.c
10415
10416 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10417
10418         * Added MSVC projects for hc08 assembler and linker:
10419         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
10420         /as/hc08/link_hc08.dsp
10421
10422 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
10423
10424         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
10425
10426 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
10427
10428         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
10429
10430 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10431
10432         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
10433
10434 2003-10-31  Borut Razem <borut.razem AT siol.net>
10435
10436         * support/cpp2/cpplib.h,
10437           support/cpp2/cpplib.c,
10438           support/cpp2/cpplex.c,
10439           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
10440           to switch _asm block preprocessing on / off. Default is
10441           #pragma preproc_asm +
10442
10443 2003-10-31  Borut Razem <borut.razem AT siol.net>
10444
10445         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
10446           when outputting comment blocks (when executed with -C option) and
10447           _asm (SDCPP specific) blocks
10448
10449 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10450
10451         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
10452
10453 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
10454
10455         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
10456
10457 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
10458
10459         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
10460         * src/SDCCast.c (decorateType): fixed bug #832664
10461
10462 2003-10-31  Borut Razem <borut.razem AT siol.net>
10463
10464         * support/cpp2/cpplex.c: fixed for SDCPP:
10465           comments(when executed with -C option) and _asm blocks
10466           were included even if they where in skipped #if block.
10467           Applied solution from GCC cpp 3.3.2
10468
10469 2003-10-31  Borut Razem <borut.razem AT siol.net>
10470
10471         * src/SDCC.lex: sdcc now understands both formats:
10472           '# <line_number> <file_name>' and
10473           '#line <line_number> <file_name>'
10474         * support/cpp2/cppmain.c: sdcpp now generates the standard
10475           '# <line_number> <file_name>' instead of former
10476           '#line <line_number> <file_name>'
10477
10478 2003-10-30  Borut Razem <borut.razem AT siol.net>
10479
10480         * support/cpp2/cpphash.h,
10481         * support/cpp2/cpplib.h
10482         * support/cpp2/cpplex.c,
10483         * support/cpp2/cppmain.c,
10484         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
10485
10486 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10487
10488         Fixed a number of problems revealed by bug #827883.
10489         * src/SDCCloop.c (loopInvariants): Spill location of the
10490         result operand should be recomputed if extracted from
10491         a loop. Also, don't extract assignments of an iTemp
10492         from a literal.
10493         * src/SDCCast.c (isConformingBody): loop reversal should
10494         not occur if the control variable is involved with a
10495         relational operator.
10496
10497 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
10498
10499         * .version: bumped to 2.3.6 to reflect the big improvements
10500         made by Erik and Klaus. Thanks!
10501
10502 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
10503
10504         Replaced the livrange code.
10505         * src/SDCClrange.c: added new LR code
10506         * src/SDCCloop.c,
10507         * src/SDCCBBlock.h: removed remainig parts from old LR code
10508         * src/ds390/ralloc.c,
10509         * src/ds390/gen.c: minor fixes to make it work with new code
10510
10511 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10512
10513         * as/hc08/asm.h,
10514         * as/hc08/lkrloc.c,
10515         * src/hc08/gen.c,
10516         * src/hc08/ralloc.c: Fix various warnings related to the hc08
10517         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
10518         (tweaked fix for bug #818696)
10519
10520 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10521
10522         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
10523
10524 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10525
10526         * src/SDCCmain.c,
10527         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
10528         * src/mcs51/gen.c (gencjneshort),
10529         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
10530         more efficient (per Scott Bronson's suggestion)
10531
10532 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10533
10534         Extended the semantics of the critical keyword to include
10535         individual statements. See RFE #827755 and #799831
10536         * src/SDCC.y
10537         * src/SDCCicode.c
10538         * src/SDCCopt.c
10539         * src/SDCCast.c
10540         * support/Util/SDCCerr.c
10541         * support/Util/SDCCerr.h
10542         * src/mcs51/gen.c
10543         * src/ds390/gen.c
10544         * src/hc08/gen.c
10545
10546 2003-10-19  Borut Razem <borut.razem AT siol.net>
10547
10548         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
10549
10550 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10551
10552         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
10553         Fixed bug #818696
10554         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
10555         and predecrement operand is displayed
10556
10557 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
10558
10559         * src/SDCCval.c (valMinus): fixed bug #826041
10560
10561 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10562
10563         Some hc08 related updates that I missed earlier
10564         * sim/ucsim/stypes.h
10565         * support/regression/ports/hc08/spec.mk
10566
10567 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10568
10569         New target "hc08" for the Motorola 68hc08 family of micros
10570
10571         * configure
10572         * configure.in
10573         * Makefile
10574         * src/hc08/*
10575         * src/SDCCmain.c
10576         * src/port.h
10577         * sim/ucsim/hc08.src/*
10578         * sim/ucsim/configure.in
10579         * src/ucsim/configure
10580         * sim/ucsim/packages_in.mk
10581         * as/hc08/*
10582         * as/Makefile
10583         * device/include/mc68hc908qy.h
10584         * device/lib/hc08/*
10585         * device/lib/Makefile.in
10586         * support/regression/ports/hc08/*
10587         * support/regression/Makefile
10588
10589 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10590
10591         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
10592         regression test
10593         * src/ds390/gen.c (genCast): fixed bug #821957
10594
10595 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
10596
10597         * device/lib/logf.c: "fixed" overlay bug
10598         * support/regression/ports/host/spec.mk: added m library
10599         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
10600         * support/regression/tests/float_trans: added (for Eric)
10601
10602 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
10603
10604         * src/mcs51/gen.c (genCpl): fixed bug
10605         http://sf.net/mailarchive/message.php?msg_id=6263915
10606
10607 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
10608
10609         * src/SDCCast.c (decorateType): added extended constant folding
10610         * src/SDCCsymt.c (computeType): cleanup
10611         * src/SDCCval.c (valShift): minor optimization
10612         * support/regression/tests/ast_constant_folding.c: added
10613
10614 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10615
10616         * src/SDCCmain.c: removed some unintended changes
10617
10618 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10619
10620         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
10621         * src/z80/gen.c: fixed part of bug #817589
10622         * src/SDCCsymt.c (checkFunction): fixed bug #817895
10623
10624 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
10625
10626         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
10627         * src/SDCCcflow.c
10628         * src/SDCCcse.c
10629         * src/SDCCdflow.c
10630         * src/SDCClabel.c
10631         * src/SDCClrange.c
10632         * src/SDCCmem.c
10633         * src/SDCCopt.c
10634         * src/SDCCpeeph.c
10635         * src/SDCCset.c
10636         * src/avr/ralloc.c
10637         * src/ds390/ralloc.c
10638         * src/izt/ralloc.c
10639         * src/mcs51/ralloc.c
10640         * src/pic/ralloc.c
10641         * src/pic16/ralloc.c
10642         * src/xa51/ralloc.c
10643         * src/z80/ralloc.c
10644         * src/z80/gen.c: removed unused label "release:"
10645
10646 2003-10-06  Borut Razem <borut.razem AT siol.net>
10647
10648         * src/SDCC.lex: removed definition of unused variables
10649           save_optimize and save_options
10650
10651 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
10652
10653         * clean.mk: removed '=' in "-maxdepth=1"
10654         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
10655         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
10656
10657 2003-10-06  Borut Razem <borut.razem AT siol.net>
10658
10659         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
10660           my_unput() replaced by unput()
10661
10662 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
10663
10664         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
10665         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
10666         type-punned pointer will break strict-aliasing rules"
10667         Old LR behaviour is again default; Klaus' LR can be choosen by
10668         defining the environment variable LRKLAUS
10669         * src/SDCCBBlock.h
10670         * src/SDCCloop.c
10671         * src/SDCClrange.c
10672         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
10673         * clean.mk: fixed removal of files in bin/CVS/
10674         * device/lib/clean.mk: fixed removal of directories small and large
10675         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
10676         * src/SDCCicode.c,
10677         * src/SDCCval.c: removed superflous test for pedantic
10678
10679 2003-10-05  Borut Razem <borut.razem AT siol.net>
10680
10681         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
10682           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
10683           message "unmatched #pragma SAVE and #pragma RESTORE"
10684
10685 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10686
10687         * doc/sdccman.lyx: various additions and updates (interrupts, inline
10688           assembly, critical functions, atomic, nojtbound)
10689
10690 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
10691
10692         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
10693         * src/SDCCBBlock.h
10694         * src/SDCCloop.c
10695         * src/SDCCloop.h
10696         * src/SDCClrange.c
10697
10698 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10699
10700         * src/z80/gen.h,
10701         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
10702         * src/mcs51/gen.h
10703         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
10704         * src/ds390/gen.h
10705         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
10706         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
10707         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
10708
10709 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10710
10711         * src/z80/gen.c (genRet): fixed bug #524753
10712         * src/z80/gen.c (genCast): fixed internal error on cast from
10713         pointer to long
10714         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
10715         fix for bug #477835 to the z80
10716         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
10717         for tracking iCodes in the peephole optimizer for z80
10718
10719 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10720
10721         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
10722         the other part of bug #814548
10723         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
10724
10725 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
10726
10727         * src/SDCCcse.c: fixed part of bug #814548
10728
10729 2003-09-28  Borut Razem <borut.razem AT siol.net>
10730
10731         * src/asm.c: rewrite of printILine() to use temporary file instead
10732           a pipe
10733         * src/xa51/main.c: commented out declaration of int rewinds
10734
10735 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10736
10737         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
10738
10739 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10740
10741         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
10742         * src/asm.c (printILine): Fixed bug #811015
10743
10744 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10745
10746         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
10747         freeing.
10748
10749 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10750
10751         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
10752         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
10753         to correctly handle general case of AOP_PAIRPTR
10754         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
10755
10756 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10757
10758         * src/mcs51/ralloc.c (fillGaps),
10759         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
10760         register positioning bug)
10761
10762 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
10763
10764         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
10765
10766 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10767
10768         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
10769         genCodePointerGet, genGenPointerGet, genFarPointerSet,
10770         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
10771         (ralloc doesn't intentionally do this now, but perhaps later)
10772         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
10773         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
10774         register positioning bugs (Fixed bug #762602 and #795325)
10775         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
10776         (Fixed bug #808779)
10777         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
10778         lines that --i-code-in-asm generates
10779
10780 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10781
10782         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
10783         trying to fclose a FILE* that was already closed.
10784
10785 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10786
10787         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
10788         of const struct should be treated as if const themselves)
10789
10790 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
10791
10792         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
10793
10794 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10795
10796         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
10797         Unix (/n) and DOS (/r/n) line terminations.
10798
10799 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10800
10801         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
10802         bug #613775
10803
10804 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10805
10806         * src/mcs51/gen.c (genFunction, genEndFunction),
10807         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
10808         and restore of EA so that stack offsets to parameters are
10809         correct when using both critical and reentrant/stack-auto.
10810         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
10811         size (can be triggered in error if sloc is shared between
10812         different sized objects)
10813         * device/include/float.h: fixed macros to explicitly use
10814         unsigned long where needed
10815
10816 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
10817
10818         Feature req. 799831: added code to allow nesting of critical functions
10819         * src/mcs51/gen.c (genFunction, genEndFunction)
10820         * src/ds390/gen.c (genFunction, genEndFunction)
10821
10822 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10823
10824         * src/SDCCsymt.c (sclsFromPtr),
10825         * src/SDCCsymt.h,
10826         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
10827         support for standard C idiom of memory mapped variables; for
10828         example, *((xdata int*)0x1234) = 1 is now internally equivalent
10829         to xdata int at 0x1234 tempvar = 1.
10830         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
10831         provided by Akiya ISHIDA
10832
10833 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
10834
10835         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
10836         * src/SDCCval.c (constVal): added reduction from int to char
10837         * src/SDCCval.c (valMult, valDiv): fixed sign handling
10838         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
10839         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
10840         to ignore the sign
10841         * support/regression/tests/shifts.c: fixed
10842
10843 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10844
10845         * src/z80/gen.c (genXor): Fixed bug #805445
10846
10847 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10848
10849         Fixed bug #621531 (const & volatile confusion in the type chain).
10850         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
10851         refer to the const or volatile state of the pointer itself.
10852
10853         * src/SDCCast.c
10854         * src/SDCCglue.c
10855         * src/SDCCicode.c
10856         * src/SDCCsymt.c
10857         * src/SDCCval.c
10858         * src/SDCC.y
10859         * src/SDCCsymt.h
10860         * src/pic/gen.c
10861         * src/pic/ralloc.c
10862         * src/pic16/gen.c
10863         * src/pic16/ralloc.c
10864         * support/regression/tests/const.c
10865
10866 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10867
10868         When checking for duplicated modules, use absolute paths
10869         instead of relative paths.  Files changed:
10870
10871         * as/mcs51/lklib.c
10872         * link/z80/lklib.c
10873
10874 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10875
10876         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
10877
10878 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10879
10880         * device/include/string.h: added size_t typedef, changed
10881         prototypes to use size_t, eliminated separate reentrant and
10882         non-reentrant declarations, added _memmove declaration
10883         * device/lib/_memcpy.c: changed to use size_t instead of int,
10884         changed /4 to >>2 to avoid division library call
10885         * device/lib/_memcmp.c,
10886         * device/lib/_memset.c,
10887         * device/lib/_strncat.c,
10888         * device/lib/_strncpy.c,
10889         * device/lib/_strncmp.c: changed to use size_t instead of int
10890         * device/lib/_memmove.c: new file (fixed bug #772294)
10891         * device/lib/Makefile.in: added _memmove.c
10892         * device/lib/z80/asm_strings.s: fixed bug #772290
10893         * support/regression/tests/bitfields.c: attempt to fix host assertion
10894         failure on amd64-unknown-linux2.2
10895
10896 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10897
10898         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
10899         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
10900         * as/z80/asmain.c (main): fixed bug #801766
10901
10902 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
10903
10904         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
10905         compilers
10906
10907 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10908
10909         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
10910         reported in bug #800609
10911
10912 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
10913
10914         * Top header beautifications in src/pic16 directory:
10915           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
10916           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
10917           pcoderegs.h, ralloc.c, ralloc.h
10918         * main.c: added top header and GPL license notice
10919         * pcode.c: fixed the if-conditional warning
10920
10921 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
10922
10923         * device/lib/_mullong.c: replaced int by short for gcc
10924
10925 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10926
10927         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
10928         and JUMPTABLE iCodes properly now (worked by accident before)
10929         * src/mcs51/gen.c (leftRightUseAcc),
10930         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
10931         iCode properly now. Use getSize instead of nRegs since a & b
10932         aren't part of the nRegs tally.
10933
10934 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
10935
10936         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
10937         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
10938           before instructions that use the _STATUS register
10939
10940 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
10941
10942         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
10943         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
10944         fetching of the pointer
10945         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
10946         copied from genNearPointerSet()
10947         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
10948         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
10949         If they pop r0/r1 they must be called in the opposite order than aopOp().
10950         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
10951         (resp. --stack-auto), prepared for --xstack
10952
10953 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10954
10955         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
10956
10957 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10958
10959         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
10960         these ports have their own __sdcc_external_start()
10961
10962 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
10963
10964         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
10965         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
10966         type for bits was changed. It resulted in bit variables becoming
10967         global, which is not permitted in PIC 14 assembly output.
10968
10969 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10970
10971         * doc/sdccman.lyx: various additions and updates. Rearranged sections
10972
10973 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10974
10975         Z80 and MCS51 linkers complaint if a public symbol is defined
10976         in more than one library module:
10977
10978         * as/mcs51/lklib.c
10979         * link/z80/lklib.c
10980         * as/mcs51/Makefile.in
10981
10982 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10983
10984         A few small changes that speed up the peephole optimizer.
10985
10986         * src/SDCCpeeph.c
10987
10988 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10989
10990         Try to make the peephole optimizer smarter by maintaining
10991         an association between the assembly source code and the
10992         iCodes that originated them. Put this information to use
10993         with a new peephole rule condition "notVolatile" so that
10994         the rules can be aggressive yet still safe.
10995
10996         * src/SDCCpeeph.c
10997         * src/SDCCpeeph.h
10998         * src/mcs51/gen.c
10999         * src/mcs51/peeph.def
11000
11001 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11002
11003         Fixed bug #741761
11004
11005         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
11006         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
11007         if the left or right operand symbols have the accuse flag set.
11008
11009 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11010
11011         Changed the type of the result of the ! (NOT) operator to char;
11012         previously it returned the same type as the source. This allows
11013         us to eliminate all the genFloatNot functions (all of its target
11014         implementations were very buggy) since !float can use the same
11015         code as !long now.
11016
11017         * src/SDCCicode.c (ast2iCode): ! returns char
11018         * src/mcs51/gen.c (genNot, genNotFloat),
11019         * src/ds390/gen.c (genNot, genNotFloat),
11020         * src/z80/gen.c (genNot, genNotFloat),
11021         * src/pic/gen.c (genNot, genNotFloat),
11022         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
11023
11024 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
11025
11026         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
11027         1. Interrupt would not compile properly. Ensure PCLATH register is saved
11028            during interrupts. Ensure WSAVE is located at a shared bank address.
11029         2. Fixed page selection in some places
11030         3. Fixed BTFSS/C to where necessary use registers directly and not simply
11031            the registers name strings.
11032         4. Fixed "signed / unsigned compare" compiler warnings.
11033         5. The PIC port manages its own allocation of the general purpose
11034            registers, but makes no attempt to reuse them. As a result when
11035            compiling it soon runs out of general purpose registers. Some
11036            additional code was added to the files pcode.c and device.c to walk
11037            through the function call tree and rename the registers so that they
11038            get reused.
11039
11040         * src/pic/device.c
11041         * src/pic/gen.c
11042         * src/pic/glue.c
11043         * src/pic/pcode.c
11044         * src/pic/pcode.h
11045         * src/pic/ralloc.c
11046         * src/pic/ralloc.h
11047         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
11048         genPlus() & genMinus() when the result is the same as left or right
11049
11050 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11051
11052         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
11053
11054 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11055
11056         Made bitfield a distinct type from bit so that bitfields
11057         convert as per ANSI C and bits retain their traditional
11058         boolean style behaviour. Implemented bitfield support in
11059         the z80 port.
11060
11061         * src/SDCCsymt.h,
11062         * src/SDCCsymt.c,
11063         * src/SDCCast.c,
11064         * src/cdbFile.c,
11065         * src/mcs51/gen.c,
11066         * src/ds390/gen.c: bit v bitfield split
11067         * src/z80/gen.c: New support for bitfields
11068         * support/regression/tests/bitfields.c: reenabled z80,
11069         added more tests
11070
11071 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11072
11073         Rules 246.x, 247.x relate to bitfields, the others speed up
11074         access to xdata mapped I/O devices.
11075
11076         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
11077
11078 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11079
11080         Cleaned up genPackBits and genUnpackBits and added two helper
11081         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
11082         for literal assignments in genPackBits (thanks to Frieder for
11083         reminding me).
11084
11085         * src/mcs51/gen.c
11086         * src/ds390/gen.c
11087
11088 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11089
11090         Fixed bug #748310 (pointer to function type mishandled when the
11091         function name is omitted). Also fixed a SIGSEGV when a function
11092         attribute (reentrant, etc) is used on a non-function or on a
11093         function but misplaced before the parameter list.
11094
11095         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
11096         bug #748310
11097         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
11098         * support/Util/SDCCerr.h,
11099         * support/Util/SDCCerr.c: Added func attr misuse error msg
11100
11101 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
11102
11103         Fixed bug #787649 by anonymous
11104         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
11105         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
11106
11107 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11108
11109         Fixed numerous bitfield problems.
11110
11111         * src/SDCC.y: More bitfield related error checking
11112         * src/SDCCsymt.h,
11113         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
11114         * support/Util/SDCCerr.h,
11115         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
11116         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
11117         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
11118         * support/regression/tests/bitfields.c: tests added
11119
11120 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11121
11122         Made the constant following the "interrupt" keyword optional. If
11123         omitted, the function will not automatically be given an entry
11124         in the interrupt vector table (similar to #pragma NOIV, but
11125         less syntacticly kludgy). The interrupt number is also now
11126         range checked. Also fixed a bug in the high order bit example
11127         in the manual.
11128
11129         * src/SDCC.y
11130         * src/SDCCmem.c
11131         * src/SDCCglue.c
11132         * src/SDCCsymt.h
11133         * support/Util/SDCCerr.c
11134         * support/Util/SDCCerr.h
11135         * doc/sdccman.lyx
11136
11137 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
11138
11139         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
11140         * src/SDCCicode.c (operandOperation): rewritten some ops
11141         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
11142         * src/SDCCsymt.c (computeType): literals are handled the same way as any
11143         other type
11144         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
11145         be re-activated by defining REDUCE_LITERALS)
11146         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
11147         unsigned, but are signed by default
11148         * src/SDCCval.c (constVal): rearranged
11149         * src/SDCCval.c (valMod): preliminary fix
11150         * src/SDCCval.c (valCastLiteral): use TYPE_* types
11151         * support/regression/literalop.c: added, work in progress
11152
11153 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11154
11155         Generate warnings for useless declarations like "char data;"
11156         that don't do what new users expect.
11157
11158         * src/SDCC.y
11159         * support/Util/SDCCerr.h
11160         * support/Util/SDCCerr.c
11161
11162 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
11163
11164         * src/SDCCval.c (valMult): fix overflow detection of negative int
11165
11166 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11167
11168         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
11169
11170         Changes to support big endian targets:
11171
11172         * src/ports.h
11173         * src/SDCCglue.c
11174         * src/avr/main.c
11175         * src/ds390/main.c
11176         * src/izt/i186.c
11177         * src/mcs51/main.c
11178         * src/pic/main.c
11179         * src/pic16/main.c
11180         * src/xa51/main.c
11181         * src/z80/main.c
11182
11183 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
11184
11185         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
11186         * device/lib/time.c: fixed warning "integer overflow in expression"
11187
11188 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
11189
11190         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
11191         * src/SDCCval.c (constVal): changed default to signed; hex and octal
11192         constants are unsigned; added recognition of "u" flag for unsigned
11193         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
11194         * src/SDCCval.c (valDiv, valMod): fixed signdness
11195         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
11196         signedness of modulo, left and right shift
11197         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
11198         * support/Util/SDCCerr.h: added warning W_INT_OVL
11199         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
11200         * src/SDCCast.c (ast_print): improved output of constants
11201
11202 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11203
11204         Fixed some warnings when building with MSVC:
11205
11206         * as/mcs51/asdata.c
11207         * as/z80/asdata.c
11208         * as/mcs51/asm.h
11209         * as/z80/asm.h
11210         * link/z80/aslink.h
11211         * link/z80/lkdata.c
11212         * link/z80/lkeval.c
11213         * link/z80/lkgb.c
11214         * link/z80/lkihx.c
11215         * link/z80/lks19.c
11216         * link/z80/lksym.c
11217         * support/cpp2/cpplib.c
11218         * src/ds390/gen.c
11219         * src/mcs51/gen.c
11220
11221 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
11222
11223         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
11224
11225 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11226
11227         * support/librarian/clean.mk: Do not remove Makefile.
11228         * support/librarian/Makefile: added.
11229
11230 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11231
11232         Added librarian to MSVC build:
11233         * all.dsp
11234         * sdcc.dsw
11235         * support/librarian/librarian.dsp
11236
11237         'configure' not needed for librarian, removed:
11238         * support/librarian/configure
11239         * support/librarian/configure.in
11240         * support/librarian/config_in.h
11241         * support/librarian/Makefile.in
11242
11243         Hopefully these ones built the librarian and the rest of sdcc properly:
11244         * Makefile
11245         * Makefile.common.in
11246
11247         Messed up 'configure', so revert to previous version:
11248         * configure
11249         * configure.in
11250
11251 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
11252
11253         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
11254         there, while the mantissa of a double is "only" 53 bits wide.
11255
11256 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11257
11258         Adding sdcclib to the build.  MSVC project coming soon.
11259         Files added/changed:
11260
11261         * support/librarian/clean.mk
11262         * support/librarian/configure
11263         * support/librarian/configure.in
11264         * support/librarian/config_in.h
11265         * support/librarian/Makefile.bcc
11266         * support/librarian/Makefile.in
11267         * support/librarian/sdcclib.c
11268         * Makefile.bcc
11269         * Makefile
11270         * Makefile.common.in
11271         * configure
11272         * configure.in
11273
11274 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11275
11276         Linker now complaints if linked modules have conflicting options, for
11277         example, one compiled using --model-large and another one compiled with
11278         --model-small.  The following files were modified:
11279
11280         * as/mcs51/asdata.c
11281         * as/mcs51/aslink.h
11282         * as/mcs51/asm.h
11283         * as/mcs51/asmain.c
11284         * as/mcs51/asout.c
11285         * as/mcs51/i51pst.c
11286         * as/mcs51/lkdata.c
11287         * as/mcs51/lklibr.c
11288         * as/mcs51/lkmain.c
11289         * as/z80/asdata.c
11290         * as/z80/asm.h
11291         * as/z80/asmain.c
11292         * as/z80/asout.c
11293         * as/z80/z80pst.c
11294         * link/z80/aslink.h
11295         * link/z80/lkdata.c
11296         * link/z80/lklibr.c
11297         * link/z80/lkmain.c
11298         * src/SDCCglue.c
11299
11300 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11301
11302         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
11303         as/mcs51/lklibr.c: Generate a warning when a library is not found.
11304
11305 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
11306
11307         * src/z80/mappings.i: fix _mul[us][int,long] entries
11308
11309 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11310
11311         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
11312
11313 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
11314
11315         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
11316         * support/regression/tests/bitopcse.c: added
11317         fixed warning:
11318         * src/avr/gen.c:
11319         * src/pic/gen.c:
11320         * src/pic16/gen.c:
11321         * src/z80/gen.c:
11322         * src/xa51/gen.c:
11323
11324 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11325
11326         added support for new library format to z80, gbz80 linkers:
11327         *link/z80/aslink.h
11328         *link/z80/lklex.c
11329         *link/z80/lklib.c
11330         *link/z80/lklist.c
11331
11332 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
11333
11334         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
11335         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
11336
11337 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
11338
11339         added DUMMY_READ_VOLATILE:
11340         * src/SDCC.y:
11341         * src/avr/gen.c:
11342         * src/xa51/gen.c:
11343         * src/z80/gen.c:
11344         * src/pic/gen.c:
11345         * src/pic16/gen.c:
11346         * src/mcs51/gen.c:
11347         * src/ds390/gen.c:
11348         * src/SDCCcse.c (algebraicOpts): many improvements
11349         * src/SDCCcse.h: removed algebraicOpts()
11350         * src/SDCCicode.c (picDummyRead): added
11351
11352 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11353
11354         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
11355         "Insufficient space in data memory".
11356
11357 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11358
11359         * src/mcs51/gen.c: fixed bug #771358
11360         * src/z80/gen.c: fixed bug #759087
11361
11362 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
11363
11364         * src/pic16/glue.c: minor cleanup by Vangelis
11365
11366 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11367
11368         * device/include/regc515c.h: fixed #758477
11369         * device/lib/_gptrget.c: saving some cycles in generic pointer get
11370         * device/lib/_gptrput.c: saved a few bytes
11371         * my tab spacing is 8, yours too?)
11372         * device/lib/_ser.c: process RX bytes earlier than TX bytes
11373         * device/lib/serial.c: process RX bytes earlier than TX bytes
11374         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
11375
11376 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
11377
11378         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
11379
11380 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11381
11382     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
11383
11384 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
11385
11386         * device/lib/Makefile.in: bad fix, reverted to 1.43
11387
11388 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
11389
11390         * device/lib/Makefile.in: added missing z80 object files
11391
11392 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
11393
11394         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
11395         pic16 progress by Vangelis:
11396         * src/SDCCglobl.h:
11397         * src/SDCCmain.c:
11398         * src/pic/Makefile:
11399         * src/pic:
11400         * pic/Makefile:
11401         * pic16/device.c:
11402         * pic16/device.h:
11403         * pic16/gen.c:
11404         * pic16/gen.h:
11405         * pic16/genarith.c:
11406         * pic16/glue.c:
11407         * pic16/main.c:
11408         * pic16/pcode.c:
11409         * pic16/pcode.h:
11410         * pic16/pcodepeep.c:
11411         * pic16/peeph.def:
11412
11413 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11414
11415     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
11416
11417 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11418
11419     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
11420     added gbz80 build to MSVC project.
11421     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
11422     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
11423     from 8051 stuff and setup so it links using a .lnk file.
11424
11425 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11426
11427     * support/librarian/sdcclib.c: sdcc librarian.
11428     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
11429     with sdcclib.
11430
11431 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11432
11433     * as/mcs51/lkmain.c: properly handle extensions in function afile.
11434
11435 2003-07-02  Borut Razem <borut.razem AT siol.net>
11436
11437         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
11438         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
11439         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
11440         src/xa51/main.c, src/z80/main.c:
11441         virtualization of glue() function: each port has it's own glue function,
11442         which is accessed by do_glue function pointer in PORT.general structure
11443
11444 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
11445
11446         * DS800C400 fun, improved ROM interface and tinibios.
11447
11448 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
11449
11450         * More support for DS80C400. Now includes beginning of interface to ROM.
11451
11452 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
11453
11454         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
11455
11456 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11457
11458         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
11459
11460 2003-06-19  Borut Razem <borut.razem AT siol.net>
11461
11462         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
11463
11464 2003-06-19  Borut Razem <borut.razem AT siol.net>
11465
11466         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
11467         fixed Z80 port - crt0.o: cannot open.
11468
11469 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
11470
11471         * support/Util/MySystem.c (merge_command): revert bad fix
11472
11473 2003-06-18  Borut Razem <borut.razem AT siol.net>
11474
11475         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
11476
11477 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11478
11479         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
11480         option --use-stdout sends errors to stdout instead of stderr.
11481
11482 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
11483
11484         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
11485
11486 2003-06-15  Borut Razem <borut.razem AT siol.net>
11487
11488         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
11489         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
11490         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
11491         fixed width array of pointers replaced with sets;
11492         multiple include and lib paths ared transferred to preprocessor and linker
11493         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
11494         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
11495         fixed width array of pointers
11496         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
11497         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
11498         fixupPath(), getPathDifference()
11499         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
11500         fixed width array of pointers
11501
11502 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
11503
11504         * src/pic16/ralloc.c: fix warnings
11505         * src/pic16/pcode.c: fix warning
11506
11507 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
11508
11509          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
11510         know all the details, but essentially this set of changes enable
11511         the pic16 port to generate movff instructions and generate assembler
11512         directives,
11513         * src/SDCCmain.c:
11514         * src/pic16/gen.c:
11515         * src/pic16/glue.c:
11516         * src/pic16/pcode.c:
11517         * src/pic16/device.c:
11518         * src/pic16/main.c:
11519         * src/pic16/pcode.h:
11520         * src/pic16/pcoderegs.c:
11521         * src/pic16/ralloc.c:
11522         * src/pic16/ralloc.h:
11523
11524 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11525
11526         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
11527         added option --vc, so sdcc errors and warnings are compatible with
11528         Microsoft Visual Studio.
11529
11530 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11531
11532         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
11533           device/lib/libfloat.lib: added atof function.
11534
11535 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
11536
11537         * doc/sdccman.lyx: updated to Lyx 1.3
11538         * doc/cdbfileformat.lyx: updated to Lyx 1.3
11539         * doc/test_suite_spec.lyx: updated to Lyx 1.3
11540         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
11541
11542 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
11543
11544         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
11545
11546 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11547
11548         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
11549           additions to the "related tools/documentation" section
11550
11551 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
11552
11553         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
11554
11555 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
11556
11557         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
11558         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
11559
11560 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
11561
11562         * doc/sdccman.lyx: fix double dash and other minor things
11563         * doc/Makefile: fix double dash
11564
11565 2003-05-28  Karl Bongers(patches from Martin Helmling)
11566         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
11567           condition and ignore commands.
11568
11569 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11570
11571         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
11572           is in parts still quite out of date, I did changes as far as I felt makes sense
11573           for a non-native english speaker.
11574           Please feel free to add to the manual or to correct my changes.
11575         * doc/Makefile: undid touching the date of intermediate tex files.
11576
11577 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11578
11579         * doc/sdccman.lyx: Manual has an index now
11580
11581 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
11582
11583         Finalize muluint/mulsint and mululong/mulslong merging:
11584         * device/lib/_mulint.c
11585         * device/lib/_mullong.c
11586         * device/lib/gbz80/mul.s
11587         * device/lib/gbz80/stubs.s
11588         * device/lib/z80/mul.s
11589         * device/lib/z80/stubs.s
11590         * src/SDCCsymt.c (initCSupport)
11591
11592 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11593
11594         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
11595         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
11596           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
11597           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
11598           instead of /Zm500.
11599
11600 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11601
11602         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
11603           the regression tests I'm not brave enough to enable 245.b, 245.c
11604         * doc/sdccman.lyx: added latex preamble for hyperref package.
11605           Using pdflatex this will give you a hyperlinked pdf file with
11606           bookmarks. (prepend '%' before /usepackage if this breaks something)
11607
11608 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11609
11610          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
11611
11612 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
11613
11614         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
11615
11616 2003-05-21    <johan AT balder>
11617
11618         * src/SDCCglue.c (printIval): fixed bug #739934
11619
11620 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
11621
11622         Applied patch from bug 737905 (renamed yylineo to mylineno):
11623         * src/altlex.c
11624         * src/SDCCast.c
11625         * src/SDCglobl.h
11626         * src/SDCC.lex
11627         * src/SDCCsymt.c
11628         * src/SDCCval.c
11629         * src/pic16/pcode.c: Cleaned warnings
11630         * src/pic16/pcodeflow.c: Cleaned warnings
11631         * src/pic16/pcoderegs.c: Cleaned warnings
11632
11633 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
11634
11635         * src/pic16/pcode.c: Cleaned warnings
11636         * src/pic16/pcodepeep.c: Cleaned warnings
11637         * src/pic16/ralloc.c: Cleaned warnings
11638
11639 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
11640
11641         * doc/sdccman.lyx: fixed bug 739745
11642         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
11643
11644 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
11645
11646         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
11647         it can be defined with CFLAGS when running configure
11648         * src/SDCCmain.c: fixed compiling + linking with object files
11649
11650 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
11651
11652         * configure.in: configure for pic16 port,
11653             added --disable-pic16-port
11654         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
11655         * src/SDCCmain.c: linkOptions is changed to set *,
11656             added if/endif conditional macros to remove options help
11657             messages from optionsTable when a port is not configured, added
11658             support for the PIc16 port in the ports table, when executing
11659             the compiler with no port specified on command line, a default
11660             port is selected with the new macro DEFAULT_PORT which is
11661             defined in port.h, in setDefaultOptions() linkOptions is removed
11662             from initialization assignment, since now it is a set,
11663             parseCmdLine uses setParseWithComma for linkOptions, in
11664             linkEdit() linkOptions are accessed with new function indexSet()
11665             which returns the i'th item of a set variable. See SDCCset.c, in
11666             linkEdit() when calling buildCmdLine(), added linkOptions as
11667             last argument. Now users can pass arguments to gplink via the
11668             -Wl option, main() uses pic16glue() to glue up pic16 programs
11669         * src/SDCCpeeph.c: various changes to support pic16
11670         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
11671             return the i'th item of the set
11672         * src/SDCCset.h: added function prototype for indexSet()
11673         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
11674         * src/clean.mk: added pic16 in CLEANALLPORTS variable
11675         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
11676             added macro DEFAULT_PORT
11677         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
11678         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
11679             generated
11680         * src/pic16/glue.c: commented out some error producing lines
11681         * src/pic16/main.c: __config directives are commented out to stop
11682             gpasm complaining and test the linkage with gplink, _linkCmd and
11683             _asmCmd changed to be more gplink and gpasm friendly
11684         * src/pic16/peeph.def: peep rule 3 is commented out, since it
11685             produced an error when parsed, peep rule 12 is added to utilize
11686             movff, but it is commented out since the pCode does not support
11687             yet a command with 2 address arguments
11688
11689 2003-05-18    <johan AT balder>
11690
11691         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
11692         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
11693 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
11694
11695         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
11696   Added feature to script commands from file.
11697
11698 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
11699
11700         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
11701         * src/SDCCutil.c: include ctype.h for win32
11702
11703 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
11704
11705         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
11706
11707 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
11708
11709         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
11710   Fixed so you can set breakpoints prior to run, run does not stop
11711   on entry now.  Add tbreak.  Other enhancements and fixes for use
11712   with ddd.
11713
11714 2003-05-12  Borut Razem <borut.razem AT siol.net>
11715
11716         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
11717
11718 2003-05-11  Borut Razem <borut.razem AT siol.net>
11719
11720         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
11721         the path of bin directory, so that PATH is the only env. variable, which has to be set
11722         in case of standard installation.
11723         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
11724         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
11725         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
11726
11727 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
11728
11729         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
11730         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
11731         temp files are in the port dir; clean the gen/test directory when
11732         generating new test.c
11733         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
11734         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
11735         * support/regression/tests/zeropad.c: added
11736
11737 2003-05-09    <johan AT balder>
11738
11739         * src/SDCCglue.c: fixed bug #597940
11740
11741 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
11742
11743         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
11744   cache sfr, optimize next,step, fix off by one sourceline,
11745   support ddd list function.
11746         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
11747
11748 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
11749
11750         * support/regression/HTMLgen.py: added compare_s2f()
11751         * support/regression/Makefile: redo 1.27
11752         * support/regression/generate-cases.py: redo 1.5
11753
11754 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
11755
11756         * support/regression/tests/float.c: workaround 33 bit hex constant
11757         * support/regression/tests/simplefloat.c: fix division for host
11758
11759 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
11760
11761         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
11762         that tame's the PIC's over-aggressive optimizer.
11763
11764 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11765
11766          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
11767          support for MSVC.
11768
11769 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
11770
11771         Initial support for DS80C400. "Hello world" runs on TINIm400
11772         (with polled I/O).
11773
11774 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
11775
11776          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
11777          * Some notes on ddd usage added in debugger/README
11778          Martin Helmling adding more features and fixes for ddd GUI debugger.
11779          Code added for nexti, stepi, up, down, and other adjustments.
11780
11781 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
11782
11783         * src/pic/pCodepeep.c non-wildcard asmops are now handled
11784         * src/pic/peeph.def Added two rules to optimize carry manipulation
11785         * src/pic/* removed debug printfs
11786
11787 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
11788
11789         * debugger/mcs51/cmd.c: added header newalloc.h
11790
11791 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
11792
11793         * as/Makefile: new EXEEXT
11794         * as/z80/Makefile: remove trailing slash of BUILDIR
11795         * as/z80/clean.mk: new EXEEXT
11796         * Makefile.common.in: add to CFLAGS (and others), don't replace it
11797         * support/cpp2/Makefile.in: new EXEEXT
11798         * src/pic/glue.c (pic14emitRegularMap): fixed warning
11799
11800 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
11801
11802         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
11803         EXEEXT was introduced to fix all related problems with targets
11804         "clean", "install" and "uninstall"; a couple of further flaws
11805         especially with "clean" have been fixed too
11806         * as/mcs51/Makefile.in
11807         * as/mcs51/clean.mk
11808         * as/z80/Makefile
11809         * Makefile
11810         * clean.mk
11811         * debugger/mcs51/Makefile.in
11812         * debugger/mcs51/clean.mk
11813         * link/z80/Makefile
11814         * link/z80/Makefile.in
11815         * link/z80/clean.mk
11816         * link/Makefile
11817         * packihx/Makefile.in
11818         * packihx/clean.mk
11819         * sim/ucsim/Makefile
11820         * sim/ucsim/clean.mk
11821         * sim/ucsim/avr.src/Makefile.in
11822         * sim/ucsim/avr.src/clean.mk
11823         * sim/ucsim/s51.src/Makefile.in
11824         * sim/ucsim/s51.src/clean.mk
11825         * sim/ucsim/xa.src/Makefile.in
11826         * sim/ucsim/xa.src/clean.mk
11827         * sim/ucsim/z80.src/Makefile.in
11828         * sim/ucsim/z80.src/clean.mk
11829         * sim/ucsim/main_in.mk
11830         * sim/ucsim/packages_in.mk
11831         * sim/ucsim/gui.src/Makefile.in
11832         * sim/ucsim/gui.src/serio.src/Makefile.in
11833         * sim/ucsim/gui.src/serio.src/clean.mk
11834         * src/Makefile.in
11835         * src/clean.mk
11836         * support/cpp2/Makefile.in
11837         * support/cpp2/clean.mk
11838         * support/makebin/Makefile
11839         * support/makebin/clean.mk
11840         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
11841         * doc/sdccman.lyx: --program-suffix no longer needed
11842
11843 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
11844
11845          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
11846          Martin Helmling added support for ddd GUI debugger.
11847          Code added to display assembly, set variables, and other commands
11848          to interface to ddd.
11849
11850 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
11851
11852         * as/Makefile: fix target clean
11853         * as/clean.mk: fix target clean
11854         * as/z80/clean.mk: fix target clean
11855
11856 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
11857
11858         * Makefile.common.in: added  AT EXEEXT AT
11859         * configure.in: removed all mingw32 stuff
11860         * configure: rebuilt from configure.in
11861         * doc/sdccman.lyx: updated section "installation"
11862         * support/scripts/sdcc_mingw32: adapted to configure
11863         * support/scripts/sdcc_cygwin_mingw32: added
11864
11865 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
11866
11867         * src/pic Added object file support for the PIC port
11868         * src/pic Applied patch from Craig Franklin (this started the object file support)
11869         * src/regression Updated the PIC regression tests for object files
11870
11871 2003-04-20  Borut Razem <borut.razem AT siol.net>
11872
11873         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
11874           lklex.c: In function `getfid':
11875           lklex.c:203: warning: array subscript has type `char'
11876         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
11877           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
11878         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
11879           stack handling macros
11880
11881 2003-04-19  Borut Razem <borut.razem AT siol.net>
11882
11883         * "handling space characters in file path" task:
11884         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
11885         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
11886         * support/Util/MySystem.h: make it self-sufficient
11887         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
11888           src/z80/main.c, sdcc/as/mcs51/lklex.c:
11889           handling space characters in file path
11890         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
11891           (it will be used by assemblers, which have their own includes, e.g. gpasm)
11892         * support/Util/MySystem.c: handling space characters in executable's path
11893
11894 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
11895
11896         * as/z80/Makefile: fix permanent rebuild of z80
11897         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
11898         * support/regression/tests/bitfields.c: added Johan's bitfields.c
11899
11900 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
11901
11902         * src/SDCCopt.c: add special case optimization to replace modulo by
11903           a power of two with a bitwise AND.
11904
11905 2003-04-18    <johan AT balder>
11906
11907         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
11908
11909 2003-04-17    <johan AT balder>
11910
11911         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
11912         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
11913
11914 2003-04-13  Borut Razem <borut.razem AT siol.net>
11915
11916         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
11917         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
11918           fixed mingw problem in adl_NORMALIZE_PATH
11919
11920 2003-04-12  Borut Razem <borut.razem AT siol.net>
11921
11922         * fixed "#pragma SAVE/RESTORE can not be nested":
11923         * src/SDCC.lex: reworked pragma handling functions
11924         * sdcc/src/SDCCglobl.h: reworked stack handling macros
11925         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
11926
11927 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
11928
11929         * src/SDCCutil.c (pathEquivalent): defined but not used
11930         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
11931         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
11932         * configure: rebuilt from configure.in
11933         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
11934         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
11935         * device/include/Makefile.in: replace sdcc_datadir
11936         * device/lib/Makefile.in: replace sdcc_datadir
11937         * Makefile.common.in: add LDFLAGS from configure
11938         * packihx/Makefile.in: use LDFLAGS
11939         * src/Makefile.in: use LDFLAGS
11940         * support/cpp2/Makefile.in: add LDFLAGS from configure
11941         * support/makebin/Makefile: use LDFLAGS
11942         * .version: bumped version number to 2.3.5
11943
11944 2003-04-12  Borut Razem <borut.razem AT siol.net>
11945
11946         * completed "different paths" task:
11947         * src/SDCCmacro.c: fixed bug in handling quotes
11948         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
11949         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
11950
11951 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
11952
11953         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
11954
11955 2003-04-11 kevin Vigor <kevin AT vigor.nu>
11956
11957         * ds390/gen.c ds390/peeph.def: fix bug 706781
11958
11959 2003-04-11  Borut Razem <borut.razem AT siol.net>
11960
11961         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
11962
11963 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
11964
11965         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
11966         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
11967          set - this bit used to not be set...).
11968         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
11969           bad code in PIC Port
11970         * src/regression/and2.c added to test bug 609268
11971         * src/regression/Makefile added and2.c to regression test
11972
11973
11974 2003-04-08    <johan AT CP255758-A>
11975
11976         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
11977         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
11978         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
11979
11980 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
11981
11982         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
11983         fix bug #487815
11984         * support/cpp2/Makefile.in: fix bug #487815
11985         * configure: rebuilt from configure.in
11986         * Makefile.common.in: docdir changed, new path suffixes
11987         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
11988         * sdcc_vc_in.h: reflect changes from sdccconf.h
11989         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
11990         * src/SDCCutil.h: remove BINDIR hack
11991         * doc/sdccman.lyx: update new path hierarchy
11992
11993 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
11994
11995         * src/SDCCpeeph.c: added okToRemoveSLOC test
11996
11997 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
11998
11999         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
12000
12001 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
12002
12003         * src/SDCCpeeph.c: added labelIsReturnOnly test
12004         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
12005
12006 2003-04-05    <johan AT balder>
12007
12008         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
12009         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
12010         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
12011         * src/SDCCast.c: fixed a warning
12012         * src/SDCCast.h: fixed a warning
12013         * src/SDCCicode.c (operandFromAst): fixed a warning
12014
12015 2003-04-04    <johan AT balder>
12016
12017         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
12018         * src/SDCCast.c (decorateType): fixed bug #715076
12019         * src/SDCC.y: fixed bug #702907
12020
12021 2003-04-03    <johan AT balder>
12022
12023         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
12024         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
12025         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
12026         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
12027         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
12028
12029 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
12030
12031         * _decdptr.c: fix return values
12032         * _gptrget.c: fix return values
12033         * _gptrgetc.c: fix return values
12034         * _gptrput.c: fix return values
12035         * _mulint.c: fix return values
12036         * as/z80/Makefile: fix 'make -j' problem
12037
12038 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
12039
12040         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
12041         * configure.in: big cleanup, updated to autoconf 2.5x
12042         * configure: rebuilt from configure.in
12043         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
12044         * sdcc_vc_in.h: reflect changes from sdccconf.h
12045         * doc/Makefile: fixed a flaw in "make install"
12046
12047 2003-04-02    <johan AT balder>
12048
12049         * src/ds390/gen.c (genCmp): no comments
12050         * src/mcs51/gen.c (genCmp): no comments
12051         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
12052         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
12053
12054 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
12055
12056         * support/regression/generate-cases.py: place generated file in given sub directory
12057         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
12058         * support/regression/Makefile: improvements for 'make -j';
12059         side effect: it's simpler and faster now
12060
12061 2003-03-31  Borut Razem <borut.razem AT siol.net>
12062
12063         * src/z80/main.c: link-{port} and as-{port} defined without path
12064         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
12065
12066 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
12067
12068         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
12069
12070 2003-03-30  Borut Razem <borut.razem AT siol.net>
12071
12072         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
12073           changed type of list parameter to set
12074         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
12075         * src/port.h: changed type of do_assemble() parameter to set
12076         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
12077           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
12078           definition of "cppoutfilename" macro with NULL value in preProcess()
12079         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
12080         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
12081         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
12082           replaced with set *binPathSet
12083         * shash_add() deallocates the item, if allready exsists, before adding the new one
12084         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
12085
12086 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
12087
12088         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
12089           a nested for loop bug in the PIC port
12090         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
12091           for loops
12092
12093 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
12094
12095         * support/Util/dbuf.h: remove C++ stuff to make it portable
12096
12097 2003-03-28  Borut Razem <borut.razem AT siol.net>
12098
12099         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
12100           literal strings in stringLiteral()
12101         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
12102         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
12103           to the project
12104
12105 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
12106
12107         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
12108
12109 2003-03-26    <johan AT balder>
12110
12111         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
12112         * src/ds390/gen.c (saveRegisters): catched symbol abuse
12113         * src/SDCCast.c (decorateType): fixed " -v < 3"
12114
12115 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
12116
12117         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
12118         Added Lenny Story's debug infrastructure changes:
12119         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
12120         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
12121         * src/cdbFile.c: added
12122         * src/SDCCdebug.c: added
12123         * src/SDCCdebug.h: added
12124         * src/SDCCast.c (createFunction)
12125         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
12126         * src/SDCCmain.c (parseCmdLine, main)
12127         * src/SDCCmem.c (redoStackOffsets)
12128         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
12129         * src/SDCCsymt.h
12130         * src/common.h
12131         * src/avr/gen.c (genAVRCode)
12132         * src/ds390/gen.c (gen390Code)
12133         * src/mcs51/gen.c (gen51Code)
12134         * src/pic/gen.c (genpic14Code)
12135         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
12136         * src/xa51/gen.c (genXA51Code)
12137         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
12138
12139 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
12140
12141         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
12142         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
12143
12144 2003-03-22    <johan AT balder>
12145
12146         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
12147
12148 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
12149
12150         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
12151         * doc/cdbfileformat.lyx: added, written by Lenny Story
12152         * doc/Makefile: added cdbfileformat.lyx
12153         * doc/clean.mk: added cdbfileformat.lyx
12154
12155 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
12156
12157         * src/mcs51/peeph.def: fix bug #705773
12158
12159 2003-03-20    <johan AT balder>
12160
12161         An sfr/sbit can have an "at #" AND an initializer
12162         * src/SDCCsymt.c (checkSClass):
12163         * src/SDCCmem.c (allocGlobal):
12164         * src/SDCCmem.c (allocLocal):
12165         * src/SDCCast.c (createBlock):
12166
12167 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
12168
12169         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
12170
12171 2003-03-16    <johan AT balder>
12172
12173         Undid the hackup of const and volatile, the problem is much bigger
12174         * src/SDCC.y:1.65
12175         * src/SDCCast.c:1.171
12176         * src/SDCCglue.c:1.138
12177         * src/SDCCicode.c:1.146
12178         * src/SDCCsymt.c:1.150
12179         * src/SDCCval.c:1.65
12180
12181 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
12182
12183         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
12184         * src/ds390/gen.c (genAddrOf): fixed bug #704087
12185
12186 2003-03-13    <johan AT balder>
12187
12188         Hackup const and volatile modifiers in type chains a bit:
12189         * src/SDCC.y:1.63
12190         * src/SDCCast.c:1.169
12191         * src/SDCCglue.c:1.136
12192         * src/SDCCicode.c:1.143
12193         * src/SDCCsymt.c1.146
12194         * src/SDCCsymt.h1.59
12195         * src/SDCCval.c:1.63
12196
12197 2003-03-12    <johan AT balder>
12198
12199         * src/SDCCBBlock.h: more LRH debugging junk
12200         * src/SDCCcflow.h: more LRH debugging junk
12201         * src/SDCCloop.c: more LRH debugging junk
12202         * src/SDCC.y (struct_declaration): fixed bug #697590
12203         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
12204         * src/ds390/gen.c (aopForRemat): fixed bug #700031
12205         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
12206
12207 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
12208         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
12209         test function names must now match exactly).
12210         * src/SDCCcse.c: added special case in findCheaperOp to allow
12211         extending a short integer. Makes less awful code for bug 700121 test case.
12212
12213 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12214
12215         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
12216         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
12217
12218 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
12219
12220         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
12221         actually called (operandsNotEqual() was called for all
12222         operandsNotEqualX tests).
12223
12224 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
12225
12226         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
12227         with shorter literals. Fixes bug 700121.
12228
12229 2003-03-11    <johan AT balder>
12230
12231         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
12232
12233 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
12234
12235         * src/SDCCloop.c (mergeRegions): an evil beast is dead
12236         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
12237
12238 2003-03-10  Borut Razem <borut.razem AT siol.net>
12239
12240         * src/SDCCmain.c: pipe preprocessor's output
12241         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
12242         * sdcc_vc_in.h: define pclose as _pclose for WIN32
12243         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
12244         which closes all pipes in pipeSet set
12245         * src/SDCCset.c: free deleted item in function deleteSetItem()
12246         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
12247         moved from z80 to src subproject
12248         * .version: increased version number to 2.3.4
12249
12250 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
12251
12252         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
12253         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
12254         * support/regression/ports/xa51/spec.mk: fix typo
12255
12256 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
12257
12258         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
12259
12260 2003-03-09  Borut Razem <borut.razem AT siol.net>
12261
12262         * src/SDCCmain.c: pipe preprocessor's output
12263         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
12264         * sdcc_vc_in.h: define pclose as _pclose for WIN32
12265         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
12266         which closes all pipes in pipeSet set
12267         * src/SDCCset.c: free deleted item in function deleteSetItem()
12268         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
12269         moved from z80 to src subproject
12270
12271 2003-03-09  Borut Razem <borut.razem AT siol.net>
12272
12273         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
12274         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
12275         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
12276         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
12277         * src/SDCCglobl.h: unification of WIN32 native definitions
12278
12279 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
12280
12281         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
12282
12283 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
12284
12285         * src/configure.in:   check for endianess (even while cross-compiling)
12286         * src/configure:      check for endianess (even while cross-compiling)
12287         * src/configure_in.h: check for endianess (even while cross-compiling)
12288         * src/avr/gen.c:        remove old endianess stuff
12289         * src/mcs51/gen.c:      remove old endianess stuff
12290         * src/ds390/gen.c:      remove old endianess stuff
12291         * src/pic/gen.c:        remove old endianess stuff
12292         * src/pic/genarith.c:   remove old endianess stuff
12293         * src/pic/glue.c:       fix endianess check
12294         * src/pic16/gen.c:      remove old endianess stuff
12295         * src/pic16/genarith.c: remove old endianess stuff
12296         * src/pic16/glue.c:     fix endianess check
12297         * src/xa51/gen.c:       remove old endianess stuff
12298         * src/z80/gen.c:        fix endianess check
12299         * src/SDCCglue.c:       fix endianess check
12300         * src/ds390/peeph.def: fix bug 700036
12301
12302 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
12303
12304         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
12305         * src/configure: find appropriate data-types on host for SDCC's int and long
12306         * src/configure.in: find appropriate data-types on host for SDCC's int and long
12307         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
12308         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
12309
12310 2003-03-07    <johan AT balder>
12311
12312         Just a big NOOP:
12313                 some minor cleanups before the big shot
12314                 OP_DEFS and OP_USES now use Kevin's protection
12315                 new option --nolabelopt
12316
12317         * src/SDCCBBlock.c:
12318         * src/SDCCast.c,:
12319         * src/SDCCcflow.c:
12320         * src/SDCCcse.c:
12321         * src/SDCCicode.c:
12322         * src/SDCCicode.h:
12323         * src/SDCClabel.c:
12324         * src/SDCCloop.c:
12325         * src/SDCCmain.c:
12326         * src/ds390/ralloc.c:
12327         * src/mcs51/ralloc.c:
12328         * src/pic/ralloc.c:
12329         * src/xa51/ralloc.c:
12330         * src/z80/ralloc.c:
12331
12332 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
12333
12334         * src/pic/pcode.c (get_op): fix 64 bit warnings
12335         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
12336         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
12337         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
12338         * support/regression/tests/malloc.c: fix 64 bit warnings
12339
12340 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
12341
12342         * src/mcs51/gen.c (genMinus): fixed bug 696436
12343
12344 2003-03-02  Borut Razem <borut.razem AT siol.net>
12345
12346         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
12347
12348 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
12349
12350         * configure.in: test for mkstemp
12351         * sdccconf_in.h: add HAVE_MKSTEMP
12352
12353 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
12354
12355         * device/include/ctype.h: removed warning while using --stack-auto
12356         * device/include/malloc.h: removed warning while using --stack-auto
12357         * device/include/string.h: removed warning while using --stack-auto
12358
12359 2003-02-23  Borut Razem <borut.razem AT siol.net>
12360
12361         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
12362         because NDEBUG is defined (see man assert)
12363         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
12364
12365 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
12366
12367         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
12368         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
12369
12370 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
12371
12372         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
12373         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
12374
12375 2003-02-18    <johan AT balder>
12376
12377         * as/mcs51/asmain.c (asmbl): module can start with a digit
12378         * as/z80/asmain.c (asmbl): module can start with a digit
12379
12380 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
12381
12382         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
12383         * src/asm.c: fix pipe() for Mingw32
12384
12385 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
12386
12387         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
12388         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
12389         make -V work again; --c1mode reads now from stdin
12390         * doc/sdccman.lyx: added --c1mode
12391         * support/Util/SDCCerr.c: new messages for c1 mode
12392         * support/Util/SDCCerr.h: new messages for c1 mode
12393         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
12394
12395 2003-02-15    <johan AT balder>
12396
12397         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
12398
12399 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
12400
12401         * doc/sdccman.lyx: Environment variables, -o and other minor things
12402
12403 2003-02-14    <johan AT balder>
12404
12405         * src/xa51/main.c: before anyone really tries to use it :)
12406
12407         * Install doc's in share/sdcc/doc
12408         * removed some obsolete files
12409         * Do a proper make distclean and uninstall
12410         M Makefile.common.in
12411         R sdccbuild.sh
12412         M as/Makefile
12413         M device/include/Makefile.in
12414         M device/lib/Makefile.in
12415         M doc/sdccman.lyx
12416         M link/Makefile
12417         M sim/ucsim/doc/Makefile.in
12418         M src/clean.mk
12419         R src/avr/peeph.rul
12420         R src/xa51/peeph.rul
12421         M support/cpp2/Makefile.in
12422         M support/makebin/Makefile
12423
12424
12425 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
12426
12427         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
12428
12429 2003-02-10  Borut Razem <borut.razem AT siol.net>
12430
12431         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
12432         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
12433         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
12434         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
12435         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
12436         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
12437         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
12438         src/z80/Makefile.bcc: Borland Makefile cleanup
12439         * as/z80/Makefile.bcc: Added Borland Makefile
12440         * support/cpp2/borland.h: Removed
12441
12442 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
12443
12444         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
12445         * src/SDCC.lex: new pragma NOIV
12446         * src/SDCCglobl.h: new pragma NOIV
12447         * src/SDCCmem.c: new pragma NOIV
12448
12449 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
12450
12451         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
12452
12453 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
12454
12455         * src/SDCCmain.c: signal handling is switched off by --debug
12456         * doc/Makefile: small fix for install; use clean.mk again
12457         * doc/clean.mk: clean *.pdf and *.html too
12458
12459 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
12460
12461         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
12462         * device/lib/printfl.c: fix a ds390 bug by making it portable
12463         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
12464         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
12465         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
12466         * debugger/mcs51/cmd.c: converted multi-line string literals
12467         * sim/ucsim/globals.cc: converted multi-line string literals
12468         * src/SDCCmain.c: introduced signal handler to remove temp files
12469         * doc/Makefile: small tweaks, implement clean
12470         * doc: removed generated files
12471
12472 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12473
12474         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
12475         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
12476         Address Record is not correctly generated for DS390."
12477
12478 2003-02-02  Borut Razem <borut.razem AT siol.net>
12479
12480         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
12481         * as/mcs51/asm.h: fixed compilation with Borland C
12482         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
12483         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
12484         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
12485         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
12486         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
12487         src/z80/Makefile.bcc: delete $(LIB) only if exist
12488         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
12489
12490 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
12491
12492         * device/include/malloc.h: introduced NULL
12493         * device/include/string.h: introduced NULL
12494         * device/include/stdlib.h: introduced NULL
12495         * device/lib/_memcpy.c: removed NULL
12496         * device/lib/_strcat.c: removed NULL
12497         * device/lib/_strchr.c: removed NULL
12498         * device/lib/_strcmp.c: removed NULL
12499         * device/lib/_strcpy.c: removed NULL
12500         * device/lib/_strcspn.c: removed NULL
12501         * device/lib/_strlen.c: removed NULL
12502         * device/lib/_strncat.c: removed NULL
12503         * device/lib/_strncmp.c: removed NULL
12504         * device/lib/_strncpy.c: removed NULL
12505         * device/lib/_strpbrk.c: removed NULL
12506         * device/lib/_strrchr.c: removed NULL
12507         * device/lib/_strspn.c: removed NULL
12508         * device/lib/_strstr.c: removed NULL
12509         * device/lib/_strtok.c: removed NULL
12510         * device/lib/malloc.c: removed NULL, include own header
12511
12512 2003-02-02    <johan AT balder>
12513
12514         * 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
12515         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
12516         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
12517         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
12518         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
12519         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
12520
12521 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12522
12523         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
12524         area 'DATA'"
12525
12526 2003-02-01    <johan AT balder>
12527
12528         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
12529
12530 2003-01-31    <johan AT CP255758-A>
12531
12532         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
12533
12534 2003-01-30    <johan AT balder>
12535
12536         * src/SDCCBBlock.c: automatic bug detection
12537         * src/SDCCicode.c: automatic bug detection
12538
12539 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12540
12541         * src/SDCCglobl.h:   now --xram-size 0 works
12542         * src/SDCCmain.c:    now --xram-size 0 works
12543
12544 2003-01-29    <johan AT balder>
12545
12546         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
12547
12548 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12549
12550         * as/mcs51/aslink.h: Added options --xram-size and --code-size
12551         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
12552         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
12553         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
12554         * src/SDCCglobl.h:   Added options --xram-size and --code-size
12555         * src/SDCCmain.c:    Added options --xram-size and --code-size
12556
12557 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
12558
12559         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
12560         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
12561
12562 2003-01-27    <johan AT balder>
12563
12564         * src/SDCC.y: fixed bug #613764
12565
12566 2003-01-26    <johan AT balder>
12567
12568         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
12569         * src/SDCCsymt.h: fixed bug #673374
12570         * src/SDCCglue.c: fixed bug #661910
12571         * src/SDCCast.c: fixed bug #458099 and 673374
12572
12573 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
12574
12575         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
12576         * as/mcs51/strcmpi.h: added
12577         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
12578         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
12579         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
12580         * as/mcs51/assym.c: strcmpi -> as_strcmpi
12581         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
12582         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
12583         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
12584         * as/mcs51/Makefile.aslink: new module strcmpi
12585         * as/mcs51/Makefile.asx8051: new module strcmpi
12586         * as/mcs51/Makefil.bcc: new module strcmpi
12587         * as/mcs51/Makefile.in: new module strcmpi
12588         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
12589
12590 2003-01-26    <johan AT balder>
12591
12592         * src/SDCCglue.c: reverted back to 1.124
12593         * src/SDCCast.c: reverted back to 1.156
12594         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
12595
12596 2003-01-25    <johan AT balder>
12597
12598         * src/SDCCglue.c: A better fix for bug #661910
12599         * src/SDCCast.c: A better fix for bug #661910
12600         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
12601
12602 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
12603
12604         * src/Makefile.in: remove spawn.o
12605         * src/SDCCmain.c: remove spawn.h
12606         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
12607         * src/spawn.c: removed
12608         * src/spawn.h: removed
12609         * support/regression/ports/ds390/spec.mk: link with -r
12610
12611 2003-01-24    <johan AT CP255758-A>
12612
12613         * src/ds390/gen.c (aopOp): fixed bug #667458
12614         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
12615         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
12616         (createIvalCharPtr): an ival doesn't always have a storage class anymore
12617
12618 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
12619
12620         * src/mcs51/peeph.def: better assembler identation by Frieder
12621         * src/mcs51/gen.c: better assembler identation by Frieder
12622
12623 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
12624
12625         * as/z80/string.h: removed for gcc 3.2
12626         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
12627         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
12628
12629 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
12630
12631         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
12632         * src/SDCCpeeph.c (replaceRule): fix bug #663503
12633         * support/regression/Makefile: separate temp files for ports
12634         * support/regression/generate-cases.py: separate temp files for ports
12635         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
12636         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
12637
12638 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
12639
12640         * moved tinitalk to device/examples/ds390
12641
12642 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
12643
12644         * as/mcs51/lkmem.c: rflag is for DS390
12645         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
12646         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
12647                          (linkEdit): move mem- and map-files the same way as ihx-files
12648         * src/z80/main.c (_setDefaultOptions): removed --generic
12649         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
12650         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
12651         * src/pic/glue.c (picglue): --c1mode works again
12652         * src/pic16/glue.c (pic16glue): --c1mode works again
12653         * src/asm.c (printCLine): fix #660034
12654
12655 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
12656
12657         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
12658         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
12659         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
12660         * as/mcs51/lkmem (summary): better fix for sp problem
12661         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
12662         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
12663         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
12664                                               remove --stack-after-data
12665
12666 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
12667
12668         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
12669         * src/SDCCutil.c (join): ugly bug: missing '\0'
12670         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
12671
12672 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
12673
12674         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
12675         * src/port.h: typo
12676         * src/pic/main.c (_asmCmd): gpasm supports -o
12677         * src/z80/main.c: more general macros
12678         * device/lib/Makefile.in: remove intermediate files
12679
12680 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
12681
12682         * .version: Bumped version number to 2.3.3
12683         * src/SDCCBBlock.c: new option -o
12684         * src/SDCCglobl.h: new option -o
12685         * src/SDCCglue.c: new option -o
12686         * src/SDCCmain.c: new option -o
12687         * src/asm.c: new option -o
12688         * src/ds390/main.c: new option -o
12689         * src/pic/glue.c: new option -o
12690         * src/pic/pcode.c: new option -o
12691         * src/pic/ralloc.c: new option -o
12692         * src/pic16/glue.c: new option -o
12693         * src/pic16/pcode.c: new option -o
12694         * src/pic16/ralloc.c: new option -o
12695         * src/z80/main.c: new option -o
12696         * device/lib/Makefile.in: use -o
12697         * support/regression/ports/ds390/spec.mk: use -o
12698         * support/regression/ports/gbz80/spec.mk: use -o
12699         * support/regression/ports/mcs51/spec.mk: use -o
12700         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
12701         * support/regression/ports/z80/spec.mk: use -o
12702         * support/regression/ports/ucz80/spec.mk: use -o
12703         * support/regression/ports/xa51/spec.mk: use -o
12704         * support/regression/fwk/lib/timeout.c: fix usage string
12705
12706 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
12707         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
12708
12709 2003-01-07    <johan AT balder>
12710
12711         * src/SDCCast.c (decorateType): fixed bug #600035
12712
12713 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
12714         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
12715         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
12716         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
12717         * src/pic/pcode.c: outcommented unused variable to remove warnings
12718         * src/pic/ralloc.c: outcommented unused variable to remove warnings
12719
12720 2003-01-06    <karl AT turbobit.com>
12721         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
12722    regression tests.
12723
12724 2003-01-06    <johan AT balder>
12725
12726         * src/SDCCicode.c: fixed array add
12727
12728 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
12729         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
12730         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
12731
12732 2003-01-04    <johan AT balder>
12733
12734         * src/SDCCval.c (getNelements): fixed the initialized array of structures
12735
12736 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12737         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
12738
12739 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
12740         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
12741         * support/regression/tests/bug-524697.c: fit mem usage into 8032
12742
12743 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
12744         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
12745
12746 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
12747         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
12748
12749 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
12750         * src/mcs51/main.c: removed {bindir}{sep} from aslink
12751
12752 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12753
12754     * in /sdcc/as/mcs51/ changed these files in order to create an
12755     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
12756     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
12757     following files to include the previous two files: aslink.dsp,
12758     Makefile.aslink, Makefile.bcc, and Makefile.in.
12759
12760     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
12761     .adb instead of .cdb
12762
12763 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12764
12765         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
12766         value from option --iram-size.
12767
12768 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12769
12770         * /sdcc/as/mcs51/lklist.c: added boundary check before using
12771         dram[] array.
12772
12773 2002-09-18    <wiml AT hhhh.org>
12774
12775         * SDCClrange.h: exposed setFromRange() and setToRange()
12776         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
12777           packRegsForAccUse() (bug 542397)
12778         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
12779           multiple times and emitting the fetch operations more than once
12780           added aopGetUsesAcc() function to allow binary operators to
12781           fetch their operands in the correct order; made genMinus() emit
12782           compact code for X = LITERAL - Y
12783
12784 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12785         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
12786         sprintf() in line 1267.
12787
12788 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12789         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
12790         like ports.
12791
12792 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
12793         Changes to aslink (All the changes are marked with 'JCF'):
12794
12795         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
12796         summary().
12797
12798         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
12799         area BSEG.  Also moves, if possible, the DATA area down into the internal
12800         ram so more space is available.
12801
12802         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
12803         sflag.
12804
12805         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
12806         not bytes.  Function summary() which creates a memory usage summary
12807         file with extension .mem.  Reports of overlaping stack and small stack
12808         size.  If the space for the stack is less than 16 bytes aslink trows a
12809         warning.
12810
12811         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
12812         the 8051.  Option 'y' for memory summary output file.
12813
12814         Changes to sdcc (All the changes are marked with 'JCF'):
12815
12816         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
12817
12818         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
12819         overlaying area for it (uses RegBankUsed[4]).
12820
12821         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
12822         bank zero as used by default.  By default aslink locates the stack
12823         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
12824         the creation of the .mem file.  Delegates the allocation of data area
12825         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
12826         the begining of the stack area to aslink.
12827
12828         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
12829         glue() in SDCCglue.c creates an area for it.
12830
12831 2002-09-03  Borut Razem <borut.razem AT siol.net>
12832         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
12833         sdcc/src/pic/glue.c:
12834         introduced atexit() handler for teporay files removal in case of
12835         errors, assertions, ...
12836
12837 2002-08-29  Borut Razem <borut.razem AT siol.net>
12838         * sdcc/support/cpp2/auto-host_vc_in.h:
12839         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
12840         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
12841         Maybe there is a similar problem with BORLANDC? It should be checked!
12842
12843         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
12844         corrected improper use of assert: the assignment to clr variable was done inside the assert.
12845         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
12846         was not executed, and the compiler (cl) launched a warning:
12847         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
12848
12849 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
12850         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
12851
12852 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
12853         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
12854
12855         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
12856           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
12857           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
12858           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
12859           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
12860           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
12861           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
12862         - added Release configuration in VS projects
12863         - review of compiler an linker options
12864         - VC .exe files are generated in bin_vc directory, not to interfere
12865           with binaries generated from other projects (cygwin, mingw, bcc ...)
12866
12867         * sdcc/src/yacc.dsp: added
12868
12869         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
12870         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
12871         and insert the version number definitions from .version
12872
12873         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
12874
12875         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
12876         added - genarate auto-host.h using auto-host_vc_in.h as template
12877
12878         * sdcc/sdcc_vc.h,
12879         removed from CVS, generated automatically
12880
12881 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
12882         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
12883
12884 2002-08-11  Borut Razem <borut.razem AT siol.net>
12885         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
12886
12887 2002-08-10  Borut Razem <borut.razem AT siol.net>
12888         * src/SDCCmain.c (main):
12889         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
12890         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
12891         The consequence was that some temporary files were not removed.
12892
12893         * src/SDCCglue.c:
12894         unification of code in functions tempfilename() and tempfile():
12895         function tempnam() is defined in Visual Studio 6.0 and .NET
12896
12897         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
12898
12899         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
12900           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
12901         - removed compiler command line option /WX: Treats all warnings as errors
12902         - update a list of source files, included into the project
12903
12904         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
12905           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
12906         changed project type to Generic Project so that can be correcly converted to VS.NET project
12907
12908         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
12909
12910         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
12911
12912         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
12913
12914         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
12915         added return 0 statements after assert() to make compiler happy
12916
12917         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
12918         added newline in the def file to keep MSC compiler satisfied
12919
12920         * sdcc/src/z80/gen.c:
12921         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
12922           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
12923         - solved MSC error in function aopDump()
12924
12925         * sdcc_vc.h: define PREFIX as "\\sdcc"
12926
12927 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
12928         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
12929
12930 2002-06-22  Scott Dattalo <scott AT dattalo.com>
12931         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
12932         - Rewrote the register banking algorithm.
12933         - Added pCode live-range analysis to registers (for now, only non-used and
12934         singly-used registers optimized away)
12935
12936         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
12937
12938         * 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.
12939
12940 2002-05-10  Scott Dattalo <scott AT dattalo.com>
12941         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
12942
12943 2002-04-22  Michael Hope  <michaelh AT vroom>
12944
12945         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
12946
12947         * configure.in (DD_COPT): Added include support required for gbdk.
12948
12949         * .version: Bumped version number just to increase it.
12950
12951         * src/SDCCmain.c: Added -nostdinc to the default options.
12952
12953 2002-04-15  Michael Hope  <michaelh AT vroom>
12954
12955         * device/lib/z80/printf.c (sprintf): Added.
12956
12957         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
12958
12959         * src/z80/peeph.def: Added transpose redundent load rule.
12960
12961         * src/z80/main.c: Added force callee saves for jaune.
12962
12963         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
12964
12965         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
12966
12967 2002-03-28  Johan Knol  <johan AT balder>
12968
12969         * src/SDCCval.c: fixed bug #532436
12970
12971 2002-03-14  Scott Dattalo <scott AT dattalo.com>
12972         * /src/port.h:
12973         Added "char *Processor" field to the port structure.
12974
12975         * /src/SDCCmain.c:
12976         Added -p option. Allows port dependent processor to be specified.
12977
12978         * all ports:
12979         Initialized the new field char *Processor field to NULL in all ports
12980
12981         * /src/pic/*:
12982         Compiler generated registers for interrupt context saving
12983         were not getting allocated.
12984
12985 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
12986
12987         * /src/SDCCast.c:
12988         Fixed left shift. Will promote the left side of a left shift
12989         if a) left shifting more than size of operand or b) when assigned
12990         to something size > size of left side
12991
12992 2002-03-14  Scott Dattalo <scott AT dattalo.com>
12993         * src/pic/*
12994         tons of changes. Register allocation has been
12995         rewritten. Added customization for the various PICs. Flow
12996         analysis is restructured. ...
12997
12998         * src/pic/device.h:
12999         Added
13000
13001         * src/pic/device.c:
13002         Added. device.c is a PIC port hack to accomodate variations
13003         in PIC devices.
13004
13005 2002-03-13  Michael Hope  <michaelh AT vroom>
13006
13007         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
13008
13009 2002-03-04  johanknol  <johanknol AT manik>
13010
13011         * /src/SDCCval.c: fixed
13012
13013         const unsigned char arr[][2] = { { 0, 1 } };
13014         t18.c:1: error: Initializer element is not constant
13015
13016 2002-03-04  bela  <bela AT manik>
13017
13018         * /device/include/mcs51reg.h:
13019         ds89c420 register definition update
13020
13021 2002-03-03    <johan AT FRIJA>
13022
13023         * support/Util/SDCCerr.c: did something, but don't no why anymore
13024
13025         * support/regression/tests/bug-524691.c: made it a little less shy
13026
13027         * src/SDCCast.c (decorateType): fixed bug #524697
13028
13029         * src/SDCCast.c: made some lineno improvements
13030
13031         * src/SDCCval.c (getNelements): changed warning to error
13032
13033         * src/SDCCglue.c (printIvalArray): changed warning to error
13034
13035         * src/SDCCicode.c: fixed a warning for mingw
13036
13037         * src/SDCCast.c (decorateType): fixed the << promotion for ops
13038
13039         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
13040
13041 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
13042
13043         * src/ds390/peeph.def:
13044         Added some more peephole rules
13045
13046         * src/ds390/gen.c: Various fixes & enhancements
13047
13048         * src/SDCClrange.c, src/SDCClrange.h:
13049         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
13050
13051         * src/ds390/ralloc.c:
13052         various fixes & enhancements (ds390) specific
13053
13054         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
13055         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
13056         from rallocs.
13057
13058         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
13059
13060 2002-03-02    <johan AT FRIJA>
13061
13062         * src/SDCCast.c (decorateType): fixed bug #524708
13063
13064         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
13065
13066         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
13067
13068 2002-03-01  Michael Hope  <michaelh AT vroom>
13069
13070         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
13071
13072         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
13073
13074 2002-03-01    <johan AT FRIJA>
13075
13076         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
13077
13078         * src/SDCCast.c (decorateType): fixed bug #524209
13079
13080         * src/SDCCval.c (valNot): fixed bug #524195
13081
13082 2002-02-26    <johan AT balder>
13083
13084         * src/xa51/gen.c: fixed a warning
13085
13086         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
13087
13088         * src/SDCCast.c (decorateType): fixed bug #522534
13089
13090 2002-02-23    <johan AT balder>
13091
13092         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
13093
13094 2002-02-22    <johan AT balder>
13095
13096         * src/SDCCast.c: fixed bug #514865
13097
13098         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
13099
13100 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
13101
13102         * sdcc/src/SDCCloop.c:
13103         Previous fix was not good. basic blocks that have "break" or "return" are
13104         not really partof a loop , but live ranges used in these blocks should
13105         be live thru the entire loop, so set partOfLoop but don't add them to
13106         loop region
13107
13108 2002-02-21    <johan AT FRIJA>
13109
13110         * src/SDCCcse.c: fixed bug #514308
13111
13112 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
13113
13114         * src/SDCCloop.c:
13115         Fixed BUG #519583. If a conditional block ended in a return/break
13116         statement inside a loop, it was not being considered part of the loop.
13117
13118         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
13119
13120 2002-02-10  Karl Bongers <karl AT turbobit.com>
13121
13122         * debugger/*:
13123         Fixed up SDCDB debugger somewhat.  Updated debugger/README
13124         with lots of comments and notes.
13125
13126         * device/examples/test2.c:
13127         Fix bug, "red" variable not being initialized(compiler complained).
13128
13129         * device/examples/Makefile, examples/test3.c:
13130         Add Makefile in device/examples folder, compiles test3.c
13131         for use as a multiple module SDCDB test case.
13132
13133         * sim/ucsim/cmd.src/cmdset.cc:
13134         Took out debug printfs in ucsim "next" command.
13135
13136         * sim/ucsim/xa.src:
13137         Karl and Johan start ucsim XA support.  Most dissassembly working,
13138         about 75% emulation done(plenty of work remaining).
13139
13140         * sim/ucsim/z80.src:
13141         Add Z80 support to ucsim, add test-ucz80 regression test,
13142         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
13143         Notice z80 compiler fails on examples/test3.c/crc code.
13144
13145 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
13146
13147         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
13148         Added support for --parms-in-bank1
13149
13150         * src/ds390/peeph.def:
13151         added a few more peephole optimzations
13152
13153         * src/ds390/main.c:
13154         1) added __builtin_inp & __builtin_outp used to read in data of given length
13155            from a memory mapped port
13156         2) added __builtin_memcmp
13157         3) added __builtin_swapw swap bytes of a short
13158
13159         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
13160         1) handle multiple send & receives from register bank1
13161         2) ralloc can now allocate DPTR1 to some liveRanges
13162
13163         * src/SDCCsymt.c, src/SDCCsymt.h:
13164         changes to handle multiple sends & receives
13165
13166         * src/SDCCptropt.h:
13167         added some pointer arithmetic optimization
13168
13169         * src/SDCCptropt.c:
13170         added some pointer arithmetic optimizations but not stable yet so not
13171         called from anywhere (will get this working shortly)
13172
13173         * src/SDCCopt.c: fixed for multiple sends & receives
13174
13175         * src/SDCCmain.c:
13176         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
13177         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
13178            set preprocessor defines (depending on options)
13179
13180         * src/SDCCicode.c, src/SDCCicode.h:
13181         changes made to handle multiple sends & receives
13182
13183         * src/SDCCglobl.h:
13184         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
13185
13186         * src/SDCCcse.c, src/SDCCcse.h:
13187         added function findbackward def (to be used in upcoming optimization)
13188
13189         * src/SDCCcflow.c, src/SDCCcflow.h:
13190         added function returnAtEnd - to determine if a basic block terminates with
13191         a RETURN iCode
13192
13193         * src/SDCCast.c, src/SDCCast.h:
13194         added option parms-in-bank1
13195
13196         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
13197         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
13198         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
13199         adjusted for --parms-in-bank1 option
13200
13201         * device/include/string.h:
13202         donot redefine "reentrant" keyword
13203
13204         * device/include/ds80c390.h: Added some more SFRs
13205
13206 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
13207
13208         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
13209
13210 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
13211
13212         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
13213
13214 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
13215
13216         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
13217
13218 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
13219
13220         * Added --xram-movc option
13221
13222 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
13223
13224         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
13225
13226 2002-01-11  Johan Knol
13227
13228         * Added math lib of Jesus Calvino-Fraga
13229
13230 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
13231
13232         * src/SDCCmain.c (processFile): fix processing of ../../src.c
13233         * support/regression/Makefile: new target test-mcs51-stack-auto
13234         * support/regression/ports/mcs51-stack-auto/spec.mk: added
13235
13236 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
13237
13238         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
13239
13240 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
13241
13242         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
13243
13244 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
13245
13246         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
13247
13248         * src/SDCCglue.h: add definition for printIvalChar()
13249
13250 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
13251
13252         * src/SDCCast.c: fix #498138 by Johan
13253
13254         * src/SDCCglue.c: fix #498138 by Johan
13255
13256 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
13257
13258         * support/regression/Makefile: fix clean
13259
13260         * support/regression/ports/ds390/support.c: fix transmission of last character
13261
13262 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
13263
13264         * /sdcc/src/ds390/gen.c:
13265         a) improved computing address of stack variable
13266         b) took out some #if 0 code
13267         c) improved parmBytes adjustment
13268         d) improved genPlusIncr & genMinusIncr
13269         e) genCmp could generate bad code (when left assigned to DPTR)
13270         f) Fixed bug in hasInc
13271
13272         * /sdcc/src/ds390/ralloc.c:
13273         a) packRegsForSupport could mess up live information (Fixed)
13274         b) packRegsDPTRuse could be incorrect for left & right shift
13275
13276         * /sdcc/src/mcs51/ralloc.c:
13277         packRegsForSupport could mess up the live information (Fixed)
13278
13279         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
13280
13281         * /sdcc/src/SDCCast.c:
13282         can reverse a loop even if function call is present as long
13283         as the loop control variable is local & is not passed as parameter
13284
13285 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
13286
13287         * /sdcc/ChangeLog: *** empty log message ***
13288
13289         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
13290         More builtin function additions for TININative
13291
13292         * /sdcc/src/ds390/ralloc.c:
13293         Had broken the regression testsuite
13294
13295         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
13296
13297         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
13298         Added funcattr hasStackParms will be set for reentrant functions when there
13299         are paramteres on the stack, this helps in minimizing frame pointer generation
13300         typeFromStr can handle function pointers now
13301
13302         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
13303         *** empty log message ***
13304
13305 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
13306
13307         * /src/ds390/gen.c, /src/ds390/main.c:
13308         More builtin function additions for TININative
13309
13310         * /src/ds390/ralloc.c:
13311         Had broken the regression testsuite
13312
13313         * /src/SDCCast.c: Fixed a bug in dumptree
13314
13315         * /src/SDCCsymt.c, /src/SDCCsymt.h:
13316         Added funcattr hasStackParms will be set for reentrant functions when there
13317         are paramteres on the stack, this helps in minimizing frame pointer generation
13318         typeFromStr can handle function pointers now
13319
13320         * /doc/builtins.txt, /doc/TININative.txt:
13321         *** empty log message ***
13322
13323
13324 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
13325
13326         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
13327         ALPHA version for -mTININative
13328
13329         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
13330         updated to reflect changes in the port structure
13331
13332         * /src/port.h:
13333         added function do_assemble (similar to do_link) if non-null this function
13334         will be called to do assembly (-mTININative) requires a multi command
13335         assembly
13336         added function genAssemblerEnd will be called to generate assembler Epilogue
13337
13338         * /src/SDCCsymt.c:
13339         added _JavaNative to debug info printing
13340
13341         * /src/SDCCmain.c: added option --tini-libid
13342         added port->do_assemble function (-mTININative) has a multi command assemble
13343
13344         * /src/SDCCglue.c: Disabled "constExpr" check
13345         added port->genAssemblerEnd function
13346
13347         * /src/SDCCglobl.h: Added option --tini-libid value
13348
13349         * /src/SDCCast.h:
13350         tookout optimizeCompare from the header (has no external references)
13351
13352         * /src/SDCCast.c: made one more function "static"
13353
13354 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
13355
13356         * src/z80/mappings.i: Added z80asm support.
13357
13358         * src/z80/main.c: Added z80asm support on --asm=z80asm
13359
13360         * src/z80/gen.c: Fixed asm portability issues.
13361
13362         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
13363
13364         * src/SDCCglue.c (printExterns): Added global/extern split.
13365
13366 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
13367
13368         * support/regression/Makefile: added test for mcs51 model large
13369
13370         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
13371
13372         * support/regression/ports/gbz80/spec.mk: added -mgbz80
13373
13374 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
13375
13376         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
13377
13378 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
13379
13380         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
13381
13382         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
13383
13384 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
13385
13386         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
13387
13388         * support/regression/tests/simplefloat.c: Port to mcs51.
13389
13390 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
13391         * support/regression/tests/bug-485362.c: Added.
13392
13393         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
13394
13395         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
13396
13397         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
13398
13399         * src/z80/gen.c (aopDump): Added a dump function.
13400
13401 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
13402         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
13403
13404         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
13405
13406         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
13407
13408         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
13409
13410         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
13411
13412         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
13413
13414         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
13415
13416         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
13417
13418         * support/regression/ports/ds390/support.c: Use tinibios.
13419
13420         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
13421
13422 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
13423
13424         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
13425         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
13426
13427         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
13428
13429         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
13430
13431 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
13432
13433         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
13434
13435         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
13436         (packRegsForIYUse): Created and optimised.
13437
13438 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
13439
13440         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
13441 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
13442
13443         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
13444
13445         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
13446
13447         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
13448
13449 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
13450
13451         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
13452
13453         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
13454
13455 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
13456
13457         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
13458
13459         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
13460
13461         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
13462
13463 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
13464
13465         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
13466         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
13467         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
13468
13469         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
13470
13471         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
13472         (genNotFloat): Added.
13473         (genUminusFloat): Added.
13474
13475         * device/lib/z80/Makefile: Added floating pt stubs.
13476
13477         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
13478
13479         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
13480
13481         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
13482
13483 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
13484
13485         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
13486
13487         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
13488
13489         * sdcc/support/regression/Makefile: Add port ds390.
13490
13491         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
13492
13493         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
13494
13495         * sdcc/support/regression/ports/ds390/spec.mk: Added.
13496
13497         * sdcc/support/regression/ports/ds390/support.c: Added.
13498
13499         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
13500
13501         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
13502
13503         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
13504
13505 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
13506
13507         * device/include/malloc.h: Added z80 and gbz80 support.
13508
13509         * device/lib/gbz80/heap.s: Added.
13510
13511         * device/lib/z80/heap.s: Added.
13512
13513         * device/lib/malloc.c: Added z80 and gbz80 support.
13514
13515         * support/regression/tests/malloc.c (testMalloc): Added.
13516
13517         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
13518
13519         * support/regression/tests/bug-478094.c: Added.
13520
13521         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
13522
13523 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
13524
13525         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
13526
13527         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
13528
13529         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
13530
13531         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
13532
13533         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
13534
13535 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
13536
13537         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
13538
13539 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
13540
13541         * support/regression/tests/bug-477927.c: Added.
13542
13543         * src/z80/peeph.def: Added minor rules.
13544
13545         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
13546
13547         * src/z80/peeph.def: Added jump optimisation modification.
13548
13549 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
13550
13551         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
13552
13553 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
13554
13555         * support/regression/tests/funptrs.c: Added.
13556
13557 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
13558
13559         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
13560
13561 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
13562
13563         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
13564
13565         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
13566
13567         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
13568         (movLeft2ResultLong): Created.
13569
13570         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
13571         (joinPushes): Added.  Joins two char pushes into a word push.
13572
13573 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
13574
13575         * support/cpp2/Makefile.in (install): Added creation of dest dir.
13576
13577         * support/makebin/Makefile (install): Added creation of dest dir.
13578
13579 2001-10-24 Karl Bongers <karl AT turbobit.com>
13580
13581         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
13582
13583 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
13584
13585         * src/z80/ralloc.c: Turned off faulty pack for one use.
13586
13587         * src/z80/peeph-gbz80.def: Removed redundent restart options.
13588
13589         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
13590
13591 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
13592
13593         * support/regression/Makefile: Improved clean
13594
13595         * support/regression/ports/gbz80/spec.mk: Added clean
13596
13597         * support/regression/ports/host/spec.mk: Added clean
13598
13599         * support/regression/ports/z80/spec.mk: Added clean
13600
13601         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
13602
13603         * support/regression/ports/mcs51/timeout.c: little improvements
13604
13605 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
13606
13607         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
13608
13609         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
13610
13611         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
13612
13613 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
13614
13615         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
13616
13617         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
13618
13619 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
13620         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
13621
13622         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
13623
13624         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
13625
13626         * src/mcs51/main.c (_linkCmd): Added bin path to command.
13627
13628         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
13629
13630         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
13631
13632         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
13633
13634         * support/regression/tests/longor.c: Added.
13635
13636 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
13637
13638         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
13639
13640         * as/mcs51/aslink.h: define PATH_MAX
13641
13642         * as/mcs51/asm.h: define PATH_MAX
13643
13644         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
13645
13646         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
13647
13648         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
13649
13650         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
13651
13652         * src/SDCCglobl.h: define PATH_MAX
13653
13654         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
13655
13656         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
13657
13658 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
13659
13660         * src/z80/gen.c (gencjneshort): Fixed
13661
13662         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
13663
13664 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
13665
13666         * support/regression/tests/bug-469671.c: Added.
13667
13668         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
13669
13670 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
13671
13672         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
13673
13674         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
13675
13676 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
13677
13678         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
13679
13680         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
13681
13682         * src/device/lib/_mullong.c : removed hint: nooverlay bug
13683
13684         * src/device/lib/_divuint.c : removed hint: nooverlay bug
13685
13686         * src/device/lib/_divulong.c: removed hint: nooverlay bug
13687
13688         * src/device/lib/_moduint.c : removed hint: nooverlay bug
13689
13690         * src/device/lib/_modulong.c: removed hint: nooverlay bug
13691
13692 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
13693
13694         * 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.
13695
13696         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
13697
13698         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
13699
13700 2001-10-07    <johan AT FRIJA>
13701
13702         * device/lib/gets.c (gets): fixed the return value.
13703
13704 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
13705         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
13706
13707         * 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.
13708
13709         * 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.
13710
13711         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
13712
13713         * src/pic/gen.c: Removed Safe_strdup.
13714
13715         * configure.in: Added option to enable libgc support.
13716
13717         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
13718         (bitVectUnion): Optimised.
13719         (bitVectIntersect): Optimised.
13720         (bitVectBitsInCommon): Optimised.
13721         (bitVectCplAnd): Optimised.
13722
13723         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
13724
13725 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
13726
13727         * src/SDCCmain.c: distinguish between assembler debug and plain options
13728
13729         * src/avr/main.c:   remove standard assembler options
13730
13731         * src/ds390/main.c: remove standard assembler options
13732
13733         * src/mcs51/main.c: remove standard assembler options
13734
13735         * src/port.h: removed "PENDING" comment
13736
13737 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
13738
13739         * src/device/lib/_mulint.c  : new, with assember functions
13740
13741         * src/device/lib/_mullong.c : new, with assember functions
13742
13743         * src/device/lib/_divuint.c : with assember functions
13744
13745         * src/device/lib/_divsint.c : with assember functions
13746
13747         * src/device/lib/_divulong.c: with assember functions
13748
13749         * src/device/lib/_divslong.c: with assember functions
13750
13751         * src/device/lib/_moduint.c : with assember functions
13752
13753         * src/device/lib/_modsint.c : with assember functions
13754
13755         * src/device/lib/_modulong.c: with assember functions
13756
13757         * src/device/lib/_modslong.c: with assember functions
13758
13759         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
13760
13761         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
13762
13763         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
13764                                       replaced _mululong.c and _mulslong.c by _mullong.c
13765
13766 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
13767
13768         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
13769
13770 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
13771
13772         * src/SDCCglue.c: test, if win32api is available for MINGW
13773
13774 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
13775
13776         * src/SDCCsymt.c: no more _modifier in printTypeChain()
13777         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
13778         * support/regression/ports/gbz80/spec.mk: removed GENERIC
13779         * support/regression/ports/host/spec.mk: removed GENERIC
13780         * support/regression/ports/mcs51/spec.mk: removed GENERIC
13781         * support/regression/ports/z80/spec.mk: removed GENERIC
13782
13783 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
13784
13785         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
13786
13787         * support/regression/tests/bug-467035.c: Created.
13788
13789 2001-10-01    <johan AT FRIJA>
13790
13791         * src/SDCC.y: fixed bug #466586 part 1
13792
13793 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
13794
13795         * SDCCicode.c: z80 has no generic pointers
13796         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
13797
13798 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
13799
13800         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
13801
13802 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
13803
13804         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
13805
13806         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
13807
13808 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
13809
13810         * configure.in: Fixed up so that ucsim is only configured once.
13811
13812         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
13813
13814         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
13815         (getPathDifference): As above.
13816
13817         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
13818
13819         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
13820
13821 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
13822         * .version: Updated to 2.3.1
13823
13824         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
13825         Added copyright header.
13826
13827         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
13828         (assemble): Added support for macro based assembler commands.
13829         (linkEdit): Added support for macro based linker commands.
13830         (preProcess): Changed the pre-processor to use macros.
13831         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
13832         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
13833
13834         * device/lib/z80/crt0.s: Added module name for debugging.
13835
13836 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
13837
13838         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
13839
13840         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
13841
13842         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
13843
13844         * src/Makefile.in: Added SDCCmacro and SDCCutil
13845
13846 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
13847
13848         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
13849
13850 2001-09-16    <johan AT FRIJA>
13851
13852         * 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.
13853
13854 2001-09-15    <johan AT FRIJA>
13855
13856         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
13857         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
13858
13859 2001-09-11    <johan AT FRIJA>
13860
13861         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
13862
13863 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
13864
13865         * support/regression/tests/bug-460444.c: Added test case.
13866
13867         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
13868         (genCast): Added justification for all of the asserts.
13869
13870 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
13871
13872         * support/regression/support.c: _xdata replaced by xdata
13873
13874         * support/regression/spec.mk: removed _generic
13875
13876 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
13877
13878         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
13879
13880         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
13881         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
13882
13883         * src/z80/peeph.def: Added a rule to optimise shift then compare.
13884
13885         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
13886
13887         * support/regression/tests/bug-460010.c: Added test case.
13888
13889         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
13890
13891 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
13892
13893         * support/regression/Makefile: inter-port-clean adjusted for mcs51
13894
13895         * support/regression/testfwk.c: removed workaround for bug #436344
13896
13897         * support/regression/tests/bp.c: use less memory with mcs51
13898
13899         * support/regression/tests/bug-441448.c: use less memory
13900
13901         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
13902
13903         * support/regression/collate-results.py: typo
13904
13905 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
13906
13907         * support/regression/tests/fetchoverlap.c: Added new test case.
13908
13909         * support/regression/tests/bp.c: Added new test case.
13910
13911         * support/regression/tests/bug-448984.c: Added new test case.
13912
13913         * support/regression/tests/pow2shifts.c: Added new test case.
13914
13915         * src/z80/gen.c: Turned off the noise it normally generates for the release.
13916         (genlshTwo): Fixed right shift for count > 8.
13917
13918         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
13919
13920 2001-09-08    <johan AT FRIJA>
13921
13922         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
13923
13924 2001-09-07    <johan AT FRIJA>
13925
13926         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
13927
13928         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
13929
13930 2001-09-06    <johan AT FRIJA>
13931
13932         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
13933         * bernhard noted me at this: "() equals to (void)" (1.38)
13934
13935 2001-09-05    <johan AT FRIJA>
13936
13937         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
13938
13939 2001-09-04    <johan AT FRIJA>
13940
13941         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
13942
13943
13944 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
13945
13946         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
13947
13948 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
13949
13950         * link/z80/aslink.h: Fixed path for PATH_MAX
13951
13952 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
13953
13954         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
13955
13956         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
13957
13958         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
13959
13960         * 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.
13961
13962 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
13963
13964         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
13965         (genCmp): Fixed up genCmp for the GB with longs.
13966
13967         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
13968
13969         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
13970
13971         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
13972
13973         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
13974
13975 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
13976
13977         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
13978
13979 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
13980
13981         * 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.
13982
13983         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
13984
13985 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
13986
13987         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
13988
13989         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
13990
13991 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
13992
13993   * sim/ucsim/configure:    little improvement of Cygwin-detection
13994   * sim/ucsim/configure.in: little improvement of Cygwin-detection
13995   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
13996   * support/regression/tests/bug-221100.c: small changes for mcs51
13997   * support/regression/tests/bug-221168.c: small changes for mcs51
13998   * support/regression/tests/bug-227710.c: small changes for mcs51
13999   * support/regression/tests/staticinit.c: small changes for mcs51
14000   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
14001   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
14002   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
14003
14004 $Revision$