2e9d2ff53b37d56ed02ed414eee5619604fee4cc
[fw/sdcc] / ChangeLog
1 2006-11-21 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2
3         * src/regression/arrays.c,
4         * src/regression/bank1.c,
5         * src/regression/bool2.c,
6         * src/regression/compare7.c,
7         * src/regression/compare8.c,
8         * src/regression/compare9.c,
9         * src/regression/compare10.c,
10         * src/regression/configword.c,
11         * src/regression/for.c,
12         * src/regression/mult1.c,
13         * src/regression/pointer1.c,
14         * src/regression/rotate6.c,
15         * src/regression/string1.c,
16         * src/regression/struct1.c,
17         * src/regression/Makefile: make PIC14 regression tests run again
18           (3 fail, 6 won't compile)
19
20 2006-11-21 Raphael Neider <rneider AT web.de>
21
22         * device/include/pic16/pic18f4550.h,
23         * device/include/pic16/pic18f4455.h,
24         * device/lib/pic16/libdev/pic18f4550.c,
25         * device/lib/pic16/libdev/pic18f4455.c: fixed #1578591 and #1595144
26         * configure.in: removed superfluous closing bracket
27
28 2006-11-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
29
30         * device/lib/expf.c: Fixed bug 1599523: result of expf(x) is
31           always positive.
32
33 2006-11-21 Raphael Neider <rneider AT web.de>
34
35         * src/pic/device.{c,h}: added pic14_getPIC()
36         * src/pic/gen.c (continueIfTrue,jumpIfTrue): added PIC code,
37           (genAnd): added PIC code for one case, fixes #1597044
38         * src/pic/pcode.c (BankSelect): Ohoh, added generic optimization for
39           SFRs that are present in all banks (e.g., STATUS)
40
41 2006-11-20 Raphael Neider <rneider AT web.de>
42
43         * src/pic/pcode.c: changed inverted ops for DECFSZ/DECFSZW and
44           INCFSZ/INCFSZW and declared them as changing Z bit,
45           (insertPCodeInstruction): correctly invert the above instructions,
46           fixes #1599333,
47           (DoBankSelect): don't panic on po_immediates
48
49 2006-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
50
51         * as/link/aslink.h,
52         * as/link/mcs51/lkihx.c (newArea),
53         * as/link/mcs51/lkrloc.c: renamed newArea() to ihxNewArea()
54         * as/link/mcs51/lkihx.c (ihx): output reset vector as start address
55
56 2006-11-11 Raphael Neider <rneider AT web.de>
57
58         * src/pic/pcode.c (newpCodeOpBit): search SymbolTab for referenced
59           bitfield symbols, fixes #1579535 (once more...).
60
61 2006-11-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
62
63         * support/regression/generate-cases.py,
64         * support/regression/fwk/include/testfwk.h,
65         * support/regression/fwk/lib/testfwk.c: used code pointers,
66           (about 50kByte less code generated for mcs51)
67
68 2006-11-06 Borut Razem <borut.razem AT siol.net>
69
70         * debugger/mcs51/acinclude.m4, debugger/mcs51/aclocal.m4,
71           debugger/mcs51/configure: fixed failed check because the function
72           rl_function_of_keyseq isn't in Readline 5.2. Thanks to Ilya Goldberg
73           who submitted the patch for gpsim.
74         * debugger/mcs51/configure.in: removed the result message
75         * debugger/mcs51/Makefile.in: fixed the config.status warning
76           "... seems to ignore the --datarootdir setting"
77
78 2006-11-03 Maarten Brock <sourceforge.brock AT dse.nl>
79
80         * device/include/mcs51/c8051f020.h,
81         * device/include/mcs51/c8051f040.h,
82         * device/include/mcs51/c8051f060.h,
83         * device/include/mcs51/c8051f120.h: added PS0, fixed bug 1589279
84         * src/z80/gen.c (gencjneshort),
85         * src/z80/peeph.def: applied patch 1571373, thanks Philipp Krause
86
87 2006-10-31 Borut Razem <borut.razem AT siol.net>
88
89         * debugger/mcs51/acinclude.m4, debugger/mcs51/aclocal.m4,
90           debugger/mcs51/configure: get readline version
91
92 2006-10-30 Borut Razem <borut.razem AT siol.net>
93
94         * debugger/mcs51/sdcdb.c: replaced hardcoded "/" with DIR_SEPARATOR_STRING
95         * debugger/mcs51/acinclude.m4, debugger/mcs51/aclocal.m4,
96           debugger/mcs51/configure: locate readline even when cross compiling
97         * support/scripts/sdcc.nsi: include readline5.dll into the setup package
98
99 2006-10-29 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
100
101         * device/include/mcs51/serial_IO.h: putchar() and getchar() using
102           serial port.
103
104 2006-10-29 Maarten Brock <sourceforge.brock AT dse.nl>
105
106         * device/include/malloc.h,
107         * device/lib/calloc.c,
108         * device/lib/free.c,
109         * device/lib/malloc.c,
110         * device/lib/realloc.c: moved definition of struct into sources
111         * support/regression/tests/malloc.c: use void* for init_dynamic_memory()
112
113 2006-10-29 Maarten Brock <sourceforge.brock AT dse.nl>
114
115         * as/asx8051.dsp: corrected output directories
116         * as/link/hc08: new directory for hc08 linker
117         * as/hc08/aslink.h,             as/link/aslink.h,
118         * as/hc08/aslink.mak,           as/link/hc08/aslink.mak,
119         * as/hc08/clean.mk,             as/link/hc08/clean.mk,
120         * as/hc08/link_hc08.dsp,        as/link/hc08/link_hc08.dsp,
121         * as/hc08/lkaomf51.c,           as/link/hc08/lkaomf51.c,
122         * as/hc08/lkarea.c,             as/link/hc08/lkarea.c,
123         * as/hc08/lkdata.c,             as/link/hc08/lkdata.c,
124         * as/hc08/lkelf.c,              as/link/hc08/lkelf.c,
125         * as/hc08/lkihx.c,              as/link/hc08/lkihx.c,
126         * as/hc08/lklibr.c,             as/link/hc08/lklibr.c,
127         * as/hc08/lkmain.c,             as/link/hc08/lkmain.c,
128         * as/hc08/lkmem.c,              as/link/hc08/lkmem.c,
129         * as/hc08/lkrloc.c,             as/link/hc08/lkrloc.c,
130         * as/hc08/lks19.c,              as/link/hc08/lks19.c,
131         * as/hc08/Makefile.aslink,      as/link/hc08/Makefile.aslink,
132         * as/hc08/Makefile.bcc,         as/link/hc08/Makefile.bcc,
133         * as/hc08/Makefile.in,          as/link/hc08/Makefile.in,
134         * as/link/hc08/conf.mk,
135         * configure,
136         * configure.in,
137         * Makefile.in,
138         * sdcc.dsw: moved hc08 linker to as/link/hc08
139         * as/hc08/lkeval.c,     as/link/mcs51/lkeval.c,     as/link/lkeval.c,
140         * as/hc08/lkhead.c,     as/link/mcs51/lkhead.c,     as/link/lkhead.c,
141         * as/hc08/lklex.c,      as/link/mcs51/lklex.c,      as/link/lklex.c,
142         * as/hc08/lklist.c,     as/link/mcs51/lklist.c,     as/link/lklist.c,
143         * as/hc08/lknoice.c,    as/link/mcs51/lknoice.c,    as/link/lknoice.c,
144         * as/hc08/lksym.c,      as/link/mcs51/lksym.c,      as/link/lksym.c,
145         * as/link/mcs51/aslink.dsp,
146         * as/link/mcs51/Makefile.in: factored out the common files
147         * as/hc08/lkstore.c: deleted, use the one already in as/link/
148         * as/clean.mk: extra cleaning common files
149         * as/link/mcs51/strcmpi.c,      as/strcmpi.c: moved
150         * as/link/mcs51/strcmpi.h: deleted, moved protoype to aslink.h
151         * as/mcs51/asm.h: include sdccconf.h or sdcc_vc.h
152
153 2006-10-29 Raphael Neider <rneider AT web.de>
154
155         * src/pic/ralloc.c (newReg): create aliases for registers with
156           multiple names to fix #1579535 and #1584001,
157           (regWithIdx,dirregWithName): resolve aliases on lookup
158         * src/pic/pcode.c (DoBankSelect): die with error message on failing
159           bankselect
160         * device/lib/pic/libdev/Makefile.in: move pseudo stack down to 0x4f
161           to prevent build errors on small devices
162
163 2006-10-28 Raphael Neider <rneider AT web.de>
164
165         * src/pic/gen.c (genFunction,genCall): drop "same code page"
166           assumption within interrupt handlers, fixes #1584940
167         * src/pic/glue.c (pic14_constructAbsMap): mark absolute symbols as
168           "emitted" to avoid emitting them again in udata
169
170 2006-10-27 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
171
172         * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c:
173         Removed.
174
175 2006-10-26 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
176
177         * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c:
178         Initialize uart only if SM0 and SM1 are zero.  Also, use flag to turn
179         on/off CR to CRLF conversion.
180
181 2006-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
182
183         * doc/sdccman.lyx: updated IRQ section
184
185 2006-10-24 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
186
187         * device/lib/serial_io.c: removed
188         * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c
189         replacements for serial_io.c
190
191 2006-10-24 Maarten Brock <sourceforge.brock AT dse.nl>
192
193         * src/z80/main.c (_process_pragma, _parseOptions): fixed bug 1583318
194
195 2006-10-24 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
196
197         * device/lib/serial_io.c: Default putchar() and getchar() for
198           mcs51 uses serial port.
199
200 2006-10-23 Maarten Brock <sourceforge.brock AT dse.nl>
201
202         * src/mcs51/gen.c (movc): improved check for 0 and 1, see RFE 1582704
203
204 2006-10-23 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
205
206         * support/regression/ports/mcs51/support.c: smaller
207         _sdcc_external_startup()
208         * device/lib/mcs51/crtxclear.asm: don't check high byte of l_PSEG
209
210 2006-10-20 Maarten Brock <sourceforge.brock AT dse.nl>
211
212         * device/lib/gbz80/crt0.s,
213         * device/lib/gbz80/crt0_rle.s,
214         * device/lib/gbz80/div.s,
215         * device/lib/gbz80/fstubs.s,
216         * device/lib/gbz80/heap.s,
217         * device/lib/gbz80/mul.s,
218         * device/lib/gbz80/putchar.s,
219         * device/lib/gbz80/stubs.s,
220         * device/lib/z80/crt0.s,
221         * device/lib/z80/crt0_rle.s,
222         * device/lib/z80/div.s,
223         * device/lib/z80/fstubs.s,
224         * device/lib/z80/heap.s,
225         * device/lib/z80/mul.s,
226         * device/lib/z80/putchar.s,
227         * device/lib/z80/stubs.s: reverted, I was mistaken
228
229 2006-10-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
230
231         * src/mcs51/peeph.def: peephole 238.x added check for notvolatile
232         * support/regression/ports/mcs51/support.c: removed race
233         condition on TI in _putchar allowing to use serial port mode 0
234
235 2006-10-20 Borut Razem <borut.razem AT siol.net>
236
237         * debugger/mcs51/sdcdb.c: replaced isblank() with isspace()
238
239 2006-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
240
241         * device/lib/gbz80/crt0.s,
242         * device/lib/gbz80/crt0_rle.s,
243         * device/lib/gbz80/div.s,
244         * device/lib/gbz80/fstubs.s,
245         * device/lib/gbz80/heap.s,
246         * device/lib/gbz80/mul.s,
247         * device/lib/gbz80/putchar.s,
248         * device/lib/gbz80/stubs.s,
249         * device/lib/z80/crt0.s,
250         * device/lib/z80/crt0_rle.s,
251         * device/lib/z80/div.s,
252         * device/lib/z80/fstubs.s,
253         * device/lib/z80/heap.s,
254         * device/lib/z80/mul.s,
255         * device/lib/z80/putchar.s,
256         * device/lib/z80/stubs.s: removed all leading underscores from area names
257
258 2006-10-17 Maarten Brock <sourceforge.brock AT dse.nl>
259
260         * support/regression/ports/mcs51/support.c: use highest baudrate so the
261           regression tests are not waiting in the simulator for simulated
262           transmission of debug output
263
264 2006-10-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
265
266         * device/lib/printf_large.c: slightly smaller
267         * doc/sdccman.lyx: do not use spaces within html links
268
269 2006-10-16 Borut Razem <borut.razem AT siol.net>
270
271         * configure.in, configure, sdccconf_in.h, src/SDCCglobal,
272           debugger/mcs51/Makefile.in, debugger/mcs51/sdcdb.[ch],
273           debugger/mcs51/aclocal.m4, debugger/mcs51/acinclide.m4,
274           debugger/mcs51/config.h.in, debugger/mcs51/configure.in,
275           debugger/mcs51/configure:
276           [ 1185668 ] add gnu readline support to sdcdb - enabled
277
278 2006-10-16 Raphael Neider <rneider AT web.de>
279
280         * src/pic/pcode.c (BankSelect): another fix on (partial) BANKSELs,
281           fixes #1577882, removes close to all banking optimizations
282
283 2006-10-15 Maarten Brock <sourceforge.brock AT dse.nl>
284
285         * src/SDCCsymt.c (checkSClass): no error for uninitialised absolute
286           variables in code memory
287         * support/regression/tests/absolute.c: added test for this
288
289 2006-10-15 Raphael Neider <rneider AT web.de>
290
291         * src/pic/pcode.c (InsertBankSel): suppress BANKSELs for one bank
292           devices,
293           (BankSelect): emit BANKSEL before touching linker-placed regs,
294           fixes #1570934
295
296 2006-10-10 Raphael Neider <rneider AT web.de>
297
298         * src/SDCCmain.c (optionsTable): accept --stack-size for PICs,
299         * src/pic/device.c (pic14_getSharebankSize,pic14_getSharebankAddress),
300         * src/pic/main.c (_pic14_parseOptions),
301         * src/pic/main.h: mostly reverted to previous state, now use results
302             from SDCCmain.c's argument parsing
303
304 2006-10-10 Borut Razem <borut.razem AT siol.net>
305
306         * debugger/mcs51/break.[ch], debugger/mcs51/cmd.c,
307           debugger/mcs51/sdcdb.[ch], debugger/mcs51/simi.c:
308           [ 1185668 ] add gnu readline support to sdcdb -
309           prepared for READLINE, not enabled yet,
310           thanks to <tal.bav AT gmail.com>
311
312 2006-10-10 Raphael Neider <rneider AT web.de>
313
314         * src/pic16/pcode.c (pic16_pCode2str): use isACCESS_BANK macro
315         * src/pic16/devices.inc,
316         * device/include/pic16 (pic18f[24]620.h),
317         * device/include/pic18fregs.h,
318         * device/lib/pic16/pics.all,
319         * device/lib/pic16/libdev/pic18f[24]{620,525}.c): added support for
320             18f2620, 18f4620, 18f2525, and 18f4525 devices, thanks to
321             Gary Plumbridge and Anton Strobl
322
323 2006-10-10 Raphael Neider <rneider AT web.de>
324
325         * src/pic/main.c (_pic14_parseOptions): added --stack-loc=NUM and
326           --stack-siz=NUM options to configure the argument passing stack
327         * src/pic/main.h: added stackLocation and stackSize to pic14_options_t
328         * src/pic/device.c (mapRegister): catch out-of-memory SIGSEGVs,
329           (pic14_getSharebankSize): obey --stack-siz=NUM,
330           (pic14_getSharebankAddress): obey --stack-loc=NUM
331
332 2006-10-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
333
334         * doc/sdccman.lyx: added to the manual
335         * doc/figures/ddd_example.png: added (neither pdflatex nor
336         most browsers seem to like the .eps file)
337
338 2006-10-06 Bernhard Held <bernhard AT bernhardheld.de>
339
340         * src/SDCCglue.c (tempfileandname): changed un*x tmp search paths
341         to /tmp and /var/tmp acc. LSB
342         * src/SDCCast.c (addCast): Fixed bug 1571231: promote in case of
343         RESULT_TYPE_IFX
344         * support/regression/tests/onebyte.c: added test
345
346 2006-10-05 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
347
348         * src/mcs51/gen.c: emitcode for "add a,0x%02x" requires only 8 bits.
349
350 2006-10-05 Borut Razem <borut.razem AT siol.net>
351
352         * partially fixed [ 1570701 ] peephole - not replacing code from multiline macros,
353           thanks to dfulab:
354           - sdcc.dsw: changed property eol-style to CRLF
355           - support/scripts/resource.rc: replaced references to "afxres.h" with "winres.h"
356
357 2006-10-04 Raphael Neider <rneider AT web.de>
358
359         * device/include/pic/{pic16f84.h,pic16f84a.h},
360         * device/lib/pic/libdev/{pic16f84.c,pic16f84a.c}: added PORT[AB]_bits
361           from patch #1522504, thanks to Robas Teodor
362
363 2006-10-02 Maarten Brock <sourceforge.brock AT dse.nl>
364
365         * as/link/z80/lkarea.c: essentially reverted lnksect() to #4380 which
366           fixes bug 1566015
367
368 2006-10-01 Maarten Brock <sourceforge.brock AT dse.nl>
369
370         * src/pic16/glue.c (pic16emitMaps),
371         * src/pic/glue.c (pic14emitMaps): hopefully fixed bug 1568779
372         * device/lib/gets.c: fixed bug 1568829,thanks Philipp Krause
373         * device/lib/pic16/libc/string/memcpypgm2ram.c,
374         * device/lib/pic16/libc/string/memcpyram2ram.c: fixed bug 1568836, thanks
375           Philipp Krause
376         * as/mcs51/asmain.c (asmbl, newdot): fixed problems with absolute areas
377         * as/link/mcs51/lkmem.c (summary2): reverted, do do count abs segments
378
379 2006-09-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
380
381         * support/librarian/sdcclib.c: Added option -l.
382         * as/link/mcs51/lkmem.c: don't use absolute segments to compute memory
383           usage totals.
384         * device/lib/make51lib.bat: added.  Allows building mcs51 libraries easily
385           using Windows command prompt.
386
387 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
388
389         * device/lib/libsdcc.lib: added module rand
390         * src/ds390/ralloc.c (rematStr),
391         * src/hc08/ralloc.c (rematStr),
392         * src/mcs51/ralloc.c (rematStr),
393         * src/z80/ralloc.c (rematStr): made output more consistent
394         * src/mcs51/gen.c: cosmetic changes
395
396 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
397
398         * src/port.h: added mem.cabs_name to PORT
399         * src/ds390/main.c,
400         * src/hc08/main.c,
401         * src/mcs51/main.c,
402         * src/pic16/main.c,
403         * src/pic/main.c,
404         * src/xa51/main.c,
405         * src/z80/main.c: added cabs_name initializers
406         * src/SDCCglue.c (emitStaticSeg): allocate and initialize absolute
407           constants
408           (emitMaps): emit absolutes in code memory into cabs_name
409         * src/SDCCmem.c,
410         * src/SDCCmem.h: added memory map c_abs and defined CABS_NAME
411         * src/ds390/gen.c (genCodePointerGet): fixed bug if left is a literal
412         * support/regression/fwk/include/testfwk.h: added define for at
413         * support/regression/tests/absolute.c: added, new
414
415 2006-09-29 Maarten Brock <sourceforge.brock AT dse.nl>
416
417         * src/mcs51/gen.c (genPlusIncr, genMinusDec, genAddrOf): small
418           optimizations, see also patch 887161 by Stas Sergeev
419         * src/mcs51/peeph.def(104, 207, 209, 212): disabled as they do not seem
420           to be necessary anymore,
421           (102, 103, 104, 127): renamed all occurances of bp to _bp
422
423 2006-09-27 Maarten Brock <sourceforge.brock AT dse.nl>
424
425         * device/include/mcs51/at89c51snd1c.h: fixed MSK_SREQ definition
426           thanks Weston T. Schmidt for patch 1555221
427         * src/mcs51/peeph.def: renamed rule 257 to 257.a, added 257.b
428         * src/SDCCicode.c(geniCodeMultiply): small optimization
429
430 2006-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
431
432         * device/include/stdlib.h: added rand prototypes
433         * device/lib/rand.c: new, added
434         * device/lib/Makefile.in: added rand.c
435         * src/z80/peeph.def,
436         * src/z80/peeph-gbz80.def,
437         * src/z80/peeph-z80.def: updated conditonals, fixed bug 1565908
438
439 2006-09-20 Raphael Neider <rneider AT web.de>
440
441         * device/lib/pic16/libio/i2c/i2cnack.c (i2c_nack): fixed ACKDT bit
442
443 2006-09-19 Maarten Brock <sourceforge.brock AT dse.nl>
444
445         * as/link/aslink.h: cosmetic changes
446         * as/link/mcs51/Makefile.in,
447         * as/link/z80/Makefile.in: fixed build on CF where VPATH is used
448
449 2006-09-17 Maarten Brock <sourceforge.brock AT dse.nl>
450
451         * as/link/aslink.h,
452         * as/link/mcs51/aslink.h,
453         * as/link/z80/aslink.h: merged and moved to as/link/
454         * as/link/lkstore.c,
455         * as/link/mcs51/lkstore.c: moved to as/link/
456         * as/link/clean.mk: remove *.o
457         * as/link/mcs51/alloc.h: deleted
458         * as/link/mcs51/lkarea.c: added lnksect prototype
459         * as/link/mcs51/lkdata.c,
460         * as/link/mcs51/lklex.c,
461         * as/link/mcs51/lkmain.c: renamed as_getline to lk_getline
462         * as/link/mcs51/lkmem.c,
463         * as/link/mcs51/lknoice.c: removed include strcmpi.h
464         * as/link/mcs51/lksym.c: include stdlib.h instead of malloc.h or alloc.h
465         * as/link/mcs51/aslink.dsp,
466         * as/link/mcs51/Makefile.aslink,
467         * as/link/mcs51/Makefile.bcc,
468         * as/link/mcs51/Makefile.in: updated for moved files
469         * as/link/z80/lkarea.c,
470         * as/link/z80/lkhead.c,
471         * as/link/z80/lklex.c,
472         * as/link/z80/lklibr.c,
473         * as/link/z80/lklist.c,
474         * as/link/z80/lkmain.c,
475         * as/link/z80/lkrloc.c,
476         * as/link/z80/lksym.c: synced with mcs51
477         * as/link/z80/lkdata.c,
478         * as/link/z80/lkeval.c,
479         * as/link/z80/lkihx.c,
480         * as/link/z80/lks19.c: cosmetic changes
481         * as/link/z80/Makefile.in,
482         * as/link/z80/linkgbz80.dsp,
483         * as/link/z80/linkz80.dsp: updated for moved files
484
485 2006-09-16 Borut Razem <borut.razem AT siol.net>
486
487         * debugger/mcs51/sdcdb.c: partially fixed
488           [ 1203664 ] sdcdb fails to open files w. two "." periods
489         * debugger/mcs51/simi.c, debugger/mcs51/symtab.c,
490           debugger/mcs51/symtab.h: fixed indenting
491         * configure.in, configure: up to date with latest Maarten's changes
492
493 2006-09-15 Maarten Brock <sourceforge.brock AT dse.nl>
494
495         as/link/mcs51
496         as/aslink.dsp,                  as/link/mcs51/aslink.dsp,
497         as/link/mcs51/aslink.h,         as/mcs51/aslink.h,
498         as/link/mcs51/aslink.mak,       as/mcs51/aslink.mak,
499         as/link/mcs51/lkaomf51.c,       as/mcs51/lkaomf51.c,
500         as/link/mcs51/lkarea.c,         as/mcs51/lkarea.c,
501         as/link/mcs51/lkdata.c,         as/mcs51/lkdata.c,
502         as/link/mcs51/lkeval.c,         as/mcs51/lkeval.c,
503         as/link/mcs51/lkhead.c,         as/mcs51/lkhead.c,
504         as/link/mcs51/lkihx.c,          as/mcs51/lkihx.c,
505         as/link/mcs51/lklex.c,          as/mcs51/lklex.c,
506         as/link/mcs51/lklibr.c,         as/mcs51/lklibr.c,
507         as/link/mcs51/lklist.c,         as/mcs51/lklist.c,
508         as/link/mcs51/lkmain.c,         as/mcs51/lkmain.c,
509         as/link/mcs51/lkmem.c,          as/mcs51/lkmem.c,
510         as/link/mcs51/lknoice.c,        as/mcs51/lknoice.c,
511         as/link/mcs51/lkrloc.c,         as/mcs51/lkrloc.c,
512         as/link/mcs51/lks19.c,          as/mcs51/lks19.c,
513         as/link/mcs51/lkstore.c,        as/mcs51/lkstore.c,
514         as/link/mcs51/lksym.c,          as/mcs51/lksym.c,
515         as/link/mcs51/Makefile.aslink,  as/mcs51/Makefile.aslink,
516         as/link/mcs51/alloc.h,
517         as/link/mcs51/clean.mk,
518         as/link/mcs51/conf.mk,
519         as/link/mcs51/Makefile.bcc,
520         as/link/mcs51/Makefile.in,
521         as/link/mcs51/readme.390,
522         as/link/mcs51/strcmpi.c,
523         as/link/mcs51/strcmpi.h,
524         as/mcs51/clean.mk,
525         as/mcs51/Makefile.bcc,
526         as/mcs51/Makefile.in,
527         configure,
528         Makefile.in,
529         sdcc.dsw: moved mcs51 linker to as/link/mcs51
530
531 2006-09-14 Maarten Brock <sourceforge.brock AT dse.nl>
532
533         * as/link,
534         * as/link/Makefile.in,
535         * as/link/z80/linkgbz80.dsp,
536         * as/link/z80/linkz80.dsp,
537         * configure,
538         * link,
539         * link/clean.mk,
540         * link/Makefile.in,
541         * link/README,
542         * link/z80,
543         * link/z80/aslink.h,
544         * link/z80/clean.mk,
545         * link/z80/conf.mk,
546         * link/z80/linkgbz80.dsp,
547         * link/z80/linkz80.dsp,
548         * link/z80/lkarea.c,
549         * link/z80/lkdata.c,
550         * link/z80/lkeval.c,
551         * link/z80/lkgb.c,
552         * link/z80/lkgg.c,
553         * link/z80/lkhead.c,
554         * link/z80/lkihx.c,
555         * link/z80/lklex.c,
556         * link/z80/lklibr.c,
557         * link/z80/lklist.c,
558         * link/z80/lkmain.c,
559         * link/z80/lkrloc.c,
560         * link/z80/lks19.c,
561         * link/z80/lksym.c,
562         * link/z80/Makefile.in,
563         * Makefile.in,
564         * sdcc.dsw: moved link/ to as/link/
565
566 2006-09-11 Maarten Brock <sourceforge.brock AT dse.nl>
567
568         * as/mcs51/i51mch.c (machine): fixed warning
569
570 2006-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
571
572         * as/mcs51/i51mch.c (machine): S_DJNZ fixed bug 1554318
573
574 2006-09-09 Borut Razem <borut.razem AT siol.net>
575
576         * debugger/mcs51/sdcdb.c, debugger/mcs51/simi.c:
577           sdcdb WIN32 native port
578         * src/clean.mk: fixed
579
580 2006-09-08 Borut Razem <borut.razem AT siol.net>
581
582         * doc/sdccman.lyx: SDCDB and ucSim are available on Win32 platforms.
583
584 2006-09-08 Raphael Neider <rneider AT web.de>
585
586         * src/pic16/main.c (_pic16_linkEdit,pic16_linkCmd),
587         * src/pic/main.c(_pic14_do_link, linkCmd): pass "-w" and "-r"
588             to gplink to disable processor mismatch warning and to allow
589             the use of devices with only aliased (shared) memory banks,
590           (_pic16_genAssemblerPreamble): include pXXX.inc on --mplab-comp
591
592 2006-09-07 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
593
594         * doc/sdccman.lyx: Some re-formating plus example on using
595           #pragma preproc_asm +/-
596
597 2006-09-07 Borut Razem <borut.razem AT siol.net>
598
599         * support/scripts/sdcc.nsi: added SDCDB executables in a separate
600           section
601
602 2006-09-06 Borut Razem <borut.razem AT siol.net>
603
604         * support/scripts/sdcc.nsi: fixed Error: unterminated string parsing
605           line at sdcc.nsi:153
606         * sdcc/debugger/mcs51/simi.c: argsToCmdLine() fixes
607
608 2006-09-05 Borut Razem <borut.razem AT siol.net>
609
610         * configure.in, configure: support for winsock2
611         * debugger/mcs51/break.h, debugger/mcs51/cmd.c,
612           debugger/mcs51/cmd.h, debugger/mcs51/sdcdb.c,
613           debugger/mcs51/sdcdb.h, debugger/mcs51/simi.c,
614           debugger/mcs51/simi.h, debugger/mcs51/symtab.c,
615           debugger/mcs51/symtab.h: sdcdb WIN32 native port
616
617 2006-09-05 Maarten Brock <sourceforge.brock AT dse.nl>
618
619         * src/SDCCopt.c (cnvToFcall): fixed bug 1551947 by updating OP_USES
620           and OP_DEFS
621         * support/regression/tests/bug1551947.c: new, added
622         * src/SDCCsymt.h: strings are char* not byte*
623
624 2006-09-05 Raphael Neider <rneider AT web.de>
625
626         * device/lib/pic16/libdev/pic18f4550.c,
627           device/include/pic16/pic18f4550.h: added PORTD/TRISD
628             declarations/definitions from patch #1520949
629
630 2006-09-05 Raphael Neider <rneider AT web.de>
631
632         * src/pic16/gen.c (genPackBits): fix assignment to 8-bit,
633           byte-aligned bitfields, fixes #1539278
634
635 2006-09-05 Raphael Neider <rneider AT web.de>
636
637         * src/pic/gen.c (genReceive): skip unreferenced arguments,
638           fixes #1544120
639
640 2006-09-04 Borut Razem <borut.razem AT siol.net>
641
642         * support/scripts/sdcc.nsi: move ucSim executables to a separate section
643         * support/scripts/sdcc_cygwin_mingw32: don't disable ucsim,
644           -mno-cygwin is a part of the compiler name
645         * support/scripts/sdcc_mingw32: don't disable ucsim
646
647 2006-09-03 Borut Razem <borut.razem AT siol.net>
648
649         * sdcc.spec: corrected for 2.6.0. Thanks to Christer Weinigel.
650         * device/lib/Makefile.in device/lib/clean.mk: small but essential corrections
651
652 2006-09-03 Raphael Neider <rneider AT web.de>
653
654         * src/pic/ralloc.c,
655         * src/pic/pcode.c (InitReuseRegs): allocate registers with pseudo
656           indices >= 0x1000 to disambiguate them from fixed regs __at(addr),
657           fixes #1550049
658
659 2006-09-01 Borut Razem <borut.razem AT siol.net>
660
661         * sim/ucsim/cmd.src/cmdutil.cc: #include <sys/time.h> and <unistd.h>
662           to make ppc-osx happy
663
664 2006-08-31 Borut Razem <borut.razem AT siol.net>
665
666         * sim/ucsim/cmd.src/newcmdposix.cc: #include <assert.h>
667         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
668         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
669         * support/regression/ports/ds390/spec.mk,
670           support/regression/ports/mcs51/spec.mk,
671           support/regression/ports/xa51/spec.mk: introduced DEV_NULL variable.
672           To run regression tests in mingw environment:
673           make DEV_NULL=NUL CC=gcc
674
675 2006-08-30 Borut Razem <borut.razem AT siol.net>
676
677         * sim/ucsim/cmd.src/newcmdposix.cc, sim/ucsim/cmd.src/newcmdposixcl.h,
678           sim/ucsim/cmd.src/newcmdwin32.cc, sim/ucsim/cmd.src/newcmdwin32cl.h,
679           sim/ucsim/app.cc, sim/ucsim/appcl.h, sim/ucsim/configure,
680           sim/ucsim/configure.in, sim/ucsim/ddconfig_in.h, sim/ucsim/error.cc,
681           sim/ucsim/errorcl.h, sim/ucsim/option.cc, sim/ucsim/optioncl.h,
682           sim/ucsim/utils.cc, sim/ucsim/utils.h, sim/ucsim/cmd.src/Makefile.in,
683           sim/ucsim/avr.src/avr.cc, sim/ucsim/avr.src/avrcl.h,
684           sim/ucsim/cmd.src/bp.cc, sim/ucsim/cmd.src/bpcl.h,
685           sim/ucsim/cmd.src/cmdconf.cc, sim/ucsim/cmd.src/cmdgui.cc,
686           sim/ucsim/cmd.src/cmdmem.cc, sim/ucsim/cmd.src/cmdset.cc,
687           sim/ucsim/cmd.src/cmdsetcl.h, sim/ucsim/cmd.src/cmdstat.cc,
688           sim/ucsim/cmd.src/cmduc.cc, sim/ucsim/cmd.src/cmduccl.h,
689           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
690           sim/ucsim/cmd.src/command.cc, sim/ucsim/cmd.src/commandcl.h,
691           sim/ucsim/cmd.src/get.cc, sim/ucsim/cmd.src/getcl.h,
692           sim/ucsim/cmd.src/info.cc, sim/ucsim/cmd.src/newcmd.cc,
693           sim/ucsim/cmd.src/newcmdcl.h, sim/ucsim/cmd.src/set.cc,
694           sim/ucsim/cmd.src/show.cc, sim/ucsim/cmd.src/timer.cc,
695           sim/ucsim/hc08.src/hc08.cc, sim/ucsim/hc08.src/hc08cl.h,
696           sim/ucsim/s51.src/Makefile.in, sim/ucsim/s51.src/interrupt.cc,
697           sim/ucsim/s51.src/interruptcl.h, sim/ucsim/s51.src/pca.cc,
698           sim/ucsim/s51.src/pcacl.h, sim/ucsim/s51.src/port.cc,
699           sim/ucsim/s51.src/portcl.h, sim/ucsim/s51.src/serial.cc,
700           sim/ucsim/s51.src/serialcl.h, sim/ucsim/s51.src/timer0.cc,
701           sim/ucsim/s51.src/timer0cl.h, sim/ucsim/s51.src/timer1.cc,
702           sim/ucsim/s51.src/timer1cl.h, sim/ucsim/s51.src/timer2.cc,
703           sim/ucsim/s51.src/timer2cl.h, sim/ucsim/s51.src/uc390.cc,
704           sim/ucsim/s51.src/uc390cl.h, sim/ucsim/s51.src/uc390hw.cc,
705           sim/ucsim/s51.src/uc390hwcl.h, sim/ucsim/s51.src/uc51.cc,
706           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/wdt.cc,
707           sim/ucsim/s51.src/wdtcl.h, sim/ucsim/sim.src/hw.cc,
708           sim/ucsim/sim.src/hwcl.h, sim/ucsim/sim.src/mem.cc,
709           sim/ucsim/sim.src/memcl.h, sim/ucsim/sim.src/obsolete.cc,
710           sim/ucsim/sim.src/obsolete.h, sim/ucsim/sim.src/sim.cc,
711           sim/ucsim/sim.src/simcl.h, sim/ucsim/sim.src/stack.cc,
712           sim/ucsim/sim.src/stackcl.h, sim/ucsim/sim.src/test_mem_speed.cc,
713           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
714           sim/ucsim/xa.src/xa.cc, sim/ucsim/xa.src/xacl.h,
715           sim/ucsim/z80.src/z80.cc, sim/ucsim/z80.src/z80cl.h:
716           ucsim WIN32 native port
717
718 2006-08-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
719
720         * doc/sdccman.lyx: added note on dynamic memory heap initialization
721
722 2006-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
723
724         * src/mcs51/gen.c (genAnd, genOr, genXor): fixed bug 1546986
725         * src/ds390/gen.c (aopGetUsesAcc): handle AOP_DPTR2 and AOP_DPTRn too
726
727 2006-08-26 Maarten Brock <sourceforge.brock AT dse.nl>
728
729         * src/ds390/gen.c (genAnd, genOr, genXor): fixed bug 1546986
730         * support/regression/tests/bug1546986.c: new, added
731         * as/mcs51/.cvsignore,
732         * debugger/mcs51/.cvsignore,
733         * src/.cvsignore: deleted
734
735 2006-08-25 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
736
737         * device/include/mcs51/P89c51RD2.h: fixed bug 1546936 (error in sbit
738           definitions)
739
740 2006-08-20 Borut Razem <borut.razem AT siol.net>
741
742         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h:
743           removed cl_listen_console::match(), cl_console::match(),
744           restructured cl_commander::proc_input()
745
746 2006-08-16 Borut Razem <borut.razem AT siol.net>
747
748         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h,
749           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
750           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/uc.cc: code cleaning
751
752 2006-08-14 Borut Razem <borut.razem AT siol.net>
753
754         * support/regression/Makefile.in,
755           support/regression/ports/pic14/gpsim.cmd,
756           support/regression/ports/pic14/spec.mk,
757           support/regression/ports/pic14/support.c:
758           added pic14 regression test
759
760 2006-08-14 Maarten Brock <sourceforge.brock AT dse.nl>
761
762         * as/doc/asxhtm.html: documented changed ABS behaviour
763         * as/doc/README: fixed some typos
764
765 2006-08-13 Maarten Brock <sourceforge.brock AT dse.nl>
766
767         * support/regression/tests/float_trans.c: disabled test if __STDC_IEC_559__
768           not defined on host
769
770 2006-08-12 Borut Razem <borut.razem AT siol.net>
771
772         * support/regression/fwk/include/testfwk.h,
773           support/regression/fwk/lib/testfwk.c,
774           support/regression/generate-cases.py,
775           support/regression/Makefile.in:
776           regression test framework does not depend on function pointers and
777           variable arguments
778
779 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
780
781         * device/include/stddef.h: c temporary hack to fix bug 1518273
782
783 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
784
785         * device/include/mcs51/cc2510fx.h: added
786         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
787           to projects.
788
789 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
790
791         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
792         * as/z80/Makefile.in: added strcmpi.c
793         * as/z80/z80adr.c: added upper case registers and lower case conditionals
794         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
795
796 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
797
798         * device/lib/gbz80/asm_strings.s,
799         * device/lib/gbz80/crt0_rle.s,
800         * device/lib/gbz80/div.s,
801         * device/lib/gbz80/mul.s,
802         * device/lib/gbz80/shift.s,
803         * device/lib/z80/asm_strings.s,
804         * device/lib/z80/crt0_rle.s,
805         * device/lib/z80/div.s,
806         * device/lib/z80/mul.s,
807         * device/lib/z80/shift.s: changed to all lower case menmonics except the
808           flags which are all upper case
809
810 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
811
812         * as/z80/asm.h: made CASE_SENSITIVE 1
813         * link/z80/aslink.h: made CASE_SENSITIVE 1
814         * src/z80/gen.c (throughout): made all conditionals upper case
815         * support/regression/tests/bug1503067.c: new
816
817 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
818
819         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
820           (shiftIntoPair): added case 2 for PAIR_IY,
821           (setupToPreserveCarry): replaced parameters with iCode and check if
822            PAIR_DE is in use to fix bug 1399290,
823           (genPlus, genMinus): updated call to setupToPreserveCarry
824         * support/regression/tests/bug1399290.c: new
825
826 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
827
828         * device/lib/Makefile.in (Z80SOURCES): enabled float support
829         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
830         * src/ds390/gen.c (shiftRLong),
831         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
832         * src/mcs51/gen.c (sameReg): changed to sameByte,
833           (xch_a_aopGet): new,
834           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
835            shiftRLong): fixed bug 1533966
836         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
837           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
838         * support/regression/Makefile.in: disabled z80, enabled ucz80
839         * support/regression/tests/float_trans.c: enabled test for z80 and host
840         * support/regression/tests/shifts2.c: new, for testing bug 1533966
841
842 2006-08-01 Borut Razem <borut.razem AT siol.net>
843
844         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
845           comparison is always false due to limited range of data type
846           on PPC64 machine (openpower-linux1) where "char = unsigned char"
847
848 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
849
850         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
851         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
852         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
853         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
854
855 2006-07-31 Borut Razem <borut.razem AT siol.net>
856
857         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
858           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
859           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
860           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
861           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
862           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
863           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
864           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
865           enable ucsim mingw compilation. Serial port is disabled,
866           since it uses termios.h API, which is not available on native
867           WIN32
868
869 2006-07-31 Borut Razem <borut.razem AT siol.net>
870
871         * Small Device C Compiler 2.6.0 released
872         * support/scripts/sdcc.nsi: added FULL_DOC option
873         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
874
875 2006-07-28 Borut Razem <borut.razem AT siol.net>
876
877         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
878         * doc/INSTALL.txt: updated
879
880 2006-07-27 Borut Razem <borut.razem AT siol.net>
881
882         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
883           device/lib/pic/libdev/Makefile.in: fixed bug
884           [ 1438354 ] pic libsdcc: distclean doesn't work
885         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
886           device/lib/pic16/libio/Makefile.in: fixed bug
887           [ 1438344 ] pic16 lib: clean doesn't work properly
888         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
889
890 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
891
892         * device/lib/pic/libsdcc/fsdiv.c,
893         * device/lib/pic/libsdcc/fsmul.c,
894         * device/lib/pic16/libsdcc/float/fsdiv.c,
895         * device/lib/pic16/libsdcc/float/fsmul.c,
896         * device/lib/_fsdiv.c,
897         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
898         * support/regression/tests/bug1520966.c: added
899         * doc/knownbugs.html: removed [ 1520966 ] from the list
900
901 2006-07-25 Borut Razem <borut.razem AT siol.net>
902
903         * configure.in, configure, sdccconf_in.h: fixed bug
904           [ 1519095 ] regression test onebyte.c fails on ppc64 host
905         * doc/knownbugs.html: removed [ 1519095 ] from the list
906
907 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
908
909         * doc/knownbugs.html: added, contains list of known bugs at release
910         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
911
912 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
913
914         * device/include/mcs51/compiler.h: added SFRX for xdata based special
915           function registers and corrected defaults with additional warning
916         * device/lib/malloc.c: cosmetic changes
917         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
918         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
919           (fillGaps): and used it
920
921 2006-07-20 Raphael Neider <rneider AT web.de>
922
923         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
924           output unless SDCCPICDEBUG is set
925         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
926           output if SILENT is set
927
928 2006-07-11 Borut Razem <borut.razem AT siol.net>
929
930         * doc/README.txt: updated
931
932 2006-07-10 Borut Razem <borut.razem AT siol.net>
933
934         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
935           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
936           in WIN32 installation
937         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
938           release candidate 1
939
940 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
941
942         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
943         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
944
945 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
946
947         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
948
949 2006-07-06 Borut Razem <borut.razem AT siol.net>
950
951         * support/regression/tests/bitfields.c:
952           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
953         * support/regression/tests/constantRange.c:
954           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
955
956 2006-07-04 Borut Razem <borut.razem AT siol.net>
957
958         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
959           src/port.mk,
960           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
961           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
962           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
963           reverted changes from 2006-07-03
964         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
965         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
966           added CPPFLAGS, used by the host port
967
968 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
969
970         * support/regression/valdiag/tests/switch.c,
971         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
972         * support/regression/tests/libmullong.c: fixed for host
973         * support/regression/ports/host/spec.mk: disable all warnings for host,
974         SDCC runs with --less-pedantic too
975
976 2006-07-03 Borut Razem <borut.razem AT siol.net>
977
978         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
979           defined CPPFLAGS
980         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
981         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
982           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
983           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
984           include ../port.mk
985         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
986           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
987           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
988           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
989
990 2006-07-02 Raphael Neider <rneider AT web.de>
991
992         * src/pic16/devices.inc,
993         * device/include/pic16/pic18fregs.h,
994         * device/include/pic16/pic18f4550.h,
995         * device/lib/pic16/pics.all,
996         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
997
998 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
999
1000         * as/hc08/lkaomf51.c (OutputName),
1001         * as/mcs51/lkaomf51.c (OutputName),
1002         * as/z80/asmain.c (asmbl),
1003         * src/ds390/main.c (asmLineNodeFromLineNode),
1004         * src/hc08/ralloc.c (hc08_assignRegisters),
1005         * src/mcs51/main.c (asmLineNodeFromLineNode),
1006         * src/xa51/ralloc.c (checkRegMask),
1007         * src/xa51/gen.c (emitcode),
1008         * src/z80/gen.c (_emit2),
1009         * src/SDCCast.c (searchLitOp),
1010         * src/SDCCglobl.h,
1011         * support/packihx/packihx.c,
1012         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
1013         * src/ds390/gen.c (aopPutUsesAcc),
1014         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
1015         * support/regression/tests/libmullong.c (mullong_wrapper),
1016         * src/SDCCsymt.c (powof2),
1017         * src/SDCCast.c,
1018         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
1019         * src/SDCCsymt.h: added TYPE_TARGET_*
1020         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
1021         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
1022         SDCCast because 1) header problems 2) this is the right place
1023         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
1024         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
1025         prototype
1026
1027 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
1028
1029         * src/SDCCicode.h: removed buggy semicolon in unused macro
1030         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
1031         search for previous definiton of auto symbols too,
1032         (findPrevUse): fixed logic of emitWarnings
1033
1034 2006-06-26 Raphael Neider <rneider AT web.de>
1035
1036         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
1037           PCLATH and PCLATU on interrupts, potentially fixes #1505141
1038
1039 2006-06-25 Raphael Neider <rneider AT web.de>
1040
1041         * device/lib/pic/libm: NEW, added math library functions
1042         * device/lib/pic/libsdcc: NEW; added float support functions
1043         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
1044         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
1045           NEW, added math related headers
1046         * device/include/asm/pic/features.h: NEW
1047         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
1048           (popGet): allow larger offsets for AOP_PCODE,
1049           (genDataPointerSet): handle literals explicitly, more debug output,
1050           (genAssign): fixed for float using aopLiteral ;-)
1051         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
1052           GOTO initialisation routine
1053         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
1054           flag on registers, fixes #1469043 (local variables do not work)
1055         * src/pic/main.c (_pic14_do_link),
1056         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
1057           available
1058
1059 2006-06-25 Borut Razem <borut.razem AT siol.net>
1060
1061         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
1062           characters printed (not including the trailing '\0' used to end
1063           output to strings). Problem detected in regression test bug-927659.c.
1064           NOTE: printf() family functions should return int instead
1065           unsigned int!
1066         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
1067           specifier are printed as themselves
1068         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
1069           support flags, width and precision specifiers
1070
1071 2006-06-24 Borut Razem <borut.razem AT siol.net>
1072
1073         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
1074           to the list of sdcc tagrets not supporting bit type
1075         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
1076           testfor pic16 due to bug:
1077           [ 1511794 ] pic16: regression test bug-895992.c fails
1078
1079 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
1080
1081         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
1082         * src/SDCCglue.c (initPointer), fixed bug 1496419
1083         * support/regression/tests/bug1496419.c: new, added
1084
1085 2006-06-22 Borut Razem <borut.razem AT siol.net>
1086
1087         * support/regression/ports/pic16/support.c: use gpsim usart module from
1088           libgpsim_modules library
1089
1090 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1091
1092         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
1093         IP0H to IPH0.
1094
1095 2006-06-19 Raphael Neider <rneider AT web.de>
1096
1097         * src/pic/glue.h,src/pic16/glue.h: added prototypes
1098         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
1099           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
1100           (pic14printExterns,pic14printPublics,pic16printPublics,
1101           pic16_printExterns): use new functions to emit symbols
1102           (picglue,pic16glue): emit publics before emitting externs
1103         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
1104           locally defined functions to avoid bug #1443651
1105         * support/regression/tests/bug-716242.c: removed pic16 workaround
1106         * support/regression/ports/pic16/spec.mk: ignore errors during build
1107
1108 2006-06-19 Raphael Neider <rneider AT web.de>
1109
1110         * src/pic/glue.h: added pic14aopLiteral prototype
1111         * src/pic/glue.c (pic14aopLiteral): return unsigned int
1112         * src/pic/gen.c: removed stdint.h dependency
1113           (aopGet): use Safe_strdup()
1114           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
1115           (genDataPointerSet): use pic14aopLiteral()
1116         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
1117           for pic16; thanks to Bernhard and Maarten
1118
1119 2006-06-18 Borut Razem <borut.razem AT siol.net>
1120
1121         * support/regression/tests/structflexarray.c: flexible array members
1122           not supported by gcc < 3
1123         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
1124           GUI tool by default
1125         * src/pic/gen.c: don't include [p]strdin.h on solaris
1126         * support/Util/pstdint.h: addad svn attributes
1127         * support/regression/tests/constantRange.c,
1128           support/regression/tests/rotate.c: include inttypes.h instead
1129           stdint.h on solaris, addad svn attributes
1130
1131 2006-06-18 Raphael Neider <rneider AT web.de>
1132
1133         * src/SDCCsymt.c (initCSupport): change return type of divschar to
1134           int for PIC16
1135         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
1136           (pic16_genMinusBits): simplified sign-extension
1137           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
1138             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
1139             adjusted to correctly handle mixed-signed operands, disabled
1140             now unused multiplciation routines
1141         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
1142           (assignResultValue): added argument denoting the size of the result
1143             as returned by the function (fixes upcasts in assigning from
1144             function calls: char foo(); int i = foo();)
1145           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
1146             function result to assignResultValue
1147           (genMult): disabled inlined multiplication code
1148           (genDiv): augmented to also handle the modulus operator, fixed to
1149             handle mixed-signed operands correctly
1150           (genMod): simply call genDiv, disabled unused code
1151           (genAssign): fixed missing (sign-)extension on result
1152         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
1153             valid char operands, allow signed operands for native code, added
1154             division and modulo operator handling
1155         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
1156
1157         As a consequence, onebyte.c (if split into two files) and muldiv.c
1158         pass regression tests.
1159
1160 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1161
1162         * doc/Makefile.in: two runs of makeindex seem needed to get
1163         correct page references in the index of sdccman.pdf
1164         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
1165
1166 2006-06-17 Borut Razem <borut.razem AT siol.net>
1167
1168         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
1169
1170 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1171
1172         * doc/sdccman.lyx: updated, added (porting source code, debugging),
1173         mentioned ec2drv and paulmon
1174
1175 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
1176
1177         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
1178           consecutive abs areas
1179           (find_empty_space, allocate_space): added map to handle codemap or
1180            xdatamap,
1181           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
1182            absolute idata and xdata
1183         * as/mcs51/lkmem.c (summary2): updated legend
1184
1185 2006-06-16 Raphael Neider <rneider AT web.de>
1186
1187         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
1188
1189 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
1190
1191         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
1192           1208515
1193         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
1194
1195 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
1196
1197         * src/port.h (struct PORT): added field gp_tags, to hold the tag
1198         value of generic pointers,
1199         * src/avr/main.c,
1200           src/ds390/main.c,
1201           src/hc08/main.c,
1202           src/izt/i186.c,
1203           src/izt/tlcs900h.c,
1204           src/mcs51/main.c,
1205           src/pic/main.c,
1206           src/pic16/main.c,
1207           src/xa51/main.c,
1208           src/z80/main.c: PORT structure, added elements for gp_tags field,
1209         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
1210         fields in the PORT structure of each port,
1211         * src/SDCCast.c (decorateType): allow processing of generic pointers
1212         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
1213         S_FIXED symbols
1214
1215 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
1216
1217         * link/z80/lkgb.c,
1218         * link/z80/lkgg.c,
1219         * src/pic16/gen.c,
1220         * src/pic16/main.c,
1221         * src/pic16/pcode.c,
1222         * src/pic/main.c,
1223         * src/pic/pcoderegs.c,
1224         * src/SDCCicode.c,
1225         * src/SDCCmain.c,
1226         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
1227           bug 1504689 on minGW
1228
1229 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1230
1231         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
1232
1233 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
1234
1235         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
1236
1237 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
1238
1239         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
1240           for optimization
1241
1242 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
1243
1244         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
1245         to a char variable. Fixed bug #1504211
1246         * device/include/pic16/adc.h,
1247         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
1248         and fixed bug #1364390
1249
1250 2006-06-10 Borut Razem <borut.razem AT siol.net>
1251
1252         * CVSROOT: removed the CVS left-over
1253
1254 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
1255
1256         * as/hc08/asmain.c (asexit),
1257         * as/hc08/lkmain.c (lkexit),
1258         * as/mcs51/asmain.c (asexit),
1259         * as/mcs51/lkmain.c (lkexit),
1260         * src/SDCCglue.c (DEFSETFUNC),
1261         * src/SDCCmain.c (linkEdit, assemble),
1262         * support/librarian/sdcclib.c (AddRel),
1263           replaced unlink() by standard C remove()
1264         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
1265         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
1266           gatherImplicitVariables): new, added to fix bug 608752,
1267           (createFunction): added gatherImplicitVariables()
1268         * src/SDCCast.h: added createRMW prototype
1269         * src/SDCCsymt.h (struct symbol): added infertype
1270         * support/regression/tests/bug608752.c: new, added
1271
1272 2006-06-10 Raphael Neider <rneider AT web.de>
1273
1274         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
1275           multibyte dummy reads (fixes #1503234)
1276
1277 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
1278
1279         * device/include/mcs51/compiler.h: new, added header file to enable
1280           creating common sfr definition header files for different compilers
1281
1282 2006-06-05 Raphael Neider <rneider AT web.de>
1283
1284         * src/pic16/{pcode.h,genarith.c}:
1285           introduced pCodeOp combining any two pCodeOps (previously only
1286           two register operands could be combined), removed pcop2 from
1287           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
1288         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
1289         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
1290           rewritten to use new PO_TWO_OPS
1291         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
1292         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
1293           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
1294           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
1295           (pic16_get_op): embraced return arg to allow #define return(x),
1296             added new case for combined opcodes
1297           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
1298           (pic16_pCode2str,pic16_getRegFrompCodeOp,
1299            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
1300
1301 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
1302
1303         * src/SDCCval.c (checkConstantRange): added
1304         * src/SDCCval.h: added checkConstantRange
1305         * support/Util/SDCCerr.c,
1306         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
1307         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
1308         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
1309         * src/SDCCast.c (decorateType): added checkConstantRange,
1310         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
1311         can be emitted with the correct always true/false warning,
1312         added optimization for double '!';
1313         result of decorateType() must be assigned back to the tree, because
1314         decorateType() can change the tree
1315         * src/SDCCicode.c (geniCodeLogic),
1316         (geniCodeAssign): replaced new checkConstantRange, added warnings,
1317         (checkConstantRange): removed, it was only a fragment which never
1318         emitted a warning
1319         * src/SDCCsymt.c (computeType): fixed promotion for
1320         "-1 < (unsigned bit) b"
1321         * src/pic/ralloc.c (packRegsForAssign),
1322         * src/pic16/ralloc.c (packRegsForAssign),
1323         * src/hc08/ralloc.c (packRegsForAssign),
1324         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
1325         from mcs51
1326         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
1327         * support/regression/tests/constantRange.c: added
1328         * support/valdiag/tests/constantRange.c: added
1329         * support/valdiag/valdiag.py: added -DPORT_HOST=1
1330
1331 2006-06-02 Borut Razem <borut.razem AT siol.net>
1332
1333         * support/regression/ports/pic16/support.c: increase stack size
1334           to 255 bytes
1335         * support/regression/Makefile.in: sort tests by name so that the
1336           resutlts can be compared on different machines / platforms
1337
1338 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
1339
1340         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
1341         * src/ds390/gen.c (emitLabel): new, added,
1342           (genDjnz): fixed stack overflow bug,
1343           (throughout): cosmetic changes to sync with mcs51/gen.c,
1344           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
1345         * src/mcs51/gen.c (genEndFunction): small optimization,
1346           (throughout): cosmetic changes to sync with ds390/gen.c
1347
1348 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
1349
1350         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
1351           (_print_format): fixed printing pointers
1352         * src/mcs51/gen.c (emitLabel, movb): new, added,
1353           (genAssign): small optimization,
1354           (genDjnz): fixed stack overflow bug,
1355           (throughout): replaced sprintf with SNPRINTF,
1356           replaced mcs51_regWithIdx with REG_WITH_INDEX,
1357           replaced emitcode("mov", "b,...") with MOVB(...),
1358           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
1359           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
1360         * src/mcs51/peeph.def: added rules 140 and 264
1361         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
1362           so they may get optimized into registers
1363
1364 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
1365
1366         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
1367           immediately when encountered,
1368           (printUsage): always use stderr even on windows
1369
1370 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
1371
1372         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
1373         (processParms): fixed bug #1247551
1374         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
1375         parseCmdLine, main): print '--version' to stdout,
1376         print 'help' to stdout if --help is given,
1377         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
1378         arguments are given; fixed --help
1379
1380 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
1381
1382         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
1383         * support/regression/tests/bug-1493710.c: added
1384
1385 2006-05-27 Borut Razem <borut.razem AT siol.net>
1386
1387         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
1388           static instead auto
1389         * support/regression/ports/pic16/support.c: increase stack size
1390           from default 64 bytes to 128 bytes
1391         * support/regression/tests/staticinit.c,
1392           support/regression/tests/float.c: regression tests fully enabled
1393           for pic16 port by putting the initialized data arrays into the code
1394           section
1395         * support/regression/ports/pic16/spec.mk: don't link default libraries.
1396           This was changed by mistake in the previous version.
1397
1398 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
1399
1400         * src/pic16/gen.c (genFunction, genEndFunction): some
1401         beautifications, fixed bug with falsely restoring FSR2 in large
1402         stack model, thanks to Beau E. Cox for reporting the bug
1403
1404 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1405
1406         * debugger/mcs51/break.c,
1407         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
1408           use %p to print pointers, made address variables unsigned
1409         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
1410         * debugger/mcs51/symtab.c (parseSymbol): must return something
1411         * src/mcs51/gen.c (aopForSym): small optimization,
1412            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
1413           (freeAsmop): added missing break,
1414           (aopPut): removed parameter bvolatile, determine it inside the function,
1415           (saveRegisters, unsaveRegisters): small optimization,
1416           (genIpush): removed pointless check,
1417           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
1418           replaced sprintf with SNPRINTF,
1419           replaced strcpy with strncpyz,
1420           updated aopPut calls,
1421           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
1422         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
1423
1424 2006-05-24 Borut Razem <borut.razem AT siol.net>
1425
1426         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
1427           modification of test for the pic16 port, put the array to the code
1428           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
1429
1430 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1431
1432         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
1433         * support/Util/pstdint.h: added
1434
1435 2006-05-22 Borut Razem <borut.razem AT siol.net>
1436
1437         * src/regression/Makefile: removed bool2.c test, added -q linker option
1438         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
1439           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
1440           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
1441           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
1442           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
1443           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
1444           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
1445           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
1446           define SUPPORT_BIT_TYPES 0, removed unused bit variables
1447
1448 2006-05-22 Raphael Neider <rneider AT web.de>
1449
1450         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
1451           bug #1492360 (problematic due to generic pointers, see code)
1452
1453 2006-05-22 Borut Razem <borut.razem AT siol.net>
1454
1455         * support/regression/ports/pic16/specs.mk: removed stack size linker
1456           directive
1457         * support/regression/tests/array.c,
1458           support/regression/tests/bitopcse.c,
1459           support/regression/tests/bug-908454.c,
1460           support/regression/tests/malloc.c: modified for pic16 regression test
1461         * support/regression/tests/bitfields.c:
1462           pic16 - excluded bitfileds of size > 8
1463         * support/regression/tests/bp.c: pic16 - reduced data size
1464         * support/regression/tests/bug-221100.c: pic16 - reduced data size
1465         * support/regression/tests/bug-460010.c:
1466           pic16 - used the absolute address the fits in memory
1467         * support/regression/tests/bug-716242.c:
1468           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
1469         * support/regression/tests/float.c:
1470           pic16 - excluded - data size too big
1471         * support/regression/tests/onebyte.c:
1472           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
1473         * support/regression/tests/shifts.c:
1474           pic16 - function names probably have to differ in first X characters
1475           (gpasm limitation?)
1476         * support/regression/tests/staticinit.c:
1477           pic16 - excluded some tests due error: no target memory available for
1478           section ".idata"
1479
1480 2006-05-22 Borut Razem <borut.razem AT siol.net>
1481
1482         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1483           second try. Thanks Stas Sergeev once more.
1484
1485 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1486
1487         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
1488           (genLeftShift, genRightShift): fixed bug 1491627
1489         * src/hc08/peeph.def (rules 7, 8.x): added
1490         * support/regression/tests/shifts.c (ShiftLeftByParam,
1491           ShiftRightByParam, testShiftByParam): added to test variable shifting
1492
1493 2006-05-20 Raphael Neider <rneider AT web.de>
1494
1495         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
1496         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
1497           (allocReg): add only new registers to dynAllocRegs,
1498           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
1499             #1489055, #1445850, and probably #1483693
1500
1501 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
1502
1503         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
1504         bug in for-loop that didn't emit the last of CONFIG and ID registers
1505
1506 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
1507
1508         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
1509           with offset
1510         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
1511           1489016, 1434401 and 1490124
1512         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
1513           1489016, 1434401 and 1490124
1514
1515 2006-05-17 Borut Razem <borut.razem AT siol.net>
1516
1517         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1518           thanks Stas Sergeev
1519
1520 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1521
1522         * device/include/mcs51/P89c51RD2.h,
1523         * device/include/mcs51/P89LPC901.h,
1524         * device/include/mcs51/P89LPC922.h,
1525         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
1526
1527 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1528
1529         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
1530         to fix missing stack pragma in compiled binary object file,
1531
1532 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
1533
1534         * support/packihx/configure.in,
1535         * support/packihx/configure: removed warning, autoconf >= 2.5x can
1536         determine sizeof basic types even while cross compiling
1537
1538 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
1539
1540         * src/avr/gen.c (aopop),
1541         * src/ds390/gen.c (aopOp),
1542         * src/hc08/gen.c (aopOp),
1543         * src/mcs51/gen.c (aopop),
1544         * src/pic16/gen.c (pic16_aopOp),
1545         * src/pic/gen.c (aopOp),
1546         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
1547         if size of operand is smaller than spill location
1548
1549 2006-05-12 Borut Razem <borut.razem AT siol.net>
1550
1551         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
1552           have to have CR/LF line endings even if they are checked out on *nix
1553           or on WIN32 in cygwin binmode
1554
1555 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
1556
1557         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
1558         * device/include/ds80c390.h: added sfr16 definitions
1559         * src/ds390/gen.c,
1560         * src/ds390/gen.h,
1561         * src/ds390/main.c,
1562         * src/ds390/ralloc.c,
1563         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
1564           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
1565           bit returning functions
1566         * support/regression/tests/sfr16.c: enabled test on ds390
1567
1568 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1569
1570         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
1571         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
1572
1573 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
1574
1575         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
1576         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
1577           (cl_address_space constructor): removed expensive initialization,
1578           (cl_address_space::get_cell): extended for late initialization,
1579           (cl_address_space::*): use late initialization,
1580           (cl_address_decoder::activate): removed expensive initialization,
1581           This reduced regression test running time by 25%
1582
1583 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
1584
1585         * packihx/,
1586         * configure.in,
1587         * configure,
1588         * sdcc.dsw,
1589         * Makefile.bcc,
1590         * Makefile.in,
1591         * support/packihx/Makefile.in,
1592         * support/packihx/clean.mk,
1593         * support/packihx/Makefile.bcc,
1594         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
1595
1596 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1597
1598         * src/SDCCval.c (valNot): fix for regression test failure
1599           of not.c on big endian hosts
1600
1601 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1602
1603         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
1604
1605 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1606
1607         * device/lib/mcs51/Makefile.in: changed string comparison operator
1608           to = for POSIX compliance; == is bash extension
1609
1610 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1611
1612         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
1613           kosmonaut_pirx
1614
1615 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
1616
1617         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
1618         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
1619         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
1620         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
1621         bug report #1478657,
1622
1623 2006-05-05 Borut Razem <borut.razem AT siol.net>
1624
1625         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
1626           making the html
1627
1628 2006-05-02 Borut Razem <borut.razem AT siol.net>
1629
1630         * doc/Makefile.in: removed *.ind dependency since there is no rule to
1631           create *.ind, which made make to fail if invoked with -j 2
1632
1633 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
1634
1635         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
1636           Hubert Sack for patch 1479782
1637
1638 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
1639
1640         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
1641
1642 2006-05-01 Raphael Neider <rneider AT web.de>
1643
1644         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
1645           (create_pic): store only prefix-free device name,
1646           (init_pic): check for device names with "16" prefix,
1647           (list_valid_pics),
1648         * src/pic/device.h (struct PIC_device),
1649         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
1650             stored device name,
1651         * device/include/pic/pic12f{635,675,629,683}.h,
1652         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
1653         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
1654         * device/include/pic/pic16f505.h,
1655         * device/lib/pic/libdev/pic16f505.c: removed
1656         * device/include/pic/pic14devices.txt: added support for pic12f
1657             devices, removed unsupported non 16-bit devices
1658             [above changes provided by patch from Zik Saleeba]
1659         * src/pic/*, src/pic16/*, device/include/pic16/*,
1660           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
1661
1662 2006-05-01 Borut Razem <borut.razem AT siol.net>
1663
1664         * configure.in, configure, doc/Makefile.in:
1665           sync with nightly build makefile - latex, dvipdf and dvips
1666           not needed any more
1667
1668 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
1669
1670         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
1671         in the library source
1672
1673 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
1674
1675         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
1676
1677 2006-04-28 Raphael Neider <rneider AT web.de>
1678
1679         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
1680         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
1681           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
1682         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
1683
1684 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
1685
1686         * device/lib/pic/libdev/Makefile.in,
1687         * device/lib/hc08/Makefile.in,
1688         * device/lib/gbz80/Makefile.in,
1689         * device/lib/z80/Makefile.in,
1690         * device/lib/ds390/Makefile.in,
1691         * device/lib/ds400/Makefile.in: added srcdir to include search path,
1692         thanks to Borut for the bug report
1693         * configure.in,
1694         * configure: always create doc/Makefile independent from --enable-doc
1695         * Makefile.in: always install from directory doc independent from
1696         --enable-doc
1697         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
1698         removed
1699         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
1700         * doc/Makefile.in: install *.txt if present
1701         * device/include/Makefile.in (install): added installation of pic/*.inc
1702         and pic/*.txt files again, they were erroneously removed
1703
1704 2006-04-28 Raphael Neider <rneider AT web.de>
1705
1706         * src/pic/{gen.c,main.h,pcode.c},
1707         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
1708             concerning signedness with casts
1709
1710 2006-04-28 Raphael Neider <rneider AT web.de>
1711
1712         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
1713             definition of an interrupt handler,
1714         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
1715             interrupt handler stuff from picglue() to separate routine,
1716           (picglue): enabled definition of intr handlers in files w/o main()
1717
1718 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1719
1720         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
1721           compilation with MSVC 2005 Express Edition (VC8)
1722
1723 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
1724
1725         * device/lib/Makefile: fixed build of gbz80 lib
1726
1727 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1728
1729         * support/regression/tests/bug-460010.c,
1730         * support/regression/tests/bug-524691.c,
1731         * support/regression/tests/bug-716242.c: removed conditional defines
1732           that are already in testfwk.h
1733
1734 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1735
1736         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
1737           (AccAXRsh1): added, shift right by 1,
1738           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
1739            AccAXLrl1
1740         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
1741
1742 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
1743
1744         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
1745         remove cast to same type
1746         * src/SDCCast.c (decorateType): fix for RFE 1475742,
1747         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
1748         * as/z80/Makefile,
1749         * link/z80/Makefile: removed, they have moved to
1750         Makefile.in files
1751         * configure,
1752         * configure.in: replaced duplicate message about ucsim by missing sdcpp
1753         * install-sh: fix bug #1204398 by setting umask 0022
1754         * device/lib/Makefile: separate build of z80 and gbz80 lib
1755
1756 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
1757
1758         Enabled VPATH feature: changed nearly all Makefiles (149 files).
1759         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
1760
1761         One basic decision: e.g. src/clean.mk includes further files. In order
1762         to make this work there are two solutions:
1763         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
1764           run configure on them. This way they can use
1765           'include $(srcdir)/port-clean.mk'
1766         - always include clean.mk by the Makefile at the same level. To avoid
1767           that `make clean` tries to include and build Makefile.dep the
1768           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
1769           implemented, because now even `make uninstall` doesn't create
1770           Makefile.in. clean.mk could be eliminated by pasting it in
1771           Makefile.in.
1772
1773         * debugger/mcs51/Makefile.in: build own objects from library sources
1774         (SLIB, SDCC) in current directory
1775
1776         * configure, configure.in: renamed --disable-device-lib-build in
1777         --disable-device-lib; added --enable-doc, the required tools are
1778         searched by configure; added result message; the toolchain for the
1779         belonging ports are now only built, if the port is enabled.
1780
1781         * support/regression/*: all output is written in directory gen, because
1782         the fwk and ports directories don't livet in the build tree using vpath
1783
1784         * doc/sdccman.lyx: renamed --disable-device-lib-build to
1785         --disable-device-lib, added --enable-doc, added section VPATH
1786
1787         * sim/ucsim/configure.in,
1788         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
1789         z80 are enabled by default
1790
1791 2006-04-24 Raphael Neider <rneider AT web.de>
1792
1793         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
1794             to config word, "pic14_"-prefixed some extern functions
1795           (pic14_emitConfigWord): emit __config directive(s) if assignment to
1796             config word has been found
1797         * src/pic/device.h: added prototypes
1798         * src/pic/pcode.c: added "pic14_"-prefix where needed
1799         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
1800             fixup
1801         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
1802             words,
1803           (pic14emitRegularMap): ignore config words,
1804           (pic14createInterruptVect): moved generating __config directives away
1805           (picglue): have __config directives emitted
1806
1807 2006-04-24 Borut Razem <borut.razem AT siol.net>
1808
1809         * doc/Makefile: sync with nightly build makefile
1810
1811 2006-04-24 Raphael Neider <rneider AT web.de>
1812
1813         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
1814             registers that have not been assigned proper liveranges,
1815             fixes #1469504 and #1474602,
1816           (pCodeRegOptimizeRegUsage): fixed typo in comment
1817
1818 2006-04-24 Borut Razem <borut.razem AT siol.net>
1819
1820         * device/examples/main8051.c: deleted - it was removed from CVS
1821           24.mar.2000 and after that modified 18.feb.2001, so it reappered
1822           after the transition to Subversion
1823         * src/SDCCalloc.h: deleted - it was removed  from CVS
1824           3.feb.2001 and after that modified 18.feb.2001, so it reappered
1825           after the transition to Subversion
1826         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
1827           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
1828           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
1829           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
1830
1831 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
1832
1833         * as/asx8051.dsp: added mcs51/strcmpi.h
1834         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
1835         * as/hc08/aslink.h: updated lnksect prototype
1836         * as/hc08/asm.h,
1837         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
1838         * as/hc08/asmain.c,
1839         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
1840           (newdot): handle A_ABS
1841         * as/hc08/asout.c,
1842         * as/mcs51/asout.c (outarea): output address
1843         * as/hc08/lkaomf51.c,
1844         * as/mcs51/lkaomf51.c: disabled unused array UsageType
1845         * as/hc08/m08pst.c,
1846         * as/mcs51/i51pst.c,
1847         * as/z80/z80pst.c: "ABS" is not A_OVR
1848         * as/hc08/lkarea.c (newarea): read a_addr,
1849           (lnkarea): added codemap array, sort absolute areas to the front,
1850            combine all GSINITx/GSFINAL,
1851           (find_empty_space, allocate_space): new functions,
1852           (lnksect): return next address, handle absolute sections
1853         * as/mcs51/lkarea.c (newarea): read a_addr,
1854           lnksect2 prototype changed,
1855           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
1856           (find_empty_space, allocate_space): new, factored out of lnksect2,
1857           (lnksect2): return next address, handle absolute sections
1858         * as/hc08/lkhead.c,
1859         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
1860         * as/hc08/lklibr.c (addfile, fndsym),
1861         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
1862           index out of range and detect both '\' and '/'
1863         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
1864         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
1865           regression tests (ds390 cannot return bool yet)
1866         * doc/sdccman.lyx: changed version number, document changed --no-peep,
1867           document critical interrupts on z80, document changed SDCC define
1868         * src/asm.c (_asxxxx_mapping): fixed .org directive,
1869           (_a390_mapping): added .org directive
1870         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
1871           (genMultOneByte): fixed warnings
1872         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
1873           ones
1874         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
1875         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
1876           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
1877         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
1878         * src/pic16/main.c: removed newReg prototype
1879         * src/pic16/pcode.c,
1880         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
1881           warnings
1882         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
1883           ones
1884         * src/pic16/ralloc.c
1885         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
1886           to fix warnings
1887         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
1888           from short to PIC_OPTYPE
1889         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
1890         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
1891           optype from short to PIC_OPTYPE
1892         * src/port.h: made int_size unsigned to fix warnings
1893         * src/SDCC.y: fixed warning on MSVC
1894         * src/SDCCicode.c (getArraySizePtr): return unsigned int
1895         * src/SDCCopt.c (convertToFcall): fixed warnings
1896         * src/SDCCsymt.h: removed double prototype for genSymName
1897         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
1898           offset int to fix warnings
1899
1900 2006-04-22 Borut Razem <borut.razem AT siol.net>
1901
1902         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1903           references to CVS replaced with Subversion
1904
1905 2006-04-21 Borut Razem <borut.razem AT siol.net>
1906
1907         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1908           references to CVS replaced with Subversion
1909
1910 2006-04-19 Borut Razem <borut.razem AT siol.net>
1911
1912         * src/version.awk: adapted for svn
1913         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
1914           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
1915           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
1916           /binutils-avr/etc/*.vi, *.jin: removed all properties
1917           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
1918
1919 2006-04-19 Borut Razem <borut.razem AT siol.net>
1920
1921         * CVS to Subversion migration completed
1922
1923 2006-04-18 Borut Razem <borut.razem AT siol.net>
1924
1925         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
1926           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
1927
1928 2006-04-17 Borut Razem <borut.razem AT siol.net>
1929
1930         * device/include/Makefile.in: added pic/*.inc to the installation
1931
1932 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
1933
1934         * support/regression/collate-results.py: fixed output in case of
1935         a valdiag error
1936         * support/regression/generate-cases.py: fixed splitting of pathnames
1937         with dots
1938         * as/hc08/lklibr.c (addfile),
1939         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
1940
1941 2006-04-11 Raphael Neider <rneider AT web.de>
1942
1943         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
1944         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
1945         * src/pic16/pcode.c (assignValnums): fixed #1460578
1946
1947 2006-04-11 Raphael Neider <rneider AT web.de>
1948
1949         * device/lib/pic/libdev/*.c,
1950         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
1951           fixes #1468739, enables compilation in --std-c99 mode
1952         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
1953
1954 2006-04-11 Raphael Neider <rneider AT web.de>
1955
1956         * src/pic/device.c (find_device): removed debug output
1957           (list_valid_pics): enabled verbose listing of supported devices
1958         * device/include/stdbool.h: define bool as char for pic14/16 as well
1959
1960 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1961
1962         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
1963
1964 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1965
1966         * .version: bumped version to 2.5.6
1967         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
1968
1969 2006-04-06 Raphael Neider <rneider AT web.de>
1970
1971         * .version: bumped version to 2.5.6 (pic14 ABI changed)
1972         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
1973         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
1974           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
1975             pic14_constructAbsMap
1976           (pic14printPublics): declare absolute global symbols as global
1977           (pic14createInterruptVect),
1978         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
1979           (newReg): assume new registers unused, use correct name in
1980             hashtable (reg->name instead of name), more debugLog output
1981         * src/pic/device.h (PIC_device): added fields for verbose output
1982         * src/pic/device.c: moved device definition to pic14devices.txt,
1983             added routines for runtime parsing of pic14devices.txt,
1984             added support for second config word
1985         * src/pic/main.c (_process_pragma): removed #pragma maxram,
1986           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
1987           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
1988           (_pic14_parseOptions): moved pCodeInitRegisters here
1989           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
1990         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
1991           (pCodeInitRegisters): rewrapped comments, perpared new approach to
1992             handling the pseudo stack
1993         * device/lib/Makefile.in: ignore failures in objects-pic16,
1994         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
1995         * device/lib/pic/NEWS: document new dependency on picXXX.lib
1996         * device/lib/pic/Makefile.subdir,
1997         * device/lib/pic16/Makefile.subdir: improved clean rules
1998         * device/lib/pic/libdev/: NEW, pic14 device libraries
1999         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
2000         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
2001         * device/include/Makefile.in: create subdir and install pic14 headers
2002         * device/include/pic/p16f_common.inc: removed unused declarations
2003         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
2004             PICs from inc2h.pl v1.6,
2005             replaced BIT_AT macros with struct declarations
2006         * device/include/pic/pic14devices.txt: definition of supported devices,
2007             all above improvements contributed by Zik Saleeba, thanks
2008         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
2009         * support/scripts/sdcc.nsi: also install pic14 device libraries and
2010             headers
2011
2012 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2013
2014         * device/include/mcs51/c8051f410.h: added interrupt numbers,
2015         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
2016           thanks to Charles Olds
2017
2018 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2019
2020         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
2021
2022 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2023
2024         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
2025         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
2026         * support/regression/bug1464657.c: added, new test
2027
2028 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
2029
2030         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
2031           version number
2032
2033 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
2034
2035         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
2036           --no-peep and --peep-file <file> are used don't use default rules but
2037           do use the <file>
2038
2039 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
2040
2041         * src/mcs51/gen.c (genCall): fixed bug 1457608
2042
2043 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2044
2045         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
2046         changes seem to cause (trigger?) problems with the build system.
2047
2048 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
2049
2050         * src/SDCCpeeph.c (operandsLiteral): new, added,
2051           (callFuncByName): inserted operandsLiteral
2052         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
2053
2054 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2055
2056         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
2057         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
2058
2059 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2060
2061         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
2062           implemented patch 1120823 Thanks to Willy De la Court (normal
2063           interrupts need an interrupt number now if they are made critical),
2064           and enabled nesting of critical functions though not for gbz80
2065           (genCritical, genEndCritical): added functions
2066           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
2067         * src/z80/mappings.i: added "ei" to all mappings
2068
2069 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2070
2071         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
2072         submitted by the Debian SDCC maintainer Aurelien Jarno:
2073         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
2074         archive with gcc 4.1 on mips and wrote the patch"
2075
2076 2006-03-16 Raphael Neider <rneider AT web.de>
2077
2078         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
2079           the left operand is shorter than the result (c* = lit-c* + int),
2080           fixes bug #1450796
2081         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
2082           OP_SYMBOL
2083
2084 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2085
2086         * src/.version: increased version number to 2.5.5
2087         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
2088         linking is done manually in pic16 port's _linkEdit,
2089         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
2090         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
2091         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
2092         allocate asmop as AOP_ACC,
2093         (aopForRemat): added parameter 'bool result' in function declaration,
2094         (pic16_aopGet): return AOP_ACC when accessing WREG,
2095         (pic16_popGetTempReg): minor modification,
2096         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
2097         'pic16_allocWithIdx',
2098         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
2099         calling function in absolute addresses,
2100         (genAssign): take into account AOP_ACC asmop,
2101         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
2102         * src/pic16/pcoderegs.c: some debug functions and lines added,
2103         * src/pic16/ralloc.c (decodeRegType): added but commented out,
2104         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
2105         register too,
2106         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
2107         call to allocReg, not by manually allocating a new one,
2108         (pic16_assignRegisters): now before going through the register
2109         allocating functions mark all registers as free. This eliminates some
2110         side effects resulting from peephole parser done earlier in the backbone
2111
2112 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
2113
2114         * src/SDCCicode.c (geniCodeLogic),
2115         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
2116
2117 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
2118
2119         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
2120           (genSend): bugfix, do not allocate and free twice,
2121           (shiftRLong): handle partially overlapping aops
2122         * support/regression/tests/bitopcse.c: fixed warning redefined idata
2123
2124 2006-03-08 Borut Razem <borut.razem AT siol.net>
2125
2126         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
2127           for pic16
2128
2129 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
2130
2131         * support/regression/tests/bug1409955.c: new, added
2132         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
2133         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
2134           (aopForSym, aopOp): increment asmop.allocated if reused,
2135           (freeAsmop): decrement asmop.allocated and check for zero instead of
2136           using asmop.freed,
2137           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
2138           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
2139            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
2140            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
2141            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
2142            genSignedRightShift, genRightShift, genDataPointerGet,
2143            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
2144            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
2145             in reverse order from allocation,
2146           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
2147             added swappedLR to keep track
2148         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
2149           pdata & code for GCC, z80, gbz80 & hc08
2150         * support/regression/tests/zeropad.c: moved defines to testfwk.h
2151
2152 2006-03-08 Raphael Neider <rneider AT web.de>
2153
2154         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
2155
2156 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
2157
2158         * device/include/mcs51/c8051f410.h: new SiLabs mcu
2159         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
2160         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
2161
2162 2006-03-06 Borut Razem <borut.razem AT siol.net>
2163
2164         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
2165           made the linker quiet
2166
2167 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2168
2169         * src/pic16/gen.c (genPcall): fixed bug #1443644
2170         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
2171         which dumps before the function entry point a data byte which represents
2172         the number of the local variables used by the specified function, added
2173         'xinst' for initial support for Extended Instruction Support,
2174         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
2175         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
2176         port->fun_prefix anymore (may change later),
2177         (genFunction, genEndFunction): do not store/restore local registers for
2178         _main (this should take care the --main-return command line option in
2179         the future),
2180         (genOr): removed some legacy pic-port instructions,
2181         * src/pic16/genarith.c (genAddLit): re-enabled old code because
2182         performing operations with SFR's causes data to be written more than
2183         once to each SFR. Perhaps SFRs should be handled in special cases...
2184         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
2185         pcode.h
2186         * src/pic16/main.c (_process_pragma): stack bound checking did not take
2187         into account for stack starting position,
2188         (struct OPTIONS pic16_optionsTable): added command line argument
2189         --extended or -y for Extended Instruction Support,
2190         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
2191         (deassignLRs): *** perhaps the most important change, old 'for' code
2192         (commented out for reference), didn't account for some registers which
2193         were left marked 'not free' after a pointer operation. The change
2194         reduces register usage a lot in some cases
2195
2196 2006-03-04 Borut Razem <borut.razem AT siol.net>
2197
2198         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
2199           _clean
2200         * support/regression/tests/bug-524697.c: decreased array size for
2201           mcs51 to fit into the internal RAM
2202         * support/regression/Makefile.in: a little bit more verbose
2203
2204 2006-03-03 Borut Razem <borut.razem AT siol.net>
2205
2206         * support/regression/fwk/lib/testfwk.c,
2207           support/regression/fwk/include/testfwk.h: introduced function
2208           _prints(), nonrecursive _printn(), call _initEmu() from main()
2209         * support/regression/ports/gbz80/support.asm,
2210           support/regression/ports/ucz80/support.asm,
2211           support/regression/ports/z80/support.asm,
2212           support/regression/ports/ds390/support.c,
2213           support/regression/ports/hc08/support.c,
2214           support/regression/ports/host/support.c,
2215           support/regression/ports/mcs51/support.c,
2216           support/regression/ports/xa51/support.c: added empty _initEmu()
2217           function
2218         * support/regression/ports/pic16/gpsim.cmd,
2219           support/regression/ports/pic16/spec.mk,
2220           support/regression/ports/pic16/support.c,
2221           support/regression/Makefile.in: added pic16 regression test
2222
2223 2006-03-01 Raphael Neider <rneider AT web.de>
2224
2225         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
2226           genConstPointerGet): use safe way of generating MOVFF to cover
2227             literals as well as registers, fixes bug #1440527
2228         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
2229             dereference
2230           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
2231             more correctly, fixes bug #1232186
2232           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
2233         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
2234             gplink guess the correct processor in more cases, applied patch
2235             from Till Riedel attached to and fixing bug #1436552
2236
2237 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2238
2239         * support/regression/tests/array.c: added, contains check for #1434401
2240         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
2241
2242 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
2243
2244         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
2245         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
2246         * device/include/mcs51/c8051f326.h,
2247         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
2248         * device/include/mcs51/c8051f000.h,
2249         * device/include/mcs51/c8051f018.h,
2250         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
2251           PCON_IDLE,PCON_STOP and added sfr16 definitions
2252
2253 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
2254
2255         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
2256           genGetWord): fixed bug 1409955
2257
2258 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
2259
2260         * device/include/hc08/mc68hc908gp32.h,
2261         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
2262
2263 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
2264
2265         * src/SDCCast.c (constExprValue): return NULL if not a value
2266         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
2267         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
2268         * support/regression/tests/bitfields.c: enabled signed bitfield for all
2269
2270 2006-02-13 Borut Razem <borut.razem AT siol.net>
2271
2272         * src/regression/ptrarg.c: added, fails due to bug #1430967
2273         * src/regression/Makefile: ptrarg.c added, ...
2274
2275 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
2276
2277         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
2278         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
2279
2280 2006-02-11 Borut Razem <borut.razem AT siol.net>
2281
2282         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
2283           print "Processor: xxx" message to stdout only if --verbose
2284
2285 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2286
2287         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
2288         * support/regression/tests/bug1426356.c: added
2289         * support/regression/tests/bitfields.c: removed 2 tests
2290
2291 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2292
2293         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
2294         * device/include/mcs51/c8051f330.h,
2295         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
2296           PCON_IDLE,PCON_STOP and added sfr16 definitions
2297         * device/lib/_divsint.c,
2298         * device/lib/_divuint.c,
2299         * device/lib/_divulong.c,
2300         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
2301           register bank bug for small stackauto
2302
2303 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2304
2305         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
2306
2307 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
2308
2309         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
2310         * all.dsp: corrected several bin paths
2311         * device/include/mcs51/c8051f120.h,
2312         * device/include/mcs51/c8051f300.h,
2313         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
2314           to PCON_IDLE,PCON_STOP
2315         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
2316         * device/lib/printf_large.c (output_float): fixed bug 1388703
2317         * support/regression/tests/bug1057979.c: added test for bug 1388703
2318
2319 2006-02-08 Raphael Neider <rneider AT web.de>
2320
2321         * src/pic/pcode.c (pciTRIS): fixed typo,
2322           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
2323           (LinkFlow): fixed handling of flows that end in a call,
2324           (ReuseReg): perform safety check earlier
2325         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
2326             to work with flows at the beginning of a pBlock,
2327             fixes #1426557 (Symbol not previously defined),
2328           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
2329             usage information
2330           (RemoveUnusedRegisters): update register usage info
2331         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
2332             created, reuse existing ones instead
2333         * src/pic/gen.c (genPcall): fixed #1424719
2334
2335 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
2336
2337         * link/z80/lkmain.c,
2338         * link/z80/lklex.c,
2339         * link/z80/lkdata.c,
2340         * link/z80/aslink.h: fixed build on current cygwin:
2341         replaced getline() by lk_getline()
2342
2343 2006-02-01 Borut Razem <borut.razem AT siol.net>
2344
2345         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
2346           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
2347           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
2348           src/regression/bool1.c, src/regression/bool2.c,
2349           src/regression/bool3.c, src/regression/call1.c,
2350           src/regression/compare.c, src/regression/compare10.c,
2351           src/regression/compare2.c, src/regression/compare3.c,
2352           src/regression/compare4.c, src/regression/compare5.c,
2353           src/regression/compare6.c, src/regression/compare7.c,
2354           src/regression/compare8.c, src/regression/compare9.c,
2355           src/regression/configword.c, src/regression/for.c,
2356           src/regression/inline.c, src/regression/mult1.c,
2357           src/regression/nestfor.c, src/regression/or1.c,
2358           src/regression/pointer1.c, src/regression/ptrfunc.c,
2359           src/regression/rotate1.c, src/regression/rotate2.c,
2360           src/regression/rotate3.c, src/regression/rotate4.c,
2361           src/regression/rotate5.c, src/regression/rotate6.c,
2362           src/regression/rotate7.c, src/regression/string1.c,
2363           src/regression/struct1.c, src/regression/sub.c,
2364           src/regression/sub2.c, src/regression/switch1.c,
2365           src/regression/while.c, src/regression/xor.c,
2366           src/regression/create_stc, src/regression/simulate,
2367           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
2368           regression tests
2369         * src/regression/gpsim_assert.h: added
2370
2371 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
2372
2373         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
2374         ((void (code *) (void)) 0) ();
2375         * as/hc08/aslex.c,
2376         * as/hc08/aslink.h,
2377         * as/hc08/asm.h,
2378         * as/hc08/asmain.c,
2379         * as/hc08/lkdata.c,
2380         * as/hc08/lklex.c,
2381         * as/hc08/lkmain.c,
2382         * as/mcs51/aslex.c,
2383         * as/mcs51/aslink.h,
2384         * as/mcs51/asm.h,
2385         * as/mcs51/asmain.c,
2386         * as/mcs51/lkdata.c,
2387         * as/mcs51/lklex.c,
2388         * as/mcs51/lkmain.c,
2389         * as/z80/aslex.c,
2390         * as/z80/asm.h,
2391         * as/z80/asmain.c: fixed build on current cygwin:
2392         replaced getline() by as_getline()
2393
2394 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
2395
2396         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
2397         declarator in the symbol chain
2398         * src/SDCCsymt.h,
2399         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
2400         parameter list for function pointers
2401         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
2402         * support/regression/tests/bug-716242.c: added
2403
2404 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
2405
2406         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
2407         offset if possible
2408         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
2409
2410 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
2411
2412         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
2413         inifinitely recurseable, added static
2414         * support/regression/tests/bug-1408066.c: added
2415
2416 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
2417
2418         * src/SDCCicode.h,
2419         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
2420         renamed, added possibility to create "postLoopLbl"-labels
2421         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
2422         newiTempLoopHeaderLabel
2423         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
2424         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
2425         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
2426         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
2427         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
2428         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
2429         (basicInduction): fixed bug #136564, made static,
2430         (loopInduction): changed parameter of basicInduction, made static,
2431         (addPostLoopBlock): added
2432         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
2433         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
2434         findLoopEndSeq
2435         * support/regression/tests/bug-136564.c: added
2436         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
2437         --std-sdcc99 to LIBSDCCFLAGS
2438
2439 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
2440
2441         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
2442         while loop
2443         * support/regression/tests/bug-1406131.c: added
2444
2445 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
2446
2447         * src/SDCCast.c (decorateType): fix promotion of unary minus
2448         * src/SDCCsymt.c (computeType): beautified
2449         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
2450         (valUnaryPM, valComplement): fix sign and promotion,
2451         (valNot): ANSI: result type is int (SDCC: unsigned char)
2452         * support/regression/tests/uminus.c: speedup by removing superflous
2453         test case 'int'
2454         * support/regression/tests/onebyte.c: added promotion and signedness
2455         tests for unary minus
2456         * support/regressions/tests/bug-477927.c: disable warning about
2457         uninitialized variables
2458         * support/regression/tests/not.c: added
2459
2460 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
2461
2462         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
2463         * src/mcs51/gen.c (gen51Code): show final register usage after
2464         fillGaps in asm with --i-code-in-asm
2465         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
2466         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
2467         incUsed, rliveClear, adjustIChain): made static,
2468         (setFromRange): excluded because it's unused,
2469         (findPrevUseSym, markWholeLoop): added,
2470         (findPrevUse): rewritten; fixes bug 895992; now a complete search
2471         through all branches of predecessors enables sdcc to emit the warning
2472         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
2473         (rlivePoint): made static, added parameter emitWarnings which is only
2474         true during the first run out of two,
2475         (findRecursiveSucc, findRecursivePred): removed,
2476         (computeLiveRanges): made static, added parameter emitWarnings,
2477         (dumpIcRlive): added for debugging only
2478         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
2479         removed prototype of setFromRange()
2480         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
2481         in call of computeLiveRanges()
2482         * support/regression/tests/bug-895992.c: added
2483         * support/regression/tests/bug-971834.c: added
2484         * support/valdiag/tests/bug-895992.c: added
2485         * support/valdiag/tests/bug-971834.c: added
2486
2487 2005-12-18 Raphael Neider <rneider AT web.de>
2488
2489         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
2490           (genUnpackBits): improved code for direct operands,
2491           (genPackBits): improved code for literal assignment to bitfields
2492             and for direct destination operands (no FSR indirection),
2493             prevented redundant AND, fixes #1362800,
2494           (AccLsh): added parameter to disable masking of the result
2495         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
2496           skip instructions with side-effects (like incfsz),
2497           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
2498         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
2499         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
2500           fixes #1375263
2501
2502 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
2503
2504         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
2505         volatile variables as spill location
2506
2507 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
2508
2509         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
2510         replacing literals
2511         * support/regression/tests/bug-1376320.c: added
2512
2513 2005-12-08 Raphael Neider <rneider AT web.de>
2514
2515         * src/pic/device.c: renamed is_shared to pic14_is_shared
2516         * src/pic/gen.c (genIfx): re-enabled handling of sbits
2517         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
2518           (is_valid_identifier): added for above workaround
2519
2520 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
2521
2522         * device/lib/Makefile.in: fixed to enable port-specific-objects
2523         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
2524           char, thanks Hubert Sack
2525         * doc/sdccman.lyx: documented --xstack-loc,
2526           elaborated a bit more on interrupts and pitfalls,
2527           removed "setjmp/longjmp unsupported",
2528           documented some unsupported C99 features
2529         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
2530         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
2531           if, thanks Hubert Sack
2532         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
2533         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
2534           make make_library
2535         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
2536           regression tests can report resource usage (rfe 700441)
2537         * support/regression/collate-results.py: report resource usage
2538         * support/regression/ports/ds390/spec.mk,
2539         * support/regression/ports/hc08/spec.mk,
2540         * support/regression/ports/mcs51/spec.mk,
2541         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
2542         * support/regression/ports/ds390/uCsim.cmd,
2543         * support/regression/ports/hc08/uCsim.cmd,
2544         * support/regression/ports/mcs51/uCsim.cmd,
2545         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
2546         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
2547           library, use the default one
2548         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
2549           building the library
2550
2551 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
2552
2553         * config.dsp: added dependency on .version and configure_vc.awk
2554         * device/include/setjmp.h: updated for --stack-auto and --xstack
2555         * device/include/mcs51/at89c51snd1c.h: corrected line endings
2556         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
2557         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
2558         * device/lib/libsdcc.lib: added _setjmp
2559         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
2560           (decorateType): fixed bug 1372851,
2561           (optimizeGetHbit): fixed warning
2562         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
2563           array initialisation
2564         * support/regression/tests/bug1057979.c: added test for bug 1358192
2565         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
2566
2567 2005-12-03 Borut Razem <borut.razem AT siol.net>
2568
2569         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
2570           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
2571
2572 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2573
2574         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
2575         createIval): implement symbol independant "flexible array member",
2576         (createIvalCharPtr): implemented flexible array initialisation with a
2577         string
2578         * src/SDCCsymt.c (copyStruct): removed,
2579         (getSize): fixed misleading comment,
2580         (getAllocSize): removed, the additional allocation size is now in
2581         sym->flexArrayLength,
2582         (checkStructFlexArray): new, syntax checks for flexible array members,
2583         (compStructSize): added syntax checks for "flexible array members"
2584         (copyStruct): removed,
2585         (copyLinkChain): removed inefficient fix for bug 770487
2586         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
2587         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
2588         symbol->flexArrayLength
2589         * src/SDCCerr.c,
2590         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
2591         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
2592         * support/regression/tests/structflexarray.c: added
2593         * support/valdiag/tests/structflexiblearray.c: added
2594
2595 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2596
2597         * src/SDCCast.c (decorateType): fixed bug 1368489
2598         * support/Util/SDCCerr.c,
2599         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
2600
2601 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2602
2603         * device/include/mcs51/at89c51snd1c.h: added file submitted by
2604           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
2605
2606 2005-11-27 Borut Razem <borut.razem AT siol.net>
2607
2608         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
2609           support/cpp2/mkdeps.h: added command line option
2610           -obj-ext=<extension> to SDCPP to define object file externion, used
2611           for generation of make dependencies (-M)
2612         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
2613
2614 2005-11-26 Borut Razem <borut.razem AT siol.net>
2615
2616         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
2617           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
2618           added pic and pic16 libraries
2619
2620 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2621
2622         * device/include/float.h: Corrected typo in prototype of __fsgt
2623
2624 2005-11-25 Borut Razem <borut.razem AT siol.net>
2625
2626         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
2627           added creation of model-mcs51-stack-auto libraries
2628
2629 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
2630
2631         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
2632         and fields-list too
2633         * src/SDCCast.c (createIvalArray): removed obsolete comment
2634
2635 2005-11-24 Borut Razem <borut.razem AT siol.net>
2636
2637         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
2638           added missing device/lib/mcs51/crt*.asm sources
2639
2640 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
2641
2642         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
2643
2644 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
2645
2646         * device/lib/_fs2schar.c,
2647         * device/lib/_fs2sint.c,
2648         * device/lib/_fs2slong.c: optimized inline asm
2649
2650 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2651
2652         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2653           Better handling of floats between -1.0 and 0.0.
2654
2655 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2656
2657         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
2658           (the missing "if"s prohibited removal of redundant labels)
2659
2660 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2661
2662         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2663           Properly convert floats between -1.0 and 0.0 to long, int, and char
2664           types (max integer value of negative floats tends to zero).
2665         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2666           Removed changes made so to work properly with floats between
2667           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
2668           and _fs2char.c
2669
2670 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2671
2672         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
2673         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
2674         (genCast) cosmetic change
2675         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
2676         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
2677         from mcs51
2678         * support/regression/tests/bitfields (testSignedBitfields): added
2679
2680 2005-11-18 Borut Razem <borut.razem AT siol.net>
2681
2682         * sdcc/device/lib/Makefile.in: remove all unnecessary files
2683         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
2684           introduced SILENT option to make building of pic16 libraries less
2685
2686 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2687
2688         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2689           Now they work properly with floats between -1.0 and 0.0
2690         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
2691
2692 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2693
2694         * src/SDCCicode.c (printOperand): added missing else
2695
2696 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2697
2698         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
2699         reformatted for better readability
2700         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
2701         signed bitfields
2702
2703 2005-11-17 Borut Razem <borut.razem AT siol.net>
2704
2705         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
2706           introduced SILENT option to make building of pic16 libraries less
2707           verbose - used for nightly snapshot build
2708         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
2709           available on Win32 platforms.
2710         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
2711           medium, large, pic and pic16
2712
2713 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2714
2715         * device/lib/printf_large.c: Temporary patch for bug 1358192:
2716           printf("%f"...) sets fraction to zero.
2717
2718 2005-11-16 Raphael Neider <rneider AT web.de>
2719
2720         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
2721           fixes #1357221
2722         * src/pic/gen.c (genIfx): implemented for CARRY bit
2723         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
2724           to generic pointers, fixes #1357332,
2725           (pic16_movLit2f): NEW,
2726           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
2727
2728 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2729
2730         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
2731
2732 2005-11-11 Raphael Neider <rneider AT web.de>
2733
2734         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
2735         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
2736           compute pointer's type from operand,
2737           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
2738           improved single bit reads, fixes bug #1353379
2739
2740 2005-11-09 Borut Razem <borut.razem AT siol.net>
2741
2742         * support/scripts/sdcc.nsi: added lib/pic to the package
2743
2744 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
2745
2746         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
2747
2748 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2749
2750         * support/regression/tests/bug1348008.c: added
2751         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
2752         * support/regression/tests/bug1337835.c: updated comment
2753
2754 2005-11-06 Borut Razem <borut.razem AT siol.net>
2755
2756         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2757           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2758           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2759           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2760           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
2761           dynamic construction of cl_error_class and derivates - 2.nd try
2762
2763 2005-11-05 Borut Razem <borut.razem AT siol.net>
2764
2765         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
2766           bug, which caused Bus Errors on sparc solaris
2767
2768 2005-11-04 Borut Razem <borut.razem AT siol.net>
2769
2770         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2771           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2772           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2773           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2774           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
2775           and derivates to resolve the initialization problem on OSX
2776
2777 2005-11-02 Borut Razem <borut.razem AT siol.net>
2778
2779         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2780           corrected typo - #include <winsock2.h>
2781
2782 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
2783
2784         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
2785           (_asxxxx_mapping): added org directive for future enhancements
2786
2787 2005-11-01 Borut Razem <borut.razem AT siol.net>
2788
2789         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2790           enabled sockets on WIN32
2791         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
2792
2793 2005-10-31 Borut Razem <borut.razem AT siol.net>
2794
2795         * support/regression/generate-cases.py: escape backslashes in {testcase}:
2796           WIN32 backslash path delimiters should be escaped when used in C strings
2797         * support/regression/tests/bitfields.c: exclude failing assertions for
2798           __CYGWIN32__ and __MINGW32__ hosts
2799
2800 2005-10-30 Borut Razem <borut.razem AT siol.net>
2801
2802         * src/SDCCutil.c: corrected double comparison typo
2803
2804 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
2805
2806         * device/lib/medium/Makefile: added for new memory model medium
2807         * device/include/asm/mcs51/features.h: updated for medium/pdata
2808         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
2809           added Multiply & Accumulate sbit's and MAC0_PAGE define
2810         * device/include/mcs51/c8051f300.h: added sfr16 definitions
2811         * device/include/mcs51/c8051f310.h: added sfr16 definitions
2812         * device/lib/_mullong.c: update for medium model
2813         * device/lib/incl.mk: added medium model
2814         * doc/sdccman.lyx: documented medium model
2815         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
2816         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
2817         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
2818         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
2819           (allocParms): set SCLS and OCLS to pdata for medium model
2820         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
2821           for pdata,
2822           (powof2): return <0 if not power of 2
2823         * src/avr/gen.c (genBitWise): use updated powof2
2824         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
2825           (shiftR2Left2Result): small optimization in setup, save acc when storing,
2826           (shiftLLeftOrResult): use B if necessary
2827         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
2828         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
2829         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
2830         * support/regression/Makefile.in: added test-mcs51-medium
2831         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
2832
2833 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2834
2835         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
2836         specifier unsigned
2837         * device/lib/time.c (mktime): fixed bug 1334315
2838
2839 2005-10-28 Raphael Neider <rneider AT web.de>
2840
2841         * device/include/pic/p16f_common.inc: added common declarations
2842         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
2843
2844 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2845
2846         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
2847           (aopPutUsesAcc): added to predict accumulator use,
2848           (assignResultValue): save acc if necessary,
2849           (genMinusDec): store result if indirectly addressed,
2850           (genDivOneByte):  save acc if necessary,
2851           (movLeft2Result): bugfix if left already in acc,
2852           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
2853             attention to accumulator use (esp. pdata),
2854           (genReceive): receive pdata correctly
2855         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
2856         * src/SDCCicode.h: added isOperandInPagedSpace prototype
2857
2858 2005-10-27 Raphael Neider <rneider AT web.de>
2859
2860         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
2861
2862 2005-10-27 Raphael Neider <rneider AT web.de>
2863
2864         * .version: changed version to 2.5.4
2865         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
2866         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
2867           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
2868             arithmetics support routines
2869         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
2870         * device/lib/Makefile.in: also create installdir for pic
2871
2872         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
2873           pic14 port as well
2874         * src/pic/device.c (dump_sfr): rewritten to delegate register
2875           placement to the linker (use `extern sym' rather than sym EQU addr),
2876           (validAddress): fixed to check last specified address
2877         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
2878           (popGetLit): truncate literal value to 8 bit,
2879           (popGet): moved assert to more appropriate place
2880           (popGetExternal): create pCode operand from and mark the according
2881             symbol as being `extern'
2882           (popGetAddr): added sanity check on immediate's offset, provide
2883             GPOINTER tag on demand
2884           (aopPut): fixed for immediates,
2885           (mov2w_op): move operand's address or contents to WREG (depending on
2886             operand type), safer variant of mov2w,
2887           (movwf,call_libraryfunc): NEW, handy abbreviations,
2888           (get_argument_pcop,get_return_val_pcop,pass_argument,
2889           get_returnvalue): interface for accessing function parameters and
2890             return values,
2891           (assignResultValuei,genRet): use new parameter/return value interface
2892           (pic14_getDataSize): back to old version handling generic pointers,
2893           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
2894             provided implementation and/or fixed old one,
2895           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
2896             calls, removed legacy 8051 reference code
2897           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
2898           (loadSignToC): NEW, move the operands sign bit to CARRY,
2899           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
2900             genRightShiftSigned, accepts negative shift counts,
2901           (setup_fsr): load FSR and adjust IRP (indirect memory access),
2902           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
2903             generic pointers, __data pointers and __code pointers,
2904           (genUnpackBits,genPackBits): rewritten to work with generic pointers
2905             and signed bitfields, limit bitfields to 8 bit,
2906           (genDataPointerGet): fixed number of bytes read,
2907           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
2908           (genPointerGet,genPointerSet): fixed handling of __code pointers,
2909             pointers to constant data are no longer assumed to point to __code
2910             space, removed invalid pointer types,
2911           (bitpatternFromVal): retrieve the PICs representation of an integer
2912             or float literal,
2913           (genDataPointerSet): fixed assigning to po_immediate operands,
2914           (genGenPointerSet): implemented as library call,
2915           (genIfx): fixed incorrect condition,
2916           (genAddrOf): limit generic pointers' addresses to 2 bytes,
2917             provide GPOINTER tag according to destination's storage class,
2918           (genCast): added code to handle casting to generic pointers, added
2919             sign-/zero extension of the result
2920           (aop_isLitLike,op_isLitLike): fixed handling of immediates
2921         * src/pic/gen.h: added macros to access IRP bit in STATUS register
2922         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
2923           extend the result
2924         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
2925           address/register resides in the shared banks
2926           (emitSymbolToFile): improved to handle global and `pinned' symbols,
2927             put all variables into separate sections (have the linker arrange
2928             them)
2929           (picglue): put init code and interrupt handlers in separate sections
2930         * src/pic/main.c: added port specific options table, modified to PORT
2931           structure to make GPOINTERs 3 byte, added pic14_options
2932           (_pic14_do_link): private linking routine (update paths to libraries,
2933             add libsdcc.lib by default)
2934         * src/pic/main.h: declare pic14_options
2935         * src/pic/pcode.c: fixed instructions i/o relations,
2936           (RegCond): reverted to correct version,
2937           (newpCodeOpLit): truncate literals to 8 bit,
2938           (genericPrint): added debug output,
2939           (getRegFromInstruction): fixed for various operand types, simplified
2940           (BuildFlow): fixed broken handling of isntructions with labels
2941           (LinkFlow): start at last instruction in flow (skip trailing comments),
2942             pass the flow on to the next instruction after CALL
2943           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
2944           (insertPCodeInstruction): fixed inserting after a skip instruction,
2945           (DoBankSelect): fixed for labeled instructions
2946           (OptimizepBlock): honor --nopeep switch
2947           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
2948         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
2949         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
2950           (pCodeOptime2pCodes): allow disabling this optimization via
2951             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
2952             but is still buggy), started implementation of a dataflow based
2953             pCode optimization (CSE + dead code elimination)
2954           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
2955         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
2956           names are independant of the stack location and therefore portable across
2957           devices
2958
2959 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2960
2961         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
2962           (selectSpil): fixed bug 1337835 by not spilling bit variables
2963         * support/regression/tests/bug1337835.c: added test for this bug
2964         * src/mcs51/peeph.def: restart after rule 3.c,
2965           addded rules 263.x to optimize loading constants
2966
2967 2005-10-26 Raphael Neider <rneider AT web.de>
2968
2969         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
2970         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
2971           (genAssign): emit warning when casting literals to generic pointer
2972             type, also applies when taking the address of a fixed variable,
2973           (genCast): improved casting to generic pointers
2974         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
2975           extern variables, added verbose error message
2976         * device/include/pic16/{string.h,errno.h}: added #pragma library c
2977
2978 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
2979
2980         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
2981         carry must be complemented too
2982         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
2983         could be emitted by genMinus
2984         * src/SDCCval.c (constVal): fixed bug 1305065
2985
2986 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
2987
2988         * src/SDCCast.c (addCast): added promotion for bit variables
2989         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
2990         promotion casts + optimisation
2991         (optimizeGetWord): fix warning 'i' might be used uninitialized
2992         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
2993         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
2994
2995 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2996
2997         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
2998         all chars are promoted to int; promotion should be handled in SDCCast.c
2999
3000 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3001
3002         * device/lib/_strcmp.c: Fixed bug 1326457
3003
3004 2005-10-11 Raphael Neider <rneider AT web.de>
3005
3006         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
3007         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
3008
3009 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3010
3011         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
3012         * support/regression/tests/sfr16.c: added test for the sfr32 bug
3013
3014 2005-10-04 Raphael Neider <rneider AT web.de>
3015
3016         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
3017           device/lib/pic16/pics.all: added pic18f1320
3018         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
3019
3020 2005-09-30 Raphael Neider <rneider AT web.de>
3021
3022         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
3023         * src/pic16/devices.inc: NEW, provides device descriptions
3024         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
3025
3026 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
3027
3028         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
3029           GETHBIT
3030
3031 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
3032
3033         * doc/sdccman.lyx: updated Highest Order Bit documentation,
3034           documented Any Order Bit, Higher Order Byte and Higher Order Word
3035         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
3036         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
3037           (optimizeGetAbit): new, to get any bit, not only the high bit,
3038           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
3039           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
3040           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
3041           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
3042             RIGHT_OP: also try GETBYTE, GETWORD optimization,
3043             GETABIT, GETBYTE, GETWORD: decorate them,
3044           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
3045           (ast_print): added GETABIT, GETBYTE, GETWORD
3046         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
3047         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
3048           (geniCodeBinary): new generic binary icode,
3049           (ast2iCode): added GETABIT, GETBYTE, GETWORD
3050         * src/port.h: updated comment for PORT.hasExtBitOp
3051         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
3052           (genGetByte): new, to get a single byte,
3053           (genGetWord): new, to get a word from a long,
3054           (gen51Code): added GETABIT, GETBYTE, GETWORD
3055         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
3056
3057 2005-09-23 Raphael Neider <rneider AT web.de>
3058
3059         * configure.in, configure: have device/lib/pic configured
3060         * device/lib/Makefile.in: added model-pic14
3061         * device/lib/clean.mk: added pic/ to clean rule
3062         * device/lib/pic: added rudimentary pic14 library providing support
3063           functions for multiplication/division/generic pointer access
3064         * src/SDCCopt.c (convilong): mark support functions as extern
3065           for pic14 port as well
3066         * src/pic/gen.c (genMult): added assertions,
3067           (genpic14Code): emit warning on unhandled iCodes
3068         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
3069         * src/pic/pcode.c (pCodeOpCopy),
3070         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
3071           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
3072           SFR_REGISTER}), made safe for future extensions
3073         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
3074           instructions even if preceeded by SKIP instructions (also remove
3075           them); removed unused code
3076         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
3077           prevents leaving parts of the structure uninitialized after copying
3078
3079 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
3080
3081         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
3082           ago by me
3083         * support/regression/tests/addsub.c: added test for the bug
3084
3085 2005-09-21 Raphael Neider <rneider AT web.de>
3086
3087         * device/include/pic16/pic18f1220.h,
3088           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
3089         * device/lib/pic16/Makefile.rules: added missing opening paren
3090         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
3091           are provided in genutils.c,
3092           (genUminusFloat,genUminus,genCmpEq): added asserts on different
3093           operand/result sizes,
3094           (genCmp): assert on NULL pointers first, then check deref'ed values
3095         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
3096           result size
3097
3098 2005-09-18 Raphael Neider <rneider AT web.de>
3099
3100         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
3101           as these are now unused,
3102           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
3103         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
3104           local, avoids uninitialized pointer dereference on r->name
3105         * src/pic16/ralloc.c (newReg): fixed indentation
3106
3107 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
3108
3109         * src/SDCCval.c (constVal): fixed bug 730366
3110         * support/Util/SDCCerr.c,
3111         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
3112
3113 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
3114
3115         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
3116
3117 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
3118
3119         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
3120
3121 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3122
3123         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
3124           (hex2dec): made hex_digit unsigned char, removed ascii dependance
3125         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
3126           (hex2dec): made hex_digit unsigned char, removed ascii dependance
3127         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
3128         * packihx/packihx.c (hexDigit): made c unsigned char
3129         * as/mcs51/lklibr.c (fndsym),
3130         * link/z80/lkgb.c (gb),
3131         * link/z80/lklibr.c (fndsym),
3132         * link/z80/lkrloc.c (relr),
3133         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
3134         * src/SDCC.lex (checkCurrFile, process_pragma),
3135         * src/SDCCglue.c (spacesToUnderscores),
3136         * src/SDCCmain.c (setParseWithComma, processFile),
3137         * src/asm.c (tvsprintf, printCLine),
3138         * src/avr/gen.c (emitcode, aopPut),
3139         * src/ds390/gen.c (emitcode),
3140         * src/hc08/gen.c (emitcode, emitinline),
3141         * src/mcs51/gen.c (emitcode, genInline),
3142         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
3143           tokenizeLineNode),
3144         * src/pic/ralloc.c (debugLog),
3145         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
3146           tokenizeLineNode),
3147         * src/pic16/ralloc.c (debugLog),
3148         * src/z80/main.c (_process_pragma):
3149            made all ctype.h function calls safe
3150         * src/SDCCopt.c: include math.h for fabs
3151         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
3152           and used them throughout the code to make ctype.h function calls safe
3153         * src/ds390/main.c (asmLineNodeFromLineNode),
3154         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
3155         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
3156            unsigned char*
3157         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
3158           (newpCodeAsmDir): made ctype.h function calls safe
3159         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
3160           pic16_emitcode):  made lbp unsigned char*
3161         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
3162           (pic16_newpCodeAsmDir): made ctype.h function calls safe
3163         * src/xa51/gen.c (emitcode),
3164         * src/z80/gen.c (_emit2): made lbp unsigned char*
3165         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
3166            char*
3167
3168 2005-09-05 Raphael Neider <rneider AT web.de>
3169
3170         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
3171           access bank splitpoint
3172
3173 2005-09-05 Raphael Neider <rneider AT web.de>
3174
3175         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
3176
3177 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
3178
3179         * .version: changed to version 2.5.3
3180         * doc/sdccman.lyx: changed version to 2.5.3,
3181           documented --codeseg and --constseg and pragma codeseg and constseg,
3182           documented bit parameters (reentrant) and bit returning
3183         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
3184            currFunc->recvSize, but is this ok for all ports?
3185           (ast2iCode): result of ~ on unsigned char must be cast to int for
3186            bool to work
3187         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
3188           function pointers in bit space
3189         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
3190           (processFuncArgs): call port.reg_parm() with reentrancy info
3191         * src/port.h,
3192         * src/avr/main.c,
3193         * src/ds390/main.c,
3194         * src/hc08/main.c,
3195         * src/pic/main.c,
3196         * src/pic16/main.c,
3197         * src/xa51/main.c,
3198         * src/z80/main.c: port.reg_parm prototype extended with
3199           "bool reentrant" parameter
3200         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
3201           options.stackAuto for allocating bit register parameters
3202         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
3203           (genSend): set BitBankUsed if it is,
3204           (selectRegBank): factored out of genCall for use in genPcall,
3205           (genCall): removed redundant dtype assignmen, use selectRegBank,
3206           (genPcall): handle returning in Carry properly, save in F0 if needed,
3207           (genReceive): handle bit register parameters
3208         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
3209           (mcs51_assignRegisters): enable bit registers for all reentrant
3210            functions and don't set BitBankUsed unconditionally
3211         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
3212         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
3213         * support/regression/tests/funptrs.c: added tests for BOOL and for return
3214
3215 2005-08-27 Borut Razem <borut.razem AT siol.net>
3216
3217         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
3218         ppc-osx (Darwin) does not support -u option. It seems that it is
3219         supported only on Linux - GNU cp
3220
3221 2005-08-25 Borut Razem <borut.razem AT siol.net>
3222
3223         * sim/ucsim/gui.src/serio.src/Makefile.in,
3224           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
3225           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
3226           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
3227           install and strip, since the strip at /usr/ccs/bin should be used
3228           on solaris
3229
3230 2005-08-24 Borut Razem <borut.razem AT siol.net>
3231
3232         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
3233
3234 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
3235
3236         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
3237         ffffffffu
3238
3239 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
3240
3241         * as/mcs51/aslink.h: completed lkrloc.c prototypes
3242         * as/mcs51/lkmain.c (link_main): fixed warning
3243         * device/include/stdbool.h: ds390 has no advanced bit support yet
3244         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
3245         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
3246         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
3247           and updated their macros
3248         * src/SDCCval.c (constVal): updated comment for renamed b_long
3249
3250 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
3251
3252         * as/mcs51/asdata.c: changed ctype['['] to BINOP
3253         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
3254           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
3255           (oprio): set priority for '['
3256         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
3257            and adb_24_bit
3258         * as/mcs51/asm.h: added defines R_BIT and S_BIT
3259         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
3260         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
3261         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
3262           added overlayable BIT_BANK area
3263         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
3264           (summary2): explain 'T' in legenda
3265         * as/mcs51/lkrloc.c: replaced old K&R style,
3266           (relr): added R_BIT processing,
3267           (errmsg): added "Bit-addressable relocation error",
3268           (adb_bit): added for converting from byte- to bit-addressable space,
3269           (adb_24_bit): added for converting from byte- to bit-addressable space
3270         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
3271            used in reentrant functions now even as return value
3272         * device/lib/_gptrput.c (_gptrput): removed obsolete code
3273         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
3274           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
3275         * src/SDCCglobl.h: added indicator BitBankUsed
3276         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
3277            the bit registers b0-b7
3278         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
3279           (geniCodeCast): fixed bug 1263853,
3280           (geniCodeLogicAndOr): put result in bool or char,
3281           (geniCodeReceive): added parameter func for accessing the return type,
3282           (geniCodeFunctionBody): pass func to geniCodeReceive
3283         * src/SDCCmain.c: added indicator BitBankUsed
3284         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
3285         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
3286           (checkSClass): don't put automatic bool/bit on stack,
3287           (checkFunction): removed check on function cannot return bit
3288         * src/SDCCsymt.h: added newBoolLink prototype
3289         * src/mcs51/gen.c (rb1regs): added bit registers,
3290           (movc): created for assigning to carry,
3291           (pushReg, popReg): created for pushing registers,
3292           (sameRegs): check both AOP_REG and AOP_CRY types,
3293           (aopOp): handle bit registers,
3294           (aopPut): optimization no self-assign,
3295           (saveRegisters): push reg->base (bits) only once for bit registers,
3296            and use pushReg,
3297           (unsaveRegisters): pop reg->base only once and use popReg,
3298           (assignResultValue): added parameter func and return in carry for bits,
3299           (genIpush): optimization no reload in A if not changed,
3300           (genSend): bit parameters in reentrant functions are passed in bit
3301            registers by first assigning to bits in B, then save registers and
3302            copy B to bits,
3303           (genCall): handle returning in Carry properly, save it in F0 if needed,
3304           (genPcall): updated assignResultValue call, this is not safe yet for bit
3305            returning function !!!
3306           (genFunction): don't generate equ's for bit registers and use pushReg,
3307           (genEndFunction): take care of bit returning functions and use popReg,
3308           (genRet): return bit in Carry,
3309           (genIfx): optimize bit registers and other directly addressable bits,
3310           (genReceive): updated assignResultValue call
3311         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
3312           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
3313            registers when using stack-auto
3314         * src/mcs51/ralloc.c (_G): added allBitregs,
3315           (regs8051): added the bit registers,
3316           (createStackSpil): use macro IS_BIT,
3317           (getRegBit): added to allocate a bit register, else spill,
3318           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
3319           (updateRegUsage): factored out to ease stepping while debugging,
3320           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
3321            also allocate bit registers,
3322           (fillGaps): handle bit registers,
3323           (findAllBitregs): added to create bit vector with all bit registers,
3324           (mcs51_allBitregs): returns this bit vector,
3325           (mcs51_assignRegisters): when using stack-auto use bit registers for
3326            passing parameters and creating local variables
3327         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
3328
3329 2005-08-22 Borut Razem <borut.razem AT siol.net>
3330
3331         * device/lib/Makefile.in: replaced find option -or with -o
3332           to make it run on solaris
3333
3334 2005-08-22 Raphael Neider <rneider AT web.de>
3335
3336         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
3337           fixes #1265442 (crash on Solaris)
3338
3339 2005-08-20 Borut Razem <borut.razem AT siol.net>
3340
3341         * configure, configure.in: added tests for libsocket and libnsl libraries,
3342           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
3343           from support/regression/Makefile.in
3344         * support/regression/Makefile.in: added
3345         * device/lib/pic16/Makefile.common.in: force make to use bash shell
3346         * sim/ucsim/libtool: regenerated on sparc-solaris
3347         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
3348           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
3349           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
3350           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
3351           sparc-solaris, which doesn't use GNU ld linker
3352         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
3353         * as/Makefile: find on sparc-solaris does not support -maxdepth option
3354
3355 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
3356
3357         * src/mcs51/peeph.def: updated comments
3358
3359 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3360
3361         * device/lib/_gptrget.c,
3362         * device/lib/_gptrput.c: slightly shorter
3363         * doc/sdccman.lyx: incremented version
3364         * src/mcs51/peeph.def: moved peephole comments to the line of first
3365           change to better keep line correlation, reanimated 186.e
3366         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
3367
3368 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3369
3370         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
3371           David Saxton with quotes around file name.
3372
3373 2005-08-15 Borut Razem <borut.razem AT siol.net>
3374
3375         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
3376           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
3377           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
3378           make tests run on x86_64 platform
3379
3380 2005-08-13 Raphael Neider <rneider AT web.de>
3381
3382         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
3383           as it might be executed DURING a build (parallel make is wonderful)
3384
3385 2005-08-13 Raphael Neider <rneider AT web.de>
3386
3387         * device/lib/Makefile.in (port-specific-objects-pic16):
3388           revert to cp $(PORT)/bin/*.* $(PORTDIR)
3389         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
3390           dependency
3391         * device/lib/pic16/Makefile.rules: build subdirs before creating
3392           the library, removed builddir rule, create $(builddir) early in
3393           recurse rule, use empty recurse rule for leaf directories
3394         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
3395           mkdir errors (race condition), removed duplicate suffix "hex"
3396           from clean rules
3397         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
3398         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
3399           prevents mkdir -p from aborting on Alpha
3400
3401 2005-08-12 Raphael Neider <rneider AT web.de>
3402
3403         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
3404           db-statements in order to allow for arrays of pointers in code
3405           sections to be placed without interspersed 0-padding, fixes
3406           bug #1256215
3407         * (emitStatistics): fixed division by zero for pic18f1220
3408         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
3409           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
3410         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
3411         * (pic16_pCodeConstString): keep track of already emitted string
3412           literals to prevent "duplicate definitions of symbol _str_NR"
3413         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
3414           debug message
3415         * device/lib/Makefile.in: ignore failing PIC16 library builds
3416         * device/lib/pic16/Makefile: do not build if gputils are missing
3417         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
3418
3419 2005-08-10 Raphael Neider <rneider AT web.de>
3420
3421         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
3422           my last commit)
3423
3424 2005-08-10 Raphael Neider <rneider AT web.de>
3425
3426         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
3427           Rokas' patch to add the new fixed point type "__fixed16x16"
3428         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
3429           functions for __fixed16x16 arithmetics
3430         * device/lib/pic16: reimplemented the build system to support
3431           a separate build directory, better handling of libio (create
3432           the library in a separate subdir for each architecture) and
3433           easier configuration (centralized in Makefile.common)
3434
3435 2005-08-07 Raphael Neider <rneider AT web.de>
3436
3437         * src/pic16/gen.c (genrshTwo): fixed sign extension
3438         * src/pic16/device.c: added pic18f2320, 4220 and 4320
3439         * device/include/pic16/pic18f2220.h: changed some bit definitions,
3440           added T0CONbits
3441         * device/include/pic16/pic18f4220.h: NEW, header for
3442           pic18f4220 and pic18f4320
3443         * device/include/pic16/pic18fregs.h: added new devices,
3444           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
3445         * device/include/pic16/signal.h: resolved name clashes
3446           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
3447           to also allow testing for interrupt enable bits, added
3448           comments on how to use the macros
3449         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
3450         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
3451           register definitions for the devices
3452         * device/lib/pic16/pics.all: added new devices
3453         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
3454           allocated memory
3455         * device/lib/pic16/libc/stdlib/memfree: do not count
3456           the block header as free memory
3457         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
3458           simplified and added missing end-of-blocklist-marker
3459           (reported by Peter Onion, fixes #1252814)
3460         * (_mergeHeapBlock): fixed loop condition
3461         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
3462           len==0, restructured code
3463         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
3464           up a bit, reduced bitfield accesses, prevent endless loops
3465           in case of heap corruption
3466         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
3467           "unreferenced arguments/must return a value" warnings
3468         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
3469           replaced BAUDREG with SPBRG
3470         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
3471           device/lib/pic16/debug/gstack/gstack.c: replaced
3472           _naked, _asm, _endasm with __naked, __asm, __endasm
3473
3474 2005-08-05 Raphael Neider <rneider AT web.de>
3475
3476         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
3477           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
3478
3479 2005-08-05 Borut Razem <borut.razem AT siol.net>
3480
3481         * device/lib/Makefile.in: added missing ';'
3482         * configure: removed ^M characters
3483
3484 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3485
3486         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
3487           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
3488           License
3489
3490 2005-08-04 Borut Razem <borut.razem AT siol.net>
3491
3492         * configure.in: pic16 libraries build 2nd try - enable running
3493           configure in device/lib/pic16
3494         * configure: regenerated from configure.in
3495         * device/lib/Makefile.in: create $(PORT)/bin directory
3496
3497 2005-08-03 Raphael Neider <rneider AT web.de>
3498
3499         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
3500           to get/set values via pointers
3501         * (genUnpackBits,genPackBits): changed detection of
3502           ptr->bitfield vs. sym.bitfield, fixed access via generic
3503           pointers, removed dead (wrong) code for multibyte bitfields
3504         * (genNearPointerGet, genGenPointerGet): removed useless code,
3505           fixed bitfield detection, fixes #1250594
3506         * (genNearPointerSet): removed useless code
3507         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
3508           and introduced macro pic16_emitpcode that conditionally emits
3509           the origin of the following pCode (useful for debugging SDCC)
3510         * src/pic16/pcode.c: changed (and disabled) some debug outputs
3511         * (createDefmap): fixed handling of LFSR for --optimize-df
3512
3513 2005-08-02 Borut Razem <borut.razem AT siol.net>
3514
3515         * device/lib/Makefile.in: pic16 libraries build enabled since
3516           gputils-0.13.2 are now localy installed at sourceforge's compile farm
3517
3518 2005-08-02 Raphael Neider <rneider AT web.de>
3519
3520         * src/pic16/gen.c (genPackBits): removed deprecated warning
3521         * (genGenPointerSet): fixed bitfield detection
3522
3523 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3524
3525         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
3526
3527 2005-07-31 Raphael Neider <rneider AT web.de>
3528
3529         * device/lib/pic16/libdev/pic18f458.c,
3530           device/include/pic16/pic18f458.h: added missing T0CONbits
3531
3532 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3533
3534         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
3535
3536 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
3537
3538         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
3539
3540 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3541
3542         * device/include/mcs51/at89c51ed2.h: added.
3543
3544 2005-07-23 Raphael Neider <rneider AT web.de>
3545
3546         * src/pic/gen.h: added emitpcode macro for debugging
3547         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
3548           and replace by macro adding debug information on demand
3549         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
3550         * (gencjne): tried to fix; replaced with correct (slower) code
3551         * (gen{Unp,P}ackBits): fixed single bit access
3552         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
3553         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
3554           previous instruction
3555         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
3556           register has to be handled with care (forbidding movement
3557           of assignments/uses, removing assignments completely, ...)
3558         * (pCodeOptime2pCodes): make use of regIsSpecial
3559         * added lots of debugging output (commented out)
3560         * src/pic/rallloc.c (deassignLRs): prevent operand registers
3561           from being reused as result UNLESS it is known to work
3562
3563 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
3564
3565         * support/Util/dbuf.h: include <stddef.h> for size_t
3566         * .version: changed to version 2.5.2
3567
3568 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3569
3570         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
3571
3572 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3573
3574         * src/hc08/gen.c (genMinus): fixed bug #1241835,
3575           (genModOneByte): removed needless psha/pula
3576
3577 2005-07-22 Raphael Neider <rneider AT web.de>
3578
3579         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
3580           have PIC14 handled like PIC16, fixes broken pic14 linker calls
3581         * src/pic/gen.c (resolveIfx): do not "invent" labels
3582         * (genSkipc): changed to positive logic
3583         * (genSkipCond): removed as no longer needed
3584         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
3585           backport from PIC16
3586         * (genLeftShift): check operands are in different registers
3587         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
3588           INCF does not update CARRY...
3589         * src/pic/main.c: fixed _linkCmd
3590         * src/pic/pcode.c (unlinkpCode): added inactive code
3591         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
3592           alive (do not assign result and operand overlapping registers)
3593
3594 2005-07-22 Raphael Neider <rneider AT web.de>
3595
3596         * src/pic/device.c (dump_sfr): replaced register declaration with
3597           call to emitSymbolToFile() to avoid duplicate symbols
3598         * (assignRelocatableRegisters): do not declare external symbols
3599         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
3600           right (take size of type, not etype)
3601         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
3602         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
3603         * (packRegsForAccUse): disabled assignment of WREG as
3604           the result reg to prevent occurence of just fixed #1235003,
3605           fixes #1242954
3606         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
3607           symbols (avoids duplicate symbols in .asm file)
3608         * (pic14emitRegularMap): use emitSymbolToFile()
3609         * src/pic/gen.c (aopOp): fixed spillLocation handling
3610         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
3611         * (genDataPointerSet): removed unneccessary variables/output
3612
3613 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
3614
3615         * as/mcs51/lkarea.c: enlarged codemap for banked memory
3616         * device/lib/mcs51/crtbank.asm: added # to 0x0F
3617
3618 2005-07-21 Raphael Neider <rneider AT web.de>
3619
3620         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
3621           architecture cannot handle them efficiently, fixes bug #1235003
3622         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
3623           check for empty sets before using them (fixes bug #1232190)
3624
3625 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
3626
3627         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
3628           (lnksect2): generate warnings for memory overlap
3629         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
3630           constseg to set the name of these segments so you can instruct the linker
3631           to place them in banks
3632         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
3633         * src/SDCCglobl.h: added MODEL_HUGE to enum,
3634           added code_seg and const_seg to options
3635         * src/SDCCglue.c (emitMaps): use options.const_seg,
3636           (createInterruptVect): put interrupt vectors in segment HOME,
3637           (glue): put HOME before static segment and put the main glue in HOME,
3638           (glue): use options.code_seg
3639         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
3640         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
3641           these segments so you can instruct the linker to place them in banks
3642           (linkEdit): use code_loc for HOME segment which should be the first
3643           segment in code memory now
3644         * src/SDCCmem.c: fixed more stuff like bug 1238386
3645         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
3646           (changePointer): don't change function pointers to code pointers for
3647           banked functions,
3648           (compareType): added exceptional check for banked function pointers
3649         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
3650         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
3651           after static in code memory
3652         * src/mcs51/gen.c: added aopLiteralLong prototype,
3653           (aopForSym): use getSize for functions,
3654           (genCall): generate banked calls over one trampoline __sdcc_banked_call
3655           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
3656           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
3657           the segment,
3658           (genPcall): use call for literal function pointers and generate banked
3659           calls over the one trampoline so there's only one place for the user to
3660           modify according to his/hers hardware,
3661           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
3662           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
3663         * src/mcs51/main.c: added keyword banked,
3664           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
3665         * support/Util/SDCCerr.c,
3666         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
3667           needed for passing the bank and address to the trampoline
3668         * device/lib/mcs51/crtbank.asm: added for bankswitching
3669         * device/lib/mcs51/Makefile: added crtbank
3670
3671 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3672
3673         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
3674           for fields at offset 0 of a struct or union as reported
3675           on 2005-07-07 in the developer mailing list.
3676
3677 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
3678
3679         * src/SDCCmem.c: fixed bug 1238386
3680
3681 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3682
3683         * src/mcs51/peeph.def: added labelrefcounting for peepholes
3684           (patch #1144962), added peephole 300, enabled 259.x
3685         * doc/sdccman.lyx: removed screenshot and provided link instead
3686
3687 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3688
3689         * doc/sdccman.lyx: added section about debugging with ddd
3690         * doc/figures/ddd_example.eps: screenshot of debugging session
3691
3692 2005-07-04 Raphael Neider <rneider AT web.de>
3693
3694         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
3695           like CODE pointers, fixes #1115683
3696         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
3697           call, fixes bugs #1232211, #1228110,
3698           fixed wrong casts to pCodeFlow from pCodeInstructions
3699
3700 2005-07-04 Raphael Neider <rneider AT web.de>
3701
3702         * src/pic/gen.c (popGet): changed assert to allow for
3703           bit operands
3704         * (popGetAddr): changed signature to provide
3705           an additional index, patched all call sites
3706         * (genCmpEq): handle literal-like operands correctly
3707         * (genAddrOf): added sanity checks on __code/__data pointers
3708         * (genAssign): added handling of symbols from __code section
3709         * (gencjne): do not generate code for comparisons whose result
3710           is neither stored nor used, fixes bug #1171114
3711         * (AccLsh, AccRsh): operate on operand instead of WREG
3712         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
3713           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
3714           by known count
3715         * rewrote complete shift-by-literal logic, commented unused
3716           functions out
3717         * (genConstPointerGet): get multiple bytes (if result size > 1),
3718           fixed handling of non-immediate addresses
3719         * (genPointerGet): handle CODE pointers like CONST pointers
3720         * (genpic14Code): insert C-SRC lines as Cource-pCodes
3721         * ({aop,op}_isLitLike): NEW, single place to decide whether an
3722           operand is to be treated as a literal or not
3723         * (mov2w,genPcall,genCmpEq),
3724           src/pic/genarith.c: use aop_isLitLike() to decide between
3725           literal/register contents
3726         * (addSign): added missing offset
3727         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
3728           only emit comment in debug-mode,
3729           use {aop,op}_isLitLike throughout the file
3730         * src/pic/glue.c: fix initializers for pointers (work in progress)
3731         * src/pic/pcode.c (get_op): honor index on _const symbols
3732         * ({reset,dump}pCodeStatistics): NEW, estimate code size
3733         * (dumppBlock): added pCode size estimation
3734         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
3735           check for IS_SYMOP before OP_SYMBOL'ing
3736         * fixed indentation, compacted switch-statements
3737         * (allocReg): find free register and allocate it instead of
3738           allocating new registers all the time
3739         * (deassignLRs): prevent POINTER_GET's from being assigned the same
3740           registers as its operands (necessary only for multibyte GETs)
3741
3742 2005-07-01 Raphael Neider <rneider AT web.de>
3743
3744         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
3745           debugging .asm-output macros FENTRY + FEXIT
3746         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
3747           way... I wonder...
3748         * (emitpComment): NEW, printf to pCode
3749         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
3750           offset handling
3751         * (popGetAddr): NEW, variant of popGet to access an immediates
3752           high(er) bytes instead of the n'th byte of memory they reference,
3753           replaced popGet with popGetAddr where neccessary
3754         * (genDataPointerGet): reactivated and fixed implementation
3755         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
3756           accesses
3757         * (genDataPointerSet): fixed multibyte assignments
3758         * (genpic14Code): fixed --i-code-in-asm handling
3759         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
3760         * (genPlus): fixed index-out-of-bounds error
3761         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
3762         * src/pic/ralloc.c: added debugging output macro FENTRY2
3763         * (spillThis): fixed indentation, enbraced for-body for clarity
3764         * (rematStr): commented out as now unused
3765         * (regTypeNum): commented out special spill case (overwrites
3766           arbitrary values)
3767         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
3768
3769 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
3770
3771         * doc/sdccman.lyx: documented sfr16/sfr32,
3772           added example for using storage class with function pointers
3773         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
3774
3775 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
3776
3777         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
3778         * device/lib/_itoa.c,
3779         * device/lib/_ltoa.c: optimized codesize
3780         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
3781           but don't know how to suppress the double warning.
3782         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
3783         * support/Util/SDCCerr.c,
3784         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
3785
3786 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
3787
3788         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
3789           fixed old K&R prototypes
3790         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
3791         * device/lib/_gptrget.c,
3792         * device/lib/_gptrgetc.c,
3793         * device/lib/_gptrput.c: changed versions for new memory indicator values,
3794           also new versions for small generic pointers and banked generic pointers
3795         * src/port.h: added const_name
3796         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
3797         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
3798         * src/SDCCcse.c (findPrevIc): check all associative operators
3799         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
3800         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
3801         * src/SDCCmem.c: updated comments,
3802           set far-space to 0 for pdata, results in optimized code
3803         * src/SDCCmem.h: added macro CONST_NAME
3804         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
3805           moving the info into the highest bits, see also gptrget/gptrput
3806         * src/src.dsp: added sdcc.ico to project files
3807         * src/avr/gen.c (genCast): fixed bug 0x%d
3808         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
3809         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
3810           relation between ptr_type and DCL_TYPE,
3811           (genCast): fixed bug 0x%d
3812         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
3813           (CODE)" for const_name
3814         * src/hc08/gen.c (genCast): fixed bug 0x%d
3815         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
3816           (hc08_port): added "CONST (CODE)" for const_name
3817         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
3818           (aopForRemat, adjustArithmeticResult): disconnected direct relation
3819           between ptr_type and DCL_TYPE,
3820           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
3821           operand* and took AOP() inside function so sfr-ness can be checked,
3822           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
3823           new prototype,
3824           (genFunction, genEndFunction): optimized stack setup,
3825           (genMinus): optimized for literals with ending zeroes (in bytes),
3826           (genCast): fixed bug 0x%d
3827         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
3828           (mcs51_port): added "CONST (CODE)" for const_name
3829         * src/mcs51/peeph.def: made rule 226 more generic
3830         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
3831         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
3832         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
3833         * src/z80/main.c (z80_port): added NULL for const_name,
3834           (gbz80_port): added NULL for const_name
3835         * support/regression/tests/bug663539.c,
3836         * support/regression/tests/sfr16.c: new tests
3837
3838 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3839
3840         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
3841
3842 2005-06-24 Raphael Neider <rneider AT web.de>
3843
3844         * device/lib/pic16/libdev/pic18f[68][567]20.c:
3845           corrected typos...
3846         * device/include/pic16/signal.h: added USBIF
3847           and SIG_USB
3848
3849 2005-06-24 Raphael Neider <rneider AT web.de>
3850
3851         * device/lib/pic16/libdev/pic18f2455.c,
3852           device/include/pic16/pic18f2455.h: NEW
3853         * device/include/pic16/pic18fregs.h,
3854           device/lib/pic16/pics.all,
3855           src/pic16/device.c: added 18f2455
3856         * device/lib/pic16/libdev/pic18f[68][567]20.c,
3857           device/include/pic16/{pic18f[68][567].h,usart.h}:
3858           replaced MULTIPLE_USARTS define with more relaible
3859           compatibility sfrs (for USART access)
3860
3861 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
3862
3863         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
3864           and the output asm file line is printed on two lines.
3865
3866 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3867
3868         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
3869           BGT, BLE, BHI, and BLS instructions
3870         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
3871           genCmpEq): removed
3872         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
3873           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
3874           fixes bug #1216342
3875         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
3876
3877 2005-06-15 Raphael Neider <rneider AT web.de>
3878
3879         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
3880         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
3881         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
3882           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
3883           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
3884
3885 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3886
3887         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
3888           Marcel Telka in bug #1215704
3889
3890 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
3891
3892         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
3893           located in shared memory bank.
3894
3895 2005-05-31 Raphael Neider <rneider AT web.de>
3896
3897         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
3898           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
3899           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
3900
3901 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
3902
3903         * device/lib/_strncpy.c: fixed the fix
3904
3905 2005-05-26 Raphael Neider <rneider AT web.de>
3906
3907         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
3908           initializers with \0, bug #1208187
3909         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
3910           intializers with \0, bug #1208187
3911
3912 2005-05-26 Raphael Neider <rneider AT web.de>
3913
3914         * src/pic16/glue.c (pic16_printIvalChar): fixed string
3915           initializers with \0, bug #1208187
3916         * src/pic16/main.c (_process_pragma): added sanity checks
3917           for stack position and size, emit warnings when appropriate
3918
3919 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
3920
3921         * device/lib/_strncpy.c: fixed not filling with \0
3922
3923 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3924
3925         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
3926           createFunction),
3927         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
3928           compound_statement),
3929         * src/SDCCsymt.h,
3930         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
3931
3932 2005-05-24 Raphael Neider <rneider AT web.de>
3933
3934         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
3935
3936 2005-05-24 Raphael Neider <rneider AT web.de>
3937
3938         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
3939           TRISE definitions, closes bug #1162453
3940
3941 2005-05-22 Raphael Neider <rneider AT web.de>
3942
3943         * src/pic16/main.c (_process_pragma): check for missing
3944           arguments to pragmas code and udata
3945         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
3946           consistency fixes to match other headers (thanks to Jim Paris)
3947         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
3948
3949 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
3950
3951         * src/SDCCicode.c (isOperandEqual): fixed missing ;
3952
3953 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
3954
3955         * support/regression/tests/bug1198642.c: new test
3956         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
3957         * src/SDCCcse.c (findPrevIc): added comment, please have a look
3958         * support/scripts/resource.h,
3959         * support/scripts/resource.rc,
3960         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
3961         * support/scripts/sdcc.ico: added 32x32 icon
3962
3963 2005-05-18 Raphael Neider <rneider AT web.de>
3964
3965         * device/lib/pic16/libdev/pic18f*.c,
3966         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
3967           keywords to "__sfr" and "__at (X)"
3968         * device/include/pic16/pic18fregs.h: added pic18f4520
3969         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
3970           #1203088 (MPLAB compatibility)
3971
3972 2005-05-17 Raphael Neider <rneider AT web.de>
3973
3974         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
3975         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
3976         * device/lib/pic16/pics.all: added new devices
3977         * src/pic16/device.c: added support for pic18f4520
3978
3979 2005-05-16 Raphael Neider <rneider AT web.de>
3980         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
3981         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
3982         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
3983           convenience function for bit access
3984
3985 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3986
3987         * device/lib/printf_large.c: fixed bug 1193299
3988         * support/regression/tests/bug1057979.c: added test %3.3s
3989
3990 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3991
3992         * device/include/mcs51/8051.h,
3993         * device/include/mcs51/8052.h: made parseable with lint
3994         * device/include/mcs51/lint.h: added include file for (sp)lint
3995         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
3996         * doc/cdbfileformat.lyx,
3997         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
3998
3999 2005-05-14 Raphael Neider <rneider AT web.de>
4000
4001         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
4002         * device/lib/pic16/libc/stdlib/itoa.c (new)
4003         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
4004         * device/lib/pic16/libio/Makefile: exclude subdir according to
4005           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
4006         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
4007         * src/pic16/gen.c (genFunction): prevent annoying warning
4008         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
4009           nameclashes on BeOS
4010         * support/cpp2/cppmain.c (cpp_output_string): new
4011         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
4012           fixes bug 1116802
4013
4014 2005-05-13 Borut Razem <borut.razem AT siol.net>
4015
4016         * src/SDCCmain.c (linkEdit): fixed bug 1195202
4017
4018 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4019
4020         * .version: changed to version 2.5.1; back to bleeding edge development
4021
4022 2005-05-11 Borut Razem <borut.razem AT siol.net>
4023
4024         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
4025           generate PDF version 1.3 documents
4026
4027 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4028
4029         * .version: changed to version 2.5.0
4030
4031 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4032
4033         * doc/sdccman.lyx: updated weblinks, index and smaller updates
4034
4035 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4036
4037         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
4038         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
4039         well as many smaller updates.
4040         * .version: changed to version 2.5.0-pre1
4041
4042 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4043
4044         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
4045
4046 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
4047
4048         * support/regression/tests/bug1185672.c: added
4049         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
4050           bug 1185672
4051         * src/mcs51/gen.c (genCall): added comments, made it look safer
4052         * src/mcs51/gen.c (genEndFunction): simplified
4053
4054 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
4055
4056         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
4057
4058 2005-04-14 Borut Razem <borut.razem AT siol.net>
4059
4060         * fixed bug 1045046 - SIGSEGV with really simple code?:
4061           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
4062           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
4063
4064 2005-04-14 Borut Razem <borut.razem AT siol.net>
4065
4066         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
4067           src/pic16/device.h: temporarily disabled experimental #inline pragma
4068           for 2.5.0 release
4069
4070 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
4071
4072         * device/include/z80/stdio.h,
4073         * device/include/z80/string.h: removed these highly incomplete files so
4074           SDCC can use the default ones in device/include/
4075
4076 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4077
4078         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
4079         gcc warning.
4080         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
4081         fix sdcpp warnings.
4082
4083 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
4084
4085         * device/include/malloc.h: removed redundant __reentrant prototypes
4086         * device/lib/_mullong.c: added working xstack variant in asm (C version
4087           doesn't pass regression tests)
4088         * device/lib/bpx.c: used __data and made bpx char for mcs51
4089         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
4090           (createFunction): fixed bug with xstackPtr
4091         * src/SDCCcse.c: corrected comments
4092         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
4093           (killDeadCode, eBBlockFromiCode): removed unused code
4094         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
4095           corrected comments
4096         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
4097           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
4098           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
4099           (genModOneByte): fixed warning in MSVC
4100         * src/mcs51/main.c (): added comments
4101         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
4102
4103 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
4104
4105         * src/SDCCmain.c (linkEdit): oops, changed one line too many
4106
4107 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
4108
4109         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
4110
4111 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
4112
4113         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
4114         characters arrays of larger size than the declared one.
4115
4116 2005-04-10 Borut Razem <borut.razem AT siol.net>
4117
4118         * src/pic/gen.c (genInline),
4119           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
4120           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
4121           (findNextInstruction), (findPrevInstruction),
4122           (findInstructionUsingLabel),
4123           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
4124         * src/pic/pcode.c (findLabel): added missing '\n'
4125         * src/src.dsp: added SDCCdwarf2.c to the project
4126
4127 2005-04-09 Borut Razem <borut.razem AT siol.net>
4128
4129         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
4130
4131 2005-04-08 Raphael Neider <rneider AT web.de>
4132
4133         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
4134           into the chain after a given one) and mergeDefmapSymbols (combine
4135           defmap entries for each symbol per pcode)
4136         * (createDefmap): have defmap entries merged in the end
4137         * (defmapReplaceSymRef): split defmap entries covering two accesses to
4138           a symbol before replacing one access type's symbol, merge symbols in
4139           the end (replacement symbol might already have an entry)
4140         * (assignValnums): keep reference to written WREG intact
4141
4142 2005-04-08 Raphael Neider <rneider AT web.de>
4143
4144         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
4145           Alpha)
4146
4147 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
4148
4149         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
4150         bytes
4151
4152 2005-04-07 Raphael Neider <rneider AT web.de>
4153
4154         * device/include/pic16/usart.h: added compatibility defines for
4155           devices with more than one USART
4156         * device/include/pic16/pic18f[68][567]20.h: activated above defines
4157
4158 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
4159
4160         * device/lib/Makefile.in: updated for port specific include
4161
4162 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
4163
4164         * support/regression/ports/mcs51/spec.mk: added mcs51 include
4165
4166 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
4167
4168         * device/include/8051.h,
4169         * device/include/8052.h,
4170         * device/include/at89S8252.h,
4171         * device/include/at89c55.h,
4172         * device/include/at89x051.h,
4173         * device/include/at89x51.h,
4174         * device/include/at89x52.h,
4175         * device/include/mcs51reg.h,
4176         * device/include/reg51.h,
4177         * device/include/reg764.h,
4178         * device/include/regc515c.h,
4179         * device/include/sab80515.h: (re)moved these 12 files
4180         * device/include/mcs51/8051.h,
4181         * device/include/mcs51/8052.h,
4182         * device/include/mcs51/at89S8252.h,
4183         * device/include/mcs51/at89c55.h,
4184         * device/include/mcs51/at89x051.h,
4185         * device/include/mcs51/at89x51.h,
4186         * device/include/mcs51/at89x52.h,
4187         * device/include/mcs51/mcs51reg.h,
4188         * device/include/mcs51/reg51.h,
4189         * device/include/mcs51/reg764.h,
4190         * device/include/mcs51/regc515c.h,
4191         * device/include/mcs51/sab80515.h: and added them here
4192
4193 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
4194
4195         * device/include/stdarg.h: changed SDCC specific keywords to double
4196           underlined form.
4197         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
4198           mcs51 and ds390.
4199         * device/include/hc08/mc68hc908gp32.h,
4200         * device/include/hc08/mc68hc908jb8.h,
4201         * device/include/hc08/mc68hc908jkjl.h,
4202         * device/include/hc08/mc68hc908qy.h: fixed comments
4203         * device/include/mcs51/README: updated
4204         * device/include/mcs51/c8051f120.h: added PINRSF
4205         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
4206         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
4207           amidst code. Also inline is not supported.
4208
4209 2005-04-06 Raphael Neider <rneider AT web.de>
4210
4211         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
4212         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
4213           callers stack/frame pointers
4214
4215 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
4216
4217         * device/include/pic16/usart.h: added, missing in previous commit,
4218         * device/include/pic16/adc.h: fixed typo,
4219         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
4220         commit,
4221         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
4222         <p18fxxx.inc>
4223         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
4224         uninitialized because a bug appears with gplink
4225         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
4226         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
4227         complains for unrecognised option
4228
4229 2005-04-05 Raphael Neider <rneider AT web.de>
4230
4231         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
4232           structs as well (using memcpy)
4233         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
4234           on ISRs (GOTO has no label)
4235         * src/pic16/device.h: added OF_OPTIMIZE_DF
4236         * src/pic16/main.c: added compiler switch --optimize-df to enable the
4237           new data flow analysis/optimization
4238         * src/pic16/pcode.c: added (prototypes for and implementation of)
4239           dataflow analysis functions, fixed pCodeInstructions' inCond and
4240           outCond values, made RCALL a branch instruction
4241         * (pic16_unlinkpCode): keep C line if possible
4242         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
4243           C line moved if possible
4244         * (pic16_getRegFrompCodeOp): NEW, improved version of...
4245         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
4246           to use new pic16_getRegFrompCodeOp (works for more SFRs)
4247         * (pic16_BuildFlow): fixed skip instructions with label (did not start
4248           new flow)
4249         * (pic16_getJumptabpCode): NEW, needed in...
4250         * (LinkFlow): fixed handling of jumptables, calls and conditional
4251           branches
4252         * (pic16_InsertCommentAfter): NEW
4253         * (pic16_pCodeReplace): made verbose and flow preserving
4254         * (AnalyzeFlow): added call to data flow analysis
4255         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
4256         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
4257         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
4258
4259 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4260
4261         * src/SDCCast.c (decorateType): fixed bug #1105626
4262
4263 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
4264
4265         * device/include/asm/pic16/features.h,
4266         * pic18f*.h headers,
4267         * device/include/pic16/adc.h,
4268         * device/include/pic16/delay.h,
4269         * device/include/pic16/i2c.h,
4270         * device/include/pic16/malloc.h,
4271         * device/include/pic16/stdio.h,
4272         * device/include/pic16/stdlib.h,
4273         * device/include/pic16/string.h,
4274         * device/lib/pic16/libc/stdio/printf_tiny.c,
4275         * device/lib/pic16/libc/stdio/printf_small.c,
4276         * device/lib/pic16/libc/stdio/strmgpsim.c,
4277         * device/lib/pic16/libc/stdio/strmmssp.c,
4278         * device/lib/pic16/libc/stdio/strmusart.c,
4279         * device/lib/pic16/libc/stdio/vfprintf.c,
4280         * device/lib/pic16/libc/stdlib/ltoa.c,
4281         * device/lib/pic16/libc/stdlib/putchar.c,
4282         * device/lib/pic16/libc/stdlib/x_ftoa.c,
4283         * device/lib/pic16/libc/stdlib/memchrpgm.c,
4284         * device/lib/pic16/libc/stdlib/memchrram.c,
4285         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
4286         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
4287         * device/lib/pic16/libio/adc/adcbusy.c,
4288         * device/lib/pic16/libio/adc/adcread.c,
4289         * device/lib/pic16/libio/adc/adcsetch.c,
4290         * device/lib/pic16/libio/usart/ubaud.c,
4291         * device/lib/pic16/libio/usart/ubusy.c,
4292         * device/lib/pic16/libio/usart/udrdy.c,
4293         * device/lib/pic16/libio/usart/uopen.c,
4294         * device/lib/pic16/libio/usart/uputc.c,
4295         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
4296         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
4297         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
4298         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
4299         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
4300         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
4301         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
4302         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
4303         specific keywords to double underlined form,
4304         * device/lib/pic16/libc/Makefile.rules,
4305         * device/lib/pic16/libsdcc/Makefile.rules,
4306         * device/lib/pic16/libm/Makefile,
4307         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
4308         to compile with C standard set in Makefile.common
4309         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
4310         rand.c and crc.c in compilation process,
4311         * device/lib/pic16/libsdcc/int/divuint.c,
4312         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
4313         `c' from signed to unsigned,
4314         * device/lib/pic16/startup/crt0.c,
4315         * device/lib/pic16/startup/crt0i.c,
4316         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
4317         keywords to double underlined form, bug fixes in _do_cinit function
4318         which prevented the correct initialization of the .idata segment,
4319         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
4320         core to enter a infinite loop
4321         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
4322
4323 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4324
4325         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
4326
4327 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4328
4329         * device/include/Makefile.in: add support for hc08 subdirectory
4330         * device/include/hc08/: new subdirectory
4331         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
4332         Lucas Loizaga, thanks!
4333         * device/include/hc08/mc68hc908qy.h,
4334         * device/include/hc08/mc68hc908gp32.h,
4335         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
4336         their own directory. Changed internal macro names to use the compiler
4337         reserved namespace. Changed SDCC specific keywords to double
4338         underlined form.
4339         * device/include/math.h,
4340         * device/include/malloc.h,
4341         * device/include/stdarg.h,
4342         * device/include/stdbool.h
4343         * device/include/string.h,
4344         * device/include/tinibios.h,
4345         * device/include/ds400rom.h,
4346         * device/include/8051.h,
4347         * device/include/8052.h,
4348         * device/include/80c51xa.h,
4349         * device/include/at89c55.h,
4350         * device/include/at89S8252.h,
4351         * device/include/at89x51.h,
4352         * device/include/at89x52.h,
4353         * device/include/ds80c390.h,
4354         * device/include/reg764.h,
4355         * device/include/regc515c.h,
4356         * device/include/sab80515.h,
4357         * device/include/mcs51/c8051f000.h,
4358         * device/include/mcs51/c8051f018.h,
4359         * device/include/mcs51/c8051f020.h,
4360         * device/include/mcs51/c8051f040.h,
4361         * device/include/mcs51/c8051f060.h,
4362         * device/include/mcs51/c8051f120.h,
4363         * device/include/mcs51/c8051f300.h,
4364         * device/include/mcs51/c8051f310.h,
4365         * device/include/mcs51/c8051f320.h,
4366         * device/include/mcs51/c8051f330.h,
4367         * device/include/mcs51/c8051f350.h,
4368         * device/include/z180.h: Changed SDCC specific keywords to double
4369         underlined form.
4370
4371 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
4372
4373         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
4374         18F4455,
4375         * (pic16_assignConfigWordValue): disable testing of configuration
4376         register value with config mask,
4377         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
4378         function with port->fun_prefix,
4379         * (genFunction): when generating a naked interrupt function never
4380         create an absolute segment placed in interrupt vector address, place
4381         the actual interrupt function at IVA instead, when an interrupt
4382         function is generated with unspecified interrupt then do not create
4383         the absolute section,
4384         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
4385         code for generating a call to generic pointer get/put function with
4386         a call to function pic16_callGenericPointer(),
4387         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
4388         the call to the generic pointer get/put functions with prefixing the
4389         function name with port->fun_prefix,
4390         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
4391         * src/pic16/main.c (_process_pragma): prefix function with
4392         port->fun_prefix,
4393         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
4394         calling assembler, old 18Fxxxx macro is deprecated,
4395         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
4396         PC_ASMDIR in while condition,
4397         * (findInstruction): add PC_ASMDIR in while condition,
4398         * (buildCallTree): prefix main with port->fun_prefix,
4399         * (pic16_pCode2str): fixed bug that didn't emit the memory access
4400         identifier for variable with banked access in instructions BTFSS,
4401         BTFSC, BCF, BSF, BTG
4402         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
4403         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
4404         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
4405         perform optimization when enviroment variable NO_REG_OPT is set,
4406         * (insideLRBlock): NEW, return 1 if register is inside an
4407         INF_LOCALREGS block,
4408         * (RemoveRegFromLRBlock): remove a register that is completely
4409         eliminated by register optimization, but it is still left in local
4410         register store/restore in/from stack block,
4411         * (Remove2pcodes): after removing register, check to see if it
4412         should be removed from local register store/restore in/from stack
4413         block,
4414         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
4415         DUMMY_READ_VOLATILE,
4416
4417         * device/include/pic16/adc.h: minor prototype modifications and
4418         update,
4419         * device/include/pic16/malloc.h: added GPL notice various
4420         modifications,
4421         * device/include/pic16/stdint.h: NEW, standard header for ints
4422         * device/include/pic16/delay.h: NEW, header for delay functions,
4423         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
4424         delay1mtcy,
4425         * device/include/pic16/signal.h: NEW, header providing helper macros
4426         for implementing signal handlers,
4427         * device/include/pic16/stdio.h: added prototypes for functions,
4428         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
4429         prototypes for stdin and stdout, added macro PUTCHAR to
4430         automatically implement putchar function prototype,
4431         * device/include/pic16/usart.h: modified and updated USART library,
4432         * device/lib/pic16/libio/adc/,
4433         * device/lib/pic16/libio/i2c: some modifications to improve library
4434         performance,
4435         * device/lib/pic16/libc/stdio/: modifications for the new printf*
4436         family of functions,
4437         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
4438         family of functions and other sources,
4439         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
4440         of the PIC18Fxx[28] devices,
4441         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
4442         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
4443         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
4444         _do_cinit function, because the previous failed when local variables
4445         where not placed in the same memory bank,
4446         * device/lib/pic16/libsdcc/char/: various modifications to improve
4447         library performance,
4448         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
4449         information on the new functions of the c library and more...
4450
4451 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4452
4453         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
4454
4455 2005-03-26 Raphael Neider <rneider AT web.de>
4456
4457         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
4458           if condition == CARRY)
4459         * (genCmp): adapted to new genSkipc semantics
4460         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
4461           on rIfx (genCmp was broken)
4462
4463 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4464
4465         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
4466         * src/z80/main.c (_keywords[]),
4467         * src/SDCCglobal.h (struct options),
4468         * src/SDCC.y,
4469         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
4470         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
4471         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
4472         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
4473         always available in leading double underscore form. The C99 support is
4474         mostly missing, but it's a start.
4475         * support/regression/tests/bug-227710.c: fixed nonconforming use of
4476         reserved identifier "__data".
4477
4478 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
4479
4480         * src/mcs51/peeph.def: fixed bug 1170013
4481
4482 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
4483
4484         * device/include/mcs51reg.h: fixed bug 842007
4485
4486 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4487
4488         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
4489         last time.
4490
4491 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4492
4493         * src/port.h (struct PORT),
4494         * src/avr/ralloc.c (avr_assignRegisters),
4495         * src/avr/main.c,
4496         * src/ds390/ralloc.c (ds390_assignRegisters),
4497         * src/ds390/main.c,
4498         * src/hc08/ralloc.c (hc08_assignRegisters),
4499         * src/hc08/main.c,
4500         * src/mcs51/ralloc.c (mcs51_assignRegisters),
4501         * src/mcs51/main.c,
4502         * src/pic/ralloc.c (pic14_assignRegisters),
4503         * src/pic/main.c,
4504         * src/pic16/ralloc.c (pic16_assignRegisters),
4505         * src/pic16/main.c,
4506         * src/xa51/ralloc.c (xa51_assignRegisters),
4507         * src/xa51/main.c,
4508         * src/z80/ralloc.c (z80_assignRegisters),
4509         * src/z80/ralloc.h,
4510         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
4511         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
4512         * src/SDCCcse.h,
4513         * src/SDCCdflow.c (computeDataFlow),
4514         * src/SDCCdflow.h,
4515         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
4516         * src/SDCCloop.h,
4517         * src/SDCCcflow.c (*),
4518         * src/SDCCcflow.h,
4519         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
4520         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
4521         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
4522         immedDom() returning wrong block; probably fixes bug #1160833)
4523
4524 2005-03-20 Borut Razem <borut.razem AT siol.net>
4525
4526         * support/scripts/inc2h.pl: WIN32 port
4527
4528 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
4529
4530         * device/lib/makefile.in: added abs.c and labs.c
4531
4532 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
4533
4534         * device/include/stdint.h: added
4535         * device/lib/abs.c: added
4536         * device/lib/labs.c: added
4537         * device/include/stdlib.h: added abs() and labs() prototypes
4538         * device/lib/libsdcc.lib: added abs and labs
4539         * device/include/float.h,
4540         * device/lib/_fsmul.c,
4541         * device/lib/printf_fast.c,
4542         * device/lib/printf_tiny.c: updated comments
4543
4544 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4545
4546         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
4547         bug #1164313
4548
4549 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4550
4551         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
4552         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
4553
4554 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
4555
4556         * device/lib/printf_large.c: removed inline assembly for portability and
4557           readability. Use printf_fast if speed or size are more important.
4558         * src/pic16/gen.c: removed conditions around use of DEBUGpc
4559         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
4560
4561 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
4562
4563         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
4564         prevent compiler warning
4565
4566 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
4567
4568         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
4569         moved to level 0 and declared as static. Also they are explicit
4570         placed in access bank. This was necessery because some times they
4571         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
4572         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
4573         optimizations. Currently only compare to unsigned char is implemented,
4574         * src/pic16/gen.c: added fReturnIdx array,
4575         * (struct resolvedIfx) is moved to gen.h and made public,
4576         * (struct _G): added sregsAlloc and sregsAllocSet fields,
4577         * (aopForSym): added an optimization to directly store in stack of
4578         the operand of a SEND iCode,
4579         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
4580         but as registers instead (AOP_REG) using the fReturnIdx array,
4581         * (pic16_freeAsmop): remove the freed register from the
4582         _G.sregsAlloc field,
4583         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
4584         a compare of 'WREG',
4585         * (pic16_popGetTempRegCond): changed function prototype, now
4586         function takes also a bitVector argument v which holds the current
4587         set of registers that are allocated for stack access by aopForSym,
4588         registers allocated in aopForSym for accessing stack symbols are not
4589         any more part of the functions usedRegs field,
4590         * (genCall): some times aopOp is called for a stack variable to be
4591         send, aopForSym might perform the push, if this is true make sure
4592         that genCall doesn't push the variable twice by testing _G.resDirect,
4593         * (genFunction): changed testing for unspecified interrupt number
4594         from 256 to INTNO_UNSPEC,
4595         * modified selection scheme of frame pointer generation. Previously
4596         if function did use local registers a frame pointer was generated,
4597         now a frame pointer is generated only if function has arguments
4598         (that need PLUSW2 register access), or has stack arguments, or the
4599         compiler is not instructed to omit the frame pointer,
4600         * (genEndFunction): before restoring local registers that were saved
4601         in the function preamble, also restore the registers that *might*
4602         have been allocated for stack access,
4603         * (genRet): removed some old comments,
4604         * (genCmp, the active (RN's) version): added a call to the
4605         pic16_genCmp_special function to perform the compare with a more
4606         robust and optimized way,
4607         * (genInline): a feature has been added in inline code generation,
4608         which allows a wildcard variable substitution when writing inline
4609         assembly. Code is incomplete and experimental therefore undocumented,
4610         * (genCast): changed order of aopOp for result and right to allow
4611         aopForSym to directly load the result if possible,
4612         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
4613         perform an optimized compare on some selected special occasions,
4614         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
4615         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
4616         generate an IVT any more,
4617         * src/pic16/main.c (pic16_optionsTable): added command line option
4618         --optimize-cmp,
4619         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
4620         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
4621         macros,
4622         * src/pic16/NOTES: Raphael Neider added in list of active developers
4623         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
4624         jumptable_end to prevent bug #,
4625         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
4626         inCond and outCond fields,
4627         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
4628         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
4629         turn off register spilling,
4630         * (packRegsForOneUse): synced with other ports' versions although it
4631         is not used currently,
4632         * (pic16_packRegisters): added an optimization while reading
4633         structure bitfields, some registers may be saved (malloc code is
4634         decreased by 80 bytes)
4635
4636 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
4637
4638         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
4639         left is a bitfield, if yes, then don't optimize assignment. Perhaps
4640         this can be optimized more?
4641
4642 2005-03-10 Raphael Neider <rneider AT web.de>
4643
4644         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
4645           genNearPointerGet): (hopefully) fixed access to bitfields via
4646           pointers (p->bitN = x; and x = p->bitN; failed)
4647
4648 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
4649
4650         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
4651
4652 2005-03-09 Raphael Neider <rneider AT web.de>
4653
4654         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
4655
4656 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
4657
4658         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
4659         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
4660           (regTypeNum): set REG_BIT type if necessary
4661         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
4662         * support/regression/tests/critical.c: check bug 1144613
4663
4664 2005-03-02 Raphael Neider <rneider AT web.de>
4665
4666         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
4667
4668 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4669
4670         * src/avr/ralloc.c (serialRegAssign),
4671         * src/ds390/ralloc.c (serialRegAssign),
4672         * src/hc08/ralloc.c (serialRegAssign),
4673         * src/mcs51/ralloc.c (serialRegAssign),
4674         * src/pic/ralloc.c (serialRegAssign),
4675         * src/pic16/ralloc.c (serialRegAssign),
4676         * src/xa51/ralloc.c (serialRegAssign),
4677         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
4678
4679 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
4680
4681         * src/SDCCast.c (decorateType): fixed bug 1124787
4682
4683 2005-02-20 Hubert Sack <sack AT digiplan.de>
4684         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4685
4686         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
4687         patch #1121755
4688
4689 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4690
4691         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
4692         to keep the correct label reference count when adding/removing references
4693         to labels. A peephole file using this is appended to patch #1144962.
4694
4695 2005-02-14 Raphael Neider <rneider AT web.de>
4696
4697         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
4698         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
4699         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
4700           retrievals of result operand's value on assignment
4701
4702 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
4703
4704         * device/include/pic16/string.h: modified prototype for memccpy()
4705         to memccpy(void *, void *, char, size_t)
4706         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
4707         check whether to omit frame pointer or not,
4708         * (genInline): convert all occurences of "\n" to LF in inline
4709         assembler blocks, this helps formatting the inline text,
4710         * (pic16_loadFSR0): modified prototype,
4711         * (genNearPointerGet, genNearPointerSet): reorganization of code,
4712         removed some 8051 legacy code,
4713         * (genPackBits): enabled handling bitfields exceeding one byte in size,
4714         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
4715         before allocating temporary registers in functions,
4716
4717 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
4718
4719         * support/regression/tests/bitvars.c: corrected the "fix"
4720
4721 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
4722
4723         * support/regression/tests/bitvars.c,
4724         * support/regression/tests/bitwise.c,
4725         * support/regression/tests/rotate.c: "fixed" problems on Alpha
4726
4727 2005-02-10 Raphael Neider <rneider AT web.de>
4728
4729         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
4730           different size for Alpha
4731         * src/pic16/gen.c (genCmpEq) : improved compare with 0
4732
4733 2005-02-09 Raphael Neider <rneider AT web.de>
4734
4735         * src/SDCC.lex(doPragma) : save and restore warning options as well
4736           (also added new stack plus clone- and copyAndFreeSDCCERRG())
4737         * have #pragma less_pedantic set the errorlevel to WARNING
4738           (fixes #1117001)
4739         * (cloneOptimize) : fixed wrong malloc's size
4740         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
4741           facilitate correct handling of #pragma (save|restore)
4742
4743 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
4744
4745         * src/mcs51/gen.c: removed non-standard C nameless struct/union
4746
4747 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
4748
4749         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
4750
4751 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
4752
4753         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
4754
4755 2005-02-02 Raphael Neider <rneider AT web.de>
4756
4757         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
4758         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
4759         * (pic16_storeForReturn): fixed to allow returning function pointers
4760         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
4761         * device/include/pic16/{stddef.h,stdbool.h}: added
4762
4763 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
4764
4765         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
4766
4767 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
4768
4769         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
4770         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
4771          appeared to be required
4772
4773 2005-01-31 Borut Razem <borut.razem AT siol.net>
4774
4775         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
4776           include/mcs51 and include/z80 directories to the package
4777
4778 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4779
4780         * src/hc08/gen.c (genFunction): fixed bug #1112752
4781
4782 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4783
4784         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
4785
4786 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4787
4788         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
4789
4790 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
4791
4792         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
4793
4794 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
4795
4796         * device/include/c8051fxxx.h: removed these 6 files
4797         * device/include/mcs51/c8051fxxx.h: added these 11 new files
4798
4799 2005-01-26 Raphael Neider <rneider AT web.de>
4800
4801         * src/pic16/gen.c (genAssign): fixed assignment from longs
4802           in codespace (were cut to three bytes)
4803         * (genDummyRead): implemented (except for CODESPACE...),
4804           fixed bug #1108575
4805         * src/pic16/glue.c (emitStatistics): beautified
4806         * device/lib/pic16/libm/Makefile: added include path
4807
4808 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4809
4810         * src/z80/gen.c (aopPut): fixed bug #1103902
4811
4812 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4813
4814         * device/lib/expf.c: fixed bug #1095792
4815
4816 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
4817
4818         * device/lib/pic16/libm: added Math library sources
4819
4820 2005-01-24 Raphael Neider <rneider AT web.de>
4821
4822         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
4823           to enable upcast to pCodeOpReg2 (there is no type tag to
4824           differenciate the two and pic16_popGet2p cast into PCOR2)
4825         * src/pic16/main.c (_process_pragma): fixed another malloc bug
4826           (sizeof(sectNames) changed to sizeof(sectName))
4827           Both patches fix segfaults under MinGW.
4828
4829 2005-01-23 Raphael Neider <rneider AT web.de>
4830
4831         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
4832           Safe_[mc]?alloc()'ed variables
4833         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
4834           of (byte sized) temporaries (assign them to WREG for now)
4835         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
4836           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
4837           this might fix SIGSEGVs on MinGW...
4838         * src/SDCCopt.c (killDeadCode): restored original behaviour
4839           (volatile operands might get thrown away though)
4840
4841 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
4842
4843         * src/pic16/gen.c: fixed bug #1106975,
4844         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
4845         pointer update, INTCON is saved, global interrupts are disabled and
4846         restored after updateing TOS.
4847         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
4848         * added function attribute 'shadowregs' to take advantage of shadow
4849         registers,
4850         * added function attribute 'wparam' as an alternative to the wparam
4851         pragma,
4852         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
4853         user declares a non-ISR function as 'shadowregs',
4854         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
4855
4856 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
4857
4858         * .version: bumped version number to 2.4.8
4859         * device/lib/pic16/pics.all: list of PIC18F devices supported by
4860         pic16 port,
4861         * device/lib/pic16/libio/i2c/: I2C module support library,
4862         * device/include/pic16/i2c.h: I2C support library header,
4863         * device/lib/pic16/libc/stdio/: standard IO support sources,
4864         * (printf_small.c): printf_small() source, supports float print,
4865         * (printf_tiny.c): printf_tiny() source, does not support floats,
4866         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
4867         enable global optimizations for entire library source, other
4868         Makefiles in the source tree are also modified to reflect this,
4869         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
4870         function,
4871         * doc/sdccman.lyx: updated to reflect new changes,
4872         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
4873         sym->onStack if-case,
4874         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
4875         sbit, idata, _idata, xdata, _xdata,
4876         * added pragma library, to link an external library, (see doc),
4877         * removed command line options, --pomit-config-words, --pomit-ivt,
4878         --pleave-reset-vector,
4879         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
4880         when calling assembler to reflect memory model used, also define
4881         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
4882         reflect stack model used,
4883         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
4884         on stack return NULL,
4885
4886 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4887
4888         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
4889           of the operands is volatile. Fixes #1020220
4890
4891 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4892
4893         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
4894         * (OptimizeRegUsage): make sure that there is really no other flow where
4895           the first pCode is used
4896
4897 2005-01-22 Raphael Neider <rneider AT web.de>
4898
4899         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
4900           to fix #1106967 (pCode->seq are not set up correctly)
4901
4902 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4903
4904         * src/SDCCglue.c (glue): make sure code area is declared before the
4905         static initialization area.
4906
4907 2005-01-21 Raphael Neider <rneider AT web.de>
4908
4909         * device/lib/Makefile.in: fixed test for pic16 install dir
4910         * device/lib/pic16/*/Makefile*: modified compile flags to enable
4911           optimizations
4912         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
4913           added --optimize-goto compiler switch and pragma wparam documentation
4914         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
4915         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
4916           and PRODH closing bug #1071770 (peephole optimizer)
4917
4918 2005-01-19 Raphael Neider <rneider AT web.de>
4919
4920         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
4921           cmdLine buffers (used when calling sdcpp...) are large enough
4922           (MAX_PATH=256 truncates arguments leading to system halts when
4923           used in MinGW...)
4924         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
4925         * (genUminus): rewritten to for efficiency
4926         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
4927           used uninitialized in some cases)
4928         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
4929           copy the third byte from the int -- now assumes 0x80 (data memory)
4930         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
4931           operands (genAddLit expects the iCode's operands to swapped as
4932           well), fixed leftover bytes (crashed for short left operands)
4933         * (pic16_genMinusDec): performance improvements, removed false
4934           PIC14 emitSKPNCs
4935         * (pic16_genMinus): fixed to cope with differently sized operands
4936         * src/pic16/glue.c (pic16_glue): added new banksel optimization
4937           for --obanksel > 1
4938         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
4939         * src/pic16/graph.[ch]: implementation of directed graphs, used by
4940           new banksel optimization
4941         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
4942           analysis for temporary registers (segfaults...)
4943         * src/pic16/peeph.def: added rule
4944
4945 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
4946
4947         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
4948         which converts a float number to its ASCII representation
4949         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
4950         functions to convert the fractional and integer part of a float to ASCII,
4951         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
4952         realloc.c): added _MALLOC_SPEC to explicit place variables in data
4953         ram
4954         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
4955         _STATMEM macros,
4956         * device/include/pic16/adc.h: added GPL info,
4957         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
4958         a pCodeOp as tested operand,
4959         * (genNearPointerGet): optimized bit testing, does not use
4960         intermediate register for bit value, test directly instead with
4961         BTFSS, BTFSC, works only for single bits,
4962         * (genpic16Code): dump the name of the iCode in the asm,
4963         * src/pic16/ralloc.c (decodeOp): removed static declaration and
4964         renamed to pic16_decodeOp,
4965         * (serialRegAssign): do not allocate a temporary register for iCode
4966         sequences that test a single bit for 1/0
4967
4968 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
4969
4970         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
4971         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
4972         access stack and frame pointers. They are initially assigned to
4973         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
4974         accessing SFRs. Updated all occurences of modification of stack or
4975         frame pointer in gen.c and pcode.c,
4976         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
4977         assigning of a literal value to pointers,
4978         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
4979         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
4980         selected
4981
4982 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4983
4984         * doc/sdccman.lyx: update documentation about stack pragma, added
4985         some info for stack memory models
4986
4987 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4988
4989         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
4990
4991 2005-01-08 Raphael Neider <rneider AT web.de>
4992
4993         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
4994           udata sections to fix bug #1097823
4995
4996 2005-01-05 Raphael Neider <rneider AT web.de>
4997
4998         * src/pic16/gen.c (genGenericShift): added handling of differently
4999           sized left operand and result
5000
5001 2005-01-04 Raphael Neider <rneider AT web.de>
5002
5003         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
5004         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
5005           to hold the condition bit)
5006         * added new version of genCmp (old code available via #define)
5007         * added new version of genShiftLeft/genShiftRight in a generic
5008           way, now supports shifting by negative values
5009         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
5010           shiftCount (expected by genGenericShift)
5011         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
5012         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
5013           dump
5014         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
5015           is an invalid literal too...)
5016
5017 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
5018
5019         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
5020         from Raphael Neider,
5021         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
5022         for 8-bit literals. This fixes some literal operands which are sign
5023         extended to 16-bits ints when instruction needs only 8-bits.
5024
5025 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
5026
5027         * device/lib/logf.c: added mcs51 assembly version
5028         * device/lib/expf.c: added mcs51 assembly version
5029         * device/lib/_logexpf.c: new shared asm code for expf and logf
5030         * device/include/math.h: add defines for assembly math library
5031         * device/lib/Makefile.in: build new _logexpf.c
5032         * device/lib/libfloat.lib: use new _logexpf.c
5033
5034 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
5035
5036         * src/pic/device.c
5037         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
5038           device types which have less than 0x7f registers.
5039
5040 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
5041
5042         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
5043
5044 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
5045
5046         * device/lib/printf_fast.c: only build on supported arch.
5047         * device/lib/printf_tiny.c: only build on supported arch.
5048         * device/lib/printf_fast_f.c: only build if asm float lib
5049         * device/lib/_fsget1arg.c: only build if asm float lib
5050         * device/lib/_fsget2args.c: only build if asm float lib
5051         * device/lib/_fsnormalize.c: only build if asm float lib
5052         * device/lib/_fsreturnval.c: only build if asm float lib
5053         * device/lib/_fsrshift.c: only build if asm float lib
5054         * device/lib/_fsswapargs.c: only build if asm float lib
5055         * device/include/stdio.h: don't provide print_fast,
5056           print_fast_f, print_tiny prototypes if --xstack used
5057
5058 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
5059
5060         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
5061         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
5062           to the SOURCES
5063
5064 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
5065
5066         * device/lib/printf_fast_f.c: same as printf_fast, but
5067           with floating point enabled
5068         * device/lib/printf_fast.c: minor tweaks
5069         * device/include/stdio.h: add printf_fast_f
5070
5071 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
5072
5073         * src/SDCCmain.c: make --float-reent default for mcs51
5074         * device/lib/_fsadd.c: added mcs51 assembly version
5075         * device/lib/_fssub.c: added mcs51 assembly version
5076         * device/lib/_fsmul.c: added mcs51 assembly version
5077         * device/lib/_fsdiv.c: added mcs51 assembly version
5078         * device/lib/_fseq.c: added mcs51 assembly version
5079         * device/lib/_fsneq.c: added mcs51 assembly version
5080         * device/lib/_fsgt.c: added mcs51 assembly version
5081         * device/lib/_fslt.c: added mcs51 assembly version
5082         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
5083         * device/lib/Makefile.in: add _fscmp to build
5084         * device/lib/libfloat.lib: add _fscmp to build
5085
5086 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
5087
5088         * device/lib/_fs2slong.c: added mcs51 assembly version
5089         * device/lib/_fs2sint.c: added mcs51 assembly version
5090         * device/lib/_fs2schar.c: added mcs51 assembly version
5091         * device/lib/_fs2ulong.c: added mcs51 assembly version
5092         * device/lib/_fs2uint.c: added mcs51 assembly version
5093         * device/lib/_fs2uchar.c: added mcs51 assembly version
5094         * device/lib/_slong2fs.c: added mcs51 assembly version
5095         * device/lib/_sint2fs.c: added mcs51 assembly version
5096         * device/lib/_schar2fs.c: added mcs51 assembly version
5097         * device/lib/_ulong2fs.c: added mcs51 assembly version
5098         * device/lib/_uint2fs.c: added mcs51 assembly version
5099         * device/lib/_uchar2fs.c: added mcs51 assembly version
5100         * device/include/float.h: added #define to select asm vs c
5101
5102 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
5103
5104         * device/lib/printf_fast.c: improvements to float output
5105         * device/include/float.h: add defines for assembly float library
5106         * device/lib/_fsget1arg.c: receive 1 float arg
5107         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
5108         * device/lib/_fsnormalize.c: normalize a float
5109         * device/lib/_fsreturnval.c: return float, various helper routines
5110         * device/lib/_fsrshift.c: right shift a float's mantissa
5111         * device/lib/_fsswapargs.c: swap 2 floats
5112         * device/lib/Makefile.in: build these 6 new files for mcs51
5113         * device/lib/libfloat.lib: add these 6 files to the library
5114
5115 2004-12-26 Borut Razem <borut.razem AT siol.net>
5116
5117         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
5118           built by gcc 3.4.2
5119
5120 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
5121
5122         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
5123           and fully reentrant and register bank neutral.
5124         * device/lib/printf_fast.c: added float (not enabled by default),
5125           added compact/slower integer (also not enabled by default),
5126           improved size/speed of fast integer code, other minor changes
5127         * device/include/stdio.h, device/lib/Makefile.in,
5128           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
5129
5130 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
5131
5132         * src/pic16/pcode.c: declaring variables other than at the start of a
5133           block is not supported in C by VC6.
5134
5135 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
5136
5137         * applied a previous patch from Raphael Neider that wasn't included
5138         in the previous commits, which fixes infinite loops within jumptable
5139         improvements,
5140         * made some fixes that previous patches introduced
5141
5142 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
5143
5144         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
5145         that fixes an issue with AOP_PCODE asmop's offset,
5146         * (pic16_popCopyReg): update instance field too,
5147         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
5148         function of pic port,
5149         * (genCmp, genAnd, genAssign),
5150         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
5151
5152 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
5153
5154         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
5155         variables initial values to idata section,
5156         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
5157         variables in some functions. This utilizes parmBytes field of iCode
5158         structure to hold the offset of the variable in stack. (might be
5159         able to use the stack field too?)
5160         * applied patch from Raphael Neider # ### , # ###
5161         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
5162         variable initial values in idata section,
5163         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
5164         for static variables with initial value
5165         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
5166         applied fix in while loop from Raphael Neider.
5167
5168 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
5169
5170         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
5171         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
5172         * src/ds390/ralloc.c (serialRegAssign): spill bits
5173         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
5174         * support/Util/SDCCerr.c,
5175         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
5176         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
5177         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
5178
5179 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
5180
5181         * device/include/sdcc-lib.h: inserted LGPL, added includes
5182           asm/ds390/features.h and asm/mcs51/features.h
5183         * device/include/asm/default/features.h,
5184         * device/include/asm/gbz80/features.h,
5185         * device/include/asm/z80/features.h: added empty _AUTOMEM
5186           and _STATMEM
5187         * device/include/asm/ds390/features.h,
5188         * device/include/asm/mcs51/features.h: added files with defines for
5189           _AUTOMEM and _STATMEM indicating automatic and static storage class
5190         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
5191         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
5192         * src/SDCCicode.c (geniCodeCast),
5193         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
5194         * src/SDCCloop.c (loopInduction): removed unused variable lr
5195         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
5196           to convertToFcall to include char modulo (RFE 1065037), added check
5197           if left operand is unsigned and use abs of literal value
5198         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
5199           as it doesn't work after conversion from peephole.def to peephole.rul
5200         * src/mcs51/gen.c (toBoolean): added check for size,
5201           (genModOneByte): optimized code for signed char modulo a literal
5202           power of 2 (thanks to Hubert Sack),
5203           (genRRC): removed unnecessary "clr c",
5204           (genRLC): replaced "add a,acc" with cheaper "rlc a"
5205         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
5206           jump optimization,
5207           swapped rules 256.c and 256.d,
5208           extended 256.d by using new multiple checks (thanks Erik),
5209           added rules 256.e and 256.f,
5210           updated rule 261.a and 261.b to new generated code
5211         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
5212
5213 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5214
5215         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
5216           induction related bugs, including first part of bug #1074377
5217
5218 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
5219
5220         * applied patch from bug-report #1076292,
5221         * applied patches for genAnd and Goto-optimizations for Raphael
5222         Neider,
5223         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
5224         dump a less iCode information,
5225         * src/pic16/device.h (pic16_options_t): added field debgen,
5226         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
5227         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
5228         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
5229         puclic,
5230         * (various functions): added macros FENTRY and FENTRY2 to functions,
5231         to emit function prologue,
5232         * (various functions): fixed indentation,
5233         * (genNearPointerGet): fixed loading of FSR0,
5234         * (genPackBits): applied patch from Raphael Neider to fix updating
5235         of FSR0 and touching only the modified bits,
5236         * src/pic16/genarith.c (various functions): added macros FENTRY to
5237         emit function prologue in comments,
5238         * src/pic16/pcode.h: added functions debugf2, debugf3,
5239         * src/pic16/ralloc.c: partial fix for packForPush caused
5240         segmentation fault,
5241
5242 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5243
5244         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
5245           <stsp AT users.sourceforge.net> with reversed byte order
5246         * support/regression/tests/rotate.c: added (ds390 skips some tests)
5247
5248 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5249
5250         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
5251           bug #1074377
5252         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
5253         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
5254
5255 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
5256
5257         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
5258
5259 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5260
5261         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
5262           conditions,
5263           (setFromConditionArgs): friendly operand parser for peephole rules,
5264           (operandBaseName, operandsNotRelated): new peephole condition
5265           "operandsNotRelated" -- similar to "operandsNotSame", but takes
5266           architecture specific register naming into account, handles n-way
5267           comparisons, and supports quoted literals
5268         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
5269
5270 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5271
5272         * src/mcs51/peeph.def: fixed bug #1076940
5273
5274 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
5275
5276         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
5277
5278 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5279
5280         Adding support for replacing ljmps with sjmps in jumptables
5281         generated for switch statements. For now you need to set the
5282         environment variable SDCC_SJMP_JUMPTABLE to enable this.
5283         Now 4 algorithms for mcs51 jumptable generation are used:
5284         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
5285         addresses loaded pc-relative for up to 112 cases and stack-pushing
5286         target addresses loaded with offset from dptr for up to 256 cases.
5287
5288         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
5289         * src/mcs51/main.c: adapted constants for switch table generation
5290         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
5291
5292 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
5293
5294         * device/lib/printf_large.c (_print_format): fixed bug 1073386
5295         * support/regression/tests/bug1057979.c: added test for bug 1073386
5296
5297 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
5298
5299         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
5300         compilers
5301
5302 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
5303
5304         * src/pic16/device.h,
5305         * src/pic16/genarith.c,
5306         * src/pic16/glue.c,
5307         * src/pic16/main.c,
5308         * src/pic16/pcode.c: applied patches #1068154 and #1070213
5309
5310 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
5311
5312         Large cummulative patch for pic16 port.
5313         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
5314         to call when a stack overflow occurs,
5315         * (malloc.h): added CVS Id tag,
5316         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
5317         variable,
5318         * added libc directory. The current version of LibC contains string
5319         functions, ctype functions and macros and some functions of the
5320         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
5321         be extensively tested in the future. Standard disclaimer here.
5322         Library is not automatically build yet. But one can build it by
5323         invoking 'make' inside the libc directory.
5324         * added ADC library under libio. Preliminary version yet.
5325
5326         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
5327         * src/pic16/gen.c (aopForRemat): asmop size is filled by
5328         aopForRemat() now and not by pic16_aopOp(),
5329         * (pic16_popGetTempReg): removed warning messgae when allocating
5330         temporary registers, its a buggy feature and will be removed,
5331         * (pic16_popGet): set register instance field in AOP_CRY,
5332         * (pic16_outBitC): fixed for results in size greater than 1,
5333         * (genUminusFloat): fixed for pic16, ported code from mcs51,
5334         * (pic16_storeForReturn): optimized return of 0,
5335         * (genCmp): experimental code for new genCmp which uses PIC18's
5336         special compare&skip instructions. Initial tests fail some times
5337         with variables grater than 1 byte in size, so new code is disabled,
5338         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
5339         a single bit,
5340         * (genCast): began a fix to optimize the casting of a bit to another
5341         bit, now assigning a bitfield to another bitfield will fail, sorry,
5342         * src/pic16/main.c: disabled the use of lr-support feature,
5343         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
5344         * added some function prototypes, added function _debugf prototype,
5345         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
5346         bits with offset (case PO_GPR_BIT),
5347         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
5348         command line,
5349         * (isBankInstruction): modified to return 0 for no banking instruction,
5350         and 1 for banking instruction,
5351         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
5352         caused stop processing pCodes after a inline assembly block,
5353         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
5354         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
5355         registers when it shouldn't,
5356         * src/pic16/ralloc.c (allocReg): add preliminary support for
5357         supporting a limited set of temporary registers,
5358
5359 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5360
5361         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
5362           genDataPointerSet): ensure assignments always copy in MSB to LSB
5363           order,
5364           (loadRegFromAop): recognize CLRH optimization,
5365           (genFunction): optimize RECEIVE iCodes in reentrant functions
5366
5367 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5368
5369         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
5370           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
5371           selected.
5372         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
5373         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
5374           contiguous with data
5375
5376 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5377
5378         * device/lib/_gptrget.c (_gptrget),
5379         * device/lib/_gptrgetc.c (_gptrgetc),
5380         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
5381           instead of sjmp to ret
5382         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
5383           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
5384
5385 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
5386
5387         * .version: bumped version to 2.4.7
5388         * device/lib/_gptrget.c (_gptrget): is now _naked
5389         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
5390         * device/lib/_gptrput.c (_gptrput): is now _naked
5391         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
5392           (createFunction): fixed xstack
5393         * src/SDCCglue.c (emitMaps): set allocation required for bit area
5394         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
5395           or bit either,
5396           (geniCodeCritical): store original interrupt state in an iTemp bit
5397           var unless stack-auto
5398         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
5399         * src/SDCCmain.c (setIncludePath): added include/target to search path
5400         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
5401         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
5402           prototype,
5403           (processFuncArgs): put bit vars in bit area
5404         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
5405           unsaveRBank): fixed xstack,
5406           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
5407           (genFunction, genEndFunction): fixed xstack,
5408           (genAssign): optimization don't walk backwards through mem
5409         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
5410         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
5411         * support/regression/Makefile: also make library (for stack-auto) when
5412           making "all" and added "test-mcs51-xstack-auto"
5413         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
5414         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
5415         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
5416         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
5417         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
5418           make-library by MAKE_LIBRARY
5419         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
5420           regression tests for xstack
5421         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
5422         * support/regression/tests/critical.c: test for critical on mcs51
5423
5424 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5425
5426         * support/regression/ports/ucz80/spec.mk: use include and lib files from
5427           built version of sdcc instead of installed version
5428
5429 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
5430
5431         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
5432         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
5433           vprintf.c now
5434         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
5435         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
5436           WARNING: remove device/lib/build/z80/printf.o by hand when
5437           updating from previous build!
5438         * device/lib/z80/printf.c: updated comment
5439         * support/regression/tests/bug1057979.c: test all ports now
5440         * support/regression/tests/bug1065458.c: file added
5441
5442 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5443
5444         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
5445           *_start and *_end symbols for static functions
5446
5447 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
5448
5449         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
5450           and search crt0.o in all library paths,
5451           (setIncludePath): proper handling of --nostdinc,
5452           (setLibPath): proper handling of --nostdlib
5453         * support/regression/Makefile,
5454         * support/regression/ports/ds390/spec.mk,
5455         * support/regression/ports/gbz80/spec.mk,
5456         * support/regression/ports/hc08/spec.mk,
5457         * support/regression/ports/mcs51/spec.mk,
5458         * support/regression/ports/mcs51-large/spec.mk,
5459         * support/regression/ports/mcs51-stack-auto/spec.mk,
5460         * support/regression/ports/z80/spec.mk: use include and lib files from
5461           built version of sdcc instead of installed version
5462         * doc/sdccman.lyx: fixed typo in --nostdinc
5463
5464 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
5465
5466         * src/pic/pcode.c,
5467         * src/pic/device.c,
5468         * src/pic/ralloc.c,
5469         * src/pic/gen.c : added support to generate code for struct bit fields.
5470
5471 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
5472
5473         * as/xa51/xa_version.h,
5474         * device/include/errno.h,
5475         * device/include/regc515c.h,
5476         * device/lib/_itoa.c,
5477         * device/lib/_ltoa.c,
5478         * device/lib/ser_ir_cts_rts.c,
5479         * sim/ucsim/xa.src/glob.cc,
5480         * sim/ucsim/xa.src/inst_gen.cc,
5481         * sim/ucsim/xa.src/xa_bit.cc,
5482         * sim/ucsim/xa.src/xa_sfr.cc,
5483         * sim/ucsim/z80.src/inst_dd.cc,
5484         * sim/ucsim/z80.src/inst_fdcb.cc,
5485         * support/scripts/keil2sdcc.pl,
5486         * src/pic16/pic16.dsp,
5487         * src/pic16/pic16a.dsp: corrected cvs line endings
5488         * device/lib/printf_large.c: fixed bug 1057979
5489         * src/pic16/gen.c: fixed non-C standard code
5490         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
5491         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
5492         * support/regression/ports/mcs51/support.c: reload T1 asap
5493         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
5494           pdata use and clear idata startup behaviour
5495         * support/regression/tests/bug1057979.c: added
5496
5497 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
5498
5499         * device/examples/ds390/ow390/ad26.h,
5500         * device/examples/ds390/ow390/cnt1d.h,
5501         * device/examples/ds390/ow390/crcutil.c,
5502         * device/examples/ds390/ow390/ownet.h,
5503         * device/examples/ds390/ow390/owsesu.c,
5504         * device/examples/ds390/ow390/swt12.h,
5505         * device/examples/ds390/ow390/swtoper.c,
5506         * device/examples/ds390/ow390/temp10.h,
5507         * device/examples/ds390/ow390/thermodl.c,
5508         * device/examples/ds390/tinitalk/tinitalk.dsp,
5509         * device/examples/ds390/tinitalk/tinitalk.dsw,
5510         * device/examples/mcs51/clock/hw.h,
5511         * device/examples/mcs51/simple2/go.bat,
5512         * device/examples/serialcomm/windows/serial.h,
5513         * device/examples/xa51/dummy.c,
5514         * device/examples/xa51/hello.c,
5515         * device/include/80c51xa.h,
5516         * device/include/at89x051.h: corrected cvs line endings
5517
5518 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
5519
5520         * src/pic16/main.c (options): added command line --gstack, to trace
5521         stack over/under flows,
5522         * added pragma 'wparam' to allow passing first byte of function
5523         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
5524         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
5525         call to __gstack_test function and sets up the symbol as extern,
5526         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
5527         * popaop): added call to pic16_testStackOverflow,
5528         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
5529         wparamList list,
5530         * (genCall, genPcall): now all parameters are passed via stack
5531         except in functions that are pass to wparam pragma in which WREG is
5532         used too,
5533         * (genPcall): REENTRANT flag is checked to see if variable prototype
5534         contains reentrant keyword, don't call a non-reentrant function, via
5535         a reentrant function pointer or vice versa, functions are never
5536         passed via WREG,
5537         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
5538         D.Winkler,
5539         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
5540         SIGSEGV when accessing a NULL register stucture,
5541         * (pic16_printGPointerType): modified to handle UPPER modifier for
5542         function initializers, changed prototype of function to simpler one,
5543         * (pic16_printIvalFuncPtr): check to see if function is already
5544         added in externs list,
5545         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
5546         optimized a move from W to SFR with a move to the same register
5547         later after a CALL,
5548         * device/lib/pic16/debug: NEW directory, contains debug features
5549         which are enabled when linking with libdebug.lib, currently command
5550         line option --gstack enables stack pointer tracing for over/under
5551         flow, corresponding sources are in debug/gstack
5552
5553 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
5554
5555         * doc/sdccman.lyx: updated SDCC version,
5556         * (PIC16 port): update list of command line options,
5557         * src/pic16/device.h (structure pic16_options_t): added field gstack
5558         to enable stack overflow tracing on push/pops,
5559         * src/pic16/device.c (statistics structure): added statistics
5560         structure,
5561         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
5562         pic16_dump_int_registers): increase statistics counters for each
5563         * variable which is encountered
5564         * (pic16_dump_usection): emit each .udata variable to its own udata
5565         section,
5566         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
5567         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
5568         parameters via stack, otherwise use old scheme,
5569         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
5570         assembler output file,
5571         * src/pic16/main.c: added command line options --gstack to enable
5572         push/pop tracing for stack overflow,
5573         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
5574         instructions): added size of each instruction,
5575         * (pic16_countInstruction): estimate size of instructions in
5576         the_pFile list, inline assembly blocks are not counted,
5577         * (pic16_FixRegisterBanking): trace previous register usage, when
5578         banksel optimizations is greater than 0, don't emit a redudant
5579         banksel directive,
5580
5581 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
5582
5583         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
5584         * src/pic16/ralloc.c : applied same fix for pic16.
5585         * src/pic/gen.c : tidied it up a little.
5586
5587 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5588
5589         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
5590         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
5591
5592 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5593
5594         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
5595
5596 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5597
5598         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
5599         non-reentrant function __modsint in the interrupt function (thus
5600         corrupting math operations during serial I/O)
5601         * device/lib/ser_ir.c: as above, changed buffersize
5602         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
5603         256.c,d for zeroing
5604         * doc/Makefile: added option -t for rsync
5605
5606 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5607
5608         * src/SDCCast.h (struct ast),
5609         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
5610
5611 2004-10-20 Borut Razem <borut.razem AT siol.net>
5612
5613         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
5614         package
5615
5616 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
5617
5618         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
5619         makefile targets,
5620         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
5621         support functions to replace long sequences of MOVFF's from access
5622         bank registers to stack and vice versa,
5623         * src/pic16/device.h: added new field opt_flags, where optimization
5624         flags can be set to enable certain features,
5625         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
5626         * pBlock, (genFunction, genEndFunction): surroung loop for
5627         saving/loading used registers in stack with PC_INFO pCodes,
5628         INF_LREGS. Code in between can then be optimized by pCode optimizer
5629         to support function calls,
5630         * (genDataPointerSet): fixed bug which loaded float fields in
5631         structures with corrupt data,
5632         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
5633         in a standard way debug info on stderr. Feature used for developing
5634         and debugging only,
5635         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
5636         obsolete chunks of code,
5637         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
5638         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
5639         * pic16/src/pcode.c (pic16_newpCodeInfo,
5640         * (pic16_newpCodeOpLocalRegs),
5641         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
5642         feature,
5643         * (pic16_pCodeConstString): printing of the initial value of a
5644         symbol as a comment is inhibited since parsing was already done by
5645         copyStr and output is corrupt,
5646         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
5647
5648 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5649
5650         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
5651
5652 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
5653
5654         * as/mcs51/lkarea.c: removed old K&R style,
5655           (lnksect): changed check on boundary error,
5656           (lnksect2): changed check on boundary error,
5657           (lnksect2): extend XSTK to end of page if size = 1
5658         * as/mcs51/lkmain.c: removed old K&R style,
5659           (Areas51): create l_IRAM symbol
5660         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
5661         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
5662           model-mcs51-stack-auto, added model-mcs51-xstack-auto
5663         * device/lib/_mullong.c: added version to be compiled with xstack
5664         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
5665         * device/lib/mcs51/crtxclear.asm: clear pdata as well
5666         * device/lib/mcs51/crtxstack.asm: fixed comment
5667         * src/SDCCglue.c: maxInterrupts defaults to 0,
5668           (emitMaps): added pdata,
5669           (createInterruptVect): (re)moved default,
5670           (glue): added pdata,
5671           (glue): moved __start__xstack to XSTK with default size 1
5672         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
5673           and options.float_rent when options.stackAuto is set,
5674           (linkEdit): only write XDATA_NAME if provided on command line
5675         * src/SDCCmem.h,
5676         * src/SDCCmem.c: added pdata
5677         * src/port.h: added pdata_name to PORT
5678         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
5679           (saveRegisters, unsaveRegisters): removed usage of B,
5680           (genMinus): fixed accumulator clash,
5681           (genJumpTab): added comment, this needs another look
5682         * src/mcs51/gen.c: added check for "B in use" paranoia,
5683           added pushB() and popB()
5684         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
5685           chance
5686         * src/avr/main.c,
5687         * src/ds390/main.c,
5688         * src/hc08/main.c,
5689         * src/mcs51/main.c,
5690         * src/pic/main.c,
5691         * src/pic16/main.c,
5692         * src/xa51/main.c,
5693         * src/z80/main.c: (reset_regparms) made void parameter explicit and
5694           added PSEG (PAG,XDATA) or NULL to port specifier
5695         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
5696         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
5697           (_mcs51_genInitStartup): removed __start__xstack equ,
5698           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
5699         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
5700         * src/z80/gen.c (_rleAppend): fixed warnings
5701         * support/regression/tests/zeropad.c: added pdata test
5702         * .version: bumped to 2.4.6
5703
5704 2004-10-17 Borut Razem <borut.razem AT siol.net>
5705
5706         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
5707         as a part of nightly build
5708
5709 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
5710
5711         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
5712         WREG holds the first byte function parameters,
5713         * (aopForSym): take special case for symbols which are in FARSPACE
5714         but in CODESPACE too,
5715         * (assignResultValue): modified to take into account _G.useWreg,
5716         * (genCall): don't use wreg for parameter passing when function is
5717         declared as reentrant, too, added optimization INCF to stack
5718         pointer when stack parameter count is 1,
5719         * (genFunction, genEndFunction): refurnished and fixed to not using
5720         wreg for passing parameters when function has varargs or is
5721         reentrant, fixed bug with symbol name compare for generating
5722         functions in absolute address,
5723         * (pic16_storeForReturn): refurnished,
5724         * (genCmp): began writing a new version of the function, not ready
5725         yet, therefore it is disabled,
5726         * (genAssign): do not read code memory when assigning a function to
5727         a pointer function,
5728         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
5729         array of characters, not pointer,
5730         * (pic16initialComments): in debug mode emit an .ident directive for
5731         the assembler,
5732         * (_process_pragma): emit a new warning type (internal to pic16)
5733         when setting stack to default length, emit a similar warning when
5734         placing a function at absolute address and address is not word aligned
5735         * (_pic16_parseOptions): added 'return TRUE' statement,
5736         * (_pic16_linkEdit): if compiling a source, then add the source's
5737         file object, first in the list of objects to link,
5738
5739 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
5740
5741         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
5742         * src/pic/main.c : removed VC warning.
5743         * src/pic/gen.c : changed comment.
5744
5745 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
5746
5747         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
5748         reference to a deprecated symbol _GPTRREG was causing failure to
5749         link. Thanks G. M. Gallant for the info.
5750
5751 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
5752
5753         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
5754         comments for Bugs item #954788.
5755
5756 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
5757
5758         * src/pic16/device.c (pic16_dump_gsection,
5759         * pic16_groupRegistersInSection): handle symbols declared to be in
5760         access bank differently,
5761         * src/pic16/gen.c (struct _G): added field resDirect,
5762         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
5763         send values read from stack directly to result and don't allocate
5764         temporary values,
5765         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
5766         same registers,
5767         * (pic16_sameRegsOfs): NEW,
5768         * (freeAsmop): if _G.resDirect is set then do not mark registers as
5769         free because they were not allocated from temporary pool,
5770         * pic16_popRegFromString): workaround to fix a problem with
5771         allocating variables twice or never,
5772         * (genGenPointerGet): using PRODL instead of FSR0H,
5773         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
5774         instead of FSR0H,
5775         * (genAssign): take advantage of the _G.resDirect flag,
5776         * (genCast): around line 11844, use mov2f instead of directly
5777         MOVFF'ing between operands to account for literal values,
5778         * src/pic16/genutils.c: some new debug functions for gpsim have been
5779         added,
5780         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
5781         float with integer part only,
5782         * src/pic16/main.c (_process_pragma): handle pragma udata access to
5783         place variables in access bank
5784         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
5785         updated sources to reflect recent changes in gen.c
5786
5787 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
5788
5789         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
5790         sources that searched for headers in installation path, now the
5791         device/include/pic16 is used,
5792         * src/pic16/glue.c (pic16glue),
5793         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
5794         .line directives if not in debug mode, this suppresses assembler's
5795         warnings for ignored directives
5796
5797 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
5798
5799         * src/port.h: made reset_regparms prototype void parameter explicit.
5800         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
5801         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
5802         * doc/sdccman.lyx: documented warning disabling and how to use
5803           printf_large to make it print floats.
5804         * device/include/stdbool.h: NEW
5805         * device/lib/_atof.c,
5806         * device/lib/_divuint.c,
5807         * device/lib/_divulong.c,
5808         * device/lib/expf.c,
5809         * device/lib/printf_large.c,
5810         * device/lib/sincosf.c,
5811         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
5812         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
5813           a completely reentrant lib.
5814
5815 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
5816
5817         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
5818         * device/include/pic16/stdio.h: fixed bug with colon
5819
5820 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
5821
5822         * device/include/pic16/stdio.h,
5823         * device/include/pic16/stdlib.h,
5824         * device/include/pic16/math.h: NEW
5825         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
5826         declared as _naked to reduce overhead
5827         * device/lib/Makefile.in (target port-specific-objects-pic16):
5828         changed * to *.* so to ignore the CVS directory,
5829         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
5830         stacked variables back in stack,
5831         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
5832         corruption
5833
5834 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
5835
5836         * .version: bumped version number to 2.4.5
5837         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
5838         * support/Util/SDCCerr.c (messages structure): added entry for
5839         W_POSSBUG2
5840
5841         Large cumulative patch for pic16 port and libraries.
5842         * device/include/pic16/sdcc-lib.h,
5843         * device/include/pic16/stdarg.h,
5844         * device/include/asm/pic16/features.h,
5845         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
5846         * device/include/pic16/float.h: changes reentrant keyword with
5847         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
5848         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
5849         updated target build-libraries to include objects from gptr,
5850         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
5851         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
5852         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
5853         all function headings,
5854         * src/SDCCmain.c: added global parameter userIncDirsSet,
5855         * (parseCmdLine): when option -I is encountered add directory to
5856         userIncDirsSet too,
5857         * src/version.awk: added space between control and long,
5858         * src/pic16/NOTES: added some notes for the port,
5859         * src/pic16/gen.c: added prototype for mov2fp function,
5860         * (fReturnpic16[]): properly named return value registers,
5861         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
5862         * (aopForSym): added code to handle symbols with onStack flag set,
5863         symbols onStack are allocated PTRSIZE bytes,
5864         * (aopFreeAsmop): handles special case where asmops are stack objects,
5865         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
5866         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
5867         added argument lock to trace flaws in allocating temporary registers
5868         when developing port,
5869         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
5870         * (pic16_popRegFromString): reenabled allocating a direct register
5871         from string,
5872         * (assignResultValue): various beautifications,
5873         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
5874         referenced function argument,
5875         * (genIpush): reenabled to allow stacked arguments, handles only
5876         ic->parmPush iCodes,
5877         * (genCall, genPcall): major changes to allow for variable argument
5878         functions, fixed a bug with falsely restoring stack pointer after
5879         returning from call,
5880         * (genFunction): pending code for critical function,
5881         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
5882         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
5883         * (genNearPointerGet): fixed bug with indirect reading, was always
5884         reading from INDF0
5885         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
5886         pointers,
5887         * (genAddrOf): rewrote code to take address of a stacked function parameter
5888         * (genCast): fixed casting to generic pointer type,
5889         * src/pic16/gen.h: added AOP_STA,
5890         * (struct asmop): added field stk,
5891         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
5892         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
5893         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
5894         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
5895         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
5896         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
5897         generic pointers,
5898         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
5899         and library paths,
5900         * (pic16_port structure): generic pointer size is set to 3,
5901         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
5902         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
5903         compiler warning,
5904         * src/pic16/ralloc.c (allocReg): prevent allocating register when
5905         operand is an iTemp,
5906
5907 2004-09-24 Martin Helmling <mh AT octo-soft.de>
5908
5909         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
5910         * debugger/mcs51/simi.c: addapt new syntax of s51
5911
5912 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
5913
5914         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
5915         * src/pic16/pcode.c: commented out some calls to free() in order to
5916         fix bug #989576,
5917
5918 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5919
5920         * src/SDCCicode.h,
5921         * src/SDCCicode.c (isiCodeInFunctionCall),
5922         * src/avr/ralloc.c (selectSpil),
5923         * src/pic/ralloc.c (selectSpil),
5924         * src/pic16/ralloc.c (selectSpil),
5925         * src/ds390/ralloc.c (selectSpil),
5926         * src/hc08/ralloc.c (selectSpil),
5927         * src/xa51/ralloc.c (selectSpil),
5928         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
5929         stack in the middle of a function call sequence (fixes bug #1020268)
5930         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
5931         costs associated with the minimum switch case.
5932
5933 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5934
5935         * src/SDCC.lex: fixed bug #1030549
5936
5937 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5938
5939         * src/SDCCcse.h (struct cseDef),
5940         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
5941         over a function call if the CSE is derived from a symbol whose
5942         address has been taken (fixes bug #1029883)
5943         * support/regression/tests/bug-1029883: a new regression test for
5944         this bug
5945
5946 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5947
5948         * src/hc08/gen.c (emitinline): fixed bug #1029778
5949         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
5950         to a cast object is no longer a syntax error ("fixes" bug #1030006,
5951         and starts toward RFE #905167)
5952
5953 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
5954
5955         * src/pic16/gen.c (mov2f): New function to move an operand to
5956         another without considering if it is a literal or a register,
5957         * (pic16_sameRegs): don't check if they are both AOP_REG,
5958         * (AccRsh): removed andmask=0 lines,
5959         * (genLeftShift): duplicated to be improved in future versions,
5960         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
5961         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
5962         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
5963         * (pic16initMnemonics): added initialization for POC_INFSNZW,
5964         * (insertBankSwitch): fixed inserting banksel directives algorithm
5965         for instructions that follow a skip instruction, this fixes a report
5966         for broken subtraction code generation,
5967         * src/pic16/ralloc.c (deassignLRs): do not free register if current
5968         iCode is a left op, just in case result and right share the same
5969         registers
5970
5971 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5972
5973         * src/hc08/main.c,
5974         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
5975         preservation of HX
5976         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
5977         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
5978         on 2004-09-12; it was buggy
5979
5980 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
5981
5982         * src/SDCCsymt.h: removed RESULT_CHECK
5983         * src/SDCCast.c,
5984         * src/SDCCglue.c,
5985         * src/SDCCval.c,
5986         * src/pic/glue.c,
5987         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
5988
5989 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
5990
5991         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
5992         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
5993         configuration values no more rejected by compiler, they are assigned
5994         to configuration registers with a warning message instead,
5995         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
5996         the for-loop so last conf register is emitted too,
5997         * (_pic16_initPaths): link library libsdcc.lib by default,
5998         * (_hasNativeMulFor): modified test for multiplication according to
5999         Raphael Neider's remarks. Integer multiplication is also done with
6000         support functions,
6001         * device/include/pic16/pic18fregs.h: corrected type error in while
6002         testing and including 18f6720 header file
6003
6004 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
6005
6006         * src/pic16/device.h (pic16_options): removed field use_crt,
6007         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
6008         until an optimization to handle single bits is added,
6009         * (pic16_loadFSR0): moved before genUnpackBits,
6010         * (genAnd): some white lines removed,
6011         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
6012         leave_reset flags in pic16_options when using crt modules,
6013
6014 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
6015
6016         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
6017           for bugs 898889 & 979599. Also used some safer print instructions.
6018
6019 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
6020
6021         * src/pic16/device.h (pic16_options_t): added field use_crt,
6022         crt_name, no_crt,
6023         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
6024         catch a probable future bug,
6025         * src/pic16/gen.c: aopIdx function commented out,
6026         * (genAssign): commented out old code which used aopIdx,
6027         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
6028         code, added if conditionals to take into account the --use-crt
6029         command line options,
6030         * src/pic16/main.c (pic16_optionsTable): added new command line
6031         options, --use-crt= and --no-crt,
6032         * (_pic16_linkEdit): now the proper crt object is added in the
6033         linker command line except than when --no-crt is specified,
6034         * src/pic16/pcode.c,
6035         * src/pic16/pcode.h: added some structures and functions for a new
6036         optimization scheme to compansate for instruction overhead between
6037         same iCodes, this scheme is currently under development and is not
6038         working in any way,
6039         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
6040         to && operator,
6041         * device/lib/pic16/startup/crt0i.c,
6042         * device/lib/pic16/startup/crt0iz.c: added global char variable
6043         __uflags to force the generation of an idata section
6044
6045 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
6046
6047         * doc/Makefile,
6048         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
6049         * doc/sdccman.lyx: updated sdcc version to 2.4.4
6050
6051 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6052
6053         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
6054         Frieder) and clarified the default code optimization mode
6055
6056 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6057
6058         * src/SDCC.lex (doPragma, process_pragma),
6059         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
6060         "opt_code_size", and "opt_code_balanced"
6061         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
6062         regrouped options by category, added support for category headers
6063         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
6064         and "--opt-code-size"
6065         * doc/sdccman.lyx: documented these new options and pragmas
6066         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
6067         preference into account
6068
6069 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
6070
6071         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
6072           geniCodePreDec): Fixed bug 904237 by generating a warning
6073         * src/SDCCerr.h,
6074         * src/SDCCerr.c: added warning W_SIZEOF_VOID
6075
6076 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
6077
6078         * src/pic/device.c : When no max ram set validate full memory range.
6079         * src/pic/pcode.c,
6080         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
6081
6082 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
6083
6084         * device/lib/_gptrget.c,
6085         * device/lib/_gptrput.c: updated comment
6086         * device/lib/calloc.c,
6087         * device/lib/free.c,
6088         * device/lib/malloc.c,
6089         * device/lib/realloc.c: added LGPL, made them reentrant-safe
6090         * src/SDCCcse.c (cseBBlock),
6091         * src/SDCCicode.c (printOperand, geniCodeArray),
6092         * src/SDCCicode.h (struct operand): fixed bug 868103
6093         * support/regression/tests/bug-868103.c: added
6094         * src/SDCCast.c (searchLitOp),
6095         * src/SDCCcse.h (struct cseDef),
6096         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
6097         * src/SDCCicode.h (struct operand),
6098         * src/SDCCsymt.h (struct sym_link),
6099         * src/avr/gen.c (hasInc),
6100         * src/ds390/gen.c (hasInc),
6101         * src/hc08/gen.c (genPlusIncr, hasInc),
6102         * src/mcs51/gen.c (hasInc),
6103         * src/pic16/glue.c (pic16_printIvalChar),
6104         * src/pic16/ralloc.c (regWithIdx),
6105         * src/xa51/gen.c (hasInc) : removed warnings
6106         * src/SDCCast.c (createBlock): added comment ???
6107         * src/hc08/ralloc.c: updated comments
6108
6109 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6110
6111         * doc/sdccman.lyx: updated section on switch statements, added
6112         section about semaphore locking
6113         * doc/Makefile: added option -info for latex2html
6114         * device/lib/_gptrget.c,
6115         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
6116
6117 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
6118
6119         * src/pic/device.h,
6120         * src/pic/device.c,
6121         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
6122          maxram is less than 0x100.
6123
6124 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
6125
6126         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
6127
6128 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6129
6130         * src/port.h,
6131         * src/mcs51/main.c,
6132         * src/ds390/main.c,
6133         * src/z80/main.c,
6134         * src/hc08/main.c,
6135         * src/pic/main.c,
6136         * src/pic16/main.c,
6137         * src/avr/main.c,
6138         * src/xa51/main.c
6139         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
6140         a jump table is the best form for a switch statement, including
6141         automatic insertion of missing cases to make the case range
6142         continuous. Developed in collaboration with Frieder Ferlemann.
6143
6144 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6145
6146         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
6147         accumulator result if it needs sign extension
6148
6149 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
6150
6151         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
6152
6153 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
6154
6155         * device/lib/gbz80/printf.c,
6156         * device/lib/z80/printf.c: removed define for NULL
6157
6158 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
6159
6160         * as/xa51/xa_link.c,
6161         * device/examples/ds390/ow390/ad26.c,
6162         * device/examples/ds390/ow390/cnt1d.c,
6163         * device/examples/ds390/ow390/counter.c,
6164         * device/examples/ds390/ow390/ds2480.h,
6165         * device/examples/ds390/ow390/ds2480ut.c,
6166         * device/examples/ds390/ow390/findtype.c,
6167         * device/examples/ds390/ow390/gethumd.c,
6168         * device/examples/ds390/ow390/owllu.c,
6169         * device/examples/ds390/ow390/ownetu.c,
6170         * device/examples/ds390/ow390/swt12.c,
6171         * device/examples/ds390/ow390/swtloop.c,
6172         * device/examples/ds390/ow390/temp.c,
6173         * device/examples/ds390/ow390/temp10.c,
6174         * device/examples/ds390/ow390/thermo21.c,
6175         * device/examples/ds390/ow390/tinilnk.c,
6176         * device/examples/ds390/ow390/tstfind.c,
6177         * device/examples/serialcomm/windows/serial.cpp,
6178         * device/examples/serialcomm/windows/test_serialcomm.cpp,
6179         * device/include/reg51.h: fixed line endings for cvs
6180
6181 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6182
6183         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
6184         packRegsForAccUse, packRegisters): new accumulator register
6185         packing algorithm
6186         * support/regression/ports/hc08/support.c (_putchar): suppress
6187         warning of unused variable
6188         * src/SDCCicode.c: added SWAP entry to codeTable
6189
6190 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
6191
6192         * device/lib/sprintf.c: forgot to add this file before previous commit
6193
6194 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
6195
6196         * src/pic16/gen.c (genPackBits): added operand right in function
6197         parameters, load result directly if p_type is POINTER (that is
6198         called by genNearPointerSet)
6199         * (genUnPackBits): added operand left in function parameters,
6200         * (genNearPointerGet, genNearPointerSet): prevent the loading of
6201         FSR0 if accessing bitfields,
6202
6203 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
6204
6205         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
6206           _print_format; updated printf, sprintf, vsprintf
6207         * device/include/asm/default/features.h: corrected comment/define
6208         * device/lib/Makefile.in: added sprintf.c
6209         * device/lib/libsdcc.lib: added sprintf module
6210         * device/lib/printf_large.c,
6211         * device/lib/vprintf.c,
6212         * device/lib/sprintf.c: totally refactored printf_large and vprintf
6213           into these 3 files
6214         * support/regression/Makefile: changed ALL_PORTS into a usefull default
6215         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
6216         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
6217           hc08 test
6218         * support/regression/tests/zeropad.c: define idata as data for hc08
6219
6220 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6221
6222         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
6223         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
6224         labels are referenced at least once (even if a reference is not found)
6225         * src/hc08/gen.c (emitcode): set isComment flag for comments
6226         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
6227         loads), rules 6a..6b (optimize jumps to return)
6228
6229 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6230
6231         * device/lib/acosf.c (acosf),
6232         * device/lib/asinf.c (asinf),
6233         * device/lib/atanf.c (atanf),
6234         * device/lib/ceilf.c (ceilf),
6235         * device/lib/cosf.c (cosf),
6236         * device/lib/coshf.c (coshf),
6237         * device/lib/cotf.c (cotf),
6238         * device/lib/fabsf.c (fabsf),
6239         * device/lib/floorf.c (floorf),
6240         * device/lib/log10f.c (log10f),
6241         * device/lib/logf.c (logf),
6242         * device/lib/sinf.c (sinf),
6243         * device/lib/sinhf.c (sinhf),
6244         * device/lib/sqrtf.c (sqrtf),
6245         * device/lib/tanf.c (tanf),
6246         * device/lib/tanhf.c (tanhf),
6247         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
6248         replaced all instances of "reentrant" in the library functions
6249         defined in math.h with this macro.
6250         * support/regression/tests/float_trans.c: reenabled test for hc08
6251
6252 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
6253
6254         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
6255         erroneously deleted
6256
6257 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6258
6259         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
6260         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
6261         multi-byte volatile operands are used
6262         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
6263         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
6264         initialization to area GSINIT0 so that it would always precede
6265         any static initializers in GSINIT
6266         * support/regression/tests/zeropad.c: fixed idata define for hc08
6267         * support/regression/tests/bug-927659.c,
6268         * support/regression/tests/float_trans.c: disabled tests for hc08
6269         pending missing library routines
6270         * .version: increased version number to 2.4.4 - hc08 port now passes
6271         regression tests
6272
6273
6274 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
6275
6276         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
6277         * Makefile.common.in,
6278         * as/Makefile,
6279         * as/hc08/Makefile.in,
6280         * as/mcs51/Makefile.in,
6281         * as/z80/Makefile.in,
6282         * debugger/mcs51/Makefile.in,
6283         * device/include/Makefile.in,
6284         * device/lib/Makefile.in,
6285         * doc/Makefile,
6286         * link/Makefile,
6287         * link/z80/Makefile.in,
6288         * packihx/Makefile.in,
6289         * sim/ucsim/main_in.mk,
6290         * sim/ucsim/avr.src/Makefile.in,
6291         * sim/ucsim/doc/Makefile.in,
6292         * sim/ucsim/gui.src/serio.src/Makefile.in,
6293         * sim/ucsim/hc08.src/Makefile.in,
6294         * sim/ucsim/s51.src/Makefile.in,
6295         * sim/ucsim/xa.src/Makefile.in,
6296         * sim/ucsim/z80.src/Makefile.in,
6297         * src/Makefile.in,
6298         * support/cpp2/Makefile.in,
6299         * support/librarian/Makefile,
6300         * support/makebin/Makefile: added DESTDIR to the install path proposed
6301         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
6302         * doc/sdccman.lyx: added DESTDIR documentation
6303
6304 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
6305
6306         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
6307         instruction for interrupt handlers, use fast returns when returning
6308         from high priority interrupts
6309
6310 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6311
6312         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
6313         code generation
6314         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
6315         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
6316         bugs, ported much of Bernhard's code from mcs51
6317         * src/mcs51/gen.c (genSend),
6318         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
6319         than one when calling a reentrant function
6320         * device/lib/_mullong.c: defined an alternate struct layout for big
6321         endian ports (hc08)
6322
6323 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6324
6325         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
6326         test
6327
6328 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6329
6330         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
6331         are sane and complete before asking the port its prefered parameter
6332         passing method (fixes bug #1017633)
6333         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
6334         and _ret3
6335
6336 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6337
6338         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
6339         problem in bitfields >= 8 bits.
6340
6341 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6342
6343         * src/SDCCsymt.c: undid changes that were not meant to be committed
6344
6345 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6346
6347         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
6348
6349 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6350
6351         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
6352           copied and wrong bit got inverted
6353
6354 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6355
6356         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
6357         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
6358         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
6359         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
6360         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
6361         assignments to bitfields at known addresses
6362         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
6363         reads from bitfields at known addresses
6364         * src/hc08/ralloc.c (packRegisters),
6365         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
6366         genhc08Code): optimize pointer get values used as conditionals
6367         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
6368         and branch
6369
6370 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6371
6372         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
6373         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
6374         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
6375         as conditionals
6376
6377 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6378
6379         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
6380
6381 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6382
6383         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
6384         related problems
6385
6386 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
6387
6388         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
6389
6390 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6391
6392         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
6393         mcs51 port
6394
6395 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
6396
6397         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
6398
6399 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6400
6401         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
6402         cases use more compact code.
6403
6404 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
6405
6406         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
6407
6408 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6409
6410         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
6411
6412 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6413
6414         * src/SDCCsymt.h,
6415         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
6416         parameter of changePointer() from symbol* to sym_link*
6417         * src/SDCCast.c (decorateType): call changePointer() for CAST op
6418         * src/SDCCsymt.c (compareType): void* type is castable to other
6419         pointers, but not necesarily an exact match.
6420         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
6421         is no longer blindly treated as an exact match.
6422         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
6423
6424 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
6425
6426         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
6427
6428 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
6429
6430         * src/pic/gen.c,
6431         * src/pic/pcode.c,
6432         * src/pic/ralloc.h,
6433         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
6434
6435 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
6436
6437         * src/pic/device.c,
6438         * src/pic/device.h,
6439         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
6440
6441 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6442
6443         * src/mcs51/gen.c (emitcode): fixed bug #992819
6444
6445 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
6446
6447         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
6448           there's no need to make it worse
6449
6450 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6451
6452         * src/mcs51/ralloc.c (deassignLR),
6453         * src/ds390/ralloc.c (deassignLR),
6454         * src/hc08/ralloc.c (deassignLR),
6455         * src/z80/ralloc.c (deassignLR),
6456         * src/pic/ralloc.c (deassignLR),
6457         * src/pic16/ralloc.c (deassignLR),
6458         * src/avr/ralloc.c (deassignLR),
6459         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
6460         rlivePoint): fixed another part of bug #971834
6461
6462 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6463
6464         * src/z80/main.c: enabled "critical" keyword
6465         * src/z80/mappings.i,
6466         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
6467         functions (fixes bug #979646)
6468         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
6469
6470 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6471
6472         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
6473           such as c:\mydir.
6474
6475 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
6476
6477         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
6478           doesn't disable too much optimizations
6479
6480 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6481
6482         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
6483
6484 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
6485
6486         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
6487
6488 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6489
6490         * src/pic/gen.c tidied up tabs
6491         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
6492         * src/pic/main.c tidied up tabs
6493         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
6494         * src/pic/pcoderegs.c tidied up tabs
6495         * src/pic/ralloc.c tidied up tabs
6496
6497 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
6498
6499         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
6500         to S_FIXED for pic16 port and when symbol is not in level 0,
6501         allocate for S_REGISTER storage class and pic16 port, too,
6502         * src/pic16/device.h: prototype for checkSym,
6503         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
6504         * (pic16_assignConfigWordValue): test the value and the mask to
6505         validate that the value is suitable for the configuration word,
6506         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
6507         collect extern declared symbols, don't emit symbol twice, check
6508         first if symbol is in publics set first,
6509         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
6510         * added command line '--fstack' which enables an experimental
6511         feature for stack access, too buggy to be used yet...
6512         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
6513         * (pic16_allocDirReg): when register has storage class S_REGISTER
6514         allocate in pic16_dynAccessRegs,
6515         * device/include/pic16/pic18f????.h: modified configuration word
6516         naming convention, words started as CONFIG0H but should be CONFIG1H
6517
6518 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
6519
6520         * device/include/mcs51reg.h: fixed bug 970993
6521
6522 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
6523
6524         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
6525         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
6526         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
6527         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
6528         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
6529         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
6530           error/warning numbers,
6531           added function setWarningDisabled()
6532         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
6533         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
6534           _memcmp.c _memmove.c calloc.c realloc.c free.c
6535         * support/regression/tests/malloc.c: added tests for new functionality
6536         * support/regression/tests/zeropad.c: added tests for truncated initializers
6537           and initialized char arrays starting with '\x0'
6538         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
6539
6540 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
6541
6542         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
6543
6544 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6545
6546         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
6547         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
6548         peephole 177.e. Thanks to anonymous
6549
6550 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
6551
6552         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
6553         function isn't used in the source but referenced as a
6554         variable initializer then declare it as extern in .asm file
6555
6556 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
6557
6558         * .version: increased version number to 2.4.3
6559
6560         Adding version extension according to ChangeLog CVS revision
6561         * src/Makefile.in (target all): added dependency 'version.h'
6562         * (rule version.h): added rule to create version.h from ChangeLog,
6563         * (rule dep): added dependency version.h,
6564         * src/version.awk: AWK script to create version.h
6565         * src/SDCCdwarf2.c (dwWriteModule),
6566         * src/SDCCglue.c (initialComments),
6567         * src/SDCCmain.c (printVersionInfo): modified to write after
6568         version string the version extension number,
6569         * src/SDCCutil.c: included "version.h"
6570         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
6571         number,
6572         * src/SDCCutil.h: added prototype for getBuildNumber
6573
6574         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
6575         includeDirsSet, too,
6576         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
6577         const char [] is found in function prototype...
6578
6579         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
6580         moving to WREG with source is already in WREG,
6581         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
6582         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
6583         * (aopForSym): stack'ed symbols are partially supported, added
6584         if-clause to support symbols in FARSPACE,
6585         * (sameRegs): added test for AOP_ACC to see if registers are same,
6586         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
6587         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
6588         * (pic16_popRegFromString): will not allocate a new register if it
6589         doesn't find one by name, bug may have introduced...
6590         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
6591         * (genIpush): revived to use pic16 port's stack,
6592         * (genAddrOf): added incomplete case for stack'ed operand,
6593         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
6594         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
6595         can handle multibyte operands,
6596         * src/pic16/glue.c (pic16_printIval*): some debug info added,
6597         * (pic16initialComments): added message for MPLAB compatibility
6598         mode enabled,
6599         * src/pic16/main.h: prototype for pic16_mplab_comp,
6600         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
6601         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
6602         * (_pic16_linkEdit): NEW, handles link stage, transferred here
6603         because of increased complexity of procedure,
6604         * (_process_pragma): stack pragma changed to format 'stack pos len',
6605         emit symbol '_stack_end' to conform with gplink,
6606         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
6607         to search for register,
6608         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
6609         PO_GPR_REGISTER,
6610         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
6611         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
6612         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6613         case for PO_GPR_REGISTER,
6614         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
6615         dies, the new era is ahead !...
6616         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
6617         pic16_dynInternalRegs,
6618         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
6619         * (pic16_allocDirReg): minor optimizations and bug fixes,
6620         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
6621
6622         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
6623         load stack and frame pointer with address of 'stack_end' symbol
6624
6625 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
6626
6627         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
6628         without source code but only variable initializers
6629
6630 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
6631
6632         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
6633         external are not declared as extern to reduce overhead while linking
6634
6635 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
6636
6637         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
6638
6639 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
6640
6641         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
6642           Yee Keat for the patch
6643         * src/SDCCast.c (decorateType): fixed bug #979599
6644         * src/ds390/gen.h: removed local fReturnSizeDS390
6645         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
6646         * src/ds390/gen.c (genAnd, genOr, genXor),
6647         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
6648
6649 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
6650
6651         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
6652         add relFilesSet to $3, manipulate $2 to handle linking of object
6653         files without source files in command line,
6654         * device/include/pic16 (all headers): added ID location macros,
6655         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
6656         entries for ID location bytes,
6657         * (pic16_assignIdByteValue): NEW,
6658         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
6659         added field dumpcalltree to pic16_options_t,
6660         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
6661         is used instead of pic16_Gstack_base_addr, check if (ifx) before
6662         emitting rFalseIfx label after check_carry label,
6663         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
6664         pic16_emitDIRegs), NEW
6665         * (pic16glue): dump .calltree file when option --calltree found,
6666         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
6667         * (_pic16_genAssemblerPreamble): emit ID locations after
6668         configuration registers,
6669         * (pic16_linkCmd): modifications of the link command,
6670         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
6671         * (pic16_pCodeInitRegisters): don't init stack registers,
6672         * (pic16_findPrevInstruction): fixed bug,
6673         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
6674         bug with immediate registers,
6675         * (buildCallTree): traces stack push and pop,
6676         * (pct2): dump also stack usage for each function,
6677         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
6678         * (pic16_allocDirReg): various modifications,
6679         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
6680         fixed to 1,
6681
6682 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
6683
6684         * src/pic16/pcode.c: removed buggy double colon
6685
6686 2004-07-01 Borut Razem <borut.razem AT siol.net>
6687
6688         * support/scripts/sdcc.nsi: added include/pic16 to setup
6689
6690 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
6691
6692         * device/lib/Makefile.in: fixed bug in target objects-pic16,
6693         * device/lib/pic16/Makefile: prefixed with dash (-) command under
6694         target 'clean',
6695         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
6696         specific command line arguments. Also added sample lkr script
6697         for placing a variable at a specific memory bank.
6698         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
6699         at a specific memory bank,
6700         * (pic16_dump_isection): fixed bug which caused string literals to
6701         be omitted when dumping idata section,
6702         * (pic16_groupRegistersInSection): added code to handle registers
6703         in specific memory banks,
6704         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
6705         public, all references are renamed too,
6706         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
6707         AOP_DPTR2,
6708         * (pic16_storeForReturn): added case to handle when dest is WREG,
6709         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
6710         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
6711         pic16_rel_udata, check to see if that register is marked as being
6712         a member of a specific memory bank,
6713         * (pic16_printIvalCharPtr): added code to add string literals either
6714         to code or the idata sections,
6715         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
6716         also accept the 'udata' pragma,
6717         * src/pic16/main.h: new structure types sectName and sectSym
6718         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
6719         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
6720         * (pic16_findPrevInstruction): fixed, it returned nothing,
6721         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
6722         instruction combinations,
6723         * (pic16_FixRegisterBanking): heavily reorganised,
6724         * (pic16_AnalyzeBanking): if generating banksel directives is
6725         disabled, then don't call FixRegisterBanking at all,
6726         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
6727         completely removed,
6728         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
6729
6730 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
6731
6732         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
6733         Phuah Yee Keat <yk.phuah AT nestac.com>
6734
6735 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6736
6737         * src/pic16/glue.c (pic16createInterruptVect): function now emits
6738         correctly the IVT even if it is relocated to some other location
6739
6740 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6741
6742         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
6743         * device/include/pic16/pic18f2220.h: NEW,
6744         * device/lib/pic16/libdev/pic18f2220.c: NEW,
6745         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
6746         * src/pic16/device.c (struct Pics16): added info for 18f2220,
6747         * src/pic16/device.h (struct pic16_options): added ivt_loc and
6748         nodefaultlibs, ivt_loc is the location of the interrupt vector
6749         table, and nodefaultlibs signs that default libraries should not be
6750         linked in link stage,
6751         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
6752         according to --ivt-loc argument,
6753         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
6754         when pragma stack is found,
6755
6756 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6757
6758         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
6759         256 (range check), 257 (do while), 258.a-f (bit banging
6760         f.e. on 3-wire SPI bus)
6761
6762 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6763
6764         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
6765         variables used exclusively within a loop
6766
6767 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
6768
6769         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
6770
6771 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6772
6773         * src/SDCClrange.c (computeClash): fixed bug #971834
6774
6775 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6776
6777         * src/mcs51/gen.c (genCmp): fixed bug #975903
6778         * src/hc08/gen.c (operandsEqu),
6779         * src/ds390/gen.c (operandsEqu),
6780         * src/z80/gen.c (operandsEqu),
6781         * src/pic/gen.c (operandsEqu),
6782         * src/pic16/gen.c (operandsEqu),
6783         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
6784         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
6785
6786 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6787
6788         * src/SDCCcse.c (cseBBlock): fixed bug #966963
6789
6790 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
6791
6792         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
6793         default case in switch statement,
6794         * glue.c (pic16_initPointer): expr is initialised via decoarteType
6795         to eliminate problem with initialisation of pointers, but problem
6796         still exists,
6797         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
6798         * (emitStaticSegment): removed various lines emitting debug info,
6799         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
6800         added processor registers for utilizing EEPROM,
6801         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
6802         configurable and set 8
6803
6804 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
6805
6806         * .version: increased version number to 2.4.2,
6807
6808         Cumulative patch for pic16 port
6809         * src/pic16/device.c: changed scheme to dump initial values for
6810         variables in idata segment, all print_idata* functions were removed,
6811         now the pic16_printIval* will be called,
6812         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
6813         * _pic16_printPointerType, pic16_printPointerType,
6814         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
6815         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
6816         NEW, similar to the respective functions in SDCCglue.c,
6817         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
6818         way, emitting hex bytes,
6819         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
6820
6821 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6822
6823         * src/avr/ralloc.c (serialRegAssign),
6824         * src/xa51/ralloc.c (serialRegAssign),
6825         * src/pic/ralloc.c (serialRegAssign),
6826         * src/pic16/ralloc.c (serialRegAssign),
6827         * src/hc08/ralloc.c (serialRegAssign),
6828         * src/z80/ralloc.c (serialRegAssign),
6829         * src/ds390/ralloc.c (serialRegAssign),
6830         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
6831
6832 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6833
6834         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
6835         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
6836
6837 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
6838
6839         Cumulative patch for pic16 port:
6840         * src/pic16/device.h (typedef PIC16_device) modified fields for
6841         defining microcontrollers,
6842         * src/pic16/device.c: added new info for all devices in Pics16 array,
6843         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
6844         to be optimised out by the pCode optimiser,
6845         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
6846         specially, bug reported by G.M. Gallant,
6847         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
6848         as force'd so that cannot be optimised out by pCode optimiser,
6849         * src/pic16/pcode.c,
6850         * src/pic16/pcodepeeph.c,
6851         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
6852         they are disabled by default, but can be enabled explicit with
6853         command argument --denable-peeps, for testing,
6854         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
6855         --pomit-ivt in COMPILE_FLAGS
6856
6857 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6858
6859         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
6860           compilation on MSVC
6861
6862 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6863
6864         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
6865
6866 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6867
6868         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
6869         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
6870
6871 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
6872
6873         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
6874         would only assign 0x300001 register.
6875
6876 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
6877
6878         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
6879         in COMPILE_FLAGS. Thanks to G. Gallant for report.
6880
6881 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6882
6883         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
6884         for ds80c400
6885         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
6886         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
6887         added peephole 254 (left shift), 255 (jump table)
6888
6889 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
6890
6891         * device/lib/Makefile.in: removed comment line with model-pic16,
6892         * (target port-specific-objects-pic16): the libraries and objects
6893         are copied to the build directory form the device/lib/pic16/bin
6894         directory
6895
6896         Cumulative patch concerning pic16 port:
6897         * library directory has been re-organized,
6898         * added support for PIC18F1220,
6899         * added headers and library sources for chips 18f1220,18f6520,
6900         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
6901
6902         * configuration registers setting has changed, now each supported
6903         device has a complete description of the registers it uses,
6904         * all initialisations are moved to idata sections, these section
6905         can be absolute or relocatable,
6906         * fixed initialisation of codespace variables,
6907         * fixed warning about PCLATU and gpsim,
6908         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
6909         * (genAssign): use table reads when assigning from variables in codespace,
6910         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
6911         char/int variables placed in codespace,
6912         * (pic16_emitConfigRegs): NEW, emits a list with configuration
6913         registers set in .asm file, no need for --pomit-config-words anymore,
6914         * (pic16glue): some 8051 legacy segments are commented out
6915         (to be removed completely),
6916         * added support for alternative assembler and linker with --asm=
6917         and --link= command line arguments,
6918         * peepholes are disabled automatically in the port, no need to
6919         specify on command line,
6920         * port supports natively char/int/long multiplication, but converts
6921         all divisions to support functions,
6922         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
6923         to the file set in variable $2,
6924         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
6925         strings in ASCII format and not in hex,
6926         * ralloc.c (serialRegAssign): added a triplet of conditional calls
6927         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
6928         allocate proper register if iCodes aren't temporary,
6929
6930 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
6931
6932         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
6933
6934 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
6935
6936         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
6937         is commented out
6938
6939 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6940
6941         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
6942         computed address is reused
6943         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
6944         multi-byte bitfields
6945
6946 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6947
6948         * src/z80/gen.c: (genArrayInit): must check for pointers too
6949
6950 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
6951
6952         * support/regression/tests/zeropad.c: never meant to commit the
6953           nestedstruct test: removed, added check for GCC version
6954
6955 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
6956
6957         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
6958         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
6959         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
6960           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
6961           bugs 928906 and 954082 half-empty initializers
6962         * src/SDCCsymt.h,
6963         * src/SDCCsymt.c (getAllocSize): added for above fix
6964         * src/z80/gen.c (genArrayInit): fixed bug 741044
6965         * support/regression/tests/zeropad.c: added tests
6966
6967 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
6968
6969         * src/pic16/device.c (pic16_dump_section): corrected bug which
6970         caused some symbols of the libraries to be misplaced
6971
6972 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6973
6974         * src/pic16/glue.c,
6975         * src/pic16/ralloc.h,
6976         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
6977         to fix conflict with pic port
6978
6979 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
6980
6981         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
6982         externs configuration variables,
6983         * src/pic16/ralloc.h,
6984         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
6985         prototype in header, commented out some debug messages
6986
6987 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
6988
6989         * src/pic16/glue.c,
6990         * src/pic16/main.c,
6991         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
6992         for gpasm COFF object generation. Thanks to D. Hawkins for
6993         his patch info
6994
6995 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6996
6997         * src/ds390/main.c,
6998         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
6999         Brock for spotting this)
7000         * src/ds390/gen.c (genEndFunction),
7001         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
7002         interrupt handler and critical. Disable push/pop optimizations when
7003         peephole optimizations disabled.
7004
7005 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
7006
7007         Updated pic16 library sources and headers.
7008         * device/lib/pic16/pic18f*/ ,
7009         * device/include/pic16/*.h: modified to handle structured SFR
7010         definitions
7011
7012 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
7013
7014         * src/port.h (PORT structure): added hook initPaths, now each
7015         port can declare its own default search paths,
7016         which can been seen with the --print-search-dirs option,
7017         see pic16 port for example,
7018         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
7019         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
7020         * (doPrintSearchDirs): NEW, replaces in a central manner the
7021         printing of search dirs which was split in set*Paths functions,
7022         * (main): added call to port->initPaths and doPrintSearchDirs,
7023         * src/avr/main.c,
7024         * src/ds390/main.c,
7025         * src/hc08/main.c,
7026         * src/izt/i186.c,
7027         * src/izt/tlcs900h.c,
7028         * src/mcs51/main.c,
7029         * src/pic/main.c,
7030         * src/pic16/main.c: modified port structures to reflect addition of
7031         initPaths hook,
7032
7033         * src/pic16/device.c (regCompare): registers are finally sorted by name,
7034         * (pic16_dump_section): for registers in same address reserve memory once,
7035         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
7036         to no_banksel,
7037         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
7038         result is greater in size than right or left,
7039         * (pic16_genUMult8X8_8): there are some cases where the result can
7040         be 16 bits size, so handle these,
7041         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
7042         * (pic16_outBitC): modified to emit pcodes,
7043         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
7044         or not,
7045         * (genDivOneByte): implemented algorithm to divide 8-bits,
7046         * (genCmp): uncommented goto, but issues still exist,
7047         * (genAnd): fixed a bug with variables >8bits,
7048         * (genPackBits): optimization added that uses BCF/BSF to change a
7049         single bit,
7050         * (genAssign): fixed bug when assigning floating point literals,
7051         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
7052         __sdcc_gsinit_startup label,
7053         * src/pic16/main.c (_pic16_init): removed search directory
7054         initialisations,
7055         * (_pic16_initPaths): NEW, used to initialise search directories,
7056         * (_hasNativeMulFor): support functions for all except char/int
7057         multiplication, and char division,
7058         * (PIC16_port struct): modified entry for native mul support,
7059         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
7060         no_banksel option,
7061         * (buildCallTree): call to register_usage is ifdef'ed out,
7062
7063 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7064
7065         * device/include/string.h: applied Stas Sergeev's patch to make this
7066         header file compatible with the preprocessor -Wundef option
7067         * src/SDCCmain.c (main): abort compilation if preprocessor reports
7068         failure (fixes bug #941458)
7069
7070 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7071
7072         * src/SDCCopt.c (killDeadCode): fixed bug #907733
7073         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
7074         that the variable, not the function, should be static
7075         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
7076         to be consistent with non-literal case
7077
7078 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7079
7080         * src/SDCCast.c (isConformingBody): fixed bug #949967
7081         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
7082         convilong): fixed bug #952086
7083
7084 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7085
7086         * src/SDCCmem.c (allocVariables): fixed bug #955321
7087
7088 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7089
7090         * src/hc08/main.c (_hc08_genAssemblerEnd),
7091         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
7092         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
7093         completely eliminated the use of a temporary file
7094         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
7095         when more than one file linked
7096         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
7097
7098 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7099
7100         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
7101         which fixes bug #543481
7102         * support/regression/tests/bug-751703.c: fixed comments left from a
7103         cut and paste error
7104         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
7105         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
7106         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
7107         scopes
7108         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
7109         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
7110         are now changed to underscores in moduleName
7111
7112 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7113
7114         * as/mcs51/lkmem.c: better fix for bug #954173
7115
7116 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
7117         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7118
7119         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
7120         * device/include/c8051f000.h,
7121         * device/include/c8051f120.h,
7122         * device/include/c8051f300.h,
7123         * device/include/c8051f310.h,
7124         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
7125         PWM16) and detab'ed
7126
7127 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7128
7129         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
7130         and mailing lists, doc'ed --no-peep-comments, removed reference
7131         to knoppix (newest version has no LyX/LaTeX), other minor changes
7132         * src/SDCCglue.c (glue): save 2 bytes stack space with
7133         option --main-return. The ljmp could probably be avoided too
7134
7135 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7136
7137         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
7138
7139 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7140
7141         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
7142         * src/SDCCopt.c (isLocalWithoutDef),
7143         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
7144         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
7145         (credit to Maarten Brock for patch #949363, on which this is based)
7146         * support/regression/tests/bug-751703.c: some test cases of extern used
7147         within inner scopes.
7148
7149 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7150
7151         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
7152         SPEC_STRUCT
7153         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
7154         struct definitions
7155         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
7156         dwWriteLabel): fix to create valid debugger symbols even when
7157         the module name has non-alphanumeric symbols in it
7158         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
7159         when a variable's allocation has been optimized away
7160
7161
7162 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7163
7164         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
7165         * src/hc08/main.c,
7166         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
7167         * src/mcs51/main.c,
7168         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
7169         * src/ds390/main.c,
7170         * src/z80/gen.c (z80_emitDebuggerSymbol),
7171         * src/z80/main.c,
7172         * src/pic/gen.c (pic14_emitDebuggerSymbol),
7173         * src/pic/main.c,
7174         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
7175         * src/pic16/main.c,
7176         * src/avr/gen.c (avr_emitDebuggerSymbol),
7177         * src/avr/main.c,
7178         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
7179         * src/xa51/main.c,
7180         * src/SDCCdebug.c (emitDebuggerSymbol),
7181         * src/SDCCdebug.h,
7182         * src/port.h: added a debugger struct to the port struct. Added a
7183         callback for defining debugger symbols
7184
7185         * src/SDCCast.c (createLabel),
7186         * src/SDCC.y (labeled_statement): mark all compiler generated labels
7187         with isitmp = 1
7188         * src/SDCCicode.h,
7189         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
7190         iCode back to the ast for the function
7191
7192         * src/hc08/ralloc.c (hc08_assignRegisters),
7193         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
7194         unneeded fields from the regs struct.
7195         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
7196         pushReg() & pullReg() functions instead of emitcode()
7197
7198         * src/hc08/gen.c (genLabel, genhc08Code),
7199         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
7200
7201         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
7202         debugger hooks
7203
7204         * src/hc08/gen.c (genEndFunction, genhc08Code),
7205         * src/hc08/gen.h,
7206         * src/mcs51/gen.c (genEndFunction, gen51Code),
7207         * src/mcs51/gen.h,
7208         * src/ds390/gen.c (genEndFunction, gen390Code),
7209         * src/ds390/gen.h,
7210         * src/z80/gen.c (genEndFunction, genZ80Code),
7211         * src/z80/gen.h,
7212         * src/z80/z80.h,
7213         * src/pic/gen.c (genEndFunction, genpic14Code),
7214         * src/pic/gen.h,
7215         * src/pic16/gen.c (genEndFunction, genpic16Code),
7216         * src/pic16/gen.h,
7217         * src/avr/gen.c (genEndFunction, genAVRCode),
7218         * src/avr/gen.h,
7219         * src/xa51/gen.c (genEndFunction, genXA51Code),
7220         * src/xa51/gen.h,
7221         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
7222         specific code to cdbFile.c and out of the backend code generators
7223
7224         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
7225         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
7226         starting address is now 0
7227
7228         * as/hc08/asm.h,
7229         * as/hc08/m08pst.c,
7230         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
7231         assembler directive for DWARF support
7232         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
7233
7234         * src/src.dsp,
7235         * src/Makefile.in,
7236         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
7237
7238 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7239
7240         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
7241         and inappropriate peephole optimization in jump tables
7242
7243 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7244
7245         * as/hc08/m08pst.c,
7246         * src/SDCCglue.c: sdccopt works for the hc08 port now
7247
7248 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
7249
7250         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
7251
7252 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7253
7254         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
7255
7256 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7257
7258         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
7259         rules
7260         * src/SDCCmain.c,
7261         * src/SDCCglobl.h,
7262         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
7263         comments from the peephole optimizer replacement rules
7264         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
7265         symbols
7266         * src/SDCCcse.c (updateSpillLocation),
7267         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
7268         equivalents
7269         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
7270         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
7271         objects far pointers
7272
7273 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7274
7275         * src/SDCCsymt.h: a missing part of my last change
7276         * src/pic/ralloc.c (regTypeNum),
7277         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
7278
7279 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7280
7281         * src/SDCCicode.h,
7282         * src/SDCCicode.c (aggrToPtrDclType),
7283         * src/SDCCptropt.h,
7284         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
7285         ptrPseudoSymConvert),
7286         * src/pic/ralloc.c (regTypeNum),
7287         * src/pic16/ralloc.c (regTypeNum),
7288         * src/hc08/ralloc.c (regTypeNum),
7289         * src/ds390/ralloc.c (regTypeNum),
7290         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
7291         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
7292
7293 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7294
7295         * link/z80/lkmain.c (afile),
7296         * as/hc08/lkmain.c (afile),
7297         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
7298         prevent a pointer problem when a filename has no directory and
7299         no extension specified.
7300
7301 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7302
7303         * link/z80/lkmain.c (afile): allow periods in directory names
7304         * link/z80/lkmain.c (afile),
7305         * as/mcs51/lkmain.c (afile),
7306         * as/hc08/lkmain.c (afile): allow linker script file to have an
7307         extension other than ".lnk"
7308         * link/z80/lklex.c (getfid),
7309         * link/z80/lkmain.c (parse),
7310         * as/mcs51/lklex.c (getfid),
7311         * as/mcs51/lkmain.c (parse),
7312         * as/hc08/lklex.c (getfid),
7313         * as/hc08/lkmain.c (parse): Support comments in the linker script
7314         file on lines by themselves and after filenames
7315
7316 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7317
7318         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
7319
7320 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7321
7322         * src/z80/peeph-z80.def: removed some peephole rules that don't
7323         work with multibyte arithmetic (fixed bug #937126)
7324         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
7325         to registers and not global variables
7326         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
7327         geniCodePreInc, geniCodePostDec, geniCodePreDec,
7328         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
7329         checking for assignments not internally generated (fixed bug #931895)
7330         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
7331         structure member (fixed bug #930072)
7332
7333 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7334
7335         * src/SDCCmain.c (linkEdit),
7336         * src/hc08/main.c (_hc08_parseOptions),
7337         * as/hc08/Makefile.in,
7338         * as/hc08/aslink.h,
7339         * as/hc08/asm.h,
7340         * as/hc08/m08pst.c,
7341         * as/hc08/lkrloc.c (relr, rele),
7342         * as/hc08/lkarea.c (lnkarea)
7343         * as/hc08/lkmain.c (afile, parse),
7344         * as/hc08/lkelf.c: support for ELF output
7345         * as/hc08/lks19.c (s19),
7346         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
7347
7348 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7349
7350         * as/mcs51/lkihx.c: Fixed bug #899105.
7351
7352 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7353
7354         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
7355         .dsp files from Unix to DOS.
7356
7357 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7358
7359         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
7360         function pointers; we have been compliant for several months now.
7361         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
7362         change that was accidently commented out
7363         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
7364         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
7365         bug #922319
7366
7367 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7368
7369         * src/hc08/gen.c: output of all of the internal debugging information
7370         is now controlled by the D() macro; it is disabled by default
7371
7372 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7373
7374         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
7375         harder to keep the same registers during a CAST iCode
7376         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
7377         long via int can be done in a single cast, if the signedness is
7378         correct.
7379         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
7380         putchar() in tinibios.c in ds390's library
7381
7382 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
7383
7384         * src/SDCCast.c (decorateType): fixed bug #898889,
7385         cast result of a literal complement too
7386         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
7387         fixed check for bitfields
7388
7389 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
7390
7391         * src/SDCCicode.c (geniCodeLogic): made it static,
7392         (geniCodeLogicAndOr): added in order to fix bug #905492,
7393         (ast2iCode): fixed bug #905492
7394         * support/regression/tests/bug-905492.c: added
7395         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
7396         (processParms): fixed bug #927659: don't copy parms, this will clear
7397         decorated flag
7398         * support/regression/tests/bug-927659.c: added
7399
7400 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
7401
7402         * src/SDCCast.c (addCast): don't cast float to char
7403         * device/lib/libsdcc.lib: added _memmove
7404
7405 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
7406
7407         * device/lib/large/Makefile: fixed parallel execution by
7408         replacing `make` by `$(MAKE)`
7409
7410 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7411
7412         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
7413         offsets (fixes bug #923936)
7414
7415 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
7416
7417         * device/lib/small/Makefile: fixed parallel execution by
7418         replacing `make` by `$(MAKE)`
7419
7420 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7421
7422         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
7423
7424 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
7425
7426         * src/pic/gen.c (genCpl): multi-byte complements were not working.
7427         * src/regression/Makefile: Regression test was not running.
7428
7429 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7430
7431         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
7432         complement if possible
7433         * src/SDCCval.c (valComplement),
7434         * src/SDCCicode.c (operandOperation): fixed complement of literal
7435         * support/regression/tests/onebyte.c (testComplement): added
7436
7437 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
7438
7439         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
7440         return an optimized tree; actually replace actParm with the new tree
7441         * src/SDCCast.h: added some parantheses to remove side effects
7442         * support/regression/tests/bug-920866.c
7443
7444 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
7445         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
7446         Bit operands were not being handled properly in the pic14 port.
7447         (now src/regression/add.c passes again).
7448
7449 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7450
7451         * src/SDCC.y (labeled_statement): case and default no longer require
7452         a following statement (RFE #893037)
7453
7454 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7455
7456         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
7457         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
7458         disabled (fixes bug #916294)
7459         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
7460         "mov a,acc"; patch provided by Lenny Story
7461         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
7462
7463 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7464
7465         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
7466         functions
7467         * src/ds390/gen.c (genFunction, genEndFunction),
7468         * src/ds390/ralloc.c (ds390_assignRegisters),
7469         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
7470         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
7471         pushed if there are parameters passed on the stack. Also, a cleaner
7472         way to decide if r0/r1 should be pushed/popped. (Together they fix
7473         bug #918693)
7474
7475 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7476
7477         * doc/sdccman.lyx,
7478         * device/lib/mcs51/crtpagesfr.asm,
7479         * device/lib/mcs51/crtxinit.asm,
7480         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
7481         to avoid confusion with Si Lab's SFRPAGE register.
7482
7483 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7484
7485         * src/SDCCglue.c (emitMaps): allow public sfr variables
7486         * src/SDCCglue.c (initialComments): include compiler build date
7487         with compiler version and put the timestamp of the generated
7488         assembly file on a serperate line to be less confusing.
7489         * src/port.h: added genInitStartup hook
7490         * src/avr/main.c,
7491         * src/ds390/main.c,
7492         * src/hc08/main.c,
7493         * src/pic/main.c,
7494         * src/pic16/main.c,
7495         * src/xa51/main.c,
7496         * src/z80/main.c: genInitStartup initialize as NULL (default to
7497         historical behaviour)
7498         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
7499         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
7500         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
7501         library instead of hard coding it into the compiler.
7502         * support/regression/ports/mcs51-stack-auto/spec.mk,
7503         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
7504         * device/lib/mcs51/Makefile,
7505         * device/lib/small/Makefile,
7506         * device/lib/large/Makefile,
7507         * device/lib/mcs51/crtpagesfr.asm,
7508         * device/lib/mcs51/crtstart.asm,
7509         * device/lib/mcs51/crtxclear.asm,
7510         * device/lib/mcs51/crtxinit.asm,
7511         * device/lib/mcs51/crtclear.asm,
7512         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
7513         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
7514         and into user configurable files.
7515         * device/lib/clean.mk: clean mcs51 directory too
7516         * support/regression/tests/longlit.c: added static to T1 declaration
7517         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
7518         accesses in the initialization code
7519
7520 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7521
7522         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
7523         OSCTRIMVAL as noted in bug #916008
7524
7525 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7526
7527         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
7528         in loops with multiple exits (reported as incorrect registers
7529         used by Martin Helmling in Sdcc-user list)
7530
7531 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7532
7533         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
7534         made ds390 register extensions look less like error messages
7535
7536 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7537
7538         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
7539         reported by Adam Wozniak in Sdcc-user list
7540
7541 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
7542
7543         * src/SDCCast.c (decorateType): fixed with bug and promotion in
7544         arithmetic optimizations, added debug output
7545
7546 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
7547
7548         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
7549         * sdcc.spec: updated and split sdcc into 3 rpms
7550         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
7551         needed for literals of LEFT_OP and '+'
7552         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
7553         introduced RESULT_TYPE_NOPROM
7554         (geniCodeMultiply): fixed logic for decision if mul is optimized to
7555         left shift
7556         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
7557         limited promotion to int only for '*'
7558         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
7559
7560 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
7561
7562         * src/pic16/gen.c (genSkip),
7563         (genc16bit2lit), (gencjneshort): commented out
7564         (is_LitOp): new helper function, checks operand type
7565         (genCmpEq): rewritten
7566
7567 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
7568
7569         * support/regression/tests/bug-908454.c: added
7570
7571 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
7572
7573         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
7574         * src/SDCCicode.c (usualBinaryConversions): op needs int type
7575         (geniCodeCast): cosmetic, don't preserve bit storage class
7576         (geniCodeLeftShift): added promotion
7577         (geniCodeLogic): fixed regression
7578         * src/SDCCsymt.c (computeTypeOr): accept bits too
7579         (compareType): 2nd part of fix for bug #908454, needed for bitfields
7580
7581 2004-03-07  Borut Razem <borut.razem AT siol.net>
7582
7583         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
7584
7585 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
7586
7587         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
7588         version of pic16_genPackRegisters which does not check if ic is a
7589         CAST operator,
7590         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
7591         function cause string1.c regression test fails
7592
7593 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
7594
7595         * sim/ucsim/configure.in,
7596         * sim/ucsim/configure,
7597         * sim/ucsim/doc/Makefile.in: use docdir
7598         * src/SDCC.y: fixed sbit atrributes
7599         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
7600         * src/SDCCast.c (decorateType): |^& need special promotion handling
7601         * src/SDCCast.h,
7602         * src/SDCCsymt.h: moved definition of RESULT_TYPE
7603         * src/SDCCsymt.h (computeType),
7604         * src/SDCCicode.c: computeType() needs op
7605         * src/SDCCsymt.c (checkTypeSanity),
7606         * doc/sddman.lyx: "plain" bitfields are unsigned
7607         * src/SDCCsymt.c (computeTypeOr): added
7608         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
7609         |^& ops
7610         * src/SDCCval.c (val*): computeType() needs op
7611         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
7612         * support/regression/tests/onebyte.c: added tests for |^&
7613
7614 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
7615
7616         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
7617         for writing icode into asm output.
7618
7619 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
7620
7621         * src/pic16/device.c: added some debug lines enabled
7622         with macro DEBUG_CHECK,
7623         * src/pic16/genarith.c: more debug in genPlus,
7624         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
7625         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
7626         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
7627         * (aopForSym): onStack symbols are re-placed in data memspace,
7628         and onStack flag is cleared,
7629         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
7630         copy temporary pcodeop,
7631         * (genPcall): added warning for not updating PCLATU,
7632         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
7633         always true for pic16 port,
7634         * (genMultOneWord): NEW, supports integer multiplication,
7635         * (genMult): modified to call genMultOneWord,
7636         * (ifxForOp): added warning when return NULL,
7637         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
7638         flag is set before call to operandFromSymbol for implicit
7639         added structures,
7640         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
7641         options.intlong_rent are set by default,
7642         * (_hasNativeMulFor): modified to allow port generation of integer
7643         multiplication,
7644         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
7645         set regtype to REG_SFR for all registers, restricting seting the
7646         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
7647
7648 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7649
7650         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
7651         more than 500 times in the regression tests
7652
7653 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7654
7655         * support/Util/SDCCerr.h,
7656         * support/Util/SDCCerr.c,
7657         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7658         enumerator_list),
7659         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
7660         for symbol conflicts.
7661         * support/valdiags/tests/enum.c,
7662         * support/valdiags/tests/tentdecl.c,
7663         * support/valdiags/tests/struct.c: expect possible error messages
7664         referring to original symbol definitions.
7665         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
7666         * src/SDCCsymt.h,
7667         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
7668
7669 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
7670
7671         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
7672
7673 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
7674
7675         * src/pic16/ralloc.c (newReg): fixed bug #908929
7676
7677 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7678
7679         * src/ds390/gen.c: added missing #include "main.h"
7680
7681 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
7682
7683         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
7684         checking if symbol is already in set,
7685         * src/pic16/device.h: prototype for checkAddSym,
7686         * src/pic16/gen.c: (_G): added entry interruptvector,
7687         * (assignResultValue): removed some commented out lines,
7688         * (genFunction): check for ISR via sym->type, absolute section for
7689         interrupt code is created via a new pBlock, the goto instruction is
7690         placed now correctly at the interrupt vector position, changed all
7691         references from ivec to _G.interruptvector,
7692         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
7693         is the interrupt is a high priority one, same for return from ISR,
7694         * src/pic16/glue.c: changed all calls of addSetHead for publics and
7695         externs to calls of checkAddSym,
7696         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
7697         pic16_pcode_verbose flag is set,
7698         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
7699         * src/pic16/pcoderegs.c: message about how many registers are saved
7700         will only be emitted if pic16_pcode_verbose flag is set,
7701
7702 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7703
7704         * src/ds390/ralloc.h,
7705         * src/ds390/ralloc.c (ds390_regWithIdx),
7706         * src/ds390/gen.c (emitcode),
7707         * src/ds390/main.h,
7708         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
7709         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7710         ds390operandCompare, getRegsRead, getRegsWritten,
7711         initializeAsmLineNode): customized instruction size calculation for
7712         ds390, started basis for some register optimizations
7713         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
7714         corresponding assembly output
7715         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
7716         missing push/pop of r0/r1. Optimized push/pops
7717
7718 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7719
7720         * src/mcs51/main.c (instructionSize): fixed ACALL size
7721         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
7722
7723 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
7724
7725         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
7726         the sorting of rlist with NULL elements
7727         * (print_idataType, print_idata): NEW to create idata sections
7728         * src/pic16/device.h: idataSymSet new variable
7729         * src/pic16/gen.c (genFunction): fixed some bugs in string
7730         comparing, improved the absolute section creation for ISRs,
7731         added FSR0L/FSR0H in registers that are saved in an ISR,
7732         * (genInline): fixed the processing of inline snippets,
7733         now they undergo no process by the peephole optimizer
7734         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
7735         are placed in idataSymSet,
7736         * (pic16emitStaticSeg): extern symbols are added in externs,
7737         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
7738         switching when aboslute variables are placed in access bank memory
7739         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
7740         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
7741         commented out with #if,
7742         * (pic16_packRegisters): reintroduce the check for CAST because some
7743         symbols are not correctly handled,
7744         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
7745         pCodeInstruction instead of pCode,
7746         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
7747         pCodeAsmDir definition,
7748         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
7749         directive, then the argument directive is emitted without the leading
7750         tab, hack for inline labels which must be in the first column,
7751         * (compareLabel,pic16_findNextInstruction),
7752         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
7753         * (insertBankSwitch): modified for the new pCodeAsmDir,
7754
7755 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7756         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
7757
7758         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
7759         instance,
7760         * (pushSide): commented out with #if,
7761         * (assignResultValue): fixed some typos in saving
7762         registers,
7763         * (genPcall): FIXED and sync'ed with genCall,
7764         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
7765         * (genNearPointerGet): fixed to handle some more cases,
7766         implementation scheme via table reads,
7767         * (genConstPointerGet): modified to access code memory correct,
7768         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
7769         and improved to handle some cases
7770         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
7771         instead of "RETLW" for init data
7772         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
7773         not IN_DIRSPACE, work around to reduce bank switching when aboslute
7774         variables are placed in access bank memory (<0x80 and >=0xf80),
7775         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
7776         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
7777         TBLWT_POSTDEC,TBLWT_PREINC
7778         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
7779         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
7780         directives
7781         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
7782         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
7783         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
7784         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
7785
7786 2004-02-29  Borut Razem <borut.razem AT siol.net>
7787
7788         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
7789         support/Util/findme.h, support/Util/system.h: enhance binary relative
7790         search for lib and include by using findProgramPath()
7791
7792 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7793
7794         * src/SDCCpeeph.h,
7795         * src/SDCCpeeph.c (pcDistance),
7796         * src/port.h,
7797         * src/mcs51/ralloc.h,
7798         * src/mcs51/ralloc.c (mcs51_regWithIdx),
7799         * src/mcs51/main.h,
7800         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
7801         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7802         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
7803         size calculation port specific, started basis for some register
7804         optimizations
7805         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
7806         missing push/pop of r0/r1. Optimized push/pops
7807         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
7808         * device/lib/_modsint.c (_modsint),
7809         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
7810         and stack version so regression tests pass
7811
7812 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
7813
7814         * src/Makefile.in (dep): include SLIBOBJS in dependency check
7815         * src/SDCCast.c (decorateType): catch another small optimization
7816         with '?' operator
7817         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
7818         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
7819         modified to finally use computeType() all over SDCC,
7820         see Feature Request #877103
7821         * src/SDCCval.h: cosmetic
7822         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
7823         valCompare(); regression tested in muldiv.c
7824         * support/regression/tests/muldiv.c (testMod): mod sign follows
7825         dividend only
7826
7827 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
7828
7829         * src/SDCCast.c (decorateType): fixed bug #902362
7830         * doc/INSTALL.txt: fixed install instructions for win32
7831
7832 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
7833
7834         * device/include/Makefile.in (install): fixed by replacing spaces
7835         by tabs
7836         * doc/README.txt,
7837         * doc/INSTALL.txt: updated for release
7838         * doc/sdccman.lyx: added warning for --xstack being buggy
7839
7840 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
7841
7842         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
7843         to eliminate build warnings.
7844         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
7845
7846 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
7847            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7848
7849         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
7850         removed -penable-stack, added comment for stack pragma, added
7851         warning for not initializing the stack/frame registers, removed
7852         comment at interrupts section
7853
7854         Stack is made permanent, there is no ability to disable stack usage.
7855         * src/pic16/device.h,
7856         * src/pic16/device.c: removed all references to USE_STACK macro,
7857         * src/pic16/device.c (pic16_dump_section): when no elements in
7858         rlist, free rlist before return,
7859         * (pic16_dump_int_registers): NEW, internal registers are a new set
7860         of general purpose registers reused by each function,
7861         * (checkAddReg): returns 1 if registers is added to set,
7862         * (pic16_groupRegistersInSection): when a registers is of type
7863         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
7864         * src/pic16/device.h: memRange and Assigned Memory are deleted,
7865         SRCASECMP macro is moved here from device.c
7866         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
7867         PO_PCLATU, PO_PRODL, PO_PRODH,
7868         * (pic16_pCodeOpType, genMinus,
7869         changed compares to "a" register, with AOP_ACC,
7870         * (pic16_genPlus): fixed some bugs and indented properly,
7871         * (pic16_addSign): changed size to size+offset in the MOVWF
7872         instruction,
7873         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
7874         multiply 8-bit operand by literal, result is 8-bit,
7875         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
7876         multiply 2 8-bit operand, result is 8-bit,
7877         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
7878         genUMult8X*_16,
7879         * src/pic16/gen.c: changed accUse to contain WREG only,
7880         * (pic16_emitcomment): renamed to pic16_emitpcomment,
7881         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
7882         true, do not use immediate addressing any more unless sym is a
7883         pointer in codespace,
7884         * (aopForRemat): do not use immediate addressing when symbol not in
7885         codespace and when symbol's address is requested,
7886         * (aopOp): for-loop in if(sym->accUse) is modified for the new
7887         accUse size (= 1),
7888         * (aopGet): added case for AOP_ACC and don't return "accumulator
7889         bug" but WREG instead,
7890         * (popGetTempReg): pushes contents of temporary register in stack,
7891         * (popReleaseTempReg): pops contents of temporary register from
7892         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
7893         * (pic16_popGet): separated case AOP_ACC to return register WREG
7894         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
7895         or PO_IMMEDIATE and initializes their instance/offset appropriately,
7896         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
7897         the use of immediate pointers to certain cases only.
7898
7899         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
7900         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
7901         * (assignResultValue, genCall, genRet): modified to use the new
7902         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
7903         genPcall is still broken,
7904         * (genFunction): added code to create 'A' type pBlocks when
7905         interrupt functions are generated, code not extensively tested yet,
7906         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
7907         * (genEndFunction): modified so ISRs pop stored registers from stack,
7908         * (genMultOneByte): cleanup,
7909         * (AccRsh): added flag andmask, to and result with appropriate mask,
7910         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
7911         * (genDataPointerGet): fixed and reenabled its use,
7912         * (genNearDataPointerGet): bugs fixed,
7913         * (genDataPointerSet): bugs fixed,
7914         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
7915         pic16_DumpSymbol, pic16_DumpOp,
7916         * src/pic16/genutils.h: function prototypes for the above functions,
7917         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
7918         pointers,
7919         * (pic16emitRegularMap): many many many improvements, but needs a
7920         major cleanup,
7921         * src/pic16/main.c: enable_stack in pic16_options is removed,
7922         * (_pic16_parseOptions): removed command line options -penable-stack,
7923         * (_process_pragma): emit stack symbol only when stack pragma is
7924         processed,
7925         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
7926         redirected to FSR0L/FSR0H pair,
7927         * (pic16_get_op, pic16_get_op2): modifications and improvements,
7928         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7929         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
7930         for immediates,
7931         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
7932         * (dumpPicOptype): NEW,
7933         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
7934         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
7935         with movff instruction,
7936         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
7937         added pic16_int_regs, some packRegsFor* functions are commented out,
7938         because produce errors,
7939         * src/pic16/NOTES: minor modifications
7940
7941 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7942
7943         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
7944         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
7945         --pack-iram.
7946         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
7947         * as/mcs51/lkaomf51.c: fixed bug #895763
7948
7949 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
7950
7951         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
7952
7953 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7954
7955         * doc/sdccman.lyx: added details about the HC08 storage classes and
7956         interrupts, fixed the register usage info for z80 & gbz80
7957
7958 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
7959
7960         * doc/sdccman.lyx: added more pic16 port documentation
7961         * device/include/pic16/: added header pic18fregs.h
7962
7963 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
7964
7965         * doc/sdccman.lyx: added Vangelis' contribution
7966
7967 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7968
7969         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
7970         extend to the next CALL or PCALL, not just to the next CALL.
7971
7972 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
7973
7974         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
7975
7976 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7977
7978         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
7979         bug #895752 and a better fix for bug #716790
7980
7981 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7982
7983         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
7984
7985 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7986
7987         * doc/sdccman.lyx: minor changes, minor changed
7988
7989 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
7990
7991         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
7992         which can't handle SDCC_NEWONEBYTEOPS,
7993         (geniCodeMultiply): removed conversion from mult to shift for pic14
7994         and pic16
7995
7996 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7997
7998         * src/hc08/gen.h,
7999         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
8000         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
8001         thus fixing bug #895406
8002
8003 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
8004
8005         * device/lib/_modsint.c,
8006         * device/lib/_modslong.c: sign follows divisor only
8007         * src/hc08/gen.c (genMultOneByte): if result size is 1,
8008         signs or signedness can be ignored
8009         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
8010         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
8011         added optimization for IFX,
8012         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
8013         arguments;
8014         reenabled optimization for IFX, which was removed on 2004-01-11
8015         * src/SDCCast.h: added return type IFX
8016         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
8017         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
8018         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
8019         SDCC_OLDONEBYTEOPS selects the old behaviour
8020         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
8021         changed again and commented promotion rule
8022         * src/SDCCval.c (valDiv): promotion no longer necessary
8023         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
8024         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
8025         rewritten
8026         * support/regression/tests/onebyte.c: added
8027
8028 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
8029
8030         * gen.c (genInline): reverted to old code for assemnling inline
8031         code because of bug reported James Chadd
8032
8033 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
8034
8035         * ralloc.h: missing declarations from previous patch,
8036         seems that patch for ralloc.h was never applied, fixed
8037
8038 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
8039            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
8040
8041         * pcode.c,
8042         * pcode.h,
8043         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
8044         indirect addressing. Marked FSR0 as deprecated
8045         * gen.c (pointerCode): commented out, not needed now
8046         (pic16_popGet2p): new MOVFF helper function
8047         (genGenPointerGet),
8048         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
8049         (shiftRLong): removed duplicate debugging info
8050
8051 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8052
8053         * src/ds390/gen.c (genNearPointerGet),
8054         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
8055         optimization with bits, but not bitfields.
8056         * src/ds390/ralloc.c (packRegisters),
8057         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
8058
8059 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
8060
8061         * src/SDCCcse.c (algebraicOpts): copy operands before modification
8062
8063 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8064
8065         * src/SDCCsymt.h,
8066         * src/SDCCicode.c (operandFromSymbol),
8067         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
8068         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
8069         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
8070         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
8071         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
8072         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
8073         bug #892038
8074         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
8075         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
8076         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
8077         * src/SDCCsymt.c (newSymbol),
8078         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
8079         enumerator_list),
8080         * src/SDCCval.h,
8081         * src/SDCCval.c (newiList): fixed bug #885705
8082
8083 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8084
8085         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
8086         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
8087
8088 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8089
8090         * device/include/c8051f120.h,
8091         * device/include/c8051f300.h,
8092         * device/include/c8051f310.h: added/updated header files for Silicon
8093         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
8094         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
8095         in new section Submitting patches
8096
8097 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8098
8099         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
8100         genFarPointerGet, genCodePointerGet, genGenPointerGet,
8101         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
8102         genGenPointerSet),
8103         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
8104         genFarPointerGet, genCodePointerGet, genGenPointerGet,
8105         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
8106         genGenPointerSet),
8107         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
8108         genFarPointerGet, genCodePointerGet, genGenPointerGet,
8109         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
8110         genGenPointerSet),
8111         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
8112         genFarPointerGet, genCodePointerGet, genGenPointerGet,
8113         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
8114         genGenPointerSet): fixed bug #892400
8115         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
8116         to eliminate build warnings.
8117         * src/SDCCast.c (processParms),
8118         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
8119         fixed bug 751859
8120         * support/valdiag/valdiag.py: added GCC to the list of defines active
8121         when compiling with gcc
8122
8123 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8124
8125         * support/Util/SDCCerr.h,
8126         * support/Util/SDCCerr.c,
8127         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
8128         with an incomplete type (fixed bug #883734)
8129         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
8130
8131 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8132
8133         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
8134
8135 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8136
8137         * src/SDCCast.c (decorateType),
8138         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
8139         function pointer implementation
8140         * support/regression/tests/funptrs.c: added tests to verify both forms
8141         of function pointers work correctly. Added tests to verify parameters
8142         are passed in the correct order.
8143
8144 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
8145
8146         * device.c (regCompare): registers are sorted by ascending
8147         address and increasing size,
8148         * main.c (_pic16_finaliseOptions): removed the declaration
8149         of compiler macro MCU. Now a macro of the format pic18fxxxx
8150         will be defined from the command line
8151
8152 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
8153             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
8154
8155         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
8156         PCOP_RLCF was overwritten!
8157         * gen.c (genSkip): commented out calls to pic16_emitcode,
8158         * (genCmpEQ): fixed "long" compares, only high word did get compared,
8159         * (genlshTwo),
8160         * (genRRC): added debugging info,
8161         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
8162         overwritten while shifting,
8163         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
8164         overwritten while shifting,
8165         * (AccLsh),
8166         * (AccRsh),
8167         * (shiftLLeftOrResult),
8168         * (shiftRLeftOrResult),
8169         * (shiftRLong),
8170         * (shiftLLong): Implemented with pic16_emitpcode
8171         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
8172         * (genLeftShift): Fixed bug, operand for shift by variable always
8173         was "and"ed with 0x0f,
8174         * (genLeftShiftLiteral),
8175         * (genrshTwo),
8176         * (genRightShiftLiteral): added debugging info,
8177         * (genrshFour): added comment,
8178         * (genRightShift): determined signedness from operand "left"
8179         instead of "result"
8180
8181 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8182
8183         * src/SDCCicode.c (geniCodeParms),
8184         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
8185         function pointers, fixed function pointer bugs #861242 and #861896
8186
8187 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8188
8189         * device/include/c8051f000.h,
8190         * device/include/c8051f120.h,
8191         * device/include/c8051f300.h: added header files for Silicon
8192         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
8193
8194 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
8195
8196         * src/SDCCast.c (processParams): added new type flow and restructured
8197         (gatherAutoInit): added new type flow
8198         (addCast): cosmetic changes
8199         (getLeftResultType): added new type flow for array indices, patch
8200         provided by Stas, see FR #877103
8201         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
8202         array index patch by Stas
8203         * src/SDCCast.h: added prototype getResultTypeFromType()
8204         * src/SDCCval.h,
8205         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
8206         * src/pic/glue.c (pic14emitStaticSeg),
8207         * src/pic16/glue.c (pic16emitStaticSeg),
8208         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
8209         for initialization of symbols
8210         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
8211         * support/Util/SDCCerr.h:
8212         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
8213         * .version: bumped version number to 2.3.8
8214         * device/include/Makefile.in (install),
8215         * doc/Makefile (install): changed to 'rm `find ...`' construct to
8216         avoid warnings
8217
8218 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
8219
8220         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
8221         Slade Rich fixed an optimization bug
8222         * src/pic/pcodepeep.c,
8223         * src/pic/pcoderegs.c
8224         * doc/Makefile (install): added test for directory
8225
8226 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8227
8228         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
8229         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
8230         * src/pic/ralloc.c (getRegPtr, getRegGpr),
8231         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
8232         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
8233         * as/mcs51/asexpr.c (term),
8234         * as/hc08/asexpr.c (term): fixed bug #887146
8235
8236 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8237
8238         * src/z80/gen.c (genMult): handle single byte result product
8239         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
8240         DUMMY_READ_VOLATILE (fixed bug #886367)
8241
8242 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
8243
8244         * support/regression/tests/libmullong.c: fixed logic, on little endian
8245         hosts we ended without a mullong_wrapper()
8246
8247 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8248
8249         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
8250         virus/worm forged address usage.
8251
8252 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
8253
8254         Fixed promotion, it should be done on AST level:
8255         * src/SDCCast.c (addCast): added promotion to int
8256         (decorateType): updated call to upCast()
8257         * src/SDCCicode.c (geniCodeLeftShift): removed call to
8258         usualUnaryConversions()
8259
8260 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
8261
8262         * support/regression/tests/literalop.c (mulWrapper): Added a
8263         wrapper to remove integer overflow warnings.
8264
8265         * support/regression/tests/float_trans.c: Made work on host.
8266
8267         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
8268         location of sz80.
8269
8270         * support/regression/generate-cases.py (main): Changed from inline
8271         to a main method.
8272
8273         * doc/Makefile (install): Changed to depth first to get rid of
8274         missing directory install warning.
8275
8276         * as/Makefile (install-doc): Made work on Mac.
8277
8278 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
8279
8280         * src/SDCCast.c: added an additional type flow in decorateType() of
8281         opposite direction, see feature request #860006; it's enabled at runtime
8282         by setting the environment variable SDCC_NEWTYPEFLOW
8283         * src/SDCCast.h: changed prototype of decorateType()
8284         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
8285         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
8286         'char' to 'int' can be omitted, if both operands are 'unsigned char';
8287         see feature request #877103
8288         * src/SDCCval.c: updated call of decorateType()
8289         (valBitwise): fixed bug #882876
8290         (valMinus): added promotion
8291         (valLogicAndOr): result is unsigned
8292         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
8293         * src/SDCCsymt.c (computeType),
8294         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
8295         must not cause an unsigned operation
8296         * src/pic/glue (pic14emitRegularMap),
8297         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
8298
8299 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
8300
8301         * src/pic/pcode.c (PCodeID): commented out left over debug code
8302
8303 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
8304
8305         * support/valdiag/tests/overflow.c: added shift tests
8306         * src/pic/device.c,
8307         * src/pic/gen.c,
8308         * src/pic/gen.h,
8309         * src/pic/glue.c,
8310         * src/pic/main.c,
8311         * src/pic/pcode.c,
8312         * src/pic/pcode.h,
8313         * src/pic/pcodepeep.c,
8314         * src/pic/pcoderegs.c,
8315         * src/pic/ralloc.c,
8316         * src/pic/ralloc.h: applied patch from Slade Rich;
8317         added support for multiple code pages and multiple RAM banks on the
8318         PIC 14 port. The ASM files now no longer simply assume all the
8319         code / RAM are in the same page / bank. This means the linker can
8320         safely allocate code/RAM of separate ASM files to different pages/banks.
8321         * doc/sdccman.lyx: added Slade's tips
8322         * src/mcs51/peeph.def: fixed bug #880768
8323
8324 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8325
8326         * src/hc08/ralloc.c (rematStr): fixed bug #879282
8327         * src/SDCCast.c (decorateType): fixed bug #880197
8328
8329 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
8330
8331         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
8332         getopt.h.
8333
8334         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
8335         strtof is not part of C89 and isn't included with Mac OS X.
8336
8337 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8338
8339         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
8340         shiftL2Left2Result): fixed bug #879326
8341         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
8342         (genMultOneByte): fixed bug in signed vs unsigned multiplication
8343         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
8344         address fetch for clr instruction
8345         * device/lib/hc08/_mulint.c: created optimized assembly version
8346         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
8347
8348 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
8349
8350         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
8351         proposed in FR #877103
8352
8353 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
8354
8355         * src/SDCCval.c (cheapestVal): added missing checks
8356         * src/SDCCicode.c (usualBinaryConversions): fixed condition
8357         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
8358
8359 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
8360
8361         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
8362         equal operands
8363
8364 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
8365
8366         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
8367         loaded with the linker search paths (-L arguments) and the libraries
8368         to be linked with the current source (-l arguments). Changes
8369         currently will affect only the pic16 port.
8370         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
8371         include path the port specific paths and port specific libraries,
8372         * gplink command now contains the $3 argument,
8373         * src/pic16/device.h,
8374         * src/pic16/device.c,: structure PIC_device is made public and
8375         renamed to PIC16_device, the same for variable Pics which is renamed
8376         to Pics16. Updated all references to them.
8377         * src/pic16/glue.c (pic16glue): corrected bug with code
8378         initialization which bypassed the variable initializations block.
8379
8380         * device/lib/pic16/Makefile.rules: removed --penable-stack from
8381         COMPILE_FLAGS and added the --nostdinc option
8382
8383 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8384
8385         * device/include/mc68hc908jb8.h: Register defs for another member
8386         of the hc08 family. Contributed by Bjorn Bringert - thanks!
8387
8388 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
8389
8390         Documenting changes from previous commits.
8391         * configure.in (version 1.56),
8392         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
8393         when generating output files to configure the pic16 library,
8394         but now I've commented it out, since gputils aren't installed in the
8395         SF compile farm, so library won't compile
8396
8397         * device/lib/Makefile.in (version 1.56): initially I've added in
8398         target 'all' the prerequestive 'model-pic16' so it compiled the
8399         pic16 library, but now I've commented it out for the same reasons
8400         above,
8401         * added targets 'model-pic16' and 'objects-pic16' to compile the
8402         library
8403         * added target 'port-specific-objects-pic16' to handle the
8404         generated libraries and copy them into the build/ directory
8405         * added target 'clean-intermediate-pic16' to clean intermediate
8406         files into pic16 directory
8407         * in target 'installdirs' added line to create directory pic16 in
8408         the installation path
8409
8410         * device/include/Makefile.in (version 1.11): in target 'install'
8411         added lines to copy all header files to installation path,
8412         * in target 'installdirs' added line create directory for pic16
8413         headers in the installation path
8414
8415 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
8416
8417         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
8418          a function call
8419
8420 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
8421
8422         * configure,
8423         * device/lib/configure.in,
8424         * device/lib/configure: fixed for autoconf 2.57
8425
8426 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8427
8428         * src/z80/main.c (_parseOptions): fixed the portmode= command line
8429         option so that it actually works. Made it specific to the z80, since
8430         the gbz80 doesn't have these kinds of I/O ports.
8431
8432 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8433
8434         * device/include/z180.h,
8435         * device/lib/_memcpy.c,
8436         * device/lib/_memmove.c,
8437         * device/lib/_mulint.c,
8438         * device/lib/ser_ir.c,
8439         * device/lib/ser_ir_cts_rts.c,
8440         * device/lib/_strcmp.c,
8441         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
8442         * src/z80/main.c (_process_pragma): add support for pragmas bank and
8443         portmode; added deprecation warning for bank= and protmode= forms.
8444         Also, guard against buffer overflow.
8445         * src/z80/gen.c (aopGet): generate better code for sfr banked read
8446
8447 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8448
8449         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
8450         changed interrupt vector table generation to only emit declared vectors.
8451         * device/include/Makefile.in: added missing backslash
8452         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
8453
8454 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8455
8456         Mainly changes to support compilation of the device libraries
8457         * src/pic16/device.c: stack is allocated via symbol and not
8458         via literal number. The symbol is placed in the corresponding
8459         position of the data ram
8460         * (pic16_dump_section): relocatable and absolute uninitialized
8461         data are now emitted in sorted order to reduce section naming,
8462         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
8463         weren't marked as being in the access bank,
8464
8465 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8466
8467         Added portion of GNU PIC Library under the directory
8468         device/include/pic16 and device/lib/pic16. These files
8469         contain the declarations of SFRs for the PIC18Fxx2 devices.
8470         The directory is initialized via configure from toplevel.
8471
8472 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
8473
8474         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
8475         the spilllocations to be compared correctly
8476
8477 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8478
8479         * src/SDCCast.c (decorateType): fixed bug introduced today
8480
8481 2004-01-12  Borut Razem <borut.razem AT siol.net>
8482
8483         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
8484         doc/sdccman.lyx: upper case pragmas are deprecated
8485
8486 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8487
8488         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
8489         in simpler and even better code
8490
8491 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
8492
8493         * src/SDCCicode.c (operandOperation): fixed bug #874819
8494         * src/SDCCast.c (decorateType): fixed
8495         char foo (unsigned long ul) { return ul > 0; }
8496
8497 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8498
8499         * doc/sdccman.lyx: Moved and added some sections, small changes
8500         all over. Telling LaTeX to be less strict with word spacing
8501         to better keep the right margin. Changed some notes about
8502         maintainance of the ports in section 3.2.1 - is it OK like this?
8503
8504 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
8505
8506         SDCC source changes:
8507         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
8508         convilong): modified to inform the pic16 port that builtin functions
8509         are external
8510
8511         PIC16 PORT specific changes:
8512         * src/pic16/device.c pic16_dump_equates() added,
8513         processor registers declared internally by the port are emitted in
8514         the translation as equates,
8515         * src/pic16/gen.c: inline code is passed unprocessed to the
8516         translation,
8517         * (pic16_popGetLit2): fnuction modified to take second operand as
8518         pCodeOp pointer and not as literal,
8519         * (popRegFromIdx): prefixed with pic16_,
8520         * (pic16_popCombine2): modified to receive already allocated pCode
8521         operands,
8522         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
8523         * (genFunction): initializes local stack frame and pushes on stack
8524         all the registers used by this function,
8525         * (genEndFunction): restores all registers from stack and restores
8526         stack frame,
8527         * src/pic16/glue.c (pic16emitRegularMap): various changes and
8528         improvements,
8529         * (pic16glue): changed the program startup sequence,
8530         * added new dbName code 'A' for functions placed in absolute section
8531         * src/pic16/main.c: added function attribute _naked,
8532         * added pragma 'code' to place a fnuction at an absolute address,
8533         * added command line arguments --debug-ralloc and --pcode-verbose,
8534         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
8535         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
8536         * (pic16_newpCodeOpLit2): modified to take the second operand as
8537         pCodeOp pointer,
8538         * (pic16_printpBlock): modified to emit each function in a separate
8539         section,
8540         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
8541         UPPER for immediate operands,
8542         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
8543         instruction,
8544         * src/pic16/peeph.def: all peepholes with movff are commented out,
8545         because there is a problem in the pcode peep optimizer,
8546         * src/pic16/ralloc.c: the register allocator can now reuse local
8547         function symbols for another function. This saves register usage.
8548         * src/pic16/ralloc.h: added flag isLocal in structure regs,
8549
8550         Added file src/pic16/NOTES with information about program writing on
8551         the current port version.
8552
8553 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8554
8555         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
8556         and peephole 252 (array access)
8557
8558 2004-01-09  Borut Razem <borut.razem AT siol.net>
8559
8560         * src/SDCCmain.c : fixed #872250: -l command line defined library
8561           files are scanned before standard library files
8562
8563 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8564
8565         * src/SDCCast.c (decorateType): fixed bug #874046
8566
8567 2004-01-09  Borut Razem <borut.razem AT siol.net>
8568
8569         * support/scripts/sdcc.nsi: remove previous installation
8570
8571 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8572
8573         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
8574         bytes for last interrupt vector (mcs51)
8575         * sdcc.spec: fixed typo
8576
8577 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8578
8579         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
8580         gen51Code): more efficient parameter receive for --model-large
8581         ("bug" #845294)
8582
8583 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8584
8585         * src/ds390/main.c,
8586         * src/z80/main.c: added missed needLinkerScript flags (more than
8587         one port structure defined in these file)
8588         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
8589         bug #795325
8590
8591 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
8592
8593         * src/SDCCmain.c: removed various references to DEFAULT_PORT
8594         * src/port.h: added flag needLinkerScript in port->linker
8595         structure to inform whether to create a .lnk file or not,
8596         * src/avr/main.c,
8597         * src/ds390/main.c,
8598         * src/hc08/main.c,
8599         * src/mcs51/main.c,
8600         * src/pic/main.c,
8601         * src/pic16/main.c,
8602         * src/xa51/main.c,
8603         * src/z80/main.c: changed appropriately to configure
8604         needLinkerScript flag
8605         * src/pic/gen.c,
8606         * src/pic16/gen.c (genAddrOf): fixed bug #863624
8607         * src/pic/glue.c: added variable udata_section_name to
8608         override default uninitialized data segment definition for
8609         devices only with SHAREBANK memory (reported from Erik Epetrich)
8610         * (pic14emitOverlay): modified to emit a commented overlay segment
8611         directive when no overlay data exist
8612         * (picglue): modified to emit uninitialized data segment
8613         according to udata_section_name
8614         * src/pic/main.c (_pic14_parseOptions): added command line
8615         options --udata-section-name=[name] to override default
8616         udata definition name
8617         * modified _linkCmd and _asmCmd to include compiler passed
8618         arguments via -W option
8619         * src/pic16/main.c: added $l in _asmCmd, changed extension for
8620         object file from '.rel' to '.o' in port->linker structure,
8621         changed size of fptr from 2 to 3 in port structure
8622
8623 2004-01-07  Borut Razem <borut.razem AT siol.net>
8624
8625         * support/scripts/sdcc.nsi: update PATH
8626         * support/scripts/sdcc.ico: craeted
8627
8628 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
8629
8630         * device/include/Makefile.in: fix install
8631         * doc/Makefile: fix install
8632
8633 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8634
8635         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
8636         in bug #860505
8637         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
8638         how the function variable allocation summary is displayed; also
8639         include information about variables allocated to the overlay
8640         segment
8641
8642 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8643
8644         * as/mcs51/lkmain.c: Help about -Y option
8645         * as/mcs51/lkarea.c: Fixed gcc warnings
8646
8647 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8648
8649         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
8650         fixed warning
8651         * support/valdiag/tests/overflow.c: added
8652         * src/SDCCast.c (decorateType),
8653         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
8654         LEFT_OP (left shift)
8655
8656 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8657
8658         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
8659         (default behaviour).
8660
8661 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8662
8663         A python script to validate compiler diagnostic messages. It can be
8664         used to verify that sdcc complains about bad c source code and
8665         gives a good location of the error.
8666         * support/valdiag/Makefile,
8667         * support/valdiag/valdiag.py,
8668         * support/valdiag/tests/*
8669
8670 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8671
8672         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
8673         * src/SDCCsymt.c (newEnumType),
8674         * src/SDCCsymt.h
8675         * support/Util/SDCCerr.c,
8676         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
8677         enum related bugs.
8678         * support/regression/tests/enum.c: added test for enum values that
8679         require at least 2 bytes of storage.
8680
8681 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8682
8683         * src/common.h: added ifndef/define/endif macros
8684         around the header file.
8685         Bug reported from Jesus Calvino-Fraga
8686
8687 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8688
8689         * sdcc.spec: updated
8690         * device/include/Makefile.in: don't install CVS directories
8691         * device/lib/Makefile.in: added removal of CVS directories after install
8692         * doc/Makefile: fixed install, added local_icons
8693         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
8694         * src/mcs51/gen.c (genRightShift): fixed bug #870788
8695         * src/ds390/gen.c (genRightShift): fixed bug #870788
8696         * src/SDCCast.c (decorateType): fixed bug #870781
8697
8698 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8699
8700         PIC16 port related changes:
8701         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
8702         added variable stackPos,
8703
8704         * gen.c: genCall, assignResultValue: added support for
8705         pushing/retrieving function parameters to/from stack,
8706         genFunction,genEndFunction: setup stack frame for the
8707         generated function,
8708         genAddrOf: will be changed according to bug 863624
8709
8710         * added files genutils.c and genutils.h which contain gen*
8711         debugged and optimised functions extracted from gen.c
8712
8713         * glue.c: added variable 'externs' which holds extern symbols,
8714         pic16emitRegularMap: is modified to properly handle relocatable
8715          symbols under the new scheme,
8716         pic16createInterruptVect: is modified
8717         pic16printPublics: is modified to emit 'global' assembler directives,
8718         added pic16_printExterns to print extern symbols,
8719         pic16glue: initializes stack/frame pointer in the beginning of
8720         the assembly output. Temporary hack, will be corrected later,
8721         because gplink yet does not support stack and SDCC does not
8722         yet support a type of crt0.o object to create the final binary.
8723
8724         * Removed many lines that contain 8051 legacy code.
8725         * The code is finally placed under a 'code' directive.
8726         * Added port specific options.
8727
8728         * _process_pragma: simplified since now we do not need *special*
8729         include file to define SFR registers. But a separate header
8730         will be needed. This will be developed later.
8731         * _pic16_parseOptions: added, parses port specific options:
8732         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
8733         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
8734         --preplace-udata-with=
8735
8736         * _pic16_setDefaultOptions: modified to initialize section names,
8737         but hack is temporarly out of order since it needs improvement.
8738         * _pic16_genAssemblerPreamble: configuration words are emitted by
8739         their address instead of their name. This part is incomplete and
8740         supports only the 18Fxx2 devices. Other devices will emit an error
8741         during assembly since they do not contain the same set of config
8742         registers
8743         * _pic16_genIVT: is modified,
8744
8745         * pcode.c: added definitions for some hardware registers that are needed
8746         for stack support
8747         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
8748         All PCI entries are updated. Now LFSR is supported.
8749         * Removed pic16_pciTRIS is mentioned by mdubuc in source
8750         * added pic16_newpCodeOpLit2 to support instructions with
8751         two literal arguments
8752         * pic16_pCode2str: corrected code that emits assembler instructions
8753         with two literal operands and those that have an access bit modifier
8754         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
8755         this fixes a bug which caused some labels to be lost, when an
8756         assembler directive was added, i.e. banksel,
8757         * pic16_FixRegisterBanking: improved logic that causes the insertion
8758         of bank switching,
8759         * InlineFunction: functions that are called once, are not any more
8760         inlined. This can be a port option in the future,
8761
8762         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
8763
8764         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
8765         hold the corresponding uninitialized symbols,
8766         * pic16_allocProcessorRegister: registers have explicit marked the
8767         accessBank field,
8768         * pic16_allocInternalRegister: registers are explicit marked as
8769         not used,
8770         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
8771         processing list, so bit registers were lost,
8772         *
8773
8774         * ralloc.h: added field 'accessBank' and original symbol operand
8775         in register definition,
8776         * removed the field isMapped from register definition,
8777
8778         ** Several functions have been removed from various sources:
8779         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
8780         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
8781         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
8782         pic16_assignRelocatableRegisters
8783
8784         ** others have been introduced:
8785         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
8786         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
8787
8788 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
8789
8790         * support/scripts/inc2h.pl: changed definition of BIT_AT
8791         to emit 'sbit at' instead of 'bit at'. This was a request.
8792
8793         PIC16 port related preliminary changes:
8794         * gen.c: prefixed function popRegFromString with
8795         pic16_ and all references to it corrected
8796         * pcode.c: all pic16_pc_* hardware registers prefixed
8797         with underscore (_),
8798         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
8799         * ralloc.c: newReg(): when register is REG_SFR then
8800         set address to rIdx,
8801         pic16_allocProcessorRegister(): marks register wasUsed=0
8802         pic16_writeUsedRegs(): added a call to assign processor
8803         registers via pic16_assignFixedRegisters
8804
8805 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8806
8807         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
8808         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
8809         variables in unused register banks.  Also the SSEG is placed
8810         wherever there is enough space for it, and IDATA can be anywhere
8811         in internal RAM.  For now compile using -Wl-Y[stack_size].
8812         The mem file is different for this option as well, since it
8813         makes no sense of talking about DSEG lenght.
8814
8815 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
8816
8817         * src/SDCClrange.c: fixed bug 869095 that caused segfault
8818         in certain cases, e.g. when ROM assignment, patch provided
8819         from Albert den Haan.
8820
8821 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
8822
8823         Many signedness and type propagation fixes:
8824         * src/SDCCicode.c: made geniCodeCast() static
8825         replaced SPEC_ by IS_ (cosmetic)
8826         (operandOperation): fixed div and mod operation
8827         (usualBinaryConversions): added support for promotion of char
8828         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
8829         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
8830         (geniCodeAdd): an array index will stay unsigned, even if promoted
8831         from char to int
8832         (geniCodeArray): ditto
8833         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
8834         * src/SDCCsymt.c (computeType): added more support for char;
8835         promotion of char is selectable by promoteCharToInt, fixed signedness
8836         for all cases
8837         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8838         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8839         * src/SDCCval (val*): replaced signedness calculation by
8840         computeType()
8841         rearranged if-branches (cosmetic)
8842         (valShift): added warning W_SHIFT_CHANGED
8843         (valCompare): fixed problem with different types
8844         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
8845         * support/regression/tests/literalop.c: added many cases
8846         * support/regression/tests/ast_constant_folding.c: changed finally to
8847         'unsigned int'
8848         * .version: new year, new version: 2.3.7
8849         * src/SDCCmain.c (main): applied patch #866468
8850         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
8851         provided by Scott Bronson
8852         * doc/sdccman.lyx: updated documentation for sdcdb
8853         updated and added chapter tips
8854
8855 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8856
8857         * src/SDCCsymt.h: missing from yesterday's commits
8858
8859 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8860
8861         * src/SDCC.y (struct_or_union_specifier),
8862         * support/Util/SDCCerr.c,
8863         * support/Util/SDCCerr.h: verify that struct & union tags are used
8864         as declared.
8865
8866 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8867
8868         * src/SDCCglobl.h: missing from yesterday's commits
8869
8870 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8871
8872         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
8873         sft_attributes, struct_declaration, parameter_declaration,
8874         type_name, start_block, declaration_list),
8875         * src/SDCC.lex (check_type): support redefinition of typedef names
8876
8877 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8878
8879         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
8880         aligned xdata arrays. Erik helped me with the if clause.
8881
8882 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8883
8884         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
8885         warning
8886
8887 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8888
8889         * src/SDCCast.h,
8890         * src/SDCCast.c (newAst_),
8891         * src/SDCCicode.h,
8892         * src/SDCCicode.c (ast2iCode, newiCode),
8893         * src/SDCCglobl.h,
8894         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
8895         expr, statement, expression_statement, selection_statement,
8896         iteration_statement, expr_opt, jump_statement): foundation for tracking
8897         sequence points
8898         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
8899         point code too)
8900
8901 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8902
8903         * support/Util/SDCCerr.c,
8904         * src/SDCCast.h,
8905         * src/SDCCast.c (createCase, createDefault, decorateType),
8906         * src/SDCClabel.c (labelUnreach),
8907         * src/SDCC.y (labeled_statement, jump_statement): More improvements
8908         to error messages.
8909         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
8910         (with thanks to Stas Sergeev)
8911         * device/include/time.h,
8912         * device/lib/time.c (CheckTime): suppress unreachable code warning
8913
8914 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8915
8916         * src/SDCCast.c (createIvalCharPtr),
8917         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
8918         bug #753752)
8919         * support/regression/tests/nullstring.c: tests for these two bugs
8920
8921 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8922
8923         * support/Util/SDCCerr.h,
8924         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
8925         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
8926         about storage class and 'at' used inside struct or union
8927         * src/SDCCBBlock.c (iCodeFromeBBlock),
8928         * src/SDCCcse.c (ifxOptimize),
8929         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
8930         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
8931         printIval, emitStaticSeg, emitOverlay),
8932         * src/SDCClabel.c (deleteIfx),
8933         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
8934         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
8935         gatherAutoInit, processParms),
8936         * support/Util/SDCCerr.h,
8937         * support/Util/SDCCerr.c (werrorfl): Support for better error location
8938         reporting for post-parse errors.
8939
8940 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8941
8942         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
8943         implicit casts via union; they don't work on big endian systems
8944         (possible fix for bug #861138)
8945
8946 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8947
8948         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
8949         * src/mcs51/main.c: fixed the fix for bug #737001
8950
8951 2003-12-15  Borut Razem <borut.razem AT siol.net>
8952
8953         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
8954
8955 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8956
8957         * support/makebin/makebin.c: put output in binary mode
8958
8959 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8960
8961         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
8962         xdata and data memory on startup. Set the environment variable
8963         SDCC_NOGENRAMCLEAR to disable this.
8964         * src/mcs51/peephole.def,
8965         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
8966         (allows non-interrupt and interrupt code to safely compete for a resource
8967         without the non-interrupt code having to disable interrupts)
8968
8969 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8970
8971         * src/SDCCicode.c (geniCodeAdd),
8972         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
8973         with valFromType if type might be a pointer and host is big endian).
8974         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
8975         types, not just integer types.
8976         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
8977         multiply defined with mismatching "at" address.
8978
8979 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8980
8981         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
8982         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
8983         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
8984         with embedded nulls (fixed bug #753752)
8985
8986 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8987
8988         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
8989         Apparently this did not see much testing (endless loop)
8990
8991 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8992
8993         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
8994
8995 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8996
8997         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
8998         gracefully handle NULL memmap pointers
8999
9000 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9001
9002         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
9003         instead of deleting the iCode when an operand is volatile
9004         * src/z80/gen.c (genDummyRead),
9005         * src/mcs51/gen.c (genDummyRead),
9006         * src/ds390/gen.c (genDummyRead),
9007         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
9008         not just IC_RIGHT
9009         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
9010         * src/SDCC.y: fixed bug #850420
9011
9012 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9013
9014         Applied z80 i/o port patch from Peter Townson and fixed some operators
9015         to better handle operands in A register.
9016         * device/include/z180.h
9017         * src/SDCC.y
9018         * src/SDCCglue.c
9019         * src/z80/gen.c
9020         * src/z80/gen.h
9021         * src/z80/main.c
9022         * src/z80/peeph-z80.def
9023         * src/z80/peeph.def
9024         * src/z80/z80.h
9025
9026 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9027
9028         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
9029
9030 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9031
9032         * device/lib/hc08/_mullong.c: Removed extra #endif
9033
9034 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9035
9036         * sim/ucsim/hc08.src/inst.cc,
9037         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
9038         carries from x to h
9039         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
9040         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
9041         * device/include/stdarg.h: fixed varargs for hc08
9042         * device/lib/Makefile.in,
9043         * device/lib/hc08/Makefile,
9044         * device/lib/hc08/_mulint.c,
9045         * device/lib/hc08/_mullong.c: fixed some endian problems
9046
9047 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9048
9049         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
9050         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
9051         * device/lib/_gptrget.c,
9052         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
9053
9054 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9055
9056         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
9057         * src/SDCCast.c (astErrors): fixed bug #846007
9058         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
9059
9060 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9061
9062         * src/SDCCast.c (decorateType): disabled a transformation I added in
9063         revision 1.188 (access to fields of a structure at an absolute address);
9064         it breaks with bitfields, extern declarations, and gcse analysis.
9065         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
9066         could be assigned through a pointer, so don't complain.
9067         * src/SDCCast.c (astErrors),
9068         * src/SDCCast.h,
9069         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
9070
9071 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
9072
9073         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
9074         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
9075         output of __config directives, since gpasm now supports them
9076         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
9077         pre-processor macro, i.e. -DMCU=p18f452
9078         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
9079         and modified to handle 'cast' icode similarly to '=' icode
9080         * src/pic16/device.h (typedef struct PIC_device): added field
9081         'extMIface' to indicate that chip has external memory interface
9082         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
9083         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
9084         18F8720
9085
9086 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9087
9088         * src/SDCC.y (pointer): fixed bug #846006
9089         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
9090         * src/SDCCast.c (decorateType): fixed bug #846009
9091         * src/ds390/peeph.def,
9092         * src/ds390/gen.c (genAnd, genOr),
9093         * src/mcs51/peeph.def,
9094         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
9095
9096 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9097
9098         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
9099         * src/SDCCdflow.c
9100         * src/SDCCcse.c
9101         * src/SDCCcse.h
9102         * src/SDCCBBlock.h
9103         * src/SDCCBBlock.c
9104
9105 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
9106
9107         fixed bug #845089
9108         * src/SDCCbitv.h,
9109         * src/SDCCbitv.c: added function to free a bitvector
9110         * src/SDCClrange.h,
9111         * src/SDCClrange.c: added function to recompute the liveranges
9112         * src/avr/ralloc.c,
9113         * src/ds390/ralloc.c,
9114         * src/hc08/ralloc.c,
9115         * src/mcs51/ralloc.c,
9116         * src/pic/ralloc.c,
9117         * src/pic16/ralloc.c,
9118         * src/xa51/ralloc.c,
9119         * src/z80/ralloc.c: recompute the liveranges after register packing
9120
9121 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
9122
9123         * src/SDCCloop.c (newInduction): fixed bug #845630
9124
9125 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9126
9127         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
9128         inadvertantly left behind from my 2003-11-12 change
9129
9130 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9131
9132         Updated headers I neglected to commit yesterday.
9133         * src/SDCClrange.h,
9134         * src/SDCCicode.h
9135
9136 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9137
9138         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
9139         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
9140         * src/SDCCopt.c (eBBlockFromiCode),
9141         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
9142         the creation of the key hash table from the sequencing so it can be used
9143         earlier (for some GCSE bug fixes still pending)
9144
9145 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9146
9147         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
9148         * support/regression/tests/addsub.c: testing genPlus shortcut
9149
9150 2003-11-15  Borut Razem <borut.razem AT siol.net>
9151
9152         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
9153
9154 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9155
9156         * src/SDCCcse.c (cseBBlock): fixed bug #527779
9157         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
9158         ordering is immaterial.
9159         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
9160
9161 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9162
9163         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
9164         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
9165         (SIGSEV) of bug #840381
9166         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
9167         unlink new file before rename if new and old filenames are the same)
9168
9169 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9170
9171         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
9172         uninitialized variables) for the mcs51. Set environment variable
9173         SDCC_GENRAMCLEAR to test.
9174         xdata initialization slightly shorter
9175
9176 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9177
9178         * src/SDCCsymt.h,
9179         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
9180         #838241 & 780691 (basicly the same bug)
9181         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
9182         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
9183
9184 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
9185
9186         * src/SDCCmain.c (linkEdit): "fix" #834252
9187
9188 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9189
9190         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
9191         * src/SDCCast.h,
9192         * src/SDCC.y: fixed bug #819403
9193
9194 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9195
9196         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
9197         the reentrant attribute.
9198         * src/hc08/gen.c (genPackBits): added missing stack readjustment
9199         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
9200         simulation
9201         * src/SDCCast.c (decorateType): fixed bug with storage class not being
9202         updated during pointer dereference; f.e. ~(((char *)1)*) was being
9203         erroneously reduced to a literal.
9204         * src/hc08/ralloc.c (packRegisters, rematStr),
9205         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
9206         some cases
9207
9208 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9209
9210         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
9211         * doc/sdccman.lyx: changed from 'article' to 'book'
9212         * doc/Makefile: readded test_suite_spec and cdbfileformat
9213
9214 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
9215
9216         * device/include/stdlib.h: include malloc.h to comply with ANSI
9217         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
9218
9219 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9220
9221         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
9222         * doc/clean.mk: also remove *.out files
9223         * doc/sdccman.lyx: some additions, larger top/bottom margins
9224
9225 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9226
9227         * src/SDCC.y: fixed bug #837365
9228         * support/regression/tests/bitopcse.c
9229         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
9230         a symbol (might be valop instead)
9231         * device/lib/Makefile.in: added errno.c to HC08SOURCES
9232         * device/lib/clean.mk: added hc08 to the cleaning list
9233
9234 2003-11-04  Borut Razem <borut.razem AT siol.net>
9235
9236         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
9237           made 2003-11-04
9238         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
9239           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
9240           malloc is declared in standard stdlib.h
9241
9242 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9243
9244         * device/lib/hc08/Makefile: need to clean .rel not .o files
9245         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
9246
9247 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9248
9249         * src/port.h,
9250         * src/hc08/main.c,
9251         * src/mcs51/main.c,
9252         * src/ds390/main.c,
9253         * src/z80/main.c,
9254         * src/avr/main.c,
9255         * src/pic/main.c,
9256         * src/pic16/main.c,
9257         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
9258         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
9259         tests (which uses the port's oclsExpense function)
9260         * src/SDCC.y,
9261         * src/SDCCast.c,
9262         * src/SDCCicode.c,
9263         * src/hc08/gen.c,
9264         * src/ds390/gen.c,
9265         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
9266
9267 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9268
9269         * src/SDCCcse.c (ifxOptimize),
9270         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
9271         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
9272         deleting the IFX iCode.
9273         * src/hc08/ralloc.c: reduced unneeded slocs
9274         * src/hc08/gen.c: fixed bug in asmopToBoolean
9275
9276 2003-11-04  Borut Razem <borut.razem AT siol.net>
9277
9278         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
9279           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
9280           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
9281           transferred to configure
9282
9283 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
9284
9285         Use headers defined in the C[++] standards:
9286         * sim/ucsim/gui.src/serio.src/fileio.cc
9287         * sim/ucsim/gui.src/serio.src/frontend.cc
9288         * sim/ucsim/gui.src/serio.src/main.cc
9289         * sim/ucsim/gui.src/serio.src/posix_signal.cc
9290         * support/Util/NewAlloc.c
9291         * as/hc08/lklibr.c
9292         * as/mcs51/lklibr.c
9293         * as/z80/aslist.c
9294         * as/z80/assym.c
9295
9296 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9297
9298         * Added MSVC projects for hc08 assembler and linker:
9299         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
9300         /as/hc08/link_hc08.dsp
9301
9302 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
9303
9304         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
9305
9306 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
9307
9308         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
9309
9310 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9311
9312         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
9313
9314 2003-10-31  Borut Razem <borut.razem AT siol.net>
9315
9316         * support/cpp2/cpplib.h,
9317           support/cpp2/cpplib.c,
9318           support/cpp2/cpplex.c,
9319           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
9320           to switch _asm block preprocessing on / off. Default is
9321           #pragma preproc_asm +
9322
9323 2003-10-31  Borut Razem <borut.razem AT siol.net>
9324
9325         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
9326           when outputting comment blocks (when executed with -C option) and
9327           _asm (SDCPP specific) blocks
9328
9329 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9330
9331         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
9332
9333 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
9334
9335         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
9336
9337 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
9338
9339         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
9340         * src/SDCCast.c (decorateType): fixed bug #832664
9341
9342 2003-10-31  Borut Razem <borut.razem AT siol.net>
9343
9344         * support/cpp2/cpplex.c: fixed for SDCPP:
9345           comments(when executed with -C option) and _asm blocks
9346           were included even if they where in skipped #if block.
9347           Applied solution from GCC cpp 3.3.2
9348
9349 2003-10-31  Borut Razem <borut.razem AT siol.net>
9350
9351         * src/SDCC.lex: sdcc now understands both formats:
9352           '# <line_number> <file_name>' and
9353           '#line <line_number> <file_name>'
9354         * support/cpp2/cppmain.c: sdcpp now generates the standard
9355           '# <line_number> <file_name>' instead of former
9356           '#line <line_number> <file_name>'
9357
9358 2003-10-30  Borut Razem <borut.razem AT siol.net>
9359
9360         * support/cpp2/cpphash.h,
9361         * support/cpp2/cpplib.h
9362         * support/cpp2/cpplex.c,
9363         * support/cpp2/cppmain.c,
9364         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
9365
9366 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9367
9368         Fixed a number of problems revealed by bug #827883.
9369         * src/SDCCloop.c (loopInvariants): Spill location of the
9370         result operand should be recomputed if extracted from
9371         a loop. Also, don't extract assignments of an iTemp
9372         from a literal.
9373         * src/SDCCast.c (isConformingBody): loop reversal should
9374         not occur if the control variable is involved with a
9375         relational operator.
9376
9377 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
9378
9379         * .version: bumped to 2.3.6 to reflect the big improvements
9380         made by Erik and Klaus. Thanks!
9381
9382 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
9383
9384         Replaced the livrange code.
9385         * src/SDCClrange.c: added new LR code
9386         * src/SDCCloop.c,
9387         * src/SDCCBBlock.h: removed remainig parts from old LR code
9388         * src/ds390/ralloc.c,
9389         * src/ds390/gen.c: minor fixes to make it work with new code
9390
9391 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9392
9393         * as/hc08/asm.h,
9394         * as/hc08/lkrloc.c,
9395         * src/hc08/gen.c,
9396         * src/hc08/ralloc.c: Fix various warnings related to the hc08
9397         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
9398         (tweaked fix for bug #818696)
9399
9400 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9401
9402         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
9403
9404 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9405
9406         * src/SDCCmain.c,
9407         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
9408         * src/mcs51/gen.c (gencjneshort),
9409         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
9410         more efficient (per Scott Bronson's suggestion)
9411
9412 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9413
9414         Extended the semantics of the critical keyword to include
9415         individual statements. See RFE #827755 and #799831
9416         * src/SDCC.y
9417         * src/SDCCicode.c
9418         * src/SDCCopt.c
9419         * src/SDCCast.c
9420         * support/Util/SDCCerr.c
9421         * support/Util/SDCCerr.h
9422         * src/mcs51/gen.c
9423         * src/ds390/gen.c
9424         * src/hc08/gen.c
9425
9426 2003-10-19  Borut Razem <borut.razem AT siol.net>
9427
9428         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
9429
9430 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9431
9432         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
9433         Fixed bug #818696
9434         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
9435         and predecrement operand is displayed
9436
9437 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9438
9439         * src/SDCCval.c (valMinus): fixed bug #826041
9440
9441 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9442
9443         Some hc08 related updates that I missed earlier
9444         * sim/ucsim/stypes.h
9445         * support/regression/ports/hc08/spec.mk
9446
9447 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9448
9449         New target "hc08" for the Motorola 68hc08 family of micros
9450
9451         * configure
9452         * configure.in
9453         * Makefile
9454         * src/hc08/*
9455         * src/SDCCmain.c
9456         * src/port.h
9457         * sim/ucsim/hc08.src/*
9458         * sim/ucsim/configure.in
9459         * src/ucsim/configure
9460         * sim/ucsim/packages_in.mk
9461         * as/hc08/*
9462         * as/Makefile
9463         * device/include/mc68hc908qy.h
9464         * device/lib/hc08/*
9465         * device/lib/Makefile.in
9466         * support/regression/ports/hc08/*
9467         * support/regression/Makefile
9468
9469 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9470
9471         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
9472         regression test
9473         * src/ds390/gen.c (genCast): fixed bug #821957
9474
9475 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9476
9477         * device/lib/logf.c: "fixed" overlay bug
9478         * support/regression/ports/host/spec.mk: added m library
9479         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
9480         * support/regression/tests/float_trans: added (for Eric)
9481
9482 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
9483
9484         * src/mcs51/gen.c (genCpl): fixed bug
9485         http://sf.net/mailarchive/message.php?msg_id=6263915
9486
9487 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
9488
9489         * src/SDCCast.c (decorateType): added extended constant folding
9490         * src/SDCCsymt.c (computeType): cleanup
9491         * src/SDCCval.c (valShift): minor optimization
9492         * support/regression/tests/ast_constant_folding.c: added
9493
9494 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9495
9496         * src/SDCCmain.c: removed some unintended changes
9497
9498 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9499
9500         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
9501         * src/z80/gen.c: fixed part of bug #817589
9502         * src/SDCCsymt.c (checkFunction): fixed bug #817895
9503
9504 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
9505
9506         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
9507         * src/SDCCcflow.c
9508         * src/SDCCcse.c
9509         * src/SDCCdflow.c
9510         * src/SDCClabel.c
9511         * src/SDCClrange.c
9512         * src/SDCCmem.c
9513         * src/SDCCopt.c
9514         * src/SDCCpeeph.c
9515         * src/SDCCset.c
9516         * src/avr/ralloc.c
9517         * src/ds390/ralloc.c
9518         * src/izt/ralloc.c
9519         * src/mcs51/ralloc.c
9520         * src/pic/ralloc.c
9521         * src/pic16/ralloc.c
9522         * src/xa51/ralloc.c
9523         * src/z80/ralloc.c
9524         * src/z80/gen.c: removed unused label "release:"
9525
9526 2003-10-06  Borut Razem <borut.razem AT siol.net>
9527
9528         * src/SDCC.lex: removed definition of unused variables
9529           save_optimize and save_options
9530
9531 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
9532
9533         * clean.mk: removed '=' in "-maxdepth=1"
9534         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
9535         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
9536
9537 2003-10-06  Borut Razem <borut.razem AT siol.net>
9538
9539         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
9540           my_unput() replaced by unput()
9541
9542 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
9543
9544         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
9545         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
9546         type-punned pointer will break strict-aliasing rules"
9547         Old LR behaviour is again default; Klaus' LR can be choosen by
9548         defining the environment variable LRKLAUS
9549         * src/SDCCBBlock.h
9550         * src/SDCCloop.c
9551         * src/SDCClrange.c
9552         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
9553         * clean.mk: fixed removal of files in bin/CVS/
9554         * device/lib/clean.mk: fixed removal of directories small and large
9555         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
9556         * src/SDCCicode.c,
9557         * src/SDCCval.c: removed superflous test for pedantic
9558
9559 2003-10-05  Borut Razem <borut.razem AT siol.net>
9560
9561         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
9562           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
9563           message "unmatched #pragma SAVE and #pragma RESTORE"
9564
9565 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9566
9567         * doc/sdccman.lyx: various additions and updates (interrupts, inline
9568           assembly, critical functions, atomic, nojtbound)
9569
9570 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
9571
9572         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
9573         * src/SDCCBBlock.h
9574         * src/SDCCloop.c
9575         * src/SDCCloop.h
9576         * src/SDCClrange.c
9577
9578 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9579
9580         * src/z80/gen.h,
9581         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9582         * src/mcs51/gen.h
9583         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9584         * src/ds390/gen.h
9585         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9586         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
9587         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
9588
9589 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9590
9591         * src/z80/gen.c (genRet): fixed bug #524753
9592         * src/z80/gen.c (genCast): fixed internal error on cast from
9593         pointer to long
9594         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
9595         fix for bug #477835 to the z80
9596         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
9597         for tracking iCodes in the peephole optimizer for z80
9598
9599 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9600
9601         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
9602         the other part of bug #814548
9603         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
9604
9605 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
9606
9607         * src/SDCCcse.c: fixed part of bug #814548
9608
9609 2003-09-28  Borut Razem <borut.razem AT siol.net>
9610
9611         * src/asm.c: rewrite of printILine() to use temporary file instead
9612           a pipe
9613         * src/xa51/main.c: commented out declaration of int rewinds
9614
9615 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9616
9617         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
9618
9619 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9620
9621         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
9622         * src/asm.c (printILine): Fixed bug #811015
9623
9624 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9625
9626         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
9627         freeing.
9628
9629 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9630
9631         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
9632         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
9633         to correctly handle general case of AOP_PAIRPTR
9634         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
9635
9636 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9637
9638         * src/mcs51/ralloc.c (fillGaps),
9639         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
9640         register positioning bug)
9641
9642 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
9643
9644         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
9645
9646 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9647
9648         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
9649         genCodePointerGet, genGenPointerGet, genFarPointerSet,
9650         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
9651         (ralloc doesn't intentionally do this now, but perhaps later)
9652         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
9653         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
9654         register positioning bugs (Fixed bug #762602 and #795325)
9655         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
9656         (Fixed bug #808779)
9657         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
9658         lines that --i-code-in-asm generates
9659
9660 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9661
9662         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
9663         trying to fclose a FILE* that was already closed.
9664
9665 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9666
9667         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
9668         of const struct should be treated as if const themselves)
9669
9670 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
9671
9672         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
9673
9674 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9675
9676         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
9677         Unix (/n) and DOS (/r/n) line terminations.
9678
9679 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9680
9681         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
9682         bug #613775
9683
9684 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9685
9686         * src/mcs51/gen.c (genFunction, genEndFunction),
9687         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
9688         and restore of EA so that stack offsets to parameters are
9689         correct when using both critical and reentrant/stack-auto.
9690         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
9691         size (can be triggered in error if sloc is shared between
9692         different sized objects)
9693         * device/include/float.h: fixed macros to explicitly use
9694         unsigned long where needed
9695
9696 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
9697
9698         Feature req. 799831: added code to allow nesting of critical functions
9699         * src/mcs51/gen.c (genFunction, genEndFunction)
9700         * src/ds390/gen.c (genFunction, genEndFunction)
9701
9702 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9703
9704         * src/SDCCsymt.c (sclsFromPtr),
9705         * src/SDCCsymt.h,
9706         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
9707         support for standard C idiom of memory mapped variables; for
9708         example, *((xdata int*)0x1234) = 1 is now internally equivalent
9709         to xdata int at 0x1234 tempvar = 1.
9710         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
9711         provided by Akiya ISHIDA
9712
9713 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
9714
9715         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
9716         * src/SDCCval.c (constVal): added reduction from int to char
9717         * src/SDCCval.c (valMult, valDiv): fixed sign handling
9718         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
9719         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
9720         to ignore the sign
9721         * support/regression/tests/shifts.c: fixed
9722
9723 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9724
9725         * src/z80/gen.c (genXor): Fixed bug #805445
9726
9727 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9728
9729         Fixed bug #621531 (const & volatile confusion in the type chain).
9730         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
9731         refer to the const or volatile state of the pointer itself.
9732
9733         * src/SDCCast.c
9734         * src/SDCCglue.c
9735         * src/SDCCicode.c
9736         * src/SDCCsymt.c
9737         * src/SDCCval.c
9738         * src/SDCC.y
9739         * src/SDCCsymt.h
9740         * src/pic/gen.c
9741         * src/pic/ralloc.c
9742         * src/pic16/gen.c
9743         * src/pic16/ralloc.c
9744         * support/regression/tests/const.c
9745
9746 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9747
9748         When checking for duplicated modules, use absolute paths
9749         instead of relative paths.  Files changed:
9750
9751         * as/mcs51/lklib.c
9752         * link/z80/lklib.c
9753
9754 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9755
9756         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
9757
9758 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9759
9760         * device/include/string.h: added size_t typedef, changed
9761         prototypes to use size_t, eliminated separate reentrant and
9762         non-reentrant declarations, added _memmove declaration
9763         * device/lib/_memcpy.c: changed to use size_t instead of int,
9764         changed /4 to >>2 to avoid division library call
9765         * device/lib/_memcmp.c,
9766         * device/lib/_memset.c,
9767         * device/lib/_strncat.c,
9768         * device/lib/_strncpy.c,
9769         * device/lib/_strncmp.c: changed to use size_t instead of int
9770         * device/lib/_memmove.c: new file (fixed bug #772294)
9771         * device/lib/Makefile.in: added _memmove.c
9772         * device/lib/z80/asm_strings.s: fixed bug #772290
9773         * support/regression/tests/bitfields.c: attempt to fix host assertion
9774         failure on amd64-unknown-linux2.2
9775
9776 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9777
9778         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
9779         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
9780         * as/z80/asmain.c (main): fixed bug #801766
9781
9782 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
9783
9784         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
9785         compilers
9786
9787 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9788
9789         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
9790         reported in bug #800609
9791
9792 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
9793
9794         * Top header beautifications in src/pic16 directory:
9795           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
9796           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
9797           pcoderegs.h, ralloc.c, ralloc.h
9798         * main.c: added top header and GPL license notice
9799         * pcode.c: fixed the if-conditional warning
9800
9801 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
9802
9803         * device/lib/_mullong.c: replaced int by short for gcc
9804
9805 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9806
9807         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
9808         and JUMPTABLE iCodes properly now (worked by accident before)
9809         * src/mcs51/gen.c (leftRightUseAcc),
9810         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
9811         iCode properly now. Use getSize instead of nRegs since a & b
9812         aren't part of the nRegs tally.
9813
9814 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
9815
9816         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
9817         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
9818           before instructions that use the _STATUS register
9819
9820 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
9821
9822         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
9823         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
9824         fetching of the pointer
9825         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
9826         copied from genNearPointerSet()
9827         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
9828         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
9829         If they pop r0/r1 they must be called in the opposite order than aopOp().
9830         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
9831         (resp. --stack-auto), prepared for --xstack
9832
9833 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9834
9835         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
9836
9837 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9838
9839         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
9840         these ports have their own __sdcc_external_start()
9841
9842 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
9843
9844         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9845         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
9846         type for bits was changed. It resulted in bit variables becoming
9847         global, which is not permitted in PIC 14 assembly output.
9848
9849 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9850
9851         * doc/sdccman.lyx: various additions and updates. Rearranged sections
9852
9853 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9854
9855         Z80 and MCS51 linkers complaint if a public symbol is defined
9856         in more than one library module:
9857
9858         * as/mcs51/lklib.c
9859         * link/z80/lklib.c
9860         * as/mcs51/Makefile.in
9861
9862 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9863
9864         A few small changes that speed up the peephole optimizer.
9865
9866         * src/SDCCpeeph.c
9867
9868 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9869
9870         Try to make the peephole optimizer smarter by maintaining
9871         an association between the assembly source code and the
9872         iCodes that originated them. Put this information to use
9873         with a new peephole rule condition "notVolatile" so that
9874         the rules can be aggressive yet still safe.
9875
9876         * src/SDCCpeeph.c
9877         * src/SDCCpeeph.h
9878         * src/mcs51/gen.c
9879         * src/mcs51/peeph.def
9880
9881 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9882
9883         Fixed bug #741761
9884
9885         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
9886         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
9887         if the left or right operand symbols have the accuse flag set.
9888
9889 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9890
9891         Changed the type of the result of the ! (NOT) operator to char;
9892         previously it returned the same type as the source. This allows
9893         us to eliminate all the genFloatNot functions (all of its target
9894         implementations were very buggy) since !float can use the same
9895         code as !long now.
9896
9897         * src/SDCCicode.c (ast2iCode): ! returns char
9898         * src/mcs51/gen.c (genNot, genNotFloat),
9899         * src/ds390/gen.c (genNot, genNotFloat),
9900         * src/z80/gen.c (genNot, genNotFloat),
9901         * src/pic/gen.c (genNot, genNotFloat),
9902         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
9903
9904 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
9905
9906         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9907         1. Interrupt would not compile properly. Ensure PCLATH register is saved
9908            during interrupts. Ensure WSAVE is located at a shared bank address.
9909         2. Fixed page selection in some places
9910         3. Fixed BTFSS/C to where necessary use registers directly and not simply
9911            the registers name strings.
9912         4. Fixed "signed / unsigned compare" compiler warnings.
9913         5. The PIC port manages its own allocation of the general purpose
9914            registers, but makes no attempt to reuse them. As a result when
9915            compiling it soon runs out of general purpose registers. Some
9916            additional code was added to the files pcode.c and device.c to walk
9917            through the function call tree and rename the registers so that they
9918            get reused.
9919
9920         * src/pic/device.c
9921         * src/pic/gen.c
9922         * src/pic/glue.c
9923         * src/pic/pcode.c
9924         * src/pic/pcode.h
9925         * src/pic/ralloc.c
9926         * src/pic/ralloc.h
9927         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
9928         genPlus() & genMinus() when the result is the same as left or right
9929
9930 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9931
9932         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
9933
9934 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9935
9936         Made bitfield a distinct type from bit so that bitfields
9937         convert as per ANSI C and bits retain their traditional
9938         boolean style behaviour. Implemented bitfield support in
9939         the z80 port.
9940
9941         * src/SDCCsymt.h,
9942         * src/SDCCsymt.c,
9943         * src/SDCCast.c,
9944         * src/cdbFile.c,
9945         * src/mcs51/gen.c,
9946         * src/ds390/gen.c: bit v bitfield split
9947         * src/z80/gen.c: New support for bitfields
9948         * support/regression/tests/bitfields.c: reenabled z80,
9949         added more tests
9950
9951 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9952
9953         Rules 246.x, 247.x relate to bitfields, the others speed up
9954         access to xdata mapped I/O devices.
9955
9956         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
9957
9958 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9959
9960         Cleaned up genPackBits and genUnpackBits and added two helper
9961         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
9962         for literal assignments in genPackBits (thanks to Frieder for
9963         reminding me).
9964
9965         * src/mcs51/gen.c
9966         * src/ds390/gen.c
9967
9968 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9969
9970         Fixed bug #748310 (pointer to function type mishandled when the
9971         function name is omitted). Also fixed a SIGSEGV when a function
9972         attribute (reentrant, etc) is used on a non-function or on a
9973         function but misplaced before the parameter list.
9974
9975         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
9976         bug #748310
9977         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
9978         * support/Util/SDCCerr.h,
9979         * support/Util/SDCCerr.c: Added func attr misuse error msg
9980
9981 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
9982
9983         Fixed bug #787649 by anonymous
9984         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
9985         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
9986
9987 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9988
9989         Fixed numerous bitfield problems.
9990
9991         * src/SDCC.y: More bitfield related error checking
9992         * src/SDCCsymt.h,
9993         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
9994         * support/Util/SDCCerr.h,
9995         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
9996         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9997         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
9998         * support/regression/tests/bitfields.c: tests added
9999
10000 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10001
10002         Made the constant following the "interrupt" keyword optional. If
10003         omitted, the function will not automatically be given an entry
10004         in the interrupt vector table (similar to #pragma NOIV, but
10005         less syntacticly kludgy). The interrupt number is also now
10006         range checked. Also fixed a bug in the high order bit example
10007         in the manual.
10008
10009         * src/SDCC.y
10010         * src/SDCCmem.c
10011         * src/SDCCglue.c
10012         * src/SDCCsymt.h
10013         * support/Util/SDCCerr.c
10014         * support/Util/SDCCerr.h
10015         * doc/sdccman.lyx
10016
10017 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
10018
10019         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
10020         * src/SDCCicode.c (operandOperation): rewritten some ops
10021         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
10022         * src/SDCCsymt.c (computeType): literals are handled the same way as any
10023         other type
10024         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
10025         be re-activated by defining REDUCE_LITERALS)
10026         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
10027         unsigned, but are signed by default
10028         * src/SDCCval.c (constVal): rearranged
10029         * src/SDCCval.c (valMod): preliminary fix
10030         * src/SDCCval.c (valCastLiteral): use TYPE_* types
10031         * support/regression/literalop.c: added, work in progress
10032
10033 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10034
10035         Generate warnings for useless declarations like "char data;"
10036         that don't do what new users expect.
10037
10038         * src/SDCC.y
10039         * support/Util/SDCCerr.h
10040         * support/Util/SDCCerr.c
10041
10042 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
10043
10044         * src/SDCCval.c (valMult): fix overflow detection of negative int
10045
10046 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10047
10048         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
10049
10050         Changes to support big endian targets:
10051
10052         * src/ports.h
10053         * src/SDCCglue.c
10054         * src/avr/main.c
10055         * src/ds390/main.c
10056         * src/izt/i186.c
10057         * src/mcs51/main.c
10058         * src/pic/main.c
10059         * src/pic16/main.c
10060         * src/xa51/main.c
10061         * src/z80/main.c
10062
10063 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
10064
10065         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
10066         * device/lib/time.c: fixed warning "integer overflow in expression"
10067
10068 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
10069
10070         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
10071         * src/SDCCval.c (constVal): changed default to signed; hex and octal
10072         constants are unsigned; added recognition of "u" flag for unsigned
10073         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
10074         * src/SDCCval.c (valDiv, valMod): fixed signdness
10075         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
10076         signedness of modulo, left and right shift
10077         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
10078         * support/Util/SDCCerr.h: added warning W_INT_OVL
10079         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
10080         * src/SDCCast.c (ast_print): improved output of constants
10081
10082 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10083
10084         Fixed some warnings when building with MSVC:
10085
10086         * as/mcs51/asdata.c
10087         * as/z80/asdata.c
10088         * as/mcs51/asm.h
10089         * as/z80/asm.h
10090         * link/z80/aslink.h
10091         * link/z80/lkdata.c
10092         * link/z80/lkeval.c
10093         * link/z80/lkgb.c
10094         * link/z80/lkihx.c
10095         * link/z80/lks19.c
10096         * link/z80/lksym.c
10097         * support/cpp2/cpplib.c
10098         * src/ds390/gen.c
10099         * src/mcs51/gen.c
10100
10101 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
10102
10103         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
10104
10105 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10106
10107         * support/librarian/clean.mk: Do not remove Makefile.
10108         * support/librarian/Makefile: added.
10109
10110 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10111
10112         Added librarian to MSVC build:
10113         * all.dsp
10114         * sdcc.dsw
10115         * support/librarian/librarian.dsp
10116
10117         'configure' not needed for librarian, removed:
10118         * support/librarian/configure
10119         * support/librarian/configure.in
10120         * support/librarian/config_in.h
10121         * support/librarian/Makefile.in
10122
10123         Hopefully these ones built the librarian and the rest of sdcc properly:
10124         * Makefile
10125         * Makefile.common.in
10126
10127         Messed up 'configure', so revert to previous version:
10128         * configure
10129         * configure.in
10130
10131 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
10132
10133         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
10134         there, while the mantissa of a double is "only" 53 bits wide.
10135
10136 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10137
10138         Adding sdcclib to the build.  MSVC project coming soon.
10139         Files added/changed:
10140
10141         * support/librarian/clean.mk
10142         * support/librarian/configure
10143         * support/librarian/configure.in
10144         * support/librarian/config_in.h
10145         * support/librarian/Makefile.bcc
10146         * support/librarian/Makefile.in
10147         * support/librarian/sdcclib.c
10148         * Makefile.bcc
10149         * Makefile
10150         * Makefile.common.in
10151         * configure
10152         * configure.in
10153
10154 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10155
10156         Linker now complaints if linked modules have conflicting options, for
10157         example, one compiled using --model-large and another one compiled with
10158         --model-small.  The following files were modified:
10159
10160         * as/mcs51/asdata.c
10161         * as/mcs51/aslink.h
10162         * as/mcs51/asm.h
10163         * as/mcs51/asmain.c
10164         * as/mcs51/asout.c
10165         * as/mcs51/i51pst.c
10166         * as/mcs51/lkdata.c
10167         * as/mcs51/lklibr.c
10168         * as/mcs51/lkmain.c
10169         * as/z80/asdata.c
10170         * as/z80/asm.h
10171         * as/z80/asmain.c
10172         * as/z80/asout.c
10173         * as/z80/z80pst.c
10174         * link/z80/aslink.h
10175         * link/z80/lkdata.c
10176         * link/z80/lklibr.c
10177         * link/z80/lkmain.c
10178         * src/SDCCglue.c
10179
10180 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10181
10182         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
10183         as/mcs51/lklibr.c: Generate a warning when a library is not found.
10184
10185 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
10186
10187         * src/z80/mappings.i: fix _mul[us][int,long] entries
10188
10189 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10190
10191         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
10192
10193 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
10194
10195         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
10196         * support/regression/tests/bitopcse.c: added
10197         fixed warning:
10198         * src/avr/gen.c:
10199         * src/pic/gen.c:
10200         * src/pic16/gen.c:
10201         * src/z80/gen.c:
10202         * src/xa51/gen.c:
10203
10204 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10205
10206         added support for new library format to z80, gbz80 linkers:
10207         *link/z80/aslink.h
10208         *link/z80/lklex.c
10209         *link/z80/lklib.c
10210         *link/z80/lklist.c
10211
10212 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
10213
10214         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
10215         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
10216
10217 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
10218
10219         added DUMMY_READ_VOLATILE:
10220         * src/SDCC.y:
10221         * src/avr/gen.c:
10222         * src/xa51/gen.c:
10223         * src/z80/gen.c:
10224         * src/pic/gen.c:
10225         * src/pic16/gen.c:
10226         * src/mcs51/gen.c:
10227         * src/ds390/gen.c:
10228         * src/SDCCcse.c (algebraicOpts): many improvements
10229         * src/SDCCcse.h: removed algebraicOpts()
10230         * src/SDCCicode.c (picDummyRead): added
10231
10232 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10233
10234         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
10235         "Insufficient space in data memory".
10236
10237 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10238
10239         * src/mcs51/gen.c: fixed bug #771358
10240         * src/z80/gen.c: fixed bug #759087
10241
10242 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
10243
10244         * src/pic16/glue.c: minor cleanup by Vangelis
10245
10246 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10247
10248         * device/include/regc515c.h: fixed #758477
10249         * device/lib/_gptrget.c: saving some cycles in generic pointer get
10250         * device/lib/_gptrput.c: saved a few bytes
10251         * my tab spacing is 8, yours too?)
10252         * device/lib/_ser.c: process RX bytes earlier than TX bytes
10253         * device/lib/serial.c: process RX bytes earlier than TX bytes
10254         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
10255
10256 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10257
10258         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
10259
10260 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10261
10262     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
10263
10264 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
10265
10266         * device/lib/Makefile.in: bad fix, reverted to 1.43
10267
10268 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
10269
10270         * device/lib/Makefile.in: added missing z80 object files
10271
10272 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
10273
10274         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
10275         pic16 progress by Vangelis:
10276         * src/SDCCglobl.h:
10277         * src/SDCCmain.c:
10278         * src/pic/Makefile:
10279         * src/pic:
10280         * pic/Makefile:
10281         * pic16/device.c:
10282         * pic16/device.h:
10283         * pic16/gen.c:
10284         * pic16/gen.h:
10285         * pic16/genarith.c:
10286         * pic16/glue.c:
10287         * pic16/main.c:
10288         * pic16/pcode.c:
10289         * pic16/pcode.h:
10290         * pic16/pcodepeep.c:
10291         * pic16/peeph.def:
10292
10293 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10294
10295     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
10296
10297 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10298
10299     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
10300     added gbz80 build to MSVC project.
10301     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
10302     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
10303     from 8051 stuff and setup so it links using a .lnk file.
10304
10305 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10306
10307     * support/librarian/sdcclib.c: sdcc librarian.
10308     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
10309     with sdcclib.
10310
10311 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10312
10313     * as/mcs51/lkmain.c: properly handle extensions in function afile.
10314
10315 2003-07-02  Borut Razem <borut.razem AT siol.net>
10316
10317         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
10318         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
10319         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
10320         src/xa51/main.c, src/z80/main.c:
10321         virtualization of glue() function: each port has it's own glue function,
10322         which is accessed by do_glue function pointer in PORT.general structure
10323
10324 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
10325
10326         * DS800C400 fun, improved ROM interface and tinibios.
10327
10328 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
10329
10330         * More support for DS80C400. Now includes beginning of interface to ROM.
10331
10332 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
10333
10334         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
10335
10336 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10337
10338         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
10339
10340 2003-06-19  Borut Razem <borut.razem AT siol.net>
10341
10342         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
10343
10344 2003-06-19  Borut Razem <borut.razem AT siol.net>
10345
10346         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
10347         fixed Z80 port - crt0.o: cannot open.
10348
10349 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
10350
10351         * support/Util/MySystem.c (merge_command): revert bad fix
10352
10353 2003-06-18  Borut Razem <borut.razem AT siol.net>
10354
10355         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
10356
10357 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10358
10359         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
10360         option --use-stdout sends errors to stdout instead of stderr.
10361
10362 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
10363
10364         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
10365
10366 2003-06-15  Borut Razem <borut.razem AT siol.net>
10367
10368         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
10369         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
10370         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
10371         fixed width array of pointers replaced with sets;
10372         multiple include and lib paths ared transferred to preprocessor and linker
10373         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
10374         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
10375         fixed width array of pointers
10376         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
10377         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
10378         fixupPath(), getPathDifference()
10379         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
10380         fixed width array of pointers
10381
10382 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
10383
10384         * src/pic16/ralloc.c: fix warnings
10385         * src/pic16/pcode.c: fix warning
10386
10387 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
10388
10389          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
10390         know all the details, but essentially this set of changes enable
10391         the pic16 port to generate movff instructions and generate assembler
10392         directives,
10393         * src/SDCCmain.c:
10394         * src/pic16/gen.c:
10395         * src/pic16/glue.c:
10396         * src/pic16/pcode.c:
10397         * src/pic16/device.c:
10398         * src/pic16/main.c:
10399         * src/pic16/pcode.h:
10400         * src/pic16/pcoderegs.c:
10401         * src/pic16/ralloc.c:
10402         * src/pic16/ralloc.h:
10403
10404 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10405
10406         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
10407         added option --vc, so sdcc errors and warnings are compatible with
10408         Microsoft Visual Studio.
10409
10410 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10411
10412         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
10413           device/lib/libfloat.lib: added atof function.
10414
10415 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
10416
10417         * doc/sdccman.lyx: updated to Lyx 1.3
10418         * doc/cdbfileformat.lyx: updated to Lyx 1.3
10419         * doc/test_suite_spec.lyx: updated to Lyx 1.3
10420         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
10421
10422 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
10423
10424         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
10425
10426 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10427
10428         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
10429           additions to the "related tools/documentation" section
10430
10431 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
10432
10433         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
10434
10435 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
10436
10437         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
10438         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
10439
10440 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
10441
10442         * doc/sdccman.lyx: fix double dash and other minor things
10443         * doc/Makefile: fix double dash
10444
10445 2003-05-28  Karl Bongers(patches from Martin Helmling)
10446         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
10447           condition and ignore commands.
10448
10449 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10450
10451         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
10452           is in parts still quite out of date, I did changes as far as I felt makes sense
10453           for a non-native english speaker.
10454           Please feel free to add to the manual or to correct my changes.
10455         * doc/Makefile: undid touching the date of intermediate tex files.
10456
10457 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10458
10459         * doc/sdccman.lyx: Manual has an index now
10460
10461 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
10462
10463         Finalize muluint/mulsint and mululong/mulslong merging:
10464         * device/lib/_mulint.c
10465         * device/lib/_mullong.c
10466         * device/lib/gbz80/mul.s
10467         * device/lib/gbz80/stubs.s
10468         * device/lib/z80/mul.s
10469         * device/lib/z80/stubs.s
10470         * src/SDCCsymt.c (initCSupport)
10471
10472 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10473
10474         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
10475         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
10476           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
10477           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
10478           instead of /Zm500.
10479
10480 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10481
10482         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
10483           the regression tests I'm not brave enough to enable 245.b, 245.c
10484         * doc/sdccman.lyx: added latex preamble for hyperref package.
10485           Using pdflatex this will give you a hyperlinked pdf file with
10486           bookmarks. (prepend '%' before /usepackage if this breaks something)
10487
10488 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10489
10490          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
10491
10492 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
10493
10494         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
10495
10496 2003-05-21    <johan AT balder>
10497
10498         * src/SDCCglue.c (printIval): fixed bug #739934
10499
10500 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10501
10502         Applied patch from bug 737905 (renamed yylineo to mylineno):
10503         * src/altlex.c
10504         * src/SDCCast.c
10505         * src/SDCglobl.h
10506         * src/SDCC.lex
10507         * src/SDCCsymt.c
10508         * src/SDCCval.c
10509         * src/pic16/pcode.c: Cleaned warnings
10510         * src/pic16/pcodeflow.c: Cleaned warnings
10511         * src/pic16/pcoderegs.c: Cleaned warnings
10512
10513 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
10514
10515         * src/pic16/pcode.c: Cleaned warnings
10516         * src/pic16/pcodepeep.c: Cleaned warnings
10517         * src/pic16/ralloc.c: Cleaned warnings
10518
10519 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10520
10521         * doc/sdccman.lyx: fixed bug 739745
10522         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
10523
10524 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
10525
10526         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
10527         it can be defined with CFLAGS when running configure
10528         * src/SDCCmain.c: fixed compiling + linking with object files
10529
10530 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
10531
10532         * configure.in: configure for pic16 port,
10533             added --disable-pic16-port
10534         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
10535         * src/SDCCmain.c: linkOptions is changed to set *,
10536             added if/endif conditional macros to remove options help
10537             messages from optionsTable when a port is not configured, added
10538             support for the PIc16 port in the ports table, when executing
10539             the compiler with no port specified on command line, a default
10540             port is selected with the new macro DEFAULT_PORT which is
10541             defined in port.h, in setDefaultOptions() linkOptions is removed
10542             from initialization assignment, since now it is a set,
10543             parseCmdLine uses setParseWithComma for linkOptions, in
10544             linkEdit() linkOptions are accessed with new function indexSet()
10545             which returns the i'th item of a set variable. See SDCCset.c, in
10546             linkEdit() when calling buildCmdLine(), added linkOptions as
10547             last argument. Now users can pass arguments to gplink via the
10548             -Wl option, main() uses pic16glue() to glue up pic16 programs
10549         * src/SDCCpeeph.c: various changes to support pic16
10550         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
10551             return the i'th item of the set
10552         * src/SDCCset.h: added function prototype for indexSet()
10553         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
10554         * src/clean.mk: added pic16 in CLEANALLPORTS variable
10555         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
10556             added macro DEFAULT_PORT
10557         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
10558         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
10559             generated
10560         * src/pic16/glue.c: commented out some error producing lines
10561         * src/pic16/main.c: __config directives are commented out to stop
10562             gpasm complaining and test the linkage with gplink, _linkCmd and
10563             _asmCmd changed to be more gplink and gpasm friendly
10564         * src/pic16/peeph.def: peep rule 3 is commented out, since it
10565             produced an error when parsed, peep rule 12 is added to utilize
10566             movff, but it is commented out since the pCode does not support
10567             yet a command with 2 address arguments
10568
10569 2003-05-18    <johan AT balder>
10570
10571         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10572         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10573 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
10574
10575         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
10576   Added feature to script commands from file.
10577
10578 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
10579
10580         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
10581         * src/SDCCutil.c: include ctype.h for win32
10582
10583 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
10584
10585         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
10586
10587 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
10588
10589         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
10590   Fixed so you can set breakpoints prior to run, run does not stop
10591   on entry now.  Add tbreak.  Other enhancements and fixes for use
10592   with ddd.
10593
10594 2003-05-12  Borut Razem <borut.razem AT siol.net>
10595
10596         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
10597
10598 2003-05-11  Borut Razem <borut.razem AT siol.net>
10599
10600         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
10601         the path of bin directory, so that PATH is the only env. variable, which has to be set
10602         in case of standard installation.
10603         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
10604         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
10605         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
10606
10607 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10608
10609         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
10610         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
10611         temp files are in the port dir; clean the gen/test directory when
10612         generating new test.c
10613         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
10614         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
10615         * support/regression/tests/zeropad.c: added
10616
10617 2003-05-09    <johan AT balder>
10618
10619         * src/SDCCglue.c: fixed bug #597940
10620
10621 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
10622
10623         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10624   cache sfr, optimize next,step, fix off by one sourceline,
10625   support ddd list function.
10626         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
10627
10628 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10629
10630         * support/regression/HTMLgen.py: added compare_s2f()
10631         * support/regression/Makefile: redo 1.27
10632         * support/regression/generate-cases.py: redo 1.5
10633
10634 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
10635
10636         * support/regression/tests/float.c: workaround 33 bit hex constant
10637         * support/regression/tests/simplefloat.c: fix division for host
10638
10639 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
10640
10641         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
10642         that tame's the PIC's over-aggressive optimizer.
10643
10644 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10645
10646          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
10647          support for MSVC.
10648
10649 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
10650
10651         Initial support for DS80C400. "Hello world" runs on TINIm400
10652         (with polled I/O).
10653
10654 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
10655
10656          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10657          * Some notes on ddd usage added in debugger/README
10658          Martin Helmling adding more features and fixes for ddd GUI debugger.
10659          Code added for nexti, stepi, up, down, and other adjustments.
10660
10661 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
10662
10663         * src/pic/pCodepeep.c non-wildcard asmops are now handled
10664         * src/pic/peeph.def Added two rules to optimize carry manipulation
10665         * src/pic/* removed debug printfs
10666
10667 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
10668
10669         * debugger/mcs51/cmd.c: added header newalloc.h
10670
10671 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
10672
10673         * as/Makefile: new EXEEXT
10674         * as/z80/Makefile: remove trailing slash of BUILDIR
10675         * as/z80/clean.mk: new EXEEXT
10676         * Makefile.common.in: add to CFLAGS (and others), don't replace it
10677         * support/cpp2/Makefile.in: new EXEEXT
10678         * src/pic/glue.c (pic14emitRegularMap): fixed warning
10679
10680 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
10681
10682         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
10683         EXEEXT was introduced to fix all related problems with targets
10684         "clean", "install" and "uninstall"; a couple of further flaws
10685         especially with "clean" have been fixed too
10686         * as/mcs51/Makefile.in
10687         * as/mcs51/clean.mk
10688         * as/z80/Makefile
10689         * Makefile
10690         * clean.mk
10691         * debugger/mcs51/Makefile.in
10692         * debugger/mcs51/clean.mk
10693         * link/z80/Makefile
10694         * link/z80/Makefile.in
10695         * link/z80/clean.mk
10696         * link/Makefile
10697         * packihx/Makefile.in
10698         * packihx/clean.mk
10699         * sim/ucsim/Makefile
10700         * sim/ucsim/clean.mk
10701         * sim/ucsim/avr.src/Makefile.in
10702         * sim/ucsim/avr.src/clean.mk
10703         * sim/ucsim/s51.src/Makefile.in
10704         * sim/ucsim/s51.src/clean.mk
10705         * sim/ucsim/xa.src/Makefile.in
10706         * sim/ucsim/xa.src/clean.mk
10707         * sim/ucsim/z80.src/Makefile.in
10708         * sim/ucsim/z80.src/clean.mk
10709         * sim/ucsim/main_in.mk
10710         * sim/ucsim/packages_in.mk
10711         * sim/ucsim/gui.src/Makefile.in
10712         * sim/ucsim/gui.src/serio.src/Makefile.in
10713         * sim/ucsim/gui.src/serio.src/clean.mk
10714         * src/Makefile.in
10715         * src/clean.mk
10716         * support/cpp2/Makefile.in
10717         * support/cpp2/clean.mk
10718         * support/makebin/Makefile
10719         * support/makebin/clean.mk
10720         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
10721         * doc/sdccman.lyx: --program-suffix no longer needed
10722
10723 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
10724
10725          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
10726          Martin Helmling added support for ddd GUI debugger.
10727          Code added to display assembly, set variables, and other commands
10728          to interface to ddd.
10729
10730 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
10731
10732         * as/Makefile: fix target clean
10733         * as/clean.mk: fix target clean
10734         * as/z80/clean.mk: fix target clean
10735
10736 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
10737
10738         * Makefile.common.in: added  AT EXEEXT AT
10739         * configure.in: removed all mingw32 stuff
10740         * configure: rebuilt from configure.in
10741         * doc/sdccman.lyx: updated section "installation"
10742         * support/scripts/sdcc_mingw32: adapted to configure
10743         * support/scripts/sdcc_cygwin_mingw32: added
10744
10745 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
10746
10747         * src/pic Added object file support for the PIC port
10748         * src/pic Applied patch from Craig Franklin (this started the object file support)
10749         * src/regression Updated the PIC regression tests for object files
10750
10751 2003-04-20  Borut Razem <borut.razem AT siol.net>
10752
10753         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
10754           lklex.c: In function `getfid':
10755           lklex.c:203: warning: array subscript has type `char'
10756         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
10757           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
10758         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
10759           stack handling macros
10760
10761 2003-04-19  Borut Razem <borut.razem AT siol.net>
10762
10763         * "handling space characters in file path" task:
10764         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
10765         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
10766         * support/Util/MySystem.h: make it self-sufficient
10767         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
10768           src/z80/main.c, sdcc/as/mcs51/lklex.c:
10769           handling space characters in file path
10770         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
10771           (it will be used by assemblers, which have their own includes, e.g. gpasm)
10772         * support/Util/MySystem.c: handling space characters in executable's path
10773
10774 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
10775
10776         * as/z80/Makefile: fix permanent rebuild of z80
10777         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
10778         * support/regression/tests/bitfields.c: added Johan's bitfields.c
10779
10780 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
10781
10782         * src/SDCCopt.c: add special case optimization to replace modulo by
10783           a power of two with a bitwise AND.
10784
10785 2003-04-18    <johan AT balder>
10786
10787         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
10788
10789 2003-04-17    <johan AT balder>
10790
10791         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
10792         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
10793
10794 2003-04-13  Borut Razem <borut.razem AT siol.net>
10795
10796         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
10797         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
10798           fixed mingw problem in adl_NORMALIZE_PATH
10799
10800 2003-04-12  Borut Razem <borut.razem AT siol.net>
10801
10802         * fixed "#pragma SAVE/RESTORE can not be nested":
10803         * src/SDCC.lex: reworked pragma handling functions
10804         * sdcc/src/SDCCglobl.h: reworked stack handling macros
10805         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
10806
10807 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10808
10809         * src/SDCCutil.c (pathEquivalent): defined but not used
10810         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
10811         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
10812         * configure: rebuilt from configure.in
10813         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10814         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10815         * device/include/Makefile.in: replace sdcc_datadir
10816         * device/lib/Makefile.in: replace sdcc_datadir
10817         * Makefile.common.in: add LDFLAGS from configure
10818         * packihx/Makefile.in: use LDFLAGS
10819         * src/Makefile.in: use LDFLAGS
10820         * support/cpp2/Makefile.in: add LDFLAGS from configure
10821         * support/makebin/Makefile: use LDFLAGS
10822         * .version: bumped version number to 2.3.5
10823
10824 2003-04-12  Borut Razem <borut.razem AT siol.net>
10825
10826         * completed "different paths" task:
10827         * src/SDCCmacro.c: fixed bug in handling quotes
10828         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
10829         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
10830
10831 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10832
10833         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
10834
10835 2003-04-11 kevin Vigor <kevin AT vigor.nu>
10836
10837         * ds390/gen.c ds390/peeph.def: fix bug 706781
10838
10839 2003-04-11  Borut Razem <borut.razem AT siol.net>
10840
10841         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
10842
10843 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
10844
10845         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
10846         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
10847          set - this bit used to not be set...).
10848         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
10849           bad code in PIC Port
10850         * src/regression/and2.c added to test bug 609268
10851         * src/regression/Makefile added and2.c to regression test
10852
10853
10854 2003-04-08    <johan AT CP255758-A>
10855
10856         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
10857         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
10858         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
10859
10860 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
10861
10862         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
10863         fix bug #487815
10864         * support/cpp2/Makefile.in: fix bug #487815
10865         * configure: rebuilt from configure.in
10866         * Makefile.common.in: docdir changed, new path suffixes
10867         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10868         * sdcc_vc_in.h: reflect changes from sdccconf.h
10869         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
10870         * src/SDCCutil.h: remove BINDIR hack
10871         * doc/sdccman.lyx: update new path hierarchy
10872
10873 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10874
10875         * src/SDCCpeeph.c: added okToRemoveSLOC test
10876
10877 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10878
10879         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
10880
10881 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10882
10883         * src/SDCCpeeph.c: added labelIsReturnOnly test
10884         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
10885
10886 2003-04-05    <johan AT balder>
10887
10888         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
10889         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
10890         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
10891         * src/SDCCast.c: fixed a warning
10892         * src/SDCCast.h: fixed a warning
10893         * src/SDCCicode.c (operandFromAst): fixed a warning
10894
10895 2003-04-04    <johan AT balder>
10896
10897         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
10898         * src/SDCCast.c (decorateType): fixed bug #715076
10899         * src/SDCC.y: fixed bug #702907
10900
10901 2003-04-03    <johan AT balder>
10902
10903         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
10904         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
10905         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
10906         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
10907         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
10908
10909 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
10910
10911         * _decdptr.c: fix return values
10912         * _gptrget.c: fix return values
10913         * _gptrgetc.c: fix return values
10914         * _gptrput.c: fix return values
10915         * _mulint.c: fix return values
10916         * as/z80/Makefile: fix 'make -j' problem
10917
10918 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
10919
10920         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
10921         * configure.in: big cleanup, updated to autoconf 2.5x
10922         * configure: rebuilt from configure.in
10923         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10924         * sdcc_vc_in.h: reflect changes from sdccconf.h
10925         * doc/Makefile: fixed a flaw in "make install"
10926
10927 2003-04-02    <johan AT balder>
10928
10929         * src/ds390/gen.c (genCmp): no comments
10930         * src/mcs51/gen.c (genCmp): no comments
10931         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
10932         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
10933
10934 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
10935
10936         * support/regression/generate-cases.py: place generated file in given sub directory
10937         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
10938         * support/regression/Makefile: improvements for 'make -j';
10939         side effect: it's simpler and faster now
10940
10941 2003-03-31  Borut Razem <borut.razem AT siol.net>
10942
10943         * src/z80/main.c: link-{port} and as-{port} defined without path
10944         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
10945
10946 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
10947
10948         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
10949
10950 2003-03-30  Borut Razem <borut.razem AT siol.net>
10951
10952         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
10953           changed type of list parameter to set
10954         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
10955         * src/port.h: changed type of do_assemble() parameter to set
10956         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
10957           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
10958           definition of "cppoutfilename" macro with NULL value in preProcess()
10959         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
10960         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
10961         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
10962           replaced with set *binPathSet
10963         * shash_add() deallocates the item, if allready exsists, before adding the new one
10964         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
10965
10966 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
10967
10968         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
10969           a nested for loop bug in the PIC port
10970         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
10971           for loops
10972
10973 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
10974
10975         * support/Util/dbuf.h: remove C++ stuff to make it portable
10976
10977 2003-03-28  Borut Razem <borut.razem AT siol.net>
10978
10979         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
10980           literal strings in stringLiteral()
10981         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
10982         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
10983           to the project
10984
10985 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
10986
10987         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
10988
10989 2003-03-26    <johan AT balder>
10990
10991         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
10992         * src/ds390/gen.c (saveRegisters): catched symbol abuse
10993         * src/SDCCast.c (decorateType): fixed " -v < 3"
10994
10995 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
10996
10997         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
10998         Added Lenny Story's debug infrastructure changes:
10999         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
11000         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
11001         * src/cdbFile.c: added
11002         * src/SDCCdebug.c: added
11003         * src/SDCCdebug.h: added
11004         * src/SDCCast.c (createFunction)
11005         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
11006         * src/SDCCmain.c (parseCmdLine, main)
11007         * src/SDCCmem.c (redoStackOffsets)
11008         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
11009         * src/SDCCsymt.h
11010         * src/common.h
11011         * src/avr/gen.c (genAVRCode)
11012         * src/ds390/gen.c (gen390Code)
11013         * src/mcs51/gen.c (gen51Code)
11014         * src/pic/gen.c (genpic14Code)
11015         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
11016         * src/xa51/gen.c (genXA51Code)
11017         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
11018
11019 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11020
11021         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
11022         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
11023
11024 2003-03-22    <johan AT balder>
11025
11026         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
11027
11028 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
11029
11030         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
11031         * doc/cdbfileformat.lyx: added, written by Lenny Story
11032         * doc/Makefile: added cdbfileformat.lyx
11033         * doc/clean.mk: added cdbfileformat.lyx
11034
11035 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
11036
11037         * src/mcs51/peeph.def: fix bug #705773
11038
11039 2003-03-20    <johan AT balder>
11040
11041         An sfr/sbit can have an "at #" AND an initializer
11042         * src/SDCCsymt.c (checkSClass):
11043         * src/SDCCmem.c (allocGlobal):
11044         * src/SDCCmem.c (allocLocal):
11045         * src/SDCCast.c (createBlock):
11046
11047 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
11048
11049         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
11050
11051 2003-03-16    <johan AT balder>
11052
11053         Undid the hackup of const and volatile, the problem is much bigger
11054         * src/SDCC.y:1.65
11055         * src/SDCCast.c:1.171
11056         * src/SDCCglue.c:1.138
11057         * src/SDCCicode.c:1.146
11058         * src/SDCCsymt.c:1.150
11059         * src/SDCCval.c:1.65
11060
11061 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
11062
11063         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
11064         * src/ds390/gen.c (genAddrOf): fixed bug #704087
11065
11066 2003-03-13    <johan AT balder>
11067
11068         Hackup const and volatile modifiers in type chains a bit:
11069         * src/SDCC.y:1.63
11070         * src/SDCCast.c:1.169
11071         * src/SDCCglue.c:1.136
11072         * src/SDCCicode.c:1.143
11073         * src/SDCCsymt.c1.146
11074         * src/SDCCsymt.h1.59
11075         * src/SDCCval.c:1.63
11076
11077 2003-03-12    <johan AT balder>
11078
11079         * src/SDCCBBlock.h: more LRH debugging junk
11080         * src/SDCCcflow.h: more LRH debugging junk
11081         * src/SDCCloop.c: more LRH debugging junk
11082         * src/SDCC.y (struct_declaration): fixed bug #697590
11083         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
11084         * src/ds390/gen.c (aopForRemat): fixed bug #700031
11085         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
11086
11087 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
11088         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
11089         test function names must now match exactly).
11090         * src/SDCCcse.c: added special case in findCheaperOp to allow
11091         extending a short integer. Makes less awful code for bug 700121 test case.
11092
11093 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11094
11095         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
11096         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
11097
11098 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
11099
11100         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
11101         actually called (operandsNotEqual() was called for all
11102         operandsNotEqualX tests).
11103
11104 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
11105
11106         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
11107         with shorter literals. Fixes bug 700121.
11108
11109 2003-03-11    <johan AT balder>
11110
11111         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
11112
11113 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
11114
11115         * src/SDCCloop.c (mergeRegions): an evil beast is dead
11116         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
11117
11118 2003-03-10  Borut Razem <borut.razem AT siol.net>
11119
11120         * src/SDCCmain.c: pipe preprocessor's output
11121         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
11122         * sdcc_vc_in.h: define pclose as _pclose for WIN32
11123         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
11124         which closes all pipes in pipeSet set
11125         * src/SDCCset.c: free deleted item in function deleteSetItem()
11126         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
11127         moved from z80 to src subproject
11128         * .version: increased version number to 2.3.4
11129
11130 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
11131
11132         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
11133         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
11134         * support/regression/ports/xa51/spec.mk: fix typo
11135
11136 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
11137
11138         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
11139
11140 2003-03-09  Borut Razem <borut.razem AT siol.net>
11141
11142         * src/SDCCmain.c: pipe preprocessor's output
11143         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
11144         * sdcc_vc_in.h: define pclose as _pclose for WIN32
11145         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
11146         which closes all pipes in pipeSet set
11147         * src/SDCCset.c: free deleted item in function deleteSetItem()
11148         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
11149         moved from z80 to src subproject
11150
11151 2003-03-09  Borut Razem <borut.razem AT siol.net>
11152
11153         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
11154         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
11155         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
11156         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
11157         * src/SDCCglobl.h: unification of WIN32 native definitions
11158
11159 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11160
11161         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
11162
11163 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
11164
11165         * src/configure.in:   check for endianess (even while cross-compiling)
11166         * src/configure:      check for endianess (even while cross-compiling)
11167         * src/configure_in.h: check for endianess (even while cross-compiling)
11168         * src/avr/gen.c:        remove old endianess stuff
11169         * src/mcs51/gen.c:      remove old endianess stuff
11170         * src/ds390/gen.c:      remove old endianess stuff
11171         * src/pic/gen.c:        remove old endianess stuff
11172         * src/pic/genarith.c:   remove old endianess stuff
11173         * src/pic/glue.c:       fix endianess check
11174         * src/pic16/gen.c:      remove old endianess stuff
11175         * src/pic16/genarith.c: remove old endianess stuff
11176         * src/pic16/glue.c:     fix endianess check
11177         * src/xa51/gen.c:       remove old endianess stuff
11178         * src/z80/gen.c:        fix endianess check
11179         * src/SDCCglue.c:       fix endianess check
11180         * src/ds390/peeph.def: fix bug 700036
11181
11182 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
11183
11184         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
11185         * src/configure: find appropriate data-types on host for SDCC's int and long
11186         * src/configure.in: find appropriate data-types on host for SDCC's int and long
11187         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
11188         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
11189
11190 2003-03-07    <johan AT balder>
11191
11192         Just a big NOOP:
11193                 some minor cleanups before the big shot
11194                 OP_DEFS and OP_USES now use Kevin's protection
11195                 new option --nolabelopt
11196
11197         * src/SDCCBBlock.c:
11198         * src/SDCCast.c,:
11199         * src/SDCCcflow.c:
11200         * src/SDCCcse.c:
11201         * src/SDCCicode.c:
11202         * src/SDCCicode.h:
11203         * src/SDCClabel.c:
11204         * src/SDCCloop.c:
11205         * src/SDCCmain.c:
11206         * src/ds390/ralloc.c:
11207         * src/mcs51/ralloc.c:
11208         * src/pic/ralloc.c:
11209         * src/xa51/ralloc.c:
11210         * src/z80/ralloc.c:
11211
11212 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
11213
11214         * src/pic/pcode.c (get_op): fix 64 bit warnings
11215         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
11216         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
11217         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
11218         * support/regression/tests/malloc.c: fix 64 bit warnings
11219
11220 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
11221
11222         * src/mcs51/gen.c (genMinus): fixed bug 696436
11223
11224 2003-03-02  Borut Razem <borut.razem AT siol.net>
11225
11226         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
11227
11228 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
11229
11230         * configure.in: test for mkstemp
11231         * sdccconf_in.h: add HAVE_MKSTEMP
11232
11233 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
11234
11235         * device/include/ctype.h: removed warning while using --stack-auto
11236         * device/include/malloc.h: removed warning while using --stack-auto
11237         * device/include/string.h: removed warning while using --stack-auto
11238
11239 2003-02-23  Borut Razem <borut.razem AT siol.net>
11240
11241         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
11242         because NDEBUG is defined (see man assert)
11243         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
11244
11245 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11246
11247         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
11248         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
11249
11250 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11251
11252         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
11253         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
11254
11255 2003-02-18    <johan AT balder>
11256
11257         * as/mcs51/asmain.c (asmbl): module can start with a digit
11258         * as/z80/asmain.c (asmbl): module can start with a digit
11259
11260 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
11261
11262         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
11263         * src/asm.c: fix pipe() for Mingw32
11264
11265 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
11266
11267         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
11268         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
11269         make -V work again; --c1mode reads now from stdin
11270         * doc/sdccman.lyx: added --c1mode
11271         * support/Util/SDCCerr.c: new messages for c1 mode
11272         * support/Util/SDCCerr.h: new messages for c1 mode
11273         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
11274
11275 2003-02-15    <johan AT balder>
11276
11277         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
11278
11279 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
11280
11281         * doc/sdccman.lyx: Environment variables, -o and other minor things
11282
11283 2003-02-14    <johan AT balder>
11284
11285         * src/xa51/main.c: before anyone really tries to use it :)
11286
11287         * Install doc's in share/sdcc/doc
11288         * removed some obsolete files
11289         * Do a proper make distclean and uninstall
11290         M Makefile.common.in
11291         R sdccbuild.sh
11292         M as/Makefile
11293         M device/include/Makefile.in
11294         M device/lib/Makefile.in
11295         M doc/sdccman.lyx
11296         M link/Makefile
11297         M sim/ucsim/doc/Makefile.in
11298         M src/clean.mk
11299         R src/avr/peeph.rul
11300         R src/xa51/peeph.rul
11301         M support/cpp2/Makefile.in
11302         M support/makebin/Makefile
11303
11304
11305 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
11306
11307         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
11308
11309 2003-02-10  Borut Razem <borut.razem AT siol.net>
11310
11311         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
11312         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
11313         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
11314         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
11315         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
11316         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
11317         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
11318         src/z80/Makefile.bcc: Borland Makefile cleanup
11319         * as/z80/Makefile.bcc: Added Borland Makefile
11320         * support/cpp2/borland.h: Removed
11321
11322 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
11323
11324         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
11325         * src/SDCC.lex: new pragma NOIV
11326         * src/SDCCglobl.h: new pragma NOIV
11327         * src/SDCCmem.c: new pragma NOIV
11328
11329 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
11330
11331         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
11332
11333 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
11334
11335         * src/SDCCmain.c: signal handling is switched off by --debug
11336         * doc/Makefile: small fix for install; use clean.mk again
11337         * doc/clean.mk: clean *.pdf and *.html too
11338
11339 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
11340
11341         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
11342         * device/lib/printfl.c: fix a ds390 bug by making it portable
11343         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
11344         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
11345         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
11346         * debugger/mcs51/cmd.c: converted multi-line string literals
11347         * sim/ucsim/globals.cc: converted multi-line string literals
11348         * src/SDCCmain.c: introduced signal handler to remove temp files
11349         * doc/Makefile: small tweaks, implement clean
11350         * doc: removed generated files
11351
11352 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11353
11354         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
11355         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
11356         Address Record is not correctly generated for DS390."
11357
11358 2003-02-02  Borut Razem <borut.razem AT siol.net>
11359
11360         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
11361         * as/mcs51/asm.h: fixed compilation with Borland C
11362         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
11363         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
11364         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
11365         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
11366         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
11367         src/z80/Makefile.bcc: delete $(LIB) only if exist
11368         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
11369
11370 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
11371
11372         * device/include/malloc.h: introduced NULL
11373         * device/include/string.h: introduced NULL
11374         * device/include/stdlib.h: introduced NULL
11375         * device/lib/_memcpy.c: removed NULL
11376         * device/lib/_strcat.c: removed NULL
11377         * device/lib/_strchr.c: removed NULL
11378         * device/lib/_strcmp.c: removed NULL
11379         * device/lib/_strcpy.c: removed NULL
11380         * device/lib/_strcspn.c: removed NULL
11381         * device/lib/_strlen.c: removed NULL
11382         * device/lib/_strncat.c: removed NULL
11383         * device/lib/_strncmp.c: removed NULL
11384         * device/lib/_strncpy.c: removed NULL
11385         * device/lib/_strpbrk.c: removed NULL
11386         * device/lib/_strrchr.c: removed NULL
11387         * device/lib/_strspn.c: removed NULL
11388         * device/lib/_strstr.c: removed NULL
11389         * device/lib/_strtok.c: removed NULL
11390         * device/lib/malloc.c: removed NULL, include own header
11391
11392 2003-02-02    <johan AT balder>
11393
11394         * 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
11395         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
11396         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
11397         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
11398         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
11399         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
11400
11401 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11402
11403         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
11404         area 'DATA'"
11405
11406 2003-02-01    <johan AT balder>
11407
11408         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
11409
11410 2003-01-31    <johan AT CP255758-A>
11411
11412         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
11413
11414 2003-01-30    <johan AT balder>
11415
11416         * src/SDCCBBlock.c: automatic bug detection
11417         * src/SDCCicode.c: automatic bug detection
11418
11419 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11420
11421         * src/SDCCglobl.h:   now --xram-size 0 works
11422         * src/SDCCmain.c:    now --xram-size 0 works
11423
11424 2003-01-29    <johan AT balder>
11425
11426         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
11427
11428 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11429
11430         * as/mcs51/aslink.h: Added options --xram-size and --code-size
11431         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
11432         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
11433         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
11434         * src/SDCCglobl.h:   Added options --xram-size and --code-size
11435         * src/SDCCmain.c:    Added options --xram-size and --code-size
11436
11437 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
11438
11439         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
11440         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
11441
11442 2003-01-27    <johan AT balder>
11443
11444         * src/SDCC.y: fixed bug #613764
11445
11446 2003-01-26    <johan AT balder>
11447
11448         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
11449         * src/SDCCsymt.h: fixed bug #673374
11450         * src/SDCCglue.c: fixed bug #661910
11451         * src/SDCCast.c: fixed bug #458099 and 673374
11452
11453 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
11454
11455         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
11456         * as/mcs51/strcmpi.h: added
11457         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
11458         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
11459         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
11460         * as/mcs51/assym.c: strcmpi -> as_strcmpi
11461         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
11462         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
11463         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
11464         * as/mcs51/Makefile.aslink: new module strcmpi
11465         * as/mcs51/Makefile.asx8051: new module strcmpi
11466         * as/mcs51/Makefil.bcc: new module strcmpi
11467         * as/mcs51/Makefile.in: new module strcmpi
11468         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
11469
11470 2003-01-26    <johan AT balder>
11471
11472         * src/SDCCglue.c: reverted back to 1.124
11473         * src/SDCCast.c: reverted back to 1.156
11474         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
11475
11476 2003-01-25    <johan AT balder>
11477
11478         * src/SDCCglue.c: A better fix for bug #661910
11479         * src/SDCCast.c: A better fix for bug #661910
11480         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
11481
11482 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11483
11484         * src/Makefile.in: remove spawn.o
11485         * src/SDCCmain.c: remove spawn.h
11486         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
11487         * src/spawn.c: removed
11488         * src/spawn.h: removed
11489         * support/regression/ports/ds390/spec.mk: link with -r
11490
11491 2003-01-24    <johan AT CP255758-A>
11492
11493         * src/ds390/gen.c (aopOp): fixed bug #667458
11494         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
11495         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
11496         (createIvalCharPtr): an ival doesn't always have a storage class anymore
11497
11498 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11499
11500         * src/mcs51/peeph.def: better assembler identation by Frieder
11501         * src/mcs51/gen.c: better assembler identation by Frieder
11502
11503 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
11504
11505         * as/z80/string.h: removed for gcc 3.2
11506         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
11507         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
11508
11509 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11510
11511         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
11512         * src/SDCCpeeph.c (replaceRule): fix bug #663503
11513         * support/regression/Makefile: separate temp files for ports
11514         * support/regression/generate-cases.py: separate temp files for ports
11515         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11516         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11517
11518 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11519
11520         * moved tinitalk to device/examples/ds390
11521
11522 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
11523
11524         * as/mcs51/lkmem.c: rflag is for DS390
11525         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
11526         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
11527                          (linkEdit): move mem- and map-files the same way as ihx-files
11528         * src/z80/main.c (_setDefaultOptions): removed --generic
11529         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
11530         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
11531         * src/pic/glue.c (picglue): --c1mode works again
11532         * src/pic16/glue.c (pic16glue): --c1mode works again
11533         * src/asm.c (printCLine): fix #660034
11534
11535 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
11536
11537         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
11538         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
11539         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
11540         * as/mcs51/lkmem (summary): better fix for sp problem
11541         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
11542         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
11543         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
11544                                               remove --stack-after-data
11545
11546 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
11547
11548         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
11549         * src/SDCCutil.c (join): ugly bug: missing '\0'
11550         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
11551
11552 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11553
11554         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
11555         * src/port.h: typo
11556         * src/pic/main.c (_asmCmd): gpasm supports -o
11557         * src/z80/main.c: more general macros
11558         * device/lib/Makefile.in: remove intermediate files
11559
11560 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11561
11562         * .version: Bumped version number to 2.3.3
11563         * src/SDCCBBlock.c: new option -o
11564         * src/SDCCglobl.h: new option -o
11565         * src/SDCCglue.c: new option -o
11566         * src/SDCCmain.c: new option -o
11567         * src/asm.c: new option -o
11568         * src/ds390/main.c: new option -o
11569         * src/pic/glue.c: new option -o
11570         * src/pic/pcode.c: new option -o
11571         * src/pic/ralloc.c: new option -o
11572         * src/pic16/glue.c: new option -o
11573         * src/pic16/pcode.c: new option -o
11574         * src/pic16/ralloc.c: new option -o
11575         * src/z80/main.c: new option -o
11576         * device/lib/Makefile.in: use -o
11577         * support/regression/ports/ds390/spec.mk: use -o
11578         * support/regression/ports/gbz80/spec.mk: use -o
11579         * support/regression/ports/mcs51/spec.mk: use -o
11580         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
11581         * support/regression/ports/z80/spec.mk: use -o
11582         * support/regression/ports/ucz80/spec.mk: use -o
11583         * support/regression/ports/xa51/spec.mk: use -o
11584         * support/regression/fwk/lib/timeout.c: fix usage string
11585
11586 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
11587         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
11588
11589 2003-01-07    <johan AT balder>
11590
11591         * src/SDCCast.c (decorateType): fixed bug #600035
11592
11593 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
11594         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
11595         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
11596         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
11597         * src/pic/pcode.c: outcommented unused variable to remove warnings
11598         * src/pic/ralloc.c: outcommented unused variable to remove warnings
11599
11600 2003-01-06    <karl AT turbobit.com>
11601         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
11602    regression tests.
11603
11604 2003-01-06    <johan AT balder>
11605
11606         * src/SDCCicode.c: fixed array add
11607
11608 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
11609         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
11610         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
11611
11612 2003-01-04    <johan AT balder>
11613
11614         * src/SDCCval.c (getNelements): fixed the initialized array of structures
11615
11616 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11617         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
11618
11619 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11620         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
11621         * support/regression/tests/bug-524697.c: fit mem usage into 8032
11622
11623 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11624         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
11625
11626 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
11627         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
11628
11629 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
11630         * src/mcs51/main.c: removed {bindir}{sep} from aslink
11631
11632 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11633
11634     * in /sdcc/as/mcs51/ changed these files in order to create an
11635     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
11636     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
11637     following files to include the previous two files: aslink.dsp,
11638     Makefile.aslink, Makefile.bcc, and Makefile.in.
11639
11640     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
11641     .adb instead of .cdb
11642
11643 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11644
11645         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
11646         value from option --iram-size.
11647
11648 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11649
11650         * /sdcc/as/mcs51/lklist.c: added boundary check before using
11651         dram[] array.
11652
11653 2002-09-18    <wiml AT hhhh.org>
11654
11655         * SDCClrange.h: exposed setFromRange() and setToRange()
11656         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
11657           packRegsForAccUse() (bug 542397)
11658         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
11659           multiple times and emitting the fetch operations more than once
11660           added aopGetUsesAcc() function to allow binary operators to
11661           fetch their operands in the correct order; made genMinus() emit
11662           compact code for X = LITERAL - Y
11663
11664 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11665         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
11666         sprintf() in line 1267.
11667
11668 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11669         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
11670         like ports.
11671
11672 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11673         Changes to aslink (All the changes are marked with 'JCF'):
11674
11675         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
11676         summary().
11677
11678         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
11679         area BSEG.  Also moves, if possible, the DATA area down into the internal
11680         ram so more space is available.
11681
11682         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
11683         sflag.
11684
11685         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
11686         not bytes.  Function summary() which creates a memory usage summary
11687         file with extension .mem.  Reports of overlaping stack and small stack
11688         size.  If the space for the stack is less than 16 bytes aslink trows a
11689         warning.
11690
11691         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
11692         the 8051.  Option 'y' for memory summary output file.
11693
11694         Changes to sdcc (All the changes are marked with 'JCF'):
11695
11696         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
11697
11698         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
11699         overlaying area for it (uses RegBankUsed[4]).
11700
11701         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
11702         bank zero as used by default.  By default aslink locates the stack
11703         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
11704         the creation of the .mem file.  Delegates the allocation of data area
11705         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
11706         the begining of the stack area to aslink.
11707
11708         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
11709         glue() in SDCCglue.c creates an area for it.
11710
11711 2002-09-03  Borut Razem <borut.razem AT siol.net>
11712         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
11713         sdcc/src/pic/glue.c:
11714         introduced atexit() handler for teporay files removal in case of
11715         errors, assertions, ...
11716
11717 2002-08-29  Borut Razem <borut.razem AT siol.net>
11718         * sdcc/support/cpp2/auto-host_vc_in.h:
11719         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
11720         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
11721         Maybe there is a similar problem with BORLANDC? It should be checked!
11722
11723         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
11724         corrected improper use of assert: the assignment to clr variable was done inside the assert.
11725         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
11726         was not executed, and the compiler (cl) launched a warning:
11727         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
11728
11729 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
11730         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
11731
11732 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
11733         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
11734
11735         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11736           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
11737           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
11738           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11739           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
11740           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
11741           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
11742         - added Release configuration in VS projects
11743         - review of compiler an linker options
11744         - VC .exe files are generated in bin_vc directory, not to interfere
11745           with binaries generated from other projects (cygwin, mingw, bcc ...)
11746
11747         * sdcc/src/yacc.dsp: added
11748
11749         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
11750         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
11751         and insert the version number definitions from .version
11752
11753         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
11754
11755         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
11756         added - genarate auto-host.h using auto-host_vc_in.h as template
11757
11758         * sdcc/sdcc_vc.h,
11759         removed from CVS, generated automatically
11760
11761 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
11762         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
11763
11764 2002-08-11  Borut Razem <borut.razem AT siol.net>
11765         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
11766
11767 2002-08-10  Borut Razem <borut.razem AT siol.net>
11768         * src/SDCCmain.c (main):
11769         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
11770         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
11771         The consequence was that some temporary files were not removed.
11772
11773         * src/SDCCglue.c:
11774         unification of code in functions tempfilename() and tempfile():
11775         function tempnam() is defined in Visual Studio 6.0 and .NET
11776
11777         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
11778
11779         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11780           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
11781         - removed compiler command line option /WX: Treats all warnings as errors
11782         - update a list of source files, included into the project
11783
11784         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11785           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
11786         changed project type to Generic Project so that can be correcly converted to VS.NET project
11787
11788         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
11789
11790         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
11791
11792         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
11793
11794         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
11795         added return 0 statements after assert() to make compiler happy
11796
11797         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
11798         added newline in the def file to keep MSC compiler satisfied
11799
11800         * sdcc/src/z80/gen.c:
11801         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
11802           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
11803         - solved MSC error in function aopDump()
11804
11805         * sdcc_vc.h: define PREFIX as "\\sdcc"
11806
11807 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
11808         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
11809
11810 2002-06-22  Scott Dattalo <scott AT dattalo.com>
11811         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
11812         - Rewrote the register banking algorithm.
11813         - Added pCode live-range analysis to registers (for now, only non-used and
11814         singly-used registers optimized away)
11815
11816         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
11817
11818         * 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.
11819
11820 2002-05-10  Scott Dattalo <scott AT dattalo.com>
11821         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
11822
11823 2002-04-22  Michael Hope  <michaelh AT vroom>
11824
11825         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
11826
11827         * configure.in (DD_COPT): Added include support required for gbdk.
11828
11829         * .version: Bumped version number just to increase it.
11830
11831         * src/SDCCmain.c: Added -nostdinc to the default options.
11832
11833 2002-04-15  Michael Hope  <michaelh AT vroom>
11834
11835         * device/lib/z80/printf.c (sprintf): Added.
11836
11837         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
11838
11839         * src/z80/peeph.def: Added transpose redundent load rule.
11840
11841         * src/z80/main.c: Added force callee saves for jaune.
11842
11843         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
11844
11845         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
11846
11847 2002-03-28  Johan Knol  <johan AT balder>
11848
11849         * src/SDCCval.c: fixed bug #532436
11850
11851 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11852         * /src/port.h:
11853         Added "char *Processor" field to the port structure.
11854
11855         * /src/SDCCmain.c:
11856         Added -p option. Allows port dependent processor to be specified.
11857
11858         * all ports:
11859         Initialized the new field char *Processor field to NULL in all ports
11860
11861         * /src/pic/*:
11862         Compiler generated registers for interrupt context saving
11863         were not getting allocated.
11864
11865 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
11866
11867         * /src/SDCCast.c:
11868         Fixed left shift. Will promote the left side of a left shift
11869         if a) left shifting more than size of operand or b) when assigned
11870         to something size > size of left side
11871
11872 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11873         * src/pic/*
11874         tons of changes. Register allocation has been
11875         rewritten. Added customization for the various PICs. Flow
11876         analysis is restructured. ...
11877
11878         * src/pic/device.h:
11879         Added
11880
11881         * src/pic/device.c:
11882         Added. device.c is a PIC port hack to accomodate variations
11883         in PIC devices.
11884
11885 2002-03-13  Michael Hope  <michaelh AT vroom>
11886
11887         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
11888
11889 2002-03-04  johanknol  <johanknol AT manik>
11890
11891         * /src/SDCCval.c: fixed
11892
11893         const unsigned char arr[][2] = { { 0, 1 } };
11894         t18.c:1: error: Initializer element is not constant
11895
11896 2002-03-04  bela  <bela AT manik>
11897
11898         * /device/include/mcs51reg.h:
11899         ds89c420 register definition update
11900
11901 2002-03-03    <johan AT FRIJA>
11902
11903         * support/Util/SDCCerr.c: did something, but don't no why anymore
11904
11905         * support/regression/tests/bug-524691.c: made it a little less shy
11906
11907         * src/SDCCast.c (decorateType): fixed bug #524697
11908
11909         * src/SDCCast.c: made some lineno improvements
11910
11911         * src/SDCCval.c (getNelements): changed warning to error
11912
11913         * src/SDCCglue.c (printIvalArray): changed warning to error
11914
11915         * src/SDCCicode.c: fixed a warning for mingw
11916
11917         * src/SDCCast.c (decorateType): fixed the << promotion for ops
11918
11919         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
11920
11921 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
11922
11923         * src/ds390/peeph.def:
11924         Added some more peephole rules
11925
11926         * src/ds390/gen.c: Various fixes & enhancements
11927
11928         * src/SDCClrange.c, src/SDCClrange.h:
11929         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
11930
11931         * src/ds390/ralloc.c:
11932         various fixes & enhancements (ds390) specific
11933
11934         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
11935         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
11936         from rallocs.
11937
11938         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
11939
11940 2002-03-02    <johan AT FRIJA>
11941
11942         * src/SDCCast.c (decorateType): fixed bug #524708
11943
11944         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
11945
11946         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
11947
11948 2002-03-01  Michael Hope  <michaelh AT vroom>
11949
11950         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
11951
11952         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
11953
11954 2002-03-01    <johan AT FRIJA>
11955
11956         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
11957
11958         * src/SDCCast.c (decorateType): fixed bug #524209
11959
11960         * src/SDCCval.c (valNot): fixed bug #524195
11961
11962 2002-02-26    <johan AT balder>
11963
11964         * src/xa51/gen.c: fixed a warning
11965
11966         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
11967
11968         * src/SDCCast.c (decorateType): fixed bug #522534
11969
11970 2002-02-23    <johan AT balder>
11971
11972         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
11973
11974 2002-02-22    <johan AT balder>
11975
11976         * src/SDCCast.c: fixed bug #514865
11977
11978         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
11979
11980 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
11981
11982         * sdcc/src/SDCCloop.c:
11983         Previous fix was not good. basic blocks that have "break" or "return" are
11984         not really partof a loop , but live ranges used in these blocks should
11985         be live thru the entire loop, so set partOfLoop but don't add them to
11986         loop region
11987
11988 2002-02-21    <johan AT FRIJA>
11989
11990         * src/SDCCcse.c: fixed bug #514308
11991
11992 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
11993
11994         * src/SDCCloop.c:
11995         Fixed BUG #519583. If a conditional block ended in a return/break
11996         statement inside a loop, it was not being considered part of the loop.
11997
11998         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
11999
12000 2002-02-10  Karl Bongers <karl AT turbobit.com>
12001
12002         * debugger/*:
12003         Fixed up SDCDB debugger somewhat.  Updated debugger/README
12004         with lots of comments and notes.
12005
12006         * device/examples/test2.c:
12007         Fix bug, "red" variable not being initialized(compiler complained).
12008
12009         * device/examples/Makefile, examples/test3.c:
12010         Add Makefile in device/examples folder, compiles test3.c
12011         for use as a multiple module SDCDB test case.
12012
12013         * sim/ucsim/cmd.src/cmdset.cc:
12014         Took out debug printfs in ucsim "next" command.
12015
12016         * sim/ucsim/xa.src:
12017         Karl and Johan start ucsim XA support.  Most dissassembly working,
12018         about 75% emulation done(plenty of work remaining).
12019
12020         * sim/ucsim/z80.src:
12021         Add Z80 support to ucsim, add test-ucz80 regression test,
12022         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
12023         Notice z80 compiler fails on examples/test3.c/crc code.
12024
12025 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
12026
12027         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
12028         Added support for --parms-in-bank1
12029
12030         * src/ds390/peeph.def:
12031         added a few more peephole optimzations
12032
12033         * src/ds390/main.c:
12034         1) added __builtin_inp & __builtin_outp used to read in data of given length
12035            from a memory mapped port
12036         2) added __builtin_memcmp
12037         3) added __builtin_swapw swap bytes of a short
12038
12039         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
12040         1) handle multiple send & receives from register bank1
12041         2) ralloc can now allocate DPTR1 to some liveRanges
12042
12043         * src/SDCCsymt.c, src/SDCCsymt.h:
12044         changes to handle multiple sends & receives
12045
12046         * src/SDCCptropt.h:
12047         added some pointer arithmetic optimization
12048
12049         * src/SDCCptropt.c:
12050         added some pointer arithmetic optimizations but not stable yet so not
12051         called from anywhere (will get this working shortly)
12052
12053         * src/SDCCopt.c: fixed for multiple sends & receives
12054
12055         * src/SDCCmain.c:
12056         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
12057         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
12058            set preprocessor defines (depending on options)
12059
12060         * src/SDCCicode.c, src/SDCCicode.h:
12061         changes made to handle multiple sends & receives
12062
12063         * src/SDCCglobl.h:
12064         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
12065
12066         * src/SDCCcse.c, src/SDCCcse.h:
12067         added function findbackward def (to be used in upcoming optimization)
12068
12069         * src/SDCCcflow.c, src/SDCCcflow.h:
12070         added function returnAtEnd - to determine if a basic block terminates with
12071         a RETURN iCode
12072
12073         * src/SDCCast.c, src/SDCCast.h:
12074         added option parms-in-bank1
12075
12076         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
12077         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
12078         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
12079         adjusted for --parms-in-bank1 option
12080
12081         * device/include/string.h:
12082         donot redefine "reentrant" keyword
12083
12084         * device/include/ds80c390.h: Added some more SFRs
12085
12086 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
12087
12088         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
12089
12090 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
12091
12092         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
12093
12094 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
12095
12096         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
12097
12098 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
12099
12100         * Added --xram-movc option
12101
12102 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
12103
12104         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
12105
12106 2002-01-11  Johan Knol
12107
12108         * Added math lib of Jesus Calvino-Fraga
12109
12110 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
12111
12112         * src/SDCCmain.c (processFile): fix processing of ../../src.c
12113         * support/regression/Makefile: new target test-mcs51-stack-auto
12114         * support/regression/ports/mcs51-stack-auto/spec.mk: added
12115
12116 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
12117
12118         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
12119
12120 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
12121
12122         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
12123
12124 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
12125
12126         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
12127
12128         * src/SDCCglue.h: add definition for printIvalChar()
12129
12130 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
12131
12132         * src/SDCCast.c: fix #498138 by Johan
12133
12134         * src/SDCCglue.c: fix #498138 by Johan
12135
12136 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
12137
12138         * support/regression/Makefile: fix clean
12139
12140         * support/regression/ports/ds390/support.c: fix transmission of last character
12141
12142 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
12143
12144         * /sdcc/src/ds390/gen.c:
12145         a) improved computing address of stack variable
12146         b) took out some #if 0 code
12147         c) improved parmBytes adjustment
12148         d) improved genPlusIncr & genMinusIncr
12149         e) genCmp could generate bad code (when left assigned to DPTR)
12150         f) Fixed bug in hasInc
12151
12152         * /sdcc/src/ds390/ralloc.c:
12153         a) packRegsForSupport could mess up live information (Fixed)
12154         b) packRegsDPTRuse could be incorrect for left & right shift
12155
12156         * /sdcc/src/mcs51/ralloc.c:
12157         packRegsForSupport could mess up the live information (Fixed)
12158
12159         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
12160
12161         * /sdcc/src/SDCCast.c:
12162         can reverse a loop even if function call is present as long
12163         as the loop control variable is local & is not passed as parameter
12164
12165 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
12166
12167         * /sdcc/ChangeLog: *** empty log message ***
12168
12169         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
12170         More builtin function additions for TININative
12171
12172         * /sdcc/src/ds390/ralloc.c:
12173         Had broken the regression testsuite
12174
12175         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
12176
12177         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
12178         Added funcattr hasStackParms will be set for reentrant functions when there
12179         are paramteres on the stack, this helps in minimizing frame pointer generation
12180         typeFromStr can handle function pointers now
12181
12182         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
12183         *** empty log message ***
12184
12185 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
12186
12187         * /src/ds390/gen.c, /src/ds390/main.c:
12188         More builtin function additions for TININative
12189
12190         * /src/ds390/ralloc.c:
12191         Had broken the regression testsuite
12192
12193         * /src/SDCCast.c: Fixed a bug in dumptree
12194
12195         * /src/SDCCsymt.c, /src/SDCCsymt.h:
12196         Added funcattr hasStackParms will be set for reentrant functions when there
12197         are paramteres on the stack, this helps in minimizing frame pointer generation
12198         typeFromStr can handle function pointers now
12199
12200         * /doc/builtins.txt, /doc/TININative.txt:
12201         *** empty log message ***
12202
12203
12204 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
12205
12206         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
12207         ALPHA version for -mTININative
12208
12209         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
12210         updated to reflect changes in the port structure
12211
12212         * /src/port.h:
12213         added function do_assemble (similar to do_link) if non-null this function
12214         will be called to do assembly (-mTININative) requires a multi command
12215         assembly
12216         added function genAssemblerEnd will be called to generate assembler Epilogue
12217
12218         * /src/SDCCsymt.c:
12219         added _JavaNative to debug info printing
12220
12221         * /src/SDCCmain.c: added option --tini-libid
12222         added port->do_assemble function (-mTININative) has a multi command assemble
12223
12224         * /src/SDCCglue.c: Disabled "constExpr" check
12225         added port->genAssemblerEnd function
12226
12227         * /src/SDCCglobl.h: Added option --tini-libid value
12228
12229         * /src/SDCCast.h:
12230         tookout optimizeCompare from the header (has no external references)
12231
12232         * /src/SDCCast.c: made one more function "static"
12233
12234 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
12235
12236         * src/z80/mappings.i: Added z80asm support.
12237
12238         * src/z80/main.c: Added z80asm support on --asm=z80asm
12239
12240         * src/z80/gen.c: Fixed asm portability issues.
12241
12242         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
12243
12244         * src/SDCCglue.c (printExterns): Added global/extern split.
12245
12246 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
12247
12248         * support/regression/Makefile: added test for mcs51 model large
12249
12250         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
12251
12252         * support/regression/ports/gbz80/spec.mk: added -mgbz80
12253
12254 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
12255
12256         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
12257
12258 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
12259
12260         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
12261
12262         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
12263
12264 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
12265
12266         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
12267
12268         * support/regression/tests/simplefloat.c: Port to mcs51.
12269
12270 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
12271         * support/regression/tests/bug-485362.c: Added.
12272
12273         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
12274
12275         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
12276
12277         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
12278
12279         * src/z80/gen.c (aopDump): Added a dump function.
12280
12281 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
12282         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
12283
12284         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
12285
12286         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
12287
12288         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
12289
12290         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
12291
12292         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
12293
12294         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
12295
12296         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
12297
12298         * support/regression/ports/ds390/support.c: Use tinibios.
12299
12300         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
12301
12302 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
12303
12304         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
12305         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
12306
12307         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
12308
12309         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
12310
12311 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
12312
12313         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
12314
12315         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
12316         (packRegsForIYUse): Created and optimised.
12317
12318 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
12319
12320         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
12321 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
12322
12323         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
12324
12325         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
12326
12327         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
12328
12329 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
12330
12331         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
12332
12333         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
12334
12335 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
12336
12337         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
12338
12339         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
12340
12341         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
12342
12343 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
12344
12345         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
12346         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
12347         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
12348
12349         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
12350
12351         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
12352         (genNotFloat): Added.
12353         (genUminusFloat): Added.
12354
12355         * device/lib/z80/Makefile: Added floating pt stubs.
12356
12357         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
12358
12359         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
12360
12361         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
12362
12363 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
12364
12365         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
12366
12367         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
12368
12369         * sdcc/support/regression/Makefile: Add port ds390.
12370
12371         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
12372
12373         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
12374
12375         * sdcc/support/regression/ports/ds390/spec.mk: Added.
12376
12377         * sdcc/support/regression/ports/ds390/support.c: Added.
12378
12379         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
12380
12381         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
12382
12383         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
12384
12385 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12386
12387         * device/include/malloc.h: Added z80 and gbz80 support.
12388
12389         * device/lib/gbz80/heap.s: Added.
12390
12391         * device/lib/z80/heap.s: Added.
12392
12393         * device/lib/malloc.c: Added z80 and gbz80 support.
12394
12395         * support/regression/tests/malloc.c (testMalloc): Added.
12396
12397         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
12398
12399         * support/regression/tests/bug-478094.c: Added.
12400
12401         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
12402
12403 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
12404
12405         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
12406
12407         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
12408
12409         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
12410
12411         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
12412
12413         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
12414
12415 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12416
12417         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
12418
12419 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
12420
12421         * support/regression/tests/bug-477927.c: Added.
12422
12423         * src/z80/peeph.def: Added minor rules.
12424
12425         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
12426
12427         * src/z80/peeph.def: Added jump optimisation modification.
12428
12429 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
12430
12431         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
12432
12433 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
12434
12435         * support/regression/tests/funptrs.c: Added.
12436
12437 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
12438
12439         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
12440
12441 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
12442
12443         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
12444
12445         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
12446
12447         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
12448         (movLeft2ResultLong): Created.
12449
12450         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
12451         (joinPushes): Added.  Joins two char pushes into a word push.
12452
12453 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
12454
12455         * support/cpp2/Makefile.in (install): Added creation of dest dir.
12456
12457         * support/makebin/Makefile (install): Added creation of dest dir.
12458
12459 2001-10-24 Karl Bongers <karl AT turbobit.com>
12460
12461         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
12462
12463 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
12464
12465         * src/z80/ralloc.c: Turned off faulty pack for one use.
12466
12467         * src/z80/peeph-gbz80.def: Removed redundent restart options.
12468
12469         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
12470
12471 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
12472
12473         * support/regression/Makefile: Improved clean
12474
12475         * support/regression/ports/gbz80/spec.mk: Added clean
12476
12477         * support/regression/ports/host/spec.mk: Added clean
12478
12479         * support/regression/ports/z80/spec.mk: Added clean
12480
12481         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
12482
12483         * support/regression/ports/mcs51/timeout.c: little improvements
12484
12485 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
12486
12487         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
12488
12489         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
12490
12491         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
12492
12493 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
12494
12495         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
12496
12497         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
12498
12499 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
12500         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
12501
12502         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
12503
12504         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
12505
12506         * src/mcs51/main.c (_linkCmd): Added bin path to command.
12507
12508         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
12509
12510         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
12511
12512         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
12513
12514         * support/regression/tests/longor.c: Added.
12515
12516 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
12517
12518         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
12519
12520         * as/mcs51/aslink.h: define PATH_MAX
12521
12522         * as/mcs51/asm.h: define PATH_MAX
12523
12524         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
12525
12526         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
12527
12528         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
12529
12530         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
12531
12532         * src/SDCCglobl.h: define PATH_MAX
12533
12534         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
12535
12536         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
12537
12538 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
12539
12540         * src/z80/gen.c (gencjneshort): Fixed
12541
12542         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
12543
12544 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
12545
12546         * support/regression/tests/bug-469671.c: Added.
12547
12548         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
12549
12550 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
12551
12552         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
12553
12554         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
12555
12556 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
12557
12558         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
12559
12560         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
12561
12562         * src/device/lib/_mullong.c : removed hint: nooverlay bug
12563
12564         * src/device/lib/_divuint.c : removed hint: nooverlay bug
12565
12566         * src/device/lib/_divulong.c: removed hint: nooverlay bug
12567
12568         * src/device/lib/_moduint.c : removed hint: nooverlay bug
12569
12570         * src/device/lib/_modulong.c: removed hint: nooverlay bug
12571
12572 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
12573
12574         * 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.
12575
12576         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
12577
12578         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
12579
12580 2001-10-07    <johan AT FRIJA>
12581
12582         * device/lib/gets.c (gets): fixed the return value.
12583
12584 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
12585         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
12586
12587         * 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.
12588
12589         * 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.
12590
12591         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
12592
12593         * src/pic/gen.c: Removed Safe_strdup.
12594
12595         * configure.in: Added option to enable libgc support.
12596
12597         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
12598         (bitVectUnion): Optimised.
12599         (bitVectIntersect): Optimised.
12600         (bitVectBitsInCommon): Optimised.
12601         (bitVectCplAnd): Optimised.
12602
12603         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
12604
12605 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12606
12607         * src/SDCCmain.c: distinguish between assembler debug and plain options
12608
12609         * src/avr/main.c:   remove standard assembler options
12610
12611         * src/ds390/main.c: remove standard assembler options
12612
12613         * src/mcs51/main.c: remove standard assembler options
12614
12615         * src/port.h: removed "PENDING" comment
12616
12617 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12618
12619         * src/device/lib/_mulint.c  : new, with assember functions
12620
12621         * src/device/lib/_mullong.c : new, with assember functions
12622
12623         * src/device/lib/_divuint.c : with assember functions
12624
12625         * src/device/lib/_divsint.c : with assember functions
12626
12627         * src/device/lib/_divulong.c: with assember functions
12628
12629         * src/device/lib/_divslong.c: with assember functions
12630
12631         * src/device/lib/_moduint.c : with assember functions
12632
12633         * src/device/lib/_modsint.c : with assember functions
12634
12635         * src/device/lib/_modulong.c: with assember functions
12636
12637         * src/device/lib/_modslong.c: with assember functions
12638
12639         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
12640
12641         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
12642
12643         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
12644                                       replaced _mululong.c and _mulslong.c by _mullong.c
12645
12646 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12647
12648         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
12649
12650 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12651
12652         * src/SDCCglue.c: test, if win32api is available for MINGW
12653
12654 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12655
12656         * src/SDCCsymt.c: no more _modifier in printTypeChain()
12657         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
12658         * support/regression/ports/gbz80/spec.mk: removed GENERIC
12659         * support/regression/ports/host/spec.mk: removed GENERIC
12660         * support/regression/ports/mcs51/spec.mk: removed GENERIC
12661         * support/regression/ports/z80/spec.mk: removed GENERIC
12662
12663 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
12664
12665         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
12666
12667         * support/regression/tests/bug-467035.c: Created.
12668
12669 2001-10-01    <johan AT FRIJA>
12670
12671         * src/SDCC.y: fixed bug #466586 part 1
12672
12673 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
12674
12675         * SDCCicode.c: z80 has no generic pointers
12676         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
12677
12678 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
12679
12680         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
12681
12682 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
12683
12684         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
12685
12686         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
12687
12688 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
12689
12690         * configure.in: Fixed up so that ucsim is only configured once.
12691
12692         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
12693
12694         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
12695         (getPathDifference): As above.
12696
12697         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
12698
12699         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
12700
12701 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
12702         * .version: Updated to 2.3.1
12703
12704         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
12705         Added copyright header.
12706
12707         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
12708         (assemble): Added support for macro based assembler commands.
12709         (linkEdit): Added support for macro based linker commands.
12710         (preProcess): Changed the pre-processor to use macros.
12711         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
12712         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
12713
12714         * device/lib/z80/crt0.s: Added module name for debugging.
12715
12716 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
12717
12718         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12719
12720         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
12721
12722         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
12723
12724         * src/Makefile.in: Added SDCCmacro and SDCCutil
12725
12726 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
12727
12728         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12729
12730 2001-09-16    <johan AT FRIJA>
12731
12732         * 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.
12733
12734 2001-09-15    <johan AT FRIJA>
12735
12736         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
12737         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
12738
12739 2001-09-11    <johan AT FRIJA>
12740
12741         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
12742
12743 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
12744
12745         * support/regression/tests/bug-460444.c: Added test case.
12746
12747         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
12748         (genCast): Added justification for all of the asserts.
12749
12750 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
12751
12752         * support/regression/support.c: _xdata replaced by xdata
12753
12754         * support/regression/spec.mk: removed _generic
12755
12756 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
12757
12758         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
12759
12760         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
12761         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
12762
12763         * src/z80/peeph.def: Added a rule to optimise shift then compare.
12764
12765         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
12766
12767         * support/regression/tests/bug-460010.c: Added test case.
12768
12769         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
12770
12771 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
12772
12773         * support/regression/Makefile: inter-port-clean adjusted for mcs51
12774
12775         * support/regression/testfwk.c: removed workaround for bug #436344
12776
12777         * support/regression/tests/bp.c: use less memory with mcs51
12778
12779         * support/regression/tests/bug-441448.c: use less memory
12780
12781         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
12782
12783         * support/regression/collate-results.py: typo
12784
12785 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
12786
12787         * support/regression/tests/fetchoverlap.c: Added new test case.
12788
12789         * support/regression/tests/bp.c: Added new test case.
12790
12791         * support/regression/tests/bug-448984.c: Added new test case.
12792
12793         * support/regression/tests/pow2shifts.c: Added new test case.
12794
12795         * src/z80/gen.c: Turned off the noise it normally generates for the release.
12796         (genlshTwo): Fixed right shift for count > 8.
12797
12798         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
12799
12800 2001-09-08    <johan AT FRIJA>
12801
12802         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
12803
12804 2001-09-07    <johan AT FRIJA>
12805
12806         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
12807
12808         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
12809
12810 2001-09-06    <johan AT FRIJA>
12811
12812         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
12813         * bernhard noted me at this: "() equals to (void)" (1.38)
12814
12815 2001-09-05    <johan AT FRIJA>
12816
12817         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
12818
12819 2001-09-04    <johan AT FRIJA>
12820
12821         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
12822
12823
12824 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
12825
12826         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
12827
12828 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
12829
12830         * link/z80/aslink.h: Fixed path for PATH_MAX
12831
12832 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
12833
12834         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
12835
12836         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
12837
12838         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
12839
12840         * 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.
12841
12842 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
12843
12844         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
12845         (genCmp): Fixed up genCmp for the GB with longs.
12846
12847         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
12848
12849         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
12850
12851         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
12852
12853         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
12854
12855 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
12856
12857         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
12858
12859 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
12860
12861         * 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.
12862
12863         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
12864
12865 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
12866
12867         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
12868
12869         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
12870
12871 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
12872
12873   * sim/ucsim/configure:    little improvement of Cygwin-detection
12874   * sim/ucsim/configure.in: little improvement of Cygwin-detection
12875   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
12876   * support/regression/tests/bug-221100.c: small changes for mcs51
12877   * support/regression/tests/bug-221168.c: small changes for mcs51
12878   * support/regression/tests/bug-227710.c: small changes for mcs51
12879   * support/regression/tests/staticinit.c: small changes for mcs51
12880   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
12881   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12882   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12883
12884 $Revision$