* src/hc08/gen.c (genPcall): fix for bug #1601032
[fw/sdcc] / ChangeLog
1 2006-11-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2
3         * src/hc08/gen.c (genPcall): fix for bug #1601032
4
5 2006-11-23 Maarten Brock <sourceforge.brock AT dse.nl>
6
7         * device/include/mcs51/c8051f000.h, device/include/mcs51/C8051F000.h,
8         * device/include/mcs51/c8051f018.h, device/include/mcs51/C8051F018.h,
9         * device/include/mcs51/c8051f020.h, device/include/mcs51/C8051F020.h,
10         * device/include/mcs51/c8051f040.h, device/include/mcs51/C8051F040.h,
11         * device/include/mcs51/c8051f060.h, device/include/mcs51/C8051F060.h,
12         * device/include/mcs51/c8051f120.h, device/include/mcs51/C8051F120.h,
13         * device/include/mcs51/c8051f200.h, device/include/mcs51/C8051F200.h,
14         * device/include/mcs51/c8051f300.h, device/include/mcs51/C8051F300.h,
15         * device/include/mcs51/c8051f310.h, device/include/mcs51/C8051F310.h,
16         * device/include/mcs51/c8051f320.h, device/include/mcs51/C8051F320.h,
17         * device/include/mcs51/c8051f326.h, device/include/mcs51/C8051F326.h,
18         * device/include/mcs51/c8051f330.h, device/include/mcs51/C8051F330.h,
19         * device/include/mcs51/c8051f340.h, device/include/mcs51/C8051F340.h,
20         * device/include/mcs51/c8051f350.h, device/include/mcs51/C8051F350.h,
21         * device/include/mcs51/c8051f410.h, device/include/mcs51/C8051F410.h:
22           Renamed to all upper case as per the standard set by SiLabs
23
24 2006-11-23 Maarten Brock <sourceforge.brock AT dse.nl>
25
26         * device/include/mcs51/C8051F520.h: new, added
27         * device/include/mcs51/compiler.h: added link about predefined macros
28
29 2006-11-23 Raphael Neider <rneider AT web.de>
30
31         * src/regression/Makefile: add -L path to fresh library
32         * src/regression/simulate: emphasize FAILED output
33         * src/regression/create_stc: output _failures from gpsim
34         * src/regression/compare4.c,
35         * src/regression/rotate6.c: fixed char literals,
36           all compile, all run =8-D
37
38         * src/pic/pcode.h: added isPCASMDIR macro
39         * src/pic/gen.c (genAnd): fixed bit offset
40         * src/pic/ralloc.c (allocNewDirReg,allocDirReg,allocRegByName,
41           packBits): unified register numbering schemes,
42           (newReg): do not insert stack registers into hash table,
43           (initStack): unpinned pseudo stack, simplified,
44           (typeRegWithIdx): fixed retrieval of stack registers,
45         * src/pic/pcode.c (addpCodeComment,sameBank): added,
46           (pCodeReplace): removed invalid assertion,
47           (insertPCodeInstruction): fixed newly added labels,
48           (insertBankSwitch,BankSelect,IsBankChange,DoBankSelect,
49           FixRegisterBankingInFlow,compareBankFlow,FixBankFlow,
50           DumpFlow): removed unsed (broken?) code,
51           (insertBankSel): prevent STATUS from being BANKSELed,
52           (FixRegisterBanking): rewritten from scratch, implemented generic
53             optimizations (suppress BANKSELs to same register and to registers
54             present in all banks),
55           (AnalyzeBanking): update flow after BANKSELection
56
57         * src/pic/glue.c (pic14_constructAbsMap): emit pseudo stack in
58             sharebank, let linker place it, mark STKxx symbols as emitted
59
60 2006-11-21 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
61
62         * src/regression/arrays.c,
63         * src/regression/bank1.c,
64         * src/regression/bool2.c,
65         * src/regression/compare7.c,
66         * src/regression/compare8.c,
67         * src/regression/compare9.c,
68         * src/regression/compare10.c,
69         * src/regression/configword.c,
70         * src/regression/for.c,
71         * src/regression/mult1.c,
72         * src/regression/pointer1.c,
73         * src/regression/rotate6.c,
74         * src/regression/string1.c,
75         * src/regression/struct1.c,
76         * src/regression/Makefile: make PIC14 regression tests run again
77           (3 fail, 6 won't compile)
78
79 2006-11-21 Raphael Neider <rneider AT web.de>
80
81         * device/include/pic16/pic18f4550.h,
82         * device/include/pic16/pic18f4455.h,
83         * device/lib/pic16/libdev/pic18f4550.c,
84         * device/lib/pic16/libdev/pic18f4455.c: fixed #1578591 and #1595144
85         * configure.in: removed superfluous closing bracket
86
87 2006-11-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
88
89         * device/lib/expf.c: Fixed bug 1599523: result of expf(x) is
90           always positive.
91
92 2006-11-21 Raphael Neider <rneider AT web.de>
93
94         * src/pic/device.{c,h}: added pic14_getPIC()
95         * src/pic/gen.c (continueIfTrue,jumpIfTrue): added PIC code,
96           (genAnd): added PIC code for one case, fixes #1597044
97         * src/pic/pcode.c (BankSelect): Ohoh, added generic optimization for
98           SFRs that are present in all banks (e.g., STATUS)
99
100 2006-11-20 Raphael Neider <rneider AT web.de>
101
102         * src/pic/pcode.c: changed inverted ops for DECFSZ/DECFSZW and
103           INCFSZ/INCFSZW and declared them as changing Z bit,
104           (insertPCodeInstruction): correctly invert the above instructions,
105           fixes #1599333,
106           (DoBankSelect): don't panic on po_immediates
107
108 2006-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
109
110         * as/link/aslink.h,
111         * as/link/mcs51/lkihx.c (newArea),
112         * as/link/mcs51/lkrloc.c: renamed newArea() to ihxNewArea()
113         * as/link/mcs51/lkihx.c (ihx): output reset vector as start address
114
115 2006-11-11 Raphael Neider <rneider AT web.de>
116
117         * src/pic/pcode.c (newpCodeOpBit): search SymbolTab for referenced
118           bitfield symbols, fixes #1579535 (once more...).
119
120 2006-11-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
121
122         * support/regression/generate-cases.py,
123         * support/regression/fwk/include/testfwk.h,
124         * support/regression/fwk/lib/testfwk.c: used code pointers,
125           (about 50kByte less code generated for mcs51)
126
127 2006-11-06 Borut Razem <borut.razem AT siol.net>
128
129         * debugger/mcs51/acinclude.m4, debugger/mcs51/aclocal.m4,
130           debugger/mcs51/configure: fixed failed check because the function
131           rl_function_of_keyseq isn't in Readline 5.2. Thanks to Ilya Goldberg
132           who submitted the patch for gpsim.
133         * debugger/mcs51/configure.in: removed the result message
134         * debugger/mcs51/Makefile.in: fixed the config.status warning
135           "... seems to ignore the --datarootdir setting"
136
137 2006-11-03 Maarten Brock <sourceforge.brock AT dse.nl>
138
139         * device/include/mcs51/c8051f020.h,
140         * device/include/mcs51/c8051f040.h,
141         * device/include/mcs51/c8051f060.h,
142         * device/include/mcs51/c8051f120.h: added PS0, fixed bug 1589279
143         * src/z80/gen.c (gencjneshort),
144         * src/z80/peeph.def: applied patch 1571373, thanks Philipp Krause
145
146 2006-10-31 Borut Razem <borut.razem AT siol.net>
147
148         * debugger/mcs51/acinclude.m4, debugger/mcs51/aclocal.m4,
149           debugger/mcs51/configure: get readline version
150
151 2006-10-30 Borut Razem <borut.razem AT siol.net>
152
153         * debugger/mcs51/sdcdb.c: replaced hardcoded "/" with DIR_SEPARATOR_STRING
154         * debugger/mcs51/acinclude.m4, debugger/mcs51/aclocal.m4,
155           debugger/mcs51/configure: locate readline even when cross compiling
156         * support/scripts/sdcc.nsi: include readline5.dll into the setup package
157
158 2006-10-29 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
159
160         * device/include/mcs51/serial_IO.h: putchar() and getchar() using
161           serial port.
162
163 2006-10-29 Maarten Brock <sourceforge.brock AT dse.nl>
164
165         * device/include/malloc.h,
166         * device/lib/calloc.c,
167         * device/lib/free.c,
168         * device/lib/malloc.c,
169         * device/lib/realloc.c: moved definition of struct into sources
170         * support/regression/tests/malloc.c: use void* for init_dynamic_memory()
171
172 2006-10-29 Maarten Brock <sourceforge.brock AT dse.nl>
173
174         * as/asx8051.dsp: corrected output directories
175         * as/link/hc08: new directory for hc08 linker
176         * as/hc08/aslink.h,             as/link/aslink.h,
177         * as/hc08/aslink.mak,           as/link/hc08/aslink.mak,
178         * as/hc08/clean.mk,             as/link/hc08/clean.mk,
179         * as/hc08/link_hc08.dsp,        as/link/hc08/link_hc08.dsp,
180         * as/hc08/lkaomf51.c,           as/link/hc08/lkaomf51.c,
181         * as/hc08/lkarea.c,             as/link/hc08/lkarea.c,
182         * as/hc08/lkdata.c,             as/link/hc08/lkdata.c,
183         * as/hc08/lkelf.c,              as/link/hc08/lkelf.c,
184         * as/hc08/lkihx.c,              as/link/hc08/lkihx.c,
185         * as/hc08/lklibr.c,             as/link/hc08/lklibr.c,
186         * as/hc08/lkmain.c,             as/link/hc08/lkmain.c,
187         * as/hc08/lkmem.c,              as/link/hc08/lkmem.c,
188         * as/hc08/lkrloc.c,             as/link/hc08/lkrloc.c,
189         * as/hc08/lks19.c,              as/link/hc08/lks19.c,
190         * as/hc08/Makefile.aslink,      as/link/hc08/Makefile.aslink,
191         * as/hc08/Makefile.bcc,         as/link/hc08/Makefile.bcc,
192         * as/hc08/Makefile.in,          as/link/hc08/Makefile.in,
193         * as/link/hc08/conf.mk,
194         * configure,
195         * configure.in,
196         * Makefile.in,
197         * sdcc.dsw: moved hc08 linker to as/link/hc08
198         * as/hc08/lkeval.c,     as/link/mcs51/lkeval.c,     as/link/lkeval.c,
199         * as/hc08/lkhead.c,     as/link/mcs51/lkhead.c,     as/link/lkhead.c,
200         * as/hc08/lklex.c,      as/link/mcs51/lklex.c,      as/link/lklex.c,
201         * as/hc08/lklist.c,     as/link/mcs51/lklist.c,     as/link/lklist.c,
202         * as/hc08/lknoice.c,    as/link/mcs51/lknoice.c,    as/link/lknoice.c,
203         * as/hc08/lksym.c,      as/link/mcs51/lksym.c,      as/link/lksym.c,
204         * as/link/mcs51/aslink.dsp,
205         * as/link/mcs51/Makefile.in: factored out the common files
206         * as/hc08/lkstore.c: deleted, use the one already in as/link/
207         * as/clean.mk: extra cleaning common files
208         * as/link/mcs51/strcmpi.c,      as/strcmpi.c: moved
209         * as/link/mcs51/strcmpi.h: deleted, moved protoype to aslink.h
210         * as/mcs51/asm.h: include sdccconf.h or sdcc_vc.h
211
212 2006-10-29 Raphael Neider <rneider AT web.de>
213
214         * src/pic/ralloc.c (newReg): create aliases for registers with
215           multiple names to fix #1579535 and #1584001,
216           (regWithIdx,dirregWithName): resolve aliases on lookup
217         * src/pic/pcode.c (DoBankSelect): die with error message on failing
218           bankselect
219         * device/lib/pic/libdev/Makefile.in: move pseudo stack down to 0x4f
220           to prevent build errors on small devices
221
222 2006-10-28 Raphael Neider <rneider AT web.de>
223
224         * src/pic/gen.c (genFunction,genCall): drop "same code page"
225           assumption within interrupt handlers, fixes #1584940
226         * src/pic/glue.c (pic14_constructAbsMap): mark absolute symbols as
227           "emitted" to avoid emitting them again in udata
228
229 2006-10-27 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
230
231         * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c:
232         Removed.
233
234 2006-10-26 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
235
236         * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c:
237         Initialize uart only if SM0 and SM1 are zero.  Also, use flag to turn
238         on/off CR to CRLF conversion.
239
240 2006-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
241
242         * doc/sdccman.lyx: updated IRQ section
243
244 2006-10-24 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
245
246         * device/lib/serial_io.c: removed
247         * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c
248         replacements for serial_io.c
249
250 2006-10-24 Maarten Brock <sourceforge.brock AT dse.nl>
251
252         * src/z80/main.c (_process_pragma, _parseOptions): fixed bug 1583318
253
254 2006-10-24 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
255
256         * device/lib/serial_io.c: Default putchar() and getchar() for
257           mcs51 uses serial port.
258
259 2006-10-23 Maarten Brock <sourceforge.brock AT dse.nl>
260
261         * src/mcs51/gen.c (movc): improved check for 0 and 1, see RFE 1582704
262
263 2006-10-23 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
264
265         * support/regression/ports/mcs51/support.c: smaller
266         _sdcc_external_startup()
267         * device/lib/mcs51/crtxclear.asm: don't check high byte of l_PSEG
268
269 2006-10-20 Maarten Brock <sourceforge.brock AT dse.nl>
270
271         * device/lib/gbz80/crt0.s,
272         * device/lib/gbz80/crt0_rle.s,
273         * device/lib/gbz80/div.s,
274         * device/lib/gbz80/fstubs.s,
275         * device/lib/gbz80/heap.s,
276         * device/lib/gbz80/mul.s,
277         * device/lib/gbz80/putchar.s,
278         * device/lib/gbz80/stubs.s,
279         * device/lib/z80/crt0.s,
280         * device/lib/z80/crt0_rle.s,
281         * device/lib/z80/div.s,
282         * device/lib/z80/fstubs.s,
283         * device/lib/z80/heap.s,
284         * device/lib/z80/mul.s,
285         * device/lib/z80/putchar.s,
286         * device/lib/z80/stubs.s: reverted, I was mistaken
287
288 2006-10-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
289
290         * src/mcs51/peeph.def: peephole 238.x added check for notvolatile
291         * support/regression/ports/mcs51/support.c: removed race
292         condition on TI in _putchar allowing to use serial port mode 0
293
294 2006-10-20 Borut Razem <borut.razem AT siol.net>
295
296         * debugger/mcs51/sdcdb.c: replaced isblank() with isspace()
297
298 2006-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
299
300         * device/lib/gbz80/crt0.s,
301         * device/lib/gbz80/crt0_rle.s,
302         * device/lib/gbz80/div.s,
303         * device/lib/gbz80/fstubs.s,
304         * device/lib/gbz80/heap.s,
305         * device/lib/gbz80/mul.s,
306         * device/lib/gbz80/putchar.s,
307         * device/lib/gbz80/stubs.s,
308         * device/lib/z80/crt0.s,
309         * device/lib/z80/crt0_rle.s,
310         * device/lib/z80/div.s,
311         * device/lib/z80/fstubs.s,
312         * device/lib/z80/heap.s,
313         * device/lib/z80/mul.s,
314         * device/lib/z80/putchar.s,
315         * device/lib/z80/stubs.s: removed all leading underscores from area names
316
317 2006-10-17 Maarten Brock <sourceforge.brock AT dse.nl>
318
319         * support/regression/ports/mcs51/support.c: use highest baudrate so the
320           regression tests are not waiting in the simulator for simulated
321           transmission of debug output
322
323 2006-10-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
324
325         * device/lib/printf_large.c: slightly smaller
326         * doc/sdccman.lyx: do not use spaces within html links
327
328 2006-10-16 Borut Razem <borut.razem AT siol.net>
329
330         * configure.in, configure, sdccconf_in.h, src/SDCCglobal,
331           debugger/mcs51/Makefile.in, debugger/mcs51/sdcdb.[ch],
332           debugger/mcs51/aclocal.m4, debugger/mcs51/acinclide.m4,
333           debugger/mcs51/config.h.in, debugger/mcs51/configure.in,
334           debugger/mcs51/configure:
335           [ 1185668 ] add gnu readline support to sdcdb - enabled
336
337 2006-10-16 Raphael Neider <rneider AT web.de>
338
339         * src/pic/pcode.c (BankSelect): another fix on (partial) BANKSELs,
340           fixes #1577882, removes close to all banking optimizations
341
342 2006-10-15 Maarten Brock <sourceforge.brock AT dse.nl>
343
344         * src/SDCCsymt.c (checkSClass): no error for uninitialised absolute
345           variables in code memory
346         * support/regression/tests/absolute.c: added test for this
347
348 2006-10-15 Raphael Neider <rneider AT web.de>
349
350         * src/pic/pcode.c (InsertBankSel): suppress BANKSELs for one bank
351           devices,
352           (BankSelect): emit BANKSEL before touching linker-placed regs,
353           fixes #1570934
354
355 2006-10-10 Raphael Neider <rneider AT web.de>
356
357         * src/SDCCmain.c (optionsTable): accept --stack-size for PICs,
358         * src/pic/device.c (pic14_getSharebankSize,pic14_getSharebankAddress),
359         * src/pic/main.c (_pic14_parseOptions),
360         * src/pic/main.h: mostly reverted to previous state, now use results
361             from SDCCmain.c's argument parsing
362
363 2006-10-10 Borut Razem <borut.razem AT siol.net>
364
365         * debugger/mcs51/break.[ch], debugger/mcs51/cmd.c,
366           debugger/mcs51/sdcdb.[ch], debugger/mcs51/simi.c:
367           [ 1185668 ] add gnu readline support to sdcdb -
368           prepared for READLINE, not enabled yet,
369           thanks to <tal.bav AT gmail.com>
370
371 2006-10-10 Raphael Neider <rneider AT web.de>
372
373         * src/pic16/pcode.c (pic16_pCode2str): use isACCESS_BANK macro
374         * src/pic16/devices.inc,
375         * device/include/pic16 (pic18f[24]620.h),
376         * device/include/pic18fregs.h,
377         * device/lib/pic16/pics.all,
378         * device/lib/pic16/libdev/pic18f[24]{620,525}.c): added support for
379             18f2620, 18f4620, 18f2525, and 18f4525 devices, thanks to
380             Gary Plumbridge and Anton Strobl
381
382 2006-10-10 Raphael Neider <rneider AT web.de>
383
384         * src/pic/main.c (_pic14_parseOptions): added --stack-loc=NUM and
385           --stack-siz=NUM options to configure the argument passing stack
386         * src/pic/main.h: added stackLocation and stackSize to pic14_options_t
387         * src/pic/device.c (mapRegister): catch out-of-memory SIGSEGVs,
388           (pic14_getSharebankSize): obey --stack-siz=NUM,
389           (pic14_getSharebankAddress): obey --stack-loc=NUM
390
391 2006-10-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
392
393         * doc/sdccman.lyx: added to the manual
394         * doc/figures/ddd_example.png: added (neither pdflatex nor
395         most browsers seem to like the .eps file)
396
397 2006-10-06 Bernhard Held <bernhard AT bernhardheld.de>
398
399         * src/SDCCglue.c (tempfileandname): changed un*x tmp search paths
400         to /tmp and /var/tmp acc. LSB
401         * src/SDCCast.c (addCast): Fixed bug 1571231: promote in case of
402         RESULT_TYPE_IFX
403         * support/regression/tests/onebyte.c: added test
404
405 2006-10-05 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
406
407         * src/mcs51/gen.c: emitcode for "add a,0x%02x" requires only 8 bits.
408
409 2006-10-05 Borut Razem <borut.razem AT siol.net>
410
411         * partially fixed [ 1570701 ] peephole - not replacing code from multiline macros,
412           thanks to dfulab:
413           - sdcc.dsw: changed property eol-style to CRLF
414           - support/scripts/resource.rc: replaced references to "afxres.h" with "winres.h"
415
416 2006-10-04 Raphael Neider <rneider AT web.de>
417
418         * device/include/pic/{pic16f84.h,pic16f84a.h},
419         * device/lib/pic/libdev/{pic16f84.c,pic16f84a.c}: added PORT[AB]_bits
420           from patch #1522504, thanks to Robas Teodor
421
422 2006-10-02 Maarten Brock <sourceforge.brock AT dse.nl>
423
424         * as/link/z80/lkarea.c: essentially reverted lnksect() to #4380 which
425           fixes bug 1566015
426
427 2006-10-01 Maarten Brock <sourceforge.brock AT dse.nl>
428
429         * src/pic16/glue.c (pic16emitMaps),
430         * src/pic/glue.c (pic14emitMaps): hopefully fixed bug 1568779
431         * device/lib/gets.c: fixed bug 1568829,thanks Philipp Krause
432         * device/lib/pic16/libc/string/memcpypgm2ram.c,
433         * device/lib/pic16/libc/string/memcpyram2ram.c: fixed bug 1568836, thanks
434           Philipp Krause
435         * as/mcs51/asmain.c (asmbl, newdot): fixed problems with absolute areas
436         * as/link/mcs51/lkmem.c (summary2): reverted, do do count abs segments
437
438 2006-09-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
439
440         * support/librarian/sdcclib.c: Added option -l.
441         * as/link/mcs51/lkmem.c: don't use absolute segments to compute memory
442           usage totals.
443         * device/lib/make51lib.bat: added.  Allows building mcs51 libraries easily
444           using Windows command prompt.
445
446 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
447
448         * device/lib/libsdcc.lib: added module rand
449         * src/ds390/ralloc.c (rematStr),
450         * src/hc08/ralloc.c (rematStr),
451         * src/mcs51/ralloc.c (rematStr),
452         * src/z80/ralloc.c (rematStr): made output more consistent
453         * src/mcs51/gen.c: cosmetic changes
454
455 2006-09-30 Maarten Brock <sourceforge.brock AT dse.nl>
456
457         * src/port.h: added mem.cabs_name to PORT
458         * src/ds390/main.c,
459         * src/hc08/main.c,
460         * src/mcs51/main.c,
461         * src/pic16/main.c,
462         * src/pic/main.c,
463         * src/xa51/main.c,
464         * src/z80/main.c: added cabs_name initializers
465         * src/SDCCglue.c (emitStaticSeg): allocate and initialize absolute
466           constants
467           (emitMaps): emit absolutes in code memory into cabs_name
468         * src/SDCCmem.c,
469         * src/SDCCmem.h: added memory map c_abs and defined CABS_NAME
470         * src/ds390/gen.c (genCodePointerGet): fixed bug if left is a literal
471         * support/regression/fwk/include/testfwk.h: added define for at
472         * support/regression/tests/absolute.c: added, new
473
474 2006-09-29 Maarten Brock <sourceforge.brock AT dse.nl>
475
476         * src/mcs51/gen.c (genPlusIncr, genMinusDec, genAddrOf): small
477           optimizations, see also patch 887161 by Stas Sergeev
478         * src/mcs51/peeph.def(104, 207, 209, 212): disabled as they do not seem
479           to be necessary anymore,
480           (102, 103, 104, 127): renamed all occurances of bp to _bp
481
482 2006-09-27 Maarten Brock <sourceforge.brock AT dse.nl>
483
484         * device/include/mcs51/at89c51snd1c.h: fixed MSK_SREQ definition
485           thanks Weston T. Schmidt for patch 1555221
486         * src/mcs51/peeph.def: renamed rule 257 to 257.a, added 257.b
487         * src/SDCCicode.c(geniCodeMultiply): small optimization
488
489 2006-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
490
491         * device/include/stdlib.h: added rand prototypes
492         * device/lib/rand.c: new, added
493         * device/lib/Makefile.in: added rand.c
494         * src/z80/peeph.def,
495         * src/z80/peeph-gbz80.def,
496         * src/z80/peeph-z80.def: updated conditonals, fixed bug 1565908
497
498 2006-09-20 Raphael Neider <rneider AT web.de>
499
500         * device/lib/pic16/libio/i2c/i2cnack.c (i2c_nack): fixed ACKDT bit
501
502 2006-09-19 Maarten Brock <sourceforge.brock AT dse.nl>
503
504         * as/link/aslink.h: cosmetic changes
505         * as/link/mcs51/Makefile.in,
506         * as/link/z80/Makefile.in: fixed build on CF where VPATH is used
507
508 2006-09-17 Maarten Brock <sourceforge.brock AT dse.nl>
509
510         * as/link/aslink.h,
511         * as/link/mcs51/aslink.h,
512         * as/link/z80/aslink.h: merged and moved to as/link/
513         * as/link/lkstore.c,
514         * as/link/mcs51/lkstore.c: moved to as/link/
515         * as/link/clean.mk: remove *.o
516         * as/link/mcs51/alloc.h: deleted
517         * as/link/mcs51/lkarea.c: added lnksect prototype
518         * as/link/mcs51/lkdata.c,
519         * as/link/mcs51/lklex.c,
520         * as/link/mcs51/lkmain.c: renamed as_getline to lk_getline
521         * as/link/mcs51/lkmem.c,
522         * as/link/mcs51/lknoice.c: removed include strcmpi.h
523         * as/link/mcs51/lksym.c: include stdlib.h instead of malloc.h or alloc.h
524         * as/link/mcs51/aslink.dsp,
525         * as/link/mcs51/Makefile.aslink,
526         * as/link/mcs51/Makefile.bcc,
527         * as/link/mcs51/Makefile.in: updated for moved files
528         * as/link/z80/lkarea.c,
529         * as/link/z80/lkhead.c,
530         * as/link/z80/lklex.c,
531         * as/link/z80/lklibr.c,
532         * as/link/z80/lklist.c,
533         * as/link/z80/lkmain.c,
534         * as/link/z80/lkrloc.c,
535         * as/link/z80/lksym.c: synced with mcs51
536         * as/link/z80/lkdata.c,
537         * as/link/z80/lkeval.c,
538         * as/link/z80/lkihx.c,
539         * as/link/z80/lks19.c: cosmetic changes
540         * as/link/z80/Makefile.in,
541         * as/link/z80/linkgbz80.dsp,
542         * as/link/z80/linkz80.dsp: updated for moved files
543
544 2006-09-16 Borut Razem <borut.razem AT siol.net>
545
546         * debugger/mcs51/sdcdb.c: partially fixed
547           [ 1203664 ] sdcdb fails to open files w. two "." periods
548         * debugger/mcs51/simi.c, debugger/mcs51/symtab.c,
549           debugger/mcs51/symtab.h: fixed indenting
550         * configure.in, configure: up to date with latest Maarten's changes
551
552 2006-09-15 Maarten Brock <sourceforge.brock AT dse.nl>
553
554         as/link/mcs51
555         as/aslink.dsp,                  as/link/mcs51/aslink.dsp,
556         as/link/mcs51/aslink.h,         as/mcs51/aslink.h,
557         as/link/mcs51/aslink.mak,       as/mcs51/aslink.mak,
558         as/link/mcs51/lkaomf51.c,       as/mcs51/lkaomf51.c,
559         as/link/mcs51/lkarea.c,         as/mcs51/lkarea.c,
560         as/link/mcs51/lkdata.c,         as/mcs51/lkdata.c,
561         as/link/mcs51/lkeval.c,         as/mcs51/lkeval.c,
562         as/link/mcs51/lkhead.c,         as/mcs51/lkhead.c,
563         as/link/mcs51/lkihx.c,          as/mcs51/lkihx.c,
564         as/link/mcs51/lklex.c,          as/mcs51/lklex.c,
565         as/link/mcs51/lklibr.c,         as/mcs51/lklibr.c,
566         as/link/mcs51/lklist.c,         as/mcs51/lklist.c,
567         as/link/mcs51/lkmain.c,         as/mcs51/lkmain.c,
568         as/link/mcs51/lkmem.c,          as/mcs51/lkmem.c,
569         as/link/mcs51/lknoice.c,        as/mcs51/lknoice.c,
570         as/link/mcs51/lkrloc.c,         as/mcs51/lkrloc.c,
571         as/link/mcs51/lks19.c,          as/mcs51/lks19.c,
572         as/link/mcs51/lkstore.c,        as/mcs51/lkstore.c,
573         as/link/mcs51/lksym.c,          as/mcs51/lksym.c,
574         as/link/mcs51/Makefile.aslink,  as/mcs51/Makefile.aslink,
575         as/link/mcs51/alloc.h,
576         as/link/mcs51/clean.mk,
577         as/link/mcs51/conf.mk,
578         as/link/mcs51/Makefile.bcc,
579         as/link/mcs51/Makefile.in,
580         as/link/mcs51/readme.390,
581         as/link/mcs51/strcmpi.c,
582         as/link/mcs51/strcmpi.h,
583         as/mcs51/clean.mk,
584         as/mcs51/Makefile.bcc,
585         as/mcs51/Makefile.in,
586         configure,
587         Makefile.in,
588         sdcc.dsw: moved mcs51 linker to as/link/mcs51
589
590 2006-09-14 Maarten Brock <sourceforge.brock AT dse.nl>
591
592         * as/link,
593         * as/link/Makefile.in,
594         * as/link/z80/linkgbz80.dsp,
595         * as/link/z80/linkz80.dsp,
596         * configure,
597         * link,
598         * link/clean.mk,
599         * link/Makefile.in,
600         * link/README,
601         * link/z80,
602         * link/z80/aslink.h,
603         * link/z80/clean.mk,
604         * link/z80/conf.mk,
605         * link/z80/linkgbz80.dsp,
606         * link/z80/linkz80.dsp,
607         * link/z80/lkarea.c,
608         * link/z80/lkdata.c,
609         * link/z80/lkeval.c,
610         * link/z80/lkgb.c,
611         * link/z80/lkgg.c,
612         * link/z80/lkhead.c,
613         * link/z80/lkihx.c,
614         * link/z80/lklex.c,
615         * link/z80/lklibr.c,
616         * link/z80/lklist.c,
617         * link/z80/lkmain.c,
618         * link/z80/lkrloc.c,
619         * link/z80/lks19.c,
620         * link/z80/lksym.c,
621         * link/z80/Makefile.in,
622         * Makefile.in,
623         * sdcc.dsw: moved link/ to as/link/
624
625 2006-09-11 Maarten Brock <sourceforge.brock AT dse.nl>
626
627         * as/mcs51/i51mch.c (machine): fixed warning
628
629 2006-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
630
631         * as/mcs51/i51mch.c (machine): S_DJNZ fixed bug 1554318
632
633 2006-09-09 Borut Razem <borut.razem AT siol.net>
634
635         * debugger/mcs51/sdcdb.c, debugger/mcs51/simi.c:
636           sdcdb WIN32 native port
637         * src/clean.mk: fixed
638
639 2006-09-08 Borut Razem <borut.razem AT siol.net>
640
641         * doc/sdccman.lyx: SDCDB and ucSim are available on Win32 platforms.
642
643 2006-09-08 Raphael Neider <rneider AT web.de>
644
645         * src/pic16/main.c (_pic16_linkEdit,pic16_linkCmd),
646         * src/pic/main.c(_pic14_do_link, linkCmd): pass "-w" and "-r"
647             to gplink to disable processor mismatch warning and to allow
648             the use of devices with only aliased (shared) memory banks,
649           (_pic16_genAssemblerPreamble): include pXXX.inc on --mplab-comp
650
651 2006-09-07 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
652
653         * doc/sdccman.lyx: Some re-formating plus example on using
654           #pragma preproc_asm +/-
655
656 2006-09-07 Borut Razem <borut.razem AT siol.net>
657
658         * support/scripts/sdcc.nsi: added SDCDB executables in a separate
659           section
660
661 2006-09-06 Borut Razem <borut.razem AT siol.net>
662
663         * support/scripts/sdcc.nsi: fixed Error: unterminated string parsing
664           line at sdcc.nsi:153
665         * sdcc/debugger/mcs51/simi.c: argsToCmdLine() fixes
666
667 2006-09-05 Borut Razem <borut.razem AT siol.net>
668
669         * configure.in, configure: support for winsock2
670         * debugger/mcs51/break.h, debugger/mcs51/cmd.c,
671           debugger/mcs51/cmd.h, debugger/mcs51/sdcdb.c,
672           debugger/mcs51/sdcdb.h, debugger/mcs51/simi.c,
673           debugger/mcs51/simi.h, debugger/mcs51/symtab.c,
674           debugger/mcs51/symtab.h: sdcdb WIN32 native port
675
676 2006-09-05 Maarten Brock <sourceforge.brock AT dse.nl>
677
678         * src/SDCCopt.c (cnvToFcall): fixed bug 1551947 by updating OP_USES
679           and OP_DEFS
680         * support/regression/tests/bug1551947.c: new, added
681         * src/SDCCsymt.h: strings are char* not byte*
682
683 2006-09-05 Raphael Neider <rneider AT web.de>
684
685         * device/lib/pic16/libdev/pic18f4550.c,
686           device/include/pic16/pic18f4550.h: added PORTD/TRISD
687             declarations/definitions from patch #1520949
688
689 2006-09-05 Raphael Neider <rneider AT web.de>
690
691         * src/pic16/gen.c (genPackBits): fix assignment to 8-bit,
692           byte-aligned bitfields, fixes #1539278
693
694 2006-09-05 Raphael Neider <rneider AT web.de>
695
696         * src/pic/gen.c (genReceive): skip unreferenced arguments,
697           fixes #1544120
698
699 2006-09-04 Borut Razem <borut.razem AT siol.net>
700
701         * support/scripts/sdcc.nsi: move ucSim executables to a separate section
702         * support/scripts/sdcc_cygwin_mingw32: don't disable ucsim,
703           -mno-cygwin is a part of the compiler name
704         * support/scripts/sdcc_mingw32: don't disable ucsim
705
706 2006-09-03 Borut Razem <borut.razem AT siol.net>
707
708         * sdcc.spec: corrected for 2.6.0. Thanks to Christer Weinigel.
709         * device/lib/Makefile.in device/lib/clean.mk: small but essential corrections
710
711 2006-09-03 Raphael Neider <rneider AT web.de>
712
713         * src/pic/ralloc.c,
714         * src/pic/pcode.c (InitReuseRegs): allocate registers with pseudo
715           indices >= 0x1000 to disambiguate them from fixed regs __at(addr),
716           fixes #1550049
717
718 2006-09-01 Borut Razem <borut.razem AT siol.net>
719
720         * sim/ucsim/cmd.src/cmdutil.cc: #include <sys/time.h> and <unistd.h>
721           to make ppc-osx happy
722
723 2006-08-31 Borut Razem <borut.razem AT siol.net>
724
725         * sim/ucsim/cmd.src/newcmdposix.cc: #include <assert.h>
726         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
727         * sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
728         * support/regression/ports/ds390/spec.mk,
729           support/regression/ports/mcs51/spec.mk,
730           support/regression/ports/xa51/spec.mk: introduced DEV_NULL variable.
731           To run regression tests in mingw environment:
732           make DEV_NULL=NUL CC=gcc
733
734 2006-08-30 Borut Razem <borut.razem AT siol.net>
735
736         * sim/ucsim/cmd.src/newcmdposix.cc, sim/ucsim/cmd.src/newcmdposixcl.h,
737           sim/ucsim/cmd.src/newcmdwin32.cc, sim/ucsim/cmd.src/newcmdwin32cl.h,
738           sim/ucsim/app.cc, sim/ucsim/appcl.h, sim/ucsim/configure,
739           sim/ucsim/configure.in, sim/ucsim/ddconfig_in.h, sim/ucsim/error.cc,
740           sim/ucsim/errorcl.h, sim/ucsim/option.cc, sim/ucsim/optioncl.h,
741           sim/ucsim/utils.cc, sim/ucsim/utils.h, sim/ucsim/cmd.src/Makefile.in,
742           sim/ucsim/avr.src/avr.cc, sim/ucsim/avr.src/avrcl.h,
743           sim/ucsim/cmd.src/bp.cc, sim/ucsim/cmd.src/bpcl.h,
744           sim/ucsim/cmd.src/cmdconf.cc, sim/ucsim/cmd.src/cmdgui.cc,
745           sim/ucsim/cmd.src/cmdmem.cc, sim/ucsim/cmd.src/cmdset.cc,
746           sim/ucsim/cmd.src/cmdsetcl.h, sim/ucsim/cmd.src/cmdstat.cc,
747           sim/ucsim/cmd.src/cmduc.cc, sim/ucsim/cmd.src/cmduccl.h,
748           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
749           sim/ucsim/cmd.src/command.cc, sim/ucsim/cmd.src/commandcl.h,
750           sim/ucsim/cmd.src/get.cc, sim/ucsim/cmd.src/getcl.h,
751           sim/ucsim/cmd.src/info.cc, sim/ucsim/cmd.src/newcmd.cc,
752           sim/ucsim/cmd.src/newcmdcl.h, sim/ucsim/cmd.src/set.cc,
753           sim/ucsim/cmd.src/show.cc, sim/ucsim/cmd.src/timer.cc,
754           sim/ucsim/hc08.src/hc08.cc, sim/ucsim/hc08.src/hc08cl.h,
755           sim/ucsim/s51.src/Makefile.in, sim/ucsim/s51.src/interrupt.cc,
756           sim/ucsim/s51.src/interruptcl.h, sim/ucsim/s51.src/pca.cc,
757           sim/ucsim/s51.src/pcacl.h, sim/ucsim/s51.src/port.cc,
758           sim/ucsim/s51.src/portcl.h, sim/ucsim/s51.src/serial.cc,
759           sim/ucsim/s51.src/serialcl.h, sim/ucsim/s51.src/timer0.cc,
760           sim/ucsim/s51.src/timer0cl.h, sim/ucsim/s51.src/timer1.cc,
761           sim/ucsim/s51.src/timer1cl.h, sim/ucsim/s51.src/timer2.cc,
762           sim/ucsim/s51.src/timer2cl.h, sim/ucsim/s51.src/uc390.cc,
763           sim/ucsim/s51.src/uc390cl.h, sim/ucsim/s51.src/uc390hw.cc,
764           sim/ucsim/s51.src/uc390hwcl.h, sim/ucsim/s51.src/uc51.cc,
765           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/wdt.cc,
766           sim/ucsim/s51.src/wdtcl.h, sim/ucsim/sim.src/hw.cc,
767           sim/ucsim/sim.src/hwcl.h, sim/ucsim/sim.src/mem.cc,
768           sim/ucsim/sim.src/memcl.h, sim/ucsim/sim.src/obsolete.cc,
769           sim/ucsim/sim.src/obsolete.h, sim/ucsim/sim.src/sim.cc,
770           sim/ucsim/sim.src/simcl.h, sim/ucsim/sim.src/stack.cc,
771           sim/ucsim/sim.src/stackcl.h, sim/ucsim/sim.src/test_mem_speed.cc,
772           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
773           sim/ucsim/xa.src/xa.cc, sim/ucsim/xa.src/xacl.h,
774           sim/ucsim/z80.src/z80.cc, sim/ucsim/z80.src/z80cl.h:
775           ucsim WIN32 native port
776
777 2006-08-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
778
779         * doc/sdccman.lyx: added note on dynamic memory heap initialization
780
781 2006-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
782
783         * src/mcs51/gen.c (genAnd, genOr, genXor): fixed bug 1546986
784         * src/ds390/gen.c (aopGetUsesAcc): handle AOP_DPTR2 and AOP_DPTRn too
785
786 2006-08-26 Maarten Brock <sourceforge.brock AT dse.nl>
787
788         * src/ds390/gen.c (genAnd, genOr, genXor): fixed bug 1546986
789         * support/regression/tests/bug1546986.c: new, added
790         * as/mcs51/.cvsignore,
791         * debugger/mcs51/.cvsignore,
792         * src/.cvsignore: deleted
793
794 2006-08-25 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
795
796         * device/include/mcs51/P89c51RD2.h: fixed bug 1546936 (error in sbit
797           definitions)
798
799 2006-08-20 Borut Razem <borut.razem AT siol.net>
800
801         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h:
802           removed cl_listen_console::match(), cl_console::match(),
803           restructured cl_commander::proc_input()
804
805 2006-08-16 Borut Razem <borut.razem AT siol.net>
806
807         * sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/newcmdcl.h,
808           sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/cmdutil.h,
809           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/uc.cc: code cleaning
810
811 2006-08-14 Borut Razem <borut.razem AT siol.net>
812
813         * support/regression/Makefile.in,
814           support/regression/ports/pic14/gpsim.cmd,
815           support/regression/ports/pic14/spec.mk,
816           support/regression/ports/pic14/support.c:
817           added pic14 regression test
818
819 2006-08-14 Maarten Brock <sourceforge.brock AT dse.nl>
820
821         * as/doc/asxhtm.html: documented changed ABS behaviour
822         * as/doc/README: fixed some typos
823
824 2006-08-13 Maarten Brock <sourceforge.brock AT dse.nl>
825
826         * support/regression/tests/float_trans.c: disabled test if __STDC_IEC_559__
827           not defined on host
828
829 2006-08-12 Borut Razem <borut.razem AT siol.net>
830
831         * support/regression/fwk/include/testfwk.h,
832           support/regression/fwk/lib/testfwk.c,
833           support/regression/generate-cases.py,
834           support/regression/Makefile.in:
835           regression test framework does not depend on function pointers and
836           variable arguments
837
838 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
839
840         * device/include/stddef.h: c temporary hack to fix bug 1518273
841
842 2006-08-09 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
843
844         * device/include/mcs51/cc2510fx.h: added
845         * src/z80/z80.dsp, src/gbz80/gbz80.dsp: added support/Util/strcmpi.ch
846           to projects.
847
848 2006-08-09 Maarten Brock <sourceforge.brock AT dse.nl>
849
850         * as/z80/assym.c (mlookup): ignore case when looking up mnemonics
851         * as/z80/Makefile.in: added strcmpi.c
852         * as/z80/z80adr.c: added upper case registers and lower case conditionals
853         * support/Util/strcmpi.ch: added with intention to remove from mcs51/hc08
854
855 2006-08-08 Maarten Brock <sourceforge.brock AT dse.nl>
856
857         * device/lib/gbz80/asm_strings.s,
858         * device/lib/gbz80/crt0_rle.s,
859         * device/lib/gbz80/div.s,
860         * device/lib/gbz80/mul.s,
861         * device/lib/gbz80/shift.s,
862         * device/lib/z80/asm_strings.s,
863         * device/lib/z80/crt0_rle.s,
864         * device/lib/z80/div.s,
865         * device/lib/z80/mul.s,
866         * device/lib/z80/shift.s: changed to all lower case menmonics except the
867           flags which are all upper case
868
869 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
870
871         * as/z80/asm.h: made CASE_SENSITIVE 1
872         * link/z80/aslink.h: made CASE_SENSITIVE 1
873         * src/z80/gen.c (throughout): made all conditionals upper case
874         * support/regression/tests/bug1503067.c: new
875
876 2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
877
878         * src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
879           (shiftIntoPair): added case 2 for PAIR_IY,
880           (setupToPreserveCarry): replaced parameters with iCode and check if
881            PAIR_DE is in use to fix bug 1399290,
882           (genPlus, genMinus): updated call to setupToPreserveCarry
883         * support/regression/tests/bug1399290.c: new
884
885 2006-08-06 Maarten Brock <sourceforge.brock AT dse.nl>
886
887         * device/lib/Makefile.in (Z80SOURCES): enabled float support
888         * sim/ucsim/z80.src/inst.cc (inst_rst): generate breakpoint on RST8,ACC==0
889         * src/ds390/gen.c (shiftRLong),
890         * src/hc08/gen.c (shiftLLong, shiftRLong): fixed bug 1533966
891         * src/mcs51/gen.c (sameReg): changed to sameByte,
892           (xch_a_aopGet): new,
893           (shiftL2Left2Result, shiftR2Left2Result, shiftRLeftOrResult, shiftLLong,
894            shiftRLong): fixed bug 1533966
895         * src/z80/gen.c (shiftR2Left2Result, shiftL2Left2Result, genlshTwo,
896           genLeftShiftLiteral, genrshTwo, genRightShiftLiteral): fixed bug 1533966
897         * support/regression/Makefile.in: disabled z80, enabled ucz80
898         * support/regression/tests/float_trans.c: enabled test for z80 and host
899         * support/regression/tests/shifts2.c: new, for testing bug 1533966
900
901 2006-08-01 Borut Razem <borut.razem AT siol.net>
902
903         * src/mcs51/gen.c, src/dc390/gen.c: fixed warning:
904           comparison is always false due to limited range of data type
905           on PPC64 machine (openpower-linux1) where "char = unsigned char"
906
907 2006-08-01 Maarten Brock <sourceforge.brock AT dse.nl>
908
909         * sim/ucsim/hc08.src/hc08mac.h: removed faulty and unused add_u16_disp
910         * sim/ucsim/hc08.src/hc08.cc: removed faulty and unused int8
911         * sim/ucsim/z80.src/z80mac.h (add_u16_disp): use explicit signed char cast
912         * sim/ucsim/z80.src/z80.cc: removed faulty and unused int8
913
914 2006-07-31 Borut Razem <borut.razem AT siol.net>
915
916         * sim/ucsim/configure, sim/ucsim/cmd.src/newcmdcl.h,
917           sim/ucsim/cmd.src/newcmd.cc, sim/ucsim/cmd.src/cmdutil.cc,
918           sim/ucsim/z80.src/Makefile.in, sim/ucsim/configure.in,
919           sim/ucsim/hc08.src/Makefile.in, sim/ucsim/hc08.src/hc08.cc,
920           sim/ucsim/ddconfig_in.h, sim/ucsim/s51.src/Makefile.in,
921           sim/ucsim/s51.src/uc51cl.h, sim/ucsim/s51.src/serialcl.h,
922           sim/ucsim/s51.src/uc51.cc, sim/ucsim/s51.src/serial.cc,
923           sim/ucsim/app.cc, sim/ucsim/avr.src/Makefile.in:
924           enable ucsim mingw compilation. Serial port is disabled,
925           since it uses termios.h API, which is not available on native
926           WIN32
927
928 2006-07-31 Borut Razem <borut.razem AT siol.net>
929
930         * Small Device C Compiler 2.6.0 released
931         * support/scripts/sdcc.nsi: added FULL_DOC option
932         * .version, doc/sdccman.lyx: changed sdcc version to 2.6.1
933
934 2006-07-28 Borut Razem <borut.razem AT siol.net>
935
936         * support/scripts/sdcc.nsi: remove $INSTDIR/include/asm/pic16/*.h
937         * doc/INSTALL.txt: updated
938
939 2006-07-27 Borut Razem <borut.razem AT siol.net>
940
941         * device/lib/pic/Makefile.in, device/lib/pic/Makefile.subdir,
942           device/lib/pic/libdev/Makefile.in: fixed bug
943           [ 1438354 ] pic libsdcc: distclean doesn't work
944         * device/lib/pic16/Makefile.in, device/lib/pic16/Makefile.subdir,
945           device/lib/pic16/libio/Makefile.in: fixed bug
946           [ 1438344 ] pic16 lib: clean doesn't work properly
947         * doc/knownbugs.html removed [ 1438354 ] and [ 1438344 ] from the list
948
949 2006-07-26 Maarten Brock <sourceforge.brock AT dse.nl>
950
951         * device/lib/pic/libsdcc/fsdiv.c,
952         * device/lib/pic/libsdcc/fsmul.c,
953         * device/lib/pic16/libsdcc/float/fsdiv.c,
954         * device/lib/pic16/libsdcc/float/fsmul.c,
955         * device/lib/_fsdiv.c,
956         * device/lib/_fsmul.c: bugfix, handle too large and too small numbers
957         * support/regression/tests/bug1520966.c: added
958         * doc/knownbugs.html: removed [ 1520966 ] from the list
959
960 2006-07-25 Borut Razem <borut.razem AT siol.net>
961
962         * configure.in, configure, sdccconf_in.h: fixed bug
963           [ 1519095 ] regression test onebyte.c fails on ppc64 host
964         * doc/knownbugs.html: removed [ 1519095 ] from the list
965
966 2006-07-25 Maarten Brock <sourceforge.brock AT dse.nl>
967
968         * doc/knownbugs.html: added, contains list of known bugs at release
969         * device/include/mcs51/compiler.h: fixed SFR32 for SDCC
970
971 2006-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
972
973         * device/include/mcs51/compiler.h: added SFRX for xdata based special
974           function registers and corrected defaults with additional warning
975         * device/lib/malloc.c: cosmetic changes
976         * device/lib/realloc.c: bugfix for bug #1496907, Thanks Efim Monyak
977         * src/ds390/ralloc.c (getRegBitNoSpil): reenabled,
978           (fillGaps): and used it
979
980 2006-07-20 Raphael Neider <rneider AT web.de>
981
982         * src/pic/device.c (addMemRange,assignRegister): suppress verbose
983           output unless SDCCPICDEBUG is set
984         * device/lib/pic16/Makefile.rules (%.lib target): suppress verbose
985           output if SILENT is set
986
987 2006-07-11 Borut Razem <borut.razem AT siol.net>
988
989         * doc/README.txt: updated
990
991 2006-07-10 Borut Razem <borut.razem AT siol.net>
992
993         * support/scripts/sdcc.nsi: added device/include/asm/pic/features.h and
994           device/lib/src/pic/libm/*.c and device/lib/src/pic16/libsdcc/stack/*.S
995           in WIN32 installation
996         * .version, sdcc.spec, doc/sdccman.lyx: changed sdcc version to 2.6.0 -
997           release candidate 1
998
999 2006-07-08 Maarten Brock <sourceforge.brock AT dse.nl>
1000
1001         * device/include/mcs51/XC866.h: added sbit definitions for Px_x, P1_x, P2_x
1002         * src/pic16/glue.c (initPointer): fixed bug 1496419 for pic16
1003
1004 2006-07-06 Maarten Brock <sourceforge.brock AT dse.nl>
1005
1006         * src/hc08/gen.c (genAddrOf): fixed bug when offset on stack is >127
1007
1008 2006-07-06 Borut Razem <borut.razem AT siol.net>
1009
1010         * support/regression/tests/bitfields.c:
1011           fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
1012         * support/regression/tests/constantRange.c:
1013           fixed bug [ 1518317 ] regression test constantRange fails on alpha host
1014
1015 2006-07-04 Borut Razem <borut.razem AT siol.net>
1016
1017         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
1018           src/port.mk,
1019           src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
1020           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
1021           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
1022           reverted changes from 2006-07-03
1023         * Makefile.common.in: added @CPPFLAGS@ to CPPFLAGS
1024         * support/regression/Makefile.in, support/regression/ports/host/spec.mk:
1025           added CPPFLAGS, used by the host port
1026
1027 2006-07-03 Bernhard Held <bernhard AT bernhardheld.de>
1028
1029         * support/regression/valdiag/tests/switch.c,
1030         * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4
1031         * support/regression/tests/libmullong.c: fixed for host
1032         * support/regression/ports/host/spec.mk: disable all warnings for host,
1033         SDCC runs with --less-pedantic too
1034
1035 2006-07-03 Borut Razem <borut.razem AT siol.net>
1036
1037         * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in:
1038           defined CPPFLAGS
1039         * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in
1040         * src/avr/Makefile.in, src/ds390/Makefile.in, src/ds400/Makefile.in,
1041           src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in,
1042           src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in:
1043           include ../port.mk
1044         * sim/ucsim/main_in.mk, sim/ucsim/avr.src/Makefile.in,
1045           sim/ucsim/gui.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1046           sim/ucsim/s52.src/Makefile.in, sim/ucsim/sim.src/Makefile.in,
1047           sim/ucsim/xa.src/Makefile.in: ignore header files for dependencies
1048
1049 2006-07-02 Raphael Neider <rneider AT web.de>
1050
1051         * src/pic16/devices.inc,
1052         * device/include/pic16/pic18fregs.h,
1053         * device/include/pic16/pic18f4550.h,
1054         * device/lib/pic16/pics.all,
1055         * device/lib/pic16/libdev/pic18f4550.c: added support for 18f4550
1056
1057 2006-07-01 Bernhard Held <bernhard AT bernhardheld.de>
1058
1059         * as/hc08/lkaomf51.c (OutputName),
1060         * as/mcs51/lkaomf51.c (OutputName),
1061         * as/z80/asmain.c (asmbl),
1062         * src/ds390/main.c (asmLineNodeFromLineNode),
1063         * src/hc08/ralloc.c (hc08_assignRegisters),
1064         * src/mcs51/main.c (asmLineNodeFromLineNode),
1065         * src/xa51/ralloc.c (checkRegMask),
1066         * src/xa51/gen.c (emitcode),
1067         * src/z80/gen.c (_emit2),
1068         * src/SDCCast.c (searchLitOp),
1069         * src/SDCCglobl.h,
1070         * support/packihx/packihx.c,
1071         * support/Util/MySystem.c (split_command): fix gcc 4 warnings
1072         * src/ds390/gen.c (aopPutUsesAcc),
1073         * src/ds390/ralloc.c (getRegBitNoSpil): unused, therefore disabled
1074         * support/regression/tests/libmullong.c (mullong_wrapper),
1075         * src/SDCCsymt.c (powof2),
1076         * src/SDCCast.c,
1077         * src/SDCCicode.c: renamed TYPE_WORD by TYPE_TARGET_INT and so on
1078         * src/SDCCsymt.h: added TYPE_TARGET_*
1079         * src/SDCCutil.c (doubleFromFixed16x16, fixed16x16FromDouble),
1080         * src/SDCCutil.h (doubleFromFixed16x16, fixed16x16FromDouble): moved to
1081         SDCCast because 1) header problems 2) this is the right place
1082         * src/SDCCast.c (doubleFromFixed16x16, fixed16x16FromDouble): added
1083         * src/SDCCval.h (doubleFromFixed16x16, fixed16x16FromDouble): added
1084         prototype
1085
1086 2006-06-29 Bernhard Held <bernhard AT bernhardheld.de>
1087
1088         * src/SDCCicode.h: removed buggy semicolon in unused macro
1089         * src/SDCClrange.c (findPrevUseSym, rlivePoint): fixed bug #1486853,
1090         search for previous definiton of auto symbols too,
1091         (findPrevUse): fixed logic of emitWarnings
1092
1093 2006-06-26 Raphael Neider <rneider AT web.de>
1094
1095         * src/pic16/gen.c (genFunction, genEndFunction): also preserve
1096           PCLATH and PCLATU on interrupts, potentially fixes #1505141
1097
1098 2006-06-25 Raphael Neider <rneider AT web.de>
1099
1100         * device/lib/pic/libm: NEW, added math library functions
1101         * device/lib/pic/libsdcc: NEW; added float support functions
1102         * device/lib/pic/{Makefile.in,configure.in,configure}: added libm/
1103         * device/include/pic/{limits.h,errno.h,sdcc-lib.h,float.h,math.h}:
1104           NEW, added math related headers
1105         * device/include/asm/pic/features.h: NEW
1106         * src/pic/gen.c (emitpcode_real): emit warning on NULL pCodeOp,
1107           (popGet): allow larger offsets for AOP_PCODE,
1108           (genDataPointerSet): handle literals explicitly, more debug output,
1109           (genAssign): fixed for float using aopLiteral ;-)
1110         * src/pic/glue.c (pic14createInterruptVect): inserted pagesel before
1111           GOTO initialisation routine
1112         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): set wasUsed
1113           flag on registers, fixes #1469043 (local variables do not work)
1114         * src/pic/main.c (_pic14_do_link),
1115         * src/pic16/main.c (_pic16_linkEdit): use fullDstFileName if
1116           available
1117
1118 2006-06-25 Borut Razem <borut.razem AT siol.net>
1119
1120         * device/lib/pic16/libc/stdio/sprintf.c: return the number of
1121           characters printed (not including the trailing '\0' used to end
1122           output to strings). Problem detected in regression test bug-927659.c.
1123           NOTE: printf() family functions should return int instead
1124           unsigned int!
1125         * device/lib/pic16/libc/stdio/vfprintf.c: "%%" prints "%", unknown
1126           specifier are printed as themselves
1127         * sdcc/support/regression/tests/bug1057979.c: pic16 printf doesn't
1128           support flags, width and precision specifiers
1129
1130 2006-06-24 Borut Razem <borut.razem AT siol.net>
1131
1132         * sdcc/support/regression/tests/bitvars.c: added gbz80, pic16 and pic16
1133           to the list of sdcc tagrets not supporting bit type
1134         * sdcc/support/regression/tests/bug-905992.c.c: excluded regression
1135           testfor pic16 due to bug:
1136           [ 1511794 ] pic16: regression test bug-895992.c fails
1137
1138 2006-06-24 Maarten Brock <sourceforge.brock AT dse.nl>
1139
1140         * src/mcs51/gen.c (genCmp): optimization for RFE 1162453
1141         * src/SDCCglue.c (initPointer), fixed bug 1496419
1142         * support/regression/tests/bug1496419.c: new, added
1143
1144 2006-06-22 Borut Razem <borut.razem AT siol.net>
1145
1146         * support/regression/ports/pic16/support.c: use gpsim usart module from
1147           libgpsim_modules library
1148
1149 2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1150
1151         * device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
1152         IP0H to IPH0.
1153
1154 2006-06-19 Raphael Neider <rneider AT web.de>
1155
1156         * src/pic/glue.h,src/pic16/glue.h: added prototypes
1157         * src/pic/glue.c,src/pic16/glue.c (pic1x_stringInSet,
1158           pic1x_emitSymbolIfNew): NEW, check for a string in a set,
1159           (pic14printExterns,pic14printPublics,pic16printPublics,
1160           pic16_printExterns): use new functions to emit symbols
1161           (picglue,pic16glue): emit publics before emitting externs
1162         * src/pic/gen.c,src/pic16/gen.c (genFunction): remember the names of
1163           locally defined functions to avoid bug #1443651
1164         * support/regression/tests/bug-716242.c: removed pic16 workaround
1165         * support/regression/ports/pic16/spec.mk: ignore errors during build
1166
1167 2006-06-19 Raphael Neider <rneider AT web.de>
1168
1169         * src/pic/glue.h: added pic14aopLiteral prototype
1170         * src/pic/glue.c (pic14aopLiteral): return unsigned int
1171         * src/pic/gen.c: removed stdint.h dependency
1172           (aopGet): use Safe_strdup()
1173           (bitpatternFromVal): removed, replaced use with pic14aopLiteral
1174           (genDataPointerSet): use pic14aopLiteral()
1175         * src/pic16/glue.h, src/pic16/glue.c, src/pic16/gen.c: similar changes
1176           for pic16; thanks to Bernhard and Maarten
1177
1178 2006-06-18 Borut Razem <borut.razem AT siol.net>
1179
1180         * support/regression/tests/structflexarray.c: flexible array members
1181           not supported by gcc < 3
1182         * sim/ucsim/configure, sim/ucsim/configure.in: do not compile serio
1183           GUI tool by default
1184         * src/pic/gen.c: don't include [p]strdin.h on solaris
1185         * support/Util/pstdint.h: addad svn attributes
1186         * support/regression/tests/constantRange.c,
1187           support/regression/tests/rotate.c: include inttypes.h instead
1188           stdint.h on solaris, addad svn attributes
1189
1190 2006-06-18 Raphael Neider <rneider AT web.de>
1191
1192         * src/SDCCsymt.c (initCSupport): change return type of divschar to
1193           int for PIC16
1194         * src/pic16/genarith.c (genAddLit): sign-extend via standard routine
1195           (pic16_genMinusBits): simplified sign-extension
1196           (pic16_genUMult8XLit_8,pic16_genUMult8X8_8): renamed to
1197             pic16_genMult8XLit_n resp. pic16_genMult8X8_n, fixed and
1198             adjusted to correctly handle mixed-signed operands, disabled
1199             now unused multiplciation routines
1200         * src/pic16/gen.c (pic16_pushpCodeOp): fixed to handle literals
1201           (assignResultValue): added argument denoting the size of the result
1202             as returned by the function (fixes upcasts in assigning from
1203             function calls: char foo(); int i = foo();)
1204           (genCall,genPcall,genGenPointerGet,genReceive): pass size of
1205             function result to assignResultValue
1206           (genMult): disabled inlined multiplication code
1207           (genDiv): augmented to also handle the modulus operator, fixed to
1208             handle mixed-signed operands correctly
1209           (genMod): simply call genDiv, disabled unused code
1210           (genAssign): fixed missing (sign-)extension on result
1211         * src/pic16/main.c (_hasNativeMulFor): accept literals [-128..256) as
1212             valid char operands, allow signed operands for native code, added
1213             division and modulo operator handling
1214         * device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
1215
1216         As a consequence, onebyte.c (if split into two files) and muldiv.c
1217         pass regression tests.
1218
1219 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1220
1221         * doc/Makefile.in: two runs of makeindex seem needed to get
1222         correct page references in the index of sdccman.pdf
1223         * doc/sdccman.lyx: mentioned cmon51, added links, small changes
1224
1225 2006-06-17 Borut Razem <borut.razem AT siol.net>
1226
1227         * sdcc/device/lib/Makefile.in: corrected PORTINCDIR path
1228
1229 2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1230
1231         * doc/sdccman.lyx: updated, added (porting source code, debugging),
1232         mentioned ec2drv and paulmon
1233
1234 2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
1235
1236         * as/mcs51/lkarea.c (lnkarea2): clear new xdatamap, bugfix for two
1237           consecutive abs areas
1238           (find_empty_space, allocate_space): added map to handle codemap or
1239            xdatamap,
1240           (lnksect2): renamed rloc to locIndex, fixed bug 960060 by handling
1241            absolute idata and xdata
1242         * as/mcs51/lkmem.c (summary2): updated legend
1243
1244 2006-06-16 Raphael Neider <rneider AT web.de>
1245
1246         * src/pic16/gen.c (shiftR2Left2Result): fixed bug #1507127
1247
1248 2006-06-13 Maarten Brock <sourceforge.brock AT dse.nl>
1249
1250         * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and
1251           1208515
1252         * src/SDCClrange.c (findPrevUse): fixed bug 1294475
1253
1254 2006-06-13 Vangelis Rokas <vrokas AT users.sourceforge.net>
1255
1256         * src/port.h (struct PORT): added field gp_tags, to hold the tag
1257         value of generic pointers,
1258         * src/avr/main.c,
1259           src/ds390/main.c,
1260           src/hc08/main.c,
1261           src/izt/i186.c,
1262           src/izt/tlcs900h.c,
1263           src/mcs51/main.c,
1264           src/pic/main.c,
1265           src/pic16/main.c,
1266           src/xa51/main.c,
1267           src/z80/main.c: PORT structure, added elements for gp_tags field,
1268         * src/SDCCsymt.h: replaced hardwired values of GPTYPE_* macros with
1269         fields in the PORT structure of each port,
1270         * src/SDCCast.c (decorateType): allow processing of generic pointers
1271         for PIC16 port (FPTRSIZE equals GPTRSIZE), also set GPTYPE_NEAR for
1272         S_FIXED symbols
1273
1274 2006-06-12 Maarten Brock <sourceforge.brock AT dse.nl>
1275
1276         * link/z80/lkgb.c,
1277         * link/z80/lkgg.c,
1278         * src/pic16/gen.c,
1279         * src/pic16/main.c,
1280         * src/pic16/pcode.c,
1281         * src/pic/main.c,
1282         * src/pic/pcoderegs.c,
1283         * src/SDCCicode.c,
1284         * src/SDCCmain.c,
1285         * src/SDCCsymt.c: replaced all exit(-1) by exit(EXIT_FAILURE) to fix
1286           bug 1504689 on minGW
1287
1288 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1289
1290         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
1291
1292 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
1293
1294         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
1295
1296 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
1297
1298         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
1299           for optimization
1300
1301 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
1302
1303         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
1304         to a char variable. Fixed bug #1504211
1305         * device/include/pic16/adc.h,
1306         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
1307         and fixed bug #1364390
1308
1309 2006-06-10 Borut Razem <borut.razem AT siol.net>
1310
1311         * CVSROOT: removed the CVS left-over
1312
1313 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
1314
1315         * as/hc08/asmain.c (asexit),
1316         * as/hc08/lkmain.c (lkexit),
1317         * as/mcs51/asmain.c (asexit),
1318         * as/mcs51/lkmain.c (lkexit),
1319         * src/SDCCglue.c (DEFSETFUNC),
1320         * src/SDCCmain.c (linkEdit, assemble),
1321         * support/librarian/sdcclib.c (AddRel),
1322           replaced unlink() by standard C remove()
1323         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
1324         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
1325           gatherImplicitVariables): new, added to fix bug 608752,
1326           (createFunction): added gatherImplicitVariables()
1327         * src/SDCCast.h: added createRMW prototype
1328         * src/SDCCsymt.h (struct symbol): added infertype
1329         * support/regression/tests/bug608752.c: new, added
1330
1331 2006-06-10 Raphael Neider <rneider AT web.de>
1332
1333         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
1334           multibyte dummy reads (fixes #1503234)
1335
1336 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
1337
1338         * device/include/mcs51/compiler.h: new, added header file to enable
1339           creating common sfr definition header files for different compilers
1340
1341 2006-06-05 Raphael Neider <rneider AT web.de>
1342
1343         * src/pic16/{pcode.h,genarith.c}:
1344           introduced pCodeOp combining any two pCodeOps (previously only
1345           two register operands could be combined), removed pcop2 from
1346           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
1347         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
1348         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
1349           rewritten to use new PO_TWO_OPS
1350         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
1351         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
1352           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
1353           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
1354           (pic16_get_op): embraced return arg to allow #define return(x),
1355             added new case for combined opcodes
1356           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
1357           (pic16_pCode2str,pic16_getRegFrompCodeOp,
1358            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
1359
1360 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
1361
1362         * src/SDCCval.c (checkConstantRange): added
1363         * src/SDCCval.h: added checkConstantRange
1364         * support/Util/SDCCerr.c,
1365         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
1366         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
1367         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
1368         * src/SDCCast.c (decorateType): added checkConstantRange,
1369         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
1370         can be emitted with the correct always true/false warning,
1371         added optimization for double '!';
1372         result of decorateType() must be assigned back to the tree, because
1373         decorateType() can change the tree
1374         * src/SDCCicode.c (geniCodeLogic),
1375         (geniCodeAssign): replaced new checkConstantRange, added warnings,
1376         (checkConstantRange): removed, it was only a fragment which never
1377         emitted a warning
1378         * src/SDCCsymt.c (computeType): fixed promotion for
1379         "-1 < (unsigned bit) b"
1380         * src/pic/ralloc.c (packRegsForAssign),
1381         * src/pic16/ralloc.c (packRegsForAssign),
1382         * src/hc08/ralloc.c (packRegsForAssign),
1383         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
1384         from mcs51
1385         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
1386         * support/regression/tests/constantRange.c: added
1387         * support/valdiag/tests/constantRange.c: added
1388         * support/valdiag/valdiag.py: added -DPORT_HOST=1
1389
1390 2006-06-02 Borut Razem <borut.razem AT siol.net>
1391
1392         * support/regression/ports/pic16/support.c: increase stack size
1393           to 255 bytes
1394         * support/regression/Makefile.in: sort tests by name so that the
1395           resutlts can be compared on different machines / platforms
1396
1397 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
1398
1399         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
1400         * src/ds390/gen.c (emitLabel): new, added,
1401           (genDjnz): fixed stack overflow bug,
1402           (throughout): cosmetic changes to sync with mcs51/gen.c,
1403           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
1404         * src/mcs51/gen.c (genEndFunction): small optimization,
1405           (throughout): cosmetic changes to sync with ds390/gen.c
1406
1407 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
1408
1409         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
1410           (_print_format): fixed printing pointers
1411         * src/mcs51/gen.c (emitLabel, movb): new, added,
1412           (genAssign): small optimization,
1413           (genDjnz): fixed stack overflow bug,
1414           (throughout): replaced sprintf with SNPRINTF,
1415           replaced mcs51_regWithIdx with REG_WITH_INDEX,
1416           replaced emitcode("mov", "b,...") with MOVB(...),
1417           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
1418           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
1419         * src/mcs51/peeph.def: added rules 140 and 264
1420         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
1421           so they may get optimized into registers
1422
1423 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
1424
1425         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
1426           immediately when encountered,
1427           (printUsage): always use stderr even on windows
1428
1429 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
1430
1431         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
1432         (processParms): fixed bug #1247551
1433         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
1434         parseCmdLine, main): print '--version' to stdout,
1435         print 'help' to stdout if --help is given,
1436         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
1437         arguments are given; fixed --help
1438
1439 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
1440
1441         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
1442         * support/regression/tests/bug-1493710.c: added
1443
1444 2006-05-27 Borut Razem <borut.razem AT siol.net>
1445
1446         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
1447           static instead auto
1448         * support/regression/ports/pic16/support.c: increase stack size
1449           from default 64 bytes to 128 bytes
1450         * support/regression/tests/staticinit.c,
1451           support/regression/tests/float.c: regression tests fully enabled
1452           for pic16 port by putting the initialized data arrays into the code
1453           section
1454         * support/regression/ports/pic16/spec.mk: don't link default libraries.
1455           This was changed by mistake in the previous version.
1456
1457 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
1458
1459         * src/pic16/gen.c (genFunction, genEndFunction): some
1460         beautifications, fixed bug with falsely restoring FSR2 in large
1461         stack model, thanks to Beau E. Cox for reporting the bug
1462
1463 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
1464
1465         * debugger/mcs51/break.c,
1466         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
1467           use %p to print pointers, made address variables unsigned
1468         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
1469         * debugger/mcs51/symtab.c (parseSymbol): must return something
1470         * src/mcs51/gen.c (aopForSym): small optimization,
1471            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
1472           (freeAsmop): added missing break,
1473           (aopPut): removed parameter bvolatile, determine it inside the function,
1474           (saveRegisters, unsaveRegisters): small optimization,
1475           (genIpush): removed pointless check,
1476           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
1477           replaced sprintf with SNPRINTF,
1478           replaced strcpy with strncpyz,
1479           updated aopPut calls,
1480           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
1481         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
1482
1483 2006-05-24 Borut Razem <borut.razem AT siol.net>
1484
1485         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
1486           modification of test for the pic16 port, put the array to the code
1487           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
1488
1489 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
1490
1491         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
1492         * support/Util/pstdint.h: added
1493
1494 2006-05-22 Borut Razem <borut.razem AT siol.net>
1495
1496         * src/regression/Makefile: removed bool2.c test, added -q linker option
1497         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
1498           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
1499           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
1500           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
1501           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
1502           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
1503           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
1504           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
1505           define SUPPORT_BIT_TYPES 0, removed unused bit variables
1506
1507 2006-05-22 Raphael Neider <rneider AT web.de>
1508
1509         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
1510           bug #1492360 (problematic due to generic pointers, see code)
1511
1512 2006-05-22 Borut Razem <borut.razem AT siol.net>
1513
1514         * support/regression/ports/pic16/specs.mk: removed stack size linker
1515           directive
1516         * support/regression/tests/array.c,
1517           support/regression/tests/bitopcse.c,
1518           support/regression/tests/bug-908454.c,
1519           support/regression/tests/malloc.c: modified for pic16 regression test
1520         * support/regression/tests/bitfields.c:
1521           pic16 - excluded bitfileds of size > 8
1522         * support/regression/tests/bp.c: pic16 - reduced data size
1523         * support/regression/tests/bug-221100.c: pic16 - reduced data size
1524         * support/regression/tests/bug-460010.c:
1525           pic16 - used the absolute address the fits in memory
1526         * support/regression/tests/bug-716242.c:
1527           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
1528         * support/regression/tests/float.c:
1529           pic16 - excluded - data size too big
1530         * support/regression/tests/onebyte.c:
1531           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
1532         * support/regression/tests/shifts.c:
1533           pic16 - function names probably have to differ in first X characters
1534           (gpasm limitation?)
1535         * support/regression/tests/staticinit.c:
1536           pic16 - excluded some tests due error: no target memory available for
1537           section ".idata"
1538
1539 2006-05-22 Borut Razem <borut.razem AT siol.net>
1540
1541         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1542           second try. Thanks Stas Sergeev once more.
1543
1544 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
1545
1546         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
1547           (genLeftShift, genRightShift): fixed bug 1491627
1548         * src/hc08/peeph.def (rules 7, 8.x): added
1549         * support/regression/tests/shifts.c (ShiftLeftByParam,
1550           ShiftRightByParam, testShiftByParam): added to test variable shifting
1551
1552 2006-05-20 Raphael Neider <rneider AT web.de>
1553
1554         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
1555         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
1556           (allocReg): add only new registers to dynAllocRegs,
1557           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
1558             #1489055, #1445850, and probably #1483693
1559
1560 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
1561
1562         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
1563         bug in for-loop that didn't emit the last of CONFIG and ID registers
1564
1565 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
1566
1567         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
1568           with offset
1569         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
1570           1489016, 1434401 and 1490124
1571         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
1572           1489016, 1434401 and 1490124
1573
1574 2006-05-17 Borut Razem <borut.razem AT siol.net>
1575
1576         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
1577           thanks Stas Sergeev
1578
1579 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1580
1581         * device/include/mcs51/P89c51RD2.h,
1582         * device/include/mcs51/P89LPC901.h,
1583         * device/include/mcs51/P89LPC922.h,
1584         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
1585
1586 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1587
1588         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
1589         to fix missing stack pragma in compiled binary object file,
1590
1591 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
1592
1593         * support/packihx/configure.in,
1594         * support/packihx/configure: removed warning, autoconf >= 2.5x can
1595         determine sizeof basic types even while cross compiling
1596
1597 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
1598
1599         * src/avr/gen.c (aopop),
1600         * src/ds390/gen.c (aopOp),
1601         * src/hc08/gen.c (aopOp),
1602         * src/mcs51/gen.c (aopop),
1603         * src/pic16/gen.c (pic16_aopOp),
1604         * src/pic/gen.c (aopOp),
1605         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
1606         if size of operand is smaller than spill location
1607
1608 2006-05-12 Borut Razem <borut.razem AT siol.net>
1609
1610         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
1611           have to have CR/LF line endings even if they are checked out on *nix
1612           or on WIN32 in cygwin binmode
1613
1614 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
1615
1616         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
1617         * device/include/ds80c390.h: added sfr16 definitions
1618         * src/ds390/gen.c,
1619         * src/ds390/gen.h,
1620         * src/ds390/main.c,
1621         * src/ds390/ralloc.c,
1622         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
1623           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
1624           bit returning functions
1625         * support/regression/tests/sfr16.c: enabled test on ds390
1626
1627 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1628
1629         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
1630         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
1631
1632 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
1633
1634         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
1635         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
1636           (cl_address_space constructor): removed expensive initialization,
1637           (cl_address_space::get_cell): extended for late initialization,
1638           (cl_address_space::*): use late initialization,
1639           (cl_address_decoder::activate): removed expensive initialization,
1640           This reduced regression test running time by 25%
1641
1642 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
1643
1644         * packihx/,
1645         * configure.in,
1646         * configure,
1647         * sdcc.dsw,
1648         * Makefile.bcc,
1649         * Makefile.in,
1650         * support/packihx/Makefile.in,
1651         * support/packihx/clean.mk,
1652         * support/packihx/Makefile.bcc,
1653         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
1654
1655 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1656
1657         * src/SDCCval.c (valNot): fix for regression test failure
1658           of not.c on big endian hosts
1659
1660 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1661
1662         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
1663
1664 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1665
1666         * device/lib/mcs51/Makefile.in: changed string comparison operator
1667           to = for POSIX compliance; == is bash extension
1668
1669 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
1670
1671         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
1672           kosmonaut_pirx
1673
1674 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
1675
1676         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
1677         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
1678         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
1679         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
1680         bug report #1478657,
1681
1682 2006-05-05 Borut Razem <borut.razem AT siol.net>
1683
1684         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
1685           making the html
1686
1687 2006-05-02 Borut Razem <borut.razem AT siol.net>
1688
1689         * doc/Makefile.in: removed *.ind dependency since there is no rule to
1690           create *.ind, which made make to fail if invoked with -j 2
1691
1692 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
1693
1694         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
1695           Hubert Sack for patch 1479782
1696
1697 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
1698
1699         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
1700
1701 2006-05-01 Raphael Neider <rneider AT web.de>
1702
1703         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
1704           (create_pic): store only prefix-free device name,
1705           (init_pic): check for device names with "16" prefix,
1706           (list_valid_pics),
1707         * src/pic/device.h (struct PIC_device),
1708         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
1709             stored device name,
1710         * device/include/pic/pic12f{635,675,629,683}.h,
1711         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
1712         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
1713         * device/include/pic/pic16f505.h,
1714         * device/lib/pic/libdev/pic16f505.c: removed
1715         * device/include/pic/pic14devices.txt: added support for pic12f
1716             devices, removed unsupported non 16-bit devices
1717             [above changes provided by patch from Zik Saleeba]
1718         * src/pic/*, src/pic16/*, device/include/pic16/*,
1719           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
1720
1721 2006-05-01 Borut Razem <borut.razem AT siol.net>
1722
1723         * configure.in, configure, doc/Makefile.in:
1724           sync with nightly build makefile - latex, dvipdf and dvips
1725           not needed any more
1726
1727 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
1728
1729         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
1730         in the library source
1731
1732 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
1733
1734         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
1735
1736 2006-04-28 Raphael Neider <rneider AT web.de>
1737
1738         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
1739         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
1740           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
1741         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
1742
1743 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
1744
1745         * device/lib/pic/libdev/Makefile.in,
1746         * device/lib/hc08/Makefile.in,
1747         * device/lib/gbz80/Makefile.in,
1748         * device/lib/z80/Makefile.in,
1749         * device/lib/ds390/Makefile.in,
1750         * device/lib/ds400/Makefile.in: added srcdir to include search path,
1751         thanks to Borut for the bug report
1752         * configure.in,
1753         * configure: always create doc/Makefile independent from --enable-doc
1754         * Makefile.in: always install from directory doc independent from
1755         --enable-doc
1756         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
1757         removed
1758         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
1759         * doc/Makefile.in: install *.txt if present
1760         * device/include/Makefile.in (install): added installation of pic/*.inc
1761         and pic/*.txt files again, they were erroneously removed
1762
1763 2006-04-28 Raphael Neider <rneider AT web.de>
1764
1765         * src/pic/{gen.c,main.h,pcode.c},
1766         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
1767             concerning signedness with casts
1768
1769 2006-04-28 Raphael Neider <rneider AT web.de>
1770
1771         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
1772             definition of an interrupt handler,
1773         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
1774             interrupt handler stuff from picglue() to separate routine,
1775           (picglue): enabled definition of intr handlers in files w/o main()
1776
1777 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1778
1779         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
1780           compilation with MSVC 2005 Express Edition (VC8)
1781
1782 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
1783
1784         * device/lib/Makefile: fixed build of gbz80 lib
1785
1786 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1787
1788         * support/regression/tests/bug-460010.c,
1789         * support/regression/tests/bug-524691.c,
1790         * support/regression/tests/bug-716242.c: removed conditional defines
1791           that are already in testfwk.h
1792
1793 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1794
1795         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
1796           (AccAXRsh1): added, shift right by 1,
1797           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
1798            AccAXLrl1
1799         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
1800
1801 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
1802
1803         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
1804         remove cast to same type
1805         * src/SDCCast.c (decorateType): fix for RFE 1475742,
1806         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
1807         * as/z80/Makefile,
1808         * link/z80/Makefile: removed, they have moved to
1809         Makefile.in files
1810         * configure,
1811         * configure.in: replaced duplicate message about ucsim by missing sdcpp
1812         * install-sh: fix bug #1204398 by setting umask 0022
1813         * device/lib/Makefile: separate build of z80 and gbz80 lib
1814
1815 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
1816
1817         Enabled VPATH feature: changed nearly all Makefiles (149 files).
1818         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
1819
1820         One basic decision: e.g. src/clean.mk includes further files. In order
1821         to make this work there are two solutions:
1822         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
1823           run configure on them. This way they can use
1824           'include $(srcdir)/port-clean.mk'
1825         - always include clean.mk by the Makefile at the same level. To avoid
1826           that `make clean` tries to include and build Makefile.dep the
1827           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
1828           implemented, because now even `make uninstall` doesn't create
1829           Makefile.in. clean.mk could be eliminated by pasting it in
1830           Makefile.in.
1831
1832         * debugger/mcs51/Makefile.in: build own objects from library sources
1833         (SLIB, SDCC) in current directory
1834
1835         * configure, configure.in: renamed --disable-device-lib-build in
1836         --disable-device-lib; added --enable-doc, the required tools are
1837         searched by configure; added result message; the toolchain for the
1838         belonging ports are now only built, if the port is enabled.
1839
1840         * support/regression/*: all output is written in directory gen, because
1841         the fwk and ports directories don't livet in the build tree using vpath
1842
1843         * doc/sdccman.lyx: renamed --disable-device-lib-build to
1844         --disable-device-lib, added --enable-doc, added section VPATH
1845
1846         * sim/ucsim/configure.in,
1847         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
1848         z80 are enabled by default
1849
1850 2006-04-24 Raphael Neider <rneider AT web.de>
1851
1852         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
1853             to config word, "pic14_"-prefixed some extern functions
1854           (pic14_emitConfigWord): emit __config directive(s) if assignment to
1855             config word has been found
1856         * src/pic/device.h: added prototypes
1857         * src/pic/pcode.c: added "pic14_"-prefix where needed
1858         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
1859             fixup
1860         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
1861             words,
1862           (pic14emitRegularMap): ignore config words,
1863           (pic14createInterruptVect): moved generating __config directives away
1864           (picglue): have __config directives emitted
1865
1866 2006-04-24 Borut Razem <borut.razem AT siol.net>
1867
1868         * doc/Makefile: sync with nightly build makefile
1869
1870 2006-04-24 Raphael Neider <rneider AT web.de>
1871
1872         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
1873             registers that have not been assigned proper liveranges,
1874             fixes #1469504 and #1474602,
1875           (pCodeRegOptimizeRegUsage): fixed typo in comment
1876
1877 2006-04-24 Borut Razem <borut.razem AT siol.net>
1878
1879         * device/examples/main8051.c: deleted - it was removed from CVS
1880           24.mar.2000 and after that modified 18.feb.2001, so it reappered
1881           after the transition to Subversion
1882         * src/SDCCalloc.h: deleted - it was removed  from CVS
1883           3.feb.2001 and after that modified 18.feb.2001, so it reappered
1884           after the transition to Subversion
1885         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
1886           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
1887           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
1888           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
1889
1890 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
1891
1892         * as/asx8051.dsp: added mcs51/strcmpi.h
1893         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
1894         * as/hc08/aslink.h: updated lnksect prototype
1895         * as/hc08/asm.h,
1896         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
1897         * as/hc08/asmain.c,
1898         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
1899           (newdot): handle A_ABS
1900         * as/hc08/asout.c,
1901         * as/mcs51/asout.c (outarea): output address
1902         * as/hc08/lkaomf51.c,
1903         * as/mcs51/lkaomf51.c: disabled unused array UsageType
1904         * as/hc08/m08pst.c,
1905         * as/mcs51/i51pst.c,
1906         * as/z80/z80pst.c: "ABS" is not A_OVR
1907         * as/hc08/lkarea.c (newarea): read a_addr,
1908           (lnkarea): added codemap array, sort absolute areas to the front,
1909            combine all GSINITx/GSFINAL,
1910           (find_empty_space, allocate_space): new functions,
1911           (lnksect): return next address, handle absolute sections
1912         * as/mcs51/lkarea.c (newarea): read a_addr,
1913           lnksect2 prototype changed,
1914           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
1915           (find_empty_space, allocate_space): new, factored out of lnksect2,
1916           (lnksect2): return next address, handle absolute sections
1917         * as/hc08/lkhead.c,
1918         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
1919         * as/hc08/lklibr.c (addfile, fndsym),
1920         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
1921           index out of range and detect both '\' and '/'
1922         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
1923         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
1924           regression tests (ds390 cannot return bool yet)
1925         * doc/sdccman.lyx: changed version number, document changed --no-peep,
1926           document critical interrupts on z80, document changed SDCC define
1927         * src/asm.c (_asxxxx_mapping): fixed .org directive,
1928           (_a390_mapping): added .org directive
1929         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
1930           (genMultOneByte): fixed warnings
1931         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
1932           ones
1933         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
1934         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
1935           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
1936         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
1937         * src/pic16/main.c: removed newReg prototype
1938         * src/pic16/pcode.c,
1939         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
1940           warnings
1941         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
1942           ones
1943         * src/pic16/ralloc.c
1944         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
1945           to fix warnings
1946         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
1947           from short to PIC_OPTYPE
1948         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
1949         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
1950           optype from short to PIC_OPTYPE
1951         * src/port.h: made int_size unsigned to fix warnings
1952         * src/SDCC.y: fixed warning on MSVC
1953         * src/SDCCicode.c (getArraySizePtr): return unsigned int
1954         * src/SDCCopt.c (convertToFcall): fixed warnings
1955         * src/SDCCsymt.h: removed double prototype for genSymName
1956         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
1957           offset int to fix warnings
1958
1959 2006-04-22 Borut Razem <borut.razem AT siol.net>
1960
1961         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1962           references to CVS replaced with Subversion
1963
1964 2006-04-21 Borut Razem <borut.razem AT siol.net>
1965
1966         * doc/sdccman.lyx, */Makefile, */Makefile.in:
1967           references to CVS replaced with Subversion
1968
1969 2006-04-19 Borut Razem <borut.razem AT siol.net>
1970
1971         * src/version.awk: adapted for svn
1972         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
1973           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
1974           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
1975           /binutils-avr/etc/*.vi, *.jin: removed all properties
1976           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
1977
1978 2006-04-19 Borut Razem <borut.razem AT siol.net>
1979
1980         * CVS to Subversion migration completed
1981
1982 2006-04-18 Borut Razem <borut.razem AT siol.net>
1983
1984         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
1985           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
1986
1987 2006-04-17 Borut Razem <borut.razem AT siol.net>
1988
1989         * device/include/Makefile.in: added pic/*.inc to the installation
1990
1991 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
1992
1993         * support/regression/collate-results.py: fixed output in case of
1994         a valdiag error
1995         * support/regression/generate-cases.py: fixed splitting of pathnames
1996         with dots
1997         * as/hc08/lklibr.c (addfile),
1998         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
1999
2000 2006-04-11 Raphael Neider <rneider AT web.de>
2001
2002         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
2003         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
2004         * src/pic16/pcode.c (assignValnums): fixed #1460578
2005
2006 2006-04-11 Raphael Neider <rneider AT web.de>
2007
2008         * device/lib/pic/libdev/*.c,
2009         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
2010           fixes #1468739, enables compilation in --std-c99 mode
2011         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
2012
2013 2006-04-11 Raphael Neider <rneider AT web.de>
2014
2015         * src/pic/device.c (find_device): removed debug output
2016           (list_valid_pics): enabled verbose listing of supported devices
2017         * device/include/stdbool.h: define bool as char for pic14/16 as well
2018
2019 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2020
2021         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
2022
2023 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2024
2025         * .version: bumped version to 2.5.6
2026         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
2027
2028 2006-04-06 Raphael Neider <rneider AT web.de>
2029
2030         * .version: bumped version to 2.5.6 (pic14 ABI changed)
2031         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
2032         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
2033           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
2034             pic14_constructAbsMap
2035           (pic14printPublics): declare absolute global symbols as global
2036           (pic14createInterruptVect),
2037         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
2038           (newReg): assume new registers unused, use correct name in
2039             hashtable (reg->name instead of name), more debugLog output
2040         * src/pic/device.h (PIC_device): added fields for verbose output
2041         * src/pic/device.c: moved device definition to pic14devices.txt,
2042             added routines for runtime parsing of pic14devices.txt,
2043             added support for second config word
2044         * src/pic/main.c (_process_pragma): removed #pragma maxram,
2045           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
2046           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
2047           (_pic14_parseOptions): moved pCodeInitRegisters here
2048           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
2049         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
2050           (pCodeInitRegisters): rewrapped comments, perpared new approach to
2051             handling the pseudo stack
2052         * device/lib/Makefile.in: ignore failures in objects-pic16,
2053         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
2054         * device/lib/pic/NEWS: document new dependency on picXXX.lib
2055         * device/lib/pic/Makefile.subdir,
2056         * device/lib/pic16/Makefile.subdir: improved clean rules
2057         * device/lib/pic/libdev/: NEW, pic14 device libraries
2058         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
2059         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
2060         * device/include/Makefile.in: create subdir and install pic14 headers
2061         * device/include/pic/p16f_common.inc: removed unused declarations
2062         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
2063             PICs from inc2h.pl v1.6,
2064             replaced BIT_AT macros with struct declarations
2065         * device/include/pic/pic14devices.txt: definition of supported devices,
2066             all above improvements contributed by Zik Saleeba, thanks
2067         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
2068         * support/scripts/sdcc.nsi: also install pic14 device libraries and
2069             headers
2070
2071 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2072
2073         * device/include/mcs51/c8051f410.h: added interrupt numbers,
2074         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
2075           thanks to Charles Olds
2076
2077 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2078
2079         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
2080
2081 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2082
2083         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
2084         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
2085         * support/regression/bug1464657.c: added, new test
2086
2087 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
2088
2089         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
2090           version number
2091
2092 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
2093
2094         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
2095           --no-peep and --peep-file <file> are used don't use default rules but
2096           do use the <file>
2097
2098 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
2099
2100         * src/mcs51/gen.c (genCall): fixed bug 1457608
2101
2102 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2103
2104         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
2105         changes seem to cause (trigger?) problems with the build system.
2106
2107 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
2108
2109         * src/SDCCpeeph.c (operandsLiteral): new, added,
2110           (callFuncByName): inserted operandsLiteral
2111         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
2112
2113 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2114
2115         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
2116         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
2117
2118 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2119
2120         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
2121           implemented patch 1120823 Thanks to Willy De la Court (normal
2122           interrupts need an interrupt number now if they are made critical),
2123           and enabled nesting of critical functions though not for gbz80
2124           (genCritical, genEndCritical): added functions
2125           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
2126         * src/z80/mappings.i: added "ei" to all mappings
2127
2128 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2129
2130         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
2131         submitted by the Debian SDCC maintainer Aurelien Jarno:
2132         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
2133         archive with gcc 4.1 on mips and wrote the patch"
2134
2135 2006-03-16 Raphael Neider <rneider AT web.de>
2136
2137         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
2138           the left operand is shorter than the result (c* = lit-c* + int),
2139           fixes bug #1450796
2140         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
2141           OP_SYMBOL
2142
2143 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2144
2145         * src/.version: increased version number to 2.5.5
2146         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
2147         linking is done manually in pic16 port's _linkEdit,
2148         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
2149         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
2150         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
2151         allocate asmop as AOP_ACC,
2152         (aopForRemat): added parameter 'bool result' in function declaration,
2153         (pic16_aopGet): return AOP_ACC when accessing WREG,
2154         (pic16_popGetTempReg): minor modification,
2155         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
2156         'pic16_allocWithIdx',
2157         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
2158         calling function in absolute addresses,
2159         (genAssign): take into account AOP_ACC asmop,
2160         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
2161         * src/pic16/pcoderegs.c: some debug functions and lines added,
2162         * src/pic16/ralloc.c (decodeRegType): added but commented out,
2163         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
2164         register too,
2165         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
2166         call to allocReg, not by manually allocating a new one,
2167         (pic16_assignRegisters): now before going through the register
2168         allocating functions mark all registers as free. This eliminates some
2169         side effects resulting from peephole parser done earlier in the backbone
2170
2171 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
2172
2173         * src/SDCCicode.c (geniCodeLogic),
2174         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
2175
2176 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
2177
2178         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
2179           (genSend): bugfix, do not allocate and free twice,
2180           (shiftRLong): handle partially overlapping aops
2181         * support/regression/tests/bitopcse.c: fixed warning redefined idata
2182
2183 2006-03-08 Borut Razem <borut.razem AT siol.net>
2184
2185         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
2186           for pic16
2187
2188 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
2189
2190         * support/regression/tests/bug1409955.c: new, added
2191         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
2192         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
2193           (aopForSym, aopOp): increment asmop.allocated if reused,
2194           (freeAsmop): decrement asmop.allocated and check for zero instead of
2195           using asmop.freed,
2196           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
2197           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
2198            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
2199            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
2200            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
2201            genSignedRightShift, genRightShift, genDataPointerGet,
2202            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
2203            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
2204             in reverse order from allocation,
2205           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
2206             added swappedLR to keep track
2207         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
2208           pdata & code for GCC, z80, gbz80 & hc08
2209         * support/regression/tests/zeropad.c: moved defines to testfwk.h
2210
2211 2006-03-08 Raphael Neider <rneider AT web.de>
2212
2213         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
2214
2215 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
2216
2217         * device/include/mcs51/c8051f410.h: new SiLabs mcu
2218         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
2219         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
2220
2221 2006-03-06 Borut Razem <borut.razem AT siol.net>
2222
2223         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
2224           made the linker quiet
2225
2226 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2227
2228         * src/pic16/gen.c (genPcall): fixed bug #1443644
2229         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
2230         which dumps before the function entry point a data byte which represents
2231         the number of the local variables used by the specified function, added
2232         'xinst' for initial support for Extended Instruction Support,
2233         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
2234         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
2235         port->fun_prefix anymore (may change later),
2236         (genFunction, genEndFunction): do not store/restore local registers for
2237         _main (this should take care the --main-return command line option in
2238         the future),
2239         (genOr): removed some legacy pic-port instructions,
2240         * src/pic16/genarith.c (genAddLit): re-enabled old code because
2241         performing operations with SFR's causes data to be written more than
2242         once to each SFR. Perhaps SFRs should be handled in special cases...
2243         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
2244         pcode.h
2245         * src/pic16/main.c (_process_pragma): stack bound checking did not take
2246         into account for stack starting position,
2247         (struct OPTIONS pic16_optionsTable): added command line argument
2248         --extended or -y for Extended Instruction Support,
2249         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
2250         (deassignLRs): *** perhaps the most important change, old 'for' code
2251         (commented out for reference), didn't account for some registers which
2252         were left marked 'not free' after a pointer operation. The change
2253         reduces register usage a lot in some cases
2254
2255 2006-03-04 Borut Razem <borut.razem AT siol.net>
2256
2257         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
2258           _clean
2259         * support/regression/tests/bug-524697.c: decreased array size for
2260           mcs51 to fit into the internal RAM
2261         * support/regression/Makefile.in: a little bit more verbose
2262
2263 2006-03-03 Borut Razem <borut.razem AT siol.net>
2264
2265         * support/regression/fwk/lib/testfwk.c,
2266           support/regression/fwk/include/testfwk.h: introduced function
2267           _prints(), nonrecursive _printn(), call _initEmu() from main()
2268         * support/regression/ports/gbz80/support.asm,
2269           support/regression/ports/ucz80/support.asm,
2270           support/regression/ports/z80/support.asm,
2271           support/regression/ports/ds390/support.c,
2272           support/regression/ports/hc08/support.c,
2273           support/regression/ports/host/support.c,
2274           support/regression/ports/mcs51/support.c,
2275           support/regression/ports/xa51/support.c: added empty _initEmu()
2276           function
2277         * support/regression/ports/pic16/gpsim.cmd,
2278           support/regression/ports/pic16/spec.mk,
2279           support/regression/ports/pic16/support.c,
2280           support/regression/Makefile.in: added pic16 regression test
2281
2282 2006-03-01 Raphael Neider <rneider AT web.de>
2283
2284         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
2285           genConstPointerGet): use safe way of generating MOVFF to cover
2286             literals as well as registers, fixes bug #1440527
2287         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
2288             dereference
2289           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
2290             more correctly, fixes bug #1232186
2291           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
2292         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
2293             gplink guess the correct processor in more cases, applied patch
2294             from Till Riedel attached to and fixing bug #1436552
2295
2296 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2297
2298         * support/regression/tests/array.c: added, contains check for #1434401
2299         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
2300
2301 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
2302
2303         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
2304         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
2305         * device/include/mcs51/c8051f326.h,
2306         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
2307         * device/include/mcs51/c8051f000.h,
2308         * device/include/mcs51/c8051f018.h,
2309         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
2310           PCON_IDLE,PCON_STOP and added sfr16 definitions
2311
2312 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
2313
2314         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
2315           genGetWord): fixed bug 1409955
2316
2317 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
2318
2319         * device/include/hc08/mc68hc908gp32.h,
2320         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
2321
2322 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
2323
2324         * src/SDCCast.c (constExprValue): return NULL if not a value
2325         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
2326         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
2327         * support/regression/tests/bitfields.c: enabled signed bitfield for all
2328
2329 2006-02-13 Borut Razem <borut.razem AT siol.net>
2330
2331         * src/regression/ptrarg.c: added, fails due to bug #1430967
2332         * src/regression/Makefile: ptrarg.c added, ...
2333
2334 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
2335
2336         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
2337         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
2338
2339 2006-02-11 Borut Razem <borut.razem AT siol.net>
2340
2341         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
2342           print "Processor: xxx" message to stdout only if --verbose
2343
2344 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2345
2346         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
2347         * support/regression/tests/bug1426356.c: added
2348         * support/regression/tests/bitfields.c: removed 2 tests
2349
2350 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2351
2352         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
2353         * device/include/mcs51/c8051f330.h,
2354         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
2355           PCON_IDLE,PCON_STOP and added sfr16 definitions
2356         * device/lib/_divsint.c,
2357         * device/lib/_divuint.c,
2358         * device/lib/_divulong.c,
2359         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
2360           register bank bug for small stackauto
2361
2362 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2363
2364         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
2365
2366 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
2367
2368         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
2369         * all.dsp: corrected several bin paths
2370         * device/include/mcs51/c8051f120.h,
2371         * device/include/mcs51/c8051f300.h,
2372         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
2373           to PCON_IDLE,PCON_STOP
2374         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
2375         * device/lib/printf_large.c (output_float): fixed bug 1388703
2376         * support/regression/tests/bug1057979.c: added test for bug 1388703
2377
2378 2006-02-08 Raphael Neider <rneider AT web.de>
2379
2380         * src/pic/pcode.c (pciTRIS): fixed typo,
2381           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
2382           (LinkFlow): fixed handling of flows that end in a call,
2383           (ReuseReg): perform safety check earlier
2384         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
2385             to work with flows at the beginning of a pBlock,
2386             fixes #1426557 (Symbol not previously defined),
2387           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
2388             usage information
2389           (RemoveUnusedRegisters): update register usage info
2390         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
2391             created, reuse existing ones instead
2392         * src/pic/gen.c (genPcall): fixed #1424719
2393
2394 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
2395
2396         * link/z80/lkmain.c,
2397         * link/z80/lklex.c,
2398         * link/z80/lkdata.c,
2399         * link/z80/aslink.h: fixed build on current cygwin:
2400         replaced getline() by lk_getline()
2401
2402 2006-02-01 Borut Razem <borut.razem AT siol.net>
2403
2404         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
2405           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
2406           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
2407           src/regression/bool1.c, src/regression/bool2.c,
2408           src/regression/bool3.c, src/regression/call1.c,
2409           src/regression/compare.c, src/regression/compare10.c,
2410           src/regression/compare2.c, src/regression/compare3.c,
2411           src/regression/compare4.c, src/regression/compare5.c,
2412           src/regression/compare6.c, src/regression/compare7.c,
2413           src/regression/compare8.c, src/regression/compare9.c,
2414           src/regression/configword.c, src/regression/for.c,
2415           src/regression/inline.c, src/regression/mult1.c,
2416           src/regression/nestfor.c, src/regression/or1.c,
2417           src/regression/pointer1.c, src/regression/ptrfunc.c,
2418           src/regression/rotate1.c, src/regression/rotate2.c,
2419           src/regression/rotate3.c, src/regression/rotate4.c,
2420           src/regression/rotate5.c, src/regression/rotate6.c,
2421           src/regression/rotate7.c, src/regression/string1.c,
2422           src/regression/struct1.c, src/regression/sub.c,
2423           src/regression/sub2.c, src/regression/switch1.c,
2424           src/regression/while.c, src/regression/xor.c,
2425           src/regression/create_stc, src/regression/simulate,
2426           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
2427           regression tests
2428         * src/regression/gpsim_assert.h: added
2429
2430 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
2431
2432         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
2433         ((void (code *) (void)) 0) ();
2434         * as/hc08/aslex.c,
2435         * as/hc08/aslink.h,
2436         * as/hc08/asm.h,
2437         * as/hc08/asmain.c,
2438         * as/hc08/lkdata.c,
2439         * as/hc08/lklex.c,
2440         * as/hc08/lkmain.c,
2441         * as/mcs51/aslex.c,
2442         * as/mcs51/aslink.h,
2443         * as/mcs51/asm.h,
2444         * as/mcs51/asmain.c,
2445         * as/mcs51/lkdata.c,
2446         * as/mcs51/lklex.c,
2447         * as/mcs51/lkmain.c,
2448         * as/z80/aslex.c,
2449         * as/z80/asm.h,
2450         * as/z80/asmain.c: fixed build on current cygwin:
2451         replaced getline() by as_getline()
2452
2453 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
2454
2455         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
2456         declarator in the symbol chain
2457         * src/SDCCsymt.h,
2458         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
2459         parameter list for function pointers
2460         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
2461         * support/regression/tests/bug-716242.c: added
2462
2463 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
2464
2465         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
2466         offset if possible
2467         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
2468
2469 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
2470
2471         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
2472         inifinitely recurseable, added static
2473         * support/regression/tests/bug-1408066.c: added
2474
2475 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
2476
2477         * src/SDCCicode.h,
2478         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
2479         renamed, added possibility to create "postLoopLbl"-labels
2480         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
2481         newiTempLoopHeaderLabel
2482         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
2483         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
2484         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
2485         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
2486         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
2487         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
2488         (basicInduction): fixed bug #136564, made static,
2489         (loopInduction): changed parameter of basicInduction, made static,
2490         (addPostLoopBlock): added
2491         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
2492         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
2493         findLoopEndSeq
2494         * support/regression/tests/bug-136564.c: added
2495         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
2496         --std-sdcc99 to LIBSDCCFLAGS
2497
2498 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
2499
2500         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
2501         while loop
2502         * support/regression/tests/bug-1406131.c: added
2503
2504 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
2505
2506         * src/SDCCast.c (decorateType): fix promotion of unary minus
2507         * src/SDCCsymt.c (computeType): beautified
2508         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
2509         (valUnaryPM, valComplement): fix sign and promotion,
2510         (valNot): ANSI: result type is int (SDCC: unsigned char)
2511         * support/regression/tests/uminus.c: speedup by removing superflous
2512         test case 'int'
2513         * support/regression/tests/onebyte.c: added promotion and signedness
2514         tests for unary minus
2515         * support/regressions/tests/bug-477927.c: disable warning about
2516         uninitialized variables
2517         * support/regression/tests/not.c: added
2518
2519 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
2520
2521         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
2522         * src/mcs51/gen.c (gen51Code): show final register usage after
2523         fillGaps in asm with --i-code-in-asm
2524         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
2525         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
2526         incUsed, rliveClear, adjustIChain): made static,
2527         (setFromRange): excluded because it's unused,
2528         (findPrevUseSym, markWholeLoop): added,
2529         (findPrevUse): rewritten; fixes bug 895992; now a complete search
2530         through all branches of predecessors enables sdcc to emit the warning
2531         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
2532         (rlivePoint): made static, added parameter emitWarnings which is only
2533         true during the first run out of two,
2534         (findRecursiveSucc, findRecursivePred): removed,
2535         (computeLiveRanges): made static, added parameter emitWarnings,
2536         (dumpIcRlive): added for debugging only
2537         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
2538         removed prototype of setFromRange()
2539         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
2540         in call of computeLiveRanges()
2541         * support/regression/tests/bug-895992.c: added
2542         * support/regression/tests/bug-971834.c: added
2543         * support/valdiag/tests/bug-895992.c: added
2544         * support/valdiag/tests/bug-971834.c: added
2545
2546 2005-12-18 Raphael Neider <rneider AT web.de>
2547
2548         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
2549           (genUnpackBits): improved code for direct operands,
2550           (genPackBits): improved code for literal assignment to bitfields
2551             and for direct destination operands (no FSR indirection),
2552             prevented redundant AND, fixes #1362800,
2553           (AccLsh): added parameter to disable masking of the result
2554         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
2555           skip instructions with side-effects (like incfsz),
2556           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
2557         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
2558         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
2559           fixes #1375263
2560
2561 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
2562
2563         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
2564         volatile variables as spill location
2565
2566 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
2567
2568         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
2569         replacing literals
2570         * support/regression/tests/bug-1376320.c: added
2571
2572 2005-12-08 Raphael Neider <rneider AT web.de>
2573
2574         * src/pic/device.c: renamed is_shared to pic14_is_shared
2575         * src/pic/gen.c (genIfx): re-enabled handling of sbits
2576         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
2577           (is_valid_identifier): added for above workaround
2578
2579 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
2580
2581         * device/lib/Makefile.in: fixed to enable port-specific-objects
2582         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
2583           char, thanks Hubert Sack
2584         * doc/sdccman.lyx: documented --xstack-loc,
2585           elaborated a bit more on interrupts and pitfalls,
2586           removed "setjmp/longjmp unsupported",
2587           documented some unsupported C99 features
2588         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
2589         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
2590           if, thanks Hubert Sack
2591         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
2592         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
2593           make make_library
2594         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
2595           regression tests can report resource usage (rfe 700441)
2596         * support/regression/collate-results.py: report resource usage
2597         * support/regression/ports/ds390/spec.mk,
2598         * support/regression/ports/hc08/spec.mk,
2599         * support/regression/ports/mcs51/spec.mk,
2600         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
2601         * support/regression/ports/ds390/uCsim.cmd,
2602         * support/regression/ports/hc08/uCsim.cmd,
2603         * support/regression/ports/mcs51/uCsim.cmd,
2604         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
2605         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
2606           library, use the default one
2607         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
2608           building the library
2609
2610 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
2611
2612         * config.dsp: added dependency on .version and configure_vc.awk
2613         * device/include/setjmp.h: updated for --stack-auto and --xstack
2614         * device/include/mcs51/at89c51snd1c.h: corrected line endings
2615         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
2616         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
2617         * device/lib/libsdcc.lib: added _setjmp
2618         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
2619           (decorateType): fixed bug 1372851,
2620           (optimizeGetHbit): fixed warning
2621         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
2622           array initialisation
2623         * support/regression/tests/bug1057979.c: added test for bug 1358192
2624         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
2625
2626 2005-12-03 Borut Razem <borut.razem AT siol.net>
2627
2628         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
2629           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
2630
2631 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2632
2633         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
2634         createIval): implement symbol independant "flexible array member",
2635         (createIvalCharPtr): implemented flexible array initialisation with a
2636         string
2637         * src/SDCCsymt.c (copyStruct): removed,
2638         (getSize): fixed misleading comment,
2639         (getAllocSize): removed, the additional allocation size is now in
2640         sym->flexArrayLength,
2641         (checkStructFlexArray): new, syntax checks for flexible array members,
2642         (compStructSize): added syntax checks for "flexible array members"
2643         (copyStruct): removed,
2644         (copyLinkChain): removed inefficient fix for bug 770487
2645         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
2646         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
2647         symbol->flexArrayLength
2648         * src/SDCCerr.c,
2649         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
2650         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
2651         * support/regression/tests/structflexarray.c: added
2652         * support/valdiag/tests/structflexiblearray.c: added
2653
2654 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
2655
2656         * src/SDCCast.c (decorateType): fixed bug 1368489
2657         * support/Util/SDCCerr.c,
2658         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
2659
2660 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2661
2662         * device/include/mcs51/at89c51snd1c.h: added file submitted by
2663           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
2664
2665 2005-11-27 Borut Razem <borut.razem AT siol.net>
2666
2667         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
2668           support/cpp2/mkdeps.h: added command line option
2669           -obj-ext=<extension> to SDCPP to define object file externion, used
2670           for generation of make dependencies (-M)
2671         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
2672
2673 2005-11-26 Borut Razem <borut.razem AT siol.net>
2674
2675         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
2676           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
2677           added pic and pic16 libraries
2678
2679 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2680
2681         * device/include/float.h: Corrected typo in prototype of __fsgt
2682
2683 2005-11-25 Borut Razem <borut.razem AT siol.net>
2684
2685         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
2686           added creation of model-mcs51-stack-auto libraries
2687
2688 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
2689
2690         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
2691         and fields-list too
2692         * src/SDCCast.c (createIvalArray): removed obsolete comment
2693
2694 2005-11-24 Borut Razem <borut.razem AT siol.net>
2695
2696         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
2697           added missing device/lib/mcs51/crt*.asm sources
2698
2699 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
2700
2701         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
2702
2703 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
2704
2705         * device/lib/_fs2schar.c,
2706         * device/lib/_fs2sint.c,
2707         * device/lib/_fs2slong.c: optimized inline asm
2708
2709 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2710
2711         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2712           Better handling of floats between -1.0 and 0.0.
2713
2714 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2715
2716         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
2717           (the missing "if"s prohibited removal of redundant labels)
2718
2719 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2720
2721         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
2722           Properly convert floats between -1.0 and 0.0 to long, int, and char
2723           types (max integer value of negative floats tends to zero).
2724         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2725           Removed changes made so to work properly with floats between
2726           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
2727           and _fs2char.c
2728
2729 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2730
2731         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
2732         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
2733         (genCast) cosmetic change
2734         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
2735         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
2736         from mcs51
2737         * support/regression/tests/bitfields (testSignedBitfields): added
2738
2739 2005-11-18 Borut Razem <borut.razem AT siol.net>
2740
2741         * sdcc/device/lib/Makefile.in: remove all unnecessary files
2742         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
2743           introduced SILENT option to make building of pic16 libraries less
2744
2745 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2746
2747         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
2748           Now they work properly with floats between -1.0 and 0.0
2749         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
2750
2751 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2752
2753         * src/SDCCicode.c (printOperand): added missing else
2754
2755 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
2756
2757         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
2758         reformatted for better readability
2759         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
2760         signed bitfields
2761
2762 2005-11-17 Borut Razem <borut.razem AT siol.net>
2763
2764         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
2765           introduced SILENT option to make building of pic16 libraries less
2766           verbose - used for nightly snapshot build
2767         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
2768           available on Win32 platforms.
2769         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
2770           medium, large, pic and pic16
2771
2772 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2773
2774         * device/lib/printf_large.c: Temporary patch for bug 1358192:
2775           printf("%f"...) sets fraction to zero.
2776
2777 2005-11-16 Raphael Neider <rneider AT web.de>
2778
2779         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
2780           fixes #1357221
2781         * src/pic/gen.c (genIfx): implemented for CARRY bit
2782         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
2783           to generic pointers, fixes #1357332,
2784           (pic16_movLit2f): NEW,
2785           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
2786
2787 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2788
2789         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
2790
2791 2005-11-11 Raphael Neider <rneider AT web.de>
2792
2793         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
2794         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
2795           compute pointer's type from operand,
2796           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
2797           improved single bit reads, fixes bug #1353379
2798
2799 2005-11-09 Borut Razem <borut.razem AT siol.net>
2800
2801         * support/scripts/sdcc.nsi: added lib/pic to the package
2802
2803 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
2804
2805         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
2806
2807 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2808
2809         * support/regression/tests/bug1348008.c: added
2810         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
2811         * support/regression/tests/bug1337835.c: updated comment
2812
2813 2005-11-06 Borut Razem <borut.razem AT siol.net>
2814
2815         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2816           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2817           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2818           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2819           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
2820           dynamic construction of cl_error_class and derivates - 2.nd try
2821
2822 2005-11-05 Borut Razem <borut.razem AT siol.net>
2823
2824         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
2825           bug, which caused Bus Errors on sparc solaris
2826
2827 2005-11-04 Borut Razem <borut.razem AT siol.net>
2828
2829         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
2830           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
2831           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
2832           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
2833           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
2834           and derivates to resolve the initialization problem on OSX
2835
2836 2005-11-02 Borut Razem <borut.razem AT siol.net>
2837
2838         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2839           corrected typo - #include <winsock2.h>
2840
2841 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
2842
2843         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
2844           (_asxxxx_mapping): added org directive for future enhancements
2845
2846 2005-11-01 Borut Razem <borut.razem AT siol.net>
2847
2848         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
2849           enabled sockets on WIN32
2850         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
2851
2852 2005-10-31 Borut Razem <borut.razem AT siol.net>
2853
2854         * support/regression/generate-cases.py: escape backslashes in {testcase}:
2855           WIN32 backslash path delimiters should be escaped when used in C strings
2856         * support/regression/tests/bitfields.c: exclude failing assertions for
2857           __CYGWIN32__ and __MINGW32__ hosts
2858
2859 2005-10-30 Borut Razem <borut.razem AT siol.net>
2860
2861         * src/SDCCutil.c: corrected double comparison typo
2862
2863 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
2864
2865         * device/lib/medium/Makefile: added for new memory model medium
2866         * device/include/asm/mcs51/features.h: updated for medium/pdata
2867         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
2868           added Multiply & Accumulate sbit's and MAC0_PAGE define
2869         * device/include/mcs51/c8051f300.h: added sfr16 definitions
2870         * device/include/mcs51/c8051f310.h: added sfr16 definitions
2871         * device/lib/_mullong.c: update for medium model
2872         * device/lib/incl.mk: added medium model
2873         * doc/sdccman.lyx: documented medium model
2874         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
2875         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
2876         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
2877         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
2878           (allocParms): set SCLS and OCLS to pdata for medium model
2879         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
2880           for pdata,
2881           (powof2): return <0 if not power of 2
2882         * src/avr/gen.c (genBitWise): use updated powof2
2883         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
2884           (shiftR2Left2Result): small optimization in setup, save acc when storing,
2885           (shiftLLeftOrResult): use B if necessary
2886         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
2887         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
2888         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
2889         * support/regression/Makefile.in: added test-mcs51-medium
2890         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
2891
2892 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
2893
2894         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
2895         specifier unsigned
2896         * device/lib/time.c (mktime): fixed bug 1334315
2897
2898 2005-10-28 Raphael Neider <rneider AT web.de>
2899
2900         * device/include/pic/p16f_common.inc: added common declarations
2901         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
2902
2903 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2904
2905         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
2906           (aopPutUsesAcc): added to predict accumulator use,
2907           (assignResultValue): save acc if necessary,
2908           (genMinusDec): store result if indirectly addressed,
2909           (genDivOneByte):  save acc if necessary,
2910           (movLeft2Result): bugfix if left already in acc,
2911           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
2912             attention to accumulator use (esp. pdata),
2913           (genReceive): receive pdata correctly
2914         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
2915         * src/SDCCicode.h: added isOperandInPagedSpace prototype
2916
2917 2005-10-27 Raphael Neider <rneider AT web.de>
2918
2919         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
2920
2921 2005-10-27 Raphael Neider <rneider AT web.de>
2922
2923         * .version: changed version to 2.5.4
2924         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
2925         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
2926           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
2927             arithmetics support routines
2928         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
2929         * device/lib/Makefile.in: also create installdir for pic
2930
2931         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
2932           pic14 port as well
2933         * src/pic/device.c (dump_sfr): rewritten to delegate register
2934           placement to the linker (use `extern sym' rather than sym EQU addr),
2935           (validAddress): fixed to check last specified address
2936         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
2937           (popGetLit): truncate literal value to 8 bit,
2938           (popGet): moved assert to more appropriate place
2939           (popGetExternal): create pCode operand from and mark the according
2940             symbol as being `extern'
2941           (popGetAddr): added sanity check on immediate's offset, provide
2942             GPOINTER tag on demand
2943           (aopPut): fixed for immediates,
2944           (mov2w_op): move operand's address or contents to WREG (depending on
2945             operand type), safer variant of mov2w,
2946           (movwf,call_libraryfunc): NEW, handy abbreviations,
2947           (get_argument_pcop,get_return_val_pcop,pass_argument,
2948           get_returnvalue): interface for accessing function parameters and
2949             return values,
2950           (assignResultValuei,genRet): use new parameter/return value interface
2951           (pic14_getDataSize): back to old version handling generic pointers,
2952           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
2953             provided implementation and/or fixed old one,
2954           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
2955             calls, removed legacy 8051 reference code
2956           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
2957           (loadSignToC): NEW, move the operands sign bit to CARRY,
2958           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
2959             genRightShiftSigned, accepts negative shift counts,
2960           (setup_fsr): load FSR and adjust IRP (indirect memory access),
2961           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
2962             generic pointers, __data pointers and __code pointers,
2963           (genUnpackBits,genPackBits): rewritten to work with generic pointers
2964             and signed bitfields, limit bitfields to 8 bit,
2965           (genDataPointerGet): fixed number of bytes read,
2966           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
2967           (genPointerGet,genPointerSet): fixed handling of __code pointers,
2968             pointers to constant data are no longer assumed to point to __code
2969             space, removed invalid pointer types,
2970           (bitpatternFromVal): retrieve the PICs representation of an integer
2971             or float literal,
2972           (genDataPointerSet): fixed assigning to po_immediate operands,
2973           (genGenPointerSet): implemented as library call,
2974           (genIfx): fixed incorrect condition,
2975           (genAddrOf): limit generic pointers' addresses to 2 bytes,
2976             provide GPOINTER tag according to destination's storage class,
2977           (genCast): added code to handle casting to generic pointers, added
2978             sign-/zero extension of the result
2979           (aop_isLitLike,op_isLitLike): fixed handling of immediates
2980         * src/pic/gen.h: added macros to access IRP bit in STATUS register
2981         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
2982           extend the result
2983         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
2984           address/register resides in the shared banks
2985           (emitSymbolToFile): improved to handle global and `pinned' symbols,
2986             put all variables into separate sections (have the linker arrange
2987             them)
2988           (picglue): put init code and interrupt handlers in separate sections
2989         * src/pic/main.c: added port specific options table, modified to PORT
2990           structure to make GPOINTERs 3 byte, added pic14_options
2991           (_pic14_do_link): private linking routine (update paths to libraries,
2992             add libsdcc.lib by default)
2993         * src/pic/main.h: declare pic14_options
2994         * src/pic/pcode.c: fixed instructions i/o relations,
2995           (RegCond): reverted to correct version,
2996           (newpCodeOpLit): truncate literals to 8 bit,
2997           (genericPrint): added debug output,
2998           (getRegFromInstruction): fixed for various operand types, simplified
2999           (BuildFlow): fixed broken handling of isntructions with labels
3000           (LinkFlow): start at last instruction in flow (skip trailing comments),
3001             pass the flow on to the next instruction after CALL
3002           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
3003           (insertPCodeInstruction): fixed inserting after a skip instruction,
3004           (DoBankSelect): fixed for labeled instructions
3005           (OptimizepBlock): honor --nopeep switch
3006           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
3007         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
3008         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
3009           (pCodeOptime2pCodes): allow disabling this optimization via
3010             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
3011             but is still buggy), started implementation of a dataflow based
3012             pCode optimization (CSE + dead code elimination)
3013           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
3014         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
3015           names are independant of the stack location and therefore portable across
3016           devices
3017
3018 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
3019
3020         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
3021           (selectSpil): fixed bug 1337835 by not spilling bit variables
3022         * support/regression/tests/bug1337835.c: added test for this bug
3023         * src/mcs51/peeph.def: restart after rule 3.c,
3024           addded rules 263.x to optimize loading constants
3025
3026 2005-10-26 Raphael Neider <rneider AT web.de>
3027
3028         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
3029         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
3030           (genAssign): emit warning when casting literals to generic pointer
3031             type, also applies when taking the address of a fixed variable,
3032           (genCast): improved casting to generic pointers
3033         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
3034           extern variables, added verbose error message
3035         * device/include/pic16/{string.h,errno.h}: added #pragma library c
3036
3037 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
3038
3039         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
3040         carry must be complemented too
3041         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
3042         could be emitted by genMinus
3043         * src/SDCCval.c (constVal): fixed bug 1305065
3044
3045 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
3046
3047         * src/SDCCast.c (addCast): added promotion for bit variables
3048         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
3049         promotion casts + optimisation
3050         (optimizeGetWord): fix warning 'i' might be used uninitialized
3051         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
3052         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
3053
3054 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
3055
3056         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
3057         all chars are promoted to int; promotion should be handled in SDCCast.c
3058
3059 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3060
3061         * device/lib/_strcmp.c: Fixed bug 1326457
3062
3063 2005-10-11 Raphael Neider <rneider AT web.de>
3064
3065         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
3066         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
3067
3068 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3069
3070         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
3071         * support/regression/tests/sfr16.c: added test for the sfr32 bug
3072
3073 2005-10-04 Raphael Neider <rneider AT web.de>
3074
3075         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
3076           device/lib/pic16/pics.all: added pic18f1320
3077         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
3078
3079 2005-09-30 Raphael Neider <rneider AT web.de>
3080
3081         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
3082         * src/pic16/devices.inc: NEW, provides device descriptions
3083         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
3084
3085 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
3086
3087         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
3088           GETHBIT
3089
3090 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
3091
3092         * doc/sdccman.lyx: updated Highest Order Bit documentation,
3093           documented Any Order Bit, Higher Order Byte and Higher Order Word
3094         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
3095         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
3096           (optimizeGetAbit): new, to get any bit, not only the high bit,
3097           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
3098           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
3099           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
3100           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
3101             RIGHT_OP: also try GETBYTE, GETWORD optimization,
3102             GETABIT, GETBYTE, GETWORD: decorate them,
3103           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
3104           (ast_print): added GETABIT, GETBYTE, GETWORD
3105         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
3106         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
3107           (geniCodeBinary): new generic binary icode,
3108           (ast2iCode): added GETABIT, GETBYTE, GETWORD
3109         * src/port.h: updated comment for PORT.hasExtBitOp
3110         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
3111           (genGetByte): new, to get a single byte,
3112           (genGetWord): new, to get a word from a long,
3113           (gen51Code): added GETABIT, GETBYTE, GETWORD
3114         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
3115
3116 2005-09-23 Raphael Neider <rneider AT web.de>
3117
3118         * configure.in, configure: have device/lib/pic configured
3119         * device/lib/Makefile.in: added model-pic14
3120         * device/lib/clean.mk: added pic/ to clean rule
3121         * device/lib/pic: added rudimentary pic14 library providing support
3122           functions for multiplication/division/generic pointer access
3123         * src/SDCCopt.c (convilong): mark support functions as extern
3124           for pic14 port as well
3125         * src/pic/gen.c (genMult): added assertions,
3126           (genpic14Code): emit warning on unhandled iCodes
3127         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
3128         * src/pic/pcode.c (pCodeOpCopy),
3129         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
3130           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
3131           SFR_REGISTER}), made safe for future extensions
3132         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
3133           instructions even if preceeded by SKIP instructions (also remove
3134           them); removed unused code
3135         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
3136           prevents leaving parts of the structure uninitialized after copying
3137
3138 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
3139
3140         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
3141           ago by me
3142         * support/regression/tests/addsub.c: added test for the bug
3143
3144 2005-09-21 Raphael Neider <rneider AT web.de>
3145
3146         * device/include/pic16/pic18f1220.h,
3147           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
3148         * device/lib/pic16/Makefile.rules: added missing opening paren
3149         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
3150           are provided in genutils.c,
3151           (genUminusFloat,genUminus,genCmpEq): added asserts on different
3152           operand/result sizes,
3153           (genCmp): assert on NULL pointers first, then check deref'ed values
3154         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
3155           result size
3156
3157 2005-09-18 Raphael Neider <rneider AT web.de>
3158
3159         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
3160           as these are now unused,
3161           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
3162         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
3163           local, avoids uninitialized pointer dereference on r->name
3164         * src/pic16/ralloc.c (newReg): fixed indentation
3165
3166 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
3167
3168         * src/SDCCval.c (constVal): fixed bug 730366
3169         * support/Util/SDCCerr.c,
3170         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
3171
3172 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
3173
3174         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
3175
3176 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
3177
3178         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
3179
3180 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3181
3182         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
3183           (hex2dec): made hex_digit unsigned char, removed ascii dependance
3184         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
3185           (hex2dec): made hex_digit unsigned char, removed ascii dependance
3186         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
3187         * packihx/packihx.c (hexDigit): made c unsigned char
3188         * as/mcs51/lklibr.c (fndsym),
3189         * link/z80/lkgb.c (gb),
3190         * link/z80/lklibr.c (fndsym),
3191         * link/z80/lkrloc.c (relr),
3192         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
3193         * src/SDCC.lex (checkCurrFile, process_pragma),
3194         * src/SDCCglue.c (spacesToUnderscores),
3195         * src/SDCCmain.c (setParseWithComma, processFile),
3196         * src/asm.c (tvsprintf, printCLine),
3197         * src/avr/gen.c (emitcode, aopPut),
3198         * src/ds390/gen.c (emitcode),
3199         * src/hc08/gen.c (emitcode, emitinline),
3200         * src/mcs51/gen.c (emitcode, genInline),
3201         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
3202           tokenizeLineNode),
3203         * src/pic/ralloc.c (debugLog),
3204         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
3205           tokenizeLineNode),
3206         * src/pic16/ralloc.c (debugLog),
3207         * src/z80/main.c (_process_pragma):
3208            made all ctype.h function calls safe
3209         * src/SDCCopt.c: include math.h for fabs
3210         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
3211           and used them throughout the code to make ctype.h function calls safe
3212         * src/ds390/main.c (asmLineNodeFromLineNode),
3213         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
3214         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
3215            unsigned char*
3216         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
3217           (newpCodeAsmDir): made ctype.h function calls safe
3218         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
3219           pic16_emitcode):  made lbp unsigned char*
3220         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
3221           (pic16_newpCodeAsmDir): made ctype.h function calls safe
3222         * src/xa51/gen.c (emitcode),
3223         * src/z80/gen.c (_emit2): made lbp unsigned char*
3224         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
3225            char*
3226
3227 2005-09-05 Raphael Neider <rneider AT web.de>
3228
3229         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
3230           access bank splitpoint
3231
3232 2005-09-05 Raphael Neider <rneider AT web.de>
3233
3234         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
3235
3236 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
3237
3238         * .version: changed to version 2.5.3
3239         * doc/sdccman.lyx: changed version to 2.5.3,
3240           documented --codeseg and --constseg and pragma codeseg and constseg,
3241           documented bit parameters (reentrant) and bit returning
3242         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
3243            currFunc->recvSize, but is this ok for all ports?
3244           (ast2iCode): result of ~ on unsigned char must be cast to int for
3245            bool to work
3246         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
3247           function pointers in bit space
3248         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
3249           (processFuncArgs): call port.reg_parm() with reentrancy info
3250         * src/port.h,
3251         * src/avr/main.c,
3252         * src/ds390/main.c,
3253         * src/hc08/main.c,
3254         * src/pic/main.c,
3255         * src/pic16/main.c,
3256         * src/xa51/main.c,
3257         * src/z80/main.c: port.reg_parm prototype extended with
3258           "bool reentrant" parameter
3259         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
3260           options.stackAuto for allocating bit register parameters
3261         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
3262           (genSend): set BitBankUsed if it is,
3263           (selectRegBank): factored out of genCall for use in genPcall,
3264           (genCall): removed redundant dtype assignmen, use selectRegBank,
3265           (genPcall): handle returning in Carry properly, save in F0 if needed,
3266           (genReceive): handle bit register parameters
3267         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
3268           (mcs51_assignRegisters): enable bit registers for all reentrant
3269            functions and don't set BitBankUsed unconditionally
3270         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
3271         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
3272         * support/regression/tests/funptrs.c: added tests for BOOL and for return
3273
3274 2005-08-27 Borut Razem <borut.razem AT siol.net>
3275
3276         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
3277         ppc-osx (Darwin) does not support -u option. It seems that it is
3278         supported only on Linux - GNU cp
3279
3280 2005-08-25 Borut Razem <borut.razem AT siol.net>
3281
3282         * sim/ucsim/gui.src/serio.src/Makefile.in,
3283           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
3284           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
3285           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
3286           install and strip, since the strip at /usr/ccs/bin should be used
3287           on solaris
3288
3289 2005-08-24 Borut Razem <borut.razem AT siol.net>
3290
3291         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
3292
3293 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
3294
3295         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
3296         ffffffffu
3297
3298 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
3299
3300         * as/mcs51/aslink.h: completed lkrloc.c prototypes
3301         * as/mcs51/lkmain.c (link_main): fixed warning
3302         * device/include/stdbool.h: ds390 has no advanced bit support yet
3303         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
3304         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
3305         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
3306           and updated their macros
3307         * src/SDCCval.c (constVal): updated comment for renamed b_long
3308
3309 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
3310
3311         * as/mcs51/asdata.c: changed ctype['['] to BINOP
3312         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
3313           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
3314           (oprio): set priority for '['
3315         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
3316            and adb_24_bit
3317         * as/mcs51/asm.h: added defines R_BIT and S_BIT
3318         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
3319         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
3320         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
3321           added overlayable BIT_BANK area
3322         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
3323           (summary2): explain 'T' in legenda
3324         * as/mcs51/lkrloc.c: replaced old K&R style,
3325           (relr): added R_BIT processing,
3326           (errmsg): added "Bit-addressable relocation error",
3327           (adb_bit): added for converting from byte- to bit-addressable space,
3328           (adb_24_bit): added for converting from byte- to bit-addressable space
3329         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
3330            used in reentrant functions now even as return value
3331         * device/lib/_gptrput.c (_gptrput): removed obsolete code
3332         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
3333           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
3334         * src/SDCCglobl.h: added indicator BitBankUsed
3335         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
3336            the bit registers b0-b7
3337         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
3338           (geniCodeCast): fixed bug 1263853,
3339           (geniCodeLogicAndOr): put result in bool or char,
3340           (geniCodeReceive): added parameter func for accessing the return type,
3341           (geniCodeFunctionBody): pass func to geniCodeReceive
3342         * src/SDCCmain.c: added indicator BitBankUsed
3343         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
3344         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
3345           (checkSClass): don't put automatic bool/bit on stack,
3346           (checkFunction): removed check on function cannot return bit
3347         * src/SDCCsymt.h: added newBoolLink prototype
3348         * src/mcs51/gen.c (rb1regs): added bit registers,
3349           (movc): created for assigning to carry,
3350           (pushReg, popReg): created for pushing registers,
3351           (sameRegs): check both AOP_REG and AOP_CRY types,
3352           (aopOp): handle bit registers,
3353           (aopPut): optimization no self-assign,
3354           (saveRegisters): push reg->base (bits) only once for bit registers,
3355            and use pushReg,
3356           (unsaveRegisters): pop reg->base only once and use popReg,
3357           (assignResultValue): added parameter func and return in carry for bits,
3358           (genIpush): optimization no reload in A if not changed,
3359           (genSend): bit parameters in reentrant functions are passed in bit
3360            registers by first assigning to bits in B, then save registers and
3361            copy B to bits,
3362           (genCall): handle returning in Carry properly, save it in F0 if needed,
3363           (genPcall): updated assignResultValue call, this is not safe yet for bit
3364            returning function !!!
3365           (genFunction): don't generate equ's for bit registers and use pushReg,
3366           (genEndFunction): take care of bit returning functions and use popReg,
3367           (genRet): return bit in Carry,
3368           (genIfx): optimize bit registers and other directly addressable bits,
3369           (genReceive): updated assignResultValue call
3370         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
3371           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
3372            registers when using stack-auto
3373         * src/mcs51/ralloc.c (_G): added allBitregs,
3374           (regs8051): added the bit registers,
3375           (createStackSpil): use macro IS_BIT,
3376           (getRegBit): added to allocate a bit register, else spill,
3377           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
3378           (updateRegUsage): factored out to ease stepping while debugging,
3379           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
3380            also allocate bit registers,
3381           (fillGaps): handle bit registers,
3382           (findAllBitregs): added to create bit vector with all bit registers,
3383           (mcs51_allBitregs): returns this bit vector,
3384           (mcs51_assignRegisters): when using stack-auto use bit registers for
3385            passing parameters and creating local variables
3386         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
3387
3388 2005-08-22 Borut Razem <borut.razem AT siol.net>
3389
3390         * device/lib/Makefile.in: replaced find option -or with -o
3391           to make it run on solaris
3392
3393 2005-08-22 Raphael Neider <rneider AT web.de>
3394
3395         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
3396           fixes #1265442 (crash on Solaris)
3397
3398 2005-08-20 Borut Razem <borut.razem AT siol.net>
3399
3400         * configure, configure.in: added tests for libsocket and libnsl libraries,
3401           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
3402           from support/regression/Makefile.in
3403         * support/regression/Makefile.in: added
3404         * device/lib/pic16/Makefile.common.in: force make to use bash shell
3405         * sim/ucsim/libtool: regenerated on sparc-solaris
3406         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
3407           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
3408           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
3409           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
3410           sparc-solaris, which doesn't use GNU ld linker
3411         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
3412         * as/Makefile: find on sparc-solaris does not support -maxdepth option
3413
3414 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
3415
3416         * src/mcs51/peeph.def: updated comments
3417
3418 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3419
3420         * device/lib/_gptrget.c,
3421         * device/lib/_gptrput.c: slightly shorter
3422         * doc/sdccman.lyx: incremented version
3423         * src/mcs51/peeph.def: moved peephole comments to the line of first
3424           change to better keep line correlation, reanimated 186.e
3425         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
3426
3427 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3428
3429         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
3430           David Saxton with quotes around file name.
3431
3432 2005-08-15 Borut Razem <borut.razem AT siol.net>
3433
3434         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
3435           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
3436           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
3437           make tests run on x86_64 platform
3438
3439 2005-08-13 Raphael Neider <rneider AT web.de>
3440
3441         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
3442           as it might be executed DURING a build (parallel make is wonderful)
3443
3444 2005-08-13 Raphael Neider <rneider AT web.de>
3445
3446         * device/lib/Makefile.in (port-specific-objects-pic16):
3447           revert to cp $(PORT)/bin/*.* $(PORTDIR)
3448         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
3449           dependency
3450         * device/lib/pic16/Makefile.rules: build subdirs before creating
3451           the library, removed builddir rule, create $(builddir) early in
3452           recurse rule, use empty recurse rule for leaf directories
3453         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
3454           mkdir errors (race condition), removed duplicate suffix "hex"
3455           from clean rules
3456         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
3457         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
3458           prevents mkdir -p from aborting on Alpha
3459
3460 2005-08-12 Raphael Neider <rneider AT web.de>
3461
3462         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
3463           db-statements in order to allow for arrays of pointers in code
3464           sections to be placed without interspersed 0-padding, fixes
3465           bug #1256215
3466         * (emitStatistics): fixed division by zero for pic18f1220
3467         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
3468           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
3469         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
3470         * (pic16_pCodeConstString): keep track of already emitted string
3471           literals to prevent "duplicate definitions of symbol _str_NR"
3472         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
3473           debug message
3474         * device/lib/Makefile.in: ignore failing PIC16 library builds
3475         * device/lib/pic16/Makefile: do not build if gputils are missing
3476         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
3477
3478 2005-08-10 Raphael Neider <rneider AT web.de>
3479
3480         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
3481           my last commit)
3482
3483 2005-08-10 Raphael Neider <rneider AT web.de>
3484
3485         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
3486           Rokas' patch to add the new fixed point type "__fixed16x16"
3487         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
3488           functions for __fixed16x16 arithmetics
3489         * device/lib/pic16: reimplemented the build system to support
3490           a separate build directory, better handling of libio (create
3491           the library in a separate subdir for each architecture) and
3492           easier configuration (centralized in Makefile.common)
3493
3494 2005-08-07 Raphael Neider <rneider AT web.de>
3495
3496         * src/pic16/gen.c (genrshTwo): fixed sign extension
3497         * src/pic16/device.c: added pic18f2320, 4220 and 4320
3498         * device/include/pic16/pic18f2220.h: changed some bit definitions,
3499           added T0CONbits
3500         * device/include/pic16/pic18f4220.h: NEW, header for
3501           pic18f4220 and pic18f4320
3502         * device/include/pic16/pic18fregs.h: added new devices,
3503           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
3504         * device/include/pic16/signal.h: resolved name clashes
3505           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
3506           to also allow testing for interrupt enable bits, added
3507           comments on how to use the macros
3508         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
3509         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
3510           register definitions for the devices
3511         * device/lib/pic16/pics.all: added new devices
3512         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
3513           allocated memory
3514         * device/lib/pic16/libc/stdlib/memfree: do not count
3515           the block header as free memory
3516         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
3517           simplified and added missing end-of-blocklist-marker
3518           (reported by Peter Onion, fixes #1252814)
3519         * (_mergeHeapBlock): fixed loop condition
3520         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
3521           len==0, restructured code
3522         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
3523           up a bit, reduced bitfield accesses, prevent endless loops
3524           in case of heap corruption
3525         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
3526           "unreferenced arguments/must return a value" warnings
3527         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
3528           replaced BAUDREG with SPBRG
3529         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
3530           device/lib/pic16/debug/gstack/gstack.c: replaced
3531           _naked, _asm, _endasm with __naked, __asm, __endasm
3532
3533 2005-08-05 Raphael Neider <rneider AT web.de>
3534
3535         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
3536           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
3537
3538 2005-08-05 Borut Razem <borut.razem AT siol.net>
3539
3540         * device/lib/Makefile.in: added missing ';'
3541         * configure: removed ^M characters
3542
3543 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3544
3545         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
3546           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
3547           License
3548
3549 2005-08-04 Borut Razem <borut.razem AT siol.net>
3550
3551         * configure.in: pic16 libraries build 2nd try - enable running
3552           configure in device/lib/pic16
3553         * configure: regenerated from configure.in
3554         * device/lib/Makefile.in: create $(PORT)/bin directory
3555
3556 2005-08-03 Raphael Neider <rneider AT web.de>
3557
3558         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
3559           to get/set values via pointers
3560         * (genUnpackBits,genPackBits): changed detection of
3561           ptr->bitfield vs. sym.bitfield, fixed access via generic
3562           pointers, removed dead (wrong) code for multibyte bitfields
3563         * (genNearPointerGet, genGenPointerGet): removed useless code,
3564           fixed bitfield detection, fixes #1250594
3565         * (genNearPointerSet): removed useless code
3566         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
3567           and introduced macro pic16_emitpcode that conditionally emits
3568           the origin of the following pCode (useful for debugging SDCC)
3569         * src/pic16/pcode.c: changed (and disabled) some debug outputs
3570         * (createDefmap): fixed handling of LFSR for --optimize-df
3571
3572 2005-08-02 Borut Razem <borut.razem AT siol.net>
3573
3574         * device/lib/Makefile.in: pic16 libraries build enabled since
3575           gputils-0.13.2 are now localy installed at sourceforge's compile farm
3576
3577 2005-08-02 Raphael Neider <rneider AT web.de>
3578
3579         * src/pic16/gen.c (genPackBits): removed deprecated warning
3580         * (genGenPointerSet): fixed bitfield detection
3581
3582 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3583
3584         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
3585
3586 2005-07-31 Raphael Neider <rneider AT web.de>
3587
3588         * device/lib/pic16/libdev/pic18f458.c,
3589           device/include/pic16/pic18f458.h: added missing T0CONbits
3590
3591 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3592
3593         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
3594
3595 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
3596
3597         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
3598
3599 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3600
3601         * device/include/mcs51/at89c51ed2.h: added.
3602
3603 2005-07-23 Raphael Neider <rneider AT web.de>
3604
3605         * src/pic/gen.h: added emitpcode macro for debugging
3606         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
3607           and replace by macro adding debug information on demand
3608         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
3609         * (gencjne): tried to fix; replaced with correct (slower) code
3610         * (gen{Unp,P}ackBits): fixed single bit access
3611         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
3612         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
3613           previous instruction
3614         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
3615           register has to be handled with care (forbidding movement
3616           of assignments/uses, removing assignments completely, ...)
3617         * (pCodeOptime2pCodes): make use of regIsSpecial
3618         * added lots of debugging output (commented out)
3619         * src/pic/rallloc.c (deassignLRs): prevent operand registers
3620           from being reused as result UNLESS it is known to work
3621
3622 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
3623
3624         * support/Util/dbuf.h: include <stddef.h> for size_t
3625         * .version: changed to version 2.5.2
3626
3627 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3628
3629         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
3630
3631 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3632
3633         * src/hc08/gen.c (genMinus): fixed bug #1241835,
3634           (genModOneByte): removed needless psha/pula
3635
3636 2005-07-22 Raphael Neider <rneider AT web.de>
3637
3638         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
3639           have PIC14 handled like PIC16, fixes broken pic14 linker calls
3640         * src/pic/gen.c (resolveIfx): do not "invent" labels
3641         * (genSkipc): changed to positive logic
3642         * (genSkipCond): removed as no longer needed
3643         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
3644           backport from PIC16
3645         * (genLeftShift): check operands are in different registers
3646         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
3647           INCF does not update CARRY...
3648         * src/pic/main.c: fixed _linkCmd
3649         * src/pic/pcode.c (unlinkpCode): added inactive code
3650         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
3651           alive (do not assign result and operand overlapping registers)
3652
3653 2005-07-22 Raphael Neider <rneider AT web.de>
3654
3655         * src/pic/device.c (dump_sfr): replaced register declaration with
3656           call to emitSymbolToFile() to avoid duplicate symbols
3657         * (assignRelocatableRegisters): do not declare external symbols
3658         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
3659           right (take size of type, not etype)
3660         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
3661         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
3662         * (packRegsForAccUse): disabled assignment of WREG as
3663           the result reg to prevent occurence of just fixed #1235003,
3664           fixes #1242954
3665         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
3666           symbols (avoids duplicate symbols in .asm file)
3667         * (pic14emitRegularMap): use emitSymbolToFile()
3668         * src/pic/gen.c (aopOp): fixed spillLocation handling
3669         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
3670         * (genDataPointerSet): removed unneccessary variables/output
3671
3672 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
3673
3674         * as/mcs51/lkarea.c: enlarged codemap for banked memory
3675         * device/lib/mcs51/crtbank.asm: added # to 0x0F
3676
3677 2005-07-21 Raphael Neider <rneider AT web.de>
3678
3679         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
3680           architecture cannot handle them efficiently, fixes bug #1235003
3681         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
3682           check for empty sets before using them (fixes bug #1232190)
3683
3684 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
3685
3686         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
3687           (lnksect2): generate warnings for memory overlap
3688         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
3689           constseg to set the name of these segments so you can instruct the linker
3690           to place them in banks
3691         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
3692         * src/SDCCglobl.h: added MODEL_HUGE to enum,
3693           added code_seg and const_seg to options
3694         * src/SDCCglue.c (emitMaps): use options.const_seg,
3695           (createInterruptVect): put interrupt vectors in segment HOME,
3696           (glue): put HOME before static segment and put the main glue in HOME,
3697           (glue): use options.code_seg
3698         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
3699         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
3700           these segments so you can instruct the linker to place them in banks
3701           (linkEdit): use code_loc for HOME segment which should be the first
3702           segment in code memory now
3703         * src/SDCCmem.c: fixed more stuff like bug 1238386
3704         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
3705           (changePointer): don't change function pointers to code pointers for
3706           banked functions,
3707           (compareType): added exceptional check for banked function pointers
3708         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
3709         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
3710           after static in code memory
3711         * src/mcs51/gen.c: added aopLiteralLong prototype,
3712           (aopForSym): use getSize for functions,
3713           (genCall): generate banked calls over one trampoline __sdcc_banked_call
3714           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
3715           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
3716           the segment,
3717           (genPcall): use call for literal function pointers and generate banked
3718           calls over the one trampoline so there's only one place for the user to
3719           modify according to his/hers hardware,
3720           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
3721           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
3722         * src/mcs51/main.c: added keyword banked,
3723           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
3724         * support/Util/SDCCerr.c,
3725         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
3726           needed for passing the bank and address to the trampoline
3727         * device/lib/mcs51/crtbank.asm: added for bankswitching
3728         * device/lib/mcs51/Makefile: added crtbank
3729
3730 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3731
3732         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
3733           for fields at offset 0 of a struct or union as reported
3734           on 2005-07-07 in the developer mailing list.
3735
3736 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
3737
3738         * src/SDCCmem.c: fixed bug 1238386
3739
3740 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3741
3742         * src/mcs51/peeph.def: added labelrefcounting for peepholes
3743           (patch #1144962), added peephole 300, enabled 259.x
3744         * doc/sdccman.lyx: removed screenshot and provided link instead
3745
3746 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3747
3748         * doc/sdccman.lyx: added section about debugging with ddd
3749         * doc/figures/ddd_example.eps: screenshot of debugging session
3750
3751 2005-07-04 Raphael Neider <rneider AT web.de>
3752
3753         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
3754           like CODE pointers, fixes #1115683
3755         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
3756           call, fixes bugs #1232211, #1228110,
3757           fixed wrong casts to pCodeFlow from pCodeInstructions
3758
3759 2005-07-04 Raphael Neider <rneider AT web.de>
3760
3761         * src/pic/gen.c (popGet): changed assert to allow for
3762           bit operands
3763         * (popGetAddr): changed signature to provide
3764           an additional index, patched all call sites
3765         * (genCmpEq): handle literal-like operands correctly
3766         * (genAddrOf): added sanity checks on __code/__data pointers
3767         * (genAssign): added handling of symbols from __code section
3768         * (gencjne): do not generate code for comparisons whose result
3769           is neither stored nor used, fixes bug #1171114
3770         * (AccLsh, AccRsh): operate on operand instead of WREG
3771         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
3772           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
3773           by known count
3774         * rewrote complete shift-by-literal logic, commented unused
3775           functions out
3776         * (genConstPointerGet): get multiple bytes (if result size > 1),
3777           fixed handling of non-immediate addresses
3778         * (genPointerGet): handle CODE pointers like CONST pointers
3779         * (genpic14Code): insert C-SRC lines as Cource-pCodes
3780         * ({aop,op}_isLitLike): NEW, single place to decide whether an
3781           operand is to be treated as a literal or not
3782         * (mov2w,genPcall,genCmpEq),
3783           src/pic/genarith.c: use aop_isLitLike() to decide between
3784           literal/register contents
3785         * (addSign): added missing offset
3786         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
3787           only emit comment in debug-mode,
3788           use {aop,op}_isLitLike throughout the file
3789         * src/pic/glue.c: fix initializers for pointers (work in progress)
3790         * src/pic/pcode.c (get_op): honor index on _const symbols
3791         * ({reset,dump}pCodeStatistics): NEW, estimate code size
3792         * (dumppBlock): added pCode size estimation
3793         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
3794           check for IS_SYMOP before OP_SYMBOL'ing
3795         * fixed indentation, compacted switch-statements
3796         * (allocReg): find free register and allocate it instead of
3797           allocating new registers all the time
3798         * (deassignLRs): prevent POINTER_GET's from being assigned the same
3799           registers as its operands (necessary only for multibyte GETs)
3800
3801 2005-07-01 Raphael Neider <rneider AT web.de>
3802
3803         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
3804           debugging .asm-output macros FENTRY + FEXIT
3805         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
3806           way... I wonder...
3807         * (emitpComment): NEW, printf to pCode
3808         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
3809           offset handling
3810         * (popGetAddr): NEW, variant of popGet to access an immediates
3811           high(er) bytes instead of the n'th byte of memory they reference,
3812           replaced popGet with popGetAddr where neccessary
3813         * (genDataPointerGet): reactivated and fixed implementation
3814         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
3815           accesses
3816         * (genDataPointerSet): fixed multibyte assignments
3817         * (genpic14Code): fixed --i-code-in-asm handling
3818         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
3819         * (genPlus): fixed index-out-of-bounds error
3820         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
3821         * src/pic/ralloc.c: added debugging output macro FENTRY2
3822         * (spillThis): fixed indentation, enbraced for-body for clarity
3823         * (rematStr): commented out as now unused
3824         * (regTypeNum): commented out special spill case (overwrites
3825           arbitrary values)
3826         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
3827
3828 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
3829
3830         * doc/sdccman.lyx: documented sfr16/sfr32,
3831           added example for using storage class with function pointers
3832         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
3833
3834 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
3835
3836         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
3837         * device/lib/_itoa.c,
3838         * device/lib/_ltoa.c: optimized codesize
3839         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
3840           but don't know how to suppress the double warning.
3841         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
3842         * support/Util/SDCCerr.c,
3843         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
3844
3845 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
3846
3847         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
3848           fixed old K&R prototypes
3849         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
3850         * device/lib/_gptrget.c,
3851         * device/lib/_gptrgetc.c,
3852         * device/lib/_gptrput.c: changed versions for new memory indicator values,
3853           also new versions for small generic pointers and banked generic pointers
3854         * src/port.h: added const_name
3855         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
3856         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
3857         * src/SDCCcse.c (findPrevIc): check all associative operators
3858         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
3859         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
3860         * src/SDCCmem.c: updated comments,
3861           set far-space to 0 for pdata, results in optimized code
3862         * src/SDCCmem.h: added macro CONST_NAME
3863         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
3864           moving the info into the highest bits, see also gptrget/gptrput
3865         * src/src.dsp: added sdcc.ico to project files
3866         * src/avr/gen.c (genCast): fixed bug 0x%d
3867         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
3868         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
3869           relation between ptr_type and DCL_TYPE,
3870           (genCast): fixed bug 0x%d
3871         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
3872           (CODE)" for const_name
3873         * src/hc08/gen.c (genCast): fixed bug 0x%d
3874         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
3875           (hc08_port): added "CONST (CODE)" for const_name
3876         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
3877           (aopForRemat, adjustArithmeticResult): disconnected direct relation
3878           between ptr_type and DCL_TYPE,
3879           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
3880           operand* and took AOP() inside function so sfr-ness can be checked,
3881           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
3882           new prototype,
3883           (genFunction, genEndFunction): optimized stack setup,
3884           (genMinus): optimized for literals with ending zeroes (in bytes),
3885           (genCast): fixed bug 0x%d
3886         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
3887           (mcs51_port): added "CONST (CODE)" for const_name
3888         * src/mcs51/peeph.def: made rule 226 more generic
3889         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
3890         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
3891         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
3892         * src/z80/main.c (z80_port): added NULL for const_name,
3893           (gbz80_port): added NULL for const_name
3894         * support/regression/tests/bug663539.c,
3895         * support/regression/tests/sfr16.c: new tests
3896
3897 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3898
3899         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
3900
3901 2005-06-24 Raphael Neider <rneider AT web.de>
3902
3903         * device/lib/pic16/libdev/pic18f[68][567]20.c:
3904           corrected typos...
3905         * device/include/pic16/signal.h: added USBIF
3906           and SIG_USB
3907
3908 2005-06-24 Raphael Neider <rneider AT web.de>
3909
3910         * device/lib/pic16/libdev/pic18f2455.c,
3911           device/include/pic16/pic18f2455.h: NEW
3912         * device/include/pic16/pic18fregs.h,
3913           device/lib/pic16/pics.all,
3914           src/pic16/device.c: added 18f2455
3915         * device/lib/pic16/libdev/pic18f[68][567]20.c,
3916           device/include/pic16/{pic18f[68][567].h,usart.h}:
3917           replaced MULTIPLE_USARTS define with more relaible
3918           compatibility sfrs (for USART access)
3919
3920 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
3921
3922         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
3923           and the output asm file line is printed on two lines.
3924
3925 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3926
3927         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
3928           BGT, BLE, BHI, and BLS instructions
3929         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
3930           genCmpEq): removed
3931         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
3932           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
3933           fixes bug #1216342
3934         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
3935
3936 2005-06-15 Raphael Neider <rneider AT web.de>
3937
3938         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
3939         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
3940         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
3941           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
3942           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
3943
3944 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3945
3946         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
3947           Marcel Telka in bug #1215704
3948
3949 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
3950
3951         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
3952           located in shared memory bank.
3953
3954 2005-05-31 Raphael Neider <rneider AT web.de>
3955
3956         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
3957           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
3958           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
3959
3960 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
3961
3962         * device/lib/_strncpy.c: fixed the fix
3963
3964 2005-05-26 Raphael Neider <rneider AT web.de>
3965
3966         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
3967           initializers with \0, bug #1208187
3968         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
3969           intializers with \0, bug #1208187
3970
3971 2005-05-26 Raphael Neider <rneider AT web.de>
3972
3973         * src/pic16/glue.c (pic16_printIvalChar): fixed string
3974           initializers with \0, bug #1208187
3975         * src/pic16/main.c (_process_pragma): added sanity checks
3976           for stack position and size, emit warnings when appropriate
3977
3978 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
3979
3980         * device/lib/_strncpy.c: fixed not filling with \0
3981
3982 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3983
3984         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
3985           createFunction),
3986         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
3987           compound_statement),
3988         * src/SDCCsymt.h,
3989         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
3990
3991 2005-05-24 Raphael Neider <rneider AT web.de>
3992
3993         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
3994
3995 2005-05-24 Raphael Neider <rneider AT web.de>
3996
3997         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
3998           TRISE definitions, closes bug #1162453
3999
4000 2005-05-22 Raphael Neider <rneider AT web.de>
4001
4002         * src/pic16/main.c (_process_pragma): check for missing
4003           arguments to pragmas code and udata
4004         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
4005           consistency fixes to match other headers (thanks to Jim Paris)
4006         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
4007
4008 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
4009
4010         * src/SDCCicode.c (isOperandEqual): fixed missing ;
4011
4012 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
4013
4014         * support/regression/tests/bug1198642.c: new test
4015         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
4016         * src/SDCCcse.c (findPrevIc): added comment, please have a look
4017         * support/scripts/resource.h,
4018         * support/scripts/resource.rc,
4019         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
4020         * support/scripts/sdcc.ico: added 32x32 icon
4021
4022 2005-05-18 Raphael Neider <rneider AT web.de>
4023
4024         * device/lib/pic16/libdev/pic18f*.c,
4025         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
4026           keywords to "__sfr" and "__at (X)"
4027         * device/include/pic16/pic18fregs.h: added pic18f4520
4028         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
4029           #1203088 (MPLAB compatibility)
4030
4031 2005-05-17 Raphael Neider <rneider AT web.de>
4032
4033         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
4034         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
4035         * device/lib/pic16/pics.all: added new devices
4036         * src/pic16/device.c: added support for pic18f4520
4037
4038 2005-05-16 Raphael Neider <rneider AT web.de>
4039         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
4040         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
4041         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
4042           convenience function for bit access
4043
4044 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4045
4046         * device/lib/printf_large.c: fixed bug 1193299
4047         * support/regression/tests/bug1057979.c: added test %3.3s
4048
4049 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4050
4051         * device/include/mcs51/8051.h,
4052         * device/include/mcs51/8052.h: made parseable with lint
4053         * device/include/mcs51/lint.h: added include file for (sp)lint
4054         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
4055         * doc/cdbfileformat.lyx,
4056         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
4057
4058 2005-05-14 Raphael Neider <rneider AT web.de>
4059
4060         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
4061         * device/lib/pic16/libc/stdlib/itoa.c (new)
4062         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
4063         * device/lib/pic16/libio/Makefile: exclude subdir according to
4064           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
4065         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
4066         * src/pic16/gen.c (genFunction): prevent annoying warning
4067         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
4068           nameclashes on BeOS
4069         * support/cpp2/cppmain.c (cpp_output_string): new
4070         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
4071           fixes bug 1116802
4072
4073 2005-05-13 Borut Razem <borut.razem AT siol.net>
4074
4075         * src/SDCCmain.c (linkEdit): fixed bug 1195202
4076
4077 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4078
4079         * .version: changed to version 2.5.1; back to bleeding edge development
4080
4081 2005-05-11 Borut Razem <borut.razem AT siol.net>
4082
4083         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
4084           generate PDF version 1.3 documents
4085
4086 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4087
4088         * .version: changed to version 2.5.0
4089
4090 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4091
4092         * doc/sdccman.lyx: updated weblinks, index and smaller updates
4093
4094 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4095
4096         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
4097         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
4098         well as many smaller updates.
4099         * .version: changed to version 2.5.0-pre1
4100
4101 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4102
4103         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
4104
4105 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
4106
4107         * support/regression/tests/bug1185672.c: added
4108         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
4109           bug 1185672
4110         * src/mcs51/gen.c (genCall): added comments, made it look safer
4111         * src/mcs51/gen.c (genEndFunction): simplified
4112
4113 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
4114
4115         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
4116
4117 2005-04-14 Borut Razem <borut.razem AT siol.net>
4118
4119         * fixed bug 1045046 - SIGSEGV with really simple code?:
4120           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
4121           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
4122
4123 2005-04-14 Borut Razem <borut.razem AT siol.net>
4124
4125         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
4126           src/pic16/device.h: temporarily disabled experimental #inline pragma
4127           for 2.5.0 release
4128
4129 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
4130
4131         * device/include/z80/stdio.h,
4132         * device/include/z80/string.h: removed these highly incomplete files so
4133           SDCC can use the default ones in device/include/
4134
4135 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4136
4137         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
4138         gcc warning.
4139         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
4140         fix sdcpp warnings.
4141
4142 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
4143
4144         * device/include/malloc.h: removed redundant __reentrant prototypes
4145         * device/lib/_mullong.c: added working xstack variant in asm (C version
4146           doesn't pass regression tests)
4147         * device/lib/bpx.c: used __data and made bpx char for mcs51
4148         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
4149           (createFunction): fixed bug with xstackPtr
4150         * src/SDCCcse.c: corrected comments
4151         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
4152           (killDeadCode, eBBlockFromiCode): removed unused code
4153         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
4154           corrected comments
4155         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
4156           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
4157           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
4158           (genModOneByte): fixed warning in MSVC
4159         * src/mcs51/main.c (): added comments
4160         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
4161
4162 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
4163
4164         * src/SDCCmain.c (linkEdit): oops, changed one line too many
4165
4166 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
4167
4168         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
4169
4170 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
4171
4172         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
4173         characters arrays of larger size than the declared one.
4174
4175 2005-04-10 Borut Razem <borut.razem AT siol.net>
4176
4177         * src/pic/gen.c (genInline),
4178           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
4179           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
4180           (findNextInstruction), (findPrevInstruction),
4181           (findInstructionUsingLabel),
4182           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
4183         * src/pic/pcode.c (findLabel): added missing '\n'
4184         * src/src.dsp: added SDCCdwarf2.c to the project
4185
4186 2005-04-09 Borut Razem <borut.razem AT siol.net>
4187
4188         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
4189
4190 2005-04-08 Raphael Neider <rneider AT web.de>
4191
4192         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
4193           into the chain after a given one) and mergeDefmapSymbols (combine
4194           defmap entries for each symbol per pcode)
4195         * (createDefmap): have defmap entries merged in the end
4196         * (defmapReplaceSymRef): split defmap entries covering two accesses to
4197           a symbol before replacing one access type's symbol, merge symbols in
4198           the end (replacement symbol might already have an entry)
4199         * (assignValnums): keep reference to written WREG intact
4200
4201 2005-04-08 Raphael Neider <rneider AT web.de>
4202
4203         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
4204           Alpha)
4205
4206 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
4207
4208         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
4209         bytes
4210
4211 2005-04-07 Raphael Neider <rneider AT web.de>
4212
4213         * device/include/pic16/usart.h: added compatibility defines for
4214           devices with more than one USART
4215         * device/include/pic16/pic18f[68][567]20.h: activated above defines
4216
4217 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
4218
4219         * device/lib/Makefile.in: updated for port specific include
4220
4221 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
4222
4223         * support/regression/ports/mcs51/spec.mk: added mcs51 include
4224
4225 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
4226
4227         * device/include/8051.h,
4228         * device/include/8052.h,
4229         * device/include/at89S8252.h,
4230         * device/include/at89c55.h,
4231         * device/include/at89x051.h,
4232         * device/include/at89x51.h,
4233         * device/include/at89x52.h,
4234         * device/include/mcs51reg.h,
4235         * device/include/reg51.h,
4236         * device/include/reg764.h,
4237         * device/include/regc515c.h,
4238         * device/include/sab80515.h: (re)moved these 12 files
4239         * device/include/mcs51/8051.h,
4240         * device/include/mcs51/8052.h,
4241         * device/include/mcs51/at89S8252.h,
4242         * device/include/mcs51/at89c55.h,
4243         * device/include/mcs51/at89x051.h,
4244         * device/include/mcs51/at89x51.h,
4245         * device/include/mcs51/at89x52.h,
4246         * device/include/mcs51/mcs51reg.h,
4247         * device/include/mcs51/reg51.h,
4248         * device/include/mcs51/reg764.h,
4249         * device/include/mcs51/regc515c.h,
4250         * device/include/mcs51/sab80515.h: and added them here
4251
4252 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
4253
4254         * device/include/stdarg.h: changed SDCC specific keywords to double
4255           underlined form.
4256         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
4257           mcs51 and ds390.
4258         * device/include/hc08/mc68hc908gp32.h,
4259         * device/include/hc08/mc68hc908jb8.h,
4260         * device/include/hc08/mc68hc908jkjl.h,
4261         * device/include/hc08/mc68hc908qy.h: fixed comments
4262         * device/include/mcs51/README: updated
4263         * device/include/mcs51/c8051f120.h: added PINRSF
4264         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
4265         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
4266           amidst code. Also inline is not supported.
4267
4268 2005-04-06 Raphael Neider <rneider AT web.de>
4269
4270         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
4271         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
4272           callers stack/frame pointers
4273
4274 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
4275
4276         * device/include/pic16/usart.h: added, missing in previous commit,
4277         * device/include/pic16/adc.h: fixed typo,
4278         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
4279         commit,
4280         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
4281         <p18fxxx.inc>
4282         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
4283         uninitialized because a bug appears with gplink
4284         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
4285         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
4286         complains for unrecognised option
4287
4288 2005-04-05 Raphael Neider <rneider AT web.de>
4289
4290         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
4291           structs as well (using memcpy)
4292         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
4293           on ISRs (GOTO has no label)
4294         * src/pic16/device.h: added OF_OPTIMIZE_DF
4295         * src/pic16/main.c: added compiler switch --optimize-df to enable the
4296           new data flow analysis/optimization
4297         * src/pic16/pcode.c: added (prototypes for and implementation of)
4298           dataflow analysis functions, fixed pCodeInstructions' inCond and
4299           outCond values, made RCALL a branch instruction
4300         * (pic16_unlinkpCode): keep C line if possible
4301         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
4302           C line moved if possible
4303         * (pic16_getRegFrompCodeOp): NEW, improved version of...
4304         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
4305           to use new pic16_getRegFrompCodeOp (works for more SFRs)
4306         * (pic16_BuildFlow): fixed skip instructions with label (did not start
4307           new flow)
4308         * (pic16_getJumptabpCode): NEW, needed in...
4309         * (LinkFlow): fixed handling of jumptables, calls and conditional
4310           branches
4311         * (pic16_InsertCommentAfter): NEW
4312         * (pic16_pCodeReplace): made verbose and flow preserving
4313         * (AnalyzeFlow): added call to data flow analysis
4314         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
4315         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
4316         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
4317
4318 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4319
4320         * src/SDCCast.c (decorateType): fixed bug #1105626
4321
4322 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
4323
4324         * device/include/asm/pic16/features.h,
4325         * pic18f*.h headers,
4326         * device/include/pic16/adc.h,
4327         * device/include/pic16/delay.h,
4328         * device/include/pic16/i2c.h,
4329         * device/include/pic16/malloc.h,
4330         * device/include/pic16/stdio.h,
4331         * device/include/pic16/stdlib.h,
4332         * device/include/pic16/string.h,
4333         * device/lib/pic16/libc/stdio/printf_tiny.c,
4334         * device/lib/pic16/libc/stdio/printf_small.c,
4335         * device/lib/pic16/libc/stdio/strmgpsim.c,
4336         * device/lib/pic16/libc/stdio/strmmssp.c,
4337         * device/lib/pic16/libc/stdio/strmusart.c,
4338         * device/lib/pic16/libc/stdio/vfprintf.c,
4339         * device/lib/pic16/libc/stdlib/ltoa.c,
4340         * device/lib/pic16/libc/stdlib/putchar.c,
4341         * device/lib/pic16/libc/stdlib/x_ftoa.c,
4342         * device/lib/pic16/libc/stdlib/memchrpgm.c,
4343         * device/lib/pic16/libc/stdlib/memchrram.c,
4344         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
4345         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
4346         * device/lib/pic16/libio/adc/adcbusy.c,
4347         * device/lib/pic16/libio/adc/adcread.c,
4348         * device/lib/pic16/libio/adc/adcsetch.c,
4349         * device/lib/pic16/libio/usart/ubaud.c,
4350         * device/lib/pic16/libio/usart/ubusy.c,
4351         * device/lib/pic16/libio/usart/udrdy.c,
4352         * device/lib/pic16/libio/usart/uopen.c,
4353         * device/lib/pic16/libio/usart/uputc.c,
4354         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
4355         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
4356         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
4357         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
4358         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
4359         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
4360         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
4361         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
4362         specific keywords to double underlined form,
4363         * device/lib/pic16/libc/Makefile.rules,
4364         * device/lib/pic16/libsdcc/Makefile.rules,
4365         * device/lib/pic16/libm/Makefile,
4366         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
4367         to compile with C standard set in Makefile.common
4368         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
4369         rand.c and crc.c in compilation process,
4370         * device/lib/pic16/libsdcc/int/divuint.c,
4371         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
4372         `c' from signed to unsigned,
4373         * device/lib/pic16/startup/crt0.c,
4374         * device/lib/pic16/startup/crt0i.c,
4375         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
4376         keywords to double underlined form, bug fixes in _do_cinit function
4377         which prevented the correct initialization of the .idata segment,
4378         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
4379         core to enter a infinite loop
4380         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
4381
4382 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4383
4384         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
4385
4386 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4387
4388         * device/include/Makefile.in: add support for hc08 subdirectory
4389         * device/include/hc08/: new subdirectory
4390         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
4391         Lucas Loizaga, thanks!
4392         * device/include/hc08/mc68hc908qy.h,
4393         * device/include/hc08/mc68hc908gp32.h,
4394         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
4395         their own directory. Changed internal macro names to use the compiler
4396         reserved namespace. Changed SDCC specific keywords to double
4397         underlined form.
4398         * device/include/math.h,
4399         * device/include/malloc.h,
4400         * device/include/stdarg.h,
4401         * device/include/stdbool.h
4402         * device/include/string.h,
4403         * device/include/tinibios.h,
4404         * device/include/ds400rom.h,
4405         * device/include/8051.h,
4406         * device/include/8052.h,
4407         * device/include/80c51xa.h,
4408         * device/include/at89c55.h,
4409         * device/include/at89S8252.h,
4410         * device/include/at89x51.h,
4411         * device/include/at89x52.h,
4412         * device/include/ds80c390.h,
4413         * device/include/reg764.h,
4414         * device/include/regc515c.h,
4415         * device/include/sab80515.h,
4416         * device/include/mcs51/c8051f000.h,
4417         * device/include/mcs51/c8051f018.h,
4418         * device/include/mcs51/c8051f020.h,
4419         * device/include/mcs51/c8051f040.h,
4420         * device/include/mcs51/c8051f060.h,
4421         * device/include/mcs51/c8051f120.h,
4422         * device/include/mcs51/c8051f300.h,
4423         * device/include/mcs51/c8051f310.h,
4424         * device/include/mcs51/c8051f320.h,
4425         * device/include/mcs51/c8051f330.h,
4426         * device/include/mcs51/c8051f350.h,
4427         * device/include/z180.h: Changed SDCC specific keywords to double
4428         underlined form.
4429
4430 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
4431
4432         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
4433         18F4455,
4434         * (pic16_assignConfigWordValue): disable testing of configuration
4435         register value with config mask,
4436         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
4437         function with port->fun_prefix,
4438         * (genFunction): when generating a naked interrupt function never
4439         create an absolute segment placed in interrupt vector address, place
4440         the actual interrupt function at IVA instead, when an interrupt
4441         function is generated with unspecified interrupt then do not create
4442         the absolute section,
4443         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
4444         code for generating a call to generic pointer get/put function with
4445         a call to function pic16_callGenericPointer(),
4446         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
4447         the call to the generic pointer get/put functions with prefixing the
4448         function name with port->fun_prefix,
4449         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
4450         * src/pic16/main.c (_process_pragma): prefix function with
4451         port->fun_prefix,
4452         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
4453         calling assembler, old 18Fxxxx macro is deprecated,
4454         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
4455         PC_ASMDIR in while condition,
4456         * (findInstruction): add PC_ASMDIR in while condition,
4457         * (buildCallTree): prefix main with port->fun_prefix,
4458         * (pic16_pCode2str): fixed bug that didn't emit the memory access
4459         identifier for variable with banked access in instructions BTFSS,
4460         BTFSC, BCF, BSF, BTG
4461         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
4462         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
4463         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
4464         perform optimization when enviroment variable NO_REG_OPT is set,
4465         * (insideLRBlock): NEW, return 1 if register is inside an
4466         INF_LOCALREGS block,
4467         * (RemoveRegFromLRBlock): remove a register that is completely
4468         eliminated by register optimization, but it is still left in local
4469         register store/restore in/from stack block,
4470         * (Remove2pcodes): after removing register, check to see if it
4471         should be removed from local register store/restore in/from stack
4472         block,
4473         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
4474         DUMMY_READ_VOLATILE,
4475
4476         * device/include/pic16/adc.h: minor prototype modifications and
4477         update,
4478         * device/include/pic16/malloc.h: added GPL notice various
4479         modifications,
4480         * device/include/pic16/stdint.h: NEW, standard header for ints
4481         * device/include/pic16/delay.h: NEW, header for delay functions,
4482         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
4483         delay1mtcy,
4484         * device/include/pic16/signal.h: NEW, header providing helper macros
4485         for implementing signal handlers,
4486         * device/include/pic16/stdio.h: added prototypes for functions,
4487         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
4488         prototypes for stdin and stdout, added macro PUTCHAR to
4489         automatically implement putchar function prototype,
4490         * device/include/pic16/usart.h: modified and updated USART library,
4491         * device/lib/pic16/libio/adc/,
4492         * device/lib/pic16/libio/i2c: some modifications to improve library
4493         performance,
4494         * device/lib/pic16/libc/stdio/: modifications for the new printf*
4495         family of functions,
4496         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
4497         family of functions and other sources,
4498         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
4499         of the PIC18Fxx[28] devices,
4500         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
4501         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
4502         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
4503         _do_cinit function, because the previous failed when local variables
4504         where not placed in the same memory bank,
4505         * device/lib/pic16/libsdcc/char/: various modifications to improve
4506         library performance,
4507         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
4508         information on the new functions of the c library and more...
4509
4510 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4511
4512         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
4513
4514 2005-03-26 Raphael Neider <rneider AT web.de>
4515
4516         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
4517           if condition == CARRY)
4518         * (genCmp): adapted to new genSkipc semantics
4519         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
4520           on rIfx (genCmp was broken)
4521
4522 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4523
4524         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
4525         * src/z80/main.c (_keywords[]),
4526         * src/SDCCglobal.h (struct options),
4527         * src/SDCC.y,
4528         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
4529         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
4530         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
4531         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
4532         always available in leading double underscore form. The C99 support is
4533         mostly missing, but it's a start.
4534         * support/regression/tests/bug-227710.c: fixed nonconforming use of
4535         reserved identifier "__data".
4536
4537 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
4538
4539         * src/mcs51/peeph.def: fixed bug 1170013
4540
4541 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
4542
4543         * device/include/mcs51reg.h: fixed bug 842007
4544
4545 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4546
4547         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
4548         last time.
4549
4550 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4551
4552         * src/port.h (struct PORT),
4553         * src/avr/ralloc.c (avr_assignRegisters),
4554         * src/avr/main.c,
4555         * src/ds390/ralloc.c (ds390_assignRegisters),
4556         * src/ds390/main.c,
4557         * src/hc08/ralloc.c (hc08_assignRegisters),
4558         * src/hc08/main.c,
4559         * src/mcs51/ralloc.c (mcs51_assignRegisters),
4560         * src/mcs51/main.c,
4561         * src/pic/ralloc.c (pic14_assignRegisters),
4562         * src/pic/main.c,
4563         * src/pic16/ralloc.c (pic16_assignRegisters),
4564         * src/pic16/main.c,
4565         * src/xa51/ralloc.c (xa51_assignRegisters),
4566         * src/xa51/main.c,
4567         * src/z80/ralloc.c (z80_assignRegisters),
4568         * src/z80/ralloc.h,
4569         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
4570         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
4571         * src/SDCCcse.h,
4572         * src/SDCCdflow.c (computeDataFlow),
4573         * src/SDCCdflow.h,
4574         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
4575         * src/SDCCloop.h,
4576         * src/SDCCcflow.c (*),
4577         * src/SDCCcflow.h,
4578         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
4579         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
4580         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
4581         immedDom() returning wrong block; probably fixes bug #1160833)
4582
4583 2005-03-20 Borut Razem <borut.razem AT siol.net>
4584
4585         * support/scripts/inc2h.pl: WIN32 port
4586
4587 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
4588
4589         * device/lib/makefile.in: added abs.c and labs.c
4590
4591 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
4592
4593         * device/include/stdint.h: added
4594         * device/lib/abs.c: added
4595         * device/lib/labs.c: added
4596         * device/include/stdlib.h: added abs() and labs() prototypes
4597         * device/lib/libsdcc.lib: added abs and labs
4598         * device/include/float.h,
4599         * device/lib/_fsmul.c,
4600         * device/lib/printf_fast.c,
4601         * device/lib/printf_tiny.c: updated comments
4602
4603 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4604
4605         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
4606         bug #1164313
4607
4608 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4609
4610         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
4611         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
4612
4613 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
4614
4615         * device/lib/printf_large.c: removed inline assembly for portability and
4616           readability. Use printf_fast if speed or size are more important.
4617         * src/pic16/gen.c: removed conditions around use of DEBUGpc
4618         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
4619
4620 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
4621
4622         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
4623         prevent compiler warning
4624
4625 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
4626
4627         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
4628         moved to level 0 and declared as static. Also they are explicit
4629         placed in access bank. This was necessery because some times they
4630         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
4631         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
4632         optimizations. Currently only compare to unsigned char is implemented,
4633         * src/pic16/gen.c: added fReturnIdx array,
4634         * (struct resolvedIfx) is moved to gen.h and made public,
4635         * (struct _G): added sregsAlloc and sregsAllocSet fields,
4636         * (aopForSym): added an optimization to directly store in stack of
4637         the operand of a SEND iCode,
4638         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
4639         but as registers instead (AOP_REG) using the fReturnIdx array,
4640         * (pic16_freeAsmop): remove the freed register from the
4641         _G.sregsAlloc field,
4642         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
4643         a compare of 'WREG',
4644         * (pic16_popGetTempRegCond): changed function prototype, now
4645         function takes also a bitVector argument v which holds the current
4646         set of registers that are allocated for stack access by aopForSym,
4647         registers allocated in aopForSym for accessing stack symbols are not
4648         any more part of the functions usedRegs field,
4649         * (genCall): some times aopOp is called for a stack variable to be
4650         send, aopForSym might perform the push, if this is true make sure
4651         that genCall doesn't push the variable twice by testing _G.resDirect,
4652         * (genFunction): changed testing for unspecified interrupt number
4653         from 256 to INTNO_UNSPEC,
4654         * modified selection scheme of frame pointer generation. Previously
4655         if function did use local registers a frame pointer was generated,
4656         now a frame pointer is generated only if function has arguments
4657         (that need PLUSW2 register access), or has stack arguments, or the
4658         compiler is not instructed to omit the frame pointer,
4659         * (genEndFunction): before restoring local registers that were saved
4660         in the function preamble, also restore the registers that *might*
4661         have been allocated for stack access,
4662         * (genRet): removed some old comments,
4663         * (genCmp, the active (RN's) version): added a call to the
4664         pic16_genCmp_special function to perform the compare with a more
4665         robust and optimized way,
4666         * (genInline): a feature has been added in inline code generation,
4667         which allows a wildcard variable substitution when writing inline
4668         assembly. Code is incomplete and experimental therefore undocumented,
4669         * (genCast): changed order of aopOp for result and right to allow
4670         aopForSym to directly load the result if possible,
4671         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
4672         perform an optimized compare on some selected special occasions,
4673         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
4674         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
4675         generate an IVT any more,
4676         * src/pic16/main.c (pic16_optionsTable): added command line option
4677         --optimize-cmp,
4678         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
4679         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
4680         macros,
4681         * src/pic16/NOTES: Raphael Neider added in list of active developers
4682         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
4683         jumptable_end to prevent bug #,
4684         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
4685         inCond and outCond fields,
4686         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
4687         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
4688         turn off register spilling,
4689         * (packRegsForOneUse): synced with other ports' versions although it
4690         is not used currently,
4691         * (pic16_packRegisters): added an optimization while reading
4692         structure bitfields, some registers may be saved (malloc code is
4693         decreased by 80 bytes)
4694
4695 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
4696
4697         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
4698         left is a bitfield, if yes, then don't optimize assignment. Perhaps
4699         this can be optimized more?
4700
4701 2005-03-10 Raphael Neider <rneider AT web.de>
4702
4703         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
4704           genNearPointerGet): (hopefully) fixed access to bitfields via
4705           pointers (p->bitN = x; and x = p->bitN; failed)
4706
4707 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
4708
4709         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
4710
4711 2005-03-09 Raphael Neider <rneider AT web.de>
4712
4713         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
4714
4715 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
4716
4717         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
4718         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
4719           (regTypeNum): set REG_BIT type if necessary
4720         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
4721         * support/regression/tests/critical.c: check bug 1144613
4722
4723 2005-03-02 Raphael Neider <rneider AT web.de>
4724
4725         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
4726
4727 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4728
4729         * src/avr/ralloc.c (serialRegAssign),
4730         * src/ds390/ralloc.c (serialRegAssign),
4731         * src/hc08/ralloc.c (serialRegAssign),
4732         * src/mcs51/ralloc.c (serialRegAssign),
4733         * src/pic/ralloc.c (serialRegAssign),
4734         * src/pic16/ralloc.c (serialRegAssign),
4735         * src/xa51/ralloc.c (serialRegAssign),
4736         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
4737
4738 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
4739
4740         * src/SDCCast.c (decorateType): fixed bug 1124787
4741
4742 2005-02-20 Hubert Sack <sack AT digiplan.de>
4743         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4744
4745         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
4746         patch #1121755
4747
4748 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4749
4750         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
4751         to keep the correct label reference count when adding/removing references
4752         to labels. A peephole file using this is appended to patch #1144962.
4753
4754 2005-02-14 Raphael Neider <rneider AT web.de>
4755
4756         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
4757         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
4758         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
4759           retrievals of result operand's value on assignment
4760
4761 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
4762
4763         * device/include/pic16/string.h: modified prototype for memccpy()
4764         to memccpy(void *, void *, char, size_t)
4765         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
4766         check whether to omit frame pointer or not,
4767         * (genInline): convert all occurences of "\n" to LF in inline
4768         assembler blocks, this helps formatting the inline text,
4769         * (pic16_loadFSR0): modified prototype,
4770         * (genNearPointerGet, genNearPointerSet): reorganization of code,
4771         removed some 8051 legacy code,
4772         * (genPackBits): enabled handling bitfields exceeding one byte in size,
4773         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
4774         before allocating temporary registers in functions,
4775
4776 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
4777
4778         * support/regression/tests/bitvars.c: corrected the "fix"
4779
4780 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
4781
4782         * support/regression/tests/bitvars.c,
4783         * support/regression/tests/bitwise.c,
4784         * support/regression/tests/rotate.c: "fixed" problems on Alpha
4785
4786 2005-02-10 Raphael Neider <rneider AT web.de>
4787
4788         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
4789           different size for Alpha
4790         * src/pic16/gen.c (genCmpEq) : improved compare with 0
4791
4792 2005-02-09 Raphael Neider <rneider AT web.de>
4793
4794         * src/SDCC.lex(doPragma) : save and restore warning options as well
4795           (also added new stack plus clone- and copyAndFreeSDCCERRG())
4796         * have #pragma less_pedantic set the errorlevel to WARNING
4797           (fixes #1117001)
4798         * (cloneOptimize) : fixed wrong malloc's size
4799         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
4800           facilitate correct handling of #pragma (save|restore)
4801
4802 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
4803
4804         * src/mcs51/gen.c: removed non-standard C nameless struct/union
4805
4806 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
4807
4808         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
4809
4810 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
4811
4812         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
4813
4814 2005-02-02 Raphael Neider <rneider AT web.de>
4815
4816         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
4817         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
4818         * (pic16_storeForReturn): fixed to allow returning function pointers
4819         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
4820         * device/include/pic16/{stddef.h,stdbool.h}: added
4821
4822 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
4823
4824         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
4825
4826 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
4827
4828         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
4829         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
4830          appeared to be required
4831
4832 2005-01-31 Borut Razem <borut.razem AT siol.net>
4833
4834         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
4835           include/mcs51 and include/z80 directories to the package
4836
4837 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4838
4839         * src/hc08/gen.c (genFunction): fixed bug #1112752
4840
4841 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4842
4843         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
4844
4845 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4846
4847         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
4848
4849 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
4850
4851         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
4852
4853 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
4854
4855         * device/include/c8051fxxx.h: removed these 6 files
4856         * device/include/mcs51/c8051fxxx.h: added these 11 new files
4857
4858 2005-01-26 Raphael Neider <rneider AT web.de>
4859
4860         * src/pic16/gen.c (genAssign): fixed assignment from longs
4861           in codespace (were cut to three bytes)
4862         * (genDummyRead): implemented (except for CODESPACE...),
4863           fixed bug #1108575
4864         * src/pic16/glue.c (emitStatistics): beautified
4865         * device/lib/pic16/libm/Makefile: added include path
4866
4867 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4868
4869         * src/z80/gen.c (aopPut): fixed bug #1103902
4870
4871 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4872
4873         * device/lib/expf.c: fixed bug #1095792
4874
4875 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
4876
4877         * device/lib/pic16/libm: added Math library sources
4878
4879 2005-01-24 Raphael Neider <rneider AT web.de>
4880
4881         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
4882           to enable upcast to pCodeOpReg2 (there is no type tag to
4883           differenciate the two and pic16_popGet2p cast into PCOR2)
4884         * src/pic16/main.c (_process_pragma): fixed another malloc bug
4885           (sizeof(sectNames) changed to sizeof(sectName))
4886           Both patches fix segfaults under MinGW.
4887
4888 2005-01-23 Raphael Neider <rneider AT web.de>
4889
4890         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
4891           Safe_[mc]?alloc()'ed variables
4892         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
4893           of (byte sized) temporaries (assign them to WREG for now)
4894         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
4895           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
4896           this might fix SIGSEGVs on MinGW...
4897         * src/SDCCopt.c (killDeadCode): restored original behaviour
4898           (volatile operands might get thrown away though)
4899
4900 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
4901
4902         * src/pic16/gen.c: fixed bug #1106975,
4903         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
4904         pointer update, INTCON is saved, global interrupts are disabled and
4905         restored after updateing TOS.
4906         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
4907         * added function attribute 'shadowregs' to take advantage of shadow
4908         registers,
4909         * added function attribute 'wparam' as an alternative to the wparam
4910         pragma,
4911         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
4912         user declares a non-ISR function as 'shadowregs',
4913         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
4914
4915 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
4916
4917         * .version: bumped version number to 2.4.8
4918         * device/lib/pic16/pics.all: list of PIC18F devices supported by
4919         pic16 port,
4920         * device/lib/pic16/libio/i2c/: I2C module support library,
4921         * device/include/pic16/i2c.h: I2C support library header,
4922         * device/lib/pic16/libc/stdio/: standard IO support sources,
4923         * (printf_small.c): printf_small() source, supports float print,
4924         * (printf_tiny.c): printf_tiny() source, does not support floats,
4925         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
4926         enable global optimizations for entire library source, other
4927         Makefiles in the source tree are also modified to reflect this,
4928         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
4929         function,
4930         * doc/sdccman.lyx: updated to reflect new changes,
4931         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
4932         sym->onStack if-case,
4933         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
4934         sbit, idata, _idata, xdata, _xdata,
4935         * added pragma library, to link an external library, (see doc),
4936         * removed command line options, --pomit-config-words, --pomit-ivt,
4937         --pleave-reset-vector,
4938         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
4939         when calling assembler to reflect memory model used, also define
4940         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
4941         reflect stack model used,
4942         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
4943         on stack return NULL,
4944
4945 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4946
4947         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
4948           of the operands is volatile. Fixes #1020220
4949
4950 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
4951
4952         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
4953         * (OptimizeRegUsage): make sure that there is really no other flow where
4954           the first pCode is used
4955
4956 2005-01-22 Raphael Neider <rneider AT web.de>
4957
4958         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
4959           to fix #1106967 (pCode->seq are not set up correctly)
4960
4961 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4962
4963         * src/SDCCglue.c (glue): make sure code area is declared before the
4964         static initialization area.
4965
4966 2005-01-21 Raphael Neider <rneider AT web.de>
4967
4968         * device/lib/Makefile.in: fixed test for pic16 install dir
4969         * device/lib/pic16/*/Makefile*: modified compile flags to enable
4970           optimizations
4971         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
4972           added --optimize-goto compiler switch and pragma wparam documentation
4973         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
4974         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
4975           and PRODH closing bug #1071770 (peephole optimizer)
4976
4977 2005-01-19 Raphael Neider <rneider AT web.de>
4978
4979         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
4980           cmdLine buffers (used when calling sdcpp...) are large enough
4981           (MAX_PATH=256 truncates arguments leading to system halts when
4982           used in MinGW...)
4983         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
4984         * (genUminus): rewritten to for efficiency
4985         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
4986           used uninitialized in some cases)
4987         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
4988           copy the third byte from the int -- now assumes 0x80 (data memory)
4989         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
4990           operands (genAddLit expects the iCode's operands to swapped as
4991           well), fixed leftover bytes (crashed for short left operands)
4992         * (pic16_genMinusDec): performance improvements, removed false
4993           PIC14 emitSKPNCs
4994         * (pic16_genMinus): fixed to cope with differently sized operands
4995         * src/pic16/glue.c (pic16_glue): added new banksel optimization
4996           for --obanksel > 1
4997         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
4998         * src/pic16/graph.[ch]: implementation of directed graphs, used by
4999           new banksel optimization
5000         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
5001           analysis for temporary registers (segfaults...)
5002         * src/pic16/peeph.def: added rule
5003
5004 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
5005
5006         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
5007         which converts a float number to its ASCII representation
5008         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
5009         functions to convert the fractional and integer part of a float to ASCII,
5010         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
5011         realloc.c): added _MALLOC_SPEC to explicit place variables in data
5012         ram
5013         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
5014         _STATMEM macros,
5015         * device/include/pic16/adc.h: added GPL info,
5016         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
5017         a pCodeOp as tested operand,
5018         * (genNearPointerGet): optimized bit testing, does not use
5019         intermediate register for bit value, test directly instead with
5020         BTFSS, BTFSC, works only for single bits,
5021         * (genpic16Code): dump the name of the iCode in the asm,
5022         * src/pic16/ralloc.c (decodeOp): removed static declaration and
5023         renamed to pic16_decodeOp,
5024         * (serialRegAssign): do not allocate a temporary register for iCode
5025         sequences that test a single bit for 1/0
5026
5027 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
5028
5029         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
5030         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
5031         access stack and frame pointers. They are initially assigned to
5032         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
5033         accessing SFRs. Updated all occurences of modification of stack or
5034         frame pointer in gen.c and pcode.c,
5035         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
5036         assigning of a literal value to pointers,
5037         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
5038         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
5039         selected
5040
5041 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5042
5043         * doc/sdccman.lyx: update documentation about stack pragma, added
5044         some info for stack memory models
5045
5046 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5047
5048         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
5049
5050 2005-01-08 Raphael Neider <rneider AT web.de>
5051
5052         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
5053           udata sections to fix bug #1097823
5054
5055 2005-01-05 Raphael Neider <rneider AT web.de>
5056
5057         * src/pic16/gen.c (genGenericShift): added handling of differently
5058           sized left operand and result
5059
5060 2005-01-04 Raphael Neider <rneider AT web.de>
5061
5062         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
5063         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
5064           to hold the condition bit)
5065         * added new version of genCmp (old code available via #define)
5066         * added new version of genShiftLeft/genShiftRight in a generic
5067           way, now supports shifting by negative values
5068         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
5069           shiftCount (expected by genGenericShift)
5070         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
5071         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
5072           dump
5073         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
5074           is an invalid literal too...)
5075
5076 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
5077
5078         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
5079         from Raphael Neider,
5080         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
5081         for 8-bit literals. This fixes some literal operands which are sign
5082         extended to 16-bits ints when instruction needs only 8-bits.
5083
5084 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
5085
5086         * device/lib/logf.c: added mcs51 assembly version
5087         * device/lib/expf.c: added mcs51 assembly version
5088         * device/lib/_logexpf.c: new shared asm code for expf and logf
5089         * device/include/math.h: add defines for assembly math library
5090         * device/lib/Makefile.in: build new _logexpf.c
5091         * device/lib/libfloat.lib: use new _logexpf.c
5092
5093 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
5094
5095         * src/pic/device.c
5096         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
5097           device types which have less than 0x7f registers.
5098
5099 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
5100
5101         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
5102
5103 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
5104
5105         * device/lib/printf_fast.c: only build on supported arch.
5106         * device/lib/printf_tiny.c: only build on supported arch.
5107         * device/lib/printf_fast_f.c: only build if asm float lib
5108         * device/lib/_fsget1arg.c: only build if asm float lib
5109         * device/lib/_fsget2args.c: only build if asm float lib
5110         * device/lib/_fsnormalize.c: only build if asm float lib
5111         * device/lib/_fsreturnval.c: only build if asm float lib
5112         * device/lib/_fsrshift.c: only build if asm float lib
5113         * device/lib/_fsswapargs.c: only build if asm float lib
5114         * device/include/stdio.h: don't provide print_fast,
5115           print_fast_f, print_tiny prototypes if --xstack used
5116
5117 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
5118
5119         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
5120         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
5121           to the SOURCES
5122
5123 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
5124
5125         * device/lib/printf_fast_f.c: same as printf_fast, but
5126           with floating point enabled
5127         * device/lib/printf_fast.c: minor tweaks
5128         * device/include/stdio.h: add printf_fast_f
5129
5130 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
5131
5132         * src/SDCCmain.c: make --float-reent default for mcs51
5133         * device/lib/_fsadd.c: added mcs51 assembly version
5134         * device/lib/_fssub.c: added mcs51 assembly version
5135         * device/lib/_fsmul.c: added mcs51 assembly version
5136         * device/lib/_fsdiv.c: added mcs51 assembly version
5137         * device/lib/_fseq.c: added mcs51 assembly version
5138         * device/lib/_fsneq.c: added mcs51 assembly version
5139         * device/lib/_fsgt.c: added mcs51 assembly version
5140         * device/lib/_fslt.c: added mcs51 assembly version
5141         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
5142         * device/lib/Makefile.in: add _fscmp to build
5143         * device/lib/libfloat.lib: add _fscmp to build
5144
5145 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
5146
5147         * device/lib/_fs2slong.c: added mcs51 assembly version
5148         * device/lib/_fs2sint.c: added mcs51 assembly version
5149         * device/lib/_fs2schar.c: added mcs51 assembly version
5150         * device/lib/_fs2ulong.c: added mcs51 assembly version
5151         * device/lib/_fs2uint.c: added mcs51 assembly version
5152         * device/lib/_fs2uchar.c: added mcs51 assembly version
5153         * device/lib/_slong2fs.c: added mcs51 assembly version
5154         * device/lib/_sint2fs.c: added mcs51 assembly version
5155         * device/lib/_schar2fs.c: added mcs51 assembly version
5156         * device/lib/_ulong2fs.c: added mcs51 assembly version
5157         * device/lib/_uint2fs.c: added mcs51 assembly version
5158         * device/lib/_uchar2fs.c: added mcs51 assembly version
5159         * device/include/float.h: added #define to select asm vs c
5160
5161 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
5162
5163         * device/lib/printf_fast.c: improvements to float output
5164         * device/include/float.h: add defines for assembly float library
5165         * device/lib/_fsget1arg.c: receive 1 float arg
5166         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
5167         * device/lib/_fsnormalize.c: normalize a float
5168         * device/lib/_fsreturnval.c: return float, various helper routines
5169         * device/lib/_fsrshift.c: right shift a float's mantissa
5170         * device/lib/_fsswapargs.c: swap 2 floats
5171         * device/lib/Makefile.in: build these 6 new files for mcs51
5172         * device/lib/libfloat.lib: add these 6 files to the library
5173
5174 2004-12-26 Borut Razem <borut.razem AT siol.net>
5175
5176         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
5177           built by gcc 3.4.2
5178
5179 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
5180
5181         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
5182           and fully reentrant and register bank neutral.
5183         * device/lib/printf_fast.c: added float (not enabled by default),
5184           added compact/slower integer (also not enabled by default),
5185           improved size/speed of fast integer code, other minor changes
5186         * device/include/stdio.h, device/lib/Makefile.in,
5187           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
5188
5189 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
5190
5191         * src/pic16/pcode.c: declaring variables other than at the start of a
5192           block is not supported in C by VC6.
5193
5194 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
5195
5196         * applied a previous patch from Raphael Neider that wasn't included
5197         in the previous commits, which fixes infinite loops within jumptable
5198         improvements,
5199         * made some fixes that previous patches introduced
5200
5201 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
5202
5203         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
5204         that fixes an issue with AOP_PCODE asmop's offset,
5205         * (pic16_popCopyReg): update instance field too,
5206         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
5207         function of pic port,
5208         * (genCmp, genAnd, genAssign),
5209         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
5210
5211 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
5212
5213         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
5214         variables initial values to idata section,
5215         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
5216         variables in some functions. This utilizes parmBytes field of iCode
5217         structure to hold the offset of the variable in stack. (might be
5218         able to use the stack field too?)
5219         * applied patch from Raphael Neider # ### , # ###
5220         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
5221         variable initial values in idata section,
5222         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
5223         for static variables with initial value
5224         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
5225         applied fix in while loop from Raphael Neider.
5226
5227 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
5228
5229         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
5230         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
5231         * src/ds390/ralloc.c (serialRegAssign): spill bits
5232         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
5233         * support/Util/SDCCerr.c,
5234         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
5235         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
5236         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
5237
5238 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
5239
5240         * device/include/sdcc-lib.h: inserted LGPL, added includes
5241           asm/ds390/features.h and asm/mcs51/features.h
5242         * device/include/asm/default/features.h,
5243         * device/include/asm/gbz80/features.h,
5244         * device/include/asm/z80/features.h: added empty _AUTOMEM
5245           and _STATMEM
5246         * device/include/asm/ds390/features.h,
5247         * device/include/asm/mcs51/features.h: added files with defines for
5248           _AUTOMEM and _STATMEM indicating automatic and static storage class
5249         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
5250         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
5251         * src/SDCCicode.c (geniCodeCast),
5252         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
5253         * src/SDCCloop.c (loopInduction): removed unused variable lr
5254         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
5255           to convertToFcall to include char modulo (RFE 1065037), added check
5256           if left operand is unsigned and use abs of literal value
5257         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
5258           as it doesn't work after conversion from peephole.def to peephole.rul
5259         * src/mcs51/gen.c (toBoolean): added check for size,
5260           (genModOneByte): optimized code for signed char modulo a literal
5261           power of 2 (thanks to Hubert Sack),
5262           (genRRC): removed unnecessary "clr c",
5263           (genRLC): replaced "add a,acc" with cheaper "rlc a"
5264         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
5265           jump optimization,
5266           swapped rules 256.c and 256.d,
5267           extended 256.d by using new multiple checks (thanks Erik),
5268           added rules 256.e and 256.f,
5269           updated rule 261.a and 261.b to new generated code
5270         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
5271
5272 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5273
5274         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
5275           induction related bugs, including first part of bug #1074377
5276
5277 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
5278
5279         * applied patch from bug-report #1076292,
5280         * applied patches for genAnd and Goto-optimizations for Raphael
5281         Neider,
5282         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
5283         dump a less iCode information,
5284         * src/pic16/device.h (pic16_options_t): added field debgen,
5285         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
5286         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
5287         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
5288         puclic,
5289         * (various functions): added macros FENTRY and FENTRY2 to functions,
5290         to emit function prologue,
5291         * (various functions): fixed indentation,
5292         * (genNearPointerGet): fixed loading of FSR0,
5293         * (genPackBits): applied patch from Raphael Neider to fix updating
5294         of FSR0 and touching only the modified bits,
5295         * src/pic16/genarith.c (various functions): added macros FENTRY to
5296         emit function prologue in comments,
5297         * src/pic16/pcode.h: added functions debugf2, debugf3,
5298         * src/pic16/ralloc.c: partial fix for packForPush caused
5299         segmentation fault,
5300
5301 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5302
5303         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
5304           <stsp AT users.sourceforge.net> with reversed byte order
5305         * support/regression/tests/rotate.c: added (ds390 skips some tests)
5306
5307 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5308
5309         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
5310           bug #1074377
5311         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
5312         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
5313
5314 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
5315
5316         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
5317
5318 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5319
5320         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
5321           conditions,
5322           (setFromConditionArgs): friendly operand parser for peephole rules,
5323           (operandBaseName, operandsNotRelated): new peephole condition
5324           "operandsNotRelated" -- similar to "operandsNotSame", but takes
5325           architecture specific register naming into account, handles n-way
5326           comparisons, and supports quoted literals
5327         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
5328
5329 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5330
5331         * src/mcs51/peeph.def: fixed bug #1076940
5332
5333 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
5334
5335         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
5336
5337 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5338
5339         Adding support for replacing ljmps with sjmps in jumptables
5340         generated for switch statements. For now you need to set the
5341         environment variable SDCC_SJMP_JUMPTABLE to enable this.
5342         Now 4 algorithms for mcs51 jumptable generation are used:
5343         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
5344         addresses loaded pc-relative for up to 112 cases and stack-pushing
5345         target addresses loaded with offset from dptr for up to 256 cases.
5346
5347         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
5348         * src/mcs51/main.c: adapted constants for switch table generation
5349         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
5350
5351 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
5352
5353         * device/lib/printf_large.c (_print_format): fixed bug 1073386
5354         * support/regression/tests/bug1057979.c: added test for bug 1073386
5355
5356 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
5357
5358         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
5359         compilers
5360
5361 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
5362
5363         * src/pic16/device.h,
5364         * src/pic16/genarith.c,
5365         * src/pic16/glue.c,
5366         * src/pic16/main.c,
5367         * src/pic16/pcode.c: applied patches #1068154 and #1070213
5368
5369 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
5370
5371         Large cummulative patch for pic16 port.
5372         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
5373         to call when a stack overflow occurs,
5374         * (malloc.h): added CVS Id tag,
5375         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
5376         variable,
5377         * added libc directory. The current version of LibC contains string
5378         functions, ctype functions and macros and some functions of the
5379         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
5380         be extensively tested in the future. Standard disclaimer here.
5381         Library is not automatically build yet. But one can build it by
5382         invoking 'make' inside the libc directory.
5383         * added ADC library under libio. Preliminary version yet.
5384
5385         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
5386         * src/pic16/gen.c (aopForRemat): asmop size is filled by
5387         aopForRemat() now and not by pic16_aopOp(),
5388         * (pic16_popGetTempReg): removed warning messgae when allocating
5389         temporary registers, its a buggy feature and will be removed,
5390         * (pic16_popGet): set register instance field in AOP_CRY,
5391         * (pic16_outBitC): fixed for results in size greater than 1,
5392         * (genUminusFloat): fixed for pic16, ported code from mcs51,
5393         * (pic16_storeForReturn): optimized return of 0,
5394         * (genCmp): experimental code for new genCmp which uses PIC18's
5395         special compare&skip instructions. Initial tests fail some times
5396         with variables grater than 1 byte in size, so new code is disabled,
5397         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
5398         a single bit,
5399         * (genCast): began a fix to optimize the casting of a bit to another
5400         bit, now assigning a bitfield to another bitfield will fail, sorry,
5401         * src/pic16/main.c: disabled the use of lr-support feature,
5402         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
5403         * added some function prototypes, added function _debugf prototype,
5404         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
5405         bits with offset (case PO_GPR_BIT),
5406         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
5407         command line,
5408         * (isBankInstruction): modified to return 0 for no banking instruction,
5409         and 1 for banking instruction,
5410         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
5411         caused stop processing pCodes after a inline assembly block,
5412         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
5413         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
5414         registers when it shouldn't,
5415         * src/pic16/ralloc.c (allocReg): add preliminary support for
5416         supporting a limited set of temporary registers,
5417
5418 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5419
5420         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
5421           genDataPointerSet): ensure assignments always copy in MSB to LSB
5422           order,
5423           (loadRegFromAop): recognize CLRH optimization,
5424           (genFunction): optimize RECEIVE iCodes in reentrant functions
5425
5426 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5427
5428         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
5429           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
5430           selected.
5431         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
5432         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
5433           contiguous with data
5434
5435 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5436
5437         * device/lib/_gptrget.c (_gptrget),
5438         * device/lib/_gptrgetc.c (_gptrgetc),
5439         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
5440           instead of sjmp to ret
5441         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
5442           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
5443
5444 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
5445
5446         * .version: bumped version to 2.4.7
5447         * device/lib/_gptrget.c (_gptrget): is now _naked
5448         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
5449         * device/lib/_gptrput.c (_gptrput): is now _naked
5450         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
5451           (createFunction): fixed xstack
5452         * src/SDCCglue.c (emitMaps): set allocation required for bit area
5453         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
5454           or bit either,
5455           (geniCodeCritical): store original interrupt state in an iTemp bit
5456           var unless stack-auto
5457         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
5458         * src/SDCCmain.c (setIncludePath): added include/target to search path
5459         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
5460         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
5461           prototype,
5462           (processFuncArgs): put bit vars in bit area
5463         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
5464           unsaveRBank): fixed xstack,
5465           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
5466           (genFunction, genEndFunction): fixed xstack,
5467           (genAssign): optimization don't walk backwards through mem
5468         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
5469         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
5470         * support/regression/Makefile: also make library (for stack-auto) when
5471           making "all" and added "test-mcs51-xstack-auto"
5472         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
5473         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
5474         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
5475         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
5476         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
5477           make-library by MAKE_LIBRARY
5478         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
5479           regression tests for xstack
5480         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
5481         * support/regression/tests/critical.c: test for critical on mcs51
5482
5483 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5484
5485         * support/regression/ports/ucz80/spec.mk: use include and lib files from
5486           built version of sdcc instead of installed version
5487
5488 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
5489
5490         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
5491         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
5492           vprintf.c now
5493         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
5494         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
5495           WARNING: remove device/lib/build/z80/printf.o by hand when
5496           updating from previous build!
5497         * device/lib/z80/printf.c: updated comment
5498         * support/regression/tests/bug1057979.c: test all ports now
5499         * support/regression/tests/bug1065458.c: file added
5500
5501 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5502
5503         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
5504           *_start and *_end symbols for static functions
5505
5506 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
5507
5508         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
5509           and search crt0.o in all library paths,
5510           (setIncludePath): proper handling of --nostdinc,
5511           (setLibPath): proper handling of --nostdlib
5512         * support/regression/Makefile,
5513         * support/regression/ports/ds390/spec.mk,
5514         * support/regression/ports/gbz80/spec.mk,
5515         * support/regression/ports/hc08/spec.mk,
5516         * support/regression/ports/mcs51/spec.mk,
5517         * support/regression/ports/mcs51-large/spec.mk,
5518         * support/regression/ports/mcs51-stack-auto/spec.mk,
5519         * support/regression/ports/z80/spec.mk: use include and lib files from
5520           built version of sdcc instead of installed version
5521         * doc/sdccman.lyx: fixed typo in --nostdinc
5522
5523 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
5524
5525         * src/pic/pcode.c,
5526         * src/pic/device.c,
5527         * src/pic/ralloc.c,
5528         * src/pic/gen.c : added support to generate code for struct bit fields.
5529
5530 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
5531
5532         * as/xa51/xa_version.h,
5533         * device/include/errno.h,
5534         * device/include/regc515c.h,
5535         * device/lib/_itoa.c,
5536         * device/lib/_ltoa.c,
5537         * device/lib/ser_ir_cts_rts.c,
5538         * sim/ucsim/xa.src/glob.cc,
5539         * sim/ucsim/xa.src/inst_gen.cc,
5540         * sim/ucsim/xa.src/xa_bit.cc,
5541         * sim/ucsim/xa.src/xa_sfr.cc,
5542         * sim/ucsim/z80.src/inst_dd.cc,
5543         * sim/ucsim/z80.src/inst_fdcb.cc,
5544         * support/scripts/keil2sdcc.pl,
5545         * src/pic16/pic16.dsp,
5546         * src/pic16/pic16a.dsp: corrected cvs line endings
5547         * device/lib/printf_large.c: fixed bug 1057979
5548         * src/pic16/gen.c: fixed non-C standard code
5549         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
5550         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
5551         * support/regression/ports/mcs51/support.c: reload T1 asap
5552         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
5553           pdata use and clear idata startup behaviour
5554         * support/regression/tests/bug1057979.c: added
5555
5556 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
5557
5558         * device/examples/ds390/ow390/ad26.h,
5559         * device/examples/ds390/ow390/cnt1d.h,
5560         * device/examples/ds390/ow390/crcutil.c,
5561         * device/examples/ds390/ow390/ownet.h,
5562         * device/examples/ds390/ow390/owsesu.c,
5563         * device/examples/ds390/ow390/swt12.h,
5564         * device/examples/ds390/ow390/swtoper.c,
5565         * device/examples/ds390/ow390/temp10.h,
5566         * device/examples/ds390/ow390/thermodl.c,
5567         * device/examples/ds390/tinitalk/tinitalk.dsp,
5568         * device/examples/ds390/tinitalk/tinitalk.dsw,
5569         * device/examples/mcs51/clock/hw.h,
5570         * device/examples/mcs51/simple2/go.bat,
5571         * device/examples/serialcomm/windows/serial.h,
5572         * device/examples/xa51/dummy.c,
5573         * device/examples/xa51/hello.c,
5574         * device/include/80c51xa.h,
5575         * device/include/at89x051.h: corrected cvs line endings
5576
5577 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
5578
5579         * src/pic16/main.c (options): added command line --gstack, to trace
5580         stack over/under flows,
5581         * added pragma 'wparam' to allow passing first byte of function
5582         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
5583         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
5584         call to __gstack_test function and sets up the symbol as extern,
5585         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
5586         * popaop): added call to pic16_testStackOverflow,
5587         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
5588         wparamList list,
5589         * (genCall, genPcall): now all parameters are passed via stack
5590         except in functions that are pass to wparam pragma in which WREG is
5591         used too,
5592         * (genPcall): REENTRANT flag is checked to see if variable prototype
5593         contains reentrant keyword, don't call a non-reentrant function, via
5594         a reentrant function pointer or vice versa, functions are never
5595         passed via WREG,
5596         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
5597         D.Winkler,
5598         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
5599         SIGSEGV when accessing a NULL register stucture,
5600         * (pic16_printGPointerType): modified to handle UPPER modifier for
5601         function initializers, changed prototype of function to simpler one,
5602         * (pic16_printIvalFuncPtr): check to see if function is already
5603         added in externs list,
5604         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
5605         optimized a move from W to SFR with a move to the same register
5606         later after a CALL,
5607         * device/lib/pic16/debug: NEW directory, contains debug features
5608         which are enabled when linking with libdebug.lib, currently command
5609         line option --gstack enables stack pointer tracing for over/under
5610         flow, corresponding sources are in debug/gstack
5611
5612 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
5613
5614         * doc/sdccman.lyx: updated SDCC version,
5615         * (PIC16 port): update list of command line options,
5616         * src/pic16/device.h (structure pic16_options_t): added field gstack
5617         to enable stack overflow tracing on push/pops,
5618         * src/pic16/device.c (statistics structure): added statistics
5619         structure,
5620         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
5621         pic16_dump_int_registers): increase statistics counters for each
5622         * variable which is encountered
5623         * (pic16_dump_usection): emit each .udata variable to its own udata
5624         section,
5625         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
5626         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
5627         parameters via stack, otherwise use old scheme,
5628         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
5629         assembler output file,
5630         * src/pic16/main.c: added command line options --gstack to enable
5631         push/pop tracing for stack overflow,
5632         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
5633         instructions): added size of each instruction,
5634         * (pic16_countInstruction): estimate size of instructions in
5635         the_pFile list, inline assembly blocks are not counted,
5636         * (pic16_FixRegisterBanking): trace previous register usage, when
5637         banksel optimizations is greater than 0, don't emit a redudant
5638         banksel directive,
5639
5640 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
5641
5642         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
5643         * src/pic16/ralloc.c : applied same fix for pic16.
5644         * src/pic/gen.c : tidied it up a little.
5645
5646 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5647
5648         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
5649         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
5650
5651 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5652
5653         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
5654
5655 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5656
5657         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
5658         non-reentrant function __modsint in the interrupt function (thus
5659         corrupting math operations during serial I/O)
5660         * device/lib/ser_ir.c: as above, changed buffersize
5661         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
5662         256.c,d for zeroing
5663         * doc/Makefile: added option -t for rsync
5664
5665 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5666
5667         * src/SDCCast.h (struct ast),
5668         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
5669
5670 2004-10-20 Borut Razem <borut.razem AT siol.net>
5671
5672         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
5673         package
5674
5675 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
5676
5677         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
5678         makefile targets,
5679         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
5680         support functions to replace long sequences of MOVFF's from access
5681         bank registers to stack and vice versa,
5682         * src/pic16/device.h: added new field opt_flags, where optimization
5683         flags can be set to enable certain features,
5684         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
5685         * pBlock, (genFunction, genEndFunction): surroung loop for
5686         saving/loading used registers in stack with PC_INFO pCodes,
5687         INF_LREGS. Code in between can then be optimized by pCode optimizer
5688         to support function calls,
5689         * (genDataPointerSet): fixed bug which loaded float fields in
5690         structures with corrupt data,
5691         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
5692         in a standard way debug info on stderr. Feature used for developing
5693         and debugging only,
5694         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
5695         obsolete chunks of code,
5696         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
5697         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
5698         * pic16/src/pcode.c (pic16_newpCodeInfo,
5699         * (pic16_newpCodeOpLocalRegs),
5700         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
5701         feature,
5702         * (pic16_pCodeConstString): printing of the initial value of a
5703         symbol as a comment is inhibited since parsing was already done by
5704         copyStr and output is corrupt,
5705         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
5706
5707 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5708
5709         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
5710
5711 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
5712
5713         * as/mcs51/lkarea.c: removed old K&R style,
5714           (lnksect): changed check on boundary error,
5715           (lnksect2): changed check on boundary error,
5716           (lnksect2): extend XSTK to end of page if size = 1
5717         * as/mcs51/lkmain.c: removed old K&R style,
5718           (Areas51): create l_IRAM symbol
5719         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
5720         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
5721           model-mcs51-stack-auto, added model-mcs51-xstack-auto
5722         * device/lib/_mullong.c: added version to be compiled with xstack
5723         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
5724         * device/lib/mcs51/crtxclear.asm: clear pdata as well
5725         * device/lib/mcs51/crtxstack.asm: fixed comment
5726         * src/SDCCglue.c: maxInterrupts defaults to 0,
5727           (emitMaps): added pdata,
5728           (createInterruptVect): (re)moved default,
5729           (glue): added pdata,
5730           (glue): moved __start__xstack to XSTK with default size 1
5731         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
5732           and options.float_rent when options.stackAuto is set,
5733           (linkEdit): only write XDATA_NAME if provided on command line
5734         * src/SDCCmem.h,
5735         * src/SDCCmem.c: added pdata
5736         * src/port.h: added pdata_name to PORT
5737         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
5738           (saveRegisters, unsaveRegisters): removed usage of B,
5739           (genMinus): fixed accumulator clash,
5740           (genJumpTab): added comment, this needs another look
5741         * src/mcs51/gen.c: added check for "B in use" paranoia,
5742           added pushB() and popB()
5743         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
5744           chance
5745         * src/avr/main.c,
5746         * src/ds390/main.c,
5747         * src/hc08/main.c,
5748         * src/mcs51/main.c,
5749         * src/pic/main.c,
5750         * src/pic16/main.c,
5751         * src/xa51/main.c,
5752         * src/z80/main.c: (reset_regparms) made void parameter explicit and
5753           added PSEG (PAG,XDATA) or NULL to port specifier
5754         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
5755         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
5756           (_mcs51_genInitStartup): removed __start__xstack equ,
5757           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
5758         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
5759         * src/z80/gen.c (_rleAppend): fixed warnings
5760         * support/regression/tests/zeropad.c: added pdata test
5761         * .version: bumped to 2.4.6
5762
5763 2004-10-17 Borut Razem <borut.razem AT siol.net>
5764
5765         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
5766         as a part of nightly build
5767
5768 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
5769
5770         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
5771         WREG holds the first byte function parameters,
5772         * (aopForSym): take special case for symbols which are in FARSPACE
5773         but in CODESPACE too,
5774         * (assignResultValue): modified to take into account _G.useWreg,
5775         * (genCall): don't use wreg for parameter passing when function is
5776         declared as reentrant, too, added optimization INCF to stack
5777         pointer when stack parameter count is 1,
5778         * (genFunction, genEndFunction): refurnished and fixed to not using
5779         wreg for passing parameters when function has varargs or is
5780         reentrant, fixed bug with symbol name compare for generating
5781         functions in absolute address,
5782         * (pic16_storeForReturn): refurnished,
5783         * (genCmp): began writing a new version of the function, not ready
5784         yet, therefore it is disabled,
5785         * (genAssign): do not read code memory when assigning a function to
5786         a pointer function,
5787         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
5788         array of characters, not pointer,
5789         * (pic16initialComments): in debug mode emit an .ident directive for
5790         the assembler,
5791         * (_process_pragma): emit a new warning type (internal to pic16)
5792         when setting stack to default length, emit a similar warning when
5793         placing a function at absolute address and address is not word aligned
5794         * (_pic16_parseOptions): added 'return TRUE' statement,
5795         * (_pic16_linkEdit): if compiling a source, then add the source's
5796         file object, first in the list of objects to link,
5797
5798 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
5799
5800         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
5801         * src/pic/main.c : removed VC warning.
5802         * src/pic/gen.c : changed comment.
5803
5804 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
5805
5806         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
5807         reference to a deprecated symbol _GPTRREG was causing failure to
5808         link. Thanks G. M. Gallant for the info.
5809
5810 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
5811
5812         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
5813         comments for Bugs item #954788.
5814
5815 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
5816
5817         * src/pic16/device.c (pic16_dump_gsection,
5818         * pic16_groupRegistersInSection): handle symbols declared to be in
5819         access bank differently,
5820         * src/pic16/gen.c (struct _G): added field resDirect,
5821         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
5822         send values read from stack directly to result and don't allocate
5823         temporary values,
5824         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
5825         same registers,
5826         * (pic16_sameRegsOfs): NEW,
5827         * (freeAsmop): if _G.resDirect is set then do not mark registers as
5828         free because they were not allocated from temporary pool,
5829         * pic16_popRegFromString): workaround to fix a problem with
5830         allocating variables twice or never,
5831         * (genGenPointerGet): using PRODL instead of FSR0H,
5832         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
5833         instead of FSR0H,
5834         * (genAssign): take advantage of the _G.resDirect flag,
5835         * (genCast): around line 11844, use mov2f instead of directly
5836         MOVFF'ing between operands to account for literal values,
5837         * src/pic16/genutils.c: some new debug functions for gpsim have been
5838         added,
5839         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
5840         float with integer part only,
5841         * src/pic16/main.c (_process_pragma): handle pragma udata access to
5842         place variables in access bank
5843         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
5844         updated sources to reflect recent changes in gen.c
5845
5846 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
5847
5848         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
5849         sources that searched for headers in installation path, now the
5850         device/include/pic16 is used,
5851         * src/pic16/glue.c (pic16glue),
5852         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
5853         .line directives if not in debug mode, this suppresses assembler's
5854         warnings for ignored directives
5855
5856 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
5857
5858         * src/port.h: made reset_regparms prototype void parameter explicit.
5859         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
5860         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
5861         * doc/sdccman.lyx: documented warning disabling and how to use
5862           printf_large to make it print floats.
5863         * device/include/stdbool.h: NEW
5864         * device/lib/_atof.c,
5865         * device/lib/_divuint.c,
5866         * device/lib/_divulong.c,
5867         * device/lib/expf.c,
5868         * device/lib/printf_large.c,
5869         * device/lib/sincosf.c,
5870         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
5871         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
5872           a completely reentrant lib.
5873
5874 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
5875
5876         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
5877         * device/include/pic16/stdio.h: fixed bug with colon
5878
5879 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
5880
5881         * device/include/pic16/stdio.h,
5882         * device/include/pic16/stdlib.h,
5883         * device/include/pic16/math.h: NEW
5884         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
5885         declared as _naked to reduce overhead
5886         * device/lib/Makefile.in (target port-specific-objects-pic16):
5887         changed * to *.* so to ignore the CVS directory,
5888         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
5889         stacked variables back in stack,
5890         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
5891         corruption
5892
5893 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
5894
5895         * .version: bumped version number to 2.4.5
5896         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
5897         * support/Util/SDCCerr.c (messages structure): added entry for
5898         W_POSSBUG2
5899
5900         Large cumulative patch for pic16 port and libraries.
5901         * device/include/pic16/sdcc-lib.h,
5902         * device/include/pic16/stdarg.h,
5903         * device/include/asm/pic16/features.h,
5904         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
5905         * device/include/pic16/float.h: changes reentrant keyword with
5906         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
5907         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
5908         updated target build-libraries to include objects from gptr,
5909         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
5910         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
5911         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
5912         all function headings,
5913         * src/SDCCmain.c: added global parameter userIncDirsSet,
5914         * (parseCmdLine): when option -I is encountered add directory to
5915         userIncDirsSet too,
5916         * src/version.awk: added space between control and long,
5917         * src/pic16/NOTES: added some notes for the port,
5918         * src/pic16/gen.c: added prototype for mov2fp function,
5919         * (fReturnpic16[]): properly named return value registers,
5920         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
5921         * (aopForSym): added code to handle symbols with onStack flag set,
5922         symbols onStack are allocated PTRSIZE bytes,
5923         * (aopFreeAsmop): handles special case where asmops are stack objects,
5924         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
5925         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
5926         added argument lock to trace flaws in allocating temporary registers
5927         when developing port,
5928         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
5929         * (pic16_popRegFromString): reenabled allocating a direct register
5930         from string,
5931         * (assignResultValue): various beautifications,
5932         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
5933         referenced function argument,
5934         * (genIpush): reenabled to allow stacked arguments, handles only
5935         ic->parmPush iCodes,
5936         * (genCall, genPcall): major changes to allow for variable argument
5937         functions, fixed a bug with falsely restoring stack pointer after
5938         returning from call,
5939         * (genFunction): pending code for critical function,
5940         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
5941         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
5942         * (genNearPointerGet): fixed bug with indirect reading, was always
5943         reading from INDF0
5944         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
5945         pointers,
5946         * (genAddrOf): rewrote code to take address of a stacked function parameter
5947         * (genCast): fixed casting to generic pointer type,
5948         * src/pic16/gen.h: added AOP_STA,
5949         * (struct asmop): added field stk,
5950         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
5951         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
5952         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
5953         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
5954         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
5955         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
5956         generic pointers,
5957         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
5958         and library paths,
5959         * (pic16_port structure): generic pointer size is set to 3,
5960         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
5961         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
5962         compiler warning,
5963         * src/pic16/ralloc.c (allocReg): prevent allocating register when
5964         operand is an iTemp,
5965
5966 2004-09-24 Martin Helmling <mh AT octo-soft.de>
5967
5968         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
5969         * debugger/mcs51/simi.c: addapt new syntax of s51
5970
5971 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
5972
5973         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
5974         * src/pic16/pcode.c: commented out some calls to free() in order to
5975         fix bug #989576,
5976
5977 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5978
5979         * src/SDCCicode.h,
5980         * src/SDCCicode.c (isiCodeInFunctionCall),
5981         * src/avr/ralloc.c (selectSpil),
5982         * src/pic/ralloc.c (selectSpil),
5983         * src/pic16/ralloc.c (selectSpil),
5984         * src/ds390/ralloc.c (selectSpil),
5985         * src/hc08/ralloc.c (selectSpil),
5986         * src/xa51/ralloc.c (selectSpil),
5987         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
5988         stack in the middle of a function call sequence (fixes bug #1020268)
5989         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
5990         costs associated with the minimum switch case.
5991
5992 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5993
5994         * src/SDCC.lex: fixed bug #1030549
5995
5996 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5997
5998         * src/SDCCcse.h (struct cseDef),
5999         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
6000         over a function call if the CSE is derived from a symbol whose
6001         address has been taken (fixes bug #1029883)
6002         * support/regression/tests/bug-1029883: a new regression test for
6003         this bug
6004
6005 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6006
6007         * src/hc08/gen.c (emitinline): fixed bug #1029778
6008         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
6009         to a cast object is no longer a syntax error ("fixes" bug #1030006,
6010         and starts toward RFE #905167)
6011
6012 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
6013
6014         * src/pic16/gen.c (mov2f): New function to move an operand to
6015         another without considering if it is a literal or a register,
6016         * (pic16_sameRegs): don't check if they are both AOP_REG,
6017         * (AccRsh): removed andmask=0 lines,
6018         * (genLeftShift): duplicated to be improved in future versions,
6019         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
6020         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
6021         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
6022         * (pic16initMnemonics): added initialization for POC_INFSNZW,
6023         * (insertBankSwitch): fixed inserting banksel directives algorithm
6024         for instructions that follow a skip instruction, this fixes a report
6025         for broken subtraction code generation,
6026         * src/pic16/ralloc.c (deassignLRs): do not free register if current
6027         iCode is a left op, just in case result and right share the same
6028         registers
6029
6030 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6031
6032         * src/hc08/main.c,
6033         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
6034         preservation of HX
6035         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
6036         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
6037         on 2004-09-12; it was buggy
6038
6039 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
6040
6041         * src/SDCCsymt.h: removed RESULT_CHECK
6042         * src/SDCCast.c,
6043         * src/SDCCglue.c,
6044         * src/SDCCval.c,
6045         * src/pic/glue.c,
6046         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
6047
6048 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
6049
6050         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
6051         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
6052         configuration values no more rejected by compiler, they are assigned
6053         to configuration registers with a warning message instead,
6054         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
6055         the for-loop so last conf register is emitted too,
6056         * (_pic16_initPaths): link library libsdcc.lib by default,
6057         * (_hasNativeMulFor): modified test for multiplication according to
6058         Raphael Neider's remarks. Integer multiplication is also done with
6059         support functions,
6060         * device/include/pic16/pic18fregs.h: corrected type error in while
6061         testing and including 18f6720 header file
6062
6063 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
6064
6065         * src/pic16/device.h (pic16_options): removed field use_crt,
6066         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
6067         until an optimization to handle single bits is added,
6068         * (pic16_loadFSR0): moved before genUnpackBits,
6069         * (genAnd): some white lines removed,
6070         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
6071         leave_reset flags in pic16_options when using crt modules,
6072
6073 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
6074
6075         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
6076           for bugs 898889 & 979599. Also used some safer print instructions.
6077
6078 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
6079
6080         * src/pic16/device.h (pic16_options_t): added field use_crt,
6081         crt_name, no_crt,
6082         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
6083         catch a probable future bug,
6084         * src/pic16/gen.c: aopIdx function commented out,
6085         * (genAssign): commented out old code which used aopIdx,
6086         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
6087         code, added if conditionals to take into account the --use-crt
6088         command line options,
6089         * src/pic16/main.c (pic16_optionsTable): added new command line
6090         options, --use-crt= and --no-crt,
6091         * (_pic16_linkEdit): now the proper crt object is added in the
6092         linker command line except than when --no-crt is specified,
6093         * src/pic16/pcode.c,
6094         * src/pic16/pcode.h: added some structures and functions for a new
6095         optimization scheme to compansate for instruction overhead between
6096         same iCodes, this scheme is currently under development and is not
6097         working in any way,
6098         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
6099         to && operator,
6100         * device/lib/pic16/startup/crt0i.c,
6101         * device/lib/pic16/startup/crt0iz.c: added global char variable
6102         __uflags to force the generation of an idata section
6103
6104 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
6105
6106         * doc/Makefile,
6107         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
6108         * doc/sdccman.lyx: updated sdcc version to 2.4.4
6109
6110 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6111
6112         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
6113         Frieder) and clarified the default code optimization mode
6114
6115 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6116
6117         * src/SDCC.lex (doPragma, process_pragma),
6118         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
6119         "opt_code_size", and "opt_code_balanced"
6120         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
6121         regrouped options by category, added support for category headers
6122         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
6123         and "--opt-code-size"
6124         * doc/sdccman.lyx: documented these new options and pragmas
6125         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
6126         preference into account
6127
6128 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
6129
6130         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
6131           geniCodePreDec): Fixed bug 904237 by generating a warning
6132         * src/SDCCerr.h,
6133         * src/SDCCerr.c: added warning W_SIZEOF_VOID
6134
6135 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
6136
6137         * src/pic/device.c : When no max ram set validate full memory range.
6138         * src/pic/pcode.c,
6139         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
6140
6141 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
6142
6143         * device/lib/_gptrget.c,
6144         * device/lib/_gptrput.c: updated comment
6145         * device/lib/calloc.c,
6146         * device/lib/free.c,
6147         * device/lib/malloc.c,
6148         * device/lib/realloc.c: added LGPL, made them reentrant-safe
6149         * src/SDCCcse.c (cseBBlock),
6150         * src/SDCCicode.c (printOperand, geniCodeArray),
6151         * src/SDCCicode.h (struct operand): fixed bug 868103
6152         * support/regression/tests/bug-868103.c: added
6153         * src/SDCCast.c (searchLitOp),
6154         * src/SDCCcse.h (struct cseDef),
6155         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
6156         * src/SDCCicode.h (struct operand),
6157         * src/SDCCsymt.h (struct sym_link),
6158         * src/avr/gen.c (hasInc),
6159         * src/ds390/gen.c (hasInc),
6160         * src/hc08/gen.c (genPlusIncr, hasInc),
6161         * src/mcs51/gen.c (hasInc),
6162         * src/pic16/glue.c (pic16_printIvalChar),
6163         * src/pic16/ralloc.c (regWithIdx),
6164         * src/xa51/gen.c (hasInc) : removed warnings
6165         * src/SDCCast.c (createBlock): added comment ???
6166         * src/hc08/ralloc.c: updated comments
6167
6168 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6169
6170         * doc/sdccman.lyx: updated section on switch statements, added
6171         section about semaphore locking
6172         * doc/Makefile: added option -info for latex2html
6173         * device/lib/_gptrget.c,
6174         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
6175
6176 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
6177
6178         * src/pic/device.h,
6179         * src/pic/device.c,
6180         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
6181          maxram is less than 0x100.
6182
6183 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
6184
6185         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
6186
6187 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6188
6189         * src/port.h,
6190         * src/mcs51/main.c,
6191         * src/ds390/main.c,
6192         * src/z80/main.c,
6193         * src/hc08/main.c,
6194         * src/pic/main.c,
6195         * src/pic16/main.c,
6196         * src/avr/main.c,
6197         * src/xa51/main.c
6198         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
6199         a jump table is the best form for a switch statement, including
6200         automatic insertion of missing cases to make the case range
6201         continuous. Developed in collaboration with Frieder Ferlemann.
6202
6203 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6204
6205         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
6206         accumulator result if it needs sign extension
6207
6208 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
6209
6210         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
6211
6212 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
6213
6214         * device/lib/gbz80/printf.c,
6215         * device/lib/z80/printf.c: removed define for NULL
6216
6217 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
6218
6219         * as/xa51/xa_link.c,
6220         * device/examples/ds390/ow390/ad26.c,
6221         * device/examples/ds390/ow390/cnt1d.c,
6222         * device/examples/ds390/ow390/counter.c,
6223         * device/examples/ds390/ow390/ds2480.h,
6224         * device/examples/ds390/ow390/ds2480ut.c,
6225         * device/examples/ds390/ow390/findtype.c,
6226         * device/examples/ds390/ow390/gethumd.c,
6227         * device/examples/ds390/ow390/owllu.c,
6228         * device/examples/ds390/ow390/ownetu.c,
6229         * device/examples/ds390/ow390/swt12.c,
6230         * device/examples/ds390/ow390/swtloop.c,
6231         * device/examples/ds390/ow390/temp.c,
6232         * device/examples/ds390/ow390/temp10.c,
6233         * device/examples/ds390/ow390/thermo21.c,
6234         * device/examples/ds390/ow390/tinilnk.c,
6235         * device/examples/ds390/ow390/tstfind.c,
6236         * device/examples/serialcomm/windows/serial.cpp,
6237         * device/examples/serialcomm/windows/test_serialcomm.cpp,
6238         * device/include/reg51.h: fixed line endings for cvs
6239
6240 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6241
6242         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
6243         packRegsForAccUse, packRegisters): new accumulator register
6244         packing algorithm
6245         * support/regression/ports/hc08/support.c (_putchar): suppress
6246         warning of unused variable
6247         * src/SDCCicode.c: added SWAP entry to codeTable
6248
6249 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
6250
6251         * device/lib/sprintf.c: forgot to add this file before previous commit
6252
6253 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
6254
6255         * src/pic16/gen.c (genPackBits): added operand right in function
6256         parameters, load result directly if p_type is POINTER (that is
6257         called by genNearPointerSet)
6258         * (genUnPackBits): added operand left in function parameters,
6259         * (genNearPointerGet, genNearPointerSet): prevent the loading of
6260         FSR0 if accessing bitfields,
6261
6262 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
6263
6264         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
6265           _print_format; updated printf, sprintf, vsprintf
6266         * device/include/asm/default/features.h: corrected comment/define
6267         * device/lib/Makefile.in: added sprintf.c
6268         * device/lib/libsdcc.lib: added sprintf module
6269         * device/lib/printf_large.c,
6270         * device/lib/vprintf.c,
6271         * device/lib/sprintf.c: totally refactored printf_large and vprintf
6272           into these 3 files
6273         * support/regression/Makefile: changed ALL_PORTS into a usefull default
6274         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
6275         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
6276           hc08 test
6277         * support/regression/tests/zeropad.c: define idata as data for hc08
6278
6279 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6280
6281         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
6282         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
6283         labels are referenced at least once (even if a reference is not found)
6284         * src/hc08/gen.c (emitcode): set isComment flag for comments
6285         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
6286         loads), rules 6a..6b (optimize jumps to return)
6287
6288 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6289
6290         * device/lib/acosf.c (acosf),
6291         * device/lib/asinf.c (asinf),
6292         * device/lib/atanf.c (atanf),
6293         * device/lib/ceilf.c (ceilf),
6294         * device/lib/cosf.c (cosf),
6295         * device/lib/coshf.c (coshf),
6296         * device/lib/cotf.c (cotf),
6297         * device/lib/fabsf.c (fabsf),
6298         * device/lib/floorf.c (floorf),
6299         * device/lib/log10f.c (log10f),
6300         * device/lib/logf.c (logf),
6301         * device/lib/sinf.c (sinf),
6302         * device/lib/sinhf.c (sinhf),
6303         * device/lib/sqrtf.c (sqrtf),
6304         * device/lib/tanf.c (tanf),
6305         * device/lib/tanhf.c (tanhf),
6306         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
6307         replaced all instances of "reentrant" in the library functions
6308         defined in math.h with this macro.
6309         * support/regression/tests/float_trans.c: reenabled test for hc08
6310
6311 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
6312
6313         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
6314         erroneously deleted
6315
6316 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6317
6318         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
6319         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
6320         multi-byte volatile operands are used
6321         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
6322         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
6323         initialization to area GSINIT0 so that it would always precede
6324         any static initializers in GSINIT
6325         * support/regression/tests/zeropad.c: fixed idata define for hc08
6326         * support/regression/tests/bug-927659.c,
6327         * support/regression/tests/float_trans.c: disabled tests for hc08
6328         pending missing library routines
6329         * .version: increased version number to 2.4.4 - hc08 port now passes
6330         regression tests
6331
6332
6333 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
6334
6335         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
6336         * Makefile.common.in,
6337         * as/Makefile,
6338         * as/hc08/Makefile.in,
6339         * as/mcs51/Makefile.in,
6340         * as/z80/Makefile.in,
6341         * debugger/mcs51/Makefile.in,
6342         * device/include/Makefile.in,
6343         * device/lib/Makefile.in,
6344         * doc/Makefile,
6345         * link/Makefile,
6346         * link/z80/Makefile.in,
6347         * packihx/Makefile.in,
6348         * sim/ucsim/main_in.mk,
6349         * sim/ucsim/avr.src/Makefile.in,
6350         * sim/ucsim/doc/Makefile.in,
6351         * sim/ucsim/gui.src/serio.src/Makefile.in,
6352         * sim/ucsim/hc08.src/Makefile.in,
6353         * sim/ucsim/s51.src/Makefile.in,
6354         * sim/ucsim/xa.src/Makefile.in,
6355         * sim/ucsim/z80.src/Makefile.in,
6356         * src/Makefile.in,
6357         * support/cpp2/Makefile.in,
6358         * support/librarian/Makefile,
6359         * support/makebin/Makefile: added DESTDIR to the install path proposed
6360         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
6361         * doc/sdccman.lyx: added DESTDIR documentation
6362
6363 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
6364
6365         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
6366         instruction for interrupt handlers, use fast returns when returning
6367         from high priority interrupts
6368
6369 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6370
6371         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
6372         code generation
6373         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
6374         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
6375         bugs, ported much of Bernhard's code from mcs51
6376         * src/mcs51/gen.c (genSend),
6377         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
6378         than one when calling a reentrant function
6379         * device/lib/_mullong.c: defined an alternate struct layout for big
6380         endian ports (hc08)
6381
6382 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6383
6384         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
6385         test
6386
6387 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6388
6389         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
6390         are sane and complete before asking the port its prefered parameter
6391         passing method (fixes bug #1017633)
6392         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
6393         and _ret3
6394
6395 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6396
6397         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
6398         problem in bitfields >= 8 bits.
6399
6400 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6401
6402         * src/SDCCsymt.c: undid changes that were not meant to be committed
6403
6404 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6405
6406         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
6407
6408 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
6409
6410         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
6411           copied and wrong bit got inverted
6412
6413 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6414
6415         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
6416         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
6417         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
6418         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
6419         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
6420         assignments to bitfields at known addresses
6421         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
6422         reads from bitfields at known addresses
6423         * src/hc08/ralloc.c (packRegisters),
6424         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
6425         genhc08Code): optimize pointer get values used as conditionals
6426         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
6427         and branch
6428
6429 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6430
6431         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
6432         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
6433         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
6434         as conditionals
6435
6436 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6437
6438         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
6439
6440 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6441
6442         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
6443         related problems
6444
6445 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
6446
6447         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
6448
6449 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6450
6451         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
6452         mcs51 port
6453
6454 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
6455
6456         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
6457
6458 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6459
6460         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
6461         cases use more compact code.
6462
6463 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
6464
6465         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
6466
6467 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6468
6469         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
6470
6471 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6472
6473         * src/SDCCsymt.h,
6474         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
6475         parameter of changePointer() from symbol* to sym_link*
6476         * src/SDCCast.c (decorateType): call changePointer() for CAST op
6477         * src/SDCCsymt.c (compareType): void* type is castable to other
6478         pointers, but not necesarily an exact match.
6479         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
6480         is no longer blindly treated as an exact match.
6481         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
6482
6483 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
6484
6485         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
6486
6487 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
6488
6489         * src/pic/gen.c,
6490         * src/pic/pcode.c,
6491         * src/pic/ralloc.h,
6492         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
6493
6494 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
6495
6496         * src/pic/device.c,
6497         * src/pic/device.h,
6498         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
6499
6500 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6501
6502         * src/mcs51/gen.c (emitcode): fixed bug #992819
6503
6504 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
6505
6506         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
6507           there's no need to make it worse
6508
6509 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6510
6511         * src/mcs51/ralloc.c (deassignLR),
6512         * src/ds390/ralloc.c (deassignLR),
6513         * src/hc08/ralloc.c (deassignLR),
6514         * src/z80/ralloc.c (deassignLR),
6515         * src/pic/ralloc.c (deassignLR),
6516         * src/pic16/ralloc.c (deassignLR),
6517         * src/avr/ralloc.c (deassignLR),
6518         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
6519         rlivePoint): fixed another part of bug #971834
6520
6521 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6522
6523         * src/z80/main.c: enabled "critical" keyword
6524         * src/z80/mappings.i,
6525         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
6526         functions (fixes bug #979646)
6527         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
6528
6529 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6530
6531         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
6532           such as c:\mydir.
6533
6534 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
6535
6536         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
6537           doesn't disable too much optimizations
6538
6539 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6540
6541         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
6542
6543 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
6544
6545         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
6546
6547 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
6548
6549         * src/pic/gen.c tidied up tabs
6550         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
6551         * src/pic/main.c tidied up tabs
6552         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
6553         * src/pic/pcoderegs.c tidied up tabs
6554         * src/pic/ralloc.c tidied up tabs
6555
6556 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
6557
6558         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
6559         to S_FIXED for pic16 port and when symbol is not in level 0,
6560         allocate for S_REGISTER storage class and pic16 port, too,
6561         * src/pic16/device.h: prototype for checkSym,
6562         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
6563         * (pic16_assignConfigWordValue): test the value and the mask to
6564         validate that the value is suitable for the configuration word,
6565         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
6566         collect extern declared symbols, don't emit symbol twice, check
6567         first if symbol is in publics set first,
6568         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
6569         * added command line '--fstack' which enables an experimental
6570         feature for stack access, too buggy to be used yet...
6571         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
6572         * (pic16_allocDirReg): when register has storage class S_REGISTER
6573         allocate in pic16_dynAccessRegs,
6574         * device/include/pic16/pic18f????.h: modified configuration word
6575         naming convention, words started as CONFIG0H but should be CONFIG1H
6576
6577 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
6578
6579         * device/include/mcs51reg.h: fixed bug 970993
6580
6581 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
6582
6583         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
6584         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
6585         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
6586         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
6587         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
6588         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
6589           error/warning numbers,
6590           added function setWarningDisabled()
6591         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
6592         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
6593           _memcmp.c _memmove.c calloc.c realloc.c free.c
6594         * support/regression/tests/malloc.c: added tests for new functionality
6595         * support/regression/tests/zeropad.c: added tests for truncated initializers
6596           and initialized char arrays starting with '\x0'
6597         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
6598
6599 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
6600
6601         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
6602
6603 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6604
6605         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
6606         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
6607         peephole 177.e. Thanks to anonymous
6608
6609 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
6610
6611         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
6612         function isn't used in the source but referenced as a
6613         variable initializer then declare it as extern in .asm file
6614
6615 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
6616
6617         * .version: increased version number to 2.4.3
6618
6619         Adding version extension according to ChangeLog CVS revision
6620         * src/Makefile.in (target all): added dependency 'version.h'
6621         * (rule version.h): added rule to create version.h from ChangeLog,
6622         * (rule dep): added dependency version.h,
6623         * src/version.awk: AWK script to create version.h
6624         * src/SDCCdwarf2.c (dwWriteModule),
6625         * src/SDCCglue.c (initialComments),
6626         * src/SDCCmain.c (printVersionInfo): modified to write after
6627         version string the version extension number,
6628         * src/SDCCutil.c: included "version.h"
6629         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
6630         number,
6631         * src/SDCCutil.h: added prototype for getBuildNumber
6632
6633         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
6634         includeDirsSet, too,
6635         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
6636         const char [] is found in function prototype...
6637
6638         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
6639         moving to WREG with source is already in WREG,
6640         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
6641         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
6642         * (aopForSym): stack'ed symbols are partially supported, added
6643         if-clause to support symbols in FARSPACE,
6644         * (sameRegs): added test for AOP_ACC to see if registers are same,
6645         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
6646         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
6647         * (pic16_popRegFromString): will not allocate a new register if it
6648         doesn't find one by name, bug may have introduced...
6649         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
6650         * (genIpush): revived to use pic16 port's stack,
6651         * (genAddrOf): added incomplete case for stack'ed operand,
6652         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
6653         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
6654         can handle multibyte operands,
6655         * src/pic16/glue.c (pic16_printIval*): some debug info added,
6656         * (pic16initialComments): added message for MPLAB compatibility
6657         mode enabled,
6658         * src/pic16/main.h: prototype for pic16_mplab_comp,
6659         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
6660         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
6661         * (_pic16_linkEdit): NEW, handles link stage, transferred here
6662         because of increased complexity of procedure,
6663         * (_process_pragma): stack pragma changed to format 'stack pos len',
6664         emit symbol '_stack_end' to conform with gplink,
6665         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
6666         to search for register,
6667         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
6668         PO_GPR_REGISTER,
6669         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
6670         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
6671         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6672         case for PO_GPR_REGISTER,
6673         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
6674         dies, the new era is ahead !...
6675         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
6676         pic16_dynInternalRegs,
6677         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
6678         * (pic16_allocDirReg): minor optimizations and bug fixes,
6679         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
6680
6681         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
6682         load stack and frame pointer with address of 'stack_end' symbol
6683
6684 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
6685
6686         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
6687         without source code but only variable initializers
6688
6689 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
6690
6691         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
6692         external are not declared as extern to reduce overhead while linking
6693
6694 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
6695
6696         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
6697
6698 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
6699
6700         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
6701           Yee Keat for the patch
6702         * src/SDCCast.c (decorateType): fixed bug #979599
6703         * src/ds390/gen.h: removed local fReturnSizeDS390
6704         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
6705         * src/ds390/gen.c (genAnd, genOr, genXor),
6706         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
6707
6708 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
6709
6710         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
6711         add relFilesSet to $3, manipulate $2 to handle linking of object
6712         files without source files in command line,
6713         * device/include/pic16 (all headers): added ID location macros,
6714         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
6715         entries for ID location bytes,
6716         * (pic16_assignIdByteValue): NEW,
6717         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
6718         added field dumpcalltree to pic16_options_t,
6719         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
6720         is used instead of pic16_Gstack_base_addr, check if (ifx) before
6721         emitting rFalseIfx label after check_carry label,
6722         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
6723         pic16_emitDIRegs), NEW
6724         * (pic16glue): dump .calltree file when option --calltree found,
6725         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
6726         * (_pic16_genAssemblerPreamble): emit ID locations after
6727         configuration registers,
6728         * (pic16_linkCmd): modifications of the link command,
6729         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
6730         * (pic16_pCodeInitRegisters): don't init stack registers,
6731         * (pic16_findPrevInstruction): fixed bug,
6732         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
6733         bug with immediate registers,
6734         * (buildCallTree): traces stack push and pop,
6735         * (pct2): dump also stack usage for each function,
6736         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
6737         * (pic16_allocDirReg): various modifications,
6738         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
6739         fixed to 1,
6740
6741 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
6742
6743         * src/pic16/pcode.c: removed buggy double colon
6744
6745 2004-07-01 Borut Razem <borut.razem AT siol.net>
6746
6747         * support/scripts/sdcc.nsi: added include/pic16 to setup
6748
6749 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
6750
6751         * device/lib/Makefile.in: fixed bug in target objects-pic16,
6752         * device/lib/pic16/Makefile: prefixed with dash (-) command under
6753         target 'clean',
6754         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
6755         specific command line arguments. Also added sample lkr script
6756         for placing a variable at a specific memory bank.
6757         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
6758         at a specific memory bank,
6759         * (pic16_dump_isection): fixed bug which caused string literals to
6760         be omitted when dumping idata section,
6761         * (pic16_groupRegistersInSection): added code to handle registers
6762         in specific memory banks,
6763         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
6764         public, all references are renamed too,
6765         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
6766         AOP_DPTR2,
6767         * (pic16_storeForReturn): added case to handle when dest is WREG,
6768         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
6769         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
6770         pic16_rel_udata, check to see if that register is marked as being
6771         a member of a specific memory bank,
6772         * (pic16_printIvalCharPtr): added code to add string literals either
6773         to code or the idata sections,
6774         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
6775         also accept the 'udata' pragma,
6776         * src/pic16/main.h: new structure types sectName and sectSym
6777         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
6778         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
6779         * (pic16_findPrevInstruction): fixed, it returned nothing,
6780         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
6781         instruction combinations,
6782         * (pic16_FixRegisterBanking): heavily reorganised,
6783         * (pic16_AnalyzeBanking): if generating banksel directives is
6784         disabled, then don't call FixRegisterBanking at all,
6785         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
6786         completely removed,
6787         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
6788
6789 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
6790
6791         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
6792         Phuah Yee Keat <yk.phuah AT nestac.com>
6793
6794 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6795
6796         * src/pic16/glue.c (pic16createInterruptVect): function now emits
6797         correctly the IVT even if it is relocated to some other location
6798
6799 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
6800
6801         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
6802         * device/include/pic16/pic18f2220.h: NEW,
6803         * device/lib/pic16/libdev/pic18f2220.c: NEW,
6804         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
6805         * src/pic16/device.c (struct Pics16): added info for 18f2220,
6806         * src/pic16/device.h (struct pic16_options): added ivt_loc and
6807         nodefaultlibs, ivt_loc is the location of the interrupt vector
6808         table, and nodefaultlibs signs that default libraries should not be
6809         linked in link stage,
6810         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
6811         according to --ivt-loc argument,
6812         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
6813         when pragma stack is found,
6814
6815 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6816
6817         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
6818         256 (range check), 257 (do while), 258.a-f (bit banging
6819         f.e. on 3-wire SPI bus)
6820
6821 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6822
6823         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
6824         variables used exclusively within a loop
6825
6826 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
6827
6828         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
6829
6830 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6831
6832         * src/SDCClrange.c (computeClash): fixed bug #971834
6833
6834 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6835
6836         * src/mcs51/gen.c (genCmp): fixed bug #975903
6837         * src/hc08/gen.c (operandsEqu),
6838         * src/ds390/gen.c (operandsEqu),
6839         * src/z80/gen.c (operandsEqu),
6840         * src/pic/gen.c (operandsEqu),
6841         * src/pic16/gen.c (operandsEqu),
6842         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
6843         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
6844
6845 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6846
6847         * src/SDCCcse.c (cseBBlock): fixed bug #966963
6848
6849 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
6850
6851         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
6852         default case in switch statement,
6853         * glue.c (pic16_initPointer): expr is initialised via decoarteType
6854         to eliminate problem with initialisation of pointers, but problem
6855         still exists,
6856         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
6857         * (emitStaticSegment): removed various lines emitting debug info,
6858         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
6859         added processor registers for utilizing EEPROM,
6860         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
6861         configurable and set 8
6862
6863 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
6864
6865         * .version: increased version number to 2.4.2,
6866
6867         Cumulative patch for pic16 port
6868         * src/pic16/device.c: changed scheme to dump initial values for
6869         variables in idata segment, all print_idata* functions were removed,
6870         now the pic16_printIval* will be called,
6871         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
6872         * _pic16_printPointerType, pic16_printPointerType,
6873         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
6874         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
6875         NEW, similar to the respective functions in SDCCglue.c,
6876         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
6877         way, emitting hex bytes,
6878         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
6879
6880 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6881
6882         * src/avr/ralloc.c (serialRegAssign),
6883         * src/xa51/ralloc.c (serialRegAssign),
6884         * src/pic/ralloc.c (serialRegAssign),
6885         * src/pic16/ralloc.c (serialRegAssign),
6886         * src/hc08/ralloc.c (serialRegAssign),
6887         * src/z80/ralloc.c (serialRegAssign),
6888         * src/ds390/ralloc.c (serialRegAssign),
6889         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
6890
6891 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6892
6893         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
6894         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
6895
6896 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
6897
6898         Cumulative patch for pic16 port:
6899         * src/pic16/device.h (typedef PIC16_device) modified fields for
6900         defining microcontrollers,
6901         * src/pic16/device.c: added new info for all devices in Pics16 array,
6902         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
6903         to be optimised out by the pCode optimiser,
6904         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
6905         specially, bug reported by G.M. Gallant,
6906         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
6907         as force'd so that cannot be optimised out by pCode optimiser,
6908         * src/pic16/pcode.c,
6909         * src/pic16/pcodepeeph.c,
6910         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
6911         they are disabled by default, but can be enabled explicit with
6912         command argument --denable-peeps, for testing,
6913         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
6914         --pomit-ivt in COMPILE_FLAGS
6915
6916 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6917
6918         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
6919           compilation on MSVC
6920
6921 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
6922
6923         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
6924
6925 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6926
6927         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
6928         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
6929
6930 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
6931
6932         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
6933         would only assign 0x300001 register.
6934
6935 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
6936
6937         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
6938         in COMPILE_FLAGS. Thanks to G. Gallant for report.
6939
6940 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6941
6942         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
6943         for ds80c400
6944         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
6945         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
6946         added peephole 254 (left shift), 255 (jump table)
6947
6948 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
6949
6950         * device/lib/Makefile.in: removed comment line with model-pic16,
6951         * (target port-specific-objects-pic16): the libraries and objects
6952         are copied to the build directory form the device/lib/pic16/bin
6953         directory
6954
6955         Cumulative patch concerning pic16 port:
6956         * library directory has been re-organized,
6957         * added support for PIC18F1220,
6958         * added headers and library sources for chips 18f1220,18f6520,
6959         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
6960
6961         * configuration registers setting has changed, now each supported
6962         device has a complete description of the registers it uses,
6963         * all initialisations are moved to idata sections, these section
6964         can be absolute or relocatable,
6965         * fixed initialisation of codespace variables,
6966         * fixed warning about PCLATU and gpsim,
6967         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
6968         * (genAssign): use table reads when assigning from variables in codespace,
6969         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
6970         char/int variables placed in codespace,
6971         * (pic16_emitConfigRegs): NEW, emits a list with configuration
6972         registers set in .asm file, no need for --pomit-config-words anymore,
6973         * (pic16glue): some 8051 legacy segments are commented out
6974         (to be removed completely),
6975         * added support for alternative assembler and linker with --asm=
6976         and --link= command line arguments,
6977         * peepholes are disabled automatically in the port, no need to
6978         specify on command line,
6979         * port supports natively char/int/long multiplication, but converts
6980         all divisions to support functions,
6981         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
6982         to the file set in variable $2,
6983         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
6984         strings in ASCII format and not in hex,
6985         * ralloc.c (serialRegAssign): added a triplet of conditional calls
6986         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
6987         allocate proper register if iCodes aren't temporary,
6988
6989 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
6990
6991         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
6992
6993 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
6994
6995         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
6996         is commented out
6997
6998 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6999
7000         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
7001         computed address is reused
7002         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
7003         multi-byte bitfields
7004
7005 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
7006
7007         * src/z80/gen.c: (genArrayInit): must check for pointers too
7008
7009 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
7010
7011         * support/regression/tests/zeropad.c: never meant to commit the
7012           nestedstruct test: removed, added check for GCC version
7013
7014 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
7015
7016         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
7017         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
7018         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
7019           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
7020           bugs 928906 and 954082 half-empty initializers
7021         * src/SDCCsymt.h,
7022         * src/SDCCsymt.c (getAllocSize): added for above fix
7023         * src/z80/gen.c (genArrayInit): fixed bug 741044
7024         * support/regression/tests/zeropad.c: added tests
7025
7026 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
7027
7028         * src/pic16/device.c (pic16_dump_section): corrected bug which
7029         caused some symbols of the libraries to be misplaced
7030
7031 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
7032
7033         * src/pic16/glue.c,
7034         * src/pic16/ralloc.h,
7035         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
7036         to fix conflict with pic port
7037
7038 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
7039
7040         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
7041         externs configuration variables,
7042         * src/pic16/ralloc.h,
7043         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
7044         prototype in header, commented out some debug messages
7045
7046 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
7047
7048         * src/pic16/glue.c,
7049         * src/pic16/main.c,
7050         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
7051         for gpasm COFF object generation. Thanks to D. Hawkins for
7052         his patch info
7053
7054 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7055
7056         * src/ds390/main.c,
7057         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
7058         Brock for spotting this)
7059         * src/ds390/gen.c (genEndFunction),
7060         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
7061         interrupt handler and critical. Disable push/pop optimizations when
7062         peephole optimizations disabled.
7063
7064 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
7065
7066         Updated pic16 library sources and headers.
7067         * device/lib/pic16/pic18f*/ ,
7068         * device/include/pic16/*.h: modified to handle structured SFR
7069         definitions
7070
7071 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
7072
7073         * src/port.h (PORT structure): added hook initPaths, now each
7074         port can declare its own default search paths,
7075         which can been seen with the --print-search-dirs option,
7076         see pic16 port for example,
7077         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
7078         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
7079         * (doPrintSearchDirs): NEW, replaces in a central manner the
7080         printing of search dirs which was split in set*Paths functions,
7081         * (main): added call to port->initPaths and doPrintSearchDirs,
7082         * src/avr/main.c,
7083         * src/ds390/main.c,
7084         * src/hc08/main.c,
7085         * src/izt/i186.c,
7086         * src/izt/tlcs900h.c,
7087         * src/mcs51/main.c,
7088         * src/pic/main.c,
7089         * src/pic16/main.c: modified port structures to reflect addition of
7090         initPaths hook,
7091
7092         * src/pic16/device.c (regCompare): registers are finally sorted by name,
7093         * (pic16_dump_section): for registers in same address reserve memory once,
7094         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
7095         to no_banksel,
7096         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
7097         result is greater in size than right or left,
7098         * (pic16_genUMult8X8_8): there are some cases where the result can
7099         be 16 bits size, so handle these,
7100         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
7101         * (pic16_outBitC): modified to emit pcodes,
7102         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
7103         or not,
7104         * (genDivOneByte): implemented algorithm to divide 8-bits,
7105         * (genCmp): uncommented goto, but issues still exist,
7106         * (genAnd): fixed a bug with variables >8bits,
7107         * (genPackBits): optimization added that uses BCF/BSF to change a
7108         single bit,
7109         * (genAssign): fixed bug when assigning floating point literals,
7110         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
7111         __sdcc_gsinit_startup label,
7112         * src/pic16/main.c (_pic16_init): removed search directory
7113         initialisations,
7114         * (_pic16_initPaths): NEW, used to initialise search directories,
7115         * (_hasNativeMulFor): support functions for all except char/int
7116         multiplication, and char division,
7117         * (PIC16_port struct): modified entry for native mul support,
7118         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
7119         no_banksel option,
7120         * (buildCallTree): call to register_usage is ifdef'ed out,
7121
7122 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7123
7124         * device/include/string.h: applied Stas Sergeev's patch to make this
7125         header file compatible with the preprocessor -Wundef option
7126         * src/SDCCmain.c (main): abort compilation if preprocessor reports
7127         failure (fixes bug #941458)
7128
7129 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7130
7131         * src/SDCCopt.c (killDeadCode): fixed bug #907733
7132         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
7133         that the variable, not the function, should be static
7134         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
7135         to be consistent with non-literal case
7136
7137 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7138
7139         * src/SDCCast.c (isConformingBody): fixed bug #949967
7140         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
7141         convilong): fixed bug #952086
7142
7143 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7144
7145         * src/SDCCmem.c (allocVariables): fixed bug #955321
7146
7147 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7148
7149         * src/hc08/main.c (_hc08_genAssemblerEnd),
7150         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
7151         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
7152         completely eliminated the use of a temporary file
7153         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
7154         when more than one file linked
7155         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
7156
7157 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7158
7159         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
7160         which fixes bug #543481
7161         * support/regression/tests/bug-751703.c: fixed comments left from a
7162         cut and paste error
7163         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
7164         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
7165         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
7166         scopes
7167         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
7168         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
7169         are now changed to underscores in moduleName
7170
7171 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7172
7173         * as/mcs51/lkmem.c: better fix for bug #954173
7174
7175 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
7176         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7177
7178         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
7179         * device/include/c8051f000.h,
7180         * device/include/c8051f120.h,
7181         * device/include/c8051f300.h,
7182         * device/include/c8051f310.h,
7183         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
7184         PWM16) and detab'ed
7185
7186 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7187
7188         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
7189         and mailing lists, doc'ed --no-peep-comments, removed reference
7190         to knoppix (newest version has no LyX/LaTeX), other minor changes
7191         * src/SDCCglue.c (glue): save 2 bytes stack space with
7192         option --main-return. The ljmp could probably be avoided too
7193
7194 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7195
7196         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
7197
7198 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7199
7200         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
7201         * src/SDCCopt.c (isLocalWithoutDef),
7202         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
7203         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
7204         (credit to Maarten Brock for patch #949363, on which this is based)
7205         * support/regression/tests/bug-751703.c: some test cases of extern used
7206         within inner scopes.
7207
7208 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7209
7210         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
7211         SPEC_STRUCT
7212         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
7213         struct definitions
7214         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
7215         dwWriteLabel): fix to create valid debugger symbols even when
7216         the module name has non-alphanumeric symbols in it
7217         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
7218         when a variable's allocation has been optimized away
7219
7220
7221 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7222
7223         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
7224         * src/hc08/main.c,
7225         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
7226         * src/mcs51/main.c,
7227         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
7228         * src/ds390/main.c,
7229         * src/z80/gen.c (z80_emitDebuggerSymbol),
7230         * src/z80/main.c,
7231         * src/pic/gen.c (pic14_emitDebuggerSymbol),
7232         * src/pic/main.c,
7233         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
7234         * src/pic16/main.c,
7235         * src/avr/gen.c (avr_emitDebuggerSymbol),
7236         * src/avr/main.c,
7237         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
7238         * src/xa51/main.c,
7239         * src/SDCCdebug.c (emitDebuggerSymbol),
7240         * src/SDCCdebug.h,
7241         * src/port.h: added a debugger struct to the port struct. Added a
7242         callback for defining debugger symbols
7243
7244         * src/SDCCast.c (createLabel),
7245         * src/SDCC.y (labeled_statement): mark all compiler generated labels
7246         with isitmp = 1
7247         * src/SDCCicode.h,
7248         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
7249         iCode back to the ast for the function
7250
7251         * src/hc08/ralloc.c (hc08_assignRegisters),
7252         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
7253         unneeded fields from the regs struct.
7254         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
7255         pushReg() & pullReg() functions instead of emitcode()
7256
7257         * src/hc08/gen.c (genLabel, genhc08Code),
7258         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
7259
7260         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
7261         debugger hooks
7262
7263         * src/hc08/gen.c (genEndFunction, genhc08Code),
7264         * src/hc08/gen.h,
7265         * src/mcs51/gen.c (genEndFunction, gen51Code),
7266         * src/mcs51/gen.h,
7267         * src/ds390/gen.c (genEndFunction, gen390Code),
7268         * src/ds390/gen.h,
7269         * src/z80/gen.c (genEndFunction, genZ80Code),
7270         * src/z80/gen.h,
7271         * src/z80/z80.h,
7272         * src/pic/gen.c (genEndFunction, genpic14Code),
7273         * src/pic/gen.h,
7274         * src/pic16/gen.c (genEndFunction, genpic16Code),
7275         * src/pic16/gen.h,
7276         * src/avr/gen.c (genEndFunction, genAVRCode),
7277         * src/avr/gen.h,
7278         * src/xa51/gen.c (genEndFunction, genXA51Code),
7279         * src/xa51/gen.h,
7280         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
7281         specific code to cdbFile.c and out of the backend code generators
7282
7283         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
7284         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
7285         starting address is now 0
7286
7287         * as/hc08/asm.h,
7288         * as/hc08/m08pst.c,
7289         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
7290         assembler directive for DWARF support
7291         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
7292
7293         * src/src.dsp,
7294         * src/Makefile.in,
7295         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
7296
7297 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7298
7299         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
7300         and inappropriate peephole optimization in jump tables
7301
7302 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7303
7304         * as/hc08/m08pst.c,
7305         * src/SDCCglue.c: sdccopt works for the hc08 port now
7306
7307 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
7308
7309         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
7310
7311 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7312
7313         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
7314
7315 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7316
7317         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
7318         rules
7319         * src/SDCCmain.c,
7320         * src/SDCCglobl.h,
7321         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
7322         comments from the peephole optimizer replacement rules
7323         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
7324         symbols
7325         * src/SDCCcse.c (updateSpillLocation),
7326         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
7327         equivalents
7328         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
7329         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
7330         objects far pointers
7331
7332 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7333
7334         * src/SDCCsymt.h: a missing part of my last change
7335         * src/pic/ralloc.c (regTypeNum),
7336         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
7337
7338 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7339
7340         * src/SDCCicode.h,
7341         * src/SDCCicode.c (aggrToPtrDclType),
7342         * src/SDCCptropt.h,
7343         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
7344         ptrPseudoSymConvert),
7345         * src/pic/ralloc.c (regTypeNum),
7346         * src/pic16/ralloc.c (regTypeNum),
7347         * src/hc08/ralloc.c (regTypeNum),
7348         * src/ds390/ralloc.c (regTypeNum),
7349         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
7350         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
7351
7352 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7353
7354         * link/z80/lkmain.c (afile),
7355         * as/hc08/lkmain.c (afile),
7356         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
7357         prevent a pointer problem when a filename has no directory and
7358         no extension specified.
7359
7360 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7361
7362         * link/z80/lkmain.c (afile): allow periods in directory names
7363         * link/z80/lkmain.c (afile),
7364         * as/mcs51/lkmain.c (afile),
7365         * as/hc08/lkmain.c (afile): allow linker script file to have an
7366         extension other than ".lnk"
7367         * link/z80/lklex.c (getfid),
7368         * link/z80/lkmain.c (parse),
7369         * as/mcs51/lklex.c (getfid),
7370         * as/mcs51/lkmain.c (parse),
7371         * as/hc08/lklex.c (getfid),
7372         * as/hc08/lkmain.c (parse): Support comments in the linker script
7373         file on lines by themselves and after filenames
7374
7375 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7376
7377         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
7378
7379 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7380
7381         * src/z80/peeph-z80.def: removed some peephole rules that don't
7382         work with multibyte arithmetic (fixed bug #937126)
7383         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
7384         to registers and not global variables
7385         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
7386         geniCodePreInc, geniCodePostDec, geniCodePreDec,
7387         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
7388         checking for assignments not internally generated (fixed bug #931895)
7389         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
7390         structure member (fixed bug #930072)
7391
7392 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7393
7394         * src/SDCCmain.c (linkEdit),
7395         * src/hc08/main.c (_hc08_parseOptions),
7396         * as/hc08/Makefile.in,
7397         * as/hc08/aslink.h,
7398         * as/hc08/asm.h,
7399         * as/hc08/m08pst.c,
7400         * as/hc08/lkrloc.c (relr, rele),
7401         * as/hc08/lkarea.c (lnkarea)
7402         * as/hc08/lkmain.c (afile, parse),
7403         * as/hc08/lkelf.c: support for ELF output
7404         * as/hc08/lks19.c (s19),
7405         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
7406
7407 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7408
7409         * as/mcs51/lkihx.c: Fixed bug #899105.
7410
7411 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7412
7413         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
7414         .dsp files from Unix to DOS.
7415
7416 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7417
7418         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
7419         function pointers; we have been compliant for several months now.
7420         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
7421         change that was accidently commented out
7422         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
7423         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
7424         bug #922319
7425
7426 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7427
7428         * src/hc08/gen.c: output of all of the internal debugging information
7429         is now controlled by the D() macro; it is disabled by default
7430
7431 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7432
7433         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
7434         harder to keep the same registers during a CAST iCode
7435         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
7436         long via int can be done in a single cast, if the signedness is
7437         correct.
7438         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
7439         putchar() in tinibios.c in ds390's library
7440
7441 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
7442
7443         * src/SDCCast.c (decorateType): fixed bug #898889,
7444         cast result of a literal complement too
7445         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
7446         fixed check for bitfields
7447
7448 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
7449
7450         * src/SDCCicode.c (geniCodeLogic): made it static,
7451         (geniCodeLogicAndOr): added in order to fix bug #905492,
7452         (ast2iCode): fixed bug #905492
7453         * support/regression/tests/bug-905492.c: added
7454         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
7455         (processParms): fixed bug #927659: don't copy parms, this will clear
7456         decorated flag
7457         * support/regression/tests/bug-927659.c: added
7458
7459 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
7460
7461         * src/SDCCast.c (addCast): don't cast float to char
7462         * device/lib/libsdcc.lib: added _memmove
7463
7464 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
7465
7466         * device/lib/large/Makefile: fixed parallel execution by
7467         replacing `make` by `$(MAKE)`
7468
7469 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7470
7471         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
7472         offsets (fixes bug #923936)
7473
7474 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
7475
7476         * device/lib/small/Makefile: fixed parallel execution by
7477         replacing `make` by `$(MAKE)`
7478
7479 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7480
7481         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
7482
7483 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
7484
7485         * src/pic/gen.c (genCpl): multi-byte complements were not working.
7486         * src/regression/Makefile: Regression test was not running.
7487
7488 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
7489
7490         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
7491         complement if possible
7492         * src/SDCCval.c (valComplement),
7493         * src/SDCCicode.c (operandOperation): fixed complement of literal
7494         * support/regression/tests/onebyte.c (testComplement): added
7495
7496 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
7497
7498         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
7499         return an optimized tree; actually replace actParm with the new tree
7500         * src/SDCCast.h: added some parantheses to remove side effects
7501         * support/regression/tests/bug-920866.c
7502
7503 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
7504         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
7505         Bit operands were not being handled properly in the pic14 port.
7506         (now src/regression/add.c passes again).
7507
7508 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7509
7510         * src/SDCC.y (labeled_statement): case and default no longer require
7511         a following statement (RFE #893037)
7512
7513 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7514
7515         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
7516         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
7517         disabled (fixes bug #916294)
7518         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
7519         "mov a,acc"; patch provided by Lenny Story
7520         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
7521
7522 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7523
7524         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
7525         functions
7526         * src/ds390/gen.c (genFunction, genEndFunction),
7527         * src/ds390/ralloc.c (ds390_assignRegisters),
7528         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
7529         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
7530         pushed if there are parameters passed on the stack. Also, a cleaner
7531         way to decide if r0/r1 should be pushed/popped. (Together they fix
7532         bug #918693)
7533
7534 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7535
7536         * doc/sdccman.lyx,
7537         * device/lib/mcs51/crtpagesfr.asm,
7538         * device/lib/mcs51/crtxinit.asm,
7539         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
7540         to avoid confusion with Si Lab's SFRPAGE register.
7541
7542 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7543
7544         * src/SDCCglue.c (emitMaps): allow public sfr variables
7545         * src/SDCCglue.c (initialComments): include compiler build date
7546         with compiler version and put the timestamp of the generated
7547         assembly file on a serperate line to be less confusing.
7548         * src/port.h: added genInitStartup hook
7549         * src/avr/main.c,
7550         * src/ds390/main.c,
7551         * src/hc08/main.c,
7552         * src/pic/main.c,
7553         * src/pic16/main.c,
7554         * src/xa51/main.c,
7555         * src/z80/main.c: genInitStartup initialize as NULL (default to
7556         historical behaviour)
7557         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
7558         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
7559         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
7560         library instead of hard coding it into the compiler.
7561         * support/regression/ports/mcs51-stack-auto/spec.mk,
7562         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
7563         * device/lib/mcs51/Makefile,
7564         * device/lib/small/Makefile,
7565         * device/lib/large/Makefile,
7566         * device/lib/mcs51/crtpagesfr.asm,
7567         * device/lib/mcs51/crtstart.asm,
7568         * device/lib/mcs51/crtxclear.asm,
7569         * device/lib/mcs51/crtxinit.asm,
7570         * device/lib/mcs51/crtclear.asm,
7571         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
7572         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
7573         and into user configurable files.
7574         * device/lib/clean.mk: clean mcs51 directory too
7575         * support/regression/tests/longlit.c: added static to T1 declaration
7576         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
7577         accesses in the initialization code
7578
7579 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7580
7581         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
7582         OSCTRIMVAL as noted in bug #916008
7583
7584 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7585
7586         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
7587         in loops with multiple exits (reported as incorrect registers
7588         used by Martin Helmling in Sdcc-user list)
7589
7590 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7591
7592         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
7593         made ds390 register extensions look less like error messages
7594
7595 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7596
7597         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
7598         reported by Adam Wozniak in Sdcc-user list
7599
7600 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
7601
7602         * src/SDCCast.c (decorateType): fixed with bug and promotion in
7603         arithmetic optimizations, added debug output
7604
7605 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
7606
7607         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
7608         * sdcc.spec: updated and split sdcc into 3 rpms
7609         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
7610         needed for literals of LEFT_OP and '+'
7611         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
7612         introduced RESULT_TYPE_NOPROM
7613         (geniCodeMultiply): fixed logic for decision if mul is optimized to
7614         left shift
7615         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
7616         limited promotion to int only for '*'
7617         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
7618
7619 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
7620
7621         * src/pic16/gen.c (genSkip),
7622         (genc16bit2lit), (gencjneshort): commented out
7623         (is_LitOp): new helper function, checks operand type
7624         (genCmpEq): rewritten
7625
7626 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
7627
7628         * support/regression/tests/bug-908454.c: added
7629
7630 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
7631
7632         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
7633         * src/SDCCicode.c (usualBinaryConversions): op needs int type
7634         (geniCodeCast): cosmetic, don't preserve bit storage class
7635         (geniCodeLeftShift): added promotion
7636         (geniCodeLogic): fixed regression
7637         * src/SDCCsymt.c (computeTypeOr): accept bits too
7638         (compareType): 2nd part of fix for bug #908454, needed for bitfields
7639
7640 2004-03-07  Borut Razem <borut.razem AT siol.net>
7641
7642         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
7643
7644 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
7645
7646         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
7647         version of pic16_genPackRegisters which does not check if ic is a
7648         CAST operator,
7649         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
7650         function cause string1.c regression test fails
7651
7652 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
7653
7654         * sim/ucsim/configure.in,
7655         * sim/ucsim/configure,
7656         * sim/ucsim/doc/Makefile.in: use docdir
7657         * src/SDCC.y: fixed sbit atrributes
7658         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
7659         * src/SDCCast.c (decorateType): |^& need special promotion handling
7660         * src/SDCCast.h,
7661         * src/SDCCsymt.h: moved definition of RESULT_TYPE
7662         * src/SDCCsymt.h (computeType),
7663         * src/SDCCicode.c: computeType() needs op
7664         * src/SDCCsymt.c (checkTypeSanity),
7665         * doc/sddman.lyx: "plain" bitfields are unsigned
7666         * src/SDCCsymt.c (computeTypeOr): added
7667         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
7668         |^& ops
7669         * src/SDCCval.c (val*): computeType() needs op
7670         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
7671         * support/regression/tests/onebyte.c: added tests for |^&
7672
7673 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
7674
7675         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
7676         for writing icode into asm output.
7677
7678 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
7679
7680         * src/pic16/device.c: added some debug lines enabled
7681         with macro DEBUG_CHECK,
7682         * src/pic16/genarith.c: more debug in genPlus,
7683         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
7684         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
7685         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
7686         * (aopForSym): onStack symbols are re-placed in data memspace,
7687         and onStack flag is cleared,
7688         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
7689         copy temporary pcodeop,
7690         * (genPcall): added warning for not updating PCLATU,
7691         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
7692         always true for pic16 port,
7693         * (genMultOneWord): NEW, supports integer multiplication,
7694         * (genMult): modified to call genMultOneWord,
7695         * (ifxForOp): added warning when return NULL,
7696         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
7697         flag is set before call to operandFromSymbol for implicit
7698         added structures,
7699         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
7700         options.intlong_rent are set by default,
7701         * (_hasNativeMulFor): modified to allow port generation of integer
7702         multiplication,
7703         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
7704         set regtype to REG_SFR for all registers, restricting seting the
7705         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
7706
7707 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7708
7709         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
7710         more than 500 times in the regression tests
7711
7712 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7713
7714         * support/Util/SDCCerr.h,
7715         * support/Util/SDCCerr.c,
7716         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
7717         enumerator_list),
7718         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
7719         for symbol conflicts.
7720         * support/valdiags/tests/enum.c,
7721         * support/valdiags/tests/tentdecl.c,
7722         * support/valdiags/tests/struct.c: expect possible error messages
7723         referring to original symbol definitions.
7724         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
7725         * src/SDCCsymt.h,
7726         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
7727
7728 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
7729
7730         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
7731
7732 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
7733
7734         * src/pic16/ralloc.c (newReg): fixed bug #908929
7735
7736 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7737
7738         * src/ds390/gen.c: added missing #include "main.h"
7739
7740 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
7741
7742         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
7743         checking if symbol is already in set,
7744         * src/pic16/device.h: prototype for checkAddSym,
7745         * src/pic16/gen.c: (_G): added entry interruptvector,
7746         * (assignResultValue): removed some commented out lines,
7747         * (genFunction): check for ISR via sym->type, absolute section for
7748         interrupt code is created via a new pBlock, the goto instruction is
7749         placed now correctly at the interrupt vector position, changed all
7750         references from ivec to _G.interruptvector,
7751         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
7752         is the interrupt is a high priority one, same for return from ISR,
7753         * src/pic16/glue.c: changed all calls of addSetHead for publics and
7754         externs to calls of checkAddSym,
7755         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
7756         pic16_pcode_verbose flag is set,
7757         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
7758         * src/pic16/pcoderegs.c: message about how many registers are saved
7759         will only be emitted if pic16_pcode_verbose flag is set,
7760
7761 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7762
7763         * src/ds390/ralloc.h,
7764         * src/ds390/ralloc.c (ds390_regWithIdx),
7765         * src/ds390/gen.c (emitcode),
7766         * src/ds390/main.h,
7767         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
7768         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7769         ds390operandCompare, getRegsRead, getRegsWritten,
7770         initializeAsmLineNode): customized instruction size calculation for
7771         ds390, started basis for some register optimizations
7772         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
7773         corresponding assembly output
7774         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
7775         missing push/pop of r0/r1. Optimized push/pops
7776
7777 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7778
7779         * src/mcs51/main.c (instructionSize): fixed ACALL size
7780         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
7781
7782 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
7783
7784         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
7785         the sorting of rlist with NULL elements
7786         * (print_idataType, print_idata): NEW to create idata sections
7787         * src/pic16/device.h: idataSymSet new variable
7788         * src/pic16/gen.c (genFunction): fixed some bugs in string
7789         comparing, improved the absolute section creation for ISRs,
7790         added FSR0L/FSR0H in registers that are saved in an ISR,
7791         * (genInline): fixed the processing of inline snippets,
7792         now they undergo no process by the peephole optimizer
7793         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
7794         are placed in idataSymSet,
7795         * (pic16emitStaticSeg): extern symbols are added in externs,
7796         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
7797         switching when aboslute variables are placed in access bank memory
7798         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
7799         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
7800         commented out with #if,
7801         * (pic16_packRegisters): reintroduce the check for CAST because some
7802         symbols are not correctly handled,
7803         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
7804         pCodeInstruction instead of pCode,
7805         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
7806         pCodeAsmDir definition,
7807         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
7808         directive, then the argument directive is emitted without the leading
7809         tab, hack for inline labels which must be in the first column,
7810         * (compareLabel,pic16_findNextInstruction),
7811         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
7812         * (insertBankSwitch): modified for the new pCodeAsmDir,
7813
7814 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7815         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
7816
7817         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
7818         instance,
7819         * (pushSide): commented out with #if,
7820         * (assignResultValue): fixed some typos in saving
7821         registers,
7822         * (genPcall): FIXED and sync'ed with genCall,
7823         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
7824         * (genNearPointerGet): fixed to handle some more cases,
7825         implementation scheme via table reads,
7826         * (genConstPointerGet): modified to access code memory correct,
7827         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
7828         and improved to handle some cases
7829         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
7830         instead of "RETLW" for init data
7831         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
7832         not IN_DIRSPACE, work around to reduce bank switching when aboslute
7833         variables are placed in access bank memory (<0x80 and >=0xf80),
7834         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
7835         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
7836         TBLWT_POSTDEC,TBLWT_PREINC
7837         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
7838         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
7839         directives
7840         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
7841         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
7842         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
7843         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
7844
7845 2004-02-29  Borut Razem <borut.razem AT siol.net>
7846
7847         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
7848         support/Util/findme.h, support/Util/system.h: enhance binary relative
7849         search for lib and include by using findProgramPath()
7850
7851 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7852
7853         * src/SDCCpeeph.h,
7854         * src/SDCCpeeph.c (pcDistance),
7855         * src/port.h,
7856         * src/mcs51/ralloc.h,
7857         * src/mcs51/ralloc.c (mcs51_regWithIdx),
7858         * src/mcs51/main.h,
7859         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
7860         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
7861         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
7862         size calculation port specific, started basis for some register
7863         optimizations
7864         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
7865         missing push/pop of r0/r1. Optimized push/pops
7866         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
7867         * device/lib/_modsint.c (_modsint),
7868         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
7869         and stack version so regression tests pass
7870
7871 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
7872
7873         * src/Makefile.in (dep): include SLIBOBJS in dependency check
7874         * src/SDCCast.c (decorateType): catch another small optimization
7875         with '?' operator
7876         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
7877         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
7878         modified to finally use computeType() all over SDCC,
7879         see Feature Request #877103
7880         * src/SDCCval.h: cosmetic
7881         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
7882         valCompare(); regression tested in muldiv.c
7883         * support/regression/tests/muldiv.c (testMod): mod sign follows
7884         dividend only
7885
7886 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
7887
7888         * src/SDCCast.c (decorateType): fixed bug #902362
7889         * doc/INSTALL.txt: fixed install instructions for win32
7890
7891 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
7892
7893         * device/include/Makefile.in (install): fixed by replacing spaces
7894         by tabs
7895         * doc/README.txt,
7896         * doc/INSTALL.txt: updated for release
7897         * doc/sdccman.lyx: added warning for --xstack being buggy
7898
7899 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
7900
7901         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
7902         to eliminate build warnings.
7903         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
7904
7905 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
7906            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
7907
7908         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
7909         removed -penable-stack, added comment for stack pragma, added
7910         warning for not initializing the stack/frame registers, removed
7911         comment at interrupts section
7912
7913         Stack is made permanent, there is no ability to disable stack usage.
7914         * src/pic16/device.h,
7915         * src/pic16/device.c: removed all references to USE_STACK macro,
7916         * src/pic16/device.c (pic16_dump_section): when no elements in
7917         rlist, free rlist before return,
7918         * (pic16_dump_int_registers): NEW, internal registers are a new set
7919         of general purpose registers reused by each function,
7920         * (checkAddReg): returns 1 if registers is added to set,
7921         * (pic16_groupRegistersInSection): when a registers is of type
7922         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
7923         * src/pic16/device.h: memRange and Assigned Memory are deleted,
7924         SRCASECMP macro is moved here from device.c
7925         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
7926         PO_PCLATU, PO_PRODL, PO_PRODH,
7927         * (pic16_pCodeOpType, genMinus,
7928         changed compares to "a" register, with AOP_ACC,
7929         * (pic16_genPlus): fixed some bugs and indented properly,
7930         * (pic16_addSign): changed size to size+offset in the MOVWF
7931         instruction,
7932         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
7933         multiply 8-bit operand by literal, result is 8-bit,
7934         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
7935         multiply 2 8-bit operand, result is 8-bit,
7936         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
7937         genUMult8X*_16,
7938         * src/pic16/gen.c: changed accUse to contain WREG only,
7939         * (pic16_emitcomment): renamed to pic16_emitpcomment,
7940         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
7941         true, do not use immediate addressing any more unless sym is a
7942         pointer in codespace,
7943         * (aopForRemat): do not use immediate addressing when symbol not in
7944         codespace and when symbol's address is requested,
7945         * (aopOp): for-loop in if(sym->accUse) is modified for the new
7946         accUse size (= 1),
7947         * (aopGet): added case for AOP_ACC and don't return "accumulator
7948         bug" but WREG instead,
7949         * (popGetTempReg): pushes contents of temporary register in stack,
7950         * (popReleaseTempReg): pops contents of temporary register from
7951         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
7952         * (pic16_popGet): separated case AOP_ACC to return register WREG
7953         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
7954         or PO_IMMEDIATE and initializes their instance/offset appropriately,
7955         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
7956         the use of immediate pointers to certain cases only.
7957
7958         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
7959         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
7960         * (assignResultValue, genCall, genRet): modified to use the new
7961         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
7962         genPcall is still broken,
7963         * (genFunction): added code to create 'A' type pBlocks when
7964         interrupt functions are generated, code not extensively tested yet,
7965         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
7966         * (genEndFunction): modified so ISRs pop stored registers from stack,
7967         * (genMultOneByte): cleanup,
7968         * (AccRsh): added flag andmask, to and result with appropriate mask,
7969         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
7970         * (genDataPointerGet): fixed and reenabled its use,
7971         * (genNearDataPointerGet): bugs fixed,
7972         * (genDataPointerSet): bugs fixed,
7973         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
7974         pic16_DumpSymbol, pic16_DumpOp,
7975         * src/pic16/genutils.h: function prototypes for the above functions,
7976         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
7977         pointers,
7978         * (pic16emitRegularMap): many many many improvements, but needs a
7979         major cleanup,
7980         * src/pic16/main.c: enable_stack in pic16_options is removed,
7981         * (_pic16_parseOptions): removed command line options -penable-stack,
7982         * (_process_pragma): emit stack symbol only when stack pragma is
7983         processed,
7984         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
7985         redirected to FSR0L/FSR0H pair,
7986         * (pic16_get_op, pic16_get_op2): modifications and improvements,
7987         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
7988         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
7989         for immediates,
7990         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
7991         * (dumpPicOptype): NEW,
7992         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
7993         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
7994         with movff instruction,
7995         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
7996         added pic16_int_regs, some packRegsFor* functions are commented out,
7997         because produce errors,
7998         * src/pic16/NOTES: minor modifications
7999
8000 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8001
8002         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
8003         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
8004         --pack-iram.
8005         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
8006         * as/mcs51/lkaomf51.c: fixed bug #895763
8007
8008 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
8009
8010         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
8011
8012 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8013
8014         * doc/sdccman.lyx: added details about the HC08 storage classes and
8015         interrupts, fixed the register usage info for z80 & gbz80
8016
8017 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
8018
8019         * doc/sdccman.lyx: added more pic16 port documentation
8020         * device/include/pic16/: added header pic18fregs.h
8021
8022 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
8023
8024         * doc/sdccman.lyx: added Vangelis' contribution
8025
8026 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8027
8028         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
8029         extend to the next CALL or PCALL, not just to the next CALL.
8030
8031 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
8032
8033         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
8034
8035 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8036
8037         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
8038         bug #895752 and a better fix for bug #716790
8039
8040 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8041
8042         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
8043
8044 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8045
8046         * doc/sdccman.lyx: minor changes, minor changed
8047
8048 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
8049
8050         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
8051         which can't handle SDCC_NEWONEBYTEOPS,
8052         (geniCodeMultiply): removed conversion from mult to shift for pic14
8053         and pic16
8054
8055 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8056
8057         * src/hc08/gen.h,
8058         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
8059         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
8060         thus fixing bug #895406
8061
8062 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
8063
8064         * device/lib/_modsint.c,
8065         * device/lib/_modslong.c: sign follows divisor only
8066         * src/hc08/gen.c (genMultOneByte): if result size is 1,
8067         signs or signedness can be ignored
8068         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
8069         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
8070         added optimization for IFX,
8071         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
8072         arguments;
8073         reenabled optimization for IFX, which was removed on 2004-01-11
8074         * src/SDCCast.h: added return type IFX
8075         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
8076         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
8077         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
8078         SDCC_OLDONEBYTEOPS selects the old behaviour
8079         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
8080         changed again and commented promotion rule
8081         * src/SDCCval.c (valDiv): promotion no longer necessary
8082         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
8083         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
8084         rewritten
8085         * support/regression/tests/onebyte.c: added
8086
8087 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
8088
8089         * gen.c (genInline): reverted to old code for assemnling inline
8090         code because of bug reported James Chadd
8091
8092 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
8093
8094         * ralloc.h: missing declarations from previous patch,
8095         seems that patch for ralloc.h was never applied, fixed
8096
8097 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
8098            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
8099
8100         * pcode.c,
8101         * pcode.h,
8102         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
8103         indirect addressing. Marked FSR0 as deprecated
8104         * gen.c (pointerCode): commented out, not needed now
8105         (pic16_popGet2p): new MOVFF helper function
8106         (genGenPointerGet),
8107         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
8108         (shiftRLong): removed duplicate debugging info
8109
8110 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8111
8112         * src/ds390/gen.c (genNearPointerGet),
8113         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
8114         optimization with bits, but not bitfields.
8115         * src/ds390/ralloc.c (packRegisters),
8116         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
8117
8118 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
8119
8120         * src/SDCCcse.c (algebraicOpts): copy operands before modification
8121
8122 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8123
8124         * src/SDCCsymt.h,
8125         * src/SDCCicode.c (operandFromSymbol),
8126         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
8127         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
8128         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
8129         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
8130         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
8131         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
8132         bug #892038
8133         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
8134         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
8135         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
8136         * src/SDCCsymt.c (newSymbol),
8137         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
8138         enumerator_list),
8139         * src/SDCCval.h,
8140         * src/SDCCval.c (newiList): fixed bug #885705
8141
8142 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8143
8144         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
8145         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
8146
8147 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8148
8149         * device/include/c8051f120.h,
8150         * device/include/c8051f300.h,
8151         * device/include/c8051f310.h: added/updated header files for Silicon
8152         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
8153         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
8154         in new section Submitting patches
8155
8156 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8157
8158         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
8159         genFarPointerGet, genCodePointerGet, genGenPointerGet,
8160         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
8161         genGenPointerSet),
8162         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
8163         genFarPointerGet, genCodePointerGet, genGenPointerGet,
8164         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
8165         genGenPointerSet),
8166         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
8167         genFarPointerGet, genCodePointerGet, genGenPointerGet,
8168         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
8169         genGenPointerSet),
8170         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
8171         genFarPointerGet, genCodePointerGet, genGenPointerGet,
8172         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
8173         genGenPointerSet): fixed bug #892400
8174         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
8175         to eliminate build warnings.
8176         * src/SDCCast.c (processParms),
8177         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
8178         fixed bug 751859
8179         * support/valdiag/valdiag.py: added GCC to the list of defines active
8180         when compiling with gcc
8181
8182 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8183
8184         * support/Util/SDCCerr.h,
8185         * support/Util/SDCCerr.c,
8186         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
8187         with an incomplete type (fixed bug #883734)
8188         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
8189
8190 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8191
8192         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
8193
8194 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8195
8196         * src/SDCCast.c (decorateType),
8197         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
8198         function pointer implementation
8199         * support/regression/tests/funptrs.c: added tests to verify both forms
8200         of function pointers work correctly. Added tests to verify parameters
8201         are passed in the correct order.
8202
8203 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
8204
8205         * device.c (regCompare): registers are sorted by ascending
8206         address and increasing size,
8207         * main.c (_pic16_finaliseOptions): removed the declaration
8208         of compiler macro MCU. Now a macro of the format pic18fxxxx
8209         will be defined from the command line
8210
8211 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
8212             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
8213
8214         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
8215         PCOP_RLCF was overwritten!
8216         * gen.c (genSkip): commented out calls to pic16_emitcode,
8217         * (genCmpEQ): fixed "long" compares, only high word did get compared,
8218         * (genlshTwo),
8219         * (genRRC): added debugging info,
8220         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
8221         overwritten while shifting,
8222         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
8223         overwritten while shifting,
8224         * (AccLsh),
8225         * (AccRsh),
8226         * (shiftLLeftOrResult),
8227         * (shiftRLeftOrResult),
8228         * (shiftRLong),
8229         * (shiftLLong): Implemented with pic16_emitpcode
8230         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
8231         * (genLeftShift): Fixed bug, operand for shift by variable always
8232         was "and"ed with 0x0f,
8233         * (genLeftShiftLiteral),
8234         * (genrshTwo),
8235         * (genRightShiftLiteral): added debugging info,
8236         * (genrshFour): added comment,
8237         * (genRightShift): determined signedness from operand "left"
8238         instead of "result"
8239
8240 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8241
8242         * src/SDCCicode.c (geniCodeParms),
8243         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
8244         function pointers, fixed function pointer bugs #861242 and #861896
8245
8246 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8247
8248         * device/include/c8051f000.h,
8249         * device/include/c8051f120.h,
8250         * device/include/c8051f300.h: added header files for Silicon
8251         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
8252
8253 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
8254
8255         * src/SDCCast.c (processParams): added new type flow and restructured
8256         (gatherAutoInit): added new type flow
8257         (addCast): cosmetic changes
8258         (getLeftResultType): added new type flow for array indices, patch
8259         provided by Stas, see FR #877103
8260         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
8261         array index patch by Stas
8262         * src/SDCCast.h: added prototype getResultTypeFromType()
8263         * src/SDCCval.h,
8264         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
8265         * src/pic/glue.c (pic14emitStaticSeg),
8266         * src/pic16/glue.c (pic16emitStaticSeg),
8267         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
8268         for initialization of symbols
8269         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
8270         * support/Util/SDCCerr.h:
8271         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
8272         * .version: bumped version number to 2.3.8
8273         * device/include/Makefile.in (install),
8274         * doc/Makefile (install): changed to 'rm `find ...`' construct to
8275         avoid warnings
8276
8277 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
8278
8279         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
8280         Slade Rich fixed an optimization bug
8281         * src/pic/pcodepeep.c,
8282         * src/pic/pcoderegs.c
8283         * doc/Makefile (install): added test for directory
8284
8285 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8286
8287         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
8288         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
8289         * src/pic/ralloc.c (getRegPtr, getRegGpr),
8290         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
8291         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
8292         * as/mcs51/asexpr.c (term),
8293         * as/hc08/asexpr.c (term): fixed bug #887146
8294
8295 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8296
8297         * src/z80/gen.c (genMult): handle single byte result product
8298         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
8299         DUMMY_READ_VOLATILE (fixed bug #886367)
8300
8301 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
8302
8303         * support/regression/tests/libmullong.c: fixed logic, on little endian
8304         hosts we ended without a mullong_wrapper()
8305
8306 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8307
8308         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
8309         virus/worm forged address usage.
8310
8311 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
8312
8313         Fixed promotion, it should be done on AST level:
8314         * src/SDCCast.c (addCast): added promotion to int
8315         (decorateType): updated call to upCast()
8316         * src/SDCCicode.c (geniCodeLeftShift): removed call to
8317         usualUnaryConversions()
8318
8319 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
8320
8321         * support/regression/tests/literalop.c (mulWrapper): Added a
8322         wrapper to remove integer overflow warnings.
8323
8324         * support/regression/tests/float_trans.c: Made work on host.
8325
8326         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
8327         location of sz80.
8328
8329         * support/regression/generate-cases.py (main): Changed from inline
8330         to a main method.
8331
8332         * doc/Makefile (install): Changed to depth first to get rid of
8333         missing directory install warning.
8334
8335         * as/Makefile (install-doc): Made work on Mac.
8336
8337 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
8338
8339         * src/SDCCast.c: added an additional type flow in decorateType() of
8340         opposite direction, see feature request #860006; it's enabled at runtime
8341         by setting the environment variable SDCC_NEWTYPEFLOW
8342         * src/SDCCast.h: changed prototype of decorateType()
8343         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
8344         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
8345         'char' to 'int' can be omitted, if both operands are 'unsigned char';
8346         see feature request #877103
8347         * src/SDCCval.c: updated call of decorateType()
8348         (valBitwise): fixed bug #882876
8349         (valMinus): added promotion
8350         (valLogicAndOr): result is unsigned
8351         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
8352         * src/SDCCsymt.c (computeType),
8353         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
8354         must not cause an unsigned operation
8355         * src/pic/glue (pic14emitRegularMap),
8356         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
8357
8358 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
8359
8360         * src/pic/pcode.c (PCodeID): commented out left over debug code
8361
8362 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
8363
8364         * support/valdiag/tests/overflow.c: added shift tests
8365         * src/pic/device.c,
8366         * src/pic/gen.c,
8367         * src/pic/gen.h,
8368         * src/pic/glue.c,
8369         * src/pic/main.c,
8370         * src/pic/pcode.c,
8371         * src/pic/pcode.h,
8372         * src/pic/pcodepeep.c,
8373         * src/pic/pcoderegs.c,
8374         * src/pic/ralloc.c,
8375         * src/pic/ralloc.h: applied patch from Slade Rich;
8376         added support for multiple code pages and multiple RAM banks on the
8377         PIC 14 port. The ASM files now no longer simply assume all the
8378         code / RAM are in the same page / bank. This means the linker can
8379         safely allocate code/RAM of separate ASM files to different pages/banks.
8380         * doc/sdccman.lyx: added Slade's tips
8381         * src/mcs51/peeph.def: fixed bug #880768
8382
8383 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8384
8385         * src/hc08/ralloc.c (rematStr): fixed bug #879282
8386         * src/SDCCast.c (decorateType): fixed bug #880197
8387
8388 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
8389
8390         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
8391         getopt.h.
8392
8393         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
8394         strtof is not part of C89 and isn't included with Mac OS X.
8395
8396 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8397
8398         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
8399         shiftL2Left2Result): fixed bug #879326
8400         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
8401         (genMultOneByte): fixed bug in signed vs unsigned multiplication
8402         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
8403         address fetch for clr instruction
8404         * device/lib/hc08/_mulint.c: created optimized assembly version
8405         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
8406
8407 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
8408
8409         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
8410         proposed in FR #877103
8411
8412 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
8413
8414         * src/SDCCval.c (cheapestVal): added missing checks
8415         * src/SDCCicode.c (usualBinaryConversions): fixed condition
8416         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
8417
8418 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
8419
8420         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
8421         equal operands
8422
8423 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
8424
8425         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
8426         loaded with the linker search paths (-L arguments) and the libraries
8427         to be linked with the current source (-l arguments). Changes
8428         currently will affect only the pic16 port.
8429         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
8430         include path the port specific paths and port specific libraries,
8431         * gplink command now contains the $3 argument,
8432         * src/pic16/device.h,
8433         * src/pic16/device.c,: structure PIC_device is made public and
8434         renamed to PIC16_device, the same for variable Pics which is renamed
8435         to Pics16. Updated all references to them.
8436         * src/pic16/glue.c (pic16glue): corrected bug with code
8437         initialization which bypassed the variable initializations block.
8438
8439         * device/lib/pic16/Makefile.rules: removed --penable-stack from
8440         COMPILE_FLAGS and added the --nostdinc option
8441
8442 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8443
8444         * device/include/mc68hc908jb8.h: Register defs for another member
8445         of the hc08 family. Contributed by Bjorn Bringert - thanks!
8446
8447 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
8448
8449         Documenting changes from previous commits.
8450         * configure.in (version 1.56),
8451         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
8452         when generating output files to configure the pic16 library,
8453         but now I've commented it out, since gputils aren't installed in the
8454         SF compile farm, so library won't compile
8455
8456         * device/lib/Makefile.in (version 1.56): initially I've added in
8457         target 'all' the prerequestive 'model-pic16' so it compiled the
8458         pic16 library, but now I've commented it out for the same reasons
8459         above,
8460         * added targets 'model-pic16' and 'objects-pic16' to compile the
8461         library
8462         * added target 'port-specific-objects-pic16' to handle the
8463         generated libraries and copy them into the build/ directory
8464         * added target 'clean-intermediate-pic16' to clean intermediate
8465         files into pic16 directory
8466         * in target 'installdirs' added line to create directory pic16 in
8467         the installation path
8468
8469         * device/include/Makefile.in (version 1.11): in target 'install'
8470         added lines to copy all header files to installation path,
8471         * in target 'installdirs' added line create directory for pic16
8472         headers in the installation path
8473
8474 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
8475
8476         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
8477          a function call
8478
8479 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
8480
8481         * configure,
8482         * device/lib/configure.in,
8483         * device/lib/configure: fixed for autoconf 2.57
8484
8485 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8486
8487         * src/z80/main.c (_parseOptions): fixed the portmode= command line
8488         option so that it actually works. Made it specific to the z80, since
8489         the gbz80 doesn't have these kinds of I/O ports.
8490
8491 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8492
8493         * device/include/z180.h,
8494         * device/lib/_memcpy.c,
8495         * device/lib/_memmove.c,
8496         * device/lib/_mulint.c,
8497         * device/lib/ser_ir.c,
8498         * device/lib/ser_ir_cts_rts.c,
8499         * device/lib/_strcmp.c,
8500         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
8501         * src/z80/main.c (_process_pragma): add support for pragmas bank and
8502         portmode; added deprecation warning for bank= and protmode= forms.
8503         Also, guard against buffer overflow.
8504         * src/z80/gen.c (aopGet): generate better code for sfr banked read
8505
8506 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8507
8508         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
8509         changed interrupt vector table generation to only emit declared vectors.
8510         * device/include/Makefile.in: added missing backslash
8511         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
8512
8513 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8514
8515         Mainly changes to support compilation of the device libraries
8516         * src/pic16/device.c: stack is allocated via symbol and not
8517         via literal number. The symbol is placed in the corresponding
8518         position of the data ram
8519         * (pic16_dump_section): relocatable and absolute uninitialized
8520         data are now emitted in sorted order to reduce section naming,
8521         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
8522         weren't marked as being in the access bank,
8523
8524 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
8525
8526         Added portion of GNU PIC Library under the directory
8527         device/include/pic16 and device/lib/pic16. These files
8528         contain the declarations of SFRs for the PIC18Fxx2 devices.
8529         The directory is initialized via configure from toplevel.
8530
8531 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
8532
8533         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
8534         the spilllocations to be compared correctly
8535
8536 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8537
8538         * src/SDCCast.c (decorateType): fixed bug introduced today
8539
8540 2004-01-12  Borut Razem <borut.razem AT siol.net>
8541
8542         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
8543         doc/sdccman.lyx: upper case pragmas are deprecated
8544
8545 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
8546
8547         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
8548         in simpler and even better code
8549
8550 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
8551
8552         * src/SDCCicode.c (operandOperation): fixed bug #874819
8553         * src/SDCCast.c (decorateType): fixed
8554         char foo (unsigned long ul) { return ul > 0; }
8555
8556 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8557
8558         * doc/sdccman.lyx: Moved and added some sections, small changes
8559         all over. Telling LaTeX to be less strict with word spacing
8560         to better keep the right margin. Changed some notes about
8561         maintainance of the ports in section 3.2.1 - is it OK like this?
8562
8563 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
8564
8565         SDCC source changes:
8566         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
8567         convilong): modified to inform the pic16 port that builtin functions
8568         are external
8569
8570         PIC16 PORT specific changes:
8571         * src/pic16/device.c pic16_dump_equates() added,
8572         processor registers declared internally by the port are emitted in
8573         the translation as equates,
8574         * src/pic16/gen.c: inline code is passed unprocessed to the
8575         translation,
8576         * (pic16_popGetLit2): fnuction modified to take second operand as
8577         pCodeOp pointer and not as literal,
8578         * (popRegFromIdx): prefixed with pic16_,
8579         * (pic16_popCombine2): modified to receive already allocated pCode
8580         operands,
8581         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
8582         * (genFunction): initializes local stack frame and pushes on stack
8583         all the registers used by this function,
8584         * (genEndFunction): restores all registers from stack and restores
8585         stack frame,
8586         * src/pic16/glue.c (pic16emitRegularMap): various changes and
8587         improvements,
8588         * (pic16glue): changed the program startup sequence,
8589         * added new dbName code 'A' for functions placed in absolute section
8590         * src/pic16/main.c: added function attribute _naked,
8591         * added pragma 'code' to place a fnuction at an absolute address,
8592         * added command line arguments --debug-ralloc and --pcode-verbose,
8593         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
8594         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
8595         * (pic16_newpCodeOpLit2): modified to take the second operand as
8596         pCodeOp pointer,
8597         * (pic16_printpBlock): modified to emit each function in a separate
8598         section,
8599         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
8600         UPPER for immediate operands,
8601         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
8602         instruction,
8603         * src/pic16/peeph.def: all peepholes with movff are commented out,
8604         because there is a problem in the pcode peep optimizer,
8605         * src/pic16/ralloc.c: the register allocator can now reuse local
8606         function symbols for another function. This saves register usage.
8607         * src/pic16/ralloc.h: added flag isLocal in structure regs,
8608
8609         Added file src/pic16/NOTES with information about program writing on
8610         the current port version.
8611
8612 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8613
8614         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
8615         and peephole 252 (array access)
8616
8617 2004-01-09  Borut Razem <borut.razem AT siol.net>
8618
8619         * src/SDCCmain.c : fixed #872250: -l command line defined library
8620           files are scanned before standard library files
8621
8622 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8623
8624         * src/SDCCast.c (decorateType): fixed bug #874046
8625
8626 2004-01-09  Borut Razem <borut.razem AT siol.net>
8627
8628         * support/scripts/sdcc.nsi: remove previous installation
8629
8630 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8631
8632         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
8633         bytes for last interrupt vector (mcs51)
8634         * sdcc.spec: fixed typo
8635
8636 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8637
8638         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
8639         gen51Code): more efficient parameter receive for --model-large
8640         ("bug" #845294)
8641
8642 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8643
8644         * src/ds390/main.c,
8645         * src/z80/main.c: added missed needLinkerScript flags (more than
8646         one port structure defined in these file)
8647         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
8648         bug #795325
8649
8650 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
8651
8652         * src/SDCCmain.c: removed various references to DEFAULT_PORT
8653         * src/port.h: added flag needLinkerScript in port->linker
8654         structure to inform whether to create a .lnk file or not,
8655         * src/avr/main.c,
8656         * src/ds390/main.c,
8657         * src/hc08/main.c,
8658         * src/mcs51/main.c,
8659         * src/pic/main.c,
8660         * src/pic16/main.c,
8661         * src/xa51/main.c,
8662         * src/z80/main.c: changed appropriately to configure
8663         needLinkerScript flag
8664         * src/pic/gen.c,
8665         * src/pic16/gen.c (genAddrOf): fixed bug #863624
8666         * src/pic/glue.c: added variable udata_section_name to
8667         override default uninitialized data segment definition for
8668         devices only with SHAREBANK memory (reported from Erik Epetrich)
8669         * (pic14emitOverlay): modified to emit a commented overlay segment
8670         directive when no overlay data exist
8671         * (picglue): modified to emit uninitialized data segment
8672         according to udata_section_name
8673         * src/pic/main.c (_pic14_parseOptions): added command line
8674         options --udata-section-name=[name] to override default
8675         udata definition name
8676         * modified _linkCmd and _asmCmd to include compiler passed
8677         arguments via -W option
8678         * src/pic16/main.c: added $l in _asmCmd, changed extension for
8679         object file from '.rel' to '.o' in port->linker structure,
8680         changed size of fptr from 2 to 3 in port structure
8681
8682 2004-01-07  Borut Razem <borut.razem AT siol.net>
8683
8684         * support/scripts/sdcc.nsi: update PATH
8685         * support/scripts/sdcc.ico: craeted
8686
8687 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
8688
8689         * device/include/Makefile.in: fix install
8690         * doc/Makefile: fix install
8691
8692 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8693
8694         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
8695         in bug #860505
8696         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
8697         how the function variable allocation summary is displayed; also
8698         include information about variables allocated to the overlay
8699         segment
8700
8701 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8702
8703         * as/mcs51/lkmain.c: Help about -Y option
8704         * as/mcs51/lkarea.c: Fixed gcc warnings
8705
8706 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8707
8708         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
8709         fixed warning
8710         * support/valdiag/tests/overflow.c: added
8711         * src/SDCCast.c (decorateType),
8712         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
8713         LEFT_OP (left shift)
8714
8715 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8716
8717         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
8718         (default behaviour).
8719
8720 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8721
8722         A python script to validate compiler diagnostic messages. It can be
8723         used to verify that sdcc complains about bad c source code and
8724         gives a good location of the error.
8725         * support/valdiag/Makefile,
8726         * support/valdiag/valdiag.py,
8727         * support/valdiag/tests/*
8728
8729 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8730
8731         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
8732         * src/SDCCsymt.c (newEnumType),
8733         * src/SDCCsymt.h
8734         * support/Util/SDCCerr.c,
8735         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
8736         enum related bugs.
8737         * support/regression/tests/enum.c: added test for enum values that
8738         require at least 2 bytes of storage.
8739
8740 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8741
8742         * src/common.h: added ifndef/define/endif macros
8743         around the header file.
8744         Bug reported from Jesus Calvino-Fraga
8745
8746 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
8747
8748         * sdcc.spec: updated
8749         * device/include/Makefile.in: don't install CVS directories
8750         * device/lib/Makefile.in: added removal of CVS directories after install
8751         * doc/Makefile: fixed install, added local_icons
8752         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
8753         * src/mcs51/gen.c (genRightShift): fixed bug #870788
8754         * src/ds390/gen.c (genRightShift): fixed bug #870788
8755         * src/SDCCast.c (decorateType): fixed bug #870781
8756
8757 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
8758
8759         PIC16 port related changes:
8760         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
8761         added variable stackPos,
8762
8763         * gen.c: genCall, assignResultValue: added support for
8764         pushing/retrieving function parameters to/from stack,
8765         genFunction,genEndFunction: setup stack frame for the
8766         generated function,
8767         genAddrOf: will be changed according to bug 863624
8768
8769         * added files genutils.c and genutils.h which contain gen*
8770         debugged and optimised functions extracted from gen.c
8771
8772         * glue.c: added variable 'externs' which holds extern symbols,
8773         pic16emitRegularMap: is modified to properly handle relocatable
8774          symbols under the new scheme,
8775         pic16createInterruptVect: is modified
8776         pic16printPublics: is modified to emit 'global' assembler directives,
8777         added pic16_printExterns to print extern symbols,
8778         pic16glue: initializes stack/frame pointer in the beginning of
8779         the assembly output. Temporary hack, will be corrected later,
8780         because gplink yet does not support stack and SDCC does not
8781         yet support a type of crt0.o object to create the final binary.
8782
8783         * Removed many lines that contain 8051 legacy code.
8784         * The code is finally placed under a 'code' directive.
8785         * Added port specific options.
8786
8787         * _process_pragma: simplified since now we do not need *special*
8788         include file to define SFR registers. But a separate header
8789         will be needed. This will be developed later.
8790         * _pic16_parseOptions: added, parses port specific options:
8791         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
8792         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
8793         --preplace-udata-with=
8794
8795         * _pic16_setDefaultOptions: modified to initialize section names,
8796         but hack is temporarly out of order since it needs improvement.
8797         * _pic16_genAssemblerPreamble: configuration words are emitted by
8798         their address instead of their name. This part is incomplete and
8799         supports only the 18Fxx2 devices. Other devices will emit an error
8800         during assembly since they do not contain the same set of config
8801         registers
8802         * _pic16_genIVT: is modified,
8803
8804         * pcode.c: added definitions for some hardware registers that are needed
8805         for stack support
8806         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
8807         All PCI entries are updated. Now LFSR is supported.
8808         * Removed pic16_pciTRIS is mentioned by mdubuc in source
8809         * added pic16_newpCodeOpLit2 to support instructions with
8810         two literal arguments
8811         * pic16_pCode2str: corrected code that emits assembler instructions
8812         with two literal operands and those that have an access bit modifier
8813         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
8814         this fixes a bug which caused some labels to be lost, when an
8815         assembler directive was added, i.e. banksel,
8816         * pic16_FixRegisterBanking: improved logic that causes the insertion
8817         of bank switching,
8818         * InlineFunction: functions that are called once, are not any more
8819         inlined. This can be a port option in the future,
8820
8821         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
8822
8823         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
8824         hold the corresponding uninitialized symbols,
8825         * pic16_allocProcessorRegister: registers have explicit marked the
8826         accessBank field,
8827         * pic16_allocInternalRegister: registers are explicit marked as
8828         not used,
8829         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
8830         processing list, so bit registers were lost,
8831         *
8832
8833         * ralloc.h: added field 'accessBank' and original symbol operand
8834         in register definition,
8835         * removed the field isMapped from register definition,
8836
8837         ** Several functions have been removed from various sources:
8838         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
8839         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
8840         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
8841         pic16_assignRelocatableRegisters
8842
8843         ** others have been introduced:
8844         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
8845         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
8846
8847 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
8848
8849         * support/scripts/inc2h.pl: changed definition of BIT_AT
8850         to emit 'sbit at' instead of 'bit at'. This was a request.
8851
8852         PIC16 port related preliminary changes:
8853         * gen.c: prefixed function popRegFromString with
8854         pic16_ and all references to it corrected
8855         * pcode.c: all pic16_pc_* hardware registers prefixed
8856         with underscore (_),
8857         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
8858         * ralloc.c: newReg(): when register is REG_SFR then
8859         set address to rIdx,
8860         pic16_allocProcessorRegister(): marks register wasUsed=0
8861         pic16_writeUsedRegs(): added a call to assign processor
8862         registers via pic16_assignFixedRegisters
8863
8864 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8865
8866         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
8867         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
8868         variables in unused register banks.  Also the SSEG is placed
8869         wherever there is enough space for it, and IDATA can be anywhere
8870         in internal RAM.  For now compile using -Wl-Y[stack_size].
8871         The mem file is different for this option as well, since it
8872         makes no sense of talking about DSEG lenght.
8873
8874 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
8875
8876         * src/SDCClrange.c: fixed bug 869095 that caused segfault
8877         in certain cases, e.g. when ROM assignment, patch provided
8878         from Albert den Haan.
8879
8880 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
8881
8882         Many signedness and type propagation fixes:
8883         * src/SDCCicode.c: made geniCodeCast() static
8884         replaced SPEC_ by IS_ (cosmetic)
8885         (operandOperation): fixed div and mod operation
8886         (usualBinaryConversions): added support for promotion of char
8887         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
8888         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
8889         (geniCodeAdd): an array index will stay unsigned, even if promoted
8890         from char to int
8891         (geniCodeArray): ditto
8892         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
8893         * src/SDCCsymt.c (computeType): added more support for char;
8894         promotion of char is selectable by promoteCharToInt, fixed signedness
8895         for all cases
8896         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8897         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
8898         * src/SDCCval (val*): replaced signedness calculation by
8899         computeType()
8900         rearranged if-branches (cosmetic)
8901         (valShift): added warning W_SHIFT_CHANGED
8902         (valCompare): fixed problem with different types
8903         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
8904         * support/regression/tests/literalop.c: added many cases
8905         * support/regression/tests/ast_constant_folding.c: changed finally to
8906         'unsigned int'
8907         * .version: new year, new version: 2.3.7
8908         * src/SDCCmain.c (main): applied patch #866468
8909         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
8910         provided by Scott Bronson
8911         * doc/sdccman.lyx: updated documentation for sdcdb
8912         updated and added chapter tips
8913
8914 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8915
8916         * src/SDCCsymt.h: missing from yesterday's commits
8917
8918 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8919
8920         * src/SDCC.y (struct_or_union_specifier),
8921         * support/Util/SDCCerr.c,
8922         * support/Util/SDCCerr.h: verify that struct & union tags are used
8923         as declared.
8924
8925 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8926
8927         * src/SDCCglobl.h: missing from yesterday's commits
8928
8929 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8930
8931         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
8932         sft_attributes, struct_declaration, parameter_declaration,
8933         type_name, start_block, declaration_list),
8934         * src/SDCC.lex (check_type): support redefinition of typedef names
8935
8936 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8937
8938         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
8939         aligned xdata arrays. Erik helped me with the if clause.
8940
8941 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8942
8943         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
8944         warning
8945
8946 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8947
8948         * src/SDCCast.h,
8949         * src/SDCCast.c (newAst_),
8950         * src/SDCCicode.h,
8951         * src/SDCCicode.c (ast2iCode, newiCode),
8952         * src/SDCCglobl.h,
8953         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
8954         expr, statement, expression_statement, selection_statement,
8955         iteration_statement, expr_opt, jump_statement): foundation for tracking
8956         sequence points
8957         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
8958         point code too)
8959
8960 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8961
8962         * support/Util/SDCCerr.c,
8963         * src/SDCCast.h,
8964         * src/SDCCast.c (createCase, createDefault, decorateType),
8965         * src/SDCClabel.c (labelUnreach),
8966         * src/SDCC.y (labeled_statement, jump_statement): More improvements
8967         to error messages.
8968         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
8969         (with thanks to Stas Sergeev)
8970         * device/include/time.h,
8971         * device/lib/time.c (CheckTime): suppress unreachable code warning
8972
8973 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8974
8975         * src/SDCCast.c (createIvalCharPtr),
8976         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
8977         bug #753752)
8978         * support/regression/tests/nullstring.c: tests for these two bugs
8979
8980 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8981
8982         * support/Util/SDCCerr.h,
8983         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
8984         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
8985         about storage class and 'at' used inside struct or union
8986         * src/SDCCBBlock.c (iCodeFromeBBlock),
8987         * src/SDCCcse.c (ifxOptimize),
8988         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
8989         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
8990         printIval, emitStaticSeg, emitOverlay),
8991         * src/SDCClabel.c (deleteIfx),
8992         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
8993         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
8994         gatherAutoInit, processParms),
8995         * support/Util/SDCCerr.h,
8996         * support/Util/SDCCerr.c (werrorfl): Support for better error location
8997         reporting for post-parse errors.
8998
8999 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9000
9001         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
9002         implicit casts via union; they don't work on big endian systems
9003         (possible fix for bug #861138)
9004
9005 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9006
9007         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
9008         * src/mcs51/main.c: fixed the fix for bug #737001
9009
9010 2003-12-15  Borut Razem <borut.razem AT siol.net>
9011
9012         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
9013
9014 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9015
9016         * support/makebin/makebin.c: put output in binary mode
9017
9018 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9019
9020         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
9021         xdata and data memory on startup. Set the environment variable
9022         SDCC_NOGENRAMCLEAR to disable this.
9023         * src/mcs51/peephole.def,
9024         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
9025         (allows non-interrupt and interrupt code to safely compete for a resource
9026         without the non-interrupt code having to disable interrupts)
9027
9028 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9029
9030         * src/SDCCicode.c (geniCodeAdd),
9031         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
9032         with valFromType if type might be a pointer and host is big endian).
9033         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
9034         types, not just integer types.
9035         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
9036         multiply defined with mismatching "at" address.
9037
9038 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9039
9040         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
9041         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
9042         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
9043         with embedded nulls (fixed bug #753752)
9044
9045 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9046
9047         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
9048         Apparently this did not see much testing (endless loop)
9049
9050 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9051
9052         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
9053
9054 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9055
9056         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
9057         gracefully handle NULL memmap pointers
9058
9059 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9060
9061         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
9062         instead of deleting the iCode when an operand is volatile
9063         * src/z80/gen.c (genDummyRead),
9064         * src/mcs51/gen.c (genDummyRead),
9065         * src/ds390/gen.c (genDummyRead),
9066         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
9067         not just IC_RIGHT
9068         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
9069         * src/SDCC.y: fixed bug #850420
9070
9071 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9072
9073         Applied z80 i/o port patch from Peter Townson and fixed some operators
9074         to better handle operands in A register.
9075         * device/include/z180.h
9076         * src/SDCC.y
9077         * src/SDCCglue.c
9078         * src/z80/gen.c
9079         * src/z80/gen.h
9080         * src/z80/main.c
9081         * src/z80/peeph-z80.def
9082         * src/z80/peeph.def
9083         * src/z80/z80.h
9084
9085 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9086
9087         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
9088
9089 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9090
9091         * device/lib/hc08/_mullong.c: Removed extra #endif
9092
9093 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9094
9095         * sim/ucsim/hc08.src/inst.cc,
9096         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
9097         carries from x to h
9098         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
9099         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
9100         * device/include/stdarg.h: fixed varargs for hc08
9101         * device/lib/Makefile.in,
9102         * device/lib/hc08/Makefile,
9103         * device/lib/hc08/_mulint.c,
9104         * device/lib/hc08/_mullong.c: fixed some endian problems
9105
9106 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9107
9108         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
9109         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
9110         * device/lib/_gptrget.c,
9111         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
9112
9113 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9114
9115         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
9116         * src/SDCCast.c (astErrors): fixed bug #846007
9117         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
9118
9119 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9120
9121         * src/SDCCast.c (decorateType): disabled a transformation I added in
9122         revision 1.188 (access to fields of a structure at an absolute address);
9123         it breaks with bitfields, extern declarations, and gcse analysis.
9124         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
9125         could be assigned through a pointer, so don't complain.
9126         * src/SDCCast.c (astErrors),
9127         * src/SDCCast.h,
9128         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
9129
9130 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
9131
9132         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
9133         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
9134         output of __config directives, since gpasm now supports them
9135         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
9136         pre-processor macro, i.e. -DMCU=p18f452
9137         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
9138         and modified to handle 'cast' icode similarly to '=' icode
9139         * src/pic16/device.h (typedef struct PIC_device): added field
9140         'extMIface' to indicate that chip has external memory interface
9141         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
9142         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
9143         18F8720
9144
9145 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9146
9147         * src/SDCC.y (pointer): fixed bug #846006
9148         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
9149         * src/SDCCast.c (decorateType): fixed bug #846009
9150         * src/ds390/peeph.def,
9151         * src/ds390/gen.c (genAnd, genOr),
9152         * src/mcs51/peeph.def,
9153         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
9154
9155 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9156
9157         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
9158         * src/SDCCdflow.c
9159         * src/SDCCcse.c
9160         * src/SDCCcse.h
9161         * src/SDCCBBlock.h
9162         * src/SDCCBBlock.c
9163
9164 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
9165
9166         fixed bug #845089
9167         * src/SDCCbitv.h,
9168         * src/SDCCbitv.c: added function to free a bitvector
9169         * src/SDCClrange.h,
9170         * src/SDCClrange.c: added function to recompute the liveranges
9171         * src/avr/ralloc.c,
9172         * src/ds390/ralloc.c,
9173         * src/hc08/ralloc.c,
9174         * src/mcs51/ralloc.c,
9175         * src/pic/ralloc.c,
9176         * src/pic16/ralloc.c,
9177         * src/xa51/ralloc.c,
9178         * src/z80/ralloc.c: recompute the liveranges after register packing
9179
9180 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
9181
9182         * src/SDCCloop.c (newInduction): fixed bug #845630
9183
9184 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9185
9186         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
9187         inadvertantly left behind from my 2003-11-12 change
9188
9189 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9190
9191         Updated headers I neglected to commit yesterday.
9192         * src/SDCClrange.h,
9193         * src/SDCCicode.h
9194
9195 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9196
9197         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
9198         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
9199         * src/SDCCopt.c (eBBlockFromiCode),
9200         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
9201         the creation of the key hash table from the sequencing so it can be used
9202         earlier (for some GCSE bug fixes still pending)
9203
9204 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9205
9206         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
9207         * support/regression/tests/addsub.c: testing genPlus shortcut
9208
9209 2003-11-15  Borut Razem <borut.razem AT siol.net>
9210
9211         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
9212
9213 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9214
9215         * src/SDCCcse.c (cseBBlock): fixed bug #527779
9216         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
9217         ordering is immaterial.
9218         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
9219
9220 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9221
9222         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
9223         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
9224         (SIGSEV) of bug #840381
9225         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
9226         unlink new file before rename if new and old filenames are the same)
9227
9228 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9229
9230         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
9231         uninitialized variables) for the mcs51. Set environment variable
9232         SDCC_GENRAMCLEAR to test.
9233         xdata initialization slightly shorter
9234
9235 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9236
9237         * src/SDCCsymt.h,
9238         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
9239         #838241 & 780691 (basicly the same bug)
9240         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
9241         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
9242
9243 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
9244
9245         * src/SDCCmain.c (linkEdit): "fix" #834252
9246
9247 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9248
9249         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
9250         * src/SDCCast.h,
9251         * src/SDCC.y: fixed bug #819403
9252
9253 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9254
9255         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
9256         the reentrant attribute.
9257         * src/hc08/gen.c (genPackBits): added missing stack readjustment
9258         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
9259         simulation
9260         * src/SDCCast.c (decorateType): fixed bug with storage class not being
9261         updated during pointer dereference; f.e. ~(((char *)1)*) was being
9262         erroneously reduced to a literal.
9263         * src/hc08/ralloc.c (packRegisters, rematStr),
9264         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
9265         some cases
9266
9267 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9268
9269         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
9270         * doc/sdccman.lyx: changed from 'article' to 'book'
9271         * doc/Makefile: readded test_suite_spec and cdbfileformat
9272
9273 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
9274
9275         * device/include/stdlib.h: include malloc.h to comply with ANSI
9276         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
9277
9278 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9279
9280         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
9281         * doc/clean.mk: also remove *.out files
9282         * doc/sdccman.lyx: some additions, larger top/bottom margins
9283
9284 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9285
9286         * src/SDCC.y: fixed bug #837365
9287         * support/regression/tests/bitopcse.c
9288         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
9289         a symbol (might be valop instead)
9290         * device/lib/Makefile.in: added errno.c to HC08SOURCES
9291         * device/lib/clean.mk: added hc08 to the cleaning list
9292
9293 2003-11-04  Borut Razem <borut.razem AT siol.net>
9294
9295         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
9296           made 2003-11-04
9297         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
9298           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
9299           malloc is declared in standard stdlib.h
9300
9301 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9302
9303         * device/lib/hc08/Makefile: need to clean .rel not .o files
9304         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
9305
9306 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9307
9308         * src/port.h,
9309         * src/hc08/main.c,
9310         * src/mcs51/main.c,
9311         * src/ds390/main.c,
9312         * src/z80/main.c,
9313         * src/avr/main.c,
9314         * src/pic/main.c,
9315         * src/pic16/main.c,
9316         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
9317         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
9318         tests (which uses the port's oclsExpense function)
9319         * src/SDCC.y,
9320         * src/SDCCast.c,
9321         * src/SDCCicode.c,
9322         * src/hc08/gen.c,
9323         * src/ds390/gen.c,
9324         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
9325
9326 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9327
9328         * src/SDCCcse.c (ifxOptimize),
9329         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
9330         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
9331         deleting the IFX iCode.
9332         * src/hc08/ralloc.c: reduced unneeded slocs
9333         * src/hc08/gen.c: fixed bug in asmopToBoolean
9334
9335 2003-11-04  Borut Razem <borut.razem AT siol.net>
9336
9337         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
9338           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
9339           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
9340           transferred to configure
9341
9342 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
9343
9344         Use headers defined in the C[++] standards:
9345         * sim/ucsim/gui.src/serio.src/fileio.cc
9346         * sim/ucsim/gui.src/serio.src/frontend.cc
9347         * sim/ucsim/gui.src/serio.src/main.cc
9348         * sim/ucsim/gui.src/serio.src/posix_signal.cc
9349         * support/Util/NewAlloc.c
9350         * as/hc08/lklibr.c
9351         * as/mcs51/lklibr.c
9352         * as/z80/aslist.c
9353         * as/z80/assym.c
9354
9355 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9356
9357         * Added MSVC projects for hc08 assembler and linker:
9358         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
9359         /as/hc08/link_hc08.dsp
9360
9361 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
9362
9363         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
9364
9365 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
9366
9367         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
9368
9369 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9370
9371         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
9372
9373 2003-10-31  Borut Razem <borut.razem AT siol.net>
9374
9375         * support/cpp2/cpplib.h,
9376           support/cpp2/cpplib.c,
9377           support/cpp2/cpplex.c,
9378           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
9379           to switch _asm block preprocessing on / off. Default is
9380           #pragma preproc_asm +
9381
9382 2003-10-31  Borut Razem <borut.razem AT siol.net>
9383
9384         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
9385           when outputting comment blocks (when executed with -C option) and
9386           _asm (SDCPP specific) blocks
9387
9388 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9389
9390         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
9391
9392 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
9393
9394         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
9395
9396 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
9397
9398         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
9399         * src/SDCCast.c (decorateType): fixed bug #832664
9400
9401 2003-10-31  Borut Razem <borut.razem AT siol.net>
9402
9403         * support/cpp2/cpplex.c: fixed for SDCPP:
9404           comments(when executed with -C option) and _asm blocks
9405           were included even if they where in skipped #if block.
9406           Applied solution from GCC cpp 3.3.2
9407
9408 2003-10-31  Borut Razem <borut.razem AT siol.net>
9409
9410         * src/SDCC.lex: sdcc now understands both formats:
9411           '# <line_number> <file_name>' and
9412           '#line <line_number> <file_name>'
9413         * support/cpp2/cppmain.c: sdcpp now generates the standard
9414           '# <line_number> <file_name>' instead of former
9415           '#line <line_number> <file_name>'
9416
9417 2003-10-30  Borut Razem <borut.razem AT siol.net>
9418
9419         * support/cpp2/cpphash.h,
9420         * support/cpp2/cpplib.h
9421         * support/cpp2/cpplex.c,
9422         * support/cpp2/cppmain.c,
9423         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
9424
9425 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9426
9427         Fixed a number of problems revealed by bug #827883.
9428         * src/SDCCloop.c (loopInvariants): Spill location of the
9429         result operand should be recomputed if extracted from
9430         a loop. Also, don't extract assignments of an iTemp
9431         from a literal.
9432         * src/SDCCast.c (isConformingBody): loop reversal should
9433         not occur if the control variable is involved with a
9434         relational operator.
9435
9436 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
9437
9438         * .version: bumped to 2.3.6 to reflect the big improvements
9439         made by Erik and Klaus. Thanks!
9440
9441 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
9442
9443         Replaced the livrange code.
9444         * src/SDCClrange.c: added new LR code
9445         * src/SDCCloop.c,
9446         * src/SDCCBBlock.h: removed remainig parts from old LR code
9447         * src/ds390/ralloc.c,
9448         * src/ds390/gen.c: minor fixes to make it work with new code
9449
9450 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9451
9452         * as/hc08/asm.h,
9453         * as/hc08/lkrloc.c,
9454         * src/hc08/gen.c,
9455         * src/hc08/ralloc.c: Fix various warnings related to the hc08
9456         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
9457         (tweaked fix for bug #818696)
9458
9459 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9460
9461         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
9462
9463 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9464
9465         * src/SDCCmain.c,
9466         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
9467         * src/mcs51/gen.c (gencjneshort),
9468         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
9469         more efficient (per Scott Bronson's suggestion)
9470
9471 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9472
9473         Extended the semantics of the critical keyword to include
9474         individual statements. See RFE #827755 and #799831
9475         * src/SDCC.y
9476         * src/SDCCicode.c
9477         * src/SDCCopt.c
9478         * src/SDCCast.c
9479         * support/Util/SDCCerr.c
9480         * support/Util/SDCCerr.h
9481         * src/mcs51/gen.c
9482         * src/ds390/gen.c
9483         * src/hc08/gen.c
9484
9485 2003-10-19  Borut Razem <borut.razem AT siol.net>
9486
9487         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
9488
9489 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9490
9491         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
9492         Fixed bug #818696
9493         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
9494         and predecrement operand is displayed
9495
9496 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9497
9498         * src/SDCCval.c (valMinus): fixed bug #826041
9499
9500 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9501
9502         Some hc08 related updates that I missed earlier
9503         * sim/ucsim/stypes.h
9504         * support/regression/ports/hc08/spec.mk
9505
9506 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9507
9508         New target "hc08" for the Motorola 68hc08 family of micros
9509
9510         * configure
9511         * configure.in
9512         * Makefile
9513         * src/hc08/*
9514         * src/SDCCmain.c
9515         * src/port.h
9516         * sim/ucsim/hc08.src/*
9517         * sim/ucsim/configure.in
9518         * src/ucsim/configure
9519         * sim/ucsim/packages_in.mk
9520         * as/hc08/*
9521         * as/Makefile
9522         * device/include/mc68hc908qy.h
9523         * device/lib/hc08/*
9524         * device/lib/Makefile.in
9525         * support/regression/ports/hc08/*
9526         * support/regression/Makefile
9527
9528 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9529
9530         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
9531         regression test
9532         * src/ds390/gen.c (genCast): fixed bug #821957
9533
9534 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
9535
9536         * device/lib/logf.c: "fixed" overlay bug
9537         * support/regression/ports/host/spec.mk: added m library
9538         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
9539         * support/regression/tests/float_trans: added (for Eric)
9540
9541 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
9542
9543         * src/mcs51/gen.c (genCpl): fixed bug
9544         http://sf.net/mailarchive/message.php?msg_id=6263915
9545
9546 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
9547
9548         * src/SDCCast.c (decorateType): added extended constant folding
9549         * src/SDCCsymt.c (computeType): cleanup
9550         * src/SDCCval.c (valShift): minor optimization
9551         * support/regression/tests/ast_constant_folding.c: added
9552
9553 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9554
9555         * src/SDCCmain.c: removed some unintended changes
9556
9557 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9558
9559         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
9560         * src/z80/gen.c: fixed part of bug #817589
9561         * src/SDCCsymt.c (checkFunction): fixed bug #817895
9562
9563 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
9564
9565         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
9566         * src/SDCCcflow.c
9567         * src/SDCCcse.c
9568         * src/SDCCdflow.c
9569         * src/SDCClabel.c
9570         * src/SDCClrange.c
9571         * src/SDCCmem.c
9572         * src/SDCCopt.c
9573         * src/SDCCpeeph.c
9574         * src/SDCCset.c
9575         * src/avr/ralloc.c
9576         * src/ds390/ralloc.c
9577         * src/izt/ralloc.c
9578         * src/mcs51/ralloc.c
9579         * src/pic/ralloc.c
9580         * src/pic16/ralloc.c
9581         * src/xa51/ralloc.c
9582         * src/z80/ralloc.c
9583         * src/z80/gen.c: removed unused label "release:"
9584
9585 2003-10-06  Borut Razem <borut.razem AT siol.net>
9586
9587         * src/SDCC.lex: removed definition of unused variables
9588           save_optimize and save_options
9589
9590 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
9591
9592         * clean.mk: removed '=' in "-maxdepth=1"
9593         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
9594         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
9595
9596 2003-10-06  Borut Razem <borut.razem AT siol.net>
9597
9598         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
9599           my_unput() replaced by unput()
9600
9601 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
9602
9603         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
9604         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
9605         type-punned pointer will break strict-aliasing rules"
9606         Old LR behaviour is again default; Klaus' LR can be choosen by
9607         defining the environment variable LRKLAUS
9608         * src/SDCCBBlock.h
9609         * src/SDCCloop.c
9610         * src/SDCClrange.c
9611         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
9612         * clean.mk: fixed removal of files in bin/CVS/
9613         * device/lib/clean.mk: fixed removal of directories small and large
9614         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
9615         * src/SDCCicode.c,
9616         * src/SDCCval.c: removed superflous test for pedantic
9617
9618 2003-10-05  Borut Razem <borut.razem AT siol.net>
9619
9620         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
9621           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
9622           message "unmatched #pragma SAVE and #pragma RESTORE"
9623
9624 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9625
9626         * doc/sdccman.lyx: various additions and updates (interrupts, inline
9627           assembly, critical functions, atomic, nojtbound)
9628
9629 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
9630
9631         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
9632         * src/SDCCBBlock.h
9633         * src/SDCCloop.c
9634         * src/SDCCloop.h
9635         * src/SDCClrange.c
9636
9637 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9638
9639         * src/z80/gen.h,
9640         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9641         * src/mcs51/gen.h
9642         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9643         * src/ds390/gen.h
9644         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
9645         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
9646         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
9647
9648 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9649
9650         * src/z80/gen.c (genRet): fixed bug #524753
9651         * src/z80/gen.c (genCast): fixed internal error on cast from
9652         pointer to long
9653         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
9654         fix for bug #477835 to the z80
9655         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
9656         for tracking iCodes in the peephole optimizer for z80
9657
9658 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9659
9660         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
9661         the other part of bug #814548
9662         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
9663
9664 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
9665
9666         * src/SDCCcse.c: fixed part of bug #814548
9667
9668 2003-09-28  Borut Razem <borut.razem AT siol.net>
9669
9670         * src/asm.c: rewrite of printILine() to use temporary file instead
9671           a pipe
9672         * src/xa51/main.c: commented out declaration of int rewinds
9673
9674 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9675
9676         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
9677
9678 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9679
9680         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
9681         * src/asm.c (printILine): Fixed bug #811015
9682
9683 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9684
9685         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
9686         freeing.
9687
9688 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9689
9690         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
9691         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
9692         to correctly handle general case of AOP_PAIRPTR
9693         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
9694
9695 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9696
9697         * src/mcs51/ralloc.c (fillGaps),
9698         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
9699         register positioning bug)
9700
9701 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
9702
9703         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
9704
9705 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9706
9707         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
9708         genCodePointerGet, genGenPointerGet, genFarPointerSet,
9709         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
9710         (ralloc doesn't intentionally do this now, but perhaps later)
9711         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
9712         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
9713         register positioning bugs (Fixed bug #762602 and #795325)
9714         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
9715         (Fixed bug #808779)
9716         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
9717         lines that --i-code-in-asm generates
9718
9719 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9720
9721         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
9722         trying to fclose a FILE* that was already closed.
9723
9724 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9725
9726         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
9727         of const struct should be treated as if const themselves)
9728
9729 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
9730
9731         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
9732
9733 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9734
9735         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
9736         Unix (/n) and DOS (/r/n) line terminations.
9737
9738 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9739
9740         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
9741         bug #613775
9742
9743 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9744
9745         * src/mcs51/gen.c (genFunction, genEndFunction),
9746         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
9747         and restore of EA so that stack offsets to parameters are
9748         correct when using both critical and reentrant/stack-auto.
9749         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
9750         size (can be triggered in error if sloc is shared between
9751         different sized objects)
9752         * device/include/float.h: fixed macros to explicitly use
9753         unsigned long where needed
9754
9755 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
9756
9757         Feature req. 799831: added code to allow nesting of critical functions
9758         * src/mcs51/gen.c (genFunction, genEndFunction)
9759         * src/ds390/gen.c (genFunction, genEndFunction)
9760
9761 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9762
9763         * src/SDCCsymt.c (sclsFromPtr),
9764         * src/SDCCsymt.h,
9765         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
9766         support for standard C idiom of memory mapped variables; for
9767         example, *((xdata int*)0x1234) = 1 is now internally equivalent
9768         to xdata int at 0x1234 tempvar = 1.
9769         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
9770         provided by Akiya ISHIDA
9771
9772 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
9773
9774         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
9775         * src/SDCCval.c (constVal): added reduction from int to char
9776         * src/SDCCval.c (valMult, valDiv): fixed sign handling
9777         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
9778         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
9779         to ignore the sign
9780         * support/regression/tests/shifts.c: fixed
9781
9782 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9783
9784         * src/z80/gen.c (genXor): Fixed bug #805445
9785
9786 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9787
9788         Fixed bug #621531 (const & volatile confusion in the type chain).
9789         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
9790         refer to the const or volatile state of the pointer itself.
9791
9792         * src/SDCCast.c
9793         * src/SDCCglue.c
9794         * src/SDCCicode.c
9795         * src/SDCCsymt.c
9796         * src/SDCCval.c
9797         * src/SDCC.y
9798         * src/SDCCsymt.h
9799         * src/pic/gen.c
9800         * src/pic/ralloc.c
9801         * src/pic16/gen.c
9802         * src/pic16/ralloc.c
9803         * support/regression/tests/const.c
9804
9805 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9806
9807         When checking for duplicated modules, use absolute paths
9808         instead of relative paths.  Files changed:
9809
9810         * as/mcs51/lklib.c
9811         * link/z80/lklib.c
9812
9813 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9814
9815         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
9816
9817 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9818
9819         * device/include/string.h: added size_t typedef, changed
9820         prototypes to use size_t, eliminated separate reentrant and
9821         non-reentrant declarations, added _memmove declaration
9822         * device/lib/_memcpy.c: changed to use size_t instead of int,
9823         changed /4 to >>2 to avoid division library call
9824         * device/lib/_memcmp.c,
9825         * device/lib/_memset.c,
9826         * device/lib/_strncat.c,
9827         * device/lib/_strncpy.c,
9828         * device/lib/_strncmp.c: changed to use size_t instead of int
9829         * device/lib/_memmove.c: new file (fixed bug #772294)
9830         * device/lib/Makefile.in: added _memmove.c
9831         * device/lib/z80/asm_strings.s: fixed bug #772290
9832         * support/regression/tests/bitfields.c: attempt to fix host assertion
9833         failure on amd64-unknown-linux2.2
9834
9835 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9836
9837         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
9838         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
9839         * as/z80/asmain.c (main): fixed bug #801766
9840
9841 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
9842
9843         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
9844         compilers
9845
9846 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9847
9848         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
9849         reported in bug #800609
9850
9851 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
9852
9853         * Top header beautifications in src/pic16 directory:
9854           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
9855           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
9856           pcoderegs.h, ralloc.c, ralloc.h
9857         * main.c: added top header and GPL license notice
9858         * pcode.c: fixed the if-conditional warning
9859
9860 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
9861
9862         * device/lib/_mullong.c: replaced int by short for gcc
9863
9864 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9865
9866         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
9867         and JUMPTABLE iCodes properly now (worked by accident before)
9868         * src/mcs51/gen.c (leftRightUseAcc),
9869         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
9870         iCode properly now. Use getSize instead of nRegs since a & b
9871         aren't part of the nRegs tally.
9872
9873 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
9874
9875         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
9876         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
9877           before instructions that use the _STATUS register
9878
9879 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
9880
9881         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
9882         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
9883         fetching of the pointer
9884         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
9885         copied from genNearPointerSet()
9886         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
9887         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
9888         If they pop r0/r1 they must be called in the opposite order than aopOp().
9889         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
9890         (resp. --stack-auto), prepared for --xstack
9891
9892 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9893
9894         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
9895
9896 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9897
9898         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
9899         these ports have their own __sdcc_external_start()
9900
9901 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
9902
9903         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9904         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
9905         type for bits was changed. It resulted in bit variables becoming
9906         global, which is not permitted in PIC 14 assembly output.
9907
9908 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9909
9910         * doc/sdccman.lyx: various additions and updates. Rearranged sections
9911
9912 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9913
9914         Z80 and MCS51 linkers complaint if a public symbol is defined
9915         in more than one library module:
9916
9917         * as/mcs51/lklib.c
9918         * link/z80/lklib.c
9919         * as/mcs51/Makefile.in
9920
9921 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9922
9923         A few small changes that speed up the peephole optimizer.
9924
9925         * src/SDCCpeeph.c
9926
9927 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9928
9929         Try to make the peephole optimizer smarter by maintaining
9930         an association between the assembly source code and the
9931         iCodes that originated them. Put this information to use
9932         with a new peephole rule condition "notVolatile" so that
9933         the rules can be aggressive yet still safe.
9934
9935         * src/SDCCpeeph.c
9936         * src/SDCCpeeph.h
9937         * src/mcs51/gen.c
9938         * src/mcs51/peeph.def
9939
9940 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9941
9942         Fixed bug #741761
9943
9944         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
9945         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
9946         if the left or right operand symbols have the accuse flag set.
9947
9948 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9949
9950         Changed the type of the result of the ! (NOT) operator to char;
9951         previously it returned the same type as the source. This allows
9952         us to eliminate all the genFloatNot functions (all of its target
9953         implementations were very buggy) since !float can use the same
9954         code as !long now.
9955
9956         * src/SDCCicode.c (ast2iCode): ! returns char
9957         * src/mcs51/gen.c (genNot, genNotFloat),
9958         * src/ds390/gen.c (genNot, genNotFloat),
9959         * src/z80/gen.c (genNot, genNotFloat),
9960         * src/pic/gen.c (genNot, genNotFloat),
9961         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
9962
9963 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
9964
9965         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
9966         1. Interrupt would not compile properly. Ensure PCLATH register is saved
9967            during interrupts. Ensure WSAVE is located at a shared bank address.
9968         2. Fixed page selection in some places
9969         3. Fixed BTFSS/C to where necessary use registers directly and not simply
9970            the registers name strings.
9971         4. Fixed "signed / unsigned compare" compiler warnings.
9972         5. The PIC port manages its own allocation of the general purpose
9973            registers, but makes no attempt to reuse them. As a result when
9974            compiling it soon runs out of general purpose registers. Some
9975            additional code was added to the files pcode.c and device.c to walk
9976            through the function call tree and rename the registers so that they
9977            get reused.
9978
9979         * src/pic/device.c
9980         * src/pic/gen.c
9981         * src/pic/glue.c
9982         * src/pic/pcode.c
9983         * src/pic/pcode.h
9984         * src/pic/ralloc.c
9985         * src/pic/ralloc.h
9986         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
9987         genPlus() & genMinus() when the result is the same as left or right
9988
9989 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9990
9991         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
9992
9993 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9994
9995         Made bitfield a distinct type from bit so that bitfields
9996         convert as per ANSI C and bits retain their traditional
9997         boolean style behaviour. Implemented bitfield support in
9998         the z80 port.
9999
10000         * src/SDCCsymt.h,
10001         * src/SDCCsymt.c,
10002         * src/SDCCast.c,
10003         * src/cdbFile.c,
10004         * src/mcs51/gen.c,
10005         * src/ds390/gen.c: bit v bitfield split
10006         * src/z80/gen.c: New support for bitfields
10007         * support/regression/tests/bitfields.c: reenabled z80,
10008         added more tests
10009
10010 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10011
10012         Rules 246.x, 247.x relate to bitfields, the others speed up
10013         access to xdata mapped I/O devices.
10014
10015         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
10016
10017 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10018
10019         Cleaned up genPackBits and genUnpackBits and added two helper
10020         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
10021         for literal assignments in genPackBits (thanks to Frieder for
10022         reminding me).
10023
10024         * src/mcs51/gen.c
10025         * src/ds390/gen.c
10026
10027 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10028
10029         Fixed bug #748310 (pointer to function type mishandled when the
10030         function name is omitted). Also fixed a SIGSEGV when a function
10031         attribute (reentrant, etc) is used on a non-function or on a
10032         function but misplaced before the parameter list.
10033
10034         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
10035         bug #748310
10036         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
10037         * support/Util/SDCCerr.h,
10038         * support/Util/SDCCerr.c: Added func attr misuse error msg
10039
10040 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
10041
10042         Fixed bug #787649 by anonymous
10043         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
10044         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
10045
10046 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10047
10048         Fixed numerous bitfield problems.
10049
10050         * src/SDCC.y: More bitfield related error checking
10051         * src/SDCCsymt.h,
10052         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
10053         * support/Util/SDCCerr.h,
10054         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
10055         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
10056         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
10057         * support/regression/tests/bitfields.c: tests added
10058
10059 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10060
10061         Made the constant following the "interrupt" keyword optional. If
10062         omitted, the function will not automatically be given an entry
10063         in the interrupt vector table (similar to #pragma NOIV, but
10064         less syntacticly kludgy). The interrupt number is also now
10065         range checked. Also fixed a bug in the high order bit example
10066         in the manual.
10067
10068         * src/SDCC.y
10069         * src/SDCCmem.c
10070         * src/SDCCglue.c
10071         * src/SDCCsymt.h
10072         * support/Util/SDCCerr.c
10073         * support/Util/SDCCerr.h
10074         * doc/sdccman.lyx
10075
10076 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
10077
10078         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
10079         * src/SDCCicode.c (operandOperation): rewritten some ops
10080         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
10081         * src/SDCCsymt.c (computeType): literals are handled the same way as any
10082         other type
10083         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
10084         be re-activated by defining REDUCE_LITERALS)
10085         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
10086         unsigned, but are signed by default
10087         * src/SDCCval.c (constVal): rearranged
10088         * src/SDCCval.c (valMod): preliminary fix
10089         * src/SDCCval.c (valCastLiteral): use TYPE_* types
10090         * support/regression/literalop.c: added, work in progress
10091
10092 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10093
10094         Generate warnings for useless declarations like "char data;"
10095         that don't do what new users expect.
10096
10097         * src/SDCC.y
10098         * support/Util/SDCCerr.h
10099         * support/Util/SDCCerr.c
10100
10101 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
10102
10103         * src/SDCCval.c (valMult): fix overflow detection of negative int
10104
10105 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10106
10107         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
10108
10109         Changes to support big endian targets:
10110
10111         * src/ports.h
10112         * src/SDCCglue.c
10113         * src/avr/main.c
10114         * src/ds390/main.c
10115         * src/izt/i186.c
10116         * src/mcs51/main.c
10117         * src/pic/main.c
10118         * src/pic16/main.c
10119         * src/xa51/main.c
10120         * src/z80/main.c
10121
10122 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
10123
10124         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
10125         * device/lib/time.c: fixed warning "integer overflow in expression"
10126
10127 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
10128
10129         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
10130         * src/SDCCval.c (constVal): changed default to signed; hex and octal
10131         constants are unsigned; added recognition of "u" flag for unsigned
10132         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
10133         * src/SDCCval.c (valDiv, valMod): fixed signdness
10134         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
10135         signedness of modulo, left and right shift
10136         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
10137         * support/Util/SDCCerr.h: added warning W_INT_OVL
10138         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
10139         * src/SDCCast.c (ast_print): improved output of constants
10140
10141 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10142
10143         Fixed some warnings when building with MSVC:
10144
10145         * as/mcs51/asdata.c
10146         * as/z80/asdata.c
10147         * as/mcs51/asm.h
10148         * as/z80/asm.h
10149         * link/z80/aslink.h
10150         * link/z80/lkdata.c
10151         * link/z80/lkeval.c
10152         * link/z80/lkgb.c
10153         * link/z80/lkihx.c
10154         * link/z80/lks19.c
10155         * link/z80/lksym.c
10156         * support/cpp2/cpplib.c
10157         * src/ds390/gen.c
10158         * src/mcs51/gen.c
10159
10160 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
10161
10162         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
10163
10164 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10165
10166         * support/librarian/clean.mk: Do not remove Makefile.
10167         * support/librarian/Makefile: added.
10168
10169 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10170
10171         Added librarian to MSVC build:
10172         * all.dsp
10173         * sdcc.dsw
10174         * support/librarian/librarian.dsp
10175
10176         'configure' not needed for librarian, removed:
10177         * support/librarian/configure
10178         * support/librarian/configure.in
10179         * support/librarian/config_in.h
10180         * support/librarian/Makefile.in
10181
10182         Hopefully these ones built the librarian and the rest of sdcc properly:
10183         * Makefile
10184         * Makefile.common.in
10185
10186         Messed up 'configure', so revert to previous version:
10187         * configure
10188         * configure.in
10189
10190 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
10191
10192         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
10193         there, while the mantissa of a double is "only" 53 bits wide.
10194
10195 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10196
10197         Adding sdcclib to the build.  MSVC project coming soon.
10198         Files added/changed:
10199
10200         * support/librarian/clean.mk
10201         * support/librarian/configure
10202         * support/librarian/configure.in
10203         * support/librarian/config_in.h
10204         * support/librarian/Makefile.bcc
10205         * support/librarian/Makefile.in
10206         * support/librarian/sdcclib.c
10207         * Makefile.bcc
10208         * Makefile
10209         * Makefile.common.in
10210         * configure
10211         * configure.in
10212
10213 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10214
10215         Linker now complaints if linked modules have conflicting options, for
10216         example, one compiled using --model-large and another one compiled with
10217         --model-small.  The following files were modified:
10218
10219         * as/mcs51/asdata.c
10220         * as/mcs51/aslink.h
10221         * as/mcs51/asm.h
10222         * as/mcs51/asmain.c
10223         * as/mcs51/asout.c
10224         * as/mcs51/i51pst.c
10225         * as/mcs51/lkdata.c
10226         * as/mcs51/lklibr.c
10227         * as/mcs51/lkmain.c
10228         * as/z80/asdata.c
10229         * as/z80/asm.h
10230         * as/z80/asmain.c
10231         * as/z80/asout.c
10232         * as/z80/z80pst.c
10233         * link/z80/aslink.h
10234         * link/z80/lkdata.c
10235         * link/z80/lklibr.c
10236         * link/z80/lkmain.c
10237         * src/SDCCglue.c
10238
10239 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10240
10241         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
10242         as/mcs51/lklibr.c: Generate a warning when a library is not found.
10243
10244 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
10245
10246         * src/z80/mappings.i: fix _mul[us][int,long] entries
10247
10248 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10249
10250         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
10251
10252 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
10253
10254         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
10255         * support/regression/tests/bitopcse.c: added
10256         fixed warning:
10257         * src/avr/gen.c:
10258         * src/pic/gen.c:
10259         * src/pic16/gen.c:
10260         * src/z80/gen.c:
10261         * src/xa51/gen.c:
10262
10263 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10264
10265         added support for new library format to z80, gbz80 linkers:
10266         *link/z80/aslink.h
10267         *link/z80/lklex.c
10268         *link/z80/lklib.c
10269         *link/z80/lklist.c
10270
10271 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
10272
10273         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
10274         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
10275
10276 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
10277
10278         added DUMMY_READ_VOLATILE:
10279         * src/SDCC.y:
10280         * src/avr/gen.c:
10281         * src/xa51/gen.c:
10282         * src/z80/gen.c:
10283         * src/pic/gen.c:
10284         * src/pic16/gen.c:
10285         * src/mcs51/gen.c:
10286         * src/ds390/gen.c:
10287         * src/SDCCcse.c (algebraicOpts): many improvements
10288         * src/SDCCcse.h: removed algebraicOpts()
10289         * src/SDCCicode.c (picDummyRead): added
10290
10291 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10292
10293         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
10294         "Insufficient space in data memory".
10295
10296 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10297
10298         * src/mcs51/gen.c: fixed bug #771358
10299         * src/z80/gen.c: fixed bug #759087
10300
10301 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
10302
10303         * src/pic16/glue.c: minor cleanup by Vangelis
10304
10305 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10306
10307         * device/include/regc515c.h: fixed #758477
10308         * device/lib/_gptrget.c: saving some cycles in generic pointer get
10309         * device/lib/_gptrput.c: saved a few bytes
10310         * my tab spacing is 8, yours too?)
10311         * device/lib/_ser.c: process RX bytes earlier than TX bytes
10312         * device/lib/serial.c: process RX bytes earlier than TX bytes
10313         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
10314
10315 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
10316
10317         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
10318
10319 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10320
10321     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
10322
10323 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
10324
10325         * device/lib/Makefile.in: bad fix, reverted to 1.43
10326
10327 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
10328
10329         * device/lib/Makefile.in: added missing z80 object files
10330
10331 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
10332
10333         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
10334         pic16 progress by Vangelis:
10335         * src/SDCCglobl.h:
10336         * src/SDCCmain.c:
10337         * src/pic/Makefile:
10338         * src/pic:
10339         * pic/Makefile:
10340         * pic16/device.c:
10341         * pic16/device.h:
10342         * pic16/gen.c:
10343         * pic16/gen.h:
10344         * pic16/genarith.c:
10345         * pic16/glue.c:
10346         * pic16/main.c:
10347         * pic16/pcode.c:
10348         * pic16/pcode.h:
10349         * pic16/pcodepeep.c:
10350         * pic16/peeph.def:
10351
10352 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10353
10354     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
10355
10356 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10357
10358     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
10359     added gbz80 build to MSVC project.
10360     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
10361     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
10362     from 8051 stuff and setup so it links using a .lnk file.
10363
10364 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10365
10366     * support/librarian/sdcclib.c: sdcc librarian.
10367     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
10368     with sdcclib.
10369
10370 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10371
10372     * as/mcs51/lkmain.c: properly handle extensions in function afile.
10373
10374 2003-07-02  Borut Razem <borut.razem AT siol.net>
10375
10376         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
10377         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
10378         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
10379         src/xa51/main.c, src/z80/main.c:
10380         virtualization of glue() function: each port has it's own glue function,
10381         which is accessed by do_glue function pointer in PORT.general structure
10382
10383 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
10384
10385         * DS800C400 fun, improved ROM interface and tinibios.
10386
10387 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
10388
10389         * More support for DS80C400. Now includes beginning of interface to ROM.
10390
10391 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
10392
10393         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
10394
10395 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10396
10397         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
10398
10399 2003-06-19  Borut Razem <borut.razem AT siol.net>
10400
10401         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
10402
10403 2003-06-19  Borut Razem <borut.razem AT siol.net>
10404
10405         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
10406         fixed Z80 port - crt0.o: cannot open.
10407
10408 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
10409
10410         * support/Util/MySystem.c (merge_command): revert bad fix
10411
10412 2003-06-18  Borut Razem <borut.razem AT siol.net>
10413
10414         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
10415
10416 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10417
10418         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
10419         option --use-stdout sends errors to stdout instead of stderr.
10420
10421 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
10422
10423         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
10424
10425 2003-06-15  Borut Razem <borut.razem AT siol.net>
10426
10427         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
10428         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
10429         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
10430         fixed width array of pointers replaced with sets;
10431         multiple include and lib paths ared transferred to preprocessor and linker
10432         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
10433         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
10434         fixed width array of pointers
10435         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
10436         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
10437         fixupPath(), getPathDifference()
10438         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
10439         fixed width array of pointers
10440
10441 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
10442
10443         * src/pic16/ralloc.c: fix warnings
10444         * src/pic16/pcode.c: fix warning
10445
10446 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
10447
10448          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
10449         know all the details, but essentially this set of changes enable
10450         the pic16 port to generate movff instructions and generate assembler
10451         directives,
10452         * src/SDCCmain.c:
10453         * src/pic16/gen.c:
10454         * src/pic16/glue.c:
10455         * src/pic16/pcode.c:
10456         * src/pic16/device.c:
10457         * src/pic16/main.c:
10458         * src/pic16/pcode.h:
10459         * src/pic16/pcoderegs.c:
10460         * src/pic16/ralloc.c:
10461         * src/pic16/ralloc.h:
10462
10463 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10464
10465         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
10466         added option --vc, so sdcc errors and warnings are compatible with
10467         Microsoft Visual Studio.
10468
10469 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10470
10471         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
10472           device/lib/libfloat.lib: added atof function.
10473
10474 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
10475
10476         * doc/sdccman.lyx: updated to Lyx 1.3
10477         * doc/cdbfileformat.lyx: updated to Lyx 1.3
10478         * doc/test_suite_spec.lyx: updated to Lyx 1.3
10479         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
10480
10481 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
10482
10483         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
10484
10485 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10486
10487         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
10488           additions to the "related tools/documentation" section
10489
10490 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
10491
10492         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
10493
10494 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
10495
10496         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
10497         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
10498
10499 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
10500
10501         * doc/sdccman.lyx: fix double dash and other minor things
10502         * doc/Makefile: fix double dash
10503
10504 2003-05-28  Karl Bongers(patches from Martin Helmling)
10505         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
10506           condition and ignore commands.
10507
10508 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10509
10510         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
10511           is in parts still quite out of date, I did changes as far as I felt makes sense
10512           for a non-native english speaker.
10513           Please feel free to add to the manual or to correct my changes.
10514         * doc/Makefile: undid touching the date of intermediate tex files.
10515
10516 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10517
10518         * doc/sdccman.lyx: Manual has an index now
10519
10520 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
10521
10522         Finalize muluint/mulsint and mululong/mulslong merging:
10523         * device/lib/_mulint.c
10524         * device/lib/_mullong.c
10525         * device/lib/gbz80/mul.s
10526         * device/lib/gbz80/stubs.s
10527         * device/lib/z80/mul.s
10528         * device/lib/z80/stubs.s
10529         * src/SDCCsymt.c (initCSupport)
10530
10531 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10532
10533         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
10534         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
10535           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
10536           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
10537           instead of /Zm500.
10538
10539 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10540
10541         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
10542           the regression tests I'm not brave enough to enable 245.b, 245.c
10543         * doc/sdccman.lyx: added latex preamble for hyperref package.
10544           Using pdflatex this will give you a hyperlinked pdf file with
10545           bookmarks. (prepend '%' before /usepackage if this breaks something)
10546
10547 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10548
10549          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
10550
10551 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
10552
10553         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
10554
10555 2003-05-21    <johan AT balder>
10556
10557         * src/SDCCglue.c (printIval): fixed bug #739934
10558
10559 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10560
10561         Applied patch from bug 737905 (renamed yylineo to mylineno):
10562         * src/altlex.c
10563         * src/SDCCast.c
10564         * src/SDCglobl.h
10565         * src/SDCC.lex
10566         * src/SDCCsymt.c
10567         * src/SDCCval.c
10568         * src/pic16/pcode.c: Cleaned warnings
10569         * src/pic16/pcodeflow.c: Cleaned warnings
10570         * src/pic16/pcoderegs.c: Cleaned warnings
10571
10572 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
10573
10574         * src/pic16/pcode.c: Cleaned warnings
10575         * src/pic16/pcodepeep.c: Cleaned warnings
10576         * src/pic16/ralloc.c: Cleaned warnings
10577
10578 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
10579
10580         * doc/sdccman.lyx: fixed bug 739745
10581         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
10582
10583 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
10584
10585         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
10586         it can be defined with CFLAGS when running configure
10587         * src/SDCCmain.c: fixed compiling + linking with object files
10588
10589 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
10590
10591         * configure.in: configure for pic16 port,
10592             added --disable-pic16-port
10593         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
10594         * src/SDCCmain.c: linkOptions is changed to set *,
10595             added if/endif conditional macros to remove options help
10596             messages from optionsTable when a port is not configured, added
10597             support for the PIc16 port in the ports table, when executing
10598             the compiler with no port specified on command line, a default
10599             port is selected with the new macro DEFAULT_PORT which is
10600             defined in port.h, in setDefaultOptions() linkOptions is removed
10601             from initialization assignment, since now it is a set,
10602             parseCmdLine uses setParseWithComma for linkOptions, in
10603             linkEdit() linkOptions are accessed with new function indexSet()
10604             which returns the i'th item of a set variable. See SDCCset.c, in
10605             linkEdit() when calling buildCmdLine(), added linkOptions as
10606             last argument. Now users can pass arguments to gplink via the
10607             -Wl option, main() uses pic16glue() to glue up pic16 programs
10608         * src/SDCCpeeph.c: various changes to support pic16
10609         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
10610             return the i'th item of the set
10611         * src/SDCCset.h: added function prototype for indexSet()
10612         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
10613         * src/clean.mk: added pic16 in CLEANALLPORTS variable
10614         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
10615             added macro DEFAULT_PORT
10616         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
10617         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
10618             generated
10619         * src/pic16/glue.c: commented out some error producing lines
10620         * src/pic16/main.c: __config directives are commented out to stop
10621             gpasm complaining and test the linkage with gplink, _linkCmd and
10622             _asmCmd changed to be more gplink and gpasm friendly
10623         * src/pic16/peeph.def: peep rule 3 is commented out, since it
10624             produced an error when parsed, peep rule 12 is added to utilize
10625             movff, but it is commented out since the pCode does not support
10626             yet a command with 2 address arguments
10627
10628 2003-05-18    <johan AT balder>
10629
10630         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10631         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
10632 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
10633
10634         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
10635   Added feature to script commands from file.
10636
10637 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
10638
10639         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
10640         * src/SDCCutil.c: include ctype.h for win32
10641
10642 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
10643
10644         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
10645
10646 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
10647
10648         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
10649   Fixed so you can set breakpoints prior to run, run does not stop
10650   on entry now.  Add tbreak.  Other enhancements and fixes for use
10651   with ddd.
10652
10653 2003-05-12  Borut Razem <borut.razem AT siol.net>
10654
10655         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
10656
10657 2003-05-11  Borut Razem <borut.razem AT siol.net>
10658
10659         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
10660         the path of bin directory, so that PATH is the only env. variable, which has to be set
10661         in case of standard installation.
10662         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
10663         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
10664         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
10665
10666 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10667
10668         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
10669         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
10670         temp files are in the port dir; clean the gen/test directory when
10671         generating new test.c
10672         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
10673         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
10674         * support/regression/tests/zeropad.c: added
10675
10676 2003-05-09    <johan AT balder>
10677
10678         * src/SDCCglue.c: fixed bug #597940
10679
10680 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
10681
10682         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10683   cache sfr, optimize next,step, fix off by one sourceline,
10684   support ddd list function.
10685         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
10686
10687 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
10688
10689         * support/regression/HTMLgen.py: added compare_s2f()
10690         * support/regression/Makefile: redo 1.27
10691         * support/regression/generate-cases.py: redo 1.5
10692
10693 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
10694
10695         * support/regression/tests/float.c: workaround 33 bit hex constant
10696         * support/regression/tests/simplefloat.c: fix division for host
10697
10698 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
10699
10700         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
10701         that tame's the PIC's over-aggressive optimizer.
10702
10703 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10704
10705          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
10706          support for MSVC.
10707
10708 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
10709
10710         Initial support for DS80C400. "Hello world" runs on TINIm400
10711         (with polled I/O).
10712
10713 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
10714
10715          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
10716          * Some notes on ddd usage added in debugger/README
10717          Martin Helmling adding more features and fixes for ddd GUI debugger.
10718          Code added for nexti, stepi, up, down, and other adjustments.
10719
10720 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
10721
10722         * src/pic/pCodepeep.c non-wildcard asmops are now handled
10723         * src/pic/peeph.def Added two rules to optimize carry manipulation
10724         * src/pic/* removed debug printfs
10725
10726 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
10727
10728         * debugger/mcs51/cmd.c: added header newalloc.h
10729
10730 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
10731
10732         * as/Makefile: new EXEEXT
10733         * as/z80/Makefile: remove trailing slash of BUILDIR
10734         * as/z80/clean.mk: new EXEEXT
10735         * Makefile.common.in: add to CFLAGS (and others), don't replace it
10736         * support/cpp2/Makefile.in: new EXEEXT
10737         * src/pic/glue.c (pic14emitRegularMap): fixed warning
10738
10739 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
10740
10741         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
10742         EXEEXT was introduced to fix all related problems with targets
10743         "clean", "install" and "uninstall"; a couple of further flaws
10744         especially with "clean" have been fixed too
10745         * as/mcs51/Makefile.in
10746         * as/mcs51/clean.mk
10747         * as/z80/Makefile
10748         * Makefile
10749         * clean.mk
10750         * debugger/mcs51/Makefile.in
10751         * debugger/mcs51/clean.mk
10752         * link/z80/Makefile
10753         * link/z80/Makefile.in
10754         * link/z80/clean.mk
10755         * link/Makefile
10756         * packihx/Makefile.in
10757         * packihx/clean.mk
10758         * sim/ucsim/Makefile
10759         * sim/ucsim/clean.mk
10760         * sim/ucsim/avr.src/Makefile.in
10761         * sim/ucsim/avr.src/clean.mk
10762         * sim/ucsim/s51.src/Makefile.in
10763         * sim/ucsim/s51.src/clean.mk
10764         * sim/ucsim/xa.src/Makefile.in
10765         * sim/ucsim/xa.src/clean.mk
10766         * sim/ucsim/z80.src/Makefile.in
10767         * sim/ucsim/z80.src/clean.mk
10768         * sim/ucsim/main_in.mk
10769         * sim/ucsim/packages_in.mk
10770         * sim/ucsim/gui.src/Makefile.in
10771         * sim/ucsim/gui.src/serio.src/Makefile.in
10772         * sim/ucsim/gui.src/serio.src/clean.mk
10773         * src/Makefile.in
10774         * src/clean.mk
10775         * support/cpp2/Makefile.in
10776         * support/cpp2/clean.mk
10777         * support/makebin/Makefile
10778         * support/makebin/clean.mk
10779         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
10780         * doc/sdccman.lyx: --program-suffix no longer needed
10781
10782 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
10783
10784          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
10785          Martin Helmling added support for ddd GUI debugger.
10786          Code added to display assembly, set variables, and other commands
10787          to interface to ddd.
10788
10789 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
10790
10791         * as/Makefile: fix target clean
10792         * as/clean.mk: fix target clean
10793         * as/z80/clean.mk: fix target clean
10794
10795 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
10796
10797         * Makefile.common.in: added  AT EXEEXT AT
10798         * configure.in: removed all mingw32 stuff
10799         * configure: rebuilt from configure.in
10800         * doc/sdccman.lyx: updated section "installation"
10801         * support/scripts/sdcc_mingw32: adapted to configure
10802         * support/scripts/sdcc_cygwin_mingw32: added
10803
10804 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
10805
10806         * src/pic Added object file support for the PIC port
10807         * src/pic Applied patch from Craig Franklin (this started the object file support)
10808         * src/regression Updated the PIC regression tests for object files
10809
10810 2003-04-20  Borut Razem <borut.razem AT siol.net>
10811
10812         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
10813           lklex.c: In function `getfid':
10814           lklex.c:203: warning: array subscript has type `char'
10815         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
10816           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
10817         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
10818           stack handling macros
10819
10820 2003-04-19  Borut Razem <borut.razem AT siol.net>
10821
10822         * "handling space characters in file path" task:
10823         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
10824         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
10825         * support/Util/MySystem.h: make it self-sufficient
10826         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
10827           src/z80/main.c, sdcc/as/mcs51/lklex.c:
10828           handling space characters in file path
10829         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
10830           (it will be used by assemblers, which have their own includes, e.g. gpasm)
10831         * support/Util/MySystem.c: handling space characters in executable's path
10832
10833 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
10834
10835         * as/z80/Makefile: fix permanent rebuild of z80
10836         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
10837         * support/regression/tests/bitfields.c: added Johan's bitfields.c
10838
10839 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
10840
10841         * src/SDCCopt.c: add special case optimization to replace modulo by
10842           a power of two with a bitwise AND.
10843
10844 2003-04-18    <johan AT balder>
10845
10846         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
10847
10848 2003-04-17    <johan AT balder>
10849
10850         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
10851         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
10852
10853 2003-04-13  Borut Razem <borut.razem AT siol.net>
10854
10855         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
10856         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
10857           fixed mingw problem in adl_NORMALIZE_PATH
10858
10859 2003-04-12  Borut Razem <borut.razem AT siol.net>
10860
10861         * fixed "#pragma SAVE/RESTORE can not be nested":
10862         * src/SDCC.lex: reworked pragma handling functions
10863         * sdcc/src/SDCCglobl.h: reworked stack handling macros
10864         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
10865
10866 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10867
10868         * src/SDCCutil.c (pathEquivalent): defined but not used
10869         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
10870         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
10871         * configure: rebuilt from configure.in
10872         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10873         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
10874         * device/include/Makefile.in: replace sdcc_datadir
10875         * device/lib/Makefile.in: replace sdcc_datadir
10876         * Makefile.common.in: add LDFLAGS from configure
10877         * packihx/Makefile.in: use LDFLAGS
10878         * src/Makefile.in: use LDFLAGS
10879         * support/cpp2/Makefile.in: add LDFLAGS from configure
10880         * support/makebin/Makefile: use LDFLAGS
10881         * .version: bumped version number to 2.3.5
10882
10883 2003-04-12  Borut Razem <borut.razem AT siol.net>
10884
10885         * completed "different paths" task:
10886         * src/SDCCmacro.c: fixed bug in handling quotes
10887         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
10888         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
10889
10890 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
10891
10892         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
10893
10894 2003-04-11 kevin Vigor <kevin AT vigor.nu>
10895
10896         * ds390/gen.c ds390/peeph.def: fix bug 706781
10897
10898 2003-04-11  Borut Razem <borut.razem AT siol.net>
10899
10900         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
10901
10902 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
10903
10904         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
10905         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
10906          set - this bit used to not be set...).
10907         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
10908           bad code in PIC Port
10909         * src/regression/and2.c added to test bug 609268
10910         * src/regression/Makefile added and2.c to regression test
10911
10912
10913 2003-04-08    <johan AT CP255758-A>
10914
10915         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
10916         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
10917         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
10918
10919 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
10920
10921         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
10922         fix bug #487815
10923         * support/cpp2/Makefile.in: fix bug #487815
10924         * configure: rebuilt from configure.in
10925         * Makefile.common.in: docdir changed, new path suffixes
10926         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10927         * sdcc_vc_in.h: reflect changes from sdccconf.h
10928         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
10929         * src/SDCCutil.h: remove BINDIR hack
10930         * doc/sdccman.lyx: update new path hierarchy
10931
10932 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10933
10934         * src/SDCCpeeph.c: added okToRemoveSLOC test
10935
10936 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10937
10938         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
10939
10940 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
10941
10942         * src/SDCCpeeph.c: added labelIsReturnOnly test
10943         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
10944
10945 2003-04-05    <johan AT balder>
10946
10947         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
10948         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
10949         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
10950         * src/SDCCast.c: fixed a warning
10951         * src/SDCCast.h: fixed a warning
10952         * src/SDCCicode.c (operandFromAst): fixed a warning
10953
10954 2003-04-04    <johan AT balder>
10955
10956         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
10957         * src/SDCCast.c (decorateType): fixed bug #715076
10958         * src/SDCC.y: fixed bug #702907
10959
10960 2003-04-03    <johan AT balder>
10961
10962         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
10963         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
10964         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
10965         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
10966         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
10967
10968 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
10969
10970         * _decdptr.c: fix return values
10971         * _gptrget.c: fix return values
10972         * _gptrgetc.c: fix return values
10973         * _gptrput.c: fix return values
10974         * _mulint.c: fix return values
10975         * as/z80/Makefile: fix 'make -j' problem
10976
10977 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
10978
10979         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
10980         * configure.in: big cleanup, updated to autoconf 2.5x
10981         * configure: rebuilt from configure.in
10982         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
10983         * sdcc_vc_in.h: reflect changes from sdccconf.h
10984         * doc/Makefile: fixed a flaw in "make install"
10985
10986 2003-04-02    <johan AT balder>
10987
10988         * src/ds390/gen.c (genCmp): no comments
10989         * src/mcs51/gen.c (genCmp): no comments
10990         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
10991         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
10992
10993 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
10994
10995         * support/regression/generate-cases.py: place generated file in given sub directory
10996         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
10997         * support/regression/Makefile: improvements for 'make -j';
10998         side effect: it's simpler and faster now
10999
11000 2003-03-31  Borut Razem <borut.razem AT siol.net>
11001
11002         * src/z80/main.c: link-{port} and as-{port} defined without path
11003         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
11004
11005 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
11006
11007         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
11008
11009 2003-03-30  Borut Razem <borut.razem AT siol.net>
11010
11011         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
11012           changed type of list parameter to set
11013         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
11014         * src/port.h: changed type of do_assemble() parameter to set
11015         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
11016           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
11017           definition of "cppoutfilename" macro with NULL value in preProcess()
11018         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
11019         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
11020         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
11021           replaced with set *binPathSet
11022         * shash_add() deallocates the item, if allready exsists, before adding the new one
11023         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
11024
11025 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
11026
11027         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
11028           a nested for loop bug in the PIC port
11029         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
11030           for loops
11031
11032 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
11033
11034         * support/Util/dbuf.h: remove C++ stuff to make it portable
11035
11036 2003-03-28  Borut Razem <borut.razem AT siol.net>
11037
11038         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
11039           literal strings in stringLiteral()
11040         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
11041         * src/Makefile.bcc, src/Makefile.in, src/src.dsp: added support/Util/dbuf.c
11042           to the project
11043
11044 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
11045
11046         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
11047
11048 2003-03-26    <johan AT balder>
11049
11050         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
11051         * src/ds390/gen.c (saveRegisters): catched symbol abuse
11052         * src/SDCCast.c (decorateType): fixed " -v < 3"
11053
11054 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
11055
11056         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
11057         Added Lenny Story's debug infrastructure changes:
11058         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
11059         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
11060         * src/cdbFile.c: added
11061         * src/SDCCdebug.c: added
11062         * src/SDCCdebug.h: added
11063         * src/SDCCast.c (createFunction)
11064         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
11065         * src/SDCCmain.c (parseCmdLine, main)
11066         * src/SDCCmem.c (redoStackOffsets)
11067         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
11068         * src/SDCCsymt.h
11069         * src/common.h
11070         * src/avr/gen.c (genAVRCode)
11071         * src/ds390/gen.c (gen390Code)
11072         * src/mcs51/gen.c (gen51Code)
11073         * src/pic/gen.c (genpic14Code)
11074         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
11075         * src/xa51/gen.c (genXA51Code)
11076         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
11077
11078 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11079
11080         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
11081         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
11082
11083 2003-03-22    <johan AT balder>
11084
11085         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
11086
11087 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
11088
11089         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
11090         * doc/cdbfileformat.lyx: added, written by Lenny Story
11091         * doc/Makefile: added cdbfileformat.lyx
11092         * doc/clean.mk: added cdbfileformat.lyx
11093
11094 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
11095
11096         * src/mcs51/peeph.def: fix bug #705773
11097
11098 2003-03-20    <johan AT balder>
11099
11100         An sfr/sbit can have an "at #" AND an initializer
11101         * src/SDCCsymt.c (checkSClass):
11102         * src/SDCCmem.c (allocGlobal):
11103         * src/SDCCmem.c (allocLocal):
11104         * src/SDCCast.c (createBlock):
11105
11106 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
11107
11108         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
11109
11110 2003-03-16    <johan AT balder>
11111
11112         Undid the hackup of const and volatile, the problem is much bigger
11113         * src/SDCC.y:1.65
11114         * src/SDCCast.c:1.171
11115         * src/SDCCglue.c:1.138
11116         * src/SDCCicode.c:1.146
11117         * src/SDCCsymt.c:1.150
11118         * src/SDCCval.c:1.65
11119
11120 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
11121
11122         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
11123         * src/ds390/gen.c (genAddrOf): fixed bug #704087
11124
11125 2003-03-13    <johan AT balder>
11126
11127         Hackup const and volatile modifiers in type chains a bit:
11128         * src/SDCC.y:1.63
11129         * src/SDCCast.c:1.169
11130         * src/SDCCglue.c:1.136
11131         * src/SDCCicode.c:1.143
11132         * src/SDCCsymt.c1.146
11133         * src/SDCCsymt.h1.59
11134         * src/SDCCval.c:1.63
11135
11136 2003-03-12    <johan AT balder>
11137
11138         * src/SDCCBBlock.h: more LRH debugging junk
11139         * src/SDCCcflow.h: more LRH debugging junk
11140         * src/SDCCloop.c: more LRH debugging junk
11141         * src/SDCC.y (struct_declaration): fixed bug #697590
11142         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
11143         * src/ds390/gen.c (aopForRemat): fixed bug #700031
11144         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
11145
11146 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
11147         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
11148         test function names must now match exactly).
11149         * src/SDCCcse.c: added special case in findCheaperOp to allow
11150         extending a short integer. Makes less awful code for bug 700121 test case.
11151
11152 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11153
11154         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
11155         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
11156
11157 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
11158
11159         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
11160         actually called (operandsNotEqual() was called for all
11161         operandsNotEqualX tests).
11162
11163 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
11164
11165         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
11166         with shorter literals. Fixes bug 700121.
11167
11168 2003-03-11    <johan AT balder>
11169
11170         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
11171
11172 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
11173
11174         * src/SDCCloop.c (mergeRegions): an evil beast is dead
11175         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
11176
11177 2003-03-10  Borut Razem <borut.razem AT siol.net>
11178
11179         * src/SDCCmain.c: pipe preprocessor's output
11180         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
11181         * sdcc_vc_in.h: define pclose as _pclose for WIN32
11182         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
11183         which closes all pipes in pipeSet set
11184         * src/SDCCset.c: free deleted item in function deleteSetItem()
11185         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
11186         moved from z80 to src subproject
11187         * .version: increased version number to 2.3.4
11188
11189 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
11190
11191         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
11192         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
11193         * support/regression/ports/xa51/spec.mk: fix typo
11194
11195 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
11196
11197         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
11198
11199 2003-03-09  Borut Razem <borut.razem AT siol.net>
11200
11201         * src/SDCCmain.c: pipe preprocessor's output
11202         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
11203         * sdcc_vc_in.h: define pclose as _pclose for WIN32
11204         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
11205         which closes all pipes in pipeSet set
11206         * src/SDCCset.c: free deleted item in function deleteSetItem()
11207         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
11208         moved from z80 to src subproject
11209
11210 2003-03-09  Borut Razem <borut.razem AT siol.net>
11211
11212         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
11213         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
11214         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
11215         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
11216         * src/SDCCglobl.h: unification of WIN32 native definitions
11217
11218 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11219
11220         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
11221
11222 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
11223
11224         * src/configure.in:   check for endianess (even while cross-compiling)
11225         * src/configure:      check for endianess (even while cross-compiling)
11226         * src/configure_in.h: check for endianess (even while cross-compiling)
11227         * src/avr/gen.c:        remove old endianess stuff
11228         * src/mcs51/gen.c:      remove old endianess stuff
11229         * src/ds390/gen.c:      remove old endianess stuff
11230         * src/pic/gen.c:        remove old endianess stuff
11231         * src/pic/genarith.c:   remove old endianess stuff
11232         * src/pic/glue.c:       fix endianess check
11233         * src/pic16/gen.c:      remove old endianess stuff
11234         * src/pic16/genarith.c: remove old endianess stuff
11235         * src/pic16/glue.c:     fix endianess check
11236         * src/xa51/gen.c:       remove old endianess stuff
11237         * src/z80/gen.c:        fix endianess check
11238         * src/SDCCglue.c:       fix endianess check
11239         * src/ds390/peeph.def: fix bug 700036
11240
11241 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
11242
11243         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
11244         * src/configure: find appropriate data-types on host for SDCC's int and long
11245         * src/configure.in: find appropriate data-types on host for SDCC's int and long
11246         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
11247         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
11248
11249 2003-03-07    <johan AT balder>
11250
11251         Just a big NOOP:
11252                 some minor cleanups before the big shot
11253                 OP_DEFS and OP_USES now use Kevin's protection
11254                 new option --nolabelopt
11255
11256         * src/SDCCBBlock.c:
11257         * src/SDCCast.c,:
11258         * src/SDCCcflow.c:
11259         * src/SDCCcse.c:
11260         * src/SDCCicode.c:
11261         * src/SDCCicode.h:
11262         * src/SDCClabel.c:
11263         * src/SDCCloop.c:
11264         * src/SDCCmain.c:
11265         * src/ds390/ralloc.c:
11266         * src/mcs51/ralloc.c:
11267         * src/pic/ralloc.c:
11268         * src/xa51/ralloc.c:
11269         * src/z80/ralloc.c:
11270
11271 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
11272
11273         * src/pic/pcode.c (get_op): fix 64 bit warnings
11274         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
11275         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
11276         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
11277         * support/regression/tests/malloc.c: fix 64 bit warnings
11278
11279 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
11280
11281         * src/mcs51/gen.c (genMinus): fixed bug 696436
11282
11283 2003-03-02  Borut Razem <borut.razem AT siol.net>
11284
11285         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
11286
11287 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
11288
11289         * configure.in: test for mkstemp
11290         * sdccconf_in.h: add HAVE_MKSTEMP
11291
11292 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
11293
11294         * device/include/ctype.h: removed warning while using --stack-auto
11295         * device/include/malloc.h: removed warning while using --stack-auto
11296         * device/include/string.h: removed warning while using --stack-auto
11297
11298 2003-02-23  Borut Razem <borut.razem AT siol.net>
11299
11300         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
11301         because NDEBUG is defined (see man assert)
11302         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
11303
11304 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11305
11306         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
11307         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
11308
11309 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
11310
11311         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
11312         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
11313
11314 2003-02-18    <johan AT balder>
11315
11316         * as/mcs51/asmain.c (asmbl): module can start with a digit
11317         * as/z80/asmain.c (asmbl): module can start with a digit
11318
11319 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
11320
11321         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
11322         * src/asm.c: fix pipe() for Mingw32
11323
11324 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
11325
11326         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
11327         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
11328         make -V work again; --c1mode reads now from stdin
11329         * doc/sdccman.lyx: added --c1mode
11330         * support/Util/SDCCerr.c: new messages for c1 mode
11331         * support/Util/SDCCerr.h: new messages for c1 mode
11332         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
11333
11334 2003-02-15    <johan AT balder>
11335
11336         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
11337
11338 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
11339
11340         * doc/sdccman.lyx: Environment variables, -o and other minor things
11341
11342 2003-02-14    <johan AT balder>
11343
11344         * src/xa51/main.c: before anyone really tries to use it :)
11345
11346         * Install doc's in share/sdcc/doc
11347         * removed some obsolete files
11348         * Do a proper make distclean and uninstall
11349         M Makefile.common.in
11350         R sdccbuild.sh
11351         M as/Makefile
11352         M device/include/Makefile.in
11353         M device/lib/Makefile.in
11354         M doc/sdccman.lyx
11355         M link/Makefile
11356         M sim/ucsim/doc/Makefile.in
11357         M src/clean.mk
11358         R src/avr/peeph.rul
11359         R src/xa51/peeph.rul
11360         M support/cpp2/Makefile.in
11361         M support/makebin/Makefile
11362
11363
11364 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
11365
11366         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
11367
11368 2003-02-10  Borut Razem <borut.razem AT siol.net>
11369
11370         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
11371         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
11372         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
11373         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
11374         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
11375         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
11376         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
11377         src/z80/Makefile.bcc: Borland Makefile cleanup
11378         * as/z80/Makefile.bcc: Added Borland Makefile
11379         * support/cpp2/borland.h: Removed
11380
11381 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
11382
11383         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
11384         * src/SDCC.lex: new pragma NOIV
11385         * src/SDCCglobl.h: new pragma NOIV
11386         * src/SDCCmem.c: new pragma NOIV
11387
11388 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
11389
11390         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
11391
11392 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
11393
11394         * src/SDCCmain.c: signal handling is switched off by --debug
11395         * doc/Makefile: small fix for install; use clean.mk again
11396         * doc/clean.mk: clean *.pdf and *.html too
11397
11398 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
11399
11400         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
11401         * device/lib/printfl.c: fix a ds390 bug by making it portable
11402         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
11403         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
11404         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
11405         * debugger/mcs51/cmd.c: converted multi-line string literals
11406         * sim/ucsim/globals.cc: converted multi-line string literals
11407         * src/SDCCmain.c: introduced signal handler to remove temp files
11408         * doc/Makefile: small tweaks, implement clean
11409         * doc: removed generated files
11410
11411 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11412
11413         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
11414         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
11415         Address Record is not correctly generated for DS390."
11416
11417 2003-02-02  Borut Razem <borut.razem AT siol.net>
11418
11419         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
11420         * as/mcs51/asm.h: fixed compilation with Borland C
11421         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
11422         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
11423         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
11424         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
11425         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
11426         src/z80/Makefile.bcc: delete $(LIB) only if exist
11427         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
11428
11429 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
11430
11431         * device/include/malloc.h: introduced NULL
11432         * device/include/string.h: introduced NULL
11433         * device/include/stdlib.h: introduced NULL
11434         * device/lib/_memcpy.c: removed NULL
11435         * device/lib/_strcat.c: removed NULL
11436         * device/lib/_strchr.c: removed NULL
11437         * device/lib/_strcmp.c: removed NULL
11438         * device/lib/_strcpy.c: removed NULL
11439         * device/lib/_strcspn.c: removed NULL
11440         * device/lib/_strlen.c: removed NULL
11441         * device/lib/_strncat.c: removed NULL
11442         * device/lib/_strncmp.c: removed NULL
11443         * device/lib/_strncpy.c: removed NULL
11444         * device/lib/_strpbrk.c: removed NULL
11445         * device/lib/_strrchr.c: removed NULL
11446         * device/lib/_strspn.c: removed NULL
11447         * device/lib/_strstr.c: removed NULL
11448         * device/lib/_strtok.c: removed NULL
11449         * device/lib/malloc.c: removed NULL, include own header
11450
11451 2003-02-02    <johan AT balder>
11452
11453         * 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
11454         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
11455         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
11456         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
11457         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
11458         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
11459
11460 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11461
11462         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
11463         area 'DATA'"
11464
11465 2003-02-01    <johan AT balder>
11466
11467         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
11468
11469 2003-01-31    <johan AT CP255758-A>
11470
11471         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
11472
11473 2003-01-30    <johan AT balder>
11474
11475         * src/SDCCBBlock.c: automatic bug detection
11476         * src/SDCCicode.c: automatic bug detection
11477
11478 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11479
11480         * src/SDCCglobl.h:   now --xram-size 0 works
11481         * src/SDCCmain.c:    now --xram-size 0 works
11482
11483 2003-01-29    <johan AT balder>
11484
11485         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
11486
11487 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11488
11489         * as/mcs51/aslink.h: Added options --xram-size and --code-size
11490         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
11491         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
11492         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
11493         * src/SDCCglobl.h:   Added options --xram-size and --code-size
11494         * src/SDCCmain.c:    Added options --xram-size and --code-size
11495
11496 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
11497
11498         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
11499         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
11500
11501 2003-01-27    <johan AT balder>
11502
11503         * src/SDCC.y: fixed bug #613764
11504
11505 2003-01-26    <johan AT balder>
11506
11507         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
11508         * src/SDCCsymt.h: fixed bug #673374
11509         * src/SDCCglue.c: fixed bug #661910
11510         * src/SDCCast.c: fixed bug #458099 and 673374
11511
11512 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
11513
11514         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
11515         * as/mcs51/strcmpi.h: added
11516         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
11517         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
11518         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
11519         * as/mcs51/assym.c: strcmpi -> as_strcmpi
11520         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
11521         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
11522         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
11523         * as/mcs51/Makefile.aslink: new module strcmpi
11524         * as/mcs51/Makefile.asx8051: new module strcmpi
11525         * as/mcs51/Makefil.bcc: new module strcmpi
11526         * as/mcs51/Makefile.in: new module strcmpi
11527         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
11528
11529 2003-01-26    <johan AT balder>
11530
11531         * src/SDCCglue.c: reverted back to 1.124
11532         * src/SDCCast.c: reverted back to 1.156
11533         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
11534
11535 2003-01-25    <johan AT balder>
11536
11537         * src/SDCCglue.c: A better fix for bug #661910
11538         * src/SDCCast.c: A better fix for bug #661910
11539         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
11540
11541 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11542
11543         * src/Makefile.in: remove spawn.o
11544         * src/SDCCmain.c: remove spawn.h
11545         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
11546         * src/spawn.c: removed
11547         * src/spawn.h: removed
11548         * support/regression/ports/ds390/spec.mk: link with -r
11549
11550 2003-01-24    <johan AT CP255758-A>
11551
11552         * src/ds390/gen.c (aopOp): fixed bug #667458
11553         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
11554         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
11555         (createIvalCharPtr): an ival doesn't always have a storage class anymore
11556
11557 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
11558
11559         * src/mcs51/peeph.def: better assembler identation by Frieder
11560         * src/mcs51/gen.c: better assembler identation by Frieder
11561
11562 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
11563
11564         * as/z80/string.h: removed for gcc 3.2
11565         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
11566         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
11567
11568 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11569
11570         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
11571         * src/SDCCpeeph.c (replaceRule): fix bug #663503
11572         * support/regression/Makefile: separate temp files for ports
11573         * support/regression/generate-cases.py: separate temp files for ports
11574         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11575         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
11576
11577 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
11578
11579         * moved tinitalk to device/examples/ds390
11580
11581 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
11582
11583         * as/mcs51/lkmem.c: rflag is for DS390
11584         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
11585         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
11586                          (linkEdit): move mem- and map-files the same way as ihx-files
11587         * src/z80/main.c (_setDefaultOptions): removed --generic
11588         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
11589         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
11590         * src/pic/glue.c (picglue): --c1mode works again
11591         * src/pic16/glue.c (pic16glue): --c1mode works again
11592         * src/asm.c (printCLine): fix #660034
11593
11594 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
11595
11596         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
11597         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
11598         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
11599         * as/mcs51/lkmem (summary): better fix for sp problem
11600         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
11601         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
11602         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
11603                                               remove --stack-after-data
11604
11605 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
11606
11607         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
11608         * src/SDCCutil.c (join): ugly bug: missing '\0'
11609         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
11610
11611 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11612
11613         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
11614         * src/port.h: typo
11615         * src/pic/main.c (_asmCmd): gpasm supports -o
11616         * src/z80/main.c: more general macros
11617         * device/lib/Makefile.in: remove intermediate files
11618
11619 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
11620
11621         * .version: Bumped version number to 2.3.3
11622         * src/SDCCBBlock.c: new option -o
11623         * src/SDCCglobl.h: new option -o
11624         * src/SDCCglue.c: new option -o
11625         * src/SDCCmain.c: new option -o
11626         * src/asm.c: new option -o
11627         * src/ds390/main.c: new option -o
11628         * src/pic/glue.c: new option -o
11629         * src/pic/pcode.c: new option -o
11630         * src/pic/ralloc.c: new option -o
11631         * src/pic16/glue.c: new option -o
11632         * src/pic16/pcode.c: new option -o
11633         * src/pic16/ralloc.c: new option -o
11634         * src/z80/main.c: new option -o
11635         * device/lib/Makefile.in: use -o
11636         * support/regression/ports/ds390/spec.mk: use -o
11637         * support/regression/ports/gbz80/spec.mk: use -o
11638         * support/regression/ports/mcs51/spec.mk: use -o
11639         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
11640         * support/regression/ports/z80/spec.mk: use -o
11641         * support/regression/ports/ucz80/spec.mk: use -o
11642         * support/regression/ports/xa51/spec.mk: use -o
11643         * support/regression/fwk/lib/timeout.c: fix usage string
11644
11645 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
11646         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
11647
11648 2003-01-07    <johan AT balder>
11649
11650         * src/SDCCast.c (decorateType): fixed bug #600035
11651
11652 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
11653         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
11654         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
11655         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
11656         * src/pic/pcode.c: outcommented unused variable to remove warnings
11657         * src/pic/ralloc.c: outcommented unused variable to remove warnings
11658
11659 2003-01-06    <karl AT turbobit.com>
11660         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
11661    regression tests.
11662
11663 2003-01-06    <johan AT balder>
11664
11665         * src/SDCCicode.c: fixed array add
11666
11667 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
11668         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
11669         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
11670
11671 2003-01-04    <johan AT balder>
11672
11673         * src/SDCCval.c (getNelements): fixed the initialized array of structures
11674
11675 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11676         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
11677
11678 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11679         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
11680         * support/regression/tests/bug-524697.c: fit mem usage into 8032
11681
11682 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
11683         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
11684
11685 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
11686         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
11687
11688 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
11689         * src/mcs51/main.c: removed {bindir}{sep} from aslink
11690
11691 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11692
11693     * in /sdcc/as/mcs51/ changed these files in order to create an
11694     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
11695     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
11696     following files to include the previous two files: aslink.dsp,
11697     Makefile.aslink, Makefile.bcc, and Makefile.in.
11698
11699     * Changed /sdcc/src/SDCCmain.c so it creates files with extension
11700     .adb instead of .cdb
11701
11702 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11703
11704         * /sdcc/as/mcs51/lklist.c: Now reports memory usage using the
11705         value from option --iram-size.
11706
11707 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11708
11709         * /sdcc/as/mcs51/lklist.c: added boundary check before using
11710         dram[] array.
11711
11712 2002-09-18    <wiml AT hhhh.org>
11713
11714         * SDCClrange.h: exposed setFromRange() and setToRange()
11715         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
11716           packRegsForAccUse() (bug 542397)
11717         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
11718           multiple times and emitting the fetch operations more than once
11719           added aopGetUsesAcc() function to allow binary operators to
11720           fetch their operands in the correct order; made genMinus() emit
11721           compact code for X = LITERAL - Y
11722
11723 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11724         * /sdcc/as/mcs51/lklist.c: Fixed incorrect number of parameters to
11725         sprintf() in line 1267.
11726
11727 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11728         * /sdcc/src/SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
11729         like ports.
11730
11731 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
11732         Changes to aslink (All the changes are marked with 'JCF'):
11733
11734         * /sdcc/as/mcs51/aslink.h: External definition of sflag and
11735         summary().
11736
11737         * /sdcc/as/mcs51/lkarea.c: Computes the size of area BSEG_BYTES from
11738         area BSEG.  Also moves, if possible, the DATA area down into the internal
11739         ram so more space is available.
11740
11741         * /sdcc/as/mcs51/lkdata.c: Definition of memory summary output flag
11742         sflag.
11743
11744         * /sdcc/as/mcs51/lklist.c: For the BSEG area report the size in bits,
11745         not bytes.  Function summary() which creates a memory usage summary
11746         file with extension .mem.  Reports of overlaping stack and small stack
11747         size.  If the space for the stack is less than 16 bytes aslink trows a
11748         warning.
11749
11750         * /sdcc/as/mcs51/lkmain.c: Creation of some of the default areas for
11751         the 8051.  Option 'y' for memory summary output file.
11752
11753         Changes to sdcc (All the changes are marked with 'JCF'):
11754
11755         * /sdcc/src/SDCCglobl.h: External definition of RegBankUsed[4].
11756
11757         * /sdcc/src/SDCCglue.c:  If a register bank is used, creates an
11758         overlaying area for it (uses RegBankUsed[4]).
11759
11760         * /sdcc/src/SDCCmain.c: Definition RegBankUsed[4]; marks register
11761         bank zero as used by default.  By default aslink locates the stack
11762         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
11763         the creation of the .mem file.  Delegates the allocation of data area
11764         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
11765         the begining of the stack area to aslink.
11766
11767         * /sdcc/src/SDCCmem.c:  If a register bank is used, marks it so
11768         glue() in SDCCglue.c creates an area for it.
11769
11770 2002-09-03  Borut Razem <borut.razem AT siol.net>
11771         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
11772         sdcc/src/pic/glue.c:
11773         introduced atexit() handler for teporay files removal in case of
11774         errors, assertions, ...
11775
11776 2002-08-29  Borut Razem <borut.razem AT siol.net>
11777         * sdcc/support/cpp2/auto-host_vc_in.h:
11778         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
11779         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
11780         Maybe there is a similar problem with BORLANDC? It should be checked!
11781
11782         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
11783         corrected improper use of assert: the assignment to clr variable was done inside the assert.
11784         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
11785         was not executed, and the compiler (cl) launched a warning:
11786         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
11787
11788 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
11789         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
11790
11791 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
11792         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
11793
11794         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11795           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
11796           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
11797           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11798           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
11799           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
11800           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
11801         - added Release configuration in VS projects
11802         - review of compiler an linker options
11803         - VC .exe files are generated in bin_vc directory, not to interfere
11804           with binaries generated from other projects (cygwin, mingw, bcc ...)
11805
11806         * sdcc/src/yacc.dsp: added
11807
11808         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
11809         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
11810         and insert the version number definitions from .version
11811
11812         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
11813
11814         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
11815         added - genarate auto-host.h using auto-host_vc_in.h as template
11816
11817         * sdcc/sdcc_vc.h,
11818         removed from CVS, generated automatically
11819
11820 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
11821         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
11822
11823 2002-08-11  Borut Razem <borut.razem AT siol.net>
11824         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
11825
11826 2002-08-10  Borut Razem <borut.razem AT siol.net>
11827         * src/SDCCmain.c (main):
11828         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
11829         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
11830         The consequence was that some temporary files were not removed.
11831
11832         * src/SDCCglue.c:
11833         unification of code in functions tempfilename() and tempfile():
11834         function tempnam() is defined in Visual Studio 6.0 and .NET
11835
11836         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
11837
11838         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
11839           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
11840         - removed compiler command line option /WX: Treats all warnings as errors
11841         - update a list of source files, included into the project
11842
11843         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
11844           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
11845         changed project type to Generic Project so that can be correcly converted to VS.NET project
11846
11847         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
11848
11849         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
11850
11851         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
11852
11853         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
11854         added return 0 statements after assert() to make compiler happy
11855
11856         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
11857         added newline in the def file to keep MSC compiler satisfied
11858
11859         * sdcc/src/z80/gen.c:
11860         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
11861           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
11862         - solved MSC error in function aopDump()
11863
11864         * sdcc_vc.h: define PREFIX as "\\sdcc"
11865
11866 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
11867         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
11868
11869 2002-06-22  Scott Dattalo <scott AT dattalo.com>
11870         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
11871         - Rewrote the register banking algorithm.
11872         - Added pCode live-range analysis to registers (for now, only non-used and
11873         singly-used registers optimized away)
11874
11875         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
11876
11877         * 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.
11878
11879 2002-05-10  Scott Dattalo <scott AT dattalo.com>
11880         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
11881
11882 2002-04-22  Michael Hope  <michaelh AT vroom>
11883
11884         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
11885
11886         * configure.in (DD_COPT): Added include support required for gbdk.
11887
11888         * .version: Bumped version number just to increase it.
11889
11890         * src/SDCCmain.c: Added -nostdinc to the default options.
11891
11892 2002-04-15  Michael Hope  <michaelh AT vroom>
11893
11894         * device/lib/z80/printf.c (sprintf): Added.
11895
11896         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
11897
11898         * src/z80/peeph.def: Added transpose redundent load rule.
11899
11900         * src/z80/main.c: Added force callee saves for jaune.
11901
11902         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
11903
11904         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
11905
11906 2002-03-28  Johan Knol  <johan AT balder>
11907
11908         * src/SDCCval.c: fixed bug #532436
11909
11910 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11911         * /src/port.h:
11912         Added "char *Processor" field to the port structure.
11913
11914         * /src/SDCCmain.c:
11915         Added -p option. Allows port dependent processor to be specified.
11916
11917         * all ports:
11918         Initialized the new field char *Processor field to NULL in all ports
11919
11920         * /src/pic/*:
11921         Compiler generated registers for interrupt context saving
11922         were not getting allocated.
11923
11924 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
11925
11926         * /src/SDCCast.c:
11927         Fixed left shift. Will promote the left side of a left shift
11928         if a) left shifting more than size of operand or b) when assigned
11929         to something size > size of left side
11930
11931 2002-03-14  Scott Dattalo <scott AT dattalo.com>
11932         * src/pic/*
11933         tons of changes. Register allocation has been
11934         rewritten. Added customization for the various PICs. Flow
11935         analysis is restructured. ...
11936
11937         * src/pic/device.h:
11938         Added
11939
11940         * src/pic/device.c:
11941         Added. device.c is a PIC port hack to accomodate variations
11942         in PIC devices.
11943
11944 2002-03-13  Michael Hope  <michaelh AT vroom>
11945
11946         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
11947
11948 2002-03-04  johanknol  <johanknol AT manik>
11949
11950         * /src/SDCCval.c: fixed
11951
11952         const unsigned char arr[][2] = { { 0, 1 } };
11953         t18.c:1: error: Initializer element is not constant
11954
11955 2002-03-04  bela  <bela AT manik>
11956
11957         * /device/include/mcs51reg.h:
11958         ds89c420 register definition update
11959
11960 2002-03-03    <johan AT FRIJA>
11961
11962         * support/Util/SDCCerr.c: did something, but don't no why anymore
11963
11964         * support/regression/tests/bug-524691.c: made it a little less shy
11965
11966         * src/SDCCast.c (decorateType): fixed bug #524697
11967
11968         * src/SDCCast.c: made some lineno improvements
11969
11970         * src/SDCCval.c (getNelements): changed warning to error
11971
11972         * src/SDCCglue.c (printIvalArray): changed warning to error
11973
11974         * src/SDCCicode.c: fixed a warning for mingw
11975
11976         * src/SDCCast.c (decorateType): fixed the << promotion for ops
11977
11978         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
11979
11980 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
11981
11982         * src/ds390/peeph.def:
11983         Added some more peephole rules
11984
11985         * src/ds390/gen.c: Various fixes & enhancements
11986
11987         * src/SDCClrange.c, src/SDCClrange.h:
11988         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
11989
11990         * src/ds390/ralloc.c:
11991         various fixes & enhancements (ds390) specific
11992
11993         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
11994         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
11995         from rallocs.
11996
11997         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
11998
11999 2002-03-02    <johan AT FRIJA>
12000
12001         * src/SDCCast.c (decorateType): fixed bug #524708
12002
12003         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
12004
12005         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
12006
12007 2002-03-01  Michael Hope  <michaelh AT vroom>
12008
12009         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
12010
12011         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
12012
12013 2002-03-01    <johan AT FRIJA>
12014
12015         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
12016
12017         * src/SDCCast.c (decorateType): fixed bug #524209
12018
12019         * src/SDCCval.c (valNot): fixed bug #524195
12020
12021 2002-02-26    <johan AT balder>
12022
12023         * src/xa51/gen.c: fixed a warning
12024
12025         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
12026
12027         * src/SDCCast.c (decorateType): fixed bug #522534
12028
12029 2002-02-23    <johan AT balder>
12030
12031         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
12032
12033 2002-02-22    <johan AT balder>
12034
12035         * src/SDCCast.c: fixed bug #514865
12036
12037         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
12038
12039 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
12040
12041         * sdcc/src/SDCCloop.c:
12042         Previous fix was not good. basic blocks that have "break" or "return" are
12043         not really partof a loop , but live ranges used in these blocks should
12044         be live thru the entire loop, so set partOfLoop but don't add them to
12045         loop region
12046
12047 2002-02-21    <johan AT FRIJA>
12048
12049         * src/SDCCcse.c: fixed bug #514308
12050
12051 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
12052
12053         * src/SDCCloop.c:
12054         Fixed BUG #519583. If a conditional block ended in a return/break
12055         statement inside a loop, it was not being considered part of the loop.
12056
12057         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
12058
12059 2002-02-10  Karl Bongers <karl AT turbobit.com>
12060
12061         * debugger/*:
12062         Fixed up SDCDB debugger somewhat.  Updated debugger/README
12063         with lots of comments and notes.
12064
12065         * device/examples/test2.c:
12066         Fix bug, "red" variable not being initialized(compiler complained).
12067
12068         * device/examples/Makefile, examples/test3.c:
12069         Add Makefile in device/examples folder, compiles test3.c
12070         for use as a multiple module SDCDB test case.
12071
12072         * sim/ucsim/cmd.src/cmdset.cc:
12073         Took out debug printfs in ucsim "next" command.
12074
12075         * sim/ucsim/xa.src:
12076         Karl and Johan start ucsim XA support.  Most dissassembly working,
12077         about 75% emulation done(plenty of work remaining).
12078
12079         * sim/ucsim/z80.src:
12080         Add Z80 support to ucsim, add test-ucz80 regression test,
12081         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
12082         Notice z80 compiler fails on examples/test3.c/crc code.
12083
12084 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
12085
12086         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
12087         Added support for --parms-in-bank1
12088
12089         * src/ds390/peeph.def:
12090         added a few more peephole optimzations
12091
12092         * src/ds390/main.c:
12093         1) added __builtin_inp & __builtin_outp used to read in data of given length
12094            from a memory mapped port
12095         2) added __builtin_memcmp
12096         3) added __builtin_swapw swap bytes of a short
12097
12098         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
12099         1) handle multiple send & receives from register bank1
12100         2) ralloc can now allocate DPTR1 to some liveRanges
12101
12102         * src/SDCCsymt.c, src/SDCCsymt.h:
12103         changes to handle multiple sends & receives
12104
12105         * src/SDCCptropt.h:
12106         added some pointer arithmetic optimization
12107
12108         * src/SDCCptropt.c:
12109         added some pointer arithmetic optimizations but not stable yet so not
12110         called from anywhere (will get this working shortly)
12111
12112         * src/SDCCopt.c: fixed for multiple sends & receives
12113
12114         * src/SDCCmain.c:
12115         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
12116         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
12117            set preprocessor defines (depending on options)
12118
12119         * src/SDCCicode.c, src/SDCCicode.h:
12120         changes made to handle multiple sends & receives
12121
12122         * src/SDCCglobl.h:
12123         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
12124
12125         * src/SDCCcse.c, src/SDCCcse.h:
12126         added function findbackward def (to be used in upcoming optimization)
12127
12128         * src/SDCCcflow.c, src/SDCCcflow.h:
12129         added function returnAtEnd - to determine if a basic block terminates with
12130         a RETURN iCode
12131
12132         * src/SDCCast.c, src/SDCCast.h:
12133         added option parms-in-bank1
12134
12135         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
12136         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
12137         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
12138         adjusted for --parms-in-bank1 option
12139
12140         * device/include/string.h:
12141         donot redefine "reentrant" keyword
12142
12143         * device/include/ds80c390.h: Added some more SFRs
12144
12145 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
12146
12147         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
12148
12149 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
12150
12151         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
12152
12153 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
12154
12155         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
12156
12157 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
12158
12159         * Added --xram-movc option
12160
12161 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
12162
12163         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
12164
12165 2002-01-11  Johan Knol
12166
12167         * Added math lib of Jesus Calvino-Fraga
12168
12169 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
12170
12171         * src/SDCCmain.c (processFile): fix processing of ../../src.c
12172         * support/regression/Makefile: new target test-mcs51-stack-auto
12173         * support/regression/ports/mcs51-stack-auto/spec.mk: added
12174
12175 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
12176
12177         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
12178
12179 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
12180
12181         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
12182
12183 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
12184
12185         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
12186
12187         * src/SDCCglue.h: add definition for printIvalChar()
12188
12189 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
12190
12191         * src/SDCCast.c: fix #498138 by Johan
12192
12193         * src/SDCCglue.c: fix #498138 by Johan
12194
12195 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
12196
12197         * support/regression/Makefile: fix clean
12198
12199         * support/regression/ports/ds390/support.c: fix transmission of last character
12200
12201 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
12202
12203         * /sdcc/src/ds390/gen.c:
12204         a) improved computing address of stack variable
12205         b) took out some #if 0 code
12206         c) improved parmBytes adjustment
12207         d) improved genPlusIncr & genMinusIncr
12208         e) genCmp could generate bad code (when left assigned to DPTR)
12209         f) Fixed bug in hasInc
12210
12211         * /sdcc/src/ds390/ralloc.c:
12212         a) packRegsForSupport could mess up live information (Fixed)
12213         b) packRegsDPTRuse could be incorrect for left & right shift
12214
12215         * /sdcc/src/mcs51/ralloc.c:
12216         packRegsForSupport could mess up the live information (Fixed)
12217
12218         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
12219
12220         * /sdcc/src/SDCCast.c:
12221         can reverse a loop even if function call is present as long
12222         as the loop control variable is local & is not passed as parameter
12223
12224 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
12225
12226         * /sdcc/ChangeLog: *** empty log message ***
12227
12228         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
12229         More builtin function additions for TININative
12230
12231         * /sdcc/src/ds390/ralloc.c:
12232         Had broken the regression testsuite
12233
12234         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
12235
12236         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
12237         Added funcattr hasStackParms will be set for reentrant functions when there
12238         are paramteres on the stack, this helps in minimizing frame pointer generation
12239         typeFromStr can handle function pointers now
12240
12241         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
12242         *** empty log message ***
12243
12244 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
12245
12246         * /src/ds390/gen.c, /src/ds390/main.c:
12247         More builtin function additions for TININative
12248
12249         * /src/ds390/ralloc.c:
12250         Had broken the regression testsuite
12251
12252         * /src/SDCCast.c: Fixed a bug in dumptree
12253
12254         * /src/SDCCsymt.c, /src/SDCCsymt.h:
12255         Added funcattr hasStackParms will be set for reentrant functions when there
12256         are paramteres on the stack, this helps in minimizing frame pointer generation
12257         typeFromStr can handle function pointers now
12258
12259         * /doc/builtins.txt, /doc/TININative.txt:
12260         *** empty log message ***
12261
12262
12263 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
12264
12265         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
12266         ALPHA version for -mTININative
12267
12268         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
12269         updated to reflect changes in the port structure
12270
12271         * /src/port.h:
12272         added function do_assemble (similar to do_link) if non-null this function
12273         will be called to do assembly (-mTININative) requires a multi command
12274         assembly
12275         added function genAssemblerEnd will be called to generate assembler Epilogue
12276
12277         * /src/SDCCsymt.c:
12278         added _JavaNative to debug info printing
12279
12280         * /src/SDCCmain.c: added option --tini-libid
12281         added port->do_assemble function (-mTININative) has a multi command assemble
12282
12283         * /src/SDCCglue.c: Disabled "constExpr" check
12284         added port->genAssemblerEnd function
12285
12286         * /src/SDCCglobl.h: Added option --tini-libid value
12287
12288         * /src/SDCCast.h:
12289         tookout optimizeCompare from the header (has no external references)
12290
12291         * /src/SDCCast.c: made one more function "static"
12292
12293 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
12294
12295         * src/z80/mappings.i: Added z80asm support.
12296
12297         * src/z80/main.c: Added z80asm support on --asm=z80asm
12298
12299         * src/z80/gen.c: Fixed asm portability issues.
12300
12301         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
12302
12303         * src/SDCCglue.c (printExterns): Added global/extern split.
12304
12305 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
12306
12307         * support/regression/Makefile: added test for mcs51 model large
12308
12309         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
12310
12311         * support/regression/ports/gbz80/spec.mk: added -mgbz80
12312
12313 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
12314
12315         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
12316
12317 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
12318
12319         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
12320
12321         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
12322
12323 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
12324
12325         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
12326
12327         * support/regression/tests/simplefloat.c: Port to mcs51.
12328
12329 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
12330         * support/regression/tests/bug-485362.c: Added.
12331
12332         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
12333
12334         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
12335
12336         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
12337
12338         * src/z80/gen.c (aopDump): Added a dump function.
12339
12340 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
12341         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
12342
12343         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
12344
12345         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
12346
12347         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
12348
12349         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
12350
12351         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
12352
12353         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
12354
12355         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
12356
12357         * support/regression/ports/ds390/support.c: Use tinibios.
12358
12359         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
12360
12361 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
12362
12363         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
12364         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
12365
12366         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
12367
12368         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
12369
12370 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
12371
12372         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
12373
12374         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
12375         (packRegsForIYUse): Created and optimised.
12376
12377 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
12378
12379         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
12380 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
12381
12382         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
12383
12384         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
12385
12386         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
12387
12388 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
12389
12390         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
12391
12392         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
12393
12394 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
12395
12396         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
12397
12398         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
12399
12400         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
12401
12402 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
12403
12404         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
12405         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
12406         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
12407
12408         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
12409
12410         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
12411         (genNotFloat): Added.
12412         (genUminusFloat): Added.
12413
12414         * device/lib/z80/Makefile: Added floating pt stubs.
12415
12416         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
12417
12418         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
12419
12420         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
12421
12422 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
12423
12424         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
12425
12426         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
12427
12428         * sdcc/support/regression/Makefile: Add port ds390.
12429
12430         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
12431
12432         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
12433
12434         * sdcc/support/regression/ports/ds390/spec.mk: Added.
12435
12436         * sdcc/support/regression/ports/ds390/support.c: Added.
12437
12438         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
12439
12440         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
12441
12442         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
12443
12444 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12445
12446         * device/include/malloc.h: Added z80 and gbz80 support.
12447
12448         * device/lib/gbz80/heap.s: Added.
12449
12450         * device/lib/z80/heap.s: Added.
12451
12452         * device/lib/malloc.c: Added z80 and gbz80 support.
12453
12454         * support/regression/tests/malloc.c (testMalloc): Added.
12455
12456         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
12457
12458         * support/regression/tests/bug-478094.c: Added.
12459
12460         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
12461
12462 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
12463
12464         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
12465
12466         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
12467
12468         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
12469
12470         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
12471
12472         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
12473
12474 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
12475
12476         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
12477
12478 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
12479
12480         * support/regression/tests/bug-477927.c: Added.
12481
12482         * src/z80/peeph.def: Added minor rules.
12483
12484         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
12485
12486         * src/z80/peeph.def: Added jump optimisation modification.
12487
12488 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
12489
12490         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
12491
12492 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
12493
12494         * support/regression/tests/funptrs.c: Added.
12495
12496 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
12497
12498         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
12499
12500 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
12501
12502         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
12503
12504         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
12505
12506         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
12507         (movLeft2ResultLong): Created.
12508
12509         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
12510         (joinPushes): Added.  Joins two char pushes into a word push.
12511
12512 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
12513
12514         * support/cpp2/Makefile.in (install): Added creation of dest dir.
12515
12516         * support/makebin/Makefile (install): Added creation of dest dir.
12517
12518 2001-10-24 Karl Bongers <karl AT turbobit.com>
12519
12520         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
12521
12522 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
12523
12524         * src/z80/ralloc.c: Turned off faulty pack for one use.
12525
12526         * src/z80/peeph-gbz80.def: Removed redundent restart options.
12527
12528         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
12529
12530 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
12531
12532         * support/regression/Makefile: Improved clean
12533
12534         * support/regression/ports/gbz80/spec.mk: Added clean
12535
12536         * support/regression/ports/host/spec.mk: Added clean
12537
12538         * support/regression/ports/z80/spec.mk: Added clean
12539
12540         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
12541
12542         * support/regression/ports/mcs51/timeout.c: little improvements
12543
12544 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
12545
12546         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
12547
12548         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
12549
12550         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
12551
12552 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
12553
12554         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
12555
12556         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
12557
12558 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
12559         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
12560
12561         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
12562
12563         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
12564
12565         * src/mcs51/main.c (_linkCmd): Added bin path to command.
12566
12567         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
12568
12569         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
12570
12571         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
12572
12573         * support/regression/tests/longor.c: Added.
12574
12575 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
12576
12577         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
12578
12579         * as/mcs51/aslink.h: define PATH_MAX
12580
12581         * as/mcs51/asm.h: define PATH_MAX
12582
12583         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
12584
12585         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
12586
12587         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
12588
12589         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
12590
12591         * src/SDCCglobl.h: define PATH_MAX
12592
12593         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
12594
12595         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
12596
12597 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
12598
12599         * src/z80/gen.c (gencjneshort): Fixed
12600
12601         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
12602
12603 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
12604
12605         * support/regression/tests/bug-469671.c: Added.
12606
12607         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
12608
12609 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
12610
12611         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
12612
12613         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
12614
12615 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
12616
12617         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
12618
12619         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
12620
12621         * src/device/lib/_mullong.c : removed hint: nooverlay bug
12622
12623         * src/device/lib/_divuint.c : removed hint: nooverlay bug
12624
12625         * src/device/lib/_divulong.c: removed hint: nooverlay bug
12626
12627         * src/device/lib/_moduint.c : removed hint: nooverlay bug
12628
12629         * src/device/lib/_modulong.c: removed hint: nooverlay bug
12630
12631 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
12632
12633         * 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.
12634
12635         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
12636
12637         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
12638
12639 2001-10-07    <johan AT FRIJA>
12640
12641         * device/lib/gets.c (gets): fixed the return value.
12642
12643 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
12644         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
12645
12646         * 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.
12647
12648         * 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.
12649
12650         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
12651
12652         * src/pic/gen.c: Removed Safe_strdup.
12653
12654         * configure.in: Added option to enable libgc support.
12655
12656         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
12657         (bitVectUnion): Optimised.
12658         (bitVectIntersect): Optimised.
12659         (bitVectBitsInCommon): Optimised.
12660         (bitVectCplAnd): Optimised.
12661
12662         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
12663
12664 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12665
12666         * src/SDCCmain.c: distinguish between assembler debug and plain options
12667
12668         * src/avr/main.c:   remove standard assembler options
12669
12670         * src/ds390/main.c: remove standard assembler options
12671
12672         * src/mcs51/main.c: remove standard assembler options
12673
12674         * src/port.h: removed "PENDING" comment
12675
12676 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12677
12678         * src/device/lib/_mulint.c  : new, with assember functions
12679
12680         * src/device/lib/_mullong.c : new, with assember functions
12681
12682         * src/device/lib/_divuint.c : with assember functions
12683
12684         * src/device/lib/_divsint.c : with assember functions
12685
12686         * src/device/lib/_divulong.c: with assember functions
12687
12688         * src/device/lib/_divslong.c: with assember functions
12689
12690         * src/device/lib/_moduint.c : with assember functions
12691
12692         * src/device/lib/_modsint.c : with assember functions
12693
12694         * src/device/lib/_modulong.c: with assember functions
12695
12696         * src/device/lib/_modslong.c: with assember functions
12697
12698         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
12699
12700         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
12701
12702         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
12703                                       replaced _mululong.c and _mulslong.c by _mullong.c
12704
12705 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
12706
12707         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
12708
12709 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12710
12711         * src/SDCCglue.c: test, if win32api is available for MINGW
12712
12713 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
12714
12715         * src/SDCCsymt.c: no more _modifier in printTypeChain()
12716         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
12717         * support/regression/ports/gbz80/spec.mk: removed GENERIC
12718         * support/regression/ports/host/spec.mk: removed GENERIC
12719         * support/regression/ports/mcs51/spec.mk: removed GENERIC
12720         * support/regression/ports/z80/spec.mk: removed GENERIC
12721
12722 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
12723
12724         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
12725
12726         * support/regression/tests/bug-467035.c: Created.
12727
12728 2001-10-01    <johan AT FRIJA>
12729
12730         * src/SDCC.y: fixed bug #466586 part 1
12731
12732 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
12733
12734         * SDCCicode.c: z80 has no generic pointers
12735         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
12736
12737 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
12738
12739         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
12740
12741 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
12742
12743         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
12744
12745         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
12746
12747 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
12748
12749         * configure.in: Fixed up so that ucsim is only configured once.
12750
12751         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
12752
12753         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
12754         (getPathDifference): As above.
12755
12756         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
12757
12758         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
12759
12760 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
12761         * .version: Updated to 2.3.1
12762
12763         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
12764         Added copyright header.
12765
12766         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
12767         (assemble): Added support for macro based assembler commands.
12768         (linkEdit): Added support for macro based linker commands.
12769         (preProcess): Changed the pre-processor to use macros.
12770         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
12771         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
12772
12773         * device/lib/z80/crt0.s: Added module name for debugging.
12774
12775 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
12776
12777         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12778
12779         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
12780
12781         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
12782
12783         * src/Makefile.in: Added SDCCmacro and SDCCutil
12784
12785 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
12786
12787         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
12788
12789 2001-09-16    <johan AT FRIJA>
12790
12791         * 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.
12792
12793 2001-09-15    <johan AT FRIJA>
12794
12795         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
12796         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
12797
12798 2001-09-11    <johan AT FRIJA>
12799
12800         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
12801
12802 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
12803
12804         * support/regression/tests/bug-460444.c: Added test case.
12805
12806         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
12807         (genCast): Added justification for all of the asserts.
12808
12809 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
12810
12811         * support/regression/support.c: _xdata replaced by xdata
12812
12813         * support/regression/spec.mk: removed _generic
12814
12815 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
12816
12817         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
12818
12819         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
12820         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
12821
12822         * src/z80/peeph.def: Added a rule to optimise shift then compare.
12823
12824         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
12825
12826         * support/regression/tests/bug-460010.c: Added test case.
12827
12828         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
12829
12830 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
12831
12832         * support/regression/Makefile: inter-port-clean adjusted for mcs51
12833
12834         * support/regression/testfwk.c: removed workaround for bug #436344
12835
12836         * support/regression/tests/bp.c: use less memory with mcs51
12837
12838         * support/regression/tests/bug-441448.c: use less memory
12839
12840         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
12841
12842         * support/regression/collate-results.py: typo
12843
12844 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
12845
12846         * support/regression/tests/fetchoverlap.c: Added new test case.
12847
12848         * support/regression/tests/bp.c: Added new test case.
12849
12850         * support/regression/tests/bug-448984.c: Added new test case.
12851
12852         * support/regression/tests/pow2shifts.c: Added new test case.
12853
12854         * src/z80/gen.c: Turned off the noise it normally generates for the release.
12855         (genlshTwo): Fixed right shift for count > 8.
12856
12857         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
12858
12859 2001-09-08    <johan AT FRIJA>
12860
12861         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
12862
12863 2001-09-07    <johan AT FRIJA>
12864
12865         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
12866
12867         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
12868
12869 2001-09-06    <johan AT FRIJA>
12870
12871         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
12872         * bernhard noted me at this: "() equals to (void)" (1.38)
12873
12874 2001-09-05    <johan AT FRIJA>
12875
12876         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
12877
12878 2001-09-04    <johan AT FRIJA>
12879
12880         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
12881
12882
12883 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
12884
12885         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
12886
12887 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
12888
12889         * link/z80/aslink.h: Fixed path for PATH_MAX
12890
12891 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
12892
12893         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
12894
12895         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
12896
12897         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
12898
12899         * 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.
12900
12901 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
12902
12903         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
12904         (genCmp): Fixed up genCmp for the GB with longs.
12905
12906         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
12907
12908         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
12909
12910         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
12911
12912         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
12913
12914 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
12915
12916         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
12917
12918 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
12919
12920         * 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.
12921
12922         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
12923
12924 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
12925
12926         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
12927
12928         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
12929
12930 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
12931
12932   * sim/ucsim/configure:    little improvement of Cygwin-detection
12933   * sim/ucsim/configure.in: little improvement of Cygwin-detection
12934   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
12935   * support/regression/tests/bug-221100.c: small changes for mcs51
12936   * support/regression/tests/bug-221168.c: small changes for mcs51
12937   * support/regression/tests/bug-227710.c: small changes for mcs51
12938   * support/regression/tests/staticinit.c: small changes for mcs51
12939   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
12940   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12941   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
12942
12943 $Revision$