device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
[fw/sdcc] / ChangeLog
1 2006-06-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2
3         * device/lib/printf_tiny.c: fixed bug #1465675 (%x format specifier)
4
5 2006-06-12 Bernhard Held <bernhard AT bernhardheld.de>
6
7         * src/SDCCast.c (backPatchLabels): fixed bug #1504636
8
9 2006-06-11 Maarten Brock <sourceforge.brock AT dse.nl>
10
11         * device/lib/printf_large.c (OUTPUT_CHAR, _output_char): added and used
12           for optimization
13
14 2006-06-11 Vangelis Rokas <vrokas AT users.sourceforge.net>
15
16         * src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
17         to a char variable. Fixed bug #1504211
18         * device/include/pic16/adc.h,
19         device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
20         and fixed bug #1364390
21
22 2006-06-10 Borut Razem <borut.razem AT siol.net>
23
24         * CVSROOT: removed the CVS left-over
25
26 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
27
28         * as/hc08/asmain.c (asexit),
29         * as/hc08/lkmain.c (lkexit),
30         * as/mcs51/asmain.c (asexit),
31         * as/mcs51/lkmain.c (lkexit),
32         * src/SDCCglue.c (DEFSETFUNC),
33         * src/SDCCmain.c (linkEdit, assemble),
34         * support/librarian/sdcclib.c (AddRel),
35           replaced unlink() by standard C remove()
36         * src/SDCC.y: replaced removePostIncDecOps() by createRMW()
37         * src/SDCCast.c (replaceAstWithTemporary, createRMW,
38           gatherImplicitVariables): new, added to fix bug 608752,
39           (createFunction): added gatherImplicitVariables()
40         * src/SDCCast.h: added createRMW prototype
41         * src/SDCCsymt.h (struct symbol): added infertype
42         * support/regression/tests/bug608752.c: new, added
43
44 2006-06-10 Raphael Neider <rneider AT web.de>
45
46         * src/pic16/gen.c (pic16_aopOp): use WREG as destination even for
47           multibyte dummy reads (fixes #1503234)
48
49 2006-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
50
51         * device/include/mcs51/compiler.h: new, added header file to enable
52           creating common sfr definition header files for different compilers
53
54 2006-06-05 Raphael Neider <rneider AT web.de>
55
56         * src/pic16/{pcode.h,genarith.c}:
57           introduced pCodeOp combining any two pCodeOps (previously only
58           two register operands could be combined), removed pcop2 from
59           pCodepReg, replaced pCodeOpReg2 with pCodeOp2, fixes #1492366
60         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): added case for PO_TWO_OPS
61         * src/pic16/gen.c (pic16_popGet2,pic16_popGet2p,pic16_popCombine2):
62           rewritten to use new PO_TWO_OPS
63         * src/pic16/main.c (_hasNativeMulFor): cover more cases natively,
64         * src/pic16/pcode.c (pic16_newpCodeOpImmd): initialize rIdx field,
65           (pic16_newpCodeOp): catch invalid attempts on PO_TWO_OPS,
66           (pic16_newpCodeOp2): NEW, create combined pCodeOp,
67           (pic16_get_op): embraced return arg to allow #define return(x),
68             added new case for combined opcodes
69           (pic16_get_op2): reduced to use pic16_get_op() on second pCodeOp,
70           (pic16_pCode2str,pic16_getRegFrompCodeOp,
71            pic16_getRegFromInstruction2): fixed/added handling of new pCodeOp
72
73 2006-06-04 Bernhard Held <bernhard AT bernhardheld.de>
74
75         * src/SDCCval.c (checkConstantRange): added
76         * src/SDCCval.h: added checkConstantRange
77         * support/Util/SDCCerr.c,
78         * support/Util/SDCCerr.h: replaced unused W_IF_NEVER_TRUE and
79         W_IF_ALWAYS_TRUE by W_COMP_RANGE and W_LIT_OVERFLOW
80         * src/SDCC.y: moved early 'condition transformations' to SDCCast.c
81         * src/SDCCast.c (decorateType): added checkConstantRange,
82         added 'condition transformations' from SDCC.y so that now W_COMP_RANGE
83         can be emitted with the correct always true/false warning,
84         added optimization for double '!';
85         result of decorateType() must be assigned back to the tree, because
86         decorateType() can change the tree
87         * src/SDCCicode.c (geniCodeLogic),
88         (geniCodeAssign): replaced new checkConstantRange, added warnings,
89         (checkConstantRange): removed, it was only a fragment which never
90         emitted a warning
91         * src/SDCCsymt.c (computeType): fixed promotion for
92         "-1 < (unsigned bit) b"
93         * src/pic/ralloc.c (packRegsForAssign),
94         * src/pic16/ralloc.c (packRegsForAssign),
95         * src/hc08/ralloc.c (packRegsForAssign),
96         * src/z80/ralloc.c (packRegsForAssign): ported fix for bug #930931
97         from mcs51
98         * src/mcs51/ralloc.c (packRegsForAssign): removed outcommented source
99         * support/regression/tests/constantRange.c: added
100         * support/valdiag/tests/constantRange.c: added
101         * support/valdiag/valdiag.py: added -DPORT_HOST=1
102
103 2006-06-02 Borut Razem <borut.razem AT siol.net>
104
105         * support/regression/ports/pic16/support.c: increase stack size
106           to 255 bytes
107         * support/regression/Makefile.in: sort tests by name so that the
108           resutlts can be compared on different machines / platforms
109
110 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
111
112         * device/lib/printf_large.c (output_digit): optimized further, Tnx Frieder
113         * src/ds390/gen.c (emitLabel): new, added,
114           (genDjnz): fixed stack overflow bug,
115           (throughout): cosmetic changes to sync with mcs51/gen.c,
116           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl)
117         * src/mcs51/gen.c (genEndFunction): small optimization,
118           (throughout): cosmetic changes to sync with ds390/gen.c
119
120 2006-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
121
122         * device/lib/printf_large.c (output_digit, calculate_digit): optimized,
123           (_print_format): fixed printing pointers
124         * src/mcs51/gen.c (emitLabel, movb): new, added,
125           (genAssign): small optimization,
126           (genDjnz): fixed stack overflow bug,
127           (throughout): replaced sprintf with SNPRINTF,
128           replaced mcs51_regWithIdx with REG_WITH_INDEX,
129           replaced emitcode("mov", "b,...") with MOVB(...),
130           replaced emitcode("", "%05d$:", lbl->key + 100) with emitLabel(lbl),
131           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
132         * src/mcs51/peeph.def: added rules 140 and 264
133         * src/SDCCmem.c (allocLocal): store register declared locals in DSEG/OSEG
134           so they may get optimized into registers
135
136 2006-05-30 Maarten Brock <sourceforge.brock AT dse.nl>
137
138         * src/SDCCmain.c (optionsTable, parseCmdLine): handle --use-stdout
139           immediately when encountered,
140           (printUsage): always use stderr even on windows
141
142 2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
143
144         * src/SDCCast.c (isLoopCountable): fixed bug #1478316
145         (processParms): fixed bug #1247551
146         * src/SDCCmain.c (printVersionInfo, printOptions, printUsage,
147         parseCmdLine, main): print '--version' to stdout,
148         print 'help' to stdout if --help is given,
149         print 'help' to stderr and exit with EXIT_FAILURE if no or bad
150         arguments are given; fixed --help
151
152 2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
153
154         * src/SDCCcse.c (findPointerSet): fixed bug #1493710
155         * support/regression/tests/bug-1493710.c: added
156
157 2006-05-27 Borut Razem <borut.razem AT siol.net>
158
159         * support/regression/fwk/lib/testfwk.c: define array in _printn() as
160           static instead auto
161         * support/regression/ports/pic16/support.c: increase stack size
162           from default 64 bytes to 128 bytes
163         * support/regression/tests/staticinit.c,
164           support/regression/tests/float.c: regression tests fully enabled
165           for pic16 port by putting the initialized data arrays into the code
166           section
167         * support/regression/ports/pic16/spec.mk: don't link default libraries.
168           This was changed by mistake in the previous version.
169
170 2006-05-28 Vangelis Rokas <vrokas AT users.sourceforge.net>
171
172         * src/pic16/gen.c (genFunction, genEndFunction): some
173         beautifications, fixed bug with falsely restoring FSR2 in large
174         stack model, thanks to Beau E. Cox for reporting the bug
175
176 2006-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
177
178         * debugger/mcs51/break.c,
179         * debugger/mcs51/cmd.c (throughout): removed unused variables and labels,
180           use %p to print pointers, made address variables unsigned
181         * debugger/mcs51/cmd.c (infoSymbols): added missing parameter to printf
182         * debugger/mcs51/symtab.c (parseSymbol): must return something
183         * src/mcs51/gen.c (aopForSym): small optimization,
184            moved declarations mcs51_ptrRegReq and mcs51_nRegs to ralloc.h,
185           (freeAsmop): added missing break,
186           (aopPut): removed parameter bvolatile, determine it inside the function,
187           (saveRegisters, unsaveRegisters): small optimization,
188           (genIpush): removed pointless check,
189           (throughout): replaced Safe_calloc, strcpy with Safe_strdup,
190           replaced sprintf with SNPRINTF,
191           replaced strcpy with strncpyz,
192           updated aopPut calls,
193           replaced D(emitcode("; genXXX", "")) with D(emitcode(";", "genXXX"))
194         * src/mcs51/ralloc.h:  added declarations mcs51_ptrRegReq and mcs51_nRegs
195
196 2006-05-24 Borut Razem <borut.razem AT siol.net>
197
198         * support/regression/tests/bug-221100.c: fixed xdata problem caused by
199           modification of test for the pic16 port, put the array to the code
200           memory for pic16port; thanks to Maarten Brock and Frieder Ferlemann
201
202 2006-05-23 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
203
204         * src/pic/gen.c: MSC 6 does not have <stdint.h>.  Use pstdint.h instead.
205         * support/Util/pstdint.h: added
206
207 2006-05-22 Borut Razem <borut.razem AT siol.net>
208
209         * src/regression/Makefile: removed bool2.c test, added -q linker option
210         * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c,
211           src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c,
212           src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c,
213           src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c,
214           src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c,
215           src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c,
216           src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c,
217           src/regression/add.c, src/regression/sub.c, src/regression/call1.c:
218           define SUPPORT_BIT_TYPES 0, removed unused bit variables
219
220 2006-05-22 Raphael Neider <rneider AT web.de>
221
222         * src/pic16/gen.c (pic16_storeForReturn): fragile fix for
223           bug #1492360 (problematic due to generic pointers, see code)
224
225 2006-05-22 Borut Razem <borut.razem AT siol.net>
226
227         * support/regression/ports/pic16/specs.mk: removed stack size linker
228           directive
229         * support/regression/tests/array.c,
230           support/regression/tests/bitopcse.c,
231           support/regression/tests/bug-908454.c,
232           support/regression/tests/malloc.c: modified for pic16 regression test
233         * support/regression/tests/bitfields.c:
234           pic16 - excluded bitfileds of size > 8
235         * support/regression/tests/bp.c: pic16 - reduced data size
236         * support/regression/tests/bug-221100.c: pic16 - reduced data size
237         * support/regression/tests/bug-460010.c:
238           pic16 - used the absolute address the fits in memory
239         * support/regression/tests/bug-716242.c:
240           bug [ 1443651 ] pic 16: redefining symbol that cannot be redefined.
241         * support/regression/tests/float.c:
242           pic16 - excluded - data size too big
243         * support/regression/tests/onebyte.c:
244           pic16 - bug [ 1444425 ] onebyte.c regression tes fails on pic16
245         * support/regression/tests/shifts.c:
246           pic16 - function names probably have to differ in first X characters
247           (gpasm limitation?)
248         * support/regression/tests/staticinit.c:
249           pic16 - excluded some tests due error: no target memory available for
250           section ".idata"
251
252 2006-05-22 Borut Razem <borut.razem AT siol.net>
253
254         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
255           second try. Thanks Stas Sergeev once more.
256
257 2006-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
258
259         * src/hc08/gen.c (transferAopAop): aop forced to stack was not restored,
260           (genLeftShift, genRightShift): fixed bug 1491627
261         * src/hc08/peeph.def (rules 7, 8.x): added
262         * support/regression/tests/shifts.c (ShiftLeftByParam,
263           ShiftRightByParam, testShiftByParam): added to test variable shifting
264
265 2006-05-20 Raphael Neider <rneider AT web.de>
266
267         * src/pic/gen.c (bitpatternFromVal): fixed for 64-bit machines
268         * src/pic16/ralloc.c (newReg): use correct name in hashtable,
269           (allocReg): add only new registers to dynAllocRegs,
270           (pic16_assignRegisters): do not reset dynrIdx, fixes bugs
271             #1489055, #1445850, and probably #1483693
272
273 2006-05-19 Vangelis Rokas <vrokas AT users.sourceforge.net>
274
275         * src/pic16/glue.c (pic16_emitConfigRegs, pic16_emitIDRegs): fixed
276         bug in for-loop that didn't emit the last of CONFIG and ID registers
277
278 2006-05-18 Maarten Brock <sourceforge.brock AT dse.nl>
279
280         * src/mcs51/gen.c (genCodePointerGet): inc dptr instead of loading acc
281           with offset
282         * src/mcs51/peeph.def (186.x): updated and reenabled to fix bugs
283           1489016, 1434401 and 1490124
284         * src/ds390/peeph.def (186.x, 227.x): updated and reenabled to fix bugs
285           1489016, 1434401 and 1490124
286
287 2006-05-17 Borut Razem <borut.razem AT siol.net>
288
289         * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
290           thanks Stas Sergeev
291
292 2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
293
294         * device/include/mcs51/P89c51RD2.h,
295         * device/include/mcs51/P89LPC901.h,
296         * device/include/mcs51/P89LPC922.h,
297         * device/include/mcs51/P89LPC932.h: added, thanks Omar Espinosa
298
299 2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
300
301         * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
302         to fix missing stack pragma in compiled binary object file,
303
304 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
305
306         * support/packihx/configure.in,
307         * support/packihx/configure: removed warning, autoconf >= 2.5x can
308         determine sizeof basic types even while cross compiling
309
310 2006-05-13 Bernhard Held <bernhard AT bernhardheld.de>
311
312         * src/avr/gen.c (aopop),
313         * src/ds390/gen.c (aopOp),
314         * src/hc08/gen.c (aopOp),
315         * src/mcs51/gen.c (aopop),
316         * src/pic16/gen.c (pic16_aopOp),
317         * src/pic/gen.c (aopOp),
318         * src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
319         if size of operand is smaller than spill location
320
321 2006-05-12 Borut Razem <borut.razem AT siol.net>
322
323         * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
324           have to have CR/LF line endings even if they are checked out on *nix
325           or on WIN32 in cygwin binmode
326
327 2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
328
329         * doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
330         * device/include/ds80c390.h: added sfr16 definitions
331         * src/ds390/gen.c,
332         * src/ds390/gen.h,
333         * src/ds390/main.c,
334         * src/ds390/ralloc.c,
335         * src/ds390/ralloc.h: changes all over the place to sync with mcs51
336           fixing several bugs and adding sfr16/sfr32, reentrant bit params,
337           bit returning functions
338         * support/regression/tests/sfr16.c: enabled test on ds390
339
340 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
341
342         * src/hc08/gen.c (asmopToBool, genIfx): fix for bug #1429722
343         * src/hc08/gen.c (storeRegToAop): fix for bug #1439894
344
345 2006-05-11 Maarten Brock <sourceforge.brock AT dse.nl>
346
347         * sim/ucsim/sim.src/memcl.h: added get_decoder() to cl_address_space
348         * sim/ucsim/sim.src/mem.cc: implemented cl_address_space::get_decoder,
349           (cl_address_space constructor): removed expensive initialization,
350           (cl_address_space::get_cell): extended for late initialization,
351           (cl_address_space::*): use late initialization,
352           (cl_address_decoder::activate): removed expensive initialization,
353           This reduced regression test running time by 25%
354
355 2006-05-11 Bernhard Held <bernhard AT bernhardheld.de>
356
357         * packihx/,
358         * configure.in,
359         * configure,
360         * sdcc.dsw,
361         * Makefile.bcc,
362         * Makefile.in,
363         * support/packihx/Makefile.in,
364         * support/packihx/clean.mk,
365         * support/packihx/Makefile.bcc,
366         * support/packihx/PackIhx.dsp: moved packihx to support/packihx
367
368 2006-05-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
369
370         * src/SDCCval.c (valNot): fix for regression test failure
371           of not.c on big endian hosts
372
373 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
374
375         * device/inlcude/mcs51/msc1210.h: new, added, thanks Philippe Latu
376
377 2006-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
378
379         * device/lib/mcs51/Makefile.in: changed string comparison operator
380           to = for POSIX compliance; == is bash extension
381
382 2006-05-10 Maarten Brock <sourceforge.brock AT dse.nl>
383
384         * device/lib/hc08/_mulint.c: applied patch 1485428, thanks
385           kosmonaut_pirx
386
387 2006-05-09 Vangelis Rokas <vrokas AT users.sourceforge.net>
388
389         * src/pic16/gen.c (pic16_freeAsmop): release any temp registers
390         allocated by aopForSym thus fixing bug #1478657 about failed testfwk.c
391         * src/pic16/main.c (_pic16_keywords): added 'sfr16' keyword,
392         * src/pic16/ralloc.c (pic16_allocWithIdx): also a fix for bug exposed by
393         bug report #1478657,
394
395 2006-05-05 Borut Razem <borut.razem AT siol.net>
396
397         * doc/Makefile.in: remove of WARNINGS and labels.pl immediately after
398           making the html
399
400 2006-05-02 Borut Razem <borut.razem AT siol.net>
401
402         * doc/Makefile.in: removed *.ind dependency since there is no rule to
403           create *.ind, which made make to fail if invoked with -j 2
404
405 2006-05-01 Maarten Brock <sourceforge.brock AT dse.nl>
406
407         * src/SDCCglue.c (emitRegularMap): partial fix for bug 1477149, thanks
408           Hubert Sack for patch 1479782
409
410 2006-05-01 Vangelis Rokas <vrokas AT users.sourceforge.net>
411
412         * src/pic16/glue.c (pic16_printIvalStruct): fixed bug #1445929
413
414 2006-05-01 Raphael Neider <rneider AT web.de>
415
416         * src/pic/device.c (sanitise_processor_name): only remove p(ic) prefix,
417           (create_pic): store only prefix-free device name,
418           (init_pic): check for device names with "16" prefix,
419           (list_valid_pics),
420         * src/pic/device.h (struct PIC_device),
421         * src/pic/main.c (_pic14_genAssemblerPreamble): adapted to single
422             stored device name,
423         * device/include/pic/pic12f{635,675,629,683}.h,
424         * device/lib/pic/libdev/pic12f{635,675,629,683}.c: NEW device libraries
425         * device/lib/pic/libdev/Makefile.in: allow pic12* devices,
426         * device/include/pic/pic16f505.h,
427         * device/lib/pic/libdev/pic16f505.c: removed
428         * device/include/pic/pic14devices.txt: added support for pic12f
429             devices, removed unsupported non 16-bit devices
430             [above changes provided by patch from Zik Saleeba]
431         * src/pic/*, src/pic16/*, device/include/pic16/*,
432           device/lib/pic/**, device/lib/pic16/**: obfuscated email address
433
434 2006-05-01 Borut Razem <borut.razem AT siol.net>
435
436         * configure.in, configure, doc/Makefile.in:
437           sync with nightly build makefile - latex, dvipdf and dvips
438           not needed any more
439
440 2006-04-30 Bernhard Held <bernhard AT bernhardheld.de>
441
442         * support/scripts/sdcc.nsi: removed all Readmes and Makefiles
443         in the library source
444
445 2006-04-30 Maarten Brock <sourceforge.brock AT dse.nl>
446
447         * support/regression/ports/hc08/spec.mk: fixed bug 1478892
448
449 2006-04-28 Raphael Neider <rneider AT web.de>
450
451         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
452         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
453           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
454         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
455
456 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
457
458         * device/lib/pic/libdev/Makefile.in,
459         * device/lib/hc08/Makefile.in,
460         * device/lib/gbz80/Makefile.in,
461         * device/lib/z80/Makefile.in,
462         * device/lib/ds390/Makefile.in,
463         * device/lib/ds400/Makefile.in: added srcdir to include search path,
464         thanks to Borut for the bug report
465         * configure.in,
466         * configure: always create doc/Makefile independent from --enable-doc
467         * Makefile.in: always install from directory doc independent from
468         --enable-doc
469         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
470         removed
471         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
472         * doc/Makefile.in: install *.txt if present
473         * device/include/Makefile.in (install): added installation of pic/*.inc
474         and pic/*.txt files again, they were erroneously removed
475
476 2006-04-28 Raphael Neider <rneider AT web.de>
477
478         * src/pic/{gen.c,main.h,pcode.c},
479         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
480             concerning signedness with casts
481
482 2006-04-28 Raphael Neider <rneider AT web.de>
483
484         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
485             definition of an interrupt handler,
486         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
487             interrupt handler stuff from picglue() to separate routine,
488           (picglue): enabled definition of intr handlers in files w/o main()
489
490 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
491
492         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
493           compilation with MSVC 2005 Express Edition (VC8)
494
495 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
496
497         * device/lib/Makefile: fixed build of gbz80 lib
498
499 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
500
501         * support/regression/tests/bug-460010.c,
502         * support/regression/tests/bug-524691.c,
503         * support/regression/tests/bug-716242.c: removed conditional defines
504           that are already in testfwk.h
505
506 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
507
508         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
509           (AccAXRsh1): added, shift right by 1,
510           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
511            AccAXLrl1
512         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
513
514 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
515
516         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
517         remove cast to same type
518         * src/SDCCast.c (decorateType): fix for RFE 1475742,
519         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
520         * as/z80/Makefile,
521         * link/z80/Makefile: removed, they have moved to
522         Makefile.in files
523         * configure,
524         * configure.in: replaced duplicate message about ucsim by missing sdcpp
525         * install-sh: fix bug #1204398 by setting umask 0022
526         * device/lib/Makefile: separate build of z80 and gbz80 lib
527
528 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
529
530         Enabled VPATH feature: changed nearly all Makefiles (149 files).
531         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
532
533         One basic decision: e.g. src/clean.mk includes further files. In order
534         to make this work there are two solutions:
535         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
536           run configure on them. This way they can use
537           'include $(srcdir)/port-clean.mk'
538         - always include clean.mk by the Makefile at the same level. To avoid
539           that `make clean` tries to include and build Makefile.dep the
540           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
541           implemented, because now even `make uninstall` doesn't create
542           Makefile.in. clean.mk could be eliminated by pasting it in
543           Makefile.in.
544
545         * debugger/mcs51/Makefile.in: build own objects from library sources
546         (SLIB, SDCC) in current directory
547
548         * configure, configure.in: renamed --disable-device-lib-build in
549         --disable-device-lib; added --enable-doc, the required tools are
550         searched by configure; added result message; the toolchain for the
551         belonging ports are now only built, if the port is enabled.
552
553         * support/regression/*: all output is written in directory gen, because
554         the fwk and ports directories don't livet in the build tree using vpath
555
556         * doc/sdccman.lyx: renamed --disable-device-lib-build to
557         --disable-device-lib, added --enable-doc, added section VPATH
558
559         * sim/ucsim/configure.in,
560         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
561         z80 are enabled by default
562
563 2006-04-24 Raphael Neider <rneider AT web.de>
564
565         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
566             to config word, "pic14_"-prefixed some extern functions
567           (pic14_emitConfigWord): emit __config directive(s) if assignment to
568             config word has been found
569         * src/pic/device.h: added prototypes
570         * src/pic/pcode.c: added "pic14_"-prefix where needed
571         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
572             fixup
573         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
574             words,
575           (pic14emitRegularMap): ignore config words,
576           (pic14createInterruptVect): moved generating __config directives away
577           (picglue): have __config directives emitted
578
579 2006-04-24 Borut Razem <borut.razem AT siol.net>
580
581         * doc/Makefile: sync with nightly build makefile
582
583 2006-04-24 Raphael Neider <rneider AT web.de>
584
585         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
586             registers that have not been assigned proper liveranges,
587             fixes #1469504 and #1474602,
588           (pCodeRegOptimizeRegUsage): fixed typo in comment
589
590 2006-04-24 Borut Razem <borut.razem AT siol.net>
591
592         * device/examples/main8051.c: deleted - it was removed from CVS
593           24.mar.2000 and after that modified 18.feb.2001, so it reappered
594           after the transition to Subversion
595         * src/SDCCalloc.h: deleted - it was removed  from CVS
596           3.feb.2001 and after that modified 18.feb.2001, so it reappered
597           after the transition to Subversion
598         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
599           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
600           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
601           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
602
603 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
604
605         * as/asx8051.dsp: added mcs51/strcmpi.h
606         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
607         * as/hc08/aslink.h: updated lnksect prototype
608         * as/hc08/asm.h,
609         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
610         * as/hc08/asmain.c,
611         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
612           (newdot): handle A_ABS
613         * as/hc08/asout.c,
614         * as/mcs51/asout.c (outarea): output address
615         * as/hc08/lkaomf51.c,
616         * as/mcs51/lkaomf51.c: disabled unused array UsageType
617         * as/hc08/m08pst.c,
618         * as/mcs51/i51pst.c,
619         * as/z80/z80pst.c: "ABS" is not A_OVR
620         * as/hc08/lkarea.c (newarea): read a_addr,
621           (lnkarea): added codemap array, sort absolute areas to the front,
622            combine all GSINITx/GSFINAL,
623           (find_empty_space, allocate_space): new functions,
624           (lnksect): return next address, handle absolute sections
625         * as/mcs51/lkarea.c (newarea): read a_addr,
626           lnksect2 prototype changed,
627           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
628           (find_empty_space, allocate_space): new, factored out of lnksect2,
629           (lnksect2): return next address, handle absolute sections
630         * as/hc08/lkhead.c,
631         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
632         * as/hc08/lklibr.c (addfile, fndsym),
633         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
634           index out of range and detect both '\' and '/'
635         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
636         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
637           regression tests (ds390 cannot return bool yet)
638         * doc/sdccman.lyx: changed version number, document changed --no-peep,
639           document critical interrupts on z80, document changed SDCC define
640         * src/asm.c (_asxxxx_mapping): fixed .org directive,
641           (_a390_mapping): added .org directive
642         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
643           (genMultOneByte): fixed warnings
644         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
645           ones
646         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
647         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
648           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
649         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
650         * src/pic16/main.c: removed newReg prototype
651         * src/pic16/pcode.c,
652         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
653           warnings
654         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
655           ones
656         * src/pic16/ralloc.c
657         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
658           to fix warnings
659         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
660           from short to PIC_OPTYPE
661         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
662         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
663           optype from short to PIC_OPTYPE
664         * src/port.h: made int_size unsigned to fix warnings
665         * src/SDCC.y: fixed warning on MSVC
666         * src/SDCCicode.c (getArraySizePtr): return unsigned int
667         * src/SDCCopt.c (convertToFcall): fixed warnings
668         * src/SDCCsymt.h: removed double prototype for genSymName
669         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
670           offset int to fix warnings
671
672 2006-04-22 Borut Razem <borut.razem AT siol.net>
673
674         * doc/sdccman.lyx, */Makefile, */Makefile.in:
675           references to CVS replaced with Subversion
676
677 2006-04-21 Borut Razem <borut.razem AT siol.net>
678
679         * doc/sdccman.lyx, */Makefile, */Makefile.in:
680           references to CVS replaced with Subversion
681
682 2006-04-19 Borut Razem <borut.razem AT siol.net>
683
684         * src/version.awk: adapted for svn
685         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
686           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
687           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
688           /binutils-avr/etc/*.vi, *.jin: removed all properties
689           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
690
691 2006-04-19 Borut Razem <borut.razem AT siol.net>
692
693         * CVS to Subversion migration completed
694
695 2006-04-18 Borut Razem <borut.razem AT siol.net>
696
697         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
698           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
699
700 2006-04-17 Borut Razem <borut.razem AT siol.net>
701
702         * device/include/Makefile.in: added pic/*.inc to the installation
703
704 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
705
706         * support/regression/collate-results.py: fixed output in case of
707         a valdiag error
708         * support/regression/generate-cases.py: fixed splitting of pathnames
709         with dots
710         * as/hc08/lklibr.c (addfile),
711         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
712
713 2006-04-11 Raphael Neider <rneider AT web.de>
714
715         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
716         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
717         * src/pic16/pcode.c (assignValnums): fixed #1460578
718
719 2006-04-11 Raphael Neider <rneider AT web.de>
720
721         * device/lib/pic/libdev/*.c,
722         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
723           fixes #1468739, enables compilation in --std-c99 mode
724         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
725
726 2006-04-11 Raphael Neider <rneider AT web.de>
727
728         * src/pic/device.c (find_device): removed debug output
729           (list_valid_pics): enabled verbose listing of supported devices
730         * device/include/stdbool.h: define bool as char for pic14/16 as well
731
732 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
733
734         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
735
736 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
737
738         * .version: bumped version to 2.5.6
739         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
740
741 2006-04-06 Raphael Neider <rneider AT web.de>
742
743         * .version: bumped version to 2.5.6 (pic14 ABI changed)
744         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
745         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
746           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
747             pic14_constructAbsMap
748           (pic14printPublics): declare absolute global symbols as global
749           (pic14createInterruptVect),
750         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
751           (newReg): assume new registers unused, use correct name in
752             hashtable (reg->name instead of name), more debugLog output
753         * src/pic/device.h (PIC_device): added fields for verbose output
754         * src/pic/device.c: moved device definition to pic14devices.txt,
755             added routines for runtime parsing of pic14devices.txt,
756             added support for second config word
757         * src/pic/main.c (_process_pragma): removed #pragma maxram,
758           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
759           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
760           (_pic14_parseOptions): moved pCodeInitRegisters here
761           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
762         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
763           (pCodeInitRegisters): rewrapped comments, perpared new approach to
764             handling the pseudo stack
765         * device/lib/Makefile.in: ignore failures in objects-pic16,
766         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
767         * device/lib/pic/NEWS: document new dependency on picXXX.lib
768         * device/lib/pic/Makefile.subdir,
769         * device/lib/pic16/Makefile.subdir: improved clean rules
770         * device/lib/pic/libdev/: NEW, pic14 device libraries
771         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
772         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
773         * device/include/Makefile.in: create subdir and install pic14 headers
774         * device/include/pic/p16f_common.inc: removed unused declarations
775         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
776             PICs from inc2h.pl v1.6,
777             replaced BIT_AT macros with struct declarations
778         * device/include/pic/pic14devices.txt: definition of supported devices,
779             all above improvements contributed by Zik Saleeba, thanks
780         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
781         * support/scripts/sdcc.nsi: also install pic14 device libraries and
782             headers
783
784 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
785
786         * device/include/mcs51/c8051f410.h: added interrupt numbers,
787         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
788           thanks to Charles Olds
789
790 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
791
792         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
793
794 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
795
796         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
797         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
798         * support/regression/bug1464657.c: added, new test
799
800 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
801
802         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
803           version number
804
805 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
806
807         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
808           --no-peep and --peep-file <file> are used don't use default rules but
809           do use the <file>
810
811 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
812
813         * src/mcs51/gen.c (genCall): fixed bug 1457608
814
815 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
816
817         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
818         changes seem to cause (trigger?) problems with the build system.
819
820 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
821
822         * src/SDCCpeeph.c (operandsLiteral): new, added,
823           (callFuncByName): inserted operandsLiteral
824         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
825
826 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
827
828         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
829         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
830
831 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
832
833         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
834           implemented patch 1120823 Thanks to Willy De la Court (normal
835           interrupts need an interrupt number now if they are made critical),
836           and enabled nesting of critical functions though not for gbz80
837           (genCritical, genEndCritical): added functions
838           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
839         * src/z80/mappings.i: added "ei" to all mappings
840
841 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
842
843         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
844         submitted by the Debian SDCC maintainer Aurelien Jarno:
845         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
846         archive with gcc 4.1 on mips and wrote the patch"
847
848 2006-03-16 Raphael Neider <rneider AT web.de>
849
850         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
851           the left operand is shorter than the result (c* = lit-c* + int),
852           fixes bug #1450796
853         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
854           OP_SYMBOL
855
856 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
857
858         * src/.version: increased version number to 2.5.5
859         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
860         linking is done manually in pic16 port's _linkEdit,
861         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
862         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
863         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
864         allocate asmop as AOP_ACC,
865         (aopForRemat): added parameter 'bool result' in function declaration,
866         (pic16_aopGet): return AOP_ACC when accessing WREG,
867         (pic16_popGetTempReg): minor modification,
868         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
869         'pic16_allocWithIdx',
870         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
871         calling function in absolute addresses,
872         (genAssign): take into account AOP_ACC asmop,
873         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
874         * src/pic16/pcoderegs.c: some debug functions and lines added,
875         * src/pic16/ralloc.c (decodeRegType): added but commented out,
876         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
877         register too,
878         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
879         call to allocReg, not by manually allocating a new one,
880         (pic16_assignRegisters): now before going through the register
881         allocating functions mark all registers as free. This eliminates some
882         side effects resulting from peephole parser done earlier in the backbone
883
884 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
885
886         * src/SDCCicode.c (geniCodeLogic),
887         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
888
889 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
890
891         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
892           (genSend): bugfix, do not allocate and free twice,
893           (shiftRLong): handle partially overlapping aops
894         * support/regression/tests/bitopcse.c: fixed warning redefined idata
895
896 2006-03-08 Borut Razem <borut.razem AT siol.net>
897
898         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
899           for pic16
900
901 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
902
903         * support/regression/tests/bug1409955.c: new, added
904         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
905         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
906           (aopForSym, aopOp): increment asmop.allocated if reused,
907           (freeAsmop): decrement asmop.allocated and check for zero instead of
908           using asmop.freed,
909           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
910           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
911            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
912            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
913            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
914            genSignedRightShift, genRightShift, genDataPointerGet,
915            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
916            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
917             in reverse order from allocation,
918           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
919             added swappedLR to keep track
920         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
921           pdata & code for GCC, z80, gbz80 & hc08
922         * support/regression/tests/zeropad.c: moved defines to testfwk.h
923
924 2006-03-08 Raphael Neider <rneider AT web.de>
925
926         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
927
928 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
929
930         * device/include/mcs51/c8051f410.h: new SiLabs mcu
931         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
932         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
933
934 2006-03-06 Borut Razem <borut.razem AT siol.net>
935
936         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
937           made the linker quiet
938
939 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
940
941         * src/pic16/gen.c (genPcall): fixed bug #1443644
942         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
943         which dumps before the function entry point a data byte which represents
944         the number of the local variables used by the specified function, added
945         'xinst' for initial support for Extended Instruction Support,
946         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
947         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
948         port->fun_prefix anymore (may change later),
949         (genFunction, genEndFunction): do not store/restore local registers for
950         _main (this should take care the --main-return command line option in
951         the future),
952         (genOr): removed some legacy pic-port instructions,
953         * src/pic16/genarith.c (genAddLit): re-enabled old code because
954         performing operations with SFR's causes data to be written more than
955         once to each SFR. Perhaps SFRs should be handled in special cases...
956         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
957         pcode.h
958         * src/pic16/main.c (_process_pragma): stack bound checking did not take
959         into account for stack starting position,
960         (struct OPTIONS pic16_optionsTable): added command line argument
961         --extended or -y for Extended Instruction Support,
962         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
963         (deassignLRs): *** perhaps the most important change, old 'for' code
964         (commented out for reference), didn't account for some registers which
965         were left marked 'not free' after a pointer operation. The change
966         reduces register usage a lot in some cases
967
968 2006-03-04 Borut Razem <borut.razem AT siol.net>
969
970         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
971           _clean
972         * support/regression/tests/bug-524697.c: decreased array size for
973           mcs51 to fit into the internal RAM
974         * support/regression/Makefile.in: a little bit more verbose
975
976 2006-03-03 Borut Razem <borut.razem AT siol.net>
977
978         * support/regression/fwk/lib/testfwk.c,
979           support/regression/fwk/include/testfwk.h: introduced function
980           _prints(), nonrecursive _printn(), call _initEmu() from main()
981         * support/regression/ports/gbz80/support.asm,
982           support/regression/ports/ucz80/support.asm,
983           support/regression/ports/z80/support.asm,
984           support/regression/ports/ds390/support.c,
985           support/regression/ports/hc08/support.c,
986           support/regression/ports/host/support.c,
987           support/regression/ports/mcs51/support.c,
988           support/regression/ports/xa51/support.c: added empty _initEmu()
989           function
990         * support/regression/ports/pic16/gpsim.cmd,
991           support/regression/ports/pic16/spec.mk,
992           support/regression/ports/pic16/support.c,
993           support/regression/Makefile.in: added pic16 regression test
994
995 2006-03-01 Raphael Neider <rneider AT web.de>
996
997         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
998           genConstPointerGet): use safe way of generating MOVFF to cover
999             literals as well as registers, fixes bug #1440527
1000         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
1001             dereference
1002           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
1003             more correctly, fixes bug #1232186
1004           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
1005         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
1006             gplink guess the correct processor in more cases, applied patch
1007             from Till Riedel attached to and fixing bug #1436552
1008
1009 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1010
1011         * support/regression/tests/array.c: added, contains check for #1434401
1012         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
1013
1014 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
1015
1016         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
1017         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
1018         * device/include/mcs51/c8051f326.h,
1019         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
1020         * device/include/mcs51/c8051f000.h,
1021         * device/include/mcs51/c8051f018.h,
1022         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
1023           PCON_IDLE,PCON_STOP and added sfr16 definitions
1024
1025 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1026
1027         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
1028           genGetWord): fixed bug 1409955
1029
1030 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
1031
1032         * device/include/hc08/mc68hc908gp32.h,
1033         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
1034
1035 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
1036
1037         * src/SDCCast.c (constExprValue): return NULL if not a value
1038         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
1039         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
1040         * support/regression/tests/bitfields.c: enabled signed bitfield for all
1041
1042 2006-02-13 Borut Razem <borut.razem AT siol.net>
1043
1044         * src/regression/ptrarg.c: added, fails due to bug #1430967
1045         * src/regression/Makefile: ptrarg.c added, ...
1046
1047 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
1048
1049         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
1050         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
1051
1052 2006-02-11 Borut Razem <borut.razem AT siol.net>
1053
1054         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
1055           print "Processor: xxx" message to stdout only if --verbose
1056
1057 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1058
1059         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
1060         * support/regression/tests/bug1426356.c: added
1061         * support/regression/tests/bitfields.c: removed 2 tests
1062
1063 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1064
1065         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
1066         * device/include/mcs51/c8051f330.h,
1067         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
1068           PCON_IDLE,PCON_STOP and added sfr16 definitions
1069         * device/lib/_divsint.c,
1070         * device/lib/_divuint.c,
1071         * device/lib/_divulong.c,
1072         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
1073           register bank bug for small stackauto
1074
1075 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1076
1077         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
1078
1079 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
1080
1081         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
1082         * all.dsp: corrected several bin paths
1083         * device/include/mcs51/c8051f120.h,
1084         * device/include/mcs51/c8051f300.h,
1085         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
1086           to PCON_IDLE,PCON_STOP
1087         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
1088         * device/lib/printf_large.c (output_float): fixed bug 1388703
1089         * support/regression/tests/bug1057979.c: added test for bug 1388703
1090
1091 2006-02-08 Raphael Neider <rneider AT web.de>
1092
1093         * src/pic/pcode.c (pciTRIS): fixed typo,
1094           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
1095           (LinkFlow): fixed handling of flows that end in a call,
1096           (ReuseReg): perform safety check earlier
1097         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
1098             to work with flows at the beginning of a pBlock,
1099             fixes #1426557 (Symbol not previously defined),
1100           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
1101             usage information
1102           (RemoveUnusedRegisters): update register usage info
1103         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
1104             created, reuse existing ones instead
1105         * src/pic/gen.c (genPcall): fixed #1424719
1106
1107 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
1108
1109         * link/z80/lkmain.c,
1110         * link/z80/lklex.c,
1111         * link/z80/lkdata.c,
1112         * link/z80/aslink.h: fixed build on current cygwin:
1113         replaced getline() by lk_getline()
1114
1115 2006-02-01 Borut Razem <borut.razem AT siol.net>
1116
1117         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
1118           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
1119           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
1120           src/regression/bool1.c, src/regression/bool2.c,
1121           src/regression/bool3.c, src/regression/call1.c,
1122           src/regression/compare.c, src/regression/compare10.c,
1123           src/regression/compare2.c, src/regression/compare3.c,
1124           src/regression/compare4.c, src/regression/compare5.c,
1125           src/regression/compare6.c, src/regression/compare7.c,
1126           src/regression/compare8.c, src/regression/compare9.c,
1127           src/regression/configword.c, src/regression/for.c,
1128           src/regression/inline.c, src/regression/mult1.c,
1129           src/regression/nestfor.c, src/regression/or1.c,
1130           src/regression/pointer1.c, src/regression/ptrfunc.c,
1131           src/regression/rotate1.c, src/regression/rotate2.c,
1132           src/regression/rotate3.c, src/regression/rotate4.c,
1133           src/regression/rotate5.c, src/regression/rotate6.c,
1134           src/regression/rotate7.c, src/regression/string1.c,
1135           src/regression/struct1.c, src/regression/sub.c,
1136           src/regression/sub2.c, src/regression/switch1.c,
1137           src/regression/while.c, src/regression/xor.c,
1138           src/regression/create_stc, src/regression/simulate,
1139           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
1140           regression tests
1141         * src/regression/gpsim_assert.h: added
1142
1143 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
1144
1145         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
1146         ((void (code *) (void)) 0) ();
1147         * as/hc08/aslex.c,
1148         * as/hc08/aslink.h,
1149         * as/hc08/asm.h,
1150         * as/hc08/asmain.c,
1151         * as/hc08/lkdata.c,
1152         * as/hc08/lklex.c,
1153         * as/hc08/lkmain.c,
1154         * as/mcs51/aslex.c,
1155         * as/mcs51/aslink.h,
1156         * as/mcs51/asm.h,
1157         * as/mcs51/asmain.c,
1158         * as/mcs51/lkdata.c,
1159         * as/mcs51/lklex.c,
1160         * as/mcs51/lkmain.c,
1161         * as/z80/aslex.c,
1162         * as/z80/asm.h,
1163         * as/z80/asmain.c: fixed build on current cygwin:
1164         replaced getline() by as_getline()
1165
1166 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
1167
1168         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
1169         declarator in the symbol chain
1170         * src/SDCCsymt.h,
1171         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
1172         parameter list for function pointers
1173         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
1174         * support/regression/tests/bug-716242.c: added
1175
1176 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
1177
1178         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
1179         offset if possible
1180         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
1181
1182 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
1183
1184         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
1185         inifinitely recurseable, added static
1186         * support/regression/tests/bug-1408066.c: added
1187
1188 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
1189
1190         * src/SDCCicode.h,
1191         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
1192         renamed, added possibility to create "postLoopLbl"-labels
1193         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
1194         newiTempLoopHeaderLabel
1195         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
1196         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
1197         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
1198         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
1199         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
1200         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
1201         (basicInduction): fixed bug #136564, made static,
1202         (loopInduction): changed parameter of basicInduction, made static,
1203         (addPostLoopBlock): added
1204         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
1205         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
1206         findLoopEndSeq
1207         * support/regression/tests/bug-136564.c: added
1208         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
1209         --std-sdcc99 to LIBSDCCFLAGS
1210
1211 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
1212
1213         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
1214         while loop
1215         * support/regression/tests/bug-1406131.c: added
1216
1217 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
1218
1219         * src/SDCCast.c (decorateType): fix promotion of unary minus
1220         * src/SDCCsymt.c (computeType): beautified
1221         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
1222         (valUnaryPM, valComplement): fix sign and promotion,
1223         (valNot): ANSI: result type is int (SDCC: unsigned char)
1224         * support/regression/tests/uminus.c: speedup by removing superflous
1225         test case 'int'
1226         * support/regression/tests/onebyte.c: added promotion and signedness
1227         tests for unary minus
1228         * support/regressions/tests/bug-477927.c: disable warning about
1229         uninitialized variables
1230         * support/regression/tests/not.c: added
1231
1232 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
1233
1234         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
1235         * src/mcs51/gen.c (gen51Code): show final register usage after
1236         fillGaps in asm with --i-code-in-asm
1237         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
1238         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
1239         incUsed, rliveClear, adjustIChain): made static,
1240         (setFromRange): excluded because it's unused,
1241         (findPrevUseSym, markWholeLoop): added,
1242         (findPrevUse): rewritten; fixes bug 895992; now a complete search
1243         through all branches of predecessors enables sdcc to emit the warning
1244         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
1245         (rlivePoint): made static, added parameter emitWarnings which is only
1246         true during the first run out of two,
1247         (findRecursiveSucc, findRecursivePred): removed,
1248         (computeLiveRanges): made static, added parameter emitWarnings,
1249         (dumpIcRlive): added for debugging only
1250         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
1251         removed prototype of setFromRange()
1252         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
1253         in call of computeLiveRanges()
1254         * support/regression/tests/bug-895992.c: added
1255         * support/regression/tests/bug-971834.c: added
1256         * support/valdiag/tests/bug-895992.c: added
1257         * support/valdiag/tests/bug-971834.c: added
1258
1259 2005-12-18 Raphael Neider <rneider AT web.de>
1260
1261         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
1262           (genUnpackBits): improved code for direct operands,
1263           (genPackBits): improved code for literal assignment to bitfields
1264             and for direct destination operands (no FSR indirection),
1265             prevented redundant AND, fixes #1362800,
1266           (AccLsh): added parameter to disable masking of the result
1267         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
1268           skip instructions with side-effects (like incfsz),
1269           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
1270         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
1271         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
1272           fixes #1375263
1273
1274 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
1275
1276         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
1277         volatile variables as spill location
1278
1279 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
1280
1281         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
1282         replacing literals
1283         * support/regression/tests/bug-1376320.c: added
1284
1285 2005-12-08 Raphael Neider <rneider AT web.de>
1286
1287         * src/pic/device.c: renamed is_shared to pic14_is_shared
1288         * src/pic/gen.c (genIfx): re-enabled handling of sbits
1289         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
1290           (is_valid_identifier): added for above workaround
1291
1292 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
1293
1294         * device/lib/Makefile.in: fixed to enable port-specific-objects
1295         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
1296           char, thanks Hubert Sack
1297         * doc/sdccman.lyx: documented --xstack-loc,
1298           elaborated a bit more on interrupts and pitfalls,
1299           removed "setjmp/longjmp unsupported",
1300           documented some unsupported C99 features
1301         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
1302         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
1303           if, thanks Hubert Sack
1304         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
1305         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
1306           make make_library
1307         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
1308           regression tests can report resource usage (rfe 700441)
1309         * support/regression/collate-results.py: report resource usage
1310         * support/regression/ports/ds390/spec.mk,
1311         * support/regression/ports/hc08/spec.mk,
1312         * support/regression/ports/mcs51/spec.mk,
1313         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
1314         * support/regression/ports/ds390/uCsim.cmd,
1315         * support/regression/ports/hc08/uCsim.cmd,
1316         * support/regression/ports/mcs51/uCsim.cmd,
1317         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
1318         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
1319           library, use the default one
1320         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
1321           building the library
1322
1323 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
1324
1325         * config.dsp: added dependency on .version and configure_vc.awk
1326         * device/include/setjmp.h: updated for --stack-auto and --xstack
1327         * device/include/mcs51/at89c51snd1c.h: corrected line endings
1328         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
1329         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
1330         * device/lib/libsdcc.lib: added _setjmp
1331         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
1332           (decorateType): fixed bug 1372851,
1333           (optimizeGetHbit): fixed warning
1334         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
1335           array initialisation
1336         * support/regression/tests/bug1057979.c: added test for bug 1358192
1337         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
1338
1339 2005-12-03 Borut Razem <borut.razem AT siol.net>
1340
1341         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
1342           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
1343
1344 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1345
1346         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
1347         createIval): implement symbol independant "flexible array member",
1348         (createIvalCharPtr): implemented flexible array initialisation with a
1349         string
1350         * src/SDCCsymt.c (copyStruct): removed,
1351         (getSize): fixed misleading comment,
1352         (getAllocSize): removed, the additional allocation size is now in
1353         sym->flexArrayLength,
1354         (checkStructFlexArray): new, syntax checks for flexible array members,
1355         (compStructSize): added syntax checks for "flexible array members"
1356         (copyStruct): removed,
1357         (copyLinkChain): removed inefficient fix for bug 770487
1358         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
1359         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
1360         symbol->flexArrayLength
1361         * src/SDCCerr.c,
1362         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
1363         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
1364         * support/regression/tests/structflexarray.c: added
1365         * support/valdiag/tests/structflexiblearray.c: added
1366
1367 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
1368
1369         * src/SDCCast.c (decorateType): fixed bug 1368489
1370         * support/Util/SDCCerr.c,
1371         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
1372
1373 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1374
1375         * device/include/mcs51/at89c51snd1c.h: added file submitted by
1376           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
1377
1378 2005-11-27 Borut Razem <borut.razem AT siol.net>
1379
1380         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
1381           support/cpp2/mkdeps.h: added command line option
1382           -obj-ext=<extension> to SDCPP to define object file externion, used
1383           for generation of make dependencies (-M)
1384         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
1385
1386 2005-11-26 Borut Razem <borut.razem AT siol.net>
1387
1388         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
1389           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
1390           added pic and pic16 libraries
1391
1392 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1393
1394         * device/include/float.h: Corrected typo in prototype of __fsgt
1395
1396 2005-11-25 Borut Razem <borut.razem AT siol.net>
1397
1398         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
1399           added creation of model-mcs51-stack-auto libraries
1400
1401 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
1402
1403         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
1404         and fields-list too
1405         * src/SDCCast.c (createIvalArray): removed obsolete comment
1406
1407 2005-11-24 Borut Razem <borut.razem AT siol.net>
1408
1409         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
1410           added missing device/lib/mcs51/crt*.asm sources
1411
1412 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
1413
1414         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
1415
1416 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
1417
1418         * device/lib/_fs2schar.c,
1419         * device/lib/_fs2sint.c,
1420         * device/lib/_fs2slong.c: optimized inline asm
1421
1422 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1423
1424         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1425           Better handling of floats between -1.0 and 0.0.
1426
1427 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1428
1429         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
1430           (the missing "if"s prohibited removal of redundant labels)
1431
1432 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1433
1434         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
1435           Properly convert floats between -1.0 and 0.0 to long, int, and char
1436           types (max integer value of negative floats tends to zero).
1437         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1438           Removed changes made so to work properly with floats between
1439           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
1440           and _fs2char.c
1441
1442 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1443
1444         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
1445         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
1446         (genCast) cosmetic change
1447         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1448         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1449         from mcs51
1450         * support/regression/tests/bitfields (testSignedBitfields): added
1451
1452 2005-11-18 Borut Razem <borut.razem AT siol.net>
1453
1454         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1455         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1456           introduced SILENT option to make building of pic16 libraries less
1457
1458 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1459
1460         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1461           Now they work properly with floats between -1.0 and 0.0
1462         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1463
1464 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1465
1466         * src/SDCCicode.c (printOperand): added missing else
1467
1468 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1469
1470         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1471         reformatted for better readability
1472         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1473         signed bitfields
1474
1475 2005-11-17 Borut Razem <borut.razem AT siol.net>
1476
1477         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1478           introduced SILENT option to make building of pic16 libraries less
1479           verbose - used for nightly snapshot build
1480         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1481           available on Win32 platforms.
1482         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1483           medium, large, pic and pic16
1484
1485 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1486
1487         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1488           printf("%f"...) sets fraction to zero.
1489
1490 2005-11-16 Raphael Neider <rneider AT web.de>
1491
1492         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1493           fixes #1357221
1494         * src/pic/gen.c (genIfx): implemented for CARRY bit
1495         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1496           to generic pointers, fixes #1357332,
1497           (pic16_movLit2f): NEW,
1498           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1499
1500 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1501
1502         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1503
1504 2005-11-11 Raphael Neider <rneider AT web.de>
1505
1506         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1507         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1508           compute pointer's type from operand,
1509           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1510           improved single bit reads, fixes bug #1353379
1511
1512 2005-11-09 Borut Razem <borut.razem AT siol.net>
1513
1514         * support/scripts/sdcc.nsi: added lib/pic to the package
1515
1516 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1517
1518         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1519
1520 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1521
1522         * support/regression/tests/bug1348008.c: added
1523         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1524         * support/regression/tests/bug1337835.c: updated comment
1525
1526 2005-11-06 Borut Razem <borut.razem AT siol.net>
1527
1528         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1529           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1530           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1531           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1532           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1533           dynamic construction of cl_error_class and derivates - 2.nd try
1534
1535 2005-11-05 Borut Razem <borut.razem AT siol.net>
1536
1537         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1538           bug, which caused Bus Errors on sparc solaris
1539
1540 2005-11-04 Borut Razem <borut.razem AT siol.net>
1541
1542         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1543           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1544           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1545           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1546           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1547           and derivates to resolve the initialization problem on OSX
1548
1549 2005-11-02 Borut Razem <borut.razem AT siol.net>
1550
1551         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1552           corrected typo - #include <winsock2.h>
1553
1554 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1555
1556         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1557           (_asxxxx_mapping): added org directive for future enhancements
1558
1559 2005-11-01 Borut Razem <borut.razem AT siol.net>
1560
1561         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1562           enabled sockets on WIN32
1563         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1564
1565 2005-10-31 Borut Razem <borut.razem AT siol.net>
1566
1567         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1568           WIN32 backslash path delimiters should be escaped when used in C strings
1569         * support/regression/tests/bitfields.c: exclude failing assertions for
1570           __CYGWIN32__ and __MINGW32__ hosts
1571
1572 2005-10-30 Borut Razem <borut.razem AT siol.net>
1573
1574         * src/SDCCutil.c: corrected double comparison typo
1575
1576 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1577
1578         * device/lib/medium/Makefile: added for new memory model medium
1579         * device/include/asm/mcs51/features.h: updated for medium/pdata
1580         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1581           added Multiply & Accumulate sbit's and MAC0_PAGE define
1582         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1583         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1584         * device/lib/_mullong.c: update for medium model
1585         * device/lib/incl.mk: added medium model
1586         * doc/sdccman.lyx: documented medium model
1587         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1588         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1589         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1590         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1591           (allocParms): set SCLS and OCLS to pdata for medium model
1592         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1593           for pdata,
1594           (powof2): return <0 if not power of 2
1595         * src/avr/gen.c (genBitWise): use updated powof2
1596         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1597           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1598           (shiftLLeftOrResult): use B if necessary
1599         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1600         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1601         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1602         * support/regression/Makefile.in: added test-mcs51-medium
1603         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1604
1605 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1606
1607         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1608         specifier unsigned
1609         * device/lib/time.c (mktime): fixed bug 1334315
1610
1611 2005-10-28 Raphael Neider <rneider AT web.de>
1612
1613         * device/include/pic/p16f_common.inc: added common declarations
1614         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1615
1616 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1617
1618         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1619           (aopPutUsesAcc): added to predict accumulator use,
1620           (assignResultValue): save acc if necessary,
1621           (genMinusDec): store result if indirectly addressed,
1622           (genDivOneByte):  save acc if necessary,
1623           (movLeft2Result): bugfix if left already in acc,
1624           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1625             attention to accumulator use (esp. pdata),
1626           (genReceive): receive pdata correctly
1627         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1628         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1629
1630 2005-10-27 Raphael Neider <rneider AT web.de>
1631
1632         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1633
1634 2005-10-27 Raphael Neider <rneider AT web.de>
1635
1636         * .version: changed version to 2.5.4
1637         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1638         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1639           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1640             arithmetics support routines
1641         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1642         * device/lib/Makefile.in: also create installdir for pic
1643
1644         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1645           pic14 port as well
1646         * src/pic/device.c (dump_sfr): rewritten to delegate register
1647           placement to the linker (use `extern sym' rather than sym EQU addr),
1648           (validAddress): fixed to check last specified address
1649         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1650           (popGetLit): truncate literal value to 8 bit,
1651           (popGet): moved assert to more appropriate place
1652           (popGetExternal): create pCode operand from and mark the according
1653             symbol as being `extern'
1654           (popGetAddr): added sanity check on immediate's offset, provide
1655             GPOINTER tag on demand
1656           (aopPut): fixed for immediates,
1657           (mov2w_op): move operand's address or contents to WREG (depending on
1658             operand type), safer variant of mov2w,
1659           (movwf,call_libraryfunc): NEW, handy abbreviations,
1660           (get_argument_pcop,get_return_val_pcop,pass_argument,
1661           get_returnvalue): interface for accessing function parameters and
1662             return values,
1663           (assignResultValuei,genRet): use new parameter/return value interface
1664           (pic14_getDataSize): back to old version handling generic pointers,
1665           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1666             provided implementation and/or fixed old one,
1667           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1668             calls, removed legacy 8051 reference code
1669           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1670           (loadSignToC): NEW, move the operands sign bit to CARRY,
1671           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1672             genRightShiftSigned, accepts negative shift counts,
1673           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1674           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1675             generic pointers, __data pointers and __code pointers,
1676           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1677             and signed bitfields, limit bitfields to 8 bit,
1678           (genDataPointerGet): fixed number of bytes read,
1679           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1680           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1681             pointers to constant data are no longer assumed to point to __code
1682             space, removed invalid pointer types,
1683           (bitpatternFromVal): retrieve the PICs representation of an integer
1684             or float literal,
1685           (genDataPointerSet): fixed assigning to po_immediate operands,
1686           (genGenPointerSet): implemented as library call,
1687           (genIfx): fixed incorrect condition,
1688           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1689             provide GPOINTER tag according to destination's storage class,
1690           (genCast): added code to handle casting to generic pointers, added
1691             sign-/zero extension of the result
1692           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1693         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1694         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1695           extend the result
1696         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1697           address/register resides in the shared banks
1698           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1699             put all variables into separate sections (have the linker arrange
1700             them)
1701           (picglue): put init code and interrupt handlers in separate sections
1702         * src/pic/main.c: added port specific options table, modified to PORT
1703           structure to make GPOINTERs 3 byte, added pic14_options
1704           (_pic14_do_link): private linking routine (update paths to libraries,
1705             add libsdcc.lib by default)
1706         * src/pic/main.h: declare pic14_options
1707         * src/pic/pcode.c: fixed instructions i/o relations,
1708           (RegCond): reverted to correct version,
1709           (newpCodeOpLit): truncate literals to 8 bit,
1710           (genericPrint): added debug output,
1711           (getRegFromInstruction): fixed for various operand types, simplified
1712           (BuildFlow): fixed broken handling of isntructions with labels
1713           (LinkFlow): start at last instruction in flow (skip trailing comments),
1714             pass the flow on to the next instruction after CALL
1715           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1716           (insertPCodeInstruction): fixed inserting after a skip instruction,
1717           (DoBankSelect): fixed for labeled instructions
1718           (OptimizepBlock): honor --nopeep switch
1719           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1720         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1721         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1722           (pCodeOptime2pCodes): allow disabling this optimization via
1723             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1724             but is still buggy), started implementation of a dataflow based
1725             pCode optimization (CSE + dead code elimination)
1726           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1727         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1728           names are independant of the stack location and therefore portable across
1729           devices
1730
1731 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1732
1733         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1734           (selectSpil): fixed bug 1337835 by not spilling bit variables
1735         * support/regression/tests/bug1337835.c: added test for this bug
1736         * src/mcs51/peeph.def: restart after rule 3.c,
1737           addded rules 263.x to optimize loading constants
1738
1739 2005-10-26 Raphael Neider <rneider AT web.de>
1740
1741         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1742         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1743           (genAssign): emit warning when casting literals to generic pointer
1744             type, also applies when taking the address of a fixed variable,
1745           (genCast): improved casting to generic pointers
1746         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1747           extern variables, added verbose error message
1748         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1749
1750 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1751
1752         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1753         carry must be complemented too
1754         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1755         could be emitted by genMinus
1756         * src/SDCCval.c (constVal): fixed bug 1305065
1757
1758 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1759
1760         * src/SDCCast.c (addCast): added promotion for bit variables
1761         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1762         promotion casts + optimisation
1763         (optimizeGetWord): fix warning 'i' might be used uninitialized
1764         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1765         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1766
1767 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1768
1769         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1770         all chars are promoted to int; promotion should be handled in SDCCast.c
1771
1772 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1773
1774         * device/lib/_strcmp.c: Fixed bug 1326457
1775
1776 2005-10-11 Raphael Neider <rneider AT web.de>
1777
1778         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1779         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1780
1781 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1782
1783         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1784         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1785
1786 2005-10-04 Raphael Neider <rneider AT web.de>
1787
1788         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1789           device/lib/pic16/pics.all: added pic18f1320
1790         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1791
1792 2005-09-30 Raphael Neider <rneider AT web.de>
1793
1794         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1795         * src/pic16/devices.inc: NEW, provides device descriptions
1796         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1797
1798 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1799
1800         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1801           GETHBIT
1802
1803 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1804
1805         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1806           documented Any Order Bit, Higher Order Byte and Higher Order Word
1807         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1808         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1809           (optimizeGetAbit): new, to get any bit, not only the high bit,
1810           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1811           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1812           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1813           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1814             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1815             GETABIT, GETBYTE, GETWORD: decorate them,
1816           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1817           (ast_print): added GETABIT, GETBYTE, GETWORD
1818         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1819         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1820           (geniCodeBinary): new generic binary icode,
1821           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1822         * src/port.h: updated comment for PORT.hasExtBitOp
1823         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1824           (genGetByte): new, to get a single byte,
1825           (genGetWord): new, to get a word from a long,
1826           (gen51Code): added GETABIT, GETBYTE, GETWORD
1827         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1828
1829 2005-09-23 Raphael Neider <rneider AT web.de>
1830
1831         * configure.in, configure: have device/lib/pic configured
1832         * device/lib/Makefile.in: added model-pic14
1833         * device/lib/clean.mk: added pic/ to clean rule
1834         * device/lib/pic: added rudimentary pic14 library providing support
1835           functions for multiplication/division/generic pointer access
1836         * src/SDCCopt.c (convilong): mark support functions as extern
1837           for pic14 port as well
1838         * src/pic/gen.c (genMult): added assertions,
1839           (genpic14Code): emit warning on unhandled iCodes
1840         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1841         * src/pic/pcode.c (pCodeOpCopy),
1842         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1843           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1844           SFR_REGISTER}), made safe for future extensions
1845         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1846           instructions even if preceeded by SKIP instructions (also remove
1847           them); removed unused code
1848         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1849           prevents leaving parts of the structure uninitialized after copying
1850
1851 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1852
1853         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1854           ago by me
1855         * support/regression/tests/addsub.c: added test for the bug
1856
1857 2005-09-21 Raphael Neider <rneider AT web.de>
1858
1859         * device/include/pic16/pic18f1220.h,
1860           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1861         * device/lib/pic16/Makefile.rules: added missing opening paren
1862         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1863           are provided in genutils.c,
1864           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1865           operand/result sizes,
1866           (genCmp): assert on NULL pointers first, then check deref'ed values
1867         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1868           result size
1869
1870 2005-09-18 Raphael Neider <rneider AT web.de>
1871
1872         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1873           as these are now unused,
1874           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1875         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1876           local, avoids uninitialized pointer dereference on r->name
1877         * src/pic16/ralloc.c (newReg): fixed indentation
1878
1879 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1880
1881         * src/SDCCval.c (constVal): fixed bug 730366
1882         * support/Util/SDCCerr.c,
1883         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1884
1885 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1886
1887         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1888
1889 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1890
1891         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1892
1893 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1894
1895         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1896           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1897         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1898           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1899         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1900         * packihx/packihx.c (hexDigit): made c unsigned char
1901         * as/mcs51/lklibr.c (fndsym),
1902         * link/z80/lkgb.c (gb),
1903         * link/z80/lklibr.c (fndsym),
1904         * link/z80/lkrloc.c (relr),
1905         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1906         * src/SDCC.lex (checkCurrFile, process_pragma),
1907         * src/SDCCglue.c (spacesToUnderscores),
1908         * src/SDCCmain.c (setParseWithComma, processFile),
1909         * src/asm.c (tvsprintf, printCLine),
1910         * src/avr/gen.c (emitcode, aopPut),
1911         * src/ds390/gen.c (emitcode),
1912         * src/hc08/gen.c (emitcode, emitinline),
1913         * src/mcs51/gen.c (emitcode, genInline),
1914         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1915           tokenizeLineNode),
1916         * src/pic/ralloc.c (debugLog),
1917         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1918           tokenizeLineNode),
1919         * src/pic16/ralloc.c (debugLog),
1920         * src/z80/main.c (_process_pragma):
1921            made all ctype.h function calls safe
1922         * src/SDCCopt.c: include math.h for fabs
1923         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1924           and used them throughout the code to make ctype.h function calls safe
1925         * src/ds390/main.c (asmLineNodeFromLineNode),
1926         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1927         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1928            unsigned char*
1929         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1930           (newpCodeAsmDir): made ctype.h function calls safe
1931         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1932           pic16_emitcode):  made lbp unsigned char*
1933         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1934           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1935         * src/xa51/gen.c (emitcode),
1936         * src/z80/gen.c (_emit2): made lbp unsigned char*
1937         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1938            char*
1939
1940 2005-09-05 Raphael Neider <rneider AT web.de>
1941
1942         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1943           access bank splitpoint
1944
1945 2005-09-05 Raphael Neider <rneider AT web.de>
1946
1947         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1948
1949 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1950
1951         * .version: changed to version 2.5.3
1952         * doc/sdccman.lyx: changed version to 2.5.3,
1953           documented --codeseg and --constseg and pragma codeseg and constseg,
1954           documented bit parameters (reentrant) and bit returning
1955         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1956            currFunc->recvSize, but is this ok for all ports?
1957           (ast2iCode): result of ~ on unsigned char must be cast to int for
1958            bool to work
1959         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1960           function pointers in bit space
1961         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1962           (processFuncArgs): call port.reg_parm() with reentrancy info
1963         * src/port.h,
1964         * src/avr/main.c,
1965         * src/ds390/main.c,
1966         * src/hc08/main.c,
1967         * src/pic/main.c,
1968         * src/pic16/main.c,
1969         * src/xa51/main.c,
1970         * src/z80/main.c: port.reg_parm prototype extended with
1971           "bool reentrant" parameter
1972         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1973           options.stackAuto for allocating bit register parameters
1974         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1975           (genSend): set BitBankUsed if it is,
1976           (selectRegBank): factored out of genCall for use in genPcall,
1977           (genCall): removed redundant dtype assignmen, use selectRegBank,
1978           (genPcall): handle returning in Carry properly, save in F0 if needed,
1979           (genReceive): handle bit register parameters
1980         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1981           (mcs51_assignRegisters): enable bit registers for all reentrant
1982            functions and don't set BitBankUsed unconditionally
1983         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1984         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1985         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1986
1987 2005-08-27 Borut Razem <borut.razem AT siol.net>
1988
1989         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1990         ppc-osx (Darwin) does not support -u option. It seems that it is
1991         supported only on Linux - GNU cp
1992
1993 2005-08-25 Borut Razem <borut.razem AT siol.net>
1994
1995         * sim/ucsim/gui.src/serio.src/Makefile.in,
1996           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1997           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1998           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1999           install and strip, since the strip at /usr/ccs/bin should be used
2000           on solaris
2001
2002 2005-08-24 Borut Razem <borut.razem AT siol.net>
2003
2004         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
2005
2006 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
2007
2008         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
2009         ffffffffu
2010
2011 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
2012
2013         * as/mcs51/aslink.h: completed lkrloc.c prototypes
2014         * as/mcs51/lkmain.c (link_main): fixed warning
2015         * device/include/stdbool.h: ds390 has no advanced bit support yet
2016         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
2017         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
2018         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
2019           and updated their macros
2020         * src/SDCCval.c (constVal): updated comment for renamed b_long
2021
2022 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
2023
2024         * as/mcs51/asdata.c: changed ctype['['] to BINOP
2025         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
2026           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
2027           (oprio): set priority for '['
2028         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
2029            and adb_24_bit
2030         * as/mcs51/asm.h: added defines R_BIT and S_BIT
2031         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
2032         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
2033         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
2034           added overlayable BIT_BANK area
2035         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
2036           (summary2): explain 'T' in legenda
2037         * as/mcs51/lkrloc.c: replaced old K&R style,
2038           (relr): added R_BIT processing,
2039           (errmsg): added "Bit-addressable relocation error",
2040           (adb_bit): added for converting from byte- to bit-addressable space,
2041           (adb_24_bit): added for converting from byte- to bit-addressable space
2042         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
2043            used in reentrant functions now even as return value
2044         * device/lib/_gptrput.c (_gptrput): removed obsolete code
2045         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
2046           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
2047         * src/SDCCglobl.h: added indicator BitBankUsed
2048         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
2049            the bit registers b0-b7
2050         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
2051           (geniCodeCast): fixed bug 1263853,
2052           (geniCodeLogicAndOr): put result in bool or char,
2053           (geniCodeReceive): added parameter func for accessing the return type,
2054           (geniCodeFunctionBody): pass func to geniCodeReceive
2055         * src/SDCCmain.c: added indicator BitBankUsed
2056         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
2057         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
2058           (checkSClass): don't put automatic bool/bit on stack,
2059           (checkFunction): removed check on function cannot return bit
2060         * src/SDCCsymt.h: added newBoolLink prototype
2061         * src/mcs51/gen.c (rb1regs): added bit registers,
2062           (movc): created for assigning to carry,
2063           (pushReg, popReg): created for pushing registers,
2064           (sameRegs): check both AOP_REG and AOP_CRY types,
2065           (aopOp): handle bit registers,
2066           (aopPut): optimization no self-assign,
2067           (saveRegisters): push reg->base (bits) only once for bit registers,
2068            and use pushReg,
2069           (unsaveRegisters): pop reg->base only once and use popReg,
2070           (assignResultValue): added parameter func and return in carry for bits,
2071           (genIpush): optimization no reload in A if not changed,
2072           (genSend): bit parameters in reentrant functions are passed in bit
2073            registers by first assigning to bits in B, then save registers and
2074            copy B to bits,
2075           (genCall): handle returning in Carry properly, save it in F0 if needed,
2076           (genPcall): updated assignResultValue call, this is not safe yet for bit
2077            returning function !!!
2078           (genFunction): don't generate equ's for bit registers and use pushReg,
2079           (genEndFunction): take care of bit returning functions and use popReg,
2080           (genRet): return bit in Carry,
2081           (genIfx): optimize bit registers and other directly addressable bits,
2082           (genReceive): updated assignResultValue call
2083         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
2084           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
2085            registers when using stack-auto
2086         * src/mcs51/ralloc.c (_G): added allBitregs,
2087           (regs8051): added the bit registers,
2088           (createStackSpil): use macro IS_BIT,
2089           (getRegBit): added to allocate a bit register, else spill,
2090           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
2091           (updateRegUsage): factored out to ease stepping while debugging,
2092           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
2093            also allocate bit registers,
2094           (fillGaps): handle bit registers,
2095           (findAllBitregs): added to create bit vector with all bit registers,
2096           (mcs51_allBitregs): returns this bit vector,
2097           (mcs51_assignRegisters): when using stack-auto use bit registers for
2098            passing parameters and creating local variables
2099         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
2100
2101 2005-08-22 Borut Razem <borut.razem AT siol.net>
2102
2103         * device/lib/Makefile.in: replaced find option -or with -o
2104           to make it run on solaris
2105
2106 2005-08-22 Raphael Neider <rneider AT web.de>
2107
2108         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
2109           fixes #1265442 (crash on Solaris)
2110
2111 2005-08-20 Borut Razem <borut.razem AT siol.net>
2112
2113         * configure, configure.in: added tests for libsocket and libnsl libraries,
2114           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
2115           from support/regression/Makefile.in
2116         * support/regression/Makefile.in: added
2117         * device/lib/pic16/Makefile.common.in: force make to use bash shell
2118         * sim/ucsim/libtool: regenerated on sparc-solaris
2119         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
2120           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
2121           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
2122           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
2123           sparc-solaris, which doesn't use GNU ld linker
2124         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
2125         * as/Makefile: find on sparc-solaris does not support -maxdepth option
2126
2127 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
2128
2129         * src/mcs51/peeph.def: updated comments
2130
2131 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2132
2133         * device/lib/_gptrget.c,
2134         * device/lib/_gptrput.c: slightly shorter
2135         * doc/sdccman.lyx: incremented version
2136         * src/mcs51/peeph.def: moved peephole comments to the line of first
2137           change to better keep line correlation, reanimated 186.e
2138         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
2139
2140 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2141
2142         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
2143           David Saxton with quotes around file name.
2144
2145 2005-08-15 Borut Razem <borut.razem AT siol.net>
2146
2147         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
2148           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
2149           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
2150           make tests run on x86_64 platform
2151
2152 2005-08-13 Raphael Neider <rneider AT web.de>
2153
2154         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
2155           as it might be executed DURING a build (parallel make is wonderful)
2156
2157 2005-08-13 Raphael Neider <rneider AT web.de>
2158
2159         * device/lib/Makefile.in (port-specific-objects-pic16):
2160           revert to cp $(PORT)/bin/*.* $(PORTDIR)
2161         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
2162           dependency
2163         * device/lib/pic16/Makefile.rules: build subdirs before creating
2164           the library, removed builddir rule, create $(builddir) early in
2165           recurse rule, use empty recurse rule for leaf directories
2166         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
2167           mkdir errors (race condition), removed duplicate suffix "hex"
2168           from clean rules
2169         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
2170         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
2171           prevents mkdir -p from aborting on Alpha
2172
2173 2005-08-12 Raphael Neider <rneider AT web.de>
2174
2175         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
2176           db-statements in order to allow for arrays of pointers in code
2177           sections to be placed without interspersed 0-padding, fixes
2178           bug #1256215
2179         * (emitStatistics): fixed division by zero for pic18f1220
2180         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
2181           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
2182         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
2183         * (pic16_pCodeConstString): keep track of already emitted string
2184           literals to prevent "duplicate definitions of symbol _str_NR"
2185         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
2186           debug message
2187         * device/lib/Makefile.in: ignore failing PIC16 library builds
2188         * device/lib/pic16/Makefile: do not build if gputils are missing
2189         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
2190
2191 2005-08-10 Raphael Neider <rneider AT web.de>
2192
2193         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
2194           my last commit)
2195
2196 2005-08-10 Raphael Neider <rneider AT web.de>
2197
2198         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
2199           Rokas' patch to add the new fixed point type "__fixed16x16"
2200         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
2201           functions for __fixed16x16 arithmetics
2202         * device/lib/pic16: reimplemented the build system to support
2203           a separate build directory, better handling of libio (create
2204           the library in a separate subdir for each architecture) and
2205           easier configuration (centralized in Makefile.common)
2206
2207 2005-08-07 Raphael Neider <rneider AT web.de>
2208
2209         * src/pic16/gen.c (genrshTwo): fixed sign extension
2210         * src/pic16/device.c: added pic18f2320, 4220 and 4320
2211         * device/include/pic16/pic18f2220.h: changed some bit definitions,
2212           added T0CONbits
2213         * device/include/pic16/pic18f4220.h: NEW, header for
2214           pic18f4220 and pic18f4320
2215         * device/include/pic16/pic18fregs.h: added new devices,
2216           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
2217         * device/include/pic16/signal.h: resolved name clashes
2218           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
2219           to also allow testing for interrupt enable bits, added
2220           comments on how to use the macros
2221         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
2222         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
2223           register definitions for the devices
2224         * device/lib/pic16/pics.all: added new devices
2225         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
2226           allocated memory
2227         * device/lib/pic16/libc/stdlib/memfree: do not count
2228           the block header as free memory
2229         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
2230           simplified and added missing end-of-blocklist-marker
2231           (reported by Peter Onion, fixes #1252814)
2232         * (_mergeHeapBlock): fixed loop condition
2233         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
2234           len==0, restructured code
2235         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
2236           up a bit, reduced bitfield accesses, prevent endless loops
2237           in case of heap corruption
2238         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
2239           "unreferenced arguments/must return a value" warnings
2240         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
2241           replaced BAUDREG with SPBRG
2242         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
2243           device/lib/pic16/debug/gstack/gstack.c: replaced
2244           _naked, _asm, _endasm with __naked, __asm, __endasm
2245
2246 2005-08-05 Raphael Neider <rneider AT web.de>
2247
2248         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
2249           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
2250
2251 2005-08-05 Borut Razem <borut.razem AT siol.net>
2252
2253         * device/lib/Makefile.in: added missing ';'
2254         * configure: removed ^M characters
2255
2256 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2257
2258         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
2259           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
2260           License
2261
2262 2005-08-04 Borut Razem <borut.razem AT siol.net>
2263
2264         * configure.in: pic16 libraries build 2nd try - enable running
2265           configure in device/lib/pic16
2266         * configure: regenerated from configure.in
2267         * device/lib/Makefile.in: create $(PORT)/bin directory
2268
2269 2005-08-03 Raphael Neider <rneider AT web.de>
2270
2271         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
2272           to get/set values via pointers
2273         * (genUnpackBits,genPackBits): changed detection of
2274           ptr->bitfield vs. sym.bitfield, fixed access via generic
2275           pointers, removed dead (wrong) code for multibyte bitfields
2276         * (genNearPointerGet, genGenPointerGet): removed useless code,
2277           fixed bitfield detection, fixes #1250594
2278         * (genNearPointerSet): removed useless code
2279         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
2280           and introduced macro pic16_emitpcode that conditionally emits
2281           the origin of the following pCode (useful for debugging SDCC)
2282         * src/pic16/pcode.c: changed (and disabled) some debug outputs
2283         * (createDefmap): fixed handling of LFSR for --optimize-df
2284
2285 2005-08-02 Borut Razem <borut.razem AT siol.net>
2286
2287         * device/lib/Makefile.in: pic16 libraries build enabled since
2288           gputils-0.13.2 are now localy installed at sourceforge's compile farm
2289
2290 2005-08-02 Raphael Neider <rneider AT web.de>
2291
2292         * src/pic16/gen.c (genPackBits): removed deprecated warning
2293         * (genGenPointerSet): fixed bitfield detection
2294
2295 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2296
2297         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
2298
2299 2005-07-31 Raphael Neider <rneider AT web.de>
2300
2301         * device/lib/pic16/libdev/pic18f458.c,
2302           device/include/pic16/pic18f458.h: added missing T0CONbits
2303
2304 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2305
2306         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
2307
2308 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
2309
2310         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
2311
2312 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2313
2314         * device/include/mcs51/at89c51ed2.h: added.
2315
2316 2005-07-23 Raphael Neider <rneider AT web.de>
2317
2318         * src/pic/gen.h: added emitpcode macro for debugging
2319         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
2320           and replace by macro adding debug information on demand
2321         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
2322         * (gencjne): tried to fix; replaced with correct (slower) code
2323         * (gen{Unp,P}ackBits): fixed single bit access
2324         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
2325         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
2326           previous instruction
2327         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
2328           register has to be handled with care (forbidding movement
2329           of assignments/uses, removing assignments completely, ...)
2330         * (pCodeOptime2pCodes): make use of regIsSpecial
2331         * added lots of debugging output (commented out)
2332         * src/pic/rallloc.c (deassignLRs): prevent operand registers
2333           from being reused as result UNLESS it is known to work
2334
2335 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
2336
2337         * support/Util/dbuf.h: include <stddef.h> for size_t
2338         * .version: changed to version 2.5.2
2339
2340 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2341
2342         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
2343
2344 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2345
2346         * src/hc08/gen.c (genMinus): fixed bug #1241835,
2347           (genModOneByte): removed needless psha/pula
2348
2349 2005-07-22 Raphael Neider <rneider AT web.de>
2350
2351         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
2352           have PIC14 handled like PIC16, fixes broken pic14 linker calls
2353         * src/pic/gen.c (resolveIfx): do not "invent" labels
2354         * (genSkipc): changed to positive logic
2355         * (genSkipCond): removed as no longer needed
2356         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
2357           backport from PIC16
2358         * (genLeftShift): check operands are in different registers
2359         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
2360           INCF does not update CARRY...
2361         * src/pic/main.c: fixed _linkCmd
2362         * src/pic/pcode.c (unlinkpCode): added inactive code
2363         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
2364           alive (do not assign result and operand overlapping registers)
2365
2366 2005-07-22 Raphael Neider <rneider AT web.de>
2367
2368         * src/pic/device.c (dump_sfr): replaced register declaration with
2369           call to emitSymbolToFile() to avoid duplicate symbols
2370         * (assignRelocatableRegisters): do not declare external symbols
2371         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
2372           right (take size of type, not etype)
2373         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
2374         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
2375         * (packRegsForAccUse): disabled assignment of WREG as
2376           the result reg to prevent occurence of just fixed #1235003,
2377           fixes #1242954
2378         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
2379           symbols (avoids duplicate symbols in .asm file)
2380         * (pic14emitRegularMap): use emitSymbolToFile()
2381         * src/pic/gen.c (aopOp): fixed spillLocation handling
2382         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
2383         * (genDataPointerSet): removed unneccessary variables/output
2384
2385 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
2386
2387         * as/mcs51/lkarea.c: enlarged codemap for banked memory
2388         * device/lib/mcs51/crtbank.asm: added # to 0x0F
2389
2390 2005-07-21 Raphael Neider <rneider AT web.de>
2391
2392         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
2393           architecture cannot handle them efficiently, fixes bug #1235003
2394         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
2395           check for empty sets before using them (fixes bug #1232190)
2396
2397 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
2398
2399         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
2400           (lnksect2): generate warnings for memory overlap
2401         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
2402           constseg to set the name of these segments so you can instruct the linker
2403           to place them in banks
2404         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
2405         * src/SDCCglobl.h: added MODEL_HUGE to enum,
2406           added code_seg and const_seg to options
2407         * src/SDCCglue.c (emitMaps): use options.const_seg,
2408           (createInterruptVect): put interrupt vectors in segment HOME,
2409           (glue): put HOME before static segment and put the main glue in HOME,
2410           (glue): use options.code_seg
2411         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
2412         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
2413           these segments so you can instruct the linker to place them in banks
2414           (linkEdit): use code_loc for HOME segment which should be the first
2415           segment in code memory now
2416         * src/SDCCmem.c: fixed more stuff like bug 1238386
2417         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
2418           (changePointer): don't change function pointers to code pointers for
2419           banked functions,
2420           (compareType): added exceptional check for banked function pointers
2421         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
2422         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
2423           after static in code memory
2424         * src/mcs51/gen.c: added aopLiteralLong prototype,
2425           (aopForSym): use getSize for functions,
2426           (genCall): generate banked calls over one trampoline __sdcc_banked_call
2427           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
2428           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
2429           the segment,
2430           (genPcall): use call for literal function pointers and generate banked
2431           calls over the one trampoline so there's only one place for the user to
2432           modify according to his/hers hardware,
2433           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
2434           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
2435         * src/mcs51/main.c: added keyword banked,
2436           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
2437         * support/Util/SDCCerr.c,
2438         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
2439           needed for passing the bank and address to the trampoline
2440         * device/lib/mcs51/crtbank.asm: added for bankswitching
2441         * device/lib/mcs51/Makefile: added crtbank
2442
2443 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2444
2445         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
2446           for fields at offset 0 of a struct or union as reported
2447           on 2005-07-07 in the developer mailing list.
2448
2449 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2450
2451         * src/SDCCmem.c: fixed bug 1238386
2452
2453 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2454
2455         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2456           (patch #1144962), added peephole 300, enabled 259.x
2457         * doc/sdccman.lyx: removed screenshot and provided link instead
2458
2459 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2460
2461         * doc/sdccman.lyx: added section about debugging with ddd
2462         * doc/figures/ddd_example.eps: screenshot of debugging session
2463
2464 2005-07-04 Raphael Neider <rneider AT web.de>
2465
2466         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2467           like CODE pointers, fixes #1115683
2468         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2469           call, fixes bugs #1232211, #1228110,
2470           fixed wrong casts to pCodeFlow from pCodeInstructions
2471
2472 2005-07-04 Raphael Neider <rneider AT web.de>
2473
2474         * src/pic/gen.c (popGet): changed assert to allow for
2475           bit operands
2476         * (popGetAddr): changed signature to provide
2477           an additional index, patched all call sites
2478         * (genCmpEq): handle literal-like operands correctly
2479         * (genAddrOf): added sanity checks on __code/__data pointers
2480         * (genAssign): added handling of symbols from __code section
2481         * (gencjne): do not generate code for comparisons whose result
2482           is neither stored nor used, fixes bug #1171114
2483         * (AccLsh, AccRsh): operate on operand instead of WREG
2484         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2485           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2486           by known count
2487         * rewrote complete shift-by-literal logic, commented unused
2488           functions out
2489         * (genConstPointerGet): get multiple bytes (if result size > 1),
2490           fixed handling of non-immediate addresses
2491         * (genPointerGet): handle CODE pointers like CONST pointers
2492         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2493         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2494           operand is to be treated as a literal or not
2495         * (mov2w,genPcall,genCmpEq),
2496           src/pic/genarith.c: use aop_isLitLike() to decide between
2497           literal/register contents
2498         * (addSign): added missing offset
2499         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2500           only emit comment in debug-mode,
2501           use {aop,op}_isLitLike throughout the file
2502         * src/pic/glue.c: fix initializers for pointers (work in progress)
2503         * src/pic/pcode.c (get_op): honor index on _const symbols
2504         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2505         * (dumppBlock): added pCode size estimation
2506         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2507           check for IS_SYMOP before OP_SYMBOL'ing
2508         * fixed indentation, compacted switch-statements
2509         * (allocReg): find free register and allocate it instead of
2510           allocating new registers all the time
2511         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2512           registers as its operands (necessary only for multibyte GETs)
2513
2514 2005-07-01 Raphael Neider <rneider AT web.de>
2515
2516         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2517           debugging .asm-output macros FENTRY + FEXIT
2518         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2519           way... I wonder...
2520         * (emitpComment): NEW, printf to pCode
2521         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2522           offset handling
2523         * (popGetAddr): NEW, variant of popGet to access an immediates
2524           high(er) bytes instead of the n'th byte of memory they reference,
2525           replaced popGet with popGetAddr where neccessary
2526         * (genDataPointerGet): reactivated and fixed implementation
2527         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2528           accesses
2529         * (genDataPointerSet): fixed multibyte assignments
2530         * (genpic14Code): fixed --i-code-in-asm handling
2531         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2532         * (genPlus): fixed index-out-of-bounds error
2533         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2534         * src/pic/ralloc.c: added debugging output macro FENTRY2
2535         * (spillThis): fixed indentation, enbraced for-body for clarity
2536         * (rematStr): commented out as now unused
2537         * (regTypeNum): commented out special spill case (overwrites
2538           arbitrary values)
2539         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2540
2541 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2542
2543         * doc/sdccman.lyx: documented sfr16/sfr32,
2544           added example for using storage class with function pointers
2545         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2546
2547 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2548
2549         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2550         * device/lib/_itoa.c,
2551         * device/lib/_ltoa.c: optimized codesize
2552         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2553           but don't know how to suppress the double warning.
2554         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2555         * support/Util/SDCCerr.c,
2556         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2557
2558 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2559
2560         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2561           fixed old K&R prototypes
2562         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2563         * device/lib/_gptrget.c,
2564         * device/lib/_gptrgetc.c,
2565         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2566           also new versions for small generic pointers and banked generic pointers
2567         * src/port.h: added const_name
2568         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2569         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2570         * src/SDCCcse.c (findPrevIc): check all associative operators
2571         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2572         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2573         * src/SDCCmem.c: updated comments,
2574           set far-space to 0 for pdata, results in optimized code
2575         * src/SDCCmem.h: added macro CONST_NAME
2576         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2577           moving the info into the highest bits, see also gptrget/gptrput
2578         * src/src.dsp: added sdcc.ico to project files
2579         * src/avr/gen.c (genCast): fixed bug 0x%d
2580         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2581         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2582           relation between ptr_type and DCL_TYPE,
2583           (genCast): fixed bug 0x%d
2584         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2585           (CODE)" for const_name
2586         * src/hc08/gen.c (genCast): fixed bug 0x%d
2587         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2588           (hc08_port): added "CONST (CODE)" for const_name
2589         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2590           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2591           between ptr_type and DCL_TYPE,
2592           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2593           operand* and took AOP() inside function so sfr-ness can be checked,
2594           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2595           new prototype,
2596           (genFunction, genEndFunction): optimized stack setup,
2597           (genMinus): optimized for literals with ending zeroes (in bytes),
2598           (genCast): fixed bug 0x%d
2599         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2600           (mcs51_port): added "CONST (CODE)" for const_name
2601         * src/mcs51/peeph.def: made rule 226 more generic
2602         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2603         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2604         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2605         * src/z80/main.c (z80_port): added NULL for const_name,
2606           (gbz80_port): added NULL for const_name
2607         * support/regression/tests/bug663539.c,
2608         * support/regression/tests/sfr16.c: new tests
2609
2610 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2611
2612         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2613
2614 2005-06-24 Raphael Neider <rneider AT web.de>
2615
2616         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2617           corrected typos...
2618         * device/include/pic16/signal.h: added USBIF
2619           and SIG_USB
2620
2621 2005-06-24 Raphael Neider <rneider AT web.de>
2622
2623         * device/lib/pic16/libdev/pic18f2455.c,
2624           device/include/pic16/pic18f2455.h: NEW
2625         * device/include/pic16/pic18fregs.h,
2626           device/lib/pic16/pics.all,
2627           src/pic16/device.c: added 18f2455
2628         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2629           device/include/pic16/{pic18f[68][567].h,usart.h}:
2630           replaced MULTIPLE_USARTS define with more relaible
2631           compatibility sfrs (for USART access)
2632
2633 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2634
2635         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2636           and the output asm file line is printed on two lines.
2637
2638 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2639
2640         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2641           BGT, BLE, BHI, and BLS instructions
2642         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2643           genCmpEq): removed
2644         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2645           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2646           fixes bug #1216342
2647         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2648
2649 2005-06-15 Raphael Neider <rneider AT web.de>
2650
2651         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2652         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2653         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2654           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2655           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2656
2657 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2658
2659         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2660           Marcel Telka in bug #1215704
2661
2662 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2663
2664         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2665           located in shared memory bank.
2666
2667 2005-05-31 Raphael Neider <rneider AT web.de>
2668
2669         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2670           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2671           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2672
2673 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2674
2675         * device/lib/_strncpy.c: fixed the fix
2676
2677 2005-05-26 Raphael Neider <rneider AT web.de>
2678
2679         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2680           initializers with \0, bug #1208187
2681         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2682           intializers with \0, bug #1208187
2683
2684 2005-05-26 Raphael Neider <rneider AT web.de>
2685
2686         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2687           initializers with \0, bug #1208187
2688         * src/pic16/main.c (_process_pragma): added sanity checks
2689           for stack position and size, emit warnings when appropriate
2690
2691 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2692
2693         * device/lib/_strncpy.c: fixed not filling with \0
2694
2695 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2696
2697         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2698           createFunction),
2699         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2700           compound_statement),
2701         * src/SDCCsymt.h,
2702         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2703
2704 2005-05-24 Raphael Neider <rneider AT web.de>
2705
2706         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2707
2708 2005-05-24 Raphael Neider <rneider AT web.de>
2709
2710         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2711           TRISE definitions, closes bug #1162453
2712
2713 2005-05-22 Raphael Neider <rneider AT web.de>
2714
2715         * src/pic16/main.c (_process_pragma): check for missing
2716           arguments to pragmas code and udata
2717         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2718           consistency fixes to match other headers (thanks to Jim Paris)
2719         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2720
2721 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2722
2723         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2724
2725 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2726
2727         * support/regression/tests/bug1198642.c: new test
2728         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2729         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2730         * support/scripts/resource.h,
2731         * support/scripts/resource.rc,
2732         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2733         * support/scripts/sdcc.ico: added 32x32 icon
2734
2735 2005-05-18 Raphael Neider <rneider AT web.de>
2736
2737         * device/lib/pic16/libdev/pic18f*.c,
2738         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2739           keywords to "__sfr" and "__at (X)"
2740         * device/include/pic16/pic18fregs.h: added pic18f4520
2741         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2742           #1203088 (MPLAB compatibility)
2743
2744 2005-05-17 Raphael Neider <rneider AT web.de>
2745
2746         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2747         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2748         * device/lib/pic16/pics.all: added new devices
2749         * src/pic16/device.c: added support for pic18f4520
2750
2751 2005-05-16 Raphael Neider <rneider AT web.de>
2752         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2753         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2754         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2755           convenience function for bit access
2756
2757 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2758
2759         * device/lib/printf_large.c: fixed bug 1193299
2760         * support/regression/tests/bug1057979.c: added test %3.3s
2761
2762 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2763
2764         * device/include/mcs51/8051.h,
2765         * device/include/mcs51/8052.h: made parseable with lint
2766         * device/include/mcs51/lint.h: added include file for (sp)lint
2767         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2768         * doc/cdbfileformat.lyx,
2769         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2770
2771 2005-05-14 Raphael Neider <rneider AT web.de>
2772
2773         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2774         * device/lib/pic16/libc/stdlib/itoa.c (new)
2775         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2776         * device/lib/pic16/libio/Makefile: exclude subdir according to
2777           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2778         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2779         * src/pic16/gen.c (genFunction): prevent annoying warning
2780         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2781           nameclashes on BeOS
2782         * support/cpp2/cppmain.c (cpp_output_string): new
2783         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2784           fixes bug 1116802
2785
2786 2005-05-13 Borut Razem <borut.razem AT siol.net>
2787
2788         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2789
2790 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2791
2792         * .version: changed to version 2.5.1; back to bleeding edge development
2793
2794 2005-05-11 Borut Razem <borut.razem AT siol.net>
2795
2796         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2797           generate PDF version 1.3 documents
2798
2799 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2800
2801         * .version: changed to version 2.5.0
2802
2803 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2804
2805         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2806
2807 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2808
2809         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2810         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2811         well as many smaller updates.
2812         * .version: changed to version 2.5.0-pre1
2813
2814 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2815
2816         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2817
2818 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2819
2820         * support/regression/tests/bug1185672.c: added
2821         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2822           bug 1185672
2823         * src/mcs51/gen.c (genCall): added comments, made it look safer
2824         * src/mcs51/gen.c (genEndFunction): simplified
2825
2826 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2827
2828         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2829
2830 2005-04-14 Borut Razem <borut.razem AT siol.net>
2831
2832         * fixed bug 1045046 - SIGSEGV with really simple code?:
2833           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2834           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2835
2836 2005-04-14 Borut Razem <borut.razem AT siol.net>
2837
2838         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2839           src/pic16/device.h: temporarily disabled experimental #inline pragma
2840           for 2.5.0 release
2841
2842 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2843
2844         * device/include/z80/stdio.h,
2845         * device/include/z80/string.h: removed these highly incomplete files so
2846           SDCC can use the default ones in device/include/
2847
2848 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2849
2850         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2851         gcc warning.
2852         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2853         fix sdcpp warnings.
2854
2855 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2856
2857         * device/include/malloc.h: removed redundant __reentrant prototypes
2858         * device/lib/_mullong.c: added working xstack variant in asm (C version
2859           doesn't pass regression tests)
2860         * device/lib/bpx.c: used __data and made bpx char for mcs51
2861         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2862           (createFunction): fixed bug with xstackPtr
2863         * src/SDCCcse.c: corrected comments
2864         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2865           (killDeadCode, eBBlockFromiCode): removed unused code
2866         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2867           corrected comments
2868         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2869           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2870           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2871           (genModOneByte): fixed warning in MSVC
2872         * src/mcs51/main.c (): added comments
2873         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2874
2875 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2876
2877         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2878
2879 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2880
2881         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2882
2883 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2884
2885         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2886         characters arrays of larger size than the declared one.
2887
2888 2005-04-10 Borut Razem <borut.razem AT siol.net>
2889
2890         * src/pic/gen.c (genInline),
2891           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2892           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2893           (findNextInstruction), (findPrevInstruction),
2894           (findInstructionUsingLabel),
2895           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2896         * src/pic/pcode.c (findLabel): added missing '\n'
2897         * src/src.dsp: added SDCCdwarf2.c to the project
2898
2899 2005-04-09 Borut Razem <borut.razem AT siol.net>
2900
2901         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2902
2903 2005-04-08 Raphael Neider <rneider AT web.de>
2904
2905         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2906           into the chain after a given one) and mergeDefmapSymbols (combine
2907           defmap entries for each symbol per pcode)
2908         * (createDefmap): have defmap entries merged in the end
2909         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2910           a symbol before replacing one access type's symbol, merge symbols in
2911           the end (replacement symbol might already have an entry)
2912         * (assignValnums): keep reference to written WREG intact
2913
2914 2005-04-08 Raphael Neider <rneider AT web.de>
2915
2916         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2917           Alpha)
2918
2919 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2920
2921         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2922         bytes
2923
2924 2005-04-07 Raphael Neider <rneider AT web.de>
2925
2926         * device/include/pic16/usart.h: added compatibility defines for
2927           devices with more than one USART
2928         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2929
2930 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2931
2932         * device/lib/Makefile.in: updated for port specific include
2933
2934 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2935
2936         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2937
2938 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2939
2940         * device/include/8051.h,
2941         * device/include/8052.h,
2942         * device/include/at89S8252.h,
2943         * device/include/at89c55.h,
2944         * device/include/at89x051.h,
2945         * device/include/at89x51.h,
2946         * device/include/at89x52.h,
2947         * device/include/mcs51reg.h,
2948         * device/include/reg51.h,
2949         * device/include/reg764.h,
2950         * device/include/regc515c.h,
2951         * device/include/sab80515.h: (re)moved these 12 files
2952         * device/include/mcs51/8051.h,
2953         * device/include/mcs51/8052.h,
2954         * device/include/mcs51/at89S8252.h,
2955         * device/include/mcs51/at89c55.h,
2956         * device/include/mcs51/at89x051.h,
2957         * device/include/mcs51/at89x51.h,
2958         * device/include/mcs51/at89x52.h,
2959         * device/include/mcs51/mcs51reg.h,
2960         * device/include/mcs51/reg51.h,
2961         * device/include/mcs51/reg764.h,
2962         * device/include/mcs51/regc515c.h,
2963         * device/include/mcs51/sab80515.h: and added them here
2964
2965 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2966
2967         * device/include/stdarg.h: changed SDCC specific keywords to double
2968           underlined form.
2969         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2970           mcs51 and ds390.
2971         * device/include/hc08/mc68hc908gp32.h,
2972         * device/include/hc08/mc68hc908jb8.h,
2973         * device/include/hc08/mc68hc908jkjl.h,
2974         * device/include/hc08/mc68hc908qy.h: fixed comments
2975         * device/include/mcs51/README: updated
2976         * device/include/mcs51/c8051f120.h: added PINRSF
2977         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2978         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2979           amidst code. Also inline is not supported.
2980
2981 2005-04-06 Raphael Neider <rneider AT web.de>
2982
2983         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2984         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2985           callers stack/frame pointers
2986
2987 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2988
2989         * device/include/pic16/usart.h: added, missing in previous commit,
2990         * device/include/pic16/adc.h: fixed typo,
2991         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2992         commit,
2993         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2994         <p18fxxx.inc>
2995         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2996         uninitialized because a bug appears with gplink
2997         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2998         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2999         complains for unrecognised option
3000
3001 2005-04-05 Raphael Neider <rneider AT web.de>
3002
3003         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
3004           structs as well (using memcpy)
3005         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
3006           on ISRs (GOTO has no label)
3007         * src/pic16/device.h: added OF_OPTIMIZE_DF
3008         * src/pic16/main.c: added compiler switch --optimize-df to enable the
3009           new data flow analysis/optimization
3010         * src/pic16/pcode.c: added (prototypes for and implementation of)
3011           dataflow analysis functions, fixed pCodeInstructions' inCond and
3012           outCond values, made RCALL a branch instruction
3013         * (pic16_unlinkpCode): keep C line if possible
3014         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
3015           C line moved if possible
3016         * (pic16_getRegFrompCodeOp): NEW, improved version of...
3017         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
3018           to use new pic16_getRegFrompCodeOp (works for more SFRs)
3019         * (pic16_BuildFlow): fixed skip instructions with label (did not start
3020           new flow)
3021         * (pic16_getJumptabpCode): NEW, needed in...
3022         * (LinkFlow): fixed handling of jumptables, calls and conditional
3023           branches
3024         * (pic16_InsertCommentAfter): NEW
3025         * (pic16_pCodeReplace): made verbose and flow preserving
3026         * (AnalyzeFlow): added call to data flow analysis
3027         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
3028         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
3029         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
3030
3031 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3032
3033         * src/SDCCast.c (decorateType): fixed bug #1105626
3034
3035 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
3036
3037         * device/include/asm/pic16/features.h,
3038         * pic18f*.h headers,
3039         * device/include/pic16/adc.h,
3040         * device/include/pic16/delay.h,
3041         * device/include/pic16/i2c.h,
3042         * device/include/pic16/malloc.h,
3043         * device/include/pic16/stdio.h,
3044         * device/include/pic16/stdlib.h,
3045         * device/include/pic16/string.h,
3046         * device/lib/pic16/libc/stdio/printf_tiny.c,
3047         * device/lib/pic16/libc/stdio/printf_small.c,
3048         * device/lib/pic16/libc/stdio/strmgpsim.c,
3049         * device/lib/pic16/libc/stdio/strmmssp.c,
3050         * device/lib/pic16/libc/stdio/strmusart.c,
3051         * device/lib/pic16/libc/stdio/vfprintf.c,
3052         * device/lib/pic16/libc/stdlib/ltoa.c,
3053         * device/lib/pic16/libc/stdlib/putchar.c,
3054         * device/lib/pic16/libc/stdlib/x_ftoa.c,
3055         * device/lib/pic16/libc/stdlib/memchrpgm.c,
3056         * device/lib/pic16/libc/stdlib/memchrram.c,
3057         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
3058         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
3059         * device/lib/pic16/libio/adc/adcbusy.c,
3060         * device/lib/pic16/libio/adc/adcread.c,
3061         * device/lib/pic16/libio/adc/adcsetch.c,
3062         * device/lib/pic16/libio/usart/ubaud.c,
3063         * device/lib/pic16/libio/usart/ubusy.c,
3064         * device/lib/pic16/libio/usart/udrdy.c,
3065         * device/lib/pic16/libio/usart/uopen.c,
3066         * device/lib/pic16/libio/usart/uputc.c,
3067         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
3068         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
3069         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
3070         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
3071         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
3072         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
3073         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
3074         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
3075         specific keywords to double underlined form,
3076         * device/lib/pic16/libc/Makefile.rules,
3077         * device/lib/pic16/libsdcc/Makefile.rules,
3078         * device/lib/pic16/libm/Makefile,
3079         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
3080         to compile with C standard set in Makefile.common
3081         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
3082         rand.c and crc.c in compilation process,
3083         * device/lib/pic16/libsdcc/int/divuint.c,
3084         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
3085         `c' from signed to unsigned,
3086         * device/lib/pic16/startup/crt0.c,
3087         * device/lib/pic16/startup/crt0i.c,
3088         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
3089         keywords to double underlined form, bug fixes in _do_cinit function
3090         which prevented the correct initialization of the .idata segment,
3091         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
3092         core to enter a infinite loop
3093         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
3094
3095 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3096
3097         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
3098
3099 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3100
3101         * device/include/Makefile.in: add support for hc08 subdirectory
3102         * device/include/hc08/: new subdirectory
3103         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
3104         Lucas Loizaga, thanks!
3105         * device/include/hc08/mc68hc908qy.h,
3106         * device/include/hc08/mc68hc908gp32.h,
3107         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
3108         their own directory. Changed internal macro names to use the compiler
3109         reserved namespace. Changed SDCC specific keywords to double
3110         underlined form.
3111         * device/include/math.h,
3112         * device/include/malloc.h,
3113         * device/include/stdarg.h,
3114         * device/include/stdbool.h
3115         * device/include/string.h,
3116         * device/include/tinibios.h,
3117         * device/include/ds400rom.h,
3118         * device/include/8051.h,
3119         * device/include/8052.h,
3120         * device/include/80c51xa.h,
3121         * device/include/at89c55.h,
3122         * device/include/at89S8252.h,
3123         * device/include/at89x51.h,
3124         * device/include/at89x52.h,
3125         * device/include/ds80c390.h,
3126         * device/include/reg764.h,
3127         * device/include/regc515c.h,
3128         * device/include/sab80515.h,
3129         * device/include/mcs51/c8051f000.h,
3130         * device/include/mcs51/c8051f018.h,
3131         * device/include/mcs51/c8051f020.h,
3132         * device/include/mcs51/c8051f040.h,
3133         * device/include/mcs51/c8051f060.h,
3134         * device/include/mcs51/c8051f120.h,
3135         * device/include/mcs51/c8051f300.h,
3136         * device/include/mcs51/c8051f310.h,
3137         * device/include/mcs51/c8051f320.h,
3138         * device/include/mcs51/c8051f330.h,
3139         * device/include/mcs51/c8051f350.h,
3140         * device/include/z180.h: Changed SDCC specific keywords to double
3141         underlined form.
3142
3143 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
3144
3145         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
3146         18F4455,
3147         * (pic16_assignConfigWordValue): disable testing of configuration
3148         register value with config mask,
3149         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
3150         function with port->fun_prefix,
3151         * (genFunction): when generating a naked interrupt function never
3152         create an absolute segment placed in interrupt vector address, place
3153         the actual interrupt function at IVA instead, when an interrupt
3154         function is generated with unspecified interrupt then do not create
3155         the absolute section,
3156         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
3157         code for generating a call to generic pointer get/put function with
3158         a call to function pic16_callGenericPointer(),
3159         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
3160         the call to the generic pointer get/put functions with prefixing the
3161         function name with port->fun_prefix,
3162         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
3163         * src/pic16/main.c (_process_pragma): prefix function with
3164         port->fun_prefix,
3165         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
3166         calling assembler, old 18Fxxxx macro is deprecated,
3167         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
3168         PC_ASMDIR in while condition,
3169         * (findInstruction): add PC_ASMDIR in while condition,
3170         * (buildCallTree): prefix main with port->fun_prefix,
3171         * (pic16_pCode2str): fixed bug that didn't emit the memory access
3172         identifier for variable with banked access in instructions BTFSS,
3173         BTFSC, BCF, BSF, BTG
3174         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
3175         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
3176         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
3177         perform optimization when enviroment variable NO_REG_OPT is set,
3178         * (insideLRBlock): NEW, return 1 if register is inside an
3179         INF_LOCALREGS block,
3180         * (RemoveRegFromLRBlock): remove a register that is completely
3181         eliminated by register optimization, but it is still left in local
3182         register store/restore in/from stack block,
3183         * (Remove2pcodes): after removing register, check to see if it
3184         should be removed from local register store/restore in/from stack
3185         block,
3186         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
3187         DUMMY_READ_VOLATILE,
3188
3189         * device/include/pic16/adc.h: minor prototype modifications and
3190         update,
3191         * device/include/pic16/malloc.h: added GPL notice various
3192         modifications,
3193         * device/include/pic16/stdint.h: NEW, standard header for ints
3194         * device/include/pic16/delay.h: NEW, header for delay functions,
3195         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
3196         delay1mtcy,
3197         * device/include/pic16/signal.h: NEW, header providing helper macros
3198         for implementing signal handlers,
3199         * device/include/pic16/stdio.h: added prototypes for functions,
3200         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
3201         prototypes for stdin and stdout, added macro PUTCHAR to
3202         automatically implement putchar function prototype,
3203         * device/include/pic16/usart.h: modified and updated USART library,
3204         * device/lib/pic16/libio/adc/,
3205         * device/lib/pic16/libio/i2c: some modifications to improve library
3206         performance,
3207         * device/lib/pic16/libc/stdio/: modifications for the new printf*
3208         family of functions,
3209         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
3210         family of functions and other sources,
3211         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
3212         of the PIC18Fxx[28] devices,
3213         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
3214         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
3215         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
3216         _do_cinit function, because the previous failed when local variables
3217         where not placed in the same memory bank,
3218         * device/lib/pic16/libsdcc/char/: various modifications to improve
3219         library performance,
3220         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
3221         information on the new functions of the c library and more...
3222
3223 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3224
3225         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
3226
3227 2005-03-26 Raphael Neider <rneider AT web.de>
3228
3229         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
3230           if condition == CARRY)
3231         * (genCmp): adapted to new genSkipc semantics
3232         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
3233           on rIfx (genCmp was broken)
3234
3235 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3236
3237         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
3238         * src/z80/main.c (_keywords[]),
3239         * src/SDCCglobal.h (struct options),
3240         * src/SDCC.y,
3241         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
3242         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
3243         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
3244         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
3245         always available in leading double underscore form. The C99 support is
3246         mostly missing, but it's a start.
3247         * support/regression/tests/bug-227710.c: fixed nonconforming use of
3248         reserved identifier "__data".
3249
3250 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
3251
3252         * src/mcs51/peeph.def: fixed bug 1170013
3253
3254 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
3255
3256         * device/include/mcs51reg.h: fixed bug 842007
3257
3258 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3259
3260         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
3261         last time.
3262
3263 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3264
3265         * src/port.h (struct PORT),
3266         * src/avr/ralloc.c (avr_assignRegisters),
3267         * src/avr/main.c,
3268         * src/ds390/ralloc.c (ds390_assignRegisters),
3269         * src/ds390/main.c,
3270         * src/hc08/ralloc.c (hc08_assignRegisters),
3271         * src/hc08/main.c,
3272         * src/mcs51/ralloc.c (mcs51_assignRegisters),
3273         * src/mcs51/main.c,
3274         * src/pic/ralloc.c (pic14_assignRegisters),
3275         * src/pic/main.c,
3276         * src/pic16/ralloc.c (pic16_assignRegisters),
3277         * src/pic16/main.c,
3278         * src/xa51/ralloc.c (xa51_assignRegisters),
3279         * src/xa51/main.c,
3280         * src/z80/ralloc.c (z80_assignRegisters),
3281         * src/z80/ralloc.h,
3282         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
3283         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
3284         * src/SDCCcse.h,
3285         * src/SDCCdflow.c (computeDataFlow),
3286         * src/SDCCdflow.h,
3287         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
3288         * src/SDCCloop.h,
3289         * src/SDCCcflow.c (*),
3290         * src/SDCCcflow.h,
3291         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
3292         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
3293         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
3294         immedDom() returning wrong block; probably fixes bug #1160833)
3295
3296 2005-03-20 Borut Razem <borut.razem AT siol.net>
3297
3298         * support/scripts/inc2h.pl: WIN32 port
3299
3300 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
3301
3302         * device/lib/makefile.in: added abs.c and labs.c
3303
3304 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
3305
3306         * device/include/stdint.h: added
3307         * device/lib/abs.c: added
3308         * device/lib/labs.c: added
3309         * device/include/stdlib.h: added abs() and labs() prototypes
3310         * device/lib/libsdcc.lib: added abs and labs
3311         * device/include/float.h,
3312         * device/lib/_fsmul.c,
3313         * device/lib/printf_fast.c,
3314         * device/lib/printf_tiny.c: updated comments
3315
3316 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3317
3318         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
3319         bug #1164313
3320
3321 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3322
3323         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
3324         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
3325
3326 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
3327
3328         * device/lib/printf_large.c: removed inline assembly for portability and
3329           readability. Use printf_fast if speed or size are more important.
3330         * src/pic16/gen.c: removed conditions around use of DEBUGpc
3331         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
3332
3333 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
3334
3335         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
3336         prevent compiler warning
3337
3338 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
3339
3340         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
3341         moved to level 0 and declared as static. Also they are explicit
3342         placed in access bank. This was necessery because some times they
3343         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
3344         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
3345         optimizations. Currently only compare to unsigned char is implemented,
3346         * src/pic16/gen.c: added fReturnIdx array,
3347         * (struct resolvedIfx) is moved to gen.h and made public,
3348         * (struct _G): added sregsAlloc and sregsAllocSet fields,
3349         * (aopForSym): added an optimization to directly store in stack of
3350         the operand of a SEND iCode,
3351         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
3352         but as registers instead (AOP_REG) using the fReturnIdx array,
3353         * (pic16_freeAsmop): remove the freed register from the
3354         _G.sregsAlloc field,
3355         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
3356         a compare of 'WREG',
3357         * (pic16_popGetTempRegCond): changed function prototype, now
3358         function takes also a bitVector argument v which holds the current
3359         set of registers that are allocated for stack access by aopForSym,
3360         registers allocated in aopForSym for accessing stack symbols are not
3361         any more part of the functions usedRegs field,
3362         * (genCall): some times aopOp is called for a stack variable to be
3363         send, aopForSym might perform the push, if this is true make sure
3364         that genCall doesn't push the variable twice by testing _G.resDirect,
3365         * (genFunction): changed testing for unspecified interrupt number
3366         from 256 to INTNO_UNSPEC,
3367         * modified selection scheme of frame pointer generation. Previously
3368         if function did use local registers a frame pointer was generated,
3369         now a frame pointer is generated only if function has arguments
3370         (that need PLUSW2 register access), or has stack arguments, or the
3371         compiler is not instructed to omit the frame pointer,
3372         * (genEndFunction): before restoring local registers that were saved
3373         in the function preamble, also restore the registers that *might*
3374         have been allocated for stack access,
3375         * (genRet): removed some old comments,
3376         * (genCmp, the active (RN's) version): added a call to the
3377         pic16_genCmp_special function to perform the compare with a more
3378         robust and optimized way,
3379         * (genInline): a feature has been added in inline code generation,
3380         which allows a wildcard variable substitution when writing inline
3381         assembly. Code is incomplete and experimental therefore undocumented,
3382         * (genCast): changed order of aopOp for result and right to allow
3383         aopForSym to directly load the result if possible,
3384         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
3385         perform an optimized compare on some selected special occasions,
3386         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
3387         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
3388         generate an IVT any more,
3389         * src/pic16/main.c (pic16_optionsTable): added command line option
3390         --optimize-cmp,
3391         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
3392         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
3393         macros,
3394         * src/pic16/NOTES: Raphael Neider added in list of active developers
3395         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
3396         jumptable_end to prevent bug #,
3397         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
3398         inCond and outCond fields,
3399         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
3400         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
3401         turn off register spilling,
3402         * (packRegsForOneUse): synced with other ports' versions although it
3403         is not used currently,
3404         * (pic16_packRegisters): added an optimization while reading
3405         structure bitfields, some registers may be saved (malloc code is
3406         decreased by 80 bytes)
3407
3408 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
3409
3410         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
3411         left is a bitfield, if yes, then don't optimize assignment. Perhaps
3412         this can be optimized more?
3413
3414 2005-03-10 Raphael Neider <rneider AT web.de>
3415
3416         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
3417           genNearPointerGet): (hopefully) fixed access to bitfields via
3418           pointers (p->bitN = x; and x = p->bitN; failed)
3419
3420 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
3421
3422         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
3423
3424 2005-03-09 Raphael Neider <rneider AT web.de>
3425
3426         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
3427
3428 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
3429
3430         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
3431         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
3432           (regTypeNum): set REG_BIT type if necessary
3433         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
3434         * support/regression/tests/critical.c: check bug 1144613
3435
3436 2005-03-02 Raphael Neider <rneider AT web.de>
3437
3438         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
3439
3440 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3441
3442         * src/avr/ralloc.c (serialRegAssign),
3443         * src/ds390/ralloc.c (serialRegAssign),
3444         * src/hc08/ralloc.c (serialRegAssign),
3445         * src/mcs51/ralloc.c (serialRegAssign),
3446         * src/pic/ralloc.c (serialRegAssign),
3447         * src/pic16/ralloc.c (serialRegAssign),
3448         * src/xa51/ralloc.c (serialRegAssign),
3449         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3450
3451 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3452
3453         * src/SDCCast.c (decorateType): fixed bug 1124787
3454
3455 2005-02-20 Hubert Sack <sack AT digiplan.de>
3456         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3457
3458         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3459         patch #1121755
3460
3461 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3462
3463         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3464         to keep the correct label reference count when adding/removing references
3465         to labels. A peephole file using this is appended to patch #1144962.
3466
3467 2005-02-14 Raphael Neider <rneider AT web.de>
3468
3469         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3470         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3471         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3472           retrievals of result operand's value on assignment
3473
3474 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3475
3476         * device/include/pic16/string.h: modified prototype for memccpy()
3477         to memccpy(void *, void *, char, size_t)
3478         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3479         check whether to omit frame pointer or not,
3480         * (genInline): convert all occurences of "\n" to LF in inline
3481         assembler blocks, this helps formatting the inline text,
3482         * (pic16_loadFSR0): modified prototype,
3483         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3484         removed some 8051 legacy code,
3485         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3486         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3487         before allocating temporary registers in functions,
3488
3489 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3490
3491         * support/regression/tests/bitvars.c: corrected the "fix"
3492
3493 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3494
3495         * support/regression/tests/bitvars.c,
3496         * support/regression/tests/bitwise.c,
3497         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3498
3499 2005-02-10 Raphael Neider <rneider AT web.de>
3500
3501         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3502           different size for Alpha
3503         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3504
3505 2005-02-09 Raphael Neider <rneider AT web.de>
3506
3507         * src/SDCC.lex(doPragma) : save and restore warning options as well
3508           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3509         * have #pragma less_pedantic set the errorlevel to WARNING
3510           (fixes #1117001)
3511         * (cloneOptimize) : fixed wrong malloc's size
3512         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3513           facilitate correct handling of #pragma (save|restore)
3514
3515 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3516
3517         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3518
3519 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3520
3521         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3522
3523 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3524
3525         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3526
3527 2005-02-02 Raphael Neider <rneider AT web.de>
3528
3529         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3530         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3531         * (pic16_storeForReturn): fixed to allow returning function pointers
3532         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3533         * device/include/pic16/{stddef.h,stdbool.h}: added
3534
3535 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3536
3537         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3538
3539 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3540
3541         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3542         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3543          appeared to be required
3544
3545 2005-01-31 Borut Razem <borut.razem AT siol.net>
3546
3547         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3548           include/mcs51 and include/z80 directories to the package
3549
3550 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3551
3552         * src/hc08/gen.c (genFunction): fixed bug #1112752
3553
3554 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3555
3556         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3557
3558 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3559
3560         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3561
3562 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3563
3564         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3565
3566 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3567
3568         * device/include/c8051fxxx.h: removed these 6 files
3569         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3570
3571 2005-01-26 Raphael Neider <rneider AT web.de>
3572
3573         * src/pic16/gen.c (genAssign): fixed assignment from longs
3574           in codespace (were cut to three bytes)
3575         * (genDummyRead): implemented (except for CODESPACE...),
3576           fixed bug #1108575
3577         * src/pic16/glue.c (emitStatistics): beautified
3578         * device/lib/pic16/libm/Makefile: added include path
3579
3580 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3581
3582         * src/z80/gen.c (aopPut): fixed bug #1103902
3583
3584 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3585
3586         * device/lib/expf.c: fixed bug #1095792
3587
3588 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3589
3590         * device/lib/pic16/libm: added Math library sources
3591
3592 2005-01-24 Raphael Neider <rneider AT web.de>
3593
3594         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3595           to enable upcast to pCodeOpReg2 (there is no type tag to
3596           differenciate the two and pic16_popGet2p cast into PCOR2)
3597         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3598           (sizeof(sectNames) changed to sizeof(sectName))
3599           Both patches fix segfaults under MinGW.
3600
3601 2005-01-23 Raphael Neider <rneider AT web.de>
3602
3603         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3604           Safe_[mc]?alloc()'ed variables
3605         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3606           of (byte sized) temporaries (assign them to WREG for now)
3607         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3608           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3609           this might fix SIGSEGVs on MinGW...
3610         * src/SDCCopt.c (killDeadCode): restored original behaviour
3611           (volatile operands might get thrown away though)
3612
3613 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3614
3615         * src/pic16/gen.c: fixed bug #1106975,
3616         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3617         pointer update, INTCON is saved, global interrupts are disabled and
3618         restored after updateing TOS.
3619         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3620         * added function attribute 'shadowregs' to take advantage of shadow
3621         registers,
3622         * added function attribute 'wparam' as an alternative to the wparam
3623         pragma,
3624         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3625         user declares a non-ISR function as 'shadowregs',
3626         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3627
3628 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3629
3630         * .version: bumped version number to 2.4.8
3631         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3632         pic16 port,
3633         * device/lib/pic16/libio/i2c/: I2C module support library,
3634         * device/include/pic16/i2c.h: I2C support library header,
3635         * device/lib/pic16/libc/stdio/: standard IO support sources,
3636         * (printf_small.c): printf_small() source, supports float print,
3637         * (printf_tiny.c): printf_tiny() source, does not support floats,
3638         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3639         enable global optimizations for entire library source, other
3640         Makefiles in the source tree are also modified to reflect this,
3641         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3642         function,
3643         * doc/sdccman.lyx: updated to reflect new changes,
3644         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3645         sym->onStack if-case,
3646         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3647         sbit, idata, _idata, xdata, _xdata,
3648         * added pragma library, to link an external library, (see doc),
3649         * removed command line options, --pomit-config-words, --pomit-ivt,
3650         --pleave-reset-vector,
3651         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3652         when calling assembler to reflect memory model used, also define
3653         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3654         reflect stack model used,
3655         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3656         on stack return NULL,
3657
3658 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3659
3660         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3661           of the operands is volatile. Fixes #1020220
3662
3663 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3664
3665         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3666         * (OptimizeRegUsage): make sure that there is really no other flow where
3667           the first pCode is used
3668
3669 2005-01-22 Raphael Neider <rneider AT web.de>
3670
3671         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3672           to fix #1106967 (pCode->seq are not set up correctly)
3673
3674 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3675
3676         * src/SDCCglue.c (glue): make sure code area is declared before the
3677         static initialization area.
3678
3679 2005-01-21 Raphael Neider <rneider AT web.de>
3680
3681         * device/lib/Makefile.in: fixed test for pic16 install dir
3682         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3683           optimizations
3684         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3685           added --optimize-goto compiler switch and pragma wparam documentation
3686         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3687         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3688           and PRODH closing bug #1071770 (peephole optimizer)
3689
3690 2005-01-19 Raphael Neider <rneider AT web.de>
3691
3692         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3693           cmdLine buffers (used when calling sdcpp...) are large enough
3694           (MAX_PATH=256 truncates arguments leading to system halts when
3695           used in MinGW...)
3696         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3697         * (genUminus): rewritten to for efficiency
3698         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3699           used uninitialized in some cases)
3700         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3701           copy the third byte from the int -- now assumes 0x80 (data memory)
3702         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3703           operands (genAddLit expects the iCode's operands to swapped as
3704           well), fixed leftover bytes (crashed for short left operands)
3705         * (pic16_genMinusDec): performance improvements, removed false
3706           PIC14 emitSKPNCs
3707         * (pic16_genMinus): fixed to cope with differently sized operands
3708         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3709           for --obanksel > 1
3710         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3711         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3712           new banksel optimization
3713         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3714           analysis for temporary registers (segfaults...)
3715         * src/pic16/peeph.def: added rule
3716
3717 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3718
3719         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3720         which converts a float number to its ASCII representation
3721         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3722         functions to convert the fractional and integer part of a float to ASCII,
3723         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3724         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3725         ram
3726         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3727         _STATMEM macros,
3728         * device/include/pic16/adc.h: added GPL info,
3729         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3730         a pCodeOp as tested operand,
3731         * (genNearPointerGet): optimized bit testing, does not use
3732         intermediate register for bit value, test directly instead with
3733         BTFSS, BTFSC, works only for single bits,
3734         * (genpic16Code): dump the name of the iCode in the asm,
3735         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3736         renamed to pic16_decodeOp,
3737         * (serialRegAssign): do not allocate a temporary register for iCode
3738         sequences that test a single bit for 1/0
3739
3740 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3741
3742         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3743         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3744         access stack and frame pointers. They are initially assigned to
3745         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3746         accessing SFRs. Updated all occurences of modification of stack or
3747         frame pointer in gen.c and pcode.c,
3748         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3749         assigning of a literal value to pointers,
3750         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3751         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3752         selected
3753
3754 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3755
3756         * doc/sdccman.lyx: update documentation about stack pragma, added
3757         some info for stack memory models
3758
3759 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3760
3761         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3762
3763 2005-01-08 Raphael Neider <rneider AT web.de>
3764
3765         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3766           udata sections to fix bug #1097823
3767
3768 2005-01-05 Raphael Neider <rneider AT web.de>
3769
3770         * src/pic16/gen.c (genGenericShift): added handling of differently
3771           sized left operand and result
3772
3773 2005-01-04 Raphael Neider <rneider AT web.de>
3774
3775         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3776         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3777           to hold the condition bit)
3778         * added new version of genCmp (old code available via #define)
3779         * added new version of genShiftLeft/genShiftRight in a generic
3780           way, now supports shifting by negative values
3781         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3782           shiftCount (expected by genGenericShift)
3783         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3784         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3785           dump
3786         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3787           is an invalid literal too...)
3788
3789 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3790
3791         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3792         from Raphael Neider,
3793         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3794         for 8-bit literals. This fixes some literal operands which are sign
3795         extended to 16-bits ints when instruction needs only 8-bits.
3796
3797 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3798
3799         * device/lib/logf.c: added mcs51 assembly version
3800         * device/lib/expf.c: added mcs51 assembly version
3801         * device/lib/_logexpf.c: new shared asm code for expf and logf
3802         * device/include/math.h: add defines for assembly math library
3803         * device/lib/Makefile.in: build new _logexpf.c
3804         * device/lib/libfloat.lib: use new _logexpf.c
3805
3806 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3807
3808         * src/pic/device.c
3809         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3810           device types which have less than 0x7f registers.
3811
3812 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3813
3814         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3815
3816 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3817
3818         * device/lib/printf_fast.c: only build on supported arch.
3819         * device/lib/printf_tiny.c: only build on supported arch.
3820         * device/lib/printf_fast_f.c: only build if asm float lib
3821         * device/lib/_fsget1arg.c: only build if asm float lib
3822         * device/lib/_fsget2args.c: only build if asm float lib
3823         * device/lib/_fsnormalize.c: only build if asm float lib
3824         * device/lib/_fsreturnval.c: only build if asm float lib
3825         * device/lib/_fsrshift.c: only build if asm float lib
3826         * device/lib/_fsswapargs.c: only build if asm float lib
3827         * device/include/stdio.h: don't provide print_fast,
3828           print_fast_f, print_tiny prototypes if --xstack used
3829
3830 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3831
3832         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3833         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3834           to the SOURCES
3835
3836 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3837
3838         * device/lib/printf_fast_f.c: same as printf_fast, but
3839           with floating point enabled
3840         * device/lib/printf_fast.c: minor tweaks
3841         * device/include/stdio.h: add printf_fast_f
3842
3843 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3844
3845         * src/SDCCmain.c: make --float-reent default for mcs51
3846         * device/lib/_fsadd.c: added mcs51 assembly version
3847         * device/lib/_fssub.c: added mcs51 assembly version
3848         * device/lib/_fsmul.c: added mcs51 assembly version
3849         * device/lib/_fsdiv.c: added mcs51 assembly version
3850         * device/lib/_fseq.c: added mcs51 assembly version
3851         * device/lib/_fsneq.c: added mcs51 assembly version
3852         * device/lib/_fsgt.c: added mcs51 assembly version
3853         * device/lib/_fslt.c: added mcs51 assembly version
3854         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3855         * device/lib/Makefile.in: add _fscmp to build
3856         * device/lib/libfloat.lib: add _fscmp to build
3857
3858 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3859
3860         * device/lib/_fs2slong.c: added mcs51 assembly version
3861         * device/lib/_fs2sint.c: added mcs51 assembly version
3862         * device/lib/_fs2schar.c: added mcs51 assembly version
3863         * device/lib/_fs2ulong.c: added mcs51 assembly version
3864         * device/lib/_fs2uint.c: added mcs51 assembly version
3865         * device/lib/_fs2uchar.c: added mcs51 assembly version
3866         * device/lib/_slong2fs.c: added mcs51 assembly version
3867         * device/lib/_sint2fs.c: added mcs51 assembly version
3868         * device/lib/_schar2fs.c: added mcs51 assembly version
3869         * device/lib/_ulong2fs.c: added mcs51 assembly version
3870         * device/lib/_uint2fs.c: added mcs51 assembly version
3871         * device/lib/_uchar2fs.c: added mcs51 assembly version
3872         * device/include/float.h: added #define to select asm vs c
3873
3874 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3875
3876         * device/lib/printf_fast.c: improvements to float output
3877         * device/include/float.h: add defines for assembly float library
3878         * device/lib/_fsget1arg.c: receive 1 float arg
3879         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3880         * device/lib/_fsnormalize.c: normalize a float
3881         * device/lib/_fsreturnval.c: return float, various helper routines
3882         * device/lib/_fsrshift.c: right shift a float's mantissa
3883         * device/lib/_fsswapargs.c: swap 2 floats
3884         * device/lib/Makefile.in: build these 6 new files for mcs51
3885         * device/lib/libfloat.lib: add these 6 files to the library
3886
3887 2004-12-26 Borut Razem <borut.razem AT siol.net>
3888
3889         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3890           built by gcc 3.4.2
3891
3892 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3893
3894         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3895           and fully reentrant and register bank neutral.
3896         * device/lib/printf_fast.c: added float (not enabled by default),
3897           added compact/slower integer (also not enabled by default),
3898           improved size/speed of fast integer code, other minor changes
3899         * device/include/stdio.h, device/lib/Makefile.in,
3900           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3901
3902 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3903
3904         * src/pic16/pcode.c: declaring variables other than at the start of a
3905           block is not supported in C by VC6.
3906
3907 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3908
3909         * applied a previous patch from Raphael Neider that wasn't included
3910         in the previous commits, which fixes infinite loops within jumptable
3911         improvements,
3912         * made some fixes that previous patches introduced
3913
3914 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3915
3916         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3917         that fixes an issue with AOP_PCODE asmop's offset,
3918         * (pic16_popCopyReg): update instance field too,
3919         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3920         function of pic port,
3921         * (genCmp, genAnd, genAssign),
3922         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3923
3924 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3925
3926         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3927         variables initial values to idata section,
3928         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3929         variables in some functions. This utilizes parmBytes field of iCode
3930         structure to hold the offset of the variable in stack. (might be
3931         able to use the stack field too?)
3932         * applied patch from Raphael Neider # ### , # ###
3933         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3934         variable initial values in idata section,
3935         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3936         for static variables with initial value
3937         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3938         applied fix in while loop from Raphael Neider.
3939
3940 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3941
3942         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3943         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3944         * src/ds390/ralloc.c (serialRegAssign): spill bits
3945         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3946         * support/Util/SDCCerr.c,
3947         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3948         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3949         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3950
3951 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3952
3953         * device/include/sdcc-lib.h: inserted LGPL, added includes
3954           asm/ds390/features.h and asm/mcs51/features.h
3955         * device/include/asm/default/features.h,
3956         * device/include/asm/gbz80/features.h,
3957         * device/include/asm/z80/features.h: added empty _AUTOMEM
3958           and _STATMEM
3959         * device/include/asm/ds390/features.h,
3960         * device/include/asm/mcs51/features.h: added files with defines for
3961           _AUTOMEM and _STATMEM indicating automatic and static storage class
3962         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3963         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3964         * src/SDCCicode.c (geniCodeCast),
3965         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3966         * src/SDCCloop.c (loopInduction): removed unused variable lr
3967         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3968           to convertToFcall to include char modulo (RFE 1065037), added check
3969           if left operand is unsigned and use abs of literal value
3970         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3971           as it doesn't work after conversion from peephole.def to peephole.rul
3972         * src/mcs51/gen.c (toBoolean): added check for size,
3973           (genModOneByte): optimized code for signed char modulo a literal
3974           power of 2 (thanks to Hubert Sack),
3975           (genRRC): removed unnecessary "clr c",
3976           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3977         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3978           jump optimization,
3979           swapped rules 256.c and 256.d,
3980           extended 256.d by using new multiple checks (thanks Erik),
3981           added rules 256.e and 256.f,
3982           updated rule 261.a and 261.b to new generated code
3983         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3984
3985 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3986
3987         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3988           induction related bugs, including first part of bug #1074377
3989
3990 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3991
3992         * applied patch from bug-report #1076292,
3993         * applied patches for genAnd and Goto-optimizations for Raphael
3994         Neider,
3995         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3996         dump a less iCode information,
3997         * src/pic16/device.h (pic16_options_t): added field debgen,
3998         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3999         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
4000         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
4001         puclic,
4002         * (various functions): added macros FENTRY and FENTRY2 to functions,
4003         to emit function prologue,
4004         * (various functions): fixed indentation,
4005         * (genNearPointerGet): fixed loading of FSR0,
4006         * (genPackBits): applied patch from Raphael Neider to fix updating
4007         of FSR0 and touching only the modified bits,
4008         * src/pic16/genarith.c (various functions): added macros FENTRY to
4009         emit function prologue in comments,
4010         * src/pic16/pcode.h: added functions debugf2, debugf3,
4011         * src/pic16/ralloc.c: partial fix for packForPush caused
4012         segmentation fault,
4013
4014 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4015
4016         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
4017           <stsp AT users.sourceforge.net> with reversed byte order
4018         * support/regression/tests/rotate.c: added (ds390 skips some tests)
4019
4020 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4021
4022         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
4023           bug #1074377
4024         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
4025         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
4026
4027 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4028
4029         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
4030
4031 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4032
4033         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
4034           conditions,
4035           (setFromConditionArgs): friendly operand parser for peephole rules,
4036           (operandBaseName, operandsNotRelated): new peephole condition
4037           "operandsNotRelated" -- similar to "operandsNotSame", but takes
4038           architecture specific register naming into account, handles n-way
4039           comparisons, and supports quoted literals
4040         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
4041
4042 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4043
4044         * src/mcs51/peeph.def: fixed bug #1076940
4045
4046 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
4047
4048         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
4049
4050 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4051
4052         Adding support for replacing ljmps with sjmps in jumptables
4053         generated for switch statements. For now you need to set the
4054         environment variable SDCC_SJMP_JUMPTABLE to enable this.
4055         Now 4 algorithms for mcs51 jumptable generation are used:
4056         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
4057         addresses loaded pc-relative for up to 112 cases and stack-pushing
4058         target addresses loaded with offset from dptr for up to 256 cases.
4059
4060         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
4061         * src/mcs51/main.c: adapted constants for switch table generation
4062         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
4063
4064 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
4065
4066         * device/lib/printf_large.c (_print_format): fixed bug 1073386
4067         * support/regression/tests/bug1057979.c: added test for bug 1073386
4068
4069 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4070
4071         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
4072         compilers
4073
4074 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
4075
4076         * src/pic16/device.h,
4077         * src/pic16/genarith.c,
4078         * src/pic16/glue.c,
4079         * src/pic16/main.c,
4080         * src/pic16/pcode.c: applied patches #1068154 and #1070213
4081
4082 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
4083
4084         Large cummulative patch for pic16 port.
4085         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
4086         to call when a stack overflow occurs,
4087         * (malloc.h): added CVS Id tag,
4088         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
4089         variable,
4090         * added libc directory. The current version of LibC contains string
4091         functions, ctype functions and macros and some functions of the
4092         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
4093         be extensively tested in the future. Standard disclaimer here.
4094         Library is not automatically build yet. But one can build it by
4095         invoking 'make' inside the libc directory.
4096         * added ADC library under libio. Preliminary version yet.
4097
4098         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
4099         * src/pic16/gen.c (aopForRemat): asmop size is filled by
4100         aopForRemat() now and not by pic16_aopOp(),
4101         * (pic16_popGetTempReg): removed warning messgae when allocating
4102         temporary registers, its a buggy feature and will be removed,
4103         * (pic16_popGet): set register instance field in AOP_CRY,
4104         * (pic16_outBitC): fixed for results in size greater than 1,
4105         * (genUminusFloat): fixed for pic16, ported code from mcs51,
4106         * (pic16_storeForReturn): optimized return of 0,
4107         * (genCmp): experimental code for new genCmp which uses PIC18's
4108         special compare&skip instructions. Initial tests fail some times
4109         with variables grater than 1 byte in size, so new code is disabled,
4110         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
4111         a single bit,
4112         * (genCast): began a fix to optimize the casting of a bit to another
4113         bit, now assigning a bitfield to another bitfield will fail, sorry,
4114         * src/pic16/main.c: disabled the use of lr-support feature,
4115         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
4116         * added some function prototypes, added function _debugf prototype,
4117         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
4118         bits with offset (case PO_GPR_BIT),
4119         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
4120         command line,
4121         * (isBankInstruction): modified to return 0 for no banking instruction,
4122         and 1 for banking instruction,
4123         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
4124         caused stop processing pCodes after a inline assembly block,
4125         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
4126         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
4127         registers when it shouldn't,
4128         * src/pic16/ralloc.c (allocReg): add preliminary support for
4129         supporting a limited set of temporary registers,
4130
4131 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4132
4133         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
4134           genDataPointerSet): ensure assignments always copy in MSB to LSB
4135           order,
4136           (loadRegFromAop): recognize CLRH optimization,
4137           (genFunction): optimize RECEIVE iCodes in reentrant functions
4138
4139 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4140
4141         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
4142           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
4143           selected.
4144         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
4145         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
4146           contiguous with data
4147
4148 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4149
4150         * device/lib/_gptrget.c (_gptrget),
4151         * device/lib/_gptrgetc.c (_gptrgetc),
4152         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
4153           instead of sjmp to ret
4154         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
4155           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
4156
4157 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
4158
4159         * .version: bumped version to 2.4.7
4160         * device/lib/_gptrget.c (_gptrget): is now _naked
4161         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
4162         * device/lib/_gptrput.c (_gptrput): is now _naked
4163         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
4164           (createFunction): fixed xstack
4165         * src/SDCCglue.c (emitMaps): set allocation required for bit area
4166         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
4167           or bit either,
4168           (geniCodeCritical): store original interrupt state in an iTemp bit
4169           var unless stack-auto
4170         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
4171         * src/SDCCmain.c (setIncludePath): added include/target to search path
4172         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
4173         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
4174           prototype,
4175           (processFuncArgs): put bit vars in bit area
4176         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
4177           unsaveRBank): fixed xstack,
4178           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
4179           (genFunction, genEndFunction): fixed xstack,
4180           (genAssign): optimization don't walk backwards through mem
4181         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
4182         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
4183         * support/regression/Makefile: also make library (for stack-auto) when
4184           making "all" and added "test-mcs51-xstack-auto"
4185         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
4186         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
4187         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
4188         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
4189         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
4190           make-library by MAKE_LIBRARY
4191         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
4192           regression tests for xstack
4193         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
4194         * support/regression/tests/critical.c: test for critical on mcs51
4195
4196 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4197
4198         * support/regression/ports/ucz80/spec.mk: use include and lib files from
4199           built version of sdcc instead of installed version
4200
4201 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
4202
4203         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
4204         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
4205           vprintf.c now
4206         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
4207         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
4208           WARNING: remove device/lib/build/z80/printf.o by hand when
4209           updating from previous build!
4210         * device/lib/z80/printf.c: updated comment
4211         * support/regression/tests/bug1057979.c: test all ports now
4212         * support/regression/tests/bug1065458.c: file added
4213
4214 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4215
4216         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
4217           *_start and *_end symbols for static functions
4218
4219 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
4220
4221         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
4222           and search crt0.o in all library paths,
4223           (setIncludePath): proper handling of --nostdinc,
4224           (setLibPath): proper handling of --nostdlib
4225         * support/regression/Makefile,
4226         * support/regression/ports/ds390/spec.mk,
4227         * support/regression/ports/gbz80/spec.mk,
4228         * support/regression/ports/hc08/spec.mk,
4229         * support/regression/ports/mcs51/spec.mk,
4230         * support/regression/ports/mcs51-large/spec.mk,
4231         * support/regression/ports/mcs51-stack-auto/spec.mk,
4232         * support/regression/ports/z80/spec.mk: use include and lib files from
4233           built version of sdcc instead of installed version
4234         * doc/sdccman.lyx: fixed typo in --nostdinc
4235
4236 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
4237
4238         * src/pic/pcode.c,
4239         * src/pic/device.c,
4240         * src/pic/ralloc.c,
4241         * src/pic/gen.c : added support to generate code for struct bit fields.
4242
4243 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
4244
4245         * as/xa51/xa_version.h,
4246         * device/include/errno.h,
4247         * device/include/regc515c.h,
4248         * device/lib/_itoa.c,
4249         * device/lib/_ltoa.c,
4250         * device/lib/ser_ir_cts_rts.c,
4251         * sim/ucsim/xa.src/glob.cc,
4252         * sim/ucsim/xa.src/inst_gen.cc,
4253         * sim/ucsim/xa.src/xa_bit.cc,
4254         * sim/ucsim/xa.src/xa_sfr.cc,
4255         * sim/ucsim/z80.src/inst_dd.cc,
4256         * sim/ucsim/z80.src/inst_fdcb.cc,
4257         * support/scripts/keil2sdcc.pl,
4258         * src/pic16/pic16.dsp,
4259         * src/pic16/pic16a.dsp: corrected cvs line endings
4260         * device/lib/printf_large.c: fixed bug 1057979
4261         * src/pic16/gen.c: fixed non-C standard code
4262         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
4263         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
4264         * support/regression/ports/mcs51/support.c: reload T1 asap
4265         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
4266           pdata use and clear idata startup behaviour
4267         * support/regression/tests/bug1057979.c: added
4268
4269 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
4270
4271         * device/examples/ds390/ow390/ad26.h,
4272         * device/examples/ds390/ow390/cnt1d.h,
4273         * device/examples/ds390/ow390/crcutil.c,
4274         * device/examples/ds390/ow390/ownet.h,
4275         * device/examples/ds390/ow390/owsesu.c,
4276         * device/examples/ds390/ow390/swt12.h,
4277         * device/examples/ds390/ow390/swtoper.c,
4278         * device/examples/ds390/ow390/temp10.h,
4279         * device/examples/ds390/ow390/thermodl.c,
4280         * device/examples/ds390/tinitalk/tinitalk.dsp,
4281         * device/examples/ds390/tinitalk/tinitalk.dsw,
4282         * device/examples/mcs51/clock/hw.h,
4283         * device/examples/mcs51/simple2/go.bat,
4284         * device/examples/serialcomm/windows/serial.h,
4285         * device/examples/xa51/dummy.c,
4286         * device/examples/xa51/hello.c,
4287         * device/include/80c51xa.h,
4288         * device/include/at89x051.h: corrected cvs line endings
4289
4290 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
4291
4292         * src/pic16/main.c (options): added command line --gstack, to trace
4293         stack over/under flows,
4294         * added pragma 'wparam' to allow passing first byte of function
4295         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
4296         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
4297         call to __gstack_test function and sets up the symbol as extern,
4298         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
4299         * popaop): added call to pic16_testStackOverflow,
4300         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
4301         wparamList list,
4302         * (genCall, genPcall): now all parameters are passed via stack
4303         except in functions that are pass to wparam pragma in which WREG is
4304         used too,
4305         * (genPcall): REENTRANT flag is checked to see if variable prototype
4306         contains reentrant keyword, don't call a non-reentrant function, via
4307         a reentrant function pointer or vice versa, functions are never
4308         passed via WREG,
4309         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
4310         D.Winkler,
4311         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
4312         SIGSEGV when accessing a NULL register stucture,
4313         * (pic16_printGPointerType): modified to handle UPPER modifier for
4314         function initializers, changed prototype of function to simpler one,
4315         * (pic16_printIvalFuncPtr): check to see if function is already
4316         added in externs list,
4317         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
4318         optimized a move from W to SFR with a move to the same register
4319         later after a CALL,
4320         * device/lib/pic16/debug: NEW directory, contains debug features
4321         which are enabled when linking with libdebug.lib, currently command
4322         line option --gstack enables stack pointer tracing for over/under
4323         flow, corresponding sources are in debug/gstack
4324
4325 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
4326
4327         * doc/sdccman.lyx: updated SDCC version,
4328         * (PIC16 port): update list of command line options,
4329         * src/pic16/device.h (structure pic16_options_t): added field gstack
4330         to enable stack overflow tracing on push/pops,
4331         * src/pic16/device.c (statistics structure): added statistics
4332         structure,
4333         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
4334         pic16_dump_int_registers): increase statistics counters for each
4335         * variable which is encountered
4336         * (pic16_dump_usection): emit each .udata variable to its own udata
4337         section,
4338         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
4339         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
4340         parameters via stack, otherwise use old scheme,
4341         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
4342         assembler output file,
4343         * src/pic16/main.c: added command line options --gstack to enable
4344         push/pop tracing for stack overflow,
4345         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
4346         instructions): added size of each instruction,
4347         * (pic16_countInstruction): estimate size of instructions in
4348         the_pFile list, inline assembly blocks are not counted,
4349         * (pic16_FixRegisterBanking): trace previous register usage, when
4350         banksel optimizations is greater than 0, don't emit a redudant
4351         banksel directive,
4352
4353 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
4354
4355         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
4356         * src/pic16/ralloc.c : applied same fix for pic16.
4357         * src/pic/gen.c : tidied it up a little.
4358
4359 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4360
4361         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
4362         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
4363
4364 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4365
4366         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
4367
4368 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4369
4370         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
4371         non-reentrant function __modsint in the interrupt function (thus
4372         corrupting math operations during serial I/O)
4373         * device/lib/ser_ir.c: as above, changed buffersize
4374         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
4375         256.c,d for zeroing
4376         * doc/Makefile: added option -t for rsync
4377
4378 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4379
4380         * src/SDCCast.h (struct ast),
4381         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
4382
4383 2004-10-20 Borut Razem <borut.razem AT siol.net>
4384
4385         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
4386         package
4387
4388 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
4389
4390         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
4391         makefile targets,
4392         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
4393         support functions to replace long sequences of MOVFF's from access
4394         bank registers to stack and vice versa,
4395         * src/pic16/device.h: added new field opt_flags, where optimization
4396         flags can be set to enable certain features,
4397         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
4398         * pBlock, (genFunction, genEndFunction): surroung loop for
4399         saving/loading used registers in stack with PC_INFO pCodes,
4400         INF_LREGS. Code in between can then be optimized by pCode optimizer
4401         to support function calls,
4402         * (genDataPointerSet): fixed bug which loaded float fields in
4403         structures with corrupt data,
4404         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
4405         in a standard way debug info on stderr. Feature used for developing
4406         and debugging only,
4407         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
4408         obsolete chunks of code,
4409         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
4410         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
4411         * pic16/src/pcode.c (pic16_newpCodeInfo,
4412         * (pic16_newpCodeOpLocalRegs),
4413         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
4414         feature,
4415         * (pic16_pCodeConstString): printing of the initial value of a
4416         symbol as a comment is inhibited since parsing was already done by
4417         copyStr and output is corrupt,
4418         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
4419
4420 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4421
4422         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
4423
4424 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
4425
4426         * as/mcs51/lkarea.c: removed old K&R style,
4427           (lnksect): changed check on boundary error,
4428           (lnksect2): changed check on boundary error,
4429           (lnksect2): extend XSTK to end of page if size = 1
4430         * as/mcs51/lkmain.c: removed old K&R style,
4431           (Areas51): create l_IRAM symbol
4432         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
4433         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
4434           model-mcs51-stack-auto, added model-mcs51-xstack-auto
4435         * device/lib/_mullong.c: added version to be compiled with xstack
4436         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
4437         * device/lib/mcs51/crtxclear.asm: clear pdata as well
4438         * device/lib/mcs51/crtxstack.asm: fixed comment
4439         * src/SDCCglue.c: maxInterrupts defaults to 0,
4440           (emitMaps): added pdata,
4441           (createInterruptVect): (re)moved default,
4442           (glue): added pdata,
4443           (glue): moved __start__xstack to XSTK with default size 1
4444         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
4445           and options.float_rent when options.stackAuto is set,
4446           (linkEdit): only write XDATA_NAME if provided on command line
4447         * src/SDCCmem.h,
4448         * src/SDCCmem.c: added pdata
4449         * src/port.h: added pdata_name to PORT
4450         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4451           (saveRegisters, unsaveRegisters): removed usage of B,
4452           (genMinus): fixed accumulator clash,
4453           (genJumpTab): added comment, this needs another look
4454         * src/mcs51/gen.c: added check for "B in use" paranoia,
4455           added pushB() and popB()
4456         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4457           chance
4458         * src/avr/main.c,
4459         * src/ds390/main.c,
4460         * src/hc08/main.c,
4461         * src/mcs51/main.c,
4462         * src/pic/main.c,
4463         * src/pic16/main.c,
4464         * src/xa51/main.c,
4465         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4466           added PSEG (PAG,XDATA) or NULL to port specifier
4467         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4468         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4469           (_mcs51_genInitStartup): removed __start__xstack equ,
4470           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4471         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4472         * src/z80/gen.c (_rleAppend): fixed warnings
4473         * support/regression/tests/zeropad.c: added pdata test
4474         * .version: bumped to 2.4.6
4475
4476 2004-10-17 Borut Razem <borut.razem AT siol.net>
4477
4478         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4479         as a part of nightly build
4480
4481 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4482
4483         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4484         WREG holds the first byte function parameters,
4485         * (aopForSym): take special case for symbols which are in FARSPACE
4486         but in CODESPACE too,
4487         * (assignResultValue): modified to take into account _G.useWreg,
4488         * (genCall): don't use wreg for parameter passing when function is
4489         declared as reentrant, too, added optimization INCF to stack
4490         pointer when stack parameter count is 1,
4491         * (genFunction, genEndFunction): refurnished and fixed to not using
4492         wreg for passing parameters when function has varargs or is
4493         reentrant, fixed bug with symbol name compare for generating
4494         functions in absolute address,
4495         * (pic16_storeForReturn): refurnished,
4496         * (genCmp): began writing a new version of the function, not ready
4497         yet, therefore it is disabled,
4498         * (genAssign): do not read code memory when assigning a function to
4499         a pointer function,
4500         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4501         array of characters, not pointer,
4502         * (pic16initialComments): in debug mode emit an .ident directive for
4503         the assembler,
4504         * (_process_pragma): emit a new warning type (internal to pic16)
4505         when setting stack to default length, emit a similar warning when
4506         placing a function at absolute address and address is not word aligned
4507         * (_pic16_parseOptions): added 'return TRUE' statement,
4508         * (_pic16_linkEdit): if compiling a source, then add the source's
4509         file object, first in the list of objects to link,
4510
4511 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4512
4513         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4514         * src/pic/main.c : removed VC warning.
4515         * src/pic/gen.c : changed comment.
4516
4517 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4518
4519         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4520         reference to a deprecated symbol _GPTRREG was causing failure to
4521         link. Thanks G. M. Gallant for the info.
4522
4523 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4524
4525         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4526         comments for Bugs item #954788.
4527
4528 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4529
4530         * src/pic16/device.c (pic16_dump_gsection,
4531         * pic16_groupRegistersInSection): handle symbols declared to be in
4532         access bank differently,
4533         * src/pic16/gen.c (struct _G): added field resDirect,
4534         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4535         send values read from stack directly to result and don't allocate
4536         temporary values,
4537         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4538         same registers,
4539         * (pic16_sameRegsOfs): NEW,
4540         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4541         free because they were not allocated from temporary pool,
4542         * pic16_popRegFromString): workaround to fix a problem with
4543         allocating variables twice or never,
4544         * (genGenPointerGet): using PRODL instead of FSR0H,
4545         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4546         instead of FSR0H,
4547         * (genAssign): take advantage of the _G.resDirect flag,
4548         * (genCast): around line 11844, use mov2f instead of directly
4549         MOVFF'ing between operands to account for literal values,
4550         * src/pic16/genutils.c: some new debug functions for gpsim have been
4551         added,
4552         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4553         float with integer part only,
4554         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4555         place variables in access bank
4556         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4557         updated sources to reflect recent changes in gen.c
4558
4559 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4560
4561         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4562         sources that searched for headers in installation path, now the
4563         device/include/pic16 is used,
4564         * src/pic16/glue.c (pic16glue),
4565         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4566         .line directives if not in debug mode, this suppresses assembler's
4567         warnings for ignored directives
4568
4569 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4570
4571         * src/port.h: made reset_regparms prototype void parameter explicit.
4572         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4573         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4574         * doc/sdccman.lyx: documented warning disabling and how to use
4575           printf_large to make it print floats.
4576         * device/include/stdbool.h: NEW
4577         * device/lib/_atof.c,
4578         * device/lib/_divuint.c,
4579         * device/lib/_divulong.c,
4580         * device/lib/expf.c,
4581         * device/lib/printf_large.c,
4582         * device/lib/sincosf.c,
4583         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4584         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4585           a completely reentrant lib.
4586
4587 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4588
4589         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4590         * device/include/pic16/stdio.h: fixed bug with colon
4591
4592 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4593
4594         * device/include/pic16/stdio.h,
4595         * device/include/pic16/stdlib.h,
4596         * device/include/pic16/math.h: NEW
4597         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4598         declared as _naked to reduce overhead
4599         * device/lib/Makefile.in (target port-specific-objects-pic16):
4600         changed * to *.* so to ignore the CVS directory,
4601         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4602         stacked variables back in stack,
4603         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4604         corruption
4605
4606 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4607
4608         * .version: bumped version number to 2.4.5
4609         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4610         * support/Util/SDCCerr.c (messages structure): added entry for
4611         W_POSSBUG2
4612
4613         Large cumulative patch for pic16 port and libraries.
4614         * device/include/pic16/sdcc-lib.h,
4615         * device/include/pic16/stdarg.h,
4616         * device/include/asm/pic16/features.h,
4617         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4618         * device/include/pic16/float.h: changes reentrant keyword with
4619         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4620         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4621         updated target build-libraries to include objects from gptr,
4622         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4623         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4624         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4625         all function headings,
4626         * src/SDCCmain.c: added global parameter userIncDirsSet,
4627         * (parseCmdLine): when option -I is encountered add directory to
4628         userIncDirsSet too,
4629         * src/version.awk: added space between control and long,
4630         * src/pic16/NOTES: added some notes for the port,
4631         * src/pic16/gen.c: added prototype for mov2fp function,
4632         * (fReturnpic16[]): properly named return value registers,
4633         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4634         * (aopForSym): added code to handle symbols with onStack flag set,
4635         symbols onStack are allocated PTRSIZE bytes,
4636         * (aopFreeAsmop): handles special case where asmops are stack objects,
4637         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4638         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4639         added argument lock to trace flaws in allocating temporary registers
4640         when developing port,
4641         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4642         * (pic16_popRegFromString): reenabled allocating a direct register
4643         from string,
4644         * (assignResultValue): various beautifications,
4645         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4646         referenced function argument,
4647         * (genIpush): reenabled to allow stacked arguments, handles only
4648         ic->parmPush iCodes,
4649         * (genCall, genPcall): major changes to allow for variable argument
4650         functions, fixed a bug with falsely restoring stack pointer after
4651         returning from call,
4652         * (genFunction): pending code for critical function,
4653         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4654         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4655         * (genNearPointerGet): fixed bug with indirect reading, was always
4656         reading from INDF0
4657         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4658         pointers,
4659         * (genAddrOf): rewrote code to take address of a stacked function parameter
4660         * (genCast): fixed casting to generic pointer type,
4661         * src/pic16/gen.h: added AOP_STA,
4662         * (struct asmop): added field stk,
4663         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4664         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4665         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4666         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4667         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4668         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4669         generic pointers,
4670         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4671         and library paths,
4672         * (pic16_port structure): generic pointer size is set to 3,
4673         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4674         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4675         compiler warning,
4676         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4677         operand is an iTemp,
4678
4679 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4680
4681         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4682         * debugger/mcs51/simi.c: addapt new syntax of s51
4683
4684 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4685
4686         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4687         * src/pic16/pcode.c: commented out some calls to free() in order to
4688         fix bug #989576,
4689
4690 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4691
4692         * src/SDCCicode.h,
4693         * src/SDCCicode.c (isiCodeInFunctionCall),
4694         * src/avr/ralloc.c (selectSpil),
4695         * src/pic/ralloc.c (selectSpil),
4696         * src/pic16/ralloc.c (selectSpil),
4697         * src/ds390/ralloc.c (selectSpil),
4698         * src/hc08/ralloc.c (selectSpil),
4699         * src/xa51/ralloc.c (selectSpil),
4700         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4701         stack in the middle of a function call sequence (fixes bug #1020268)
4702         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4703         costs associated with the minimum switch case.
4704
4705 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4706
4707         * src/SDCC.lex: fixed bug #1030549
4708
4709 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4710
4711         * src/SDCCcse.h (struct cseDef),
4712         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4713         over a function call if the CSE is derived from a symbol whose
4714         address has been taken (fixes bug #1029883)
4715         * support/regression/tests/bug-1029883: a new regression test for
4716         this bug
4717
4718 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4719
4720         * src/hc08/gen.c (emitinline): fixed bug #1029778
4721         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4722         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4723         and starts toward RFE #905167)
4724
4725 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4726
4727         * src/pic16/gen.c (mov2f): New function to move an operand to
4728         another without considering if it is a literal or a register,
4729         * (pic16_sameRegs): don't check if they are both AOP_REG,
4730         * (AccRsh): removed andmask=0 lines,
4731         * (genLeftShift): duplicated to be improved in future versions,
4732         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4733         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4734         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4735         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4736         * (insertBankSwitch): fixed inserting banksel directives algorithm
4737         for instructions that follow a skip instruction, this fixes a report
4738         for broken subtraction code generation,
4739         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4740         iCode is a left op, just in case result and right share the same
4741         registers
4742
4743 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4744
4745         * src/hc08/main.c,
4746         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4747         preservation of HX
4748         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4749         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4750         on 2004-09-12; it was buggy
4751
4752 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4753
4754         * src/SDCCsymt.h: removed RESULT_CHECK
4755         * src/SDCCast.c,
4756         * src/SDCCglue.c,
4757         * src/SDCCval.c,
4758         * src/pic/glue.c,
4759         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4760
4761 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4762
4763         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4764         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4765         configuration values no more rejected by compiler, they are assigned
4766         to configuration registers with a warning message instead,
4767         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4768         the for-loop so last conf register is emitted too,
4769         * (_pic16_initPaths): link library libsdcc.lib by default,
4770         * (_hasNativeMulFor): modified test for multiplication according to
4771         Raphael Neider's remarks. Integer multiplication is also done with
4772         support functions,
4773         * device/include/pic16/pic18fregs.h: corrected type error in while
4774         testing and including 18f6720 header file
4775
4776 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4777
4778         * src/pic16/device.h (pic16_options): removed field use_crt,
4779         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4780         until an optimization to handle single bits is added,
4781         * (pic16_loadFSR0): moved before genUnpackBits,
4782         * (genAnd): some white lines removed,
4783         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4784         leave_reset flags in pic16_options when using crt modules,
4785
4786 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4787
4788         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4789           for bugs 898889 & 979599. Also used some safer print instructions.
4790
4791 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4792
4793         * src/pic16/device.h (pic16_options_t): added field use_crt,
4794         crt_name, no_crt,
4795         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4796         catch a probable future bug,
4797         * src/pic16/gen.c: aopIdx function commented out,
4798         * (genAssign): commented out old code which used aopIdx,
4799         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4800         code, added if conditionals to take into account the --use-crt
4801         command line options,
4802         * src/pic16/main.c (pic16_optionsTable): added new command line
4803         options, --use-crt= and --no-crt,
4804         * (_pic16_linkEdit): now the proper crt object is added in the
4805         linker command line except than when --no-crt is specified,
4806         * src/pic16/pcode.c,
4807         * src/pic16/pcode.h: added some structures and functions for a new
4808         optimization scheme to compansate for instruction overhead between
4809         same iCodes, this scheme is currently under development and is not
4810         working in any way,
4811         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4812         to && operator,
4813         * device/lib/pic16/startup/crt0i.c,
4814         * device/lib/pic16/startup/crt0iz.c: added global char variable
4815         __uflags to force the generation of an idata section
4816
4817 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4818
4819         * doc/Makefile,
4820         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4821         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4822
4823 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4824
4825         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4826         Frieder) and clarified the default code optimization mode
4827
4828 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4829
4830         * src/SDCC.lex (doPragma, process_pragma),
4831         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4832         "opt_code_size", and "opt_code_balanced"
4833         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4834         regrouped options by category, added support for category headers
4835         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4836         and "--opt-code-size"
4837         * doc/sdccman.lyx: documented these new options and pragmas
4838         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4839         preference into account
4840
4841 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4842
4843         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4844           geniCodePreDec): Fixed bug 904237 by generating a warning
4845         * src/SDCCerr.h,
4846         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4847
4848 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4849
4850         * src/pic/device.c : When no max ram set validate full memory range.
4851         * src/pic/pcode.c,
4852         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4853
4854 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4855
4856         * device/lib/_gptrget.c,
4857         * device/lib/_gptrput.c: updated comment
4858         * device/lib/calloc.c,
4859         * device/lib/free.c,
4860         * device/lib/malloc.c,
4861         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4862         * src/SDCCcse.c (cseBBlock),
4863         * src/SDCCicode.c (printOperand, geniCodeArray),
4864         * src/SDCCicode.h (struct operand): fixed bug 868103
4865         * support/regression/tests/bug-868103.c: added
4866         * src/SDCCast.c (searchLitOp),
4867         * src/SDCCcse.h (struct cseDef),
4868         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4869         * src/SDCCicode.h (struct operand),
4870         * src/SDCCsymt.h (struct sym_link),
4871         * src/avr/gen.c (hasInc),
4872         * src/ds390/gen.c (hasInc),
4873         * src/hc08/gen.c (genPlusIncr, hasInc),
4874         * src/mcs51/gen.c (hasInc),
4875         * src/pic16/glue.c (pic16_printIvalChar),
4876         * src/pic16/ralloc.c (regWithIdx),
4877         * src/xa51/gen.c (hasInc) : removed warnings
4878         * src/SDCCast.c (createBlock): added comment ???
4879         * src/hc08/ralloc.c: updated comments
4880
4881 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4882
4883         * doc/sdccman.lyx: updated section on switch statements, added
4884         section about semaphore locking
4885         * doc/Makefile: added option -info for latex2html
4886         * device/lib/_gptrget.c,
4887         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4888
4889 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4890
4891         * src/pic/device.h,
4892         * src/pic/device.c,
4893         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4894          maxram is less than 0x100.
4895
4896 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4897
4898         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4899
4900 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4901
4902         * src/port.h,
4903         * src/mcs51/main.c,
4904         * src/ds390/main.c,
4905         * src/z80/main.c,
4906         * src/hc08/main.c,
4907         * src/pic/main.c,
4908         * src/pic16/main.c,
4909         * src/avr/main.c,
4910         * src/xa51/main.c
4911         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4912         a jump table is the best form for a switch statement, including
4913         automatic insertion of missing cases to make the case range
4914         continuous. Developed in collaboration with Frieder Ferlemann.
4915
4916 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4917
4918         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4919         accumulator result if it needs sign extension
4920
4921 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4922
4923         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4924
4925 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4926
4927         * device/lib/gbz80/printf.c,
4928         * device/lib/z80/printf.c: removed define for NULL
4929
4930 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4931
4932         * as/xa51/xa_link.c,
4933         * device/examples/ds390/ow390/ad26.c,
4934         * device/examples/ds390/ow390/cnt1d.c,
4935         * device/examples/ds390/ow390/counter.c,
4936         * device/examples/ds390/ow390/ds2480.h,
4937         * device/examples/ds390/ow390/ds2480ut.c,
4938         * device/examples/ds390/ow390/findtype.c,
4939         * device/examples/ds390/ow390/gethumd.c,
4940         * device/examples/ds390/ow390/owllu.c,
4941         * device/examples/ds390/ow390/ownetu.c,
4942         * device/examples/ds390/ow390/swt12.c,
4943         * device/examples/ds390/ow390/swtloop.c,
4944         * device/examples/ds390/ow390/temp.c,
4945         * device/examples/ds390/ow390/temp10.c,
4946         * device/examples/ds390/ow390/thermo21.c,
4947         * device/examples/ds390/ow390/tinilnk.c,
4948         * device/examples/ds390/ow390/tstfind.c,
4949         * device/examples/serialcomm/windows/serial.cpp,
4950         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4951         * device/include/reg51.h: fixed line endings for cvs
4952
4953 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4954
4955         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4956         packRegsForAccUse, packRegisters): new accumulator register
4957         packing algorithm
4958         * support/regression/ports/hc08/support.c (_putchar): suppress
4959         warning of unused variable
4960         * src/SDCCicode.c: added SWAP entry to codeTable
4961
4962 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4963
4964         * device/lib/sprintf.c: forgot to add this file before previous commit
4965
4966 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4967
4968         * src/pic16/gen.c (genPackBits): added operand right in function
4969         parameters, load result directly if p_type is POINTER (that is
4970         called by genNearPointerSet)
4971         * (genUnPackBits): added operand left in function parameters,
4972         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4973         FSR0 if accessing bitfields,
4974
4975 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4976
4977         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4978           _print_format; updated printf, sprintf, vsprintf
4979         * device/include/asm/default/features.h: corrected comment/define
4980         * device/lib/Makefile.in: added sprintf.c
4981         * device/lib/libsdcc.lib: added sprintf module
4982         * device/lib/printf_large.c,
4983         * device/lib/vprintf.c,
4984         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4985           into these 3 files
4986         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4987         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4988         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4989           hc08 test
4990         * support/regression/tests/zeropad.c: define idata as data for hc08
4991
4992 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4993
4994         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4995         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4996         labels are referenced at least once (even if a reference is not found)
4997         * src/hc08/gen.c (emitcode): set isComment flag for comments
4998         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4999         loads), rules 6a..6b (optimize jumps to return)
5000
5001 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5002
5003         * device/lib/acosf.c (acosf),
5004         * device/lib/asinf.c (asinf),
5005         * device/lib/atanf.c (atanf),
5006         * device/lib/ceilf.c (ceilf),
5007         * device/lib/cosf.c (cosf),
5008         * device/lib/coshf.c (coshf),
5009         * device/lib/cotf.c (cotf),
5010         * device/lib/fabsf.c (fabsf),
5011         * device/lib/floorf.c (floorf),
5012         * device/lib/log10f.c (log10f),
5013         * device/lib/logf.c (logf),
5014         * device/lib/sinf.c (sinf),
5015         * device/lib/sinhf.c (sinhf),
5016         * device/lib/sqrtf.c (sqrtf),
5017         * device/lib/tanf.c (tanf),
5018         * device/lib/tanhf.c (tanhf),
5019         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
5020         replaced all instances of "reentrant" in the library functions
5021         defined in math.h with this macro.
5022         * support/regression/tests/float_trans.c: reenabled test for hc08
5023
5024 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
5025
5026         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
5027         erroneously deleted
5028
5029 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5030
5031         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
5032         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
5033         multi-byte volatile operands are used
5034         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
5035         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
5036         initialization to area GSINIT0 so that it would always precede
5037         any static initializers in GSINIT
5038         * support/regression/tests/zeropad.c: fixed idata define for hc08
5039         * support/regression/tests/bug-927659.c,
5040         * support/regression/tests/float_trans.c: disabled tests for hc08
5041         pending missing library routines
5042         * .version: increased version number to 2.4.4 - hc08 port now passes
5043         regression tests
5044
5045
5046 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
5047
5048         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
5049         * Makefile.common.in,
5050         * as/Makefile,
5051         * as/hc08/Makefile.in,
5052         * as/mcs51/Makefile.in,
5053         * as/z80/Makefile.in,
5054         * debugger/mcs51/Makefile.in,
5055         * device/include/Makefile.in,
5056         * device/lib/Makefile.in,
5057         * doc/Makefile,
5058         * link/Makefile,
5059         * link/z80/Makefile.in,
5060         * packihx/Makefile.in,
5061         * sim/ucsim/main_in.mk,
5062         * sim/ucsim/avr.src/Makefile.in,
5063         * sim/ucsim/doc/Makefile.in,
5064         * sim/ucsim/gui.src/serio.src/Makefile.in,
5065         * sim/ucsim/hc08.src/Makefile.in,
5066         * sim/ucsim/s51.src/Makefile.in,
5067         * sim/ucsim/xa.src/Makefile.in,
5068         * sim/ucsim/z80.src/Makefile.in,
5069         * src/Makefile.in,
5070         * support/cpp2/Makefile.in,
5071         * support/librarian/Makefile,
5072         * support/makebin/Makefile: added DESTDIR to the install path proposed
5073         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
5074         * doc/sdccman.lyx: added DESTDIR documentation
5075
5076 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
5077
5078         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
5079         instruction for interrupt handlers, use fast returns when returning
5080         from high priority interrupts
5081
5082 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5083
5084         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
5085         code generation
5086         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
5087         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
5088         bugs, ported much of Bernhard's code from mcs51
5089         * src/mcs51/gen.c (genSend),
5090         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
5091         than one when calling a reentrant function
5092         * device/lib/_mullong.c: defined an alternate struct layout for big
5093         endian ports (hc08)
5094
5095 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5096
5097         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
5098         test
5099
5100 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5101
5102         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
5103         are sane and complete before asking the port its prefered parameter
5104         passing method (fixes bug #1017633)
5105         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
5106         and _ret3
5107
5108 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5109
5110         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
5111         problem in bitfields >= 8 bits.
5112
5113 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5114
5115         * src/SDCCsymt.c: undid changes that were not meant to be committed
5116
5117 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5118
5119         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
5120
5121 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
5122
5123         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
5124           copied and wrong bit got inverted
5125
5126 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5127
5128         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
5129         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
5130         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
5131         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
5132         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
5133         assignments to bitfields at known addresses
5134         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
5135         reads from bitfields at known addresses
5136         * src/hc08/ralloc.c (packRegisters),
5137         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
5138         genhc08Code): optimize pointer get values used as conditionals
5139         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
5140         and branch
5141
5142 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5143
5144         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
5145         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
5146         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
5147         as conditionals
5148
5149 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5150
5151         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
5152
5153 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5154
5155         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
5156         related problems
5157
5158 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
5159
5160         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
5161
5162 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5163
5164         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
5165         mcs51 port
5166
5167 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
5168
5169         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
5170
5171 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5172
5173         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
5174         cases use more compact code.
5175
5176 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
5177
5178         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
5179
5180 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5181
5182         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
5183
5184 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5185
5186         * src/SDCCsymt.h,
5187         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
5188         parameter of changePointer() from symbol* to sym_link*
5189         * src/SDCCast.c (decorateType): call changePointer() for CAST op
5190         * src/SDCCsymt.c (compareType): void* type is castable to other
5191         pointers, but not necesarily an exact match.
5192         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
5193         is no longer blindly treated as an exact match.
5194         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
5195
5196 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
5197
5198         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
5199
5200 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
5201
5202         * src/pic/gen.c,
5203         * src/pic/pcode.c,
5204         * src/pic/ralloc.h,
5205         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
5206
5207 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
5208
5209         * src/pic/device.c,
5210         * src/pic/device.h,
5211         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
5212
5213 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5214
5215         * src/mcs51/gen.c (emitcode): fixed bug #992819
5216
5217 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
5218
5219         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
5220           there's no need to make it worse
5221
5222 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5223
5224         * src/mcs51/ralloc.c (deassignLR),
5225         * src/ds390/ralloc.c (deassignLR),
5226         * src/hc08/ralloc.c (deassignLR),
5227         * src/z80/ralloc.c (deassignLR),
5228         * src/pic/ralloc.c (deassignLR),
5229         * src/pic16/ralloc.c (deassignLR),
5230         * src/avr/ralloc.c (deassignLR),
5231         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
5232         rlivePoint): fixed another part of bug #971834
5233
5234 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5235
5236         * src/z80/main.c: enabled "critical" keyword
5237         * src/z80/mappings.i,
5238         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
5239         functions (fixes bug #979646)
5240         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
5241
5242 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5243
5244         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
5245           such as c:\mydir.
5246
5247 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
5248
5249         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
5250           doesn't disable too much optimizations
5251
5252 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5253
5254         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
5255
5256 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
5257
5258         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
5259
5260 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
5261
5262         * src/pic/gen.c tidied up tabs
5263         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
5264         * src/pic/main.c tidied up tabs
5265         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
5266         * src/pic/pcoderegs.c tidied up tabs
5267         * src/pic/ralloc.c tidied up tabs
5268
5269 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
5270
5271         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
5272         to S_FIXED for pic16 port and when symbol is not in level 0,
5273         allocate for S_REGISTER storage class and pic16 port, too,
5274         * src/pic16/device.h: prototype for checkSym,
5275         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
5276         * (pic16_assignConfigWordValue): test the value and the mask to
5277         validate that the value is suitable for the configuration word,
5278         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
5279         collect extern declared symbols, don't emit symbol twice, check
5280         first if symbol is in publics set first,
5281         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
5282         * added command line '--fstack' which enables an experimental
5283         feature for stack access, too buggy to be used yet...
5284         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
5285         * (pic16_allocDirReg): when register has storage class S_REGISTER
5286         allocate in pic16_dynAccessRegs,
5287         * device/include/pic16/pic18f????.h: modified configuration word
5288         naming convention, words started as CONFIG0H but should be CONFIG1H
5289
5290 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
5291
5292         * device/include/mcs51reg.h: fixed bug 970993
5293
5294 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
5295
5296         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
5297         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
5298         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
5299         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
5300         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
5301         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
5302           error/warning numbers,
5303           added function setWarningDisabled()
5304         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
5305         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
5306           _memcmp.c _memmove.c calloc.c realloc.c free.c
5307         * support/regression/tests/malloc.c: added tests for new functionality
5308         * support/regression/tests/zeropad.c: added tests for truncated initializers
5309           and initialized char arrays starting with '\x0'
5310         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
5311
5312 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
5313
5314         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
5315
5316 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5317
5318         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
5319         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
5320         peephole 177.e. Thanks to anonymous
5321
5322 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
5323
5324         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
5325         function isn't used in the source but referenced as a
5326         variable initializer then declare it as extern in .asm file
5327
5328 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
5329
5330         * .version: increased version number to 2.4.3
5331
5332         Adding version extension according to ChangeLog CVS revision
5333         * src/Makefile.in (target all): added dependency 'version.h'
5334         * (rule version.h): added rule to create version.h from ChangeLog,
5335         * (rule dep): added dependency version.h,
5336         * src/version.awk: AWK script to create version.h
5337         * src/SDCCdwarf2.c (dwWriteModule),
5338         * src/SDCCglue.c (initialComments),
5339         * src/SDCCmain.c (printVersionInfo): modified to write after
5340         version string the version extension number,
5341         * src/SDCCutil.c: included "version.h"
5342         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
5343         number,
5344         * src/SDCCutil.h: added prototype for getBuildNumber
5345
5346         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
5347         includeDirsSet, too,
5348         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
5349         const char [] is found in function prototype...
5350
5351         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
5352         moving to WREG with source is already in WREG,
5353         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
5354         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
5355         * (aopForSym): stack'ed symbols are partially supported, added
5356         if-clause to support symbols in FARSPACE,
5357         * (sameRegs): added test for AOP_ACC to see if registers are same,
5358         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
5359         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
5360         * (pic16_popRegFromString): will not allocate a new register if it
5361         doesn't find one by name, bug may have introduced...
5362         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
5363         * (genIpush): revived to use pic16 port's stack,
5364         * (genAddrOf): added incomplete case for stack'ed operand,
5365         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
5366         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
5367         can handle multibyte operands,
5368         * src/pic16/glue.c (pic16_printIval*): some debug info added,
5369         * (pic16initialComments): added message for MPLAB compatibility
5370         mode enabled,
5371         * src/pic16/main.h: prototype for pic16_mplab_comp,
5372         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
5373         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
5374         * (_pic16_linkEdit): NEW, handles link stage, transferred here
5375         because of increased complexity of procedure,
5376         * (_process_pragma): stack pragma changed to format 'stack pos len',
5377         emit symbol '_stack_end' to conform with gplink,
5378         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
5379         to search for register,
5380         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
5381         PO_GPR_REGISTER,
5382         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
5383         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
5384         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
5385         case for PO_GPR_REGISTER,
5386         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
5387         dies, the new era is ahead !...
5388         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
5389         pic16_dynInternalRegs,
5390         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
5391         * (pic16_allocDirReg): minor optimizations and bug fixes,
5392         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
5393
5394         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
5395         load stack and frame pointer with address of 'stack_end' symbol
5396
5397 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
5398
5399         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
5400         without source code but only variable initializers
5401
5402 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
5403
5404         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
5405         external are not declared as extern to reduce overhead while linking
5406
5407 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
5408
5409         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
5410
5411 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
5412
5413         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
5414           Yee Keat for the patch
5415         * src/SDCCast.c (decorateType): fixed bug #979599
5416         * src/ds390/gen.h: removed local fReturnSizeDS390
5417         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
5418         * src/ds390/gen.c (genAnd, genOr, genXor),
5419         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
5420
5421 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
5422
5423         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
5424         add relFilesSet to $3, manipulate $2 to handle linking of object
5425         files without source files in command line,
5426         * device/include/pic16 (all headers): added ID location macros,
5427         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
5428         entries for ID location bytes,
5429         * (pic16_assignIdByteValue): NEW,
5430         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
5431         added field dumpcalltree to pic16_options_t,
5432         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
5433         is used instead of pic16_Gstack_base_addr, check if (ifx) before
5434         emitting rFalseIfx label after check_carry label,
5435         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
5436         pic16_emitDIRegs), NEW
5437         * (pic16glue): dump .calltree file when option --calltree found,
5438         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
5439         * (_pic16_genAssemblerPreamble): emit ID locations after
5440         configuration registers,
5441         * (pic16_linkCmd): modifications of the link command,
5442         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
5443         * (pic16_pCodeInitRegisters): don't init stack registers,
5444         * (pic16_findPrevInstruction): fixed bug,
5445         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
5446         bug with immediate registers,
5447         * (buildCallTree): traces stack push and pop,
5448         * (pct2): dump also stack usage for each function,
5449         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5450         * (pic16_allocDirReg): various modifications,
5451         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5452         fixed to 1,
5453
5454 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5455
5456         * src/pic16/pcode.c: removed buggy double colon
5457
5458 2004-07-01 Borut Razem <borut.razem AT siol.net>
5459
5460         * support/scripts/sdcc.nsi: added include/pic16 to setup
5461
5462 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5463
5464         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5465         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5466         target 'clean',
5467         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5468         specific command line arguments. Also added sample lkr script
5469         for placing a variable at a specific memory bank.
5470         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5471         at a specific memory bank,
5472         * (pic16_dump_isection): fixed bug which caused string literals to
5473         be omitted when dumping idata section,
5474         * (pic16_groupRegistersInSection): added code to handle registers
5475         in specific memory banks,
5476         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5477         public, all references are renamed too,
5478         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5479         AOP_DPTR2,
5480         * (pic16_storeForReturn): added case to handle when dest is WREG,
5481         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5482         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5483         pic16_rel_udata, check to see if that register is marked as being
5484         a member of a specific memory bank,
5485         * (pic16_printIvalCharPtr): added code to add string literals either
5486         to code or the idata sections,
5487         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5488         also accept the 'udata' pragma,
5489         * src/pic16/main.h: new structure types sectName and sectSym
5490         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5491         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5492         * (pic16_findPrevInstruction): fixed, it returned nothing,
5493         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5494         instruction combinations,
5495         * (pic16_FixRegisterBanking): heavily reorganised,
5496         * (pic16_AnalyzeBanking): if generating banksel directives is
5497         disabled, then don't call FixRegisterBanking at all,
5498         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5499         completely removed,
5500         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5501
5502 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5503
5504         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5505         Phuah Yee Keat <yk.phuah AT nestac.com>
5506
5507 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5508
5509         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5510         correctly the IVT even if it is relocated to some other location
5511
5512 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5513
5514         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5515         * device/include/pic16/pic18f2220.h: NEW,
5516         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5517         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5518         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5519         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5520         nodefaultlibs, ivt_loc is the location of the interrupt vector
5521         table, and nodefaultlibs signs that default libraries should not be
5522         linked in link stage,
5523         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5524         according to --ivt-loc argument,
5525         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5526         when pragma stack is found,
5527
5528 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5529
5530         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5531         256 (range check), 257 (do while), 258.a-f (bit banging
5532         f.e. on 3-wire SPI bus)
5533
5534 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5535
5536         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5537         variables used exclusively within a loop
5538
5539 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5540
5541         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5542
5543 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5544
5545         * src/SDCClrange.c (computeClash): fixed bug #971834
5546
5547 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5548
5549         * src/mcs51/gen.c (genCmp): fixed bug #975903
5550         * src/hc08/gen.c (operandsEqu),
5551         * src/ds390/gen.c (operandsEqu),
5552         * src/z80/gen.c (operandsEqu),
5553         * src/pic/gen.c (operandsEqu),
5554         * src/pic16/gen.c (operandsEqu),
5555         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5556         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5557
5558 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5559
5560         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5561
5562 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5563
5564         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5565         default case in switch statement,
5566         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5567         to eliminate problem with initialisation of pointers, but problem
5568         still exists,
5569         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5570         * (emitStaticSegment): removed various lines emitting debug info,
5571         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5572         added processor registers for utilizing EEPROM,
5573         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5574         configurable and set 8
5575
5576 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5577
5578         * .version: increased version number to 2.4.2,
5579
5580         Cumulative patch for pic16 port
5581         * src/pic16/device.c: changed scheme to dump initial values for
5582         variables in idata segment, all print_idata* functions were removed,
5583         now the pic16_printIval* will be called,
5584         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5585         * _pic16_printPointerType, pic16_printPointerType,
5586         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5587         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5588         NEW, similar to the respective functions in SDCCglue.c,
5589         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5590         way, emitting hex bytes,
5591         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5592
5593 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5594
5595         * src/avr/ralloc.c (serialRegAssign),
5596         * src/xa51/ralloc.c (serialRegAssign),
5597         * src/pic/ralloc.c (serialRegAssign),
5598         * src/pic16/ralloc.c (serialRegAssign),
5599         * src/hc08/ralloc.c (serialRegAssign),
5600         * src/z80/ralloc.c (serialRegAssign),
5601         * src/ds390/ralloc.c (serialRegAssign),
5602         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5603
5604 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5605
5606         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5607         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5608
5609 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5610
5611         Cumulative patch for pic16 port:
5612         * src/pic16/device.h (typedef PIC16_device) modified fields for
5613         defining microcontrollers,
5614         * src/pic16/device.c: added new info for all devices in Pics16 array,
5615         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5616         to be optimised out by the pCode optimiser,
5617         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5618         specially, bug reported by G.M. Gallant,
5619         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5620         as force'd so that cannot be optimised out by pCode optimiser,
5621         * src/pic16/pcode.c,
5622         * src/pic16/pcodepeeph.c,
5623         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5624         they are disabled by default, but can be enabled explicit with
5625         command argument --denable-peeps, for testing,
5626         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5627         --pomit-ivt in COMPILE_FLAGS
5628
5629 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5630
5631         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5632           compilation on MSVC
5633
5634 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5635
5636         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5637
5638 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5639
5640         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5641         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5642
5643 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5644
5645         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5646         would only assign 0x300001 register.
5647
5648 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5649
5650         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5651         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5652
5653 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5654
5655         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5656         for ds80c400
5657         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5658         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5659         added peephole 254 (left shift), 255 (jump table)
5660
5661 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5662
5663         * device/lib/Makefile.in: removed comment line with model-pic16,
5664         * (target port-specific-objects-pic16): the libraries and objects
5665         are copied to the build directory form the device/lib/pic16/bin
5666         directory
5667
5668         Cumulative patch concerning pic16 port:
5669         * library directory has been re-organized,
5670         * added support for PIC18F1220,
5671         * added headers and library sources for chips 18f1220,18f6520,
5672         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5673
5674         * configuration registers setting has changed, now each supported
5675         device has a complete description of the registers it uses,
5676         * all initialisations are moved to idata sections, these section
5677         can be absolute or relocatable,
5678         * fixed initialisation of codespace variables,
5679         * fixed warning about PCLATU and gpsim,
5680         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5681         * (genAssign): use table reads when assigning from variables in codespace,
5682         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5683         char/int variables placed in codespace,
5684         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5685         registers set in .asm file, no need for --pomit-config-words anymore,
5686         * (pic16glue): some 8051 legacy segments are commented out
5687         (to be removed completely),
5688         * added support for alternative assembler and linker with --asm=
5689         and --link= command line arguments,
5690         * peepholes are disabled automatically in the port, no need to
5691         specify on command line,
5692         * port supports natively char/int/long multiplication, but converts
5693         all divisions to support functions,
5694         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5695         to the file set in variable $2,
5696         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5697         strings in ASCII format and not in hex,
5698         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5699         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5700         allocate proper register if iCodes aren't temporary,
5701
5702 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5703
5704         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5705
5706 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5707
5708         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5709         is commented out
5710
5711 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5712
5713         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5714         computed address is reused
5715         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5716         multi-byte bitfields
5717
5718 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5719
5720         * src/z80/gen.c: (genArrayInit): must check for pointers too
5721
5722 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5723
5724         * support/regression/tests/zeropad.c: never meant to commit the
5725           nestedstruct test: removed, added check for GCC version
5726
5727 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5728
5729         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5730         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5731         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5732           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5733           bugs 928906 and 954082 half-empty initializers
5734         * src/SDCCsymt.h,
5735         * src/SDCCsymt.c (getAllocSize): added for above fix
5736         * src/z80/gen.c (genArrayInit): fixed bug 741044
5737         * support/regression/tests/zeropad.c: added tests
5738
5739 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5740
5741         * src/pic16/device.c (pic16_dump_section): corrected bug which
5742         caused some symbols of the libraries to be misplaced
5743
5744 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5745
5746         * src/pic16/glue.c,
5747         * src/pic16/ralloc.h,
5748         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5749         to fix conflict with pic port
5750
5751 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5752
5753         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5754         externs configuration variables,
5755         * src/pic16/ralloc.h,
5756         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5757         prototype in header, commented out some debug messages
5758
5759 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5760
5761         * src/pic16/glue.c,
5762         * src/pic16/main.c,
5763         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5764         for gpasm COFF object generation. Thanks to D. Hawkins for
5765         his patch info
5766
5767 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5768
5769         * src/ds390/main.c,
5770         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5771         Brock for spotting this)
5772         * src/ds390/gen.c (genEndFunction),
5773         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5774         interrupt handler and critical. Disable push/pop optimizations when
5775         peephole optimizations disabled.
5776
5777 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5778
5779         Updated pic16 library sources and headers.
5780         * device/lib/pic16/pic18f*/ ,
5781         * device/include/pic16/*.h: modified to handle structured SFR
5782         definitions
5783
5784 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5785
5786         * src/port.h (PORT structure): added hook initPaths, now each
5787         port can declare its own default search paths,
5788         which can been seen with the --print-search-dirs option,
5789         see pic16 port for example,
5790         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5791         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5792         * (doPrintSearchDirs): NEW, replaces in a central manner the
5793         printing of search dirs which was split in set*Paths functions,
5794         * (main): added call to port->initPaths and doPrintSearchDirs,
5795         * src/avr/main.c,
5796         * src/ds390/main.c,
5797         * src/hc08/main.c,
5798         * src/izt/i186.c,
5799         * src/izt/tlcs900h.c,
5800         * src/mcs51/main.c,
5801         * src/pic/main.c,
5802         * src/pic16/main.c: modified port structures to reflect addition of
5803         initPaths hook,
5804
5805         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5806         * (pic16_dump_section): for registers in same address reserve memory once,
5807         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5808         to no_banksel,
5809         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5810         result is greater in size than right or left,
5811         * (pic16_genUMult8X8_8): there are some cases where the result can
5812         be 16 bits size, so handle these,
5813         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5814         * (pic16_outBitC): modified to emit pcodes,
5815         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5816         or not,
5817         * (genDivOneByte): implemented algorithm to divide 8-bits,
5818         * (genCmp): uncommented goto, but issues still exist,
5819         * (genAnd): fixed a bug with variables >8bits,
5820         * (genPackBits): optimization added that uses BCF/BSF to change a
5821         single bit,
5822         * (genAssign): fixed bug when assigning floating point literals,
5823         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5824         __sdcc_gsinit_startup label,
5825         * src/pic16/main.c (_pic16_init): removed search directory
5826         initialisations,
5827         * (_pic16_initPaths): NEW, used to initialise search directories,
5828         * (_hasNativeMulFor): support functions for all except char/int
5829         multiplication, and char division,
5830         * (PIC16_port struct): modified entry for native mul support,
5831         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5832         no_banksel option,
5833         * (buildCallTree): call to register_usage is ifdef'ed out,
5834
5835 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5836
5837         * device/include/string.h: applied Stas Sergeev's patch to make this
5838         header file compatible with the preprocessor -Wundef option
5839         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5840         failure (fixes bug #941458)
5841
5842 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5843
5844         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5845         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5846         that the variable, not the function, should be static
5847         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5848         to be consistent with non-literal case
5849
5850 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5851
5852         * src/SDCCast.c (isConformingBody): fixed bug #949967
5853         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5854         convilong): fixed bug #952086
5855
5856 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5857
5858         * src/SDCCmem.c (allocVariables): fixed bug #955321
5859
5860 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5861
5862         * src/hc08/main.c (_hc08_genAssemblerEnd),
5863         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5864         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5865         completely eliminated the use of a temporary file
5866         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5867         when more than one file linked
5868         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5869
5870 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5871
5872         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5873         which fixes bug #543481
5874         * support/regression/tests/bug-751703.c: fixed comments left from a
5875         cut and paste error
5876         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5877         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5878         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5879         scopes
5880         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5881         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5882         are now changed to underscores in moduleName
5883
5884 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5885
5886         * as/mcs51/lkmem.c: better fix for bug #954173
5887
5888 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5889         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5890
5891         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5892         * device/include/c8051f000.h,
5893         * device/include/c8051f120.h,
5894         * device/include/c8051f300.h,
5895         * device/include/c8051f310.h,
5896         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5897         PWM16) and detab'ed
5898
5899 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5900
5901         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5902         and mailing lists, doc'ed --no-peep-comments, removed reference
5903         to knoppix (newest version has no LyX/LaTeX), other minor changes
5904         * src/SDCCglue.c (glue): save 2 bytes stack space with
5905         option --main-return. The ljmp could probably be avoided too
5906
5907 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5908
5909         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5910
5911 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5912
5913         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5914         * src/SDCCopt.c (isLocalWithoutDef),
5915         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5916         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5917         (credit to Maarten Brock for patch #949363, on which this is based)
5918         * support/regression/tests/bug-751703.c: some test cases of extern used
5919         within inner scopes.
5920
5921 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5922
5923         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5924         SPEC_STRUCT
5925         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5926         struct definitions
5927         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5928         dwWriteLabel): fix to create valid debugger symbols even when
5929         the module name has non-alphanumeric symbols in it
5930         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5931         when a variable's allocation has been optimized away
5932
5933
5934 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5935
5936         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5937         * src/hc08/main.c,
5938         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5939         * src/mcs51/main.c,
5940         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5941         * src/ds390/main.c,
5942         * src/z80/gen.c (z80_emitDebuggerSymbol),
5943         * src/z80/main.c,
5944         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5945         * src/pic/main.c,
5946         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5947         * src/pic16/main.c,
5948         * src/avr/gen.c (avr_emitDebuggerSymbol),
5949         * src/avr/main.c,
5950         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5951         * src/xa51/main.c,
5952         * src/SDCCdebug.c (emitDebuggerSymbol),
5953         * src/SDCCdebug.h,
5954         * src/port.h: added a debugger struct to the port struct. Added a
5955         callback for defining debugger symbols
5956
5957         * src/SDCCast.c (createLabel),
5958         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5959         with isitmp = 1
5960         * src/SDCCicode.h,
5961         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5962         iCode back to the ast for the function
5963
5964         * src/hc08/ralloc.c (hc08_assignRegisters),
5965         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5966         unneeded fields from the regs struct.
5967         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5968         pushReg() & pullReg() functions instead of emitcode()
5969
5970         * src/hc08/gen.c (genLabel, genhc08Code),
5971         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5972
5973         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5974         debugger hooks
5975
5976         * src/hc08/gen.c (genEndFunction, genhc08Code),
5977         * src/hc08/gen.h,
5978         * src/mcs51/gen.c (genEndFunction, gen51Code),
5979         * src/mcs51/gen.h,
5980         * src/ds390/gen.c (genEndFunction, gen390Code),
5981         * src/ds390/gen.h,
5982         * src/z80/gen.c (genEndFunction, genZ80Code),
5983         * src/z80/gen.h,
5984         * src/z80/z80.h,
5985         * src/pic/gen.c (genEndFunction, genpic14Code),
5986         * src/pic/gen.h,
5987         * src/pic16/gen.c (genEndFunction, genpic16Code),
5988         * src/pic16/gen.h,
5989         * src/avr/gen.c (genEndFunction, genAVRCode),
5990         * src/avr/gen.h,
5991         * src/xa51/gen.c (genEndFunction, genXA51Code),
5992         * src/xa51/gen.h,
5993         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5994         specific code to cdbFile.c and out of the backend code generators
5995
5996         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5997         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5998         starting address is now 0
5999
6000         * as/hc08/asm.h,
6001         * as/hc08/m08pst.c,
6002         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
6003         assembler directive for DWARF support
6004         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
6005
6006         * src/src.dsp,
6007         * src/Makefile.in,
6008         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
6009
6010 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6011
6012         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
6013         and inappropriate peephole optimization in jump tables
6014
6015 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6016
6017         * as/hc08/m08pst.c,
6018         * src/SDCCglue.c: sdccopt works for the hc08 port now
6019
6020 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
6021
6022         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
6023
6024 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6025
6026         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
6027
6028 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6029
6030         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
6031         rules
6032         * src/SDCCmain.c,
6033         * src/SDCCglobl.h,
6034         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
6035         comments from the peephole optimizer replacement rules
6036         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
6037         symbols
6038         * src/SDCCcse.c (updateSpillLocation),
6039         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
6040         equivalents
6041         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
6042         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
6043         objects far pointers
6044
6045 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6046
6047         * src/SDCCsymt.h: a missing part of my last change
6048         * src/pic/ralloc.c (regTypeNum),
6049         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
6050
6051 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6052
6053         * src/SDCCicode.h,
6054         * src/SDCCicode.c (aggrToPtrDclType),
6055         * src/SDCCptropt.h,
6056         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
6057         ptrPseudoSymConvert),
6058         * src/pic/ralloc.c (regTypeNum),
6059         * src/pic16/ralloc.c (regTypeNum),
6060         * src/hc08/ralloc.c (regTypeNum),
6061         * src/ds390/ralloc.c (regTypeNum),
6062         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
6063         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
6064
6065 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6066
6067         * link/z80/lkmain.c (afile),
6068         * as/hc08/lkmain.c (afile),
6069         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
6070         prevent a pointer problem when a filename has no directory and
6071         no extension specified.
6072
6073 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6074
6075         * link/z80/lkmain.c (afile): allow periods in directory names
6076         * link/z80/lkmain.c (afile),
6077         * as/mcs51/lkmain.c (afile),
6078         * as/hc08/lkmain.c (afile): allow linker script file to have an
6079         extension other than ".lnk"
6080         * link/z80/lklex.c (getfid),
6081         * link/z80/lkmain.c (parse),
6082         * as/mcs51/lklex.c (getfid),
6083         * as/mcs51/lkmain.c (parse),
6084         * as/hc08/lklex.c (getfid),
6085         * as/hc08/lkmain.c (parse): Support comments in the linker script
6086         file on lines by themselves and after filenames
6087
6088 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6089
6090         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
6091
6092 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6093
6094         * src/z80/peeph-z80.def: removed some peephole rules that don't
6095         work with multibyte arithmetic (fixed bug #937126)
6096         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
6097         to registers and not global variables
6098         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
6099         geniCodePreInc, geniCodePostDec, geniCodePreDec,
6100         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
6101         checking for assignments not internally generated (fixed bug #931895)
6102         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
6103         structure member (fixed bug #930072)
6104
6105 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6106
6107         * src/SDCCmain.c (linkEdit),
6108         * src/hc08/main.c (_hc08_parseOptions),
6109         * as/hc08/Makefile.in,
6110         * as/hc08/aslink.h,
6111         * as/hc08/asm.h,
6112         * as/hc08/m08pst.c,
6113         * as/hc08/lkrloc.c (relr, rele),
6114         * as/hc08/lkarea.c (lnkarea)
6115         * as/hc08/lkmain.c (afile, parse),
6116         * as/hc08/lkelf.c: support for ELF output
6117         * as/hc08/lks19.c (s19),
6118         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
6119
6120 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6121
6122         * as/mcs51/lkihx.c: Fixed bug #899105.
6123
6124 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6125
6126         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
6127         .dsp files from Unix to DOS.
6128
6129 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6130
6131         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
6132         function pointers; we have been compliant for several months now.
6133         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
6134         change that was accidently commented out
6135         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
6136         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
6137         bug #922319
6138
6139 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6140
6141         * src/hc08/gen.c: output of all of the internal debugging information
6142         is now controlled by the D() macro; it is disabled by default
6143
6144 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6145
6146         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
6147         harder to keep the same registers during a CAST iCode
6148         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
6149         long via int can be done in a single cast, if the signedness is
6150         correct.
6151         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
6152         putchar() in tinibios.c in ds390's library
6153
6154 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
6155
6156         * src/SDCCast.c (decorateType): fixed bug #898889,
6157         cast result of a literal complement too
6158         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
6159         fixed check for bitfields
6160
6161 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
6162
6163         * src/SDCCicode.c (geniCodeLogic): made it static,
6164         (geniCodeLogicAndOr): added in order to fix bug #905492,
6165         (ast2iCode): fixed bug #905492
6166         * support/regression/tests/bug-905492.c: added
6167         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
6168         (processParms): fixed bug #927659: don't copy parms, this will clear
6169         decorated flag
6170         * support/regression/tests/bug-927659.c: added
6171
6172 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
6173
6174         * src/SDCCast.c (addCast): don't cast float to char
6175         * device/lib/libsdcc.lib: added _memmove
6176
6177 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
6178
6179         * device/lib/large/Makefile: fixed parallel execution by
6180         replacing `make` by `$(MAKE)`
6181
6182 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6183
6184         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
6185         offsets (fixes bug #923936)
6186
6187 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
6188
6189         * device/lib/small/Makefile: fixed parallel execution by
6190         replacing `make` by `$(MAKE)`
6191
6192 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6193
6194         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
6195
6196 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
6197
6198         * src/pic/gen.c (genCpl): multi-byte complements were not working.
6199         * src/regression/Makefile: Regression test was not running.
6200
6201 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
6202
6203         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
6204         complement if possible
6205         * src/SDCCval.c (valComplement),
6206         * src/SDCCicode.c (operandOperation): fixed complement of literal
6207         * support/regression/tests/onebyte.c (testComplement): added
6208
6209 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
6210
6211         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
6212         return an optimized tree; actually replace actParm with the new tree
6213         * src/SDCCast.h: added some parantheses to remove side effects
6214         * support/regression/tests/bug-920866.c
6215
6216 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
6217         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
6218         Bit operands were not being handled properly in the pic14 port.
6219         (now src/regression/add.c passes again).
6220
6221 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6222
6223         * src/SDCC.y (labeled_statement): case and default no longer require
6224         a following statement (RFE #893037)
6225
6226 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6227
6228         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
6229         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
6230         disabled (fixes bug #916294)
6231         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
6232         "mov a,acc"; patch provided by Lenny Story
6233         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
6234
6235 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6236
6237         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
6238         functions
6239         * src/ds390/gen.c (genFunction, genEndFunction),
6240         * src/ds390/ralloc.c (ds390_assignRegisters),
6241         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
6242         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
6243         pushed if there are parameters passed on the stack. Also, a cleaner
6244         way to decide if r0/r1 should be pushed/popped. (Together they fix
6245         bug #918693)
6246
6247 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6248
6249         * doc/sdccman.lyx,
6250         * device/lib/mcs51/crtpagesfr.asm,
6251         * device/lib/mcs51/crtxinit.asm,
6252         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
6253         to avoid confusion with Si Lab's SFRPAGE register.
6254
6255 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6256
6257         * src/SDCCglue.c (emitMaps): allow public sfr variables
6258         * src/SDCCglue.c (initialComments): include compiler build date
6259         with compiler version and put the timestamp of the generated
6260         assembly file on a serperate line to be less confusing.
6261         * src/port.h: added genInitStartup hook
6262         * src/avr/main.c,
6263         * src/ds390/main.c,
6264         * src/hc08/main.c,
6265         * src/pic/main.c,
6266         * src/pic16/main.c,
6267         * src/xa51/main.c,
6268         * src/z80/main.c: genInitStartup initialize as NULL (default to
6269         historical behaviour)
6270         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
6271         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
6272         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
6273         library instead of hard coding it into the compiler.
6274         * support/regression/ports/mcs51-stack-auto/spec.mk,
6275         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
6276         * device/lib/mcs51/Makefile,
6277         * device/lib/small/Makefile,
6278         * device/lib/large/Makefile,
6279         * device/lib/mcs51/crtpagesfr.asm,
6280         * device/lib/mcs51/crtstart.asm,
6281         * device/lib/mcs51/crtxclear.asm,
6282         * device/lib/mcs51/crtxinit.asm,
6283         * device/lib/mcs51/crtclear.asm,
6284         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
6285         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
6286         and into user configurable files.
6287         * device/lib/clean.mk: clean mcs51 directory too
6288         * support/regression/tests/longlit.c: added static to T1 declaration
6289         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
6290         accesses in the initialization code
6291
6292 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6293
6294         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
6295         OSCTRIMVAL as noted in bug #916008
6296
6297 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6298
6299         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
6300         in loops with multiple exits (reported as incorrect registers
6301         used by Martin Helmling in Sdcc-user list)
6302
6303 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6304
6305         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
6306         made ds390 register extensions look less like error messages
6307
6308 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6309
6310         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
6311         reported by Adam Wozniak in Sdcc-user list
6312
6313 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
6314
6315         * src/SDCCast.c (decorateType): fixed with bug and promotion in
6316         arithmetic optimizations, added debug output
6317
6318 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
6319
6320         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
6321         * sdcc.spec: updated and split sdcc into 3 rpms
6322         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
6323         needed for literals of LEFT_OP and '+'
6324         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
6325         introduced RESULT_TYPE_NOPROM
6326         (geniCodeMultiply): fixed logic for decision if mul is optimized to
6327         left shift
6328         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
6329         limited promotion to int only for '*'
6330         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
6331
6332 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
6333
6334         * src/pic16/gen.c (genSkip),
6335         (genc16bit2lit), (gencjneshort): commented out
6336         (is_LitOp): new helper function, checks operand type
6337         (genCmpEq): rewritten
6338
6339 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
6340
6341         * support/regression/tests/bug-908454.c: added
6342
6343 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
6344
6345         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
6346         * src/SDCCicode.c (usualBinaryConversions): op needs int type
6347         (geniCodeCast): cosmetic, don't preserve bit storage class
6348         (geniCodeLeftShift): added promotion
6349         (geniCodeLogic): fixed regression
6350         * src/SDCCsymt.c (computeTypeOr): accept bits too
6351         (compareType): 2nd part of fix for bug #908454, needed for bitfields
6352
6353 2004-03-07  Borut Razem <borut.razem AT siol.net>
6354
6355         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
6356
6357 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
6358
6359         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
6360         version of pic16_genPackRegisters which does not check if ic is a
6361         CAST operator,
6362         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
6363         function cause string1.c regression test fails
6364
6365 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
6366
6367         * sim/ucsim/configure.in,
6368         * sim/ucsim/configure,
6369         * sim/ucsim/doc/Makefile.in: use docdir
6370         * src/SDCC.y: fixed sbit atrributes
6371         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
6372         * src/SDCCast.c (decorateType): |^& need special promotion handling
6373         * src/SDCCast.h,
6374         * src/SDCCsymt.h: moved definition of RESULT_TYPE
6375         * src/SDCCsymt.h (computeType),
6376         * src/SDCCicode.c: computeType() needs op
6377         * src/SDCCsymt.c (checkTypeSanity),
6378         * doc/sddman.lyx: "plain" bitfields are unsigned
6379         * src/SDCCsymt.c (computeTypeOr): added
6380         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
6381         |^& ops
6382         * src/SDCCval.c (val*): computeType() needs op
6383         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
6384         * support/regression/tests/onebyte.c: added tests for |^&
6385
6386 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
6387
6388         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
6389         for writing icode into asm output.
6390
6391 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
6392
6393         * src/pic16/device.c: added some debug lines enabled
6394         with macro DEBUG_CHECK,
6395         * src/pic16/genarith.c: more debug in genPlus,
6396         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
6397         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
6398         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
6399         * (aopForSym): onStack symbols are re-placed in data memspace,
6400         and onStack flag is cleared,
6401         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
6402         copy temporary pcodeop,
6403         * (genPcall): added warning for not updating PCLATU,
6404         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
6405         always true for pic16 port,
6406         * (genMultOneWord): NEW, supports integer multiplication,
6407         * (genMult): modified to call genMultOneWord,
6408         * (ifxForOp): added warning when return NULL,
6409         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
6410         flag is set before call to operandFromSymbol for implicit
6411         added structures,
6412         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
6413         options.intlong_rent are set by default,
6414         * (_hasNativeMulFor): modified to allow port generation of integer
6415         multiplication,
6416         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
6417         set regtype to REG_SFR for all registers, restricting seting the
6418         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
6419
6420 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6421
6422         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
6423         more than 500 times in the regression tests
6424
6425 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6426
6427         * support/Util/SDCCerr.h,
6428         * support/Util/SDCCerr.c,
6429         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6430         enumerator_list),
6431         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
6432         for symbol conflicts.
6433         * support/valdiags/tests/enum.c,
6434         * support/valdiags/tests/tentdecl.c,
6435         * support/valdiags/tests/struct.c: expect possible error messages
6436         referring to original symbol definitions.
6437         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
6438         * src/SDCCsymt.h,
6439         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
6440
6441 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
6442
6443         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
6444
6445 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
6446
6447         * src/pic16/ralloc.c (newReg): fixed bug #908929
6448
6449 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6450
6451         * src/ds390/gen.c: added missing #include "main.h"
6452
6453 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6454
6455         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6456         checking if symbol is already in set,
6457         * src/pic16/device.h: prototype for checkAddSym,
6458         * src/pic16/gen.c: (_G): added entry interruptvector,
6459         * (assignResultValue): removed some commented out lines,
6460         * (genFunction): check for ISR via sym->type, absolute section for
6461         interrupt code is created via a new pBlock, the goto instruction is
6462         placed now correctly at the interrupt vector position, changed all
6463         references from ivec to _G.interruptvector,
6464         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6465         is the interrupt is a high priority one, same for return from ISR,
6466         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6467         externs to calls of checkAddSym,
6468         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6469         pic16_pcode_verbose flag is set,
6470         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6471         * src/pic16/pcoderegs.c: message about how many registers are saved
6472         will only be emitted if pic16_pcode_verbose flag is set,
6473
6474 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6475
6476         * src/ds390/ralloc.h,
6477         * src/ds390/ralloc.c (ds390_regWithIdx),
6478         * src/ds390/gen.c (emitcode),
6479         * src/ds390/main.h,
6480         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6481         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6482         ds390operandCompare, getRegsRead, getRegsWritten,
6483         initializeAsmLineNode): customized instruction size calculation for
6484         ds390, started basis for some register optimizations
6485         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6486         corresponding assembly output
6487         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6488         missing push/pop of r0/r1. Optimized push/pops
6489
6490 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6491
6492         * src/mcs51/main.c (instructionSize): fixed ACALL size
6493         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6494
6495 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6496
6497         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6498         the sorting of rlist with NULL elements
6499         * (print_idataType, print_idata): NEW to create idata sections
6500         * src/pic16/device.h: idataSymSet new variable
6501         * src/pic16/gen.c (genFunction): fixed some bugs in string
6502         comparing, improved the absolute section creation for ISRs,
6503         added FSR0L/FSR0H in registers that are saved in an ISR,
6504         * (genInline): fixed the processing of inline snippets,
6505         now they undergo no process by the peephole optimizer
6506         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6507         are placed in idataSymSet,
6508         * (pic16emitStaticSeg): extern symbols are added in externs,
6509         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6510         switching when aboslute variables are placed in access bank memory
6511         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6512         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6513         commented out with #if,
6514         * (pic16_packRegisters): reintroduce the check for CAST because some
6515         symbols are not correctly handled,
6516         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6517         pCodeInstruction instead of pCode,
6518         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6519         pCodeAsmDir definition,
6520         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6521         directive, then the argument directive is emitted without the leading
6522         tab, hack for inline labels which must be in the first column,
6523         * (compareLabel,pic16_findNextInstruction),
6524         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6525         * (insertBankSwitch): modified for the new pCodeAsmDir,
6526
6527 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6528         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6529
6530         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6531         instance,
6532         * (pushSide): commented out with #if,
6533         * (assignResultValue): fixed some typos in saving
6534         registers,
6535         * (genPcall): FIXED and sync'ed with genCall,
6536         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6537         * (genNearPointerGet): fixed to handle some more cases,
6538         implementation scheme via table reads,
6539         * (genConstPointerGet): modified to access code memory correct,
6540         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6541         and improved to handle some cases
6542         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6543         instead of "RETLW" for init data
6544         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6545         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6546         variables are placed in access bank memory (<0x80 and >=0xf80),
6547         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6548         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6549         TBLWT_POSTDEC,TBLWT_PREINC
6550         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6551         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6552         directives
6553         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6554         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6555         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6556         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6557
6558 2004-02-29  Borut Razem <borut.razem AT siol.net>
6559
6560         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6561         support/Util/findme.h, support/Util/system.h: enhance binary relative
6562         search for lib and include by using findProgramPath()
6563
6564 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6565
6566         * src/SDCCpeeph.h,
6567         * src/SDCCpeeph.c (pcDistance),
6568         * src/port.h,
6569         * src/mcs51/ralloc.h,
6570         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6571         * src/mcs51/main.h,
6572         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6573         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6574         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6575         size calculation port specific, started basis for some register
6576         optimizations
6577         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6578         missing push/pop of r0/r1. Optimized push/pops
6579         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6580         * device/lib/_modsint.c (_modsint),
6581         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6582         and stack version so regression tests pass
6583
6584 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6585
6586         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6587         * src/SDCCast.c (decorateType): catch another small optimization
6588         with '?' operator
6589         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6590         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6591         modified to finally use computeType() all over SDCC,
6592         see Feature Request #877103
6593         * src/SDCCval.h: cosmetic
6594         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6595         valCompare(); regression tested in muldiv.c
6596         * support/regression/tests/muldiv.c (testMod): mod sign follows
6597         dividend only
6598
6599 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6600
6601         * src/SDCCast.c (decorateType): fixed bug #902362
6602         * doc/INSTALL.txt: fixed install instructions for win32
6603
6604 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6605
6606         * device/include/Makefile.in (install): fixed by replacing spaces
6607         by tabs
6608         * doc/README.txt,
6609         * doc/INSTALL.txt: updated for release
6610         * doc/sdccman.lyx: added warning for --xstack being buggy
6611
6612 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6613
6614         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6615         to eliminate build warnings.
6616         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6617
6618 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6619            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6620
6621         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6622         removed -penable-stack, added comment for stack pragma, added
6623         warning for not initializing the stack/frame registers, removed
6624         comment at interrupts section
6625
6626         Stack is made permanent, there is no ability to disable stack usage.
6627         * src/pic16/device.h,
6628         * src/pic16/device.c: removed all references to USE_STACK macro,
6629         * src/pic16/device.c (pic16_dump_section): when no elements in
6630         rlist, free rlist before return,
6631         * (pic16_dump_int_registers): NEW, internal registers are a new set
6632         of general purpose registers reused by each function,
6633         * (checkAddReg): returns 1 if registers is added to set,
6634         * (pic16_groupRegistersInSection): when a registers is of type
6635         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6636         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6637         SRCASECMP macro is moved here from device.c
6638         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6639         PO_PCLATU, PO_PRODL, PO_PRODH,
6640         * (pic16_pCodeOpType, genMinus,
6641         changed compares to "a" register, with AOP_ACC,
6642         * (pic16_genPlus): fixed some bugs and indented properly,
6643         * (pic16_addSign): changed size to size+offset in the MOVWF
6644         instruction,
6645         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6646         multiply 8-bit operand by literal, result is 8-bit,
6647         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6648         multiply 2 8-bit operand, result is 8-bit,
6649         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6650         genUMult8X*_16,
6651         * src/pic16/gen.c: changed accUse to contain WREG only,
6652         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6653         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6654         true, do not use immediate addressing any more unless sym is a
6655         pointer in codespace,
6656         * (aopForRemat): do not use immediate addressing when symbol not in
6657         codespace and when symbol's address is requested,
6658         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6659         accUse size (= 1),
6660         * (aopGet): added case for AOP_ACC and don't return "accumulator
6661         bug" but WREG instead,
6662         * (popGetTempReg): pushes contents of temporary register in stack,
6663         * (popReleaseTempReg): pops contents of temporary register from
6664         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6665         * (pic16_popGet): separated case AOP_ACC to return register WREG
6666         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6667         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6668         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6669         the use of immediate pointers to certain cases only.
6670
6671         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6672         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6673         * (assignResultValue, genCall, genRet): modified to use the new
6674         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6675         genPcall is still broken,
6676         * (genFunction): added code to create 'A' type pBlocks when
6677         interrupt functions are generated, code not extensively tested yet,
6678         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6679         * (genEndFunction): modified so ISRs pop stored registers from stack,
6680         * (genMultOneByte): cleanup,
6681         * (AccRsh): added flag andmask, to and result with appropriate mask,
6682         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6683         * (genDataPointerGet): fixed and reenabled its use,
6684         * (genNearDataPointerGet): bugs fixed,
6685         * (genDataPointerSet): bugs fixed,
6686         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6687         pic16_DumpSymbol, pic16_DumpOp,
6688         * src/pic16/genutils.h: function prototypes for the above functions,
6689         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6690         pointers,
6691         * (pic16emitRegularMap): many many many improvements, but needs a
6692         major cleanup,
6693         * src/pic16/main.c: enable_stack in pic16_options is removed,
6694         * (_pic16_parseOptions): removed command line options -penable-stack,
6695         * (_process_pragma): emit stack symbol only when stack pragma is
6696         processed,
6697         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6698         redirected to FSR0L/FSR0H pair,
6699         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6700         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6701         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6702         for immediates,
6703         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6704         * (dumpPicOptype): NEW,
6705         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6706         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6707         with movff instruction,
6708         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6709         added pic16_int_regs, some packRegsFor* functions are commented out,
6710         because produce errors,
6711         * src/pic16/NOTES: minor modifications
6712
6713 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6714
6715         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6716         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6717         --pack-iram.
6718         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6719         * as/mcs51/lkaomf51.c: fixed bug #895763
6720
6721 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6722
6723         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6724
6725 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6726
6727         * doc/sdccman.lyx: added details about the HC08 storage classes and
6728         interrupts, fixed the register usage info for z80 & gbz80
6729
6730 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6731
6732         * doc/sdccman.lyx: added more pic16 port documentation
6733         * device/include/pic16/: added header pic18fregs.h
6734
6735 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6736
6737         * doc/sdccman.lyx: added Vangelis' contribution
6738
6739 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6740
6741         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6742         extend to the next CALL or PCALL, not just to the next CALL.
6743
6744 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6745
6746         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6747
6748 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6749
6750         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6751         bug #895752 and a better fix for bug #716790
6752
6753 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6754
6755         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6756
6757 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6758
6759         * doc/sdccman.lyx: minor changes, minor changed
6760
6761 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6762
6763         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6764         which can't handle SDCC_NEWONEBYTEOPS,
6765         (geniCodeMultiply): removed conversion from mult to shift for pic14
6766         and pic16
6767
6768 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6769
6770         * src/hc08/gen.h,
6771         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6772         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6773         thus fixing bug #895406
6774
6775 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6776
6777         * device/lib/_modsint.c,
6778         * device/lib/_modslong.c: sign follows divisor only
6779         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6780         signs or signedness can be ignored
6781         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6782         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6783         added optimization for IFX,
6784         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6785         arguments;
6786         reenabled optimization for IFX, which was removed on 2004-01-11
6787         * src/SDCCast.h: added return type IFX
6788         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6789         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6790         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6791         SDCC_OLDONEBYTEOPS selects the old behaviour
6792         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6793         changed again and commented promotion rule
6794         * src/SDCCval.c (valDiv): promotion no longer necessary
6795         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6796         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6797         rewritten
6798         * support/regression/tests/onebyte.c: added
6799
6800 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6801
6802         * gen.c (genInline): reverted to old code for assemnling inline
6803         code because of bug reported James Chadd
6804
6805 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6806
6807         * ralloc.h: missing declarations from previous patch,
6808         seems that patch for ralloc.h was never applied, fixed
6809
6810 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6811            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6812
6813         * pcode.c,
6814         * pcode.h,
6815         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6816         indirect addressing. Marked FSR0 as deprecated
6817         * gen.c (pointerCode): commented out, not needed now
6818         (pic16_popGet2p): new MOVFF helper function
6819         (genGenPointerGet),
6820         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6821         (shiftRLong): removed duplicate debugging info
6822
6823 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6824
6825         * src/ds390/gen.c (genNearPointerGet),
6826         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6827         optimization with bits, but not bitfields.
6828         * src/ds390/ralloc.c (packRegisters),
6829         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6830
6831 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6832
6833         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6834
6835 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6836
6837         * src/SDCCsymt.h,
6838         * src/SDCCicode.c (operandFromSymbol),
6839         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6840         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6841         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6842         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6843         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6844         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6845         bug #892038
6846         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6847         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6848         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6849         * src/SDCCsymt.c (newSymbol),
6850         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6851         enumerator_list),
6852         * src/SDCCval.h,
6853         * src/SDCCval.c (newiList): fixed bug #885705
6854
6855 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6856
6857         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6858         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6859
6860 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6861
6862         * device/include/c8051f120.h,
6863         * device/include/c8051f300.h,
6864         * device/include/c8051f310.h: added/updated header files for Silicon
6865         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6866         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6867         in new section Submitting patches
6868
6869 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6870
6871         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6872         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6873         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6874         genGenPointerSet),
6875         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6876         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6877         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6878         genGenPointerSet),
6879         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6880         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6881         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6882         genGenPointerSet),
6883         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6884         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6885         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6886         genGenPointerSet): fixed bug #892400
6887         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6888         to eliminate build warnings.
6889         * src/SDCCast.c (processParms),
6890         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6891         fixed bug 751859
6892         * support/valdiag/valdiag.py: added GCC to the list of defines active
6893         when compiling with gcc
6894
6895 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6896
6897         * support/Util/SDCCerr.h,
6898         * support/Util/SDCCerr.c,
6899         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6900         with an incomplete type (fixed bug #883734)
6901         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6902
6903 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6904
6905         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6906
6907 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6908
6909         * src/SDCCast.c (decorateType),
6910         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6911         function pointer implementation
6912         * support/regression/tests/funptrs.c: added tests to verify both forms
6913         of function pointers work correctly. Added tests to verify parameters
6914         are passed in the correct order.
6915
6916 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6917
6918         * device.c (regCompare): registers are sorted by ascending
6919         address and increasing size,
6920         * main.c (_pic16_finaliseOptions): removed the declaration
6921         of compiler macro MCU. Now a macro of the format pic18fxxxx
6922         will be defined from the command line
6923
6924 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6925             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6926
6927         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6928         PCOP_RLCF was overwritten!
6929         * gen.c (genSkip): commented out calls to pic16_emitcode,
6930         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6931         * (genlshTwo),
6932         * (genRRC): added debugging info,
6933         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6934         overwritten while shifting,
6935         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6936         overwritten while shifting,
6937         * (AccLsh),
6938         * (AccRsh),
6939         * (shiftLLeftOrResult),
6940         * (shiftRLeftOrResult),
6941         * (shiftRLong),
6942         * (shiftLLong): Implemented with pic16_emitpcode
6943         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6944         * (genLeftShift): Fixed bug, operand for shift by variable always
6945         was "and"ed with 0x0f,
6946         * (genLeftShiftLiteral),
6947         * (genrshTwo),
6948         * (genRightShiftLiteral): added debugging info,
6949         * (genrshFour): added comment,
6950         * (genRightShift): determined signedness from operand "left"
6951         instead of "result"
6952
6953 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6954
6955         * src/SDCCicode.c (geniCodeParms),
6956         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6957         function pointers, fixed function pointer bugs #861242 and #861896
6958
6959 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6960
6961         * device/include/c8051f000.h,
6962         * device/include/c8051f120.h,
6963         * device/include/c8051f300.h: added header files for Silicon
6964         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6965
6966 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6967
6968         * src/SDCCast.c (processParams): added new type flow and restructured
6969         (gatherAutoInit): added new type flow
6970         (addCast): cosmetic changes
6971         (getLeftResultType): added new type flow for array indices, patch
6972         provided by Stas, see FR #877103
6973         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6974         array index patch by Stas
6975         * src/SDCCast.h: added prototype getResultTypeFromType()
6976         * src/SDCCval.h,
6977         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6978         * src/pic/glue.c (pic14emitStaticSeg),
6979         * src/pic16/glue.c (pic16emitStaticSeg),
6980         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6981         for initialization of symbols
6982         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6983         * support/Util/SDCCerr.h:
6984         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6985         * .version: bumped version number to 2.3.8
6986         * device/include/Makefile.in (install),
6987         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6988         avoid warnings
6989
6990 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6991
6992         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6993         Slade Rich fixed an optimization bug
6994         * src/pic/pcodepeep.c,
6995         * src/pic/pcoderegs.c
6996         * doc/Makefile (install): added test for directory
6997
6998 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6999
7000         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
7001         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
7002         * src/pic/ralloc.c (getRegPtr, getRegGpr),
7003         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
7004         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
7005         * as/mcs51/asexpr.c (term),
7006         * as/hc08/asexpr.c (term): fixed bug #887146
7007
7008 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7009
7010         * src/z80/gen.c (genMult): handle single byte result product
7011         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
7012         DUMMY_READ_VOLATILE (fixed bug #886367)
7013
7014 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7015
7016         * support/regression/tests/libmullong.c: fixed logic, on little endian
7017         hosts we ended without a mullong_wrapper()
7018
7019 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7020
7021         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
7022         virus/worm forged address usage.
7023
7024 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
7025
7026         Fixed promotion, it should be done on AST level:
7027         * src/SDCCast.c (addCast): added promotion to int
7028         (decorateType): updated call to upCast()
7029         * src/SDCCicode.c (geniCodeLeftShift): removed call to
7030         usualUnaryConversions()
7031
7032 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
7033
7034         * support/regression/tests/literalop.c (mulWrapper): Added a
7035         wrapper to remove integer overflow warnings.
7036
7037         * support/regression/tests/float_trans.c: Made work on host.
7038
7039         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
7040         location of sz80.
7041
7042         * support/regression/generate-cases.py (main): Changed from inline
7043         to a main method.
7044
7045         * doc/Makefile (install): Changed to depth first to get rid of
7046         missing directory install warning.
7047
7048         * as/Makefile (install-doc): Made work on Mac.
7049
7050 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
7051
7052         * src/SDCCast.c: added an additional type flow in decorateType() of
7053         opposite direction, see feature request #860006; it's enabled at runtime
7054         by setting the environment variable SDCC_NEWTYPEFLOW
7055         * src/SDCCast.h: changed prototype of decorateType()
7056         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
7057         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
7058         'char' to 'int' can be omitted, if both operands are 'unsigned char';
7059         see feature request #877103
7060         * src/SDCCval.c: updated call of decorateType()
7061         (valBitwise): fixed bug #882876
7062         (valMinus): added promotion
7063         (valLogicAndOr): result is unsigned
7064         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
7065         * src/SDCCsymt.c (computeType),
7066         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
7067         must not cause an unsigned operation
7068         * src/pic/glue (pic14emitRegularMap),
7069         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
7070
7071 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
7072
7073         * src/pic/pcode.c (PCodeID): commented out left over debug code
7074
7075 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
7076
7077         * support/valdiag/tests/overflow.c: added shift tests
7078         * src/pic/device.c,
7079         * src/pic/gen.c,
7080         * src/pic/gen.h,
7081         * src/pic/glue.c,
7082         * src/pic/main.c,
7083         * src/pic/pcode.c,
7084         * src/pic/pcode.h,
7085         * src/pic/pcodepeep.c,
7086         * src/pic/pcoderegs.c,
7087         * src/pic/ralloc.c,
7088         * src/pic/ralloc.h: applied patch from Slade Rich;
7089         added support for multiple code pages and multiple RAM banks on the
7090         PIC 14 port. The ASM files now no longer simply assume all the
7091         code / RAM are in the same page / bank. This means the linker can
7092         safely allocate code/RAM of separate ASM files to different pages/banks.
7093         * doc/sdccman.lyx: added Slade's tips
7094         * src/mcs51/peeph.def: fixed bug #880768
7095
7096 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7097
7098         * src/hc08/ralloc.c (rematStr): fixed bug #879282
7099         * src/SDCCast.c (decorateType): fixed bug #880197
7100
7101 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
7102
7103         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
7104         getopt.h.
7105
7106         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
7107         strtof is not part of C89 and isn't included with Mac OS X.
7108
7109 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7110
7111         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
7112         shiftL2Left2Result): fixed bug #879326
7113         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
7114         (genMultOneByte): fixed bug in signed vs unsigned multiplication
7115         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
7116         address fetch for clr instruction
7117         * device/lib/hc08/_mulint.c: created optimized assembly version
7118         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
7119
7120 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
7121
7122         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
7123         proposed in FR #877103
7124
7125 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
7126
7127         * src/SDCCval.c (cheapestVal): added missing checks
7128         * src/SDCCicode.c (usualBinaryConversions): fixed condition
7129         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
7130
7131 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
7132
7133         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
7134         equal operands
7135
7136 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
7137
7138         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
7139         loaded with the linker search paths (-L arguments) and the libraries
7140         to be linked with the current source (-l arguments). Changes
7141         currently will affect only the pic16 port.
7142         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
7143         include path the port specific paths and port specific libraries,
7144         * gplink command now contains the $3 argument,
7145         * src/pic16/device.h,
7146         * src/pic16/device.c,: structure PIC_device is made public and
7147         renamed to PIC16_device, the same for variable Pics which is renamed
7148         to Pics16. Updated all references to them.
7149         * src/pic16/glue.c (pic16glue): corrected bug with code
7150         initialization which bypassed the variable initializations block.
7151
7152         * device/lib/pic16/Makefile.rules: removed --penable-stack from
7153         COMPILE_FLAGS and added the --nostdinc option
7154
7155 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7156
7157         * device/include/mc68hc908jb8.h: Register defs for another member
7158         of the hc08 family. Contributed by Bjorn Bringert - thanks!
7159
7160 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
7161
7162         Documenting changes from previous commits.
7163         * configure.in (version 1.56),
7164         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
7165         when generating output files to configure the pic16 library,
7166         but now I've commented it out, since gputils aren't installed in the
7167         SF compile farm, so library won't compile
7168
7169         * device/lib/Makefile.in (version 1.56): initially I've added in
7170         target 'all' the prerequestive 'model-pic16' so it compiled the
7171         pic16 library, but now I've commented it out for the same reasons
7172         above,
7173         * added targets 'model-pic16' and 'objects-pic16' to compile the
7174         library
7175         * added target 'port-specific-objects-pic16' to handle the
7176         generated libraries and copy them into the build/ directory
7177         * added target 'clean-intermediate-pic16' to clean intermediate
7178         files into pic16 directory
7179         * in target 'installdirs' added line to create directory pic16 in
7180         the installation path
7181
7182         * device/include/Makefile.in (version 1.11): in target 'install'
7183         added lines to copy all header files to installation path,
7184         * in target 'installdirs' added line create directory for pic16
7185         headers in the installation path
7186
7187 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
7188
7189         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
7190          a function call
7191
7192 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
7193
7194         * configure,
7195         * device/lib/configure.in,
7196         * device/lib/configure: fixed for autoconf 2.57
7197
7198 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7199
7200         * src/z80/main.c (_parseOptions): fixed the portmode= command line
7201         option so that it actually works. Made it specific to the z80, since
7202         the gbz80 doesn't have these kinds of I/O ports.
7203
7204 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7205
7206         * device/include/z180.h,
7207         * device/lib/_memcpy.c,
7208         * device/lib/_memmove.c,
7209         * device/lib/_mulint.c,
7210         * device/lib/ser_ir.c,
7211         * device/lib/ser_ir_cts_rts.c,
7212         * device/lib/_strcmp.c,
7213         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
7214         * src/z80/main.c (_process_pragma): add support for pragmas bank and
7215         portmode; added deprecation warning for bank= and protmode= forms.
7216         Also, guard against buffer overflow.
7217         * src/z80/gen.c (aopGet): generate better code for sfr banked read
7218
7219 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7220
7221         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
7222         changed interrupt vector table generation to only emit declared vectors.
7223         * device/include/Makefile.in: added missing backslash
7224         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
7225
7226 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7227
7228         Mainly changes to support compilation of the device libraries
7229         * src/pic16/device.c: stack is allocated via symbol and not
7230         via literal number. The symbol is placed in the corresponding
7231         position of the data ram
7232         * (pic16_dump_section): relocatable and absolute uninitialized
7233         data are now emitted in sorted order to reduce section naming,
7234         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
7235         weren't marked as being in the access bank,
7236
7237 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
7238
7239         Added portion of GNU PIC Library under the directory
7240         device/include/pic16 and device/lib/pic16. These files
7241         contain the declarations of SFRs for the PIC18Fxx2 devices.
7242         The directory is initialized via configure from toplevel.
7243
7244 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
7245
7246         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
7247         the spilllocations to be compared correctly
7248
7249 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7250
7251         * src/SDCCast.c (decorateType): fixed bug introduced today
7252
7253 2004-01-12  Borut Razem <borut.razem AT siol.net>
7254
7255         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
7256         doc/sdccman.lyx: upper case pragmas are deprecated
7257
7258 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
7259
7260         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
7261         in simpler and even better code
7262
7263 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
7264
7265         * src/SDCCicode.c (operandOperation): fixed bug #874819
7266         * src/SDCCast.c (decorateType): fixed
7267         char foo (unsigned long ul) { return ul > 0; }
7268
7269 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7270
7271         * doc/sdccman.lyx: Moved and added some sections, small changes
7272         all over. Telling LaTeX to be less strict with word spacing
7273         to better keep the right margin. Changed some notes about
7274         maintainance of the ports in section 3.2.1 - is it OK like this?
7275
7276 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
7277
7278         SDCC source changes:
7279         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
7280         convilong): modified to inform the pic16 port that builtin functions
7281         are external
7282
7283         PIC16 PORT specific changes:
7284         * src/pic16/device.c pic16_dump_equates() added,
7285         processor registers declared internally by the port are emitted in
7286         the translation as equates,
7287         * src/pic16/gen.c: inline code is passed unprocessed to the
7288         translation,
7289         * (pic16_popGetLit2): fnuction modified to take second operand as
7290         pCodeOp pointer and not as literal,
7291         * (popRegFromIdx): prefixed with pic16_,
7292         * (pic16_popCombine2): modified to receive already allocated pCode
7293         operands,
7294         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
7295         * (genFunction): initializes local stack frame and pushes on stack
7296         all the registers used by this function,
7297         * (genEndFunction): restores all registers from stack and restores
7298         stack frame,
7299         * src/pic16/glue.c (pic16emitRegularMap): various changes and
7300         improvements,
7301         * (pic16glue): changed the program startup sequence,
7302         * added new dbName code 'A' for functions placed in absolute section
7303         * src/pic16/main.c: added function attribute _naked,
7304         * added pragma 'code' to place a fnuction at an absolute address,
7305         * added command line arguments --debug-ralloc and --pcode-verbose,
7306         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
7307         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
7308         * (pic16_newpCodeOpLit2): modified to take the second operand as
7309         pCodeOp pointer,
7310         * (pic16_printpBlock): modified to emit each function in a separate
7311         section,
7312         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
7313         UPPER for immediate operands,
7314         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
7315         instruction,
7316         * src/pic16/peeph.def: all peepholes with movff are commented out,
7317         because there is a problem in the pcode peep optimizer,
7318         * src/pic16/ralloc.c: the register allocator can now reuse local
7319         function symbols for another function. This saves register usage.
7320         * src/pic16/ralloc.h: added flag isLocal in structure regs,
7321
7322         Added file src/pic16/NOTES with information about program writing on
7323         the current port version.
7324
7325 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7326
7327         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
7328         and peephole 252 (array access)
7329
7330 2004-01-09  Borut Razem <borut.razem AT siol.net>
7331
7332         * src/SDCCmain.c : fixed #872250: -l command line defined library
7333           files are scanned before standard library files
7334
7335 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7336
7337         * src/SDCCast.c (decorateType): fixed bug #874046
7338
7339 2004-01-09  Borut Razem <borut.razem AT siol.net>
7340
7341         * support/scripts/sdcc.nsi: remove previous installation
7342
7343 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7344
7345         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
7346         bytes for last interrupt vector (mcs51)
7347         * sdcc.spec: fixed typo
7348
7349 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7350
7351         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
7352         gen51Code): more efficient parameter receive for --model-large
7353         ("bug" #845294)
7354
7355 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7356
7357         * src/ds390/main.c,
7358         * src/z80/main.c: added missed needLinkerScript flags (more than
7359         one port structure defined in these file)
7360         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
7361         bug #795325
7362
7363 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
7364
7365         * src/SDCCmain.c: removed various references to DEFAULT_PORT
7366         * src/port.h: added flag needLinkerScript in port->linker
7367         structure to inform whether to create a .lnk file or not,
7368         * src/avr/main.c,
7369         * src/ds390/main.c,
7370         * src/hc08/main.c,
7371         * src/mcs51/main.c,
7372         * src/pic/main.c,
7373         * src/pic16/main.c,
7374         * src/xa51/main.c,
7375         * src/z80/main.c: changed appropriately to configure
7376         needLinkerScript flag
7377         * src/pic/gen.c,
7378         * src/pic16/gen.c (genAddrOf): fixed bug #863624
7379         * src/pic/glue.c: added variable udata_section_name to
7380         override default uninitialized data segment definition for
7381         devices only with SHAREBANK memory (reported from Erik Epetrich)
7382         * (pic14emitOverlay): modified to emit a commented overlay segment
7383         directive when no overlay data exist
7384         * (picglue): modified to emit uninitialized data segment
7385         according to udata_section_name
7386         * src/pic/main.c (_pic14_parseOptions): added command line
7387         options --udata-section-name=[name] to override default
7388         udata definition name
7389         * modified _linkCmd and _asmCmd to include compiler passed
7390         arguments via -W option
7391         * src/pic16/main.c: added $l in _asmCmd, changed extension for
7392         object file from '.rel' to '.o' in port->linker structure,
7393         changed size of fptr from 2 to 3 in port structure
7394
7395 2004-01-07  Borut Razem <borut.razem AT siol.net>
7396
7397         * support/scripts/sdcc.nsi: update PATH
7398         * support/scripts/sdcc.ico: craeted
7399
7400 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
7401
7402         * device/include/Makefile.in: fix install
7403         * doc/Makefile: fix install
7404
7405 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7406
7407         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
7408         in bug #860505
7409         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
7410         how the function variable allocation summary is displayed; also
7411         include information about variables allocated to the overlay
7412         segment
7413
7414 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7415
7416         * as/mcs51/lkmain.c: Help about -Y option
7417         * as/mcs51/lkarea.c: Fixed gcc warnings
7418
7419 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7420
7421         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
7422         fixed warning
7423         * support/valdiag/tests/overflow.c: added
7424         * src/SDCCast.c (decorateType),
7425         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
7426         LEFT_OP (left shift)
7427
7428 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7429
7430         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
7431         (default behaviour).
7432
7433 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7434
7435         A python script to validate compiler diagnostic messages. It can be
7436         used to verify that sdcc complains about bad c source code and
7437         gives a good location of the error.
7438         * support/valdiag/Makefile,
7439         * support/valdiag/valdiag.py,
7440         * support/valdiag/tests/*
7441
7442 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7443
7444         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
7445         * src/SDCCsymt.c (newEnumType),
7446         * src/SDCCsymt.h
7447         * support/Util/SDCCerr.c,
7448         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7449         enum related bugs.
7450         * support/regression/tests/enum.c: added test for enum values that
7451         require at least 2 bytes of storage.
7452
7453 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7454
7455         * src/common.h: added ifndef/define/endif macros
7456         around the header file.
7457         Bug reported from Jesus Calvino-Fraga
7458
7459 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7460
7461         * sdcc.spec: updated
7462         * device/include/Makefile.in: don't install CVS directories
7463         * device/lib/Makefile.in: added removal of CVS directories after install
7464         * doc/Makefile: fixed install, added local_icons
7465         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7466         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7467         * src/ds390/gen.c (genRightShift): fixed bug #870788
7468         * src/SDCCast.c (decorateType): fixed bug #870781
7469
7470 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7471
7472         PIC16 port related changes:
7473         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7474         added variable stackPos,
7475
7476         * gen.c: genCall, assignResultValue: added support for
7477         pushing/retrieving function parameters to/from stack,
7478         genFunction,genEndFunction: setup stack frame for the
7479         generated function,
7480         genAddrOf: will be changed according to bug 863624
7481
7482         * added files genutils.c and genutils.h which contain gen*
7483         debugged and optimised functions extracted from gen.c
7484
7485         * glue.c: added variable 'externs' which holds extern symbols,
7486         pic16emitRegularMap: is modified to properly handle relocatable
7487          symbols under the new scheme,
7488         pic16createInterruptVect: is modified
7489         pic16printPublics: is modified to emit 'global' assembler directives,
7490         added pic16_printExterns to print extern symbols,
7491         pic16glue: initializes stack/frame pointer in the beginning of
7492         the assembly output. Temporary hack, will be corrected later,
7493         because gplink yet does not support stack and SDCC does not
7494         yet support a type of crt0.o object to create the final binary.
7495
7496         * Removed many lines that contain 8051 legacy code.
7497         * The code is finally placed under a 'code' directive.
7498         * Added port specific options.
7499
7500         * _process_pragma: simplified since now we do not need *special*
7501         include file to define SFR registers. But a separate header
7502         will be needed. This will be developed later.
7503         * _pic16_parseOptions: added, parses port specific options:
7504         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7505         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7506         --preplace-udata-with=
7507
7508         * _pic16_setDefaultOptions: modified to initialize section names,
7509         but hack is temporarly out of order since it needs improvement.
7510         * _pic16_genAssemblerPreamble: configuration words are emitted by
7511         their address instead of their name. This part is incomplete and
7512         supports only the 18Fxx2 devices. Other devices will emit an error
7513         during assembly since they do not contain the same set of config
7514         registers
7515         * _pic16_genIVT: is modified,
7516
7517         * pcode.c: added definitions for some hardware registers that are needed
7518         for stack support
7519         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7520         All PCI entries are updated. Now LFSR is supported.
7521         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7522         * added pic16_newpCodeOpLit2 to support instructions with
7523         two literal arguments
7524         * pic16_pCode2str: corrected code that emits assembler instructions
7525         with two literal operands and those that have an access bit modifier
7526         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7527         this fixes a bug which caused some labels to be lost, when an
7528         assembler directive was added, i.e. banksel,
7529         * pic16_FixRegisterBanking: improved logic that causes the insertion
7530         of bank switching,
7531         * InlineFunction: functions that are called once, are not any more
7532         inlined. This can be a port option in the future,
7533
7534         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7535
7536         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7537         hold the corresponding uninitialized symbols,
7538         * pic16_allocProcessorRegister: registers have explicit marked the
7539         accessBank field,
7540         * pic16_allocInternalRegister: registers are explicit marked as
7541         not used,
7542         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7543         processing list, so bit registers were lost,
7544         *
7545
7546         * ralloc.h: added field 'accessBank' and original symbol operand
7547         in register definition,
7548         * removed the field isMapped from register definition,
7549
7550         ** Several functions have been removed from various sources:
7551         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7552         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7553         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7554         pic16_assignRelocatableRegisters
7555
7556         ** others have been introduced:
7557         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7558         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7559
7560 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7561
7562         * support/scripts/inc2h.pl: changed definition of BIT_AT
7563         to emit 'sbit at' instead of 'bit at'. This was a request.
7564
7565         PIC16 port related preliminary changes:
7566         * gen.c: prefixed function popRegFromString with
7567         pic16_ and all references to it corrected
7568         * pcode.c: all pic16_pc_* hardware registers prefixed
7569         with underscore (_),
7570         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7571         * ralloc.c: newReg(): when register is REG_SFR then
7572         set address to rIdx,
7573         pic16_allocProcessorRegister(): marks register wasUsed=0
7574         pic16_writeUsedRegs(): added a call to assign processor
7575         registers via pic16_assignFixedRegisters
7576
7577 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7578
7579         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7580         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7581         variables in unused register banks.  Also the SSEG is placed
7582         wherever there is enough space for it, and IDATA can be anywhere
7583         in internal RAM.  For now compile using -Wl-Y[stack_size].
7584         The mem file is different for this option as well, since it
7585         makes no sense of talking about DSEG lenght.
7586
7587 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7588
7589         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7590         in certain cases, e.g. when ROM assignment, patch provided
7591         from Albert den Haan.
7592
7593 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7594
7595         Many signedness and type propagation fixes:
7596         * src/SDCCicode.c: made geniCodeCast() static
7597         replaced SPEC_ by IS_ (cosmetic)
7598         (operandOperation): fixed div and mod operation
7599         (usualBinaryConversions): added support for promotion of char
7600         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7601         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7602         (geniCodeAdd): an array index will stay unsigned, even if promoted
7603         from char to int
7604         (geniCodeArray): ditto
7605         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7606         * src/SDCCsymt.c (computeType): added more support for char;
7607         promotion of char is selectable by promoteCharToInt, fixed signedness
7608         for all cases
7609         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7610         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7611         * src/SDCCval (val*): replaced signedness calculation by
7612         computeType()
7613         rearranged if-branches (cosmetic)
7614         (valShift): added warning W_SHIFT_CHANGED
7615         (valCompare): fixed problem with different types
7616         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7617         * support/regression/tests/literalop.c: added many cases
7618         * support/regression/tests/ast_constant_folding.c: changed finally to
7619         'unsigned int'
7620         * .version: new year, new version: 2.3.7
7621         * src/SDCCmain.c (main): applied patch #866468
7622         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7623         provided by Scott Bronson
7624         * doc/sdccman.lyx: updated documentation for sdcdb
7625         updated and added chapter tips
7626
7627 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7628
7629         * src/SDCCsymt.h: missing from yesterday's commits
7630
7631 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7632
7633         * src/SDCC.y (struct_or_union_specifier),
7634         * support/Util/SDCCerr.c,
7635         * support/Util/SDCCerr.h: verify that struct & union tags are used
7636         as declared.
7637
7638 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7639
7640         * src/SDCCglobl.h: missing from yesterday's commits
7641
7642 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7643
7644         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7645         sft_attributes, struct_declaration, parameter_declaration,
7646         type_name, start_block, declaration_list),
7647         * src/SDCC.lex (check_type): support redefinition of typedef names
7648
7649 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7650
7651         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7652         aligned xdata arrays. Erik helped me with the if clause.
7653
7654 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7655
7656         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7657         warning
7658
7659 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7660
7661         * src/SDCCast.h,
7662         * src/SDCCast.c (newAst_),
7663         * src/SDCCicode.h,
7664         * src/SDCCicode.c (ast2iCode, newiCode),
7665         * src/SDCCglobl.h,
7666         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7667         expr, statement, expression_statement, selection_statement,
7668         iteration_statement, expr_opt, jump_statement): foundation for tracking
7669         sequence points
7670         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7671         point code too)
7672
7673 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7674
7675         * support/Util/SDCCerr.c,
7676         * src/SDCCast.h,
7677         * src/SDCCast.c (createCase, createDefault, decorateType),
7678         * src/SDCClabel.c (labelUnreach),
7679         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7680         to error messages.
7681         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7682         (with thanks to Stas Sergeev)
7683         * device/include/time.h,
7684         * device/lib/time.c (CheckTime): suppress unreachable code warning
7685
7686 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7687
7688         * src/SDCCast.c (createIvalCharPtr),
7689         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7690         bug #753752)
7691         * support/regression/tests/nullstring.c: tests for these two bugs
7692
7693 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7694
7695         * support/Util/SDCCerr.h,
7696         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7697         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7698         about storage class and 'at' used inside struct or union
7699         * src/SDCCBBlock.c (iCodeFromeBBlock),
7700         * src/SDCCcse.c (ifxOptimize),
7701         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7702         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7703         printIval, emitStaticSeg, emitOverlay),
7704         * src/SDCClabel.c (deleteIfx),
7705         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7706         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7707         gatherAutoInit, processParms),
7708         * support/Util/SDCCerr.h,
7709         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7710         reporting for post-parse errors.
7711
7712 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7713
7714         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7715         implicit casts via union; they don't work on big endian systems
7716         (possible fix for bug #861138)
7717
7718 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7719
7720         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7721         * src/mcs51/main.c: fixed the fix for bug #737001
7722
7723 2003-12-15  Borut Razem <borut.razem AT siol.net>
7724
7725         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7726
7727 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7728
7729         * support/makebin/makebin.c: put output in binary mode
7730
7731 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7732
7733         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7734         xdata and data memory on startup. Set the environment variable
7735         SDCC_NOGENRAMCLEAR to disable this.
7736         * src/mcs51/peephole.def,
7737         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7738         (allows non-interrupt and interrupt code to safely compete for a resource
7739         without the non-interrupt code having to disable interrupts)
7740
7741 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7742
7743         * src/SDCCicode.c (geniCodeAdd),
7744         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7745         with valFromType if type might be a pointer and host is big endian).
7746         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7747         types, not just integer types.
7748         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7749         multiply defined with mismatching "at" address.
7750
7751 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7752
7753         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7754         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7755         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7756         with embedded nulls (fixed bug #753752)
7757
7758 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7759
7760         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7761         Apparently this did not see much testing (endless loop)
7762
7763 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7764
7765         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7766
7767 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7768
7769         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7770         gracefully handle NULL memmap pointers
7771
7772 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7773
7774         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7775         instead of deleting the iCode when an operand is volatile
7776         * src/z80/gen.c (genDummyRead),
7777         * src/mcs51/gen.c (genDummyRead),
7778         * src/ds390/gen.c (genDummyRead),
7779         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7780         not just IC_RIGHT
7781         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7782         * src/SDCC.y: fixed bug #850420
7783
7784 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7785
7786         Applied z80 i/o port patch from Peter Townson and fixed some operators
7787         to better handle operands in A register.
7788         * device/include/z180.h
7789         * src/SDCC.y
7790         * src/SDCCglue.c
7791         * src/z80/gen.c
7792         * src/z80/gen.h
7793         * src/z80/main.c
7794         * src/z80/peeph-z80.def
7795         * src/z80/peeph.def
7796         * src/z80/z80.h
7797
7798 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7799
7800         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7801
7802 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7803
7804         * device/lib/hc08/_mullong.c: Removed extra #endif
7805
7806 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7807
7808         * sim/ucsim/hc08.src/inst.cc,
7809         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7810         carries from x to h
7811         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7812         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7813         * device/include/stdarg.h: fixed varargs for hc08
7814         * device/lib/Makefile.in,
7815         * device/lib/hc08/Makefile,
7816         * device/lib/hc08/_mulint.c,
7817         * device/lib/hc08/_mullong.c: fixed some endian problems
7818
7819 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7820
7821         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7822         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7823         * device/lib/_gptrget.c,
7824         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7825
7826 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7827
7828         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7829         * src/SDCCast.c (astErrors): fixed bug #846007
7830         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7831
7832 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7833
7834         * src/SDCCast.c (decorateType): disabled a transformation I added in
7835         revision 1.188 (access to fields of a structure at an absolute address);
7836         it breaks with bitfields, extern declarations, and gcse analysis.
7837         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7838         could be assigned through a pointer, so don't complain.
7839         * src/SDCCast.c (astErrors),
7840         * src/SDCCast.h,
7841         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7842
7843 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7844
7845         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7846         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7847         output of __config directives, since gpasm now supports them
7848         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7849         pre-processor macro, i.e. -DMCU=p18f452
7850         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7851         and modified to handle 'cast' icode similarly to '=' icode
7852         * src/pic16/device.h (typedef struct PIC_device): added field
7853         'extMIface' to indicate that chip has external memory interface
7854         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7855         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7856         18F8720
7857
7858 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7859
7860         * src/SDCC.y (pointer): fixed bug #846006
7861         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7862         * src/SDCCast.c (decorateType): fixed bug #846009
7863         * src/ds390/peeph.def,
7864         * src/ds390/gen.c (genAnd, genOr),
7865         * src/mcs51/peeph.def,
7866         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7867
7868 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7869
7870         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7871         * src/SDCCdflow.c
7872         * src/SDCCcse.c
7873         * src/SDCCcse.h
7874         * src/SDCCBBlock.h
7875         * src/SDCCBBlock.c
7876
7877 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7878
7879         fixed bug #845089
7880         * src/SDCCbitv.h,
7881         * src/SDCCbitv.c: added function to free a bitvector
7882         * src/SDCClrange.h,
7883         * src/SDCClrange.c: added function to recompute the liveranges
7884         * src/avr/ralloc.c,
7885         * src/ds390/ralloc.c,
7886         * src/hc08/ralloc.c,
7887         * src/mcs51/ralloc.c,
7888         * src/pic/ralloc.c,
7889         * src/pic16/ralloc.c,
7890         * src/xa51/ralloc.c,
7891         * src/z80/ralloc.c: recompute the liveranges after register packing
7892
7893 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7894
7895         * src/SDCCloop.c (newInduction): fixed bug #845630
7896
7897 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7898
7899         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7900         inadvertantly left behind from my 2003-11-12 change
7901
7902 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7903
7904         Updated headers I neglected to commit yesterday.
7905         * src/SDCClrange.h,
7906         * src/SDCCicode.h
7907
7908 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7909
7910         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7911         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7912         * src/SDCCopt.c (eBBlockFromiCode),
7913         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7914         the creation of the key hash table from the sequencing so it can be used
7915         earlier (for some GCSE bug fixes still pending)
7916
7917 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7918
7919         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7920         * support/regression/tests/addsub.c: testing genPlus shortcut
7921
7922 2003-11-15  Borut Razem <borut.razem AT siol.net>
7923
7924         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7925
7926 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7927
7928         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7929         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7930         ordering is immaterial.
7931         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7932
7933 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7934
7935         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7936         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7937         (SIGSEV) of bug #840381
7938         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7939         unlink new file before rename if new and old filenames are the same)
7940
7941 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7942
7943         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7944         uninitialized variables) for the mcs51. Set environment variable
7945         SDCC_GENRAMCLEAR to test.
7946         xdata initialization slightly shorter
7947
7948 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7949
7950         * src/SDCCsymt.h,
7951         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7952         #838241 & 780691 (basicly the same bug)
7953         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7954         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7955
7956 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7957
7958         * src/SDCCmain.c (linkEdit): "fix" #834252
7959
7960 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7961
7962         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7963         * src/SDCCast.h,
7964         * src/SDCC.y: fixed bug #819403
7965
7966 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7967
7968         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7969         the reentrant attribute.
7970         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7971         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7972         simulation
7973         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7974         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7975         erroneously reduced to a literal.
7976         * src/hc08/ralloc.c (packRegisters, rematStr),
7977         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7978         some cases
7979
7980 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7981
7982         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7983         * doc/sdccman.lyx: changed from 'article' to 'book'
7984         * doc/Makefile: readded test_suite_spec and cdbfileformat
7985
7986 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7987
7988         * device/include/stdlib.h: include malloc.h to comply with ANSI
7989         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7990
7991 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7992
7993         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7994         * doc/clean.mk: also remove *.out files
7995         * doc/sdccman.lyx: some additions, larger top/bottom margins
7996
7997 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7998
7999         * src/SDCC.y: fixed bug #837365
8000         * support/regression/tests/bitopcse.c
8001         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
8002         a symbol (might be valop instead)
8003         * device/lib/Makefile.in: added errno.c to HC08SOURCES
8004         * device/lib/clean.mk: added hc08 to the cleaning list
8005
8006 2003-11-04  Borut Razem <borut.razem AT siol.net>
8007
8008         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
8009           made 2003-11-04
8010         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8011           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
8012           malloc is declared in standard stdlib.h
8013
8014 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8015
8016         * device/lib/hc08/Makefile: need to clean .rel not .o files
8017         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
8018
8019 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8020
8021         * src/port.h,
8022         * src/hc08/main.c,
8023         * src/mcs51/main.c,
8024         * src/ds390/main.c,
8025         * src/z80/main.c,
8026         * src/avr/main.c,
8027         * src/pic/main.c,
8028         * src/pic16/main.c,
8029         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
8030         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
8031         tests (which uses the port's oclsExpense function)
8032         * src/SDCC.y,
8033         * src/SDCCast.c,
8034         * src/SDCCicode.c,
8035         * src/hc08/gen.c,
8036         * src/ds390/gen.c,
8037         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
8038
8039 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8040
8041         * src/SDCCcse.c (ifxOptimize),
8042         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
8043         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
8044         deleting the IFX iCode.
8045         * src/hc08/ralloc.c: reduced unneeded slocs
8046         * src/hc08/gen.c: fixed bug in asmopToBoolean
8047
8048 2003-11-04  Borut Razem <borut.razem AT siol.net>
8049
8050         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
8051           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
8052           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
8053           transferred to configure
8054
8055 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
8056
8057         Use headers defined in the C[++] standards:
8058         * sim/ucsim/gui.src/serio.src/fileio.cc
8059         * sim/ucsim/gui.src/serio.src/frontend.cc
8060         * sim/ucsim/gui.src/serio.src/main.cc
8061         * sim/ucsim/gui.src/serio.src/posix_signal.cc
8062         * support/Util/NewAlloc.c
8063         * as/hc08/lklibr.c
8064         * as/mcs51/lklibr.c
8065         * as/z80/aslist.c
8066         * as/z80/assym.c
8067
8068 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8069
8070         * Added MSVC projects for hc08 assembler and linker:
8071         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
8072         /as/hc08/link_hc08.dsp
8073
8074 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
8075
8076         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
8077
8078 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
8079
8080         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
8081
8082 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8083
8084         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
8085
8086 2003-10-31  Borut Razem <borut.razem AT siol.net>
8087
8088         * support/cpp2/cpplib.h,
8089           support/cpp2/cpplib.c,
8090           support/cpp2/cpplex.c,
8091           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
8092           to switch _asm block preprocessing on / off. Default is
8093           #pragma preproc_asm +
8094
8095 2003-10-31  Borut Razem <borut.razem AT siol.net>
8096
8097         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
8098           when outputting comment blocks (when executed with -C option) and
8099           _asm (SDCPP specific) blocks
8100
8101 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8102
8103         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
8104
8105 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
8106
8107         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
8108
8109 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
8110
8111         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
8112         * src/SDCCast.c (decorateType): fixed bug #832664
8113
8114 2003-10-31  Borut Razem <borut.razem AT siol.net>
8115
8116         * support\cpp2\cpplex.c: fixed for SDCPP:
8117           comments(when executed with -C option) and _asm blocks
8118           were included even if they where in skipped #if block.
8119           Applied solution from GCC cpp 3.3.2
8120
8121 2003-10-31  Borut Razem <borut.razem AT siol.net>
8122
8123         * src/SDCC.lex: sdcc now understands both formats:
8124           '# <line_number> <file_name>' and
8125           '#line <line_number> <file_name>'
8126         * support/cpp2/cppmain.c: sdcpp now generates the standard
8127           '# <line_number> <file_name>' instead of former
8128           '#line <line_number> <file_name>'
8129
8130 2003-10-30  Borut Razem <borut.razem AT siol.net>
8131
8132         * support/cpp2/cpphash.h,
8133         * support/cpp2/cpplib.h
8134         * support/cpp2/cpplex.c,
8135         * support/cpp2/cppmain.c,
8136         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
8137
8138 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8139
8140         Fixed a number of problems revealed by bug #827883.
8141         * src/SDCCloop.c (loopInvariants): Spill location of the
8142         result operand should be recomputed if extracted from
8143         a loop. Also, don't extract assignments of an iTemp
8144         from a literal.
8145         * src/SDCCast.c (isConformingBody): loop reversal should
8146         not occur if the control variable is involved with a
8147         relational operator.
8148
8149 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
8150
8151         * .version: bumped to 2.3.6 to reflect the big improvements
8152         made by Erik and Klaus. Thanks!
8153
8154 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
8155
8156         Replaced the livrange code.
8157         * src/SDCClrange.c: added new LR code
8158         * src/SDCCloop.c,
8159         * src/SDCCBBlock.h: removed remainig parts from old LR code
8160         * src/ds390/ralloc.c,
8161         * src/ds390/gen.c: minor fixes to make it work with new code
8162
8163 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8164
8165         * as/hc08/asm.h,
8166         * as/hc08/lkrloc.c,
8167         * src/hc08/gen.c,
8168         * src/hc08/ralloc.c: Fix various warnings related to the hc08
8169         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
8170         (tweaked fix for bug #818696)
8171
8172 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8173
8174         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
8175
8176 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8177
8178         * src/SDCCmain.c,
8179         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
8180         * src/mcs51/gen.c (gencjneshort),
8181         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
8182         more efficient (per Scott Bronson's suggestion)
8183
8184 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8185
8186         Extended the semantics of the critical keyword to include
8187         individual statements. See RFE #827755 and #799831
8188         * src/SDCC.y
8189         * src/SDCCicode.c
8190         * src/SDCCopt.c
8191         * src/SDCCast.c
8192         * support/Util/SDCCerr.c
8193         * support/Util/SDCCerr.h
8194         * src/mcs51/gen.c
8195         * src/ds390/gen.c
8196         * src/hc08/gen.c
8197
8198 2003-10-19  Borut Razem <borut.razem AT siol.net>
8199
8200         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
8201
8202 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8203
8204         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
8205         Fixed bug #818696
8206         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
8207         and predecrement operand is displayed
8208
8209 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8210
8211         * src/SDCCval.c (valMinus): fixed bug #826041
8212
8213 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8214
8215         Some hc08 related updates that I missed earlier
8216         * sim/ucsim/stypes.h
8217         * support/regression/ports/hc08/spec.mk
8218
8219 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8220
8221         New target "hc08" for the Motorola 68hc08 family of micros
8222
8223         * configure
8224         * configure.in
8225         * Makefile
8226         * src/hc08/*
8227         * src/SDCCmain.c
8228         * src/port.h
8229         * sim/ucsim/hc08.src/*
8230         * sim/ucsim/configure.in
8231         * src/ucsim/configure
8232         * sim/ucsim/packages_in.mk
8233         * as/hc08/*
8234         * as/Makefile
8235         * device/include/mc68hc908qy.h
8236         * device/lib/hc08/*
8237         * device/lib/Makefile.in
8238         * support/regression/ports/hc08/*
8239         * support/regression/Makefile
8240
8241 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8242
8243         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
8244         regression test
8245         * src/ds390/gen.c (genCast): fixed bug #821957
8246
8247 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
8248
8249         * device/lib/logf.c: "fixed" overlay bug
8250         * support/regression/ports/host/spec.mk: added m library
8251         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
8252         * support/regression/tests/float_trans: added (for Eric)
8253
8254 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
8255
8256         * src/mcs51/gen.c (genCpl): fixed bug
8257         http://sf.net/mailarchive/message.php?msg_id=6263915
8258
8259 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
8260
8261         * src/SDCCast.c (decorateType): added extended constant folding
8262         * src/SDCCsymt.c (computeType): cleanup
8263         * src/SDCCval.c (valShift): minor optimization
8264         * support/regression/tests/ast_constant_folding.c: added
8265
8266 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8267
8268         * src/SDCCmain.c: removed some unintended changes
8269
8270 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8271
8272         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
8273         * src/z80/gen.c: fixed part of bug #817589
8274         * src/SDCCsymt.c (checkFunction): fixed bug #817895
8275
8276 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
8277
8278         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
8279         * src/SDCCcflow.c
8280         * src/SDCCcse.c
8281         * src/SDCCdflow.c
8282         * src/SDCClabel.c
8283         * src/SDCClrange.c
8284         * src/SDCCmem.c
8285         * src/SDCCopt.c
8286         * src/SDCCpeeph.c
8287         * src/SDCCset.c
8288         * src/avr/ralloc.c
8289         * src/ds390/ralloc.c
8290         * src/izt/ralloc.c
8291         * src/mcs51/ralloc.c
8292         * src/pic/ralloc.c
8293         * src/pic16/ralloc.c
8294         * src/xa51/ralloc.c
8295         * src/z80/ralloc.c
8296         * src/z80/gen.c: removed unused label "release:"
8297
8298 2003-10-06  Borut Razem <borut.razem AT siol.net>
8299
8300         * src/SDCC.lex: removed definition of unused variables
8301           save_optimize and save_options
8302
8303 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
8304
8305         * clean.mk: removed '=' in "-maxdepth=1"
8306         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
8307         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
8308
8309 2003-10-06  Borut Razem <borut.razem AT siol.net>
8310
8311         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
8312           my_unput() replaced by unput()
8313
8314 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
8315
8316         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
8317         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
8318         type-punned pointer will break strict-aliasing rules"
8319         Old LR behaviour is again default; Klaus' LR can be choosen by
8320         defining the environment variable LRKLAUS
8321         * src/SDCCBBlock.h
8322         * src/SDCCloop.c
8323         * src/SDCClrange.c
8324         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
8325         * clean.mk: fixed removal of files in bin/CVS/
8326         * device/lib/clean.mk: fixed removal of directories small and large
8327         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
8328         * src/SDCCicode.c,
8329         * src/SDCCval.c: removed superflous test for pedantic
8330
8331 2003-10-05  Borut Razem <borut.razem AT siol.net>
8332
8333         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
8334           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
8335           message "unmatched #pragma SAVE and #pragma RESTORE"
8336
8337 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8338
8339         * doc/sdccman.lyx: various additions and updates (interrupts, inline
8340           assembly, critical functions, atomic, nojtbound)
8341
8342 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
8343
8344         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
8345         * src/SDCCBBlock.h
8346         * src/SDCCloop.c
8347         * src/SDCCloop.h
8348         * src/SDCClrange.c
8349
8350 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8351
8352         * src/z80/gen.h,
8353         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8354         * src/mcs51/gen.h
8355         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8356         * src/ds390/gen.h
8357         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
8358         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
8359         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
8360
8361 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8362
8363         * src/z80/gen.c (genRet): fixed bug #524753
8364         * src/z80/gen.c (genCast): fixed internal error on cast from
8365         pointer to long
8366         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
8367         fix for bug #477835 to the z80
8368         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
8369         for tracking iCodes in the peephole optimizer for z80
8370
8371 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8372
8373         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
8374         the other part of bug #814548
8375         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
8376
8377 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
8378
8379         * src/SDCCcse.c: fixed part of bug #814548
8380
8381 2003-09-28  Borut Razem <borut.razem AT siol.net>
8382
8383         * src/asm.c: rewrite of printILine() to use temporary file instead
8384           a pipe
8385         * src/xa51/main.c: commented out declaration of int rewinds
8386
8387 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8388
8389         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
8390
8391 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8392
8393         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
8394         * src/asm.c (printILine): Fixed bug #811015
8395
8396 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8397
8398         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
8399         freeing.
8400
8401 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8402
8403         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
8404         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
8405         to correctly handle general case of AOP_PAIRPTR
8406         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
8407
8408 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8409
8410         * src/mcs51/ralloc.c (fillGaps),
8411         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
8412         register positioning bug)
8413
8414 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
8415
8416         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
8417
8418 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8419
8420         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
8421         genCodePointerGet, genGenPointerGet, genFarPointerSet,
8422         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
8423         (ralloc doesn't intentionally do this now, but perhaps later)
8424         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
8425         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
8426         register positioning bugs (Fixed bug #762602 and #795325)
8427         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
8428         (Fixed bug #808779)
8429         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
8430         lines that --i-code-in-asm generates
8431
8432 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8433
8434         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
8435         trying to fclose a FILE* that was already closed.
8436
8437 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8438
8439         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
8440         of const struct should be treated as if const themselves)
8441
8442 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
8443
8444         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
8445
8446 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8447
8448         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8449         Unix (/n) and DOS (/r/n) line terminations.
8450
8451 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8452
8453         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8454         bug #613775
8455
8456 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8457
8458         * src/mcs51/gen.c (genFunction, genEndFunction),
8459         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8460         and restore of EA so that stack offsets to parameters are
8461         correct when using both critical and reentrant/stack-auto.
8462         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8463         size (can be triggered in error if sloc is shared between
8464         different sized objects)
8465         * device/include/float.h: fixed macros to explicitly use
8466         unsigned long where needed
8467
8468 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8469
8470         Feature req. 799831: added code to allow nesting of critical functions
8471         * src/mcs51/gen.c (genFunction, genEndFunction)
8472         * src/ds390/gen.c (genFunction, genEndFunction)
8473
8474 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8475
8476         * src/SDCCsymt.c (sclsFromPtr),
8477         * src/SDCCsymt.h,
8478         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8479         support for standard C idiom of memory mapped variables; for
8480         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8481         to xdata int at 0x1234 tempvar = 1.
8482         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8483         provided by Akiya ISHIDA
8484
8485 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8486
8487         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8488         * src/SDCCval.c (constVal): added reduction from int to char
8489         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8490         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8491         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8492         to ignore the sign
8493         * support/regression/tests/shifts.c: fixed
8494
8495 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8496
8497         * src/z80/gen.c (genXor): Fixed bug #805445
8498
8499 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8500
8501         Fixed bug #621531 (const & volatile confusion in the type chain).
8502         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8503         refer to the const or volatile state of the pointer itself.
8504
8505         * src/SDCCast.c
8506         * src/SDCCglue.c
8507         * src/SDCCicode.c
8508         * src/SDCCsymt.c
8509         * src/SDCCval.c
8510         * src/SDCC.y
8511         * src/SDCCsymt.h
8512         * src/pic/gen.c
8513         * src/pic/ralloc.c
8514         * src/pic16/gen.c
8515         * src/pic16/ralloc.c
8516         * support/regression/tests/const.c
8517
8518 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8519
8520         When checking for duplicated modules, use absolute paths
8521         instead of relative paths.  Files changed:
8522
8523         * as/mcs51/lklib.c
8524         * link/z80/lklib.c
8525
8526 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8527
8528         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8529
8530 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8531
8532         * device/include/string.h: added size_t typedef, changed
8533         prototypes to use size_t, eliminated separate reentrant and
8534         non-reentrant declarations, added _memmove declaration
8535         * device/lib/_memcpy.c: changed to use size_t instead of int,
8536         changed /4 to >>2 to avoid division library call
8537         * device/lib/_memcmp.c,
8538         * device/lib/_memset.c,
8539         * device/lib/_strncat.c,
8540         * device/lib/_strncpy.c,
8541         * device/lib/_strncmp.c: changed to use size_t instead of int
8542         * device/lib/_memmove.c: new file (fixed bug #772294)
8543         * device/lib/Makefile.in: added _memmove.c
8544         * device/lib/z80/asm_strings.s: fixed bug #772290
8545         * support/regression/tests/bitfields.c: attempt to fix host assertion
8546         failure on amd64-unknown-linux2.2
8547
8548 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8549
8550         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8551         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8552         * as/z80/asmain.c (main): fixed bug #801766
8553
8554 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8555
8556         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8557         compilers
8558
8559 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8560
8561         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8562         reported in bug #800609
8563
8564 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8565
8566         * Top header beautifications in src/pic16 directory:
8567           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8568           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8569           pcoderegs.h, ralloc.c, ralloc.h
8570         * main.c: added top header and GPL license notice
8571         * pcode.c: fixed the if-conditional warning
8572
8573 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8574
8575         * device/lib/_mullong.c: replaced int by short for gcc
8576
8577 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8578
8579         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8580         and JUMPTABLE iCodes properly now (worked by accident before)
8581         * src/mcs51/gen.c (leftRightUseAcc),
8582         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8583         iCode properly now. Use getSize instead of nRegs since a & b
8584         aren't part of the nRegs tally.
8585
8586 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8587
8588         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8589         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8590           before instructions that use the _STATUS register
8591
8592 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8593
8594         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8595         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8596         fetching of the pointer
8597         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8598         copied from genNearPointerSet()
8599         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8600         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8601         If they pop r0/r1 they must be called in the opposite order than aopOp().
8602         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8603         (resp. --stack-auto), prepared for --xstack
8604
8605 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8606
8607         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8608
8609 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8610
8611         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8612         these ports have their own __sdcc_external_start()
8613
8614 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8615
8616         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8617         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8618         type for bits was changed. It resulted in bit variables becoming
8619         global, which is not permitted in PIC 14 assembly output.
8620
8621 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8622
8623         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8624
8625 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8626
8627         Z80 and MCS51 linkers complaint if a public symbol is defined
8628         in more than one library module:
8629
8630         * as/mcs51/lklib.c
8631         * link/z80/lklib.c
8632         * as/mcs51/Makefile.in
8633
8634 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8635
8636         A few small changes that speed up the peephole optimizer.
8637
8638         * src/SDCCpeeph.c
8639
8640 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8641
8642         Try to make the peephole optimizer smarter by maintaining
8643         an association between the assembly source code and the
8644         iCodes that originated them. Put this information to use
8645         with a new peephole rule condition "notVolatile" so that
8646         the rules can be aggressive yet still safe.
8647
8648         * src/SDCCpeeph.c
8649         * src/SDCCpeeph.h
8650         * src/mcs51/gen.c
8651         * src/mcs51/peeph.def
8652
8653 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8654
8655         Fixed bug #741761
8656
8657         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8658         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8659         if the left or right operand symbols have the accuse flag set.
8660
8661 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8662
8663         Changed the type of the result of the ! (NOT) operator to char;
8664         previously it returned the same type as the source. This allows
8665         us to eliminate all the genFloatNot functions (all of its target
8666         implementations were very buggy) since !float can use the same
8667         code as !long now.
8668
8669         * src/SDCCicode.c (ast2iCode): ! returns char
8670         * src/mcs51/gen.c (genNot, genNotFloat),
8671         * src/ds390/gen.c (genNot, genNotFloat),
8672         * src/z80/gen.c (genNot, genNotFloat),
8673         * src/pic/gen.c (genNot, genNotFloat),
8674         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8675
8676 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8677
8678         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8679         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8680            during interrupts. Ensure WSAVE is located at a shared bank address.
8681         2. Fixed page selection in some places
8682         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8683            the registers name strings.
8684         4. Fixed "signed / unsigned compare" compiler warnings.
8685         5. The PIC port manages its own allocation of the general purpose
8686            registers, but makes no attempt to reuse them. As a result when
8687            compiling it soon runs out of general purpose registers. Some
8688            additional code was added to the files pcode.c and device.c to walk
8689            through the function call tree and rename the registers so that they
8690            get reused.
8691
8692         * src/pic/device.c
8693         * src/pic/gen.c
8694         * src/pic/glue.c
8695         * src/pic/pcode.c
8696         * src/pic/pcode.h
8697         * src/pic/ralloc.c
8698         * src/pic/ralloc.h
8699         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8700         genPlus() & genMinus() when the result is the same as left or right
8701
8702 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8703
8704         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8705
8706 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8707
8708         Made bitfield a distinct type from bit so that bitfields
8709         convert as per ANSI C and bits retain their traditional
8710         boolean style behaviour. Implemented bitfield support in
8711         the z80 port.
8712
8713         * src/SDCCsymt.h,
8714         * src/SDCCsymt.c,
8715         * src/SDCCast.c,
8716         * src/cdbFile.c,
8717         * src/mcs51/gen.c,
8718         * src/ds390/gen.c: bit v bitfield split
8719         * src/z80/gen.c: New support for bitfields
8720         * support/regression/tests/bitfields.c: reenabled z80,
8721         added more tests
8722
8723 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8724
8725         Rules 246.x, 247.x relate to bitfields, the others speed up
8726         access to xdata mapped I/O devices.
8727
8728         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8729
8730 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8731
8732         Cleaned up genPackBits and genUnpackBits and added two helper
8733         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8734         for literal assignments in genPackBits (thanks to Frieder for
8735         reminding me).
8736
8737         * src/mcs51/gen.c
8738         * src/ds390/gen.c
8739
8740 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8741
8742         Fixed bug #748310 (pointer to function type mishandled when the
8743         function name is omitted). Also fixed a SIGSEGV when a function
8744         attribute (reentrant, etc) is used on a non-function or on a
8745         function but misplaced before the parameter list.
8746
8747         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8748         bug #748310
8749         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8750         * support/Util/SDCCerr.h,
8751         * support/Util/SDCCerr.c: Added func attr misuse error msg
8752
8753 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8754
8755         Fixed bug #787649 by anonymous
8756         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8757         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8758
8759 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8760
8761         Fixed numerous bitfield problems.
8762
8763         * src/SDCC.y: More bitfield related error checking
8764         * src/SDCCsymt.h,
8765         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8766         * support/Util/SDCCerr.h,
8767         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8768         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8769         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8770         * support/regression/tests/bitfields.c: tests added
8771
8772 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8773
8774         Made the constant following the "interrupt" keyword optional. If
8775         omitted, the function will not automatically be given an entry
8776         in the interrupt vector table (similar to #pragma NOIV, but
8777         less syntacticly kludgy). The interrupt number is also now
8778         range checked. Also fixed a bug in the high order bit example
8779         in the manual.
8780
8781         * src/SDCC.y
8782         * src/SDCCmem.c
8783         * src/SDCCglue.c
8784         * src/SDCCsymt.h
8785         * support/Util/SDCCerr.c
8786         * support/Util/SDCCerr.h
8787         * doc/sdccman.lyx
8788
8789 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8790
8791         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8792         * src/SDCCicode.c (operandOperation): rewritten some ops
8793         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8794         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8795         other type
8796         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8797         be re-activated by defining REDUCE_LITERALS)
8798         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8799         unsigned, but are signed by default
8800         * src/SDCCval.c (constVal): rearranged
8801         * src/SDCCval.c (valMod): preliminary fix
8802         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8803         * support/regression/literalop.c: added, work in progress
8804
8805 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8806
8807         Generate warnings for useless declarations like "char data;"
8808         that don't do what new users expect.
8809
8810         * src/SDCC.y
8811         * support/Util/SDCCerr.h
8812         * support/Util/SDCCerr.c
8813
8814 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8815
8816         * src/SDCCval.c (valMult): fix overflow detection of negative int
8817
8818 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8819
8820         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8821
8822         Changes to support big endian targets:
8823
8824         * src/ports.h
8825         * src/SDCCglue.c
8826         * src/avr/main.c
8827         * src/ds390/main.c
8828         * src/izt/i186.c
8829         * src/mcs51/main.c
8830         * src/pic/main.c
8831         * src/pic16/main.c
8832         * src/xa51/main.c
8833         * src/z80/main.c
8834
8835 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8836
8837         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8838         * device/lib/time.c: fixed warning "integer overflow in expression"
8839
8840 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8841
8842         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8843         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8844         constants are unsigned; added recognition of "u" flag for unsigned
8845         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8846         * src/SDCCval.c (valDiv, valMod): fixed signdness
8847         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8848         signedness of modulo, left and right shift
8849         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8850         * support/Util/SDCCerr.h: added warning W_INT_OVL
8851         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8852         * src/SDCCast.c (ast_print): improved output of constants
8853
8854 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8855
8856         Fixed some warnings when building with MSVC:
8857
8858         * as\mcs51\asdata.c
8859         * as\z80\asdata.c
8860         * as\mcs51\asm.h
8861         * as\z80\asm.h
8862         * link\z80\aslink.h
8863         * link\z80\lkdata.c
8864         * link\z80\lkeval.c
8865         * link\z80\lkgb.c
8866         * link\z80\lkihx.c
8867         * link\z80\lks19.c
8868         * link\z80\lksym.c
8869         * support\cpp2\cpplib.c
8870         * src\ds390\gen.c
8871         * src\mcs51\gen.c
8872
8873 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8874
8875         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8876
8877 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8878
8879         * support\librarian\clean.mk: Do not remove Makefile.
8880         * support\librarian\Makefile: added.
8881
8882 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8883
8884         Added librarian to MSVC build:
8885         * all.dsp
8886         * sdcc.dsw
8887         * support\librarian\librarian.dsp
8888
8889         'configure' not needed for librarian, removed:
8890         * support\librarian\configure
8891         * support\librarian\configure.in
8892         * support\librarian\config_in.h
8893         * support\librarian\Makefile.in
8894
8895         Hopefully these ones built the librarian and the rest of sdcc properly:
8896         * Makefile
8897         * Makefile.common.in
8898
8899         Messed up 'configure', so revert to previous version:
8900         * configure
8901         * configure.in
8902
8903 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8904
8905         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8906         there, while the mantissa of a double is "only" 53 bits wide.
8907
8908 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8909
8910         Adding sdcclib to the build.  MSVC project coming soon.
8911         Files added/changed:
8912
8913         * support\librarian\clean.mk
8914         * support\librarian\configure
8915         * support\librarian\configure.in
8916         * support\librarian\config_in.h
8917         * support\librarian\Makefile.bcc
8918         * support\librarian\Makefile.in
8919         * support\librarian\sdcclib.c
8920         * Makefile.bcc
8921         * Makefile
8922         * Makefile.common.in
8923         * configure
8924         * configure.in
8925
8926 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8927
8928         Linker now complaints if linked modules have conflicting options, for
8929         example, one compiled using --model-large and another one compiled with
8930         --model-small.  The following files were modified:
8931
8932         * as\mcs51\asdata.c
8933         * as\mcs51\aslink.h
8934         * as\mcs51\asm.h
8935         * as\mcs51\asmain.c
8936         * as\mcs51\asout.c
8937         * as\mcs51\i51pst.c
8938         * as\mcs51\lkdata.c
8939         * as\mcs51\lklibr.c
8940         * as\mcs51\lkmain.c
8941         * as\z80\asdata.c
8942         * as\z80\asm.h
8943         * as\z80\asmain.c
8944         * as\z80\asout.c
8945         * as\z80\z80pst.c
8946         * link\z80\aslink.h
8947         * link\z80\lkdata.c
8948         * link\z80\lklibr.c
8949         * link\z80\lkmain.c
8950         * src\SDCCglue.c
8951
8952 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8953
8954         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8955         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8956
8957 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8958
8959         * src/z80/mappings.i: fix _mul[us][int,long] entries
8960
8961 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8962
8963         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8964
8965 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8966
8967         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8968         * support/regression/tests/bitopcse.c: added
8969         fixed warning:
8970         * src/avr/gen.c:
8971         * src/pic/gen.c:
8972         * src/pic16/gen.c:
8973         * src/z80/gen.c:
8974         * src/xa51/gen.c:
8975
8976 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8977
8978         added support for new library format to z80, gbz80 linkers:
8979         *link/z80/aslink.h
8980         *link/z80/lklex.c
8981         *link/z80/lklib.c
8982         *link/z80/lklist.c
8983
8984 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8985
8986         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8987         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8988
8989 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8990
8991         added DUMMY_READ_VOLATILE:
8992         * src/SDCC.y:
8993         * src/avr/gen.c:
8994         * src/xa51/gen.c:
8995         * src/z80/gen.c:
8996         * src/pic/gen.c:
8997         * src/pic16/gen.c:
8998         * src/mcs51/gen.c:
8999         * src/ds390/gen.c:
9000         * src/SDCCcse.c (algebraicOpts): many improvements
9001         * src/SDCCcse.h: removed algebraicOpts()
9002         * src/SDCCicode.c (picDummyRead): added
9003
9004 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9005
9006         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
9007         "Insufficient space in data memory".
9008
9009 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9010
9011         * src/mcs51/gen.c: fixed bug #771358
9012         * src/z80/gen.c: fixed bug #759087
9013
9014 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
9015
9016         * src/pic16/glue.c: minor cleanup by Vangelis
9017
9018 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9019
9020         * device/include/regc515c.h: fixed #758477
9021         * device/lib/_gptrget.c: saving some cycles in generic pointer get
9022         * device/lib/_gptrput.c: saved a few bytes
9023         * my tab spacing is 8, yours too?)
9024         * device/lib/_ser.c: process RX bytes earlier than TX bytes
9025         * device/lib/serial.c: process RX bytes earlier than TX bytes
9026         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
9027
9028 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
9029
9030         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
9031
9032 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9033
9034     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
9035
9036 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
9037
9038         * device/lib/Makefile.in: bad fix, reverted to 1.43
9039
9040 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
9041
9042         * device/lib/Makefile.in: added missing z80 object files
9043
9044 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
9045
9046         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
9047         pic16 progress by Vangelis:
9048         * src/SDCCglobl.h:
9049         * src/SDCCmain.c:
9050         * src/pic/Makefile:
9051         * src/pic:
9052         * pic/Makefile:
9053         * pic16/device.c:
9054         * pic16/device.h:
9055         * pic16/gen.c:
9056         * pic16/gen.h:
9057         * pic16/genarith.c:
9058         * pic16/glue.c:
9059         * pic16/main.c:
9060         * pic16/pcode.c:
9061         * pic16/pcode.h:
9062         * pic16/pcodepeep.c:
9063         * pic16/peeph.def:
9064
9065 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9066
9067     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
9068
9069 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9070
9071     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
9072     added gbz80 build to MSVC project.
9073     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
9074     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
9075     from 8051 stuff and setup so it links using a .lnk file.
9076
9077 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9078
9079     * support/librarian/sdcclib.c: sdcc librarian.
9080     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
9081     with sdcclib.
9082
9083 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9084
9085     * as/mcs51/lkmain.c: properly handle extensions in function afile.
9086
9087 2003-07-02  Borut Razem <borut.razem AT siol.net>
9088
9089         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
9090         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
9091         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
9092         src/xa51/main.c, src/z80/main.c:
9093         virtualization of glue() function: each port has it's own glue function,
9094         which is accessed by do_glue function pointer in PORT.general structure
9095
9096 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
9097
9098         * DS800C400 fun, improved ROM interface and tinibios.
9099
9100 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
9101
9102         * More support for DS80C400. Now includes beginning of interface to ROM.
9103
9104 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
9105
9106         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
9107
9108 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9109
9110         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
9111
9112 2003-06-19  Borut Razem <borut.razem AT siol.net>
9113
9114         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
9115
9116 2003-06-19  Borut Razem <borut.razem AT siol.net>
9117
9118         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
9119         fixed Z80 port - crt0.o: cannot open.
9120
9121 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
9122
9123         * support/Util/MySystem.c (merge_command): revert bad fix
9124
9125 2003-06-18  Borut Razem <borut.razem AT siol.net>
9126
9127         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
9128
9129 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9130
9131         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9132         option --use-stdout sends errors to stdout instead of stderr.
9133
9134 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
9135
9136         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
9137
9138 2003-06-15  Borut Razem <borut.razem AT siol.net>
9139
9140         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
9141         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
9142         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
9143         fixed width array of pointers replaced with sets;
9144         multiple include and lib paths ared transferred to preprocessor and linker
9145         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
9146         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
9147         fixed width array of pointers
9148         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
9149         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
9150         fixupPath(), getPathDifference()
9151         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
9152         fixed width array of pointers
9153
9154 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
9155
9156         * src/pic16/ralloc.c: fix warnings
9157         * src/pic16/pcode.c: fix warning
9158
9159 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
9160
9161          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
9162         know all the details, but essentially this set of changes enable
9163         the pic16 port to generate movff instructions and generate assembler
9164         directives,
9165         * src/SDCCmain.c:
9166         * src/pic16/gen.c:
9167         * src/pic16/glue.c:
9168         * src/pic16/pcode.c:
9169         * src/pic16/device.c:
9170         * src/pic16/main.c:
9171         * src/pic16/pcode.h:
9172         * src/pic16/pcoderegs.c:
9173         * src/pic16/ralloc.c:
9174         * src/pic16/ralloc.h:
9175
9176 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9177
9178         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
9179         added option --vc, so sdcc errors and warnings are compatible with
9180         Microsoft Visual Studio.
9181
9182 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9183
9184         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
9185           device/lib/libfloat.lib: added atof function.
9186
9187 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
9188
9189         * doc/sdccman.lyx: updated to Lyx 1.3
9190         * doc/cdbfileformat.lyx: updated to Lyx 1.3
9191         * doc/test_suite_spec.lyx: updated to Lyx 1.3
9192         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
9193
9194 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
9195
9196         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
9197
9198 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9199
9200         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
9201           additions to the "related tools/documentation" section
9202
9203 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
9204
9205         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
9206
9207 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
9208
9209         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
9210         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
9211
9212 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
9213
9214         * doc/sdccman.lyx: fix double dash and other minor things
9215         * doc/Makefile: fix double dash
9216
9217 2003-05-28  Karl Bongers(patches from Martin Helmling)
9218         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
9219           condition and ignore commands.
9220
9221 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9222
9223         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
9224           is in parts still quite out of date, I did changes as far as I felt makes sense
9225           for a non-native english speaker.
9226           Please feel free to add to the manual or to correct my changes.
9227         * doc/Makefile: undid touching the date of intermediate tex files.
9228
9229 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9230
9231         * doc/sdccman.lyx: Manual has an index now
9232
9233 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
9234
9235         Finalize muluint/mulsint and mululong/mulslong merging:
9236         * device/lib/_mulint.c
9237         * device/lib/_mullong.c
9238         * device/lib/gbz80/mul.s
9239         * device/lib/gbz80/stubs.s
9240         * device/lib/z80/mul.s
9241         * device/lib/z80/stubs.s
9242         * src/SDCCsymt.c (initCSupport)
9243
9244 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9245
9246         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
9247         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
9248           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
9249           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
9250           instead of /Zm500.
9251
9252 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9253
9254         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
9255           the regression tests I'm not brave enough to enable 245.b, 245.c
9256         * doc/sdccman.lyx: added latex preamble for hyperref package.
9257           Using pdflatex this will give you a hyperlinked pdf file with
9258           bookmarks. (prepend '%' before /usepackage if this breaks something)
9259
9260 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9261
9262          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
9263
9264 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
9265
9266         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
9267
9268 2003-05-21    <johan AT balder>
9269
9270         * src/SDCCglue.c (printIval): fixed bug #739934
9271
9272 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9273
9274         Applied patch from bug 737905 (renamed yylineo to mylineno):
9275         * src/altlex.c
9276         * src/SDCCast.c
9277         * src/SDCglobl.h
9278         * src/SDCC.lex
9279         * src/SDCCsymt.c
9280         * src/SDCCval.c
9281         * src/pic16/pcode.c: Cleaned warnings
9282         * src/pic16/pcodeflow.c: Cleaned warnings
9283         * src/pic16/pcoderegs.c: Cleaned warnings
9284
9285 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
9286
9287         * src/pic16/pcode.c: Cleaned warnings
9288         * src/pic16/pcodepeep.c: Cleaned warnings
9289         * src/pic16/ralloc.c: Cleaned warnings
9290
9291 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
9292
9293         * doc/sdccman.lyx: fixed bug 739745
9294         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
9295
9296 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
9297
9298         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
9299         it can be defined with CFLAGS when running configure
9300         * src/SDCCmain.c: fixed compiling + linking with object files
9301
9302 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
9303
9304         * configure.in: configure for pic16 port,
9305             added --disable-pic16-port
9306         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
9307         * src/SDCCmain.c: linkOptions is changed to set *,
9308             added if/endif conditional macros to remove options help
9309             messages from optionsTable when a port is not configured, added
9310             support for the PIc16 port in the ports table, when executing
9311             the compiler with no port specified on command line, a default
9312             port is selected with the new macro DEFAULT_PORT which is
9313             defined in port.h, in setDefaultOptions() linkOptions is removed
9314             from initialization assignment, since now it is a set,
9315             parseCmdLine uses setParseWithComma for linkOptions, in
9316             linkEdit() linkOptions are accessed with new function indexSet()
9317             which returns the i'th item of a set variable. See SDCCset.c, in
9318             linkEdit() when calling buildCmdLine(), added linkOptions as
9319             last argument. Now users can pass arguments to gplink via the
9320             -Wl option, main() uses pic16glue() to glue up pic16 programs
9321         * src/SDCCpeeph.c: various changes to support pic16
9322         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
9323             return the i'th item of the set
9324         * src/SDCCset.h: added function prototype for indexSet()
9325         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
9326         * src/clean.mk: added pic16 in CLEANALLPORTS variable
9327         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
9328             added macro DEFAULT_PORT
9329         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
9330         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
9331             generated
9332         * src/pic16/glue.c: commented out some error producing lines
9333         * src/pic16/main.c: __config directives are commented out to stop
9334             gpasm complaining and test the linkage with gplink, _linkCmd and
9335             _asmCmd changed to be more gplink and gpasm friendly
9336         * src/pic16/peeph.def: peep rule 3 is commented out, since it
9337             produced an error when parsed, peep rule 12 is added to utilize
9338             movff, but it is commented out since the pCode does not support
9339             yet a command with 2 address arguments
9340
9341 2003-05-18    <johan AT balder>
9342
9343         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9344         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
9345 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
9346
9347         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
9348   Added feature to script commands from file.
9349
9350 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
9351
9352         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
9353         * src/SDCCutil.c: include ctype.h for win32
9354
9355 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
9356
9357         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
9358
9359 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
9360
9361         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
9362   Fixed so you can set breakpoints prior to run, run does not stop
9363   on entry now.  Add tbreak.  Other enhancements and fixes for use
9364   with ddd.
9365
9366 2003-05-12  Borut Razem <borut.razem AT siol.net>
9367
9368         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
9369
9370 2003-05-11  Borut Razem <borut.razem AT siol.net>
9371
9372         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
9373         the path of bin directory, so that PATH is the only env. variable, which has to be set
9374         in case of standard installation.
9375         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
9376         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
9377         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
9378
9379 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9380
9381         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
9382         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
9383         temp files are in the port dir; clean the gen/test directory when
9384         generating new test.c
9385         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
9386         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
9387         * support/regression/tests/zeropad.c: added
9388
9389 2003-05-09    <johan AT balder>
9390
9391         * src/SDCCglue.c: fixed bug #597940
9392
9393 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
9394
9395         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9396   cache sfr, optimize next,step, fix off by one sourceline,
9397   support ddd list function.
9398         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
9399
9400 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
9401
9402         * support/regression/HTMLgen.py: added compare_s2f()
9403         * support/regression/Makefile: redo 1.27
9404         * support/regression/generate-cases.py: redo 1.5
9405
9406 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
9407
9408         * support/regression/tests/float.c: workaround 33 bit hex constant
9409         * support/regression/tests/simplefloat.c: fix division for host
9410
9411 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
9412
9413         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
9414         that tame's the PIC's over-aggressive optimizer.
9415
9416 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9417
9418          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
9419          support for MSVC.
9420
9421 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
9422
9423         Initial support for DS80C400. "Hello world" runs on TINIm400
9424         (with polled I/O).
9425
9426 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
9427
9428          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
9429          * Some notes on ddd usage added in debugger/README
9430          Martin Helmling adding more features and fixes for ddd GUI debugger.
9431          Code added for nexti, stepi, up, down, and other adjustments.
9432
9433 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
9434
9435         * src/pic/pCodepeep.c non-wildcard asmops are now handled
9436         * src/pic/peeph.def Added two rules to optimize carry manipulation
9437         * src/pic/* removed debug printfs
9438
9439 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
9440
9441         * debugger/mcs51/cmd.c: added header newalloc.h
9442
9443 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
9444
9445         * as/Makefile: new EXEEXT
9446         * as/z80/Makefile: remove trailing slash of BUILDIR
9447         * as/z80/clean.mk: new EXEEXT
9448         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9449         * support/cpp2/Makefile.in: new EXEEXT
9450         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9451
9452 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9453
9454         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9455         EXEEXT was introduced to fix all related problems with targets
9456         "clean", "install" and "uninstall"; a couple of further flaws
9457         especially with "clean" have been fixed too
9458         * as/mcs51/Makefile.in
9459         * as/mcs51/clean.mk
9460         * as/z80/Makefile
9461         * Makefile
9462         * clean.mk
9463         * debugger/mcs51/Makefile.in
9464         * debugger/mcs51/clean.mk
9465         * link/z80/Makefile
9466         * link/z80/Makefile.in
9467         * link/z80/clean.mk
9468         * link/Makefile
9469         * packihx/Makefile.in
9470         * packihx/clean.mk
9471         * sim/ucsim/Makefile
9472         * sim/ucsim/clean.mk
9473         * sim/ucsim/avr.src/Makefile.in
9474         * sim/ucsim/avr.src/clean.mk
9475         * sim/ucsim/s51.src/Makefile.in
9476         * sim/ucsim/s51.src/clean.mk
9477         * sim/ucsim/xa.src/Makefile.in
9478         * sim/ucsim/xa.src/clean.mk
9479         * sim/ucsim/z80.src/Makefile.in
9480         * sim/ucsim/z80.src/clean.mk
9481         * sim/ucsim/main_in.mk
9482         * sim/ucsim/packages_in.mk
9483         * sim/ucsim/gui.src/Makefile.in
9484         * sim/ucsim/gui.src/serio.src/Makefile.in
9485         * sim/ucsim/gui.src/serio.src/clean.mk
9486         * src/Makefile.in
9487         * src/clean.mk
9488         * support/cpp2/Makefile.in
9489         * support/cpp2/clean.mk
9490         * support/makebin/Makefile
9491         * support/makebin/clean.mk
9492         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9493         * doc/sdccman.lyx: --program-suffix no longer needed
9494
9495 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9496
9497          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9498          Martin Helmling added support for ddd GUI debugger.
9499          Code added to display assembly, set variables, and other commands
9500          to interface to ddd.
9501
9502 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9503
9504         * as/Makefile: fix target clean
9505         * as/clean.mk: fix target clean
9506         * as/z80/clean.mk: fix target clean
9507
9508 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9509
9510         * Makefile.common.in: added  AT EXEEXT AT
9511         * configure.in: removed all mingw32 stuff
9512         * configure: rebuilt from configure.in
9513         * doc/sdccman.lyx: updated section "installation"
9514         * support/scripts/sdcc_mingw32: adapted to configure
9515         * support/scripts/sdcc_cygwin_mingw32: added
9516
9517 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9518
9519         * src/pic Added object file support for the PIC port
9520         * src/pic Applied patch from Craig Franklin (this started the object file support)
9521         * src/regression Updated the PIC regression tests for object files
9522
9523 2003-04-20  Borut Razem <borut.razem AT siol.net>
9524
9525         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9526           lklex.c: In function `getfid':
9527           lklex.c:203: warning: array subscript has type `char'
9528         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9529           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9530         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9531           stack handling macros
9532
9533 2003-04-19  Borut Razem <borut.razem AT siol.net>
9534
9535         * "handling space characters in file path" task:
9536         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9537         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9538         * support/Util/MySystem.h: make it self-sufficient
9539         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9540           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9541           handling space characters in file path
9542         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9543           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9544         * support/Util/MySystem.c: handling space characters in executable's path
9545
9546 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9547
9548         * as/z80/Makefile: fix permanent rebuild of z80
9549         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9550         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9551
9552 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9553
9554         * src/SDCCopt.c: add special case optimization to replace modulo by
9555           a power of two with a bitwise AND.
9556
9557 2003-04-18    <johan AT balder>
9558
9559         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9560
9561 2003-04-17    <johan AT balder>
9562
9563         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9564         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9565
9566 2003-04-13  Borut Razem <borut.razem AT siol.net>
9567
9568         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9569         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9570           fixed mingw problem in adl_NORMALIZE_PATH
9571
9572 2003-04-12  Borut Razem <borut.razem AT siol.net>
9573
9574         * fixed "#pragma SAVE/RESTORE can not be nested":
9575         * src/SDCC.lex: reworked pragma handling functions
9576         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9577         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9578
9579 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9580
9581         * src/SDCCutil.c (pathEquivalent): defined but not used
9582         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9583         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9584         * configure: rebuilt from configure.in
9585         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9586         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9587         * device/include/Makefile.in: replace sdcc_datadir
9588         * device/lib/Makefile.in: replace sdcc_datadir
9589         * Makefile.common.in: add LDFLAGS from configure
9590         * packihx/Makefile.in: use LDFLAGS
9591         * src/Makefile.in: use LDFLAGS
9592         * support/cpp2/Makefile.in: add LDFLAGS from configure
9593         * support/makebin/Makefile: use LDFLAGS
9594         * .version: bumped version number to 2.3.5
9595
9596 2003-04-12  Borut Razem <borut.razem AT siol.net>
9597
9598         * completed "different paths" task:
9599         * src/SDCCmacro.c: fixed bug in handling quotes
9600         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9601         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9602
9603 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9604
9605         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9606
9607 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9608
9609         * ds390/gen.c ds390/peeph.def: fix bug 706781
9610
9611 2003-04-11  Borut Razem <borut.razem AT siol.net>
9612
9613         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9614
9615 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9616
9617         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9618         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9619          set - this bit used to not be set...).
9620         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9621           bad code in PIC Port
9622         * src/regression/and2.c added to test bug 609268
9623         * src/regression/Makefile added and2.c to regression test
9624
9625
9626 2003-04-08    <johan AT CP255758-A>
9627
9628         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9629         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9630         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9631
9632 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9633
9634         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9635         fix bug #487815
9636         * support/cpp2/Makefile.in: fix bug #487815
9637         * configure: rebuilt from configure.in
9638         * Makefile.common.in: docdir changed, new path suffixes
9639         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9640         * sdcc_vc_in.h: reflect changes from sdccconf.h
9641         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9642         * src/SDCCutil.h: remove BINDIR hack
9643         * doc/sdccman.lyx: update new path hierarchy
9644
9645 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9646
9647         * src/SDCCpeeph.c: added okToRemoveSLOC test
9648
9649 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9650
9651         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9652
9653 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9654
9655         * src/SDCCpeeph.c: added labelIsReturnOnly test
9656         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9657
9658 2003-04-05    <johan AT balder>
9659
9660         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9661         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9662         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9663         * src/SDCCast.c: fixed a warning
9664         * src/SDCCast.h: fixed a warning
9665         * src/SDCCicode.c (operandFromAst): fixed a warning
9666
9667 2003-04-04    <johan AT balder>
9668
9669         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9670         * src/SDCCast.c (decorateType): fixed bug #715076
9671         * src/SDCC.y: fixed bug #702907
9672
9673 2003-04-03    <johan AT balder>
9674
9675         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9676         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9677         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9678         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9679         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9680
9681 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9682
9683         * _decdptr.c: fix return values
9684         * _gptrget.c: fix return values
9685         * _gptrgetc.c: fix return values
9686         * _gptrput.c: fix return values
9687         * _mulint.c: fix return values
9688         * as/z80/Makefile: fix 'make -j' problem
9689
9690 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9691
9692         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9693         * configure.in: big cleanup, updated to autoconf 2.5x
9694         * configure: rebuilt from configure.in
9695         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9696         * sdcc_vc_in.h: reflect changes from sdccconf.h
9697         * doc/Makefile: fixed a flaw in "make install"
9698
9699 2003-04-02    <johan AT balder>
9700
9701         * src/ds390/gen.c (genCmp): no comments
9702         * src/mcs51/gen.c (genCmp): no comments
9703         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9704         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9705
9706 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9707
9708         * support/regression/generate-cases.py: place generated file in given sub directory
9709         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9710         * support/regression/Makefile: improvements for 'make -j';
9711         side effect: it's simpler and faster now
9712
9713 2003-03-31  Borut Razem <borut.razem AT siol.net>
9714
9715         * src/z80/main.c: link-{port} and as-{port} defined without path
9716         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9717
9718 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9719
9720         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9721
9722 2003-03-30  Borut Razem <borut.razem AT siol.net>
9723
9724         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9725           changed type of list parameter to set
9726         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9727         * src/port.h: changed type of do_assemble() parameter to set
9728         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9729           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9730           definition of "cppoutfilename" macro with NULL value in preProcess()
9731         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9732         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9733         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9734           replaced with set *binPathSet
9735         * shash_add() deallocates the item, if allready exsists, before adding the new one
9736         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9737
9738 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9739
9740         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9741           a nested for loop bug in the PIC port
9742         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9743           for loops
9744
9745 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9746
9747         * support/Util/dbuf.h: remove C++ stuff to make it portable
9748
9749 2003-03-28  Borut Razem <borut.razem AT siol.net>
9750
9751         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9752           literal strings in stringLiteral()
9753         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9754         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9755           to the project
9756
9757 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9758
9759         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9760
9761 2003-03-26    <johan AT balder>
9762
9763         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9764         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9765         * src/SDCCast.c (decorateType): fixed " -v < 3"
9766
9767 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9768
9769         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9770         Added Lenny Story's debug infrastructure changes:
9771         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9772         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9773         * src/cdbFile.c: added
9774         * src/SDCCdebug.c: added
9775         * src/SDCCdebug.h: added
9776         * src/SDCCast.c (createFunction)
9777         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9778         * src/SDCCmain.c (parseCmdLine, main)
9779         * src/SDCCmem.c (redoStackOffsets)
9780         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9781         * src/SDCCsymt.h
9782         * src/common.h
9783         * src/avr/gen.c (genAVRCode)
9784         * src/ds390/gen.c (gen390Code)
9785         * src/mcs51/gen.c (gen51Code)
9786         * src/pic/gen.c (genpic14Code)
9787         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9788         * src/xa51/gen.c (genXA51Code)
9789         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9790
9791 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9792
9793         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9794         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9795
9796 2003-03-22    <johan AT balder>
9797
9798         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9799
9800 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9801
9802         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9803         * doc/cdbfileformat.lyx: added, written by Lenny Story
9804         * doc/Makefile: added cdbfileformat.lyx
9805         * doc/clean.mk: added cdbfileformat.lyx
9806
9807 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9808
9809         * src/mcs51/peeph.def: fix bug #705773
9810
9811 2003-03-20    <johan AT balder>
9812
9813         An sfr/sbit can have an "at #" AND an initializer
9814         * src/SDCCsymt.c (checkSClass):
9815         * src/SDCCmem.c (allocGlobal):
9816         * src/SDCCmem.c (allocLocal):
9817         * src/SDCCast.c (createBlock):
9818
9819 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9820
9821         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9822
9823 2003-03-16    <johan AT balder>
9824
9825         Undid the hackup of const and volatile, the problem is much bigger
9826         * src/SDCC.y:1.65
9827         * src/SDCCast.c:1.171
9828         * src/SDCCglue.c:1.138
9829         * src/SDCCicode.c:1.146
9830         * src/SDCCsymt.c:1.150
9831         * src/SDCCval.c:1.65
9832
9833 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9834
9835         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9836         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9837
9838 2003-03-13    <johan AT balder>
9839
9840         Hackup const and volatile modifiers in type chains a bit:
9841         * src/SDCC.y:1.63
9842         * src/SDCCast.c:1.169
9843         * src/SDCCglue.c:1.136
9844         * src/SDCCicode.c:1.143
9845         * src/SDCCsymt.c1.146
9846         * src/SDCCsymt.h1.59
9847         * src/SDCCval.c:1.63
9848
9849 2003-03-12    <johan AT balder>
9850
9851         * src/SDCCBBlock.h: more LRH debugging junk
9852         * src/SDCCcflow.h: more LRH debugging junk
9853         * src/SDCCloop.c: more LRH debugging junk
9854         * src/SDCC.y (struct_declaration): fixed bug #697590
9855         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9856         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9857         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9858
9859 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9860         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9861         test function names must now match exactly).
9862         * src/SDCCcse.c: added special case in findCheaperOp to allow
9863         extending a short integer. Makes less awful code for bug 700121 test case.
9864
9865 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9866
9867         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9868         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9869
9870 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9871
9872         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9873         actually called (operandsNotEqual() was called for all
9874         operandsNotEqualX tests).
9875
9876 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9877
9878         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9879         with shorter literals. Fixes bug 700121.
9880
9881 2003-03-11    <johan AT balder>
9882
9883         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9884
9885 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9886
9887         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9888         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9889
9890 2003-03-10  Borut Razem <borut.razem AT siol.net>
9891
9892         * src/SDCCmain.c: pipe preprocessor's output
9893         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9894         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9895         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9896         which closes all pipes in pipeSet set
9897         * src/SDCCset.c: free deleted item in function deleteSetItem()
9898         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9899         moved from z80 to src subproject
9900         * .version: increased version number to 2.3.4
9901
9902 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9903
9904         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9905         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9906         * support/regression/ports/xa51/spec.mk: fix typo
9907
9908 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9909
9910         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9911
9912 2003-03-09  Borut Razem <borut.razem AT siol.net>
9913
9914         * src/SDCCmain.c: pipe preprocessor's output
9915         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9916         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9917         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9918         which closes all pipes in pipeSet set
9919         * src/SDCCset.c: free deleted item in function deleteSetItem()
9920         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9921         moved from z80 to src subproject
9922
9923 2003-03-09  Borut Razem <borut.razem AT siol.net>
9924
9925         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9926         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9927         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9928         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9929         * src/SDCCglobl.h: unification of WIN32 native definitions
9930
9931 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9932
9933         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9934
9935 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9936
9937         * src/configure.in:   check for endianess (even while cross-compiling)
9938         * src/configure:      check for endianess (even while cross-compiling)
9939         * src/configure_in.h: check for endianess (even while cross-compiling)
9940         * src/avr/gen.c:        remove old endianess stuff
9941         * src/mcs51/gen.c:      remove old endianess stuff
9942         * src/ds390/gen.c:      remove old endianess stuff
9943         * src/pic/gen.c:        remove old endianess stuff
9944         * src/pic/genarith.c:   remove old endianess stuff
9945         * src/pic/glue.c:       fix endianess check
9946         * src/pic16/gen.c:      remove old endianess stuff
9947         * src/pic16/genarith.c: remove old endianess stuff
9948         * src/pic16/glue.c:     fix endianess check
9949         * src/xa51/gen.c:       remove old endianess stuff
9950         * src/z80/gen.c:        fix endianess check
9951         * src/SDCCglue.c:       fix endianess check
9952         * src/ds390/peeph.def: fix bug 700036
9953
9954 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9955
9956         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9957         * src/configure: find appropriate data-types on host for SDCC's int and long
9958         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9959         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9960         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9961
9962 2003-03-07    <johan AT balder>
9963
9964         Just a big NOOP:
9965                 some minor cleanups before the big shot
9966                 OP_DEFS and OP_USES now use Kevin's protection
9967                 new option --nolabelopt
9968
9969         * src/SDCCBBlock.c:
9970         * src/SDCCast.c,:
9971         * src/SDCCcflow.c:
9972         * src/SDCCcse.c:
9973         * src/SDCCicode.c:
9974         * src/SDCCicode.h:
9975         * src/SDCClabel.c:
9976         * src/SDCCloop.c:
9977         * src/SDCCmain.c:
9978         * src/ds390/ralloc.c:
9979         * src/mcs51/ralloc.c:
9980         * src/pic/ralloc.c:
9981         * src/xa51/ralloc.c:
9982         * src/z80/ralloc.c:
9983
9984 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9985
9986         * src/pic/pcode.c (get_op): fix 64 bit warnings
9987         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9988         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9989         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9990         * support/regression/tests/malloc.c: fix 64 bit warnings
9991
9992 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9993
9994         * src/mcs51/gen.c (genMinus): fixed bug 696436
9995
9996 2003-03-02  Borut Razem <borut.razem AT siol.net>
9997
9998         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9999
10000 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
10001
10002         * configure.in: test for mkstemp
10003         * sdccconf_in.h: add HAVE_MKSTEMP
10004
10005 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
10006
10007         * device/include/ctype.h: removed warning while using --stack-auto
10008         * device/include/malloc.h: removed warning while using --stack-auto
10009         * device/include/string.h: removed warning while using --stack-auto
10010
10011 2003-02-23  Borut Razem <borut.razem AT siol.net>
10012
10013         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
10014         because NDEBUG is defined (see man assert)
10015         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
10016
10017 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10018
10019         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
10020         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
10021
10022 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10023
10024         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
10025         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
10026
10027 2003-02-18    <johan AT balder>
10028
10029         * as/mcs51/asmain.c (asmbl): module can start with a digit
10030         * as/z80/asmain.c (asmbl): module can start with a digit
10031
10032 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
10033
10034         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
10035         * src/asm.c: fix pipe() for Mingw32
10036
10037 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
10038
10039         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
10040         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
10041         make -V work again; --c1mode reads now from stdin
10042         * doc/sdccman.lyx: added --c1mode
10043         * support/Util/SDCCerr.c: new messages for c1 mode
10044         * support/Util/SDCCerr.h: new messages for c1 mode
10045         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
10046
10047 2003-02-15    <johan AT balder>
10048
10049         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
10050
10051 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
10052
10053         * doc/sdccman.lyx: Environment variables, -o and other minor things
10054
10055 2003-02-14    <johan AT balder>
10056
10057         * src/xa51/main.c: before anyone really tries to use it :)
10058
10059         * Install doc's in share/sdcc/doc
10060         * removed some obsolete files
10061         * Do a proper make distclean and uninstall
10062         M Makefile.common.in
10063         R sdccbuild.sh
10064         M as/Makefile
10065         M device/include/Makefile.in
10066         M device/lib/Makefile.in
10067         M doc/sdccman.lyx
10068         M link/Makefile
10069         M sim/ucsim/doc/Makefile.in
10070         M src/clean.mk
10071         R src/avr/peeph.rul
10072         R src/xa51/peeph.rul
10073         M support/cpp2/Makefile.in
10074         M support/makebin/Makefile
10075
10076
10077 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
10078
10079         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
10080
10081 2003-02-10  Borut Razem <borut.razem AT siol.net>
10082
10083         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
10084         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
10085         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
10086         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
10087         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
10088         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
10089         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
10090         src/z80/Makefile.bcc: Borland Makefile cleanup
10091         * as/z80/Makefile.bcc: Added Borland Makefile
10092         * support/cpp2/borland.h: Removed
10093
10094 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
10095
10096         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
10097         * src/SDCC.lex: new pragma NOIV
10098         * src/SDCCglobl.h: new pragma NOIV
10099         * src/SDCCmem.c: new pragma NOIV
10100
10101 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10102
10103         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
10104
10105 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
10106
10107         * src/SDCCmain.c: signal handling is switched off by --debug
10108         * doc/Makefile: small fix for install; use clean.mk again
10109         * doc/clean.mk: clean *.pdf and *.html too
10110
10111 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
10112
10113         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
10114         * device/lib/printfl.c: fix a ds390 bug by making it portable
10115         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
10116         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
10117         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
10118         * debugger/mcs51/cmd.c: converted multi-line string literals
10119         * sim/ucsim/globals.cc: converted multi-line string literals
10120         * src/SDCCmain.c: introduced signal handler to remove temp files
10121         * doc/Makefile: small tweaks, implement clean
10122         * doc: removed generated files
10123
10124 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10125
10126         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
10127         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
10128         Address Record is not correctly generated for DS390."
10129
10130 2003-02-02  Borut Razem <borut.razem AT siol.net>
10131
10132         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
10133         * as/mcs51/asm.h: fixed compilation with Borland C
10134         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
10135         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
10136         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
10137         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
10138         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
10139         src/z80/Makefile.bcc: delete $(LIB) only if exist
10140         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
10141
10142 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
10143
10144         * device/include/malloc.h: introduced NULL
10145         * device/include/string.h: introduced NULL
10146         * device/include/stdlib.h: introduced NULL
10147         * device/lib/_memcpy.c: removed NULL
10148         * device/lib/_strcat.c: removed NULL
10149         * device/lib/_strchr.c: removed NULL
10150         * device/lib/_strcmp.c: removed NULL
10151         * device/lib/_strcpy.c: removed NULL
10152         * device/lib/_strcspn.c: removed NULL
10153         * device/lib/_strlen.c: removed NULL
10154         * device/lib/_strncat.c: removed NULL
10155         * device/lib/_strncmp.c: removed NULL
10156         * device/lib/_strncpy.c: removed NULL
10157         * device/lib/_strpbrk.c: removed NULL
10158         * device/lib/_strrchr.c: removed NULL
10159         * device/lib/_strspn.c: removed NULL
10160         * device/lib/_strstr.c: removed NULL
10161         * device/lib/_strtok.c: removed NULL
10162         * device/lib/malloc.c: removed NULL, include own header
10163
10164 2003-02-02    <johan AT balder>
10165
10166         * 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
10167         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
10168         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
10169         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
10170         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
10171         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
10172
10173 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10174
10175         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
10176         area 'DATA'"
10177
10178 2003-02-01    <johan AT balder>
10179
10180         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
10181
10182 2003-01-31    <johan AT CP255758-A>
10183
10184         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
10185
10186 2003-01-30    <johan AT balder>
10187
10188         * src/SDCCBBlock.c: automatic bug detection
10189         * src/SDCCicode.c: automatic bug detection
10190
10191 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10192
10193         * src/SDCCglobl.h:   now --xram-size 0 works
10194         * src/SDCCmain.c:    now --xram-size 0 works
10195
10196 2003-01-29    <johan AT balder>
10197
10198         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
10199
10200 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10201
10202         * as/mcs51/aslink.h: Added options --xram-size and --code-size
10203         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
10204         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
10205         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
10206         * src/SDCCglobl.h:   Added options --xram-size and --code-size
10207         * src/SDCCmain.c:    Added options --xram-size and --code-size
10208
10209 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
10210
10211         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
10212         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
10213
10214 2003-01-27    <johan AT balder>
10215
10216         * src/SDCC.y: fixed bug #613764
10217
10218 2003-01-26    <johan AT balder>
10219
10220         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
10221         * src/SDCCsymt.h: fixed bug #673374
10222         * src/SDCCglue.c: fixed bug #661910
10223         * src/SDCCast.c: fixed bug #458099 and 673374
10224
10225 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
10226
10227         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
10228         * as/mcs51/strcmpi.h: added
10229         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
10230         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
10231         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
10232         * as/mcs51/assym.c: strcmpi -> as_strcmpi
10233         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
10234         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
10235         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
10236         * as/mcs51/Makefile.aslink: new module strcmpi
10237         * as/mcs51/Makefile.asx8051: new module strcmpi
10238         * as/mcs51/Makefil.bcc: new module strcmpi
10239         * as/mcs51/Makefile.in: new module strcmpi
10240         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
10241
10242 2003-01-26    <johan AT balder>
10243
10244         * src/SDCCglue.c: reverted back to 1.124
10245         * src/SDCCast.c: reverted back to 1.156
10246         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
10247
10248 2003-01-25    <johan AT balder>
10249
10250         * src/SDCCglue.c: A better fix for bug #661910
10251         * src/SDCCast.c: A better fix for bug #661910
10252         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
10253
10254 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10255
10256         * src/Makefile.in: remove spawn.o
10257         * src/SDCCmain.c: remove spawn.h
10258         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
10259         * src/spawn.c: removed
10260         * src/spawn.h: removed
10261         * support/regression/ports/ds390/spec.mk: link with -r
10262
10263 2003-01-24    <johan AT CP255758-A>
10264
10265         * src/ds390/gen.c (aopOp): fixed bug #667458
10266         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
10267         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
10268         (createIvalCharPtr): an ival doesn't always have a storage class anymore
10269
10270 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
10271
10272         * src/mcs51/peeph.def: better assembler identation by Frieder
10273         * src/mcs51/gen.c: better assembler identation by Frieder
10274
10275 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
10276
10277         * as/z80/string.h: removed for gcc 3.2
10278         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
10279         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
10280
10281 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10282
10283         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
10284         * src/SDCCpeeph.c (replaceRule): fix bug #663503
10285         * support/regression/Makefile: separate temp files for ports
10286         * support/regression/generate-cases.py: separate temp files for ports
10287         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10288         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
10289
10290 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
10291
10292         * moved tinitalk to device/examples/ds390
10293
10294 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
10295
10296         * as/mcs51/lkmem.c: rflag is for DS390
10297         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
10298         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
10299                          (linkEdit): move mem- and map-files the same way as ihx-files
10300         * src/z80/main.c (_setDefaultOptions): removed --generic
10301         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
10302         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
10303         * src/pic/glue.c (picglue): --c1mode works again
10304         * src/pic16/glue.c (pic16glue): --c1mode works again
10305         * src/asm.c (printCLine): fix #660034
10306
10307 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
10308
10309         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
10310         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
10311         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
10312         * as/mcs51/lkmem (summary): better fix for sp problem
10313         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
10314         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
10315         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
10316                                               remove --stack-after-data
10317
10318 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
10319
10320         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
10321         * src/SDCCutil.c (join): ugly bug: missing '\0'
10322         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
10323
10324 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10325
10326         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
10327         * src/port.h: typo
10328         * src/pic/main.c (_asmCmd): gpasm supports -o
10329         * src/z80/main.c: more general macros
10330         * device/lib/Makefile.in: remove intermediate files
10331
10332 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
10333
10334         * .version: Bumped version number to 2.3.3
10335         * src/SDCCBBlock.c: new option -o
10336         * src/SDCCglobl.h: new option -o
10337         * src/SDCCglue.c: new option -o
10338         * src/SDCCmain.c: new option -o
10339         * src/asm.c: new option -o
10340         * src/ds390/main.c: new option -o
10341         * src/pic/glue.c: new option -o
10342         * src/pic/pcode.c: new option -o
10343         * src/pic/ralloc.c: new option -o
10344         * src/pic16/glue.c: new option -o
10345         * src/pic16/pcode.c: new option -o
10346         * src/pic16/ralloc.c: new option -o
10347         * src/z80/main.c: new option -o
10348         * device/lib/Makefile.in: use -o
10349         * support/regression/ports/ds390/spec.mk: use -o
10350         * support/regression/ports/gbz80/spec.mk: use -o
10351         * support/regression/ports/mcs51/spec.mk: use -o
10352         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
10353         * support/regression/ports/z80/spec.mk: use -o
10354         * support/regression/ports/ucz80/spec.mk: use -o
10355         * support/regression/ports/xa51/spec.mk: use -o
10356         * support/regression/fwk/lib/timeout.c: fix usage string
10357
10358 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
10359         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
10360
10361 2003-01-07    <johan AT balder>
10362
10363         * src/SDCCast.c (decorateType): fixed bug #600035
10364
10365 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
10366         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
10367         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
10368         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
10369         * src/pic/pcode.c: outcommented unused variable to remove warnings
10370         * src/pic/ralloc.c: outcommented unused variable to remove warnings
10371
10372 2003-01-06    <karl AT turbobit.com>
10373         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
10374    regression tests.
10375
10376 2003-01-06    <johan AT balder>
10377
10378         * src/SDCCicode.c: fixed array add
10379
10380 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
10381         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
10382         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
10383
10384 2003-01-04    <johan AT balder>
10385
10386         * src/SDCCval.c (getNelements): fixed the initialized array of structures
10387
10388 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10389         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
10390
10391 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10392         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
10393         * support/regression/tests/bug-524697.c: fit mem usage into 8032
10394
10395 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
10396         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
10397
10398 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
10399         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
10400
10401 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
10402         * src/mcs51/main.c: removed {bindir}{sep} from aslink
10403
10404 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10405
10406     * in \sdcc\as\mcs51\ changed these files in order to create an
10407     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
10408     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
10409     following files to include the previous two files: aslink.dsp,
10410     Makefile.aslink, Makefile.bcc, and Makefile.in.
10411
10412     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
10413     .adb instead of .cdb
10414
10415 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10416
10417         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
10418         value from option --iram-size.
10419
10420 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10421
10422         * \sdcc\as\mcs51\lklist.c: added boundary check before using
10423         dram[] array.
10424
10425 2002-09-18    <wiml AT hhhh.org>
10426
10427         * SDCClrange.h: exposed setFromRange() and setToRange()
10428         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
10429           packRegsForAccUse() (bug 542397)
10430         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
10431           multiple times and emitting the fetch operations more than once
10432           added aopGetUsesAcc() function to allow binary operators to
10433           fetch their operands in the correct order; made genMinus() emit
10434           compact code for X = LITERAL - Y
10435
10436 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10437         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
10438         sprintf() in line 1267.
10439
10440 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10441         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
10442         like ports.
10443
10444 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
10445         Changes to aslink (All the changes are marked with 'JCF'):
10446
10447         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10448         summary().
10449
10450         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10451         area BSEG.  Also moves, if possible, the DATA area down into the internal
10452         ram so more space is available.
10453
10454         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10455         sflag.
10456
10457         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10458         not bytes.  Function summary() which creates a memory usage summary
10459         file with extension .mem.  Reports of overlaping stack and small stack
10460         size.  If the space for the stack is less than 16 bytes aslink trows a
10461         warning.
10462
10463         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10464         the 8051.  Option 'y' for memory summary output file.
10465
10466         Changes to sdcc (All the changes are marked with 'JCF'):
10467
10468         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10469
10470         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10471         overlaying area for it (uses RegBankUsed[4]).
10472
10473         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10474         bank zero as used by default.  By default aslink locates the stack
10475         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10476         the creation of the .mem file.  Delegates the allocation of data area
10477         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10478         the begining of the stack area to aslink.
10479
10480         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10481         glue() in SDCCglue.c creates an area for it.
10482
10483 2002-09-03  Borut Razem <borut.razem AT siol.net>
10484         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10485         sdcc/src/pic/glue.c:
10486         introduced atexit() handler for teporay files removal in case of
10487         errors, assertions, ...
10488
10489 2002-08-29  Borut Razem <borut.razem AT siol.net>
10490         * sdcc/support/cpp2/auto-host_vc_in.h:
10491         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10492         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10493         Maybe there is a similar problem with BORLANDC? It should be checked!
10494
10495         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10496         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10497         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10498         was not executed, and the compiler (cl) launched a warning:
10499         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10500
10501 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10502         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10503
10504 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10505         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10506
10507         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10508           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10509           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10510           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10511           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10512           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10513           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10514         - added Release configuration in VS projects
10515         - review of compiler an linker options
10516         - VC .exe files are generated in bin_vc directory, not to interfere
10517           with binaries generated from other projects (cygwin, mingw, bcc ...)
10518
10519         * sdcc/src/yacc.dsp: added
10520
10521         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10522         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10523         and insert the version number definitions from .version
10524
10525         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10526
10527         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10528         added - genarate auto-host.h using auto-host_vc_in.h as template
10529
10530         * sdcc/sdcc_vc.h,
10531         removed from CVS, generated automatically
10532
10533 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10534         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10535
10536 2002-08-11  Borut Razem <borut.razem AT siol.net>
10537         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10538
10539 2002-08-10  Borut Razem <borut.razem AT siol.net>
10540         * src/SDCCmain.c (main):
10541         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10542         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10543         The consequence was that some temporary files were not removed.
10544
10545         * src/SDCCglue.c:
10546         unification of code in functions tempfilename() and tempfile():
10547         function tempnam() is defined in Visual Studio 6.0 and .NET
10548
10549         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10550
10551         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10552           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10553         - removed compiler command line option /WX: Treats all warnings as errors
10554         - update a list of source files, included into the project
10555
10556         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10557           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10558         changed project type to Generic Project so that can be correcly converted to VS.NET project
10559
10560         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10561
10562         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10563
10564         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10565
10566         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10567         added return 0 statements after assert() to make compiler happy
10568
10569         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10570         added newline in the def file to keep MSC compiler satisfied
10571
10572         * sdcc/src/z80/gen.c:
10573         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10574           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10575         - solved MSC error in function aopDump()
10576
10577         * sdcc_vc.h: define PREFIX as "\\sdcc"
10578
10579 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10580         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10581
10582 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10583         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10584         - Rewrote the register banking algorithm.
10585         - Added pCode live-range analysis to registers (for now, only non-used and
10586         singly-used registers optimized away)
10587
10588         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10589
10590         * 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.
10591
10592 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10593         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10594
10595 2002-04-22  Michael Hope  <michaelh AT vroom>
10596
10597         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10598
10599         * configure.in (DD_COPT): Added include support required for gbdk.
10600
10601         * .version: Bumped version number just to increase it.
10602
10603         * src/SDCCmain.c: Added -nostdinc to the default options.
10604
10605 2002-04-15  Michael Hope  <michaelh AT vroom>
10606
10607         * device/lib/z80/printf.c (sprintf): Added.
10608
10609         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10610
10611         * src/z80/peeph.def: Added transpose redundent load rule.
10612
10613         * src/z80/main.c: Added force callee saves for jaune.
10614
10615         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10616
10617         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10618
10619 2002-03-28  Johan Knol  <johan AT balder>
10620
10621         * src/SDCCval.c: fixed bug #532436
10622
10623 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10624         * /src/port.h:
10625         Added "char *Processor" field to the port structure.
10626
10627         * /src/SDCCmain.c:
10628         Added -p option. Allows port dependent processor to be specified.
10629
10630         * all ports:
10631         Initialized the new field char *Processor field to NULL in all ports
10632
10633         * /src/pic/*:
10634         Compiler generated registers for interrupt context saving
10635         were not getting allocated.
10636
10637 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10638
10639         * /src/SDCCast.c:
10640         Fixed left shift. Will promote the left side of a left shift
10641         if a) left shifting more than size of operand or b) when assigned
10642         to something size > size of left side
10643
10644 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10645         * src/pic/*
10646         tons of changes. Register allocation has been
10647         rewritten. Added customization for the various PICs. Flow
10648         analysis is restructured. ...
10649
10650         * src/pic/device.h:
10651         Added
10652
10653         * src/pic/device.c:
10654         Added. device.c is a PIC port hack to accomodate variations
10655         in PIC devices.
10656
10657 2002-03-13  Michael Hope  <michaelh AT vroom>
10658
10659         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10660
10661 2002-03-04  johanknol  <johanknol AT manik>
10662
10663         * /src/SDCCval.c: fixed
10664
10665         const unsigned char arr[][2] = { { 0, 1 } };
10666         t18.c:1: error: Initializer element is not constant
10667
10668 2002-03-04  bela  <bela AT manik>
10669
10670         * /device/include/mcs51reg.h:
10671         ds89c420 register definition update
10672
10673 2002-03-03    <johan AT FRIJA>
10674
10675         * support/Util/SDCCerr.c: did something, but don't no why anymore
10676
10677         * support/regression/tests/bug-524691.c: made it a little less shy
10678
10679         * src/SDCCast.c (decorateType): fixed bug #524697
10680
10681         * src/SDCCast.c: made some lineno improvements
10682
10683         * src/SDCCval.c (getNelements): changed warning to error
10684
10685         * src/SDCCglue.c (printIvalArray): changed warning to error
10686
10687         * src/SDCCicode.c: fixed a warning for mingw
10688
10689         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10690
10691         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10692
10693 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10694
10695         * src/ds390/peeph.def:
10696         Added some more peephole rules
10697
10698         * src/ds390/gen.c: Various fixes & enhancements
10699
10700         * src/SDCClrange.c, src/SDCClrange.h:
10701         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10702
10703         * src/ds390/ralloc.c:
10704         various fixes & enhancements (ds390) specific
10705
10706         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10707         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10708         from rallocs.
10709
10710         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10711
10712 2002-03-02    <johan AT FRIJA>
10713
10714         * src/SDCCast.c (decorateType): fixed bug #524708
10715
10716         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10717
10718         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10719
10720 2002-03-01  Michael Hope  <michaelh AT vroom>
10721
10722         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10723
10724         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10725
10726 2002-03-01    <johan AT FRIJA>
10727
10728         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10729
10730         * src/SDCCast.c (decorateType): fixed bug #524209
10731
10732         * src/SDCCval.c (valNot): fixed bug #524195
10733
10734 2002-02-26    <johan AT balder>
10735
10736         * src/xa51/gen.c: fixed a warning
10737
10738         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10739
10740         * src/SDCCast.c (decorateType): fixed bug #522534
10741
10742 2002-02-23    <johan AT balder>
10743
10744         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10745
10746 2002-02-22    <johan AT balder>
10747
10748         * src/SDCCast.c: fixed bug #514865
10749
10750         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10751
10752 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10753
10754         * sdcc/src/SDCCloop.c:
10755         Previous fix was not good. basic blocks that have "break" or "return" are
10756         not really partof a loop , but live ranges used in these blocks should
10757         be live thru the entire loop, so set partOfLoop but don't add them to
10758         loop region
10759
10760 2002-02-21    <johan AT FRIJA>
10761
10762         * src/SDCCcse.c: fixed bug #514308
10763
10764 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10765
10766         * src/SDCCloop.c:
10767         Fixed BUG #519583. If a conditional block ended in a return/break
10768         statement inside a loop, it was not being considered part of the loop.
10769
10770         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10771
10772 2002-02-10  Karl Bongers <karl AT turbobit.com>
10773
10774         * debugger/*:
10775         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10776         with lots of comments and notes.
10777
10778         * device/examples/test2.c:
10779         Fix bug, "red" variable not being initialized(compiler complained).
10780
10781         * device/examples/Makefile, examples/test3.c:
10782         Add Makefile in device/examples folder, compiles test3.c
10783         for use as a multiple module SDCDB test case.
10784
10785         * sim/ucsim/cmd.src/cmdset.cc:
10786         Took out debug printfs in ucsim "next" command.
10787
10788         * sim/ucsim/xa.src:
10789         Karl and Johan start ucsim XA support.  Most dissassembly working,
10790         about 75% emulation done(plenty of work remaining).
10791
10792         * sim/ucsim/z80.src:
10793         Add Z80 support to ucsim, add test-ucz80 regression test,
10794         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10795         Notice z80 compiler fails on examples/test3.c/crc code.
10796
10797 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10798
10799         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10800         Added support for --parms-in-bank1
10801
10802         * src/ds390/peeph.def:
10803         added a few more peephole optimzations
10804
10805         * src/ds390/main.c:
10806         1) added __builtin_inp & __builtin_outp used to read in data of given length
10807            from a memory mapped port
10808         2) added __builtin_memcmp
10809         3) added __builtin_swapw swap bytes of a short
10810
10811         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10812         1) handle multiple send & receives from register bank1
10813         2) ralloc can now allocate DPTR1 to some liveRanges
10814
10815         * src/SDCCsymt.c, src/SDCCsymt.h:
10816         changes to handle multiple sends & receives
10817
10818         * src/SDCCptropt.h:
10819         added some pointer arithmetic optimization
10820
10821         * src/SDCCptropt.c:
10822         added some pointer arithmetic optimizations but not stable yet so not
10823         called from anywhere (will get this working shortly)
10824
10825         * src/SDCCopt.c: fixed for multiple sends & receives
10826
10827         * src/SDCCmain.c:
10828         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10829         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10830            set preprocessor defines (depending on options)
10831
10832         * src/SDCCicode.c, src/SDCCicode.h:
10833         changes made to handle multiple sends & receives
10834
10835         * src/SDCCglobl.h:
10836         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10837
10838         * src/SDCCcse.c, src/SDCCcse.h:
10839         added function findbackward def (to be used in upcoming optimization)
10840
10841         * src/SDCCcflow.c, src/SDCCcflow.h:
10842         added function returnAtEnd - to determine if a basic block terminates with
10843         a RETURN iCode
10844
10845         * src/SDCCast.c, src/SDCCast.h:
10846         added option parms-in-bank1
10847
10848         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10849         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10850         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10851         adjusted for --parms-in-bank1 option
10852
10853         * device/include/string.h:
10854         donot redefine "reentrant" keyword
10855
10856         * device/include/ds80c390.h: Added some more SFRs
10857
10858 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10859
10860         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10861
10862 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10863
10864         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10865
10866 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10867
10868         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10869
10870 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10871
10872         * Added --xram-movc option
10873
10874 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10875
10876         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10877
10878 2002-01-11  Johan Knol
10879
10880         * Added math lib of Jesus Calvino-Fraga
10881
10882 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10883
10884         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10885         * support/regression/Makefile: new target test-mcs51-stack-auto
10886         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10887
10888 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10889
10890         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10891
10892 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10893
10894         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10895
10896 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10897
10898         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10899
10900         * src/SDCCglue.h: add definition for printIvalChar()
10901
10902 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10903
10904         * src/SDCCast.c: fix #498138 by Johan
10905
10906         * src/SDCCglue.c: fix #498138 by Johan
10907
10908 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10909
10910         * support/regression/Makefile: fix clean
10911
10912         * support/regression/ports/ds390/support.c: fix transmission of last character
10913
10914 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10915
10916         * /sdcc/src/ds390/gen.c:
10917         a) improved computing address of stack variable
10918         b) took out some #if 0 code
10919         c) improved parmBytes adjustment
10920         d) improved genPlusIncr & genMinusIncr
10921         e) genCmp could generate bad code (when left assigned to DPTR)
10922         f) Fixed bug in hasInc
10923
10924         * /sdcc/src/ds390/ralloc.c:
10925         a) packRegsForSupport could mess up live information (Fixed)
10926         b) packRegsDPTRuse could be incorrect for left & right shift
10927
10928         * /sdcc/src/mcs51/ralloc.c:
10929         packRegsForSupport could mess up the live information (Fixed)
10930
10931         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10932
10933         * /sdcc/src/SDCCast.c:
10934         can reverse a loop even if function call is present as long
10935         as the loop control variable is local & is not passed as parameter
10936
10937 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10938
10939         * /sdcc/ChangeLog: *** empty log message ***
10940
10941         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10942         More builtin function additions for TININative
10943
10944         * /sdcc/src/ds390/ralloc.c:
10945         Had broken the regression testsuite
10946
10947         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10948
10949         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10950         Added funcattr hasStackParms will be set for reentrant functions when there
10951         are paramteres on the stack, this helps in minimizing frame pointer generation
10952         typeFromStr can handle function pointers now
10953
10954         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10955         *** empty log message ***
10956
10957 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10958
10959         * /src/ds390/gen.c, /src/ds390/main.c:
10960         More builtin function additions for TININative
10961
10962         * /src/ds390/ralloc.c:
10963         Had broken the regression testsuite
10964
10965         * /src/SDCCast.c: Fixed a bug in dumptree
10966
10967         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10968         Added funcattr hasStackParms will be set for reentrant functions when there
10969         are paramteres on the stack, this helps in minimizing frame pointer generation
10970         typeFromStr can handle function pointers now
10971
10972         * /doc/builtins.txt, /doc/TININative.txt:
10973         *** empty log message ***
10974
10975
10976 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10977
10978         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10979         ALPHA version for -mTININative
10980
10981         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10982         updated to reflect changes in the port structure
10983
10984         * /src/port.h:
10985         added function do_assemble (similar to do_link) if non-null this function
10986         will be called to do assembly (-mTININative) requires a multi command
10987         assembly
10988         added function genAssemblerEnd will be called to generate assembler Epilogue
10989
10990         * /src/SDCCsymt.c:
10991         added _JavaNative to debug info printing
10992
10993         * /src/SDCCmain.c: added option --tini-libid
10994         added port->do_assemble function (-mTININative) has a multi command assemble
10995
10996         * /src/SDCCglue.c: Disabled "constExpr" check
10997         added port->genAssemblerEnd function
10998
10999         * /src/SDCCglobl.h: Added option --tini-libid value
11000
11001         * /src/SDCCast.h:
11002         tookout optimizeCompare from the header (has no external references)
11003
11004         * /src/SDCCast.c: made one more function "static"
11005
11006 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
11007
11008         * src/z80/mappings.i: Added z80asm support.
11009
11010         * src/z80/main.c: Added z80asm support on --asm=z80asm
11011
11012         * src/z80/gen.c: Fixed asm portability issues.
11013
11014         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
11015
11016         * src/SDCCglue.c (printExterns): Added global/extern split.
11017
11018 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
11019
11020         * support/regression/Makefile: added test for mcs51 model large
11021
11022         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
11023
11024         * support/regression/ports/gbz80/spec.mk: added -mgbz80
11025
11026 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
11027
11028         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
11029
11030 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
11031
11032         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
11033
11034         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
11035
11036 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
11037
11038         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
11039
11040         * support/regression/tests/simplefloat.c: Port to mcs51.
11041
11042 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
11043         * support/regression/tests/bug-485362.c: Added.
11044
11045         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
11046
11047         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
11048
11049         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
11050
11051         * src/z80/gen.c (aopDump): Added a dump function.
11052
11053 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
11054         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
11055
11056         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
11057
11058         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
11059
11060         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
11061
11062         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
11063
11064         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
11065
11066         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
11067
11068         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
11069
11070         * support/regression/ports/ds390/support.c: Use tinibios.
11071
11072         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
11073
11074 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
11075
11076         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
11077         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
11078
11079         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
11080
11081         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
11082
11083 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
11084
11085         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
11086
11087         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
11088         (packRegsForIYUse): Created and optimised.
11089
11090 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11091
11092         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
11093 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
11094
11095         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
11096
11097         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
11098
11099         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
11100
11101 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11102
11103         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
11104
11105         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
11106
11107 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11108
11109         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
11110
11111         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
11112
11113         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
11114
11115 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
11116
11117         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
11118         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
11119         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
11120
11121         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
11122
11123         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
11124         (genNotFloat): Added.
11125         (genUminusFloat): Added.
11126
11127         * device/lib/z80/Makefile: Added floating pt stubs.
11128
11129         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
11130
11131         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
11132
11133         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
11134
11135 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
11136
11137         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
11138
11139         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
11140
11141         * sdcc/support/regression/Makefile: Add port ds390.
11142
11143         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
11144
11145         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
11146
11147         * sdcc/support/regression/ports/ds390/spec.mk: Added.
11148
11149         * sdcc/support/regression/ports/ds390/support.c: Added.
11150
11151         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
11152
11153         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
11154
11155         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
11156
11157 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11158
11159         * device/include/malloc.h: Added z80 and gbz80 support.
11160
11161         * device/lib/gbz80/heap.s: Added.
11162
11163         * device/lib/z80/heap.s: Added.
11164
11165         * device/lib/malloc.c: Added z80 and gbz80 support.
11166
11167         * support/regression/tests/malloc.c (testMalloc): Added.
11168
11169         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
11170
11171         * support/regression/tests/bug-478094.c: Added.
11172
11173         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
11174
11175 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
11176
11177         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
11178
11179         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
11180
11181         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
11182
11183         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
11184
11185         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
11186
11187 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
11188
11189         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
11190
11191 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
11192
11193         * support/regression/tests/bug-477927.c: Added.
11194
11195         * src/z80/peeph.def: Added minor rules.
11196
11197         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
11198
11199         * src/z80/peeph.def: Added jump optimisation modification.
11200
11201 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
11202
11203         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
11204
11205 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
11206
11207         * support/regression/tests/funptrs.c: Added.
11208
11209 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
11210
11211         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
11212
11213 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
11214
11215         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
11216
11217         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
11218
11219         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
11220         (movLeft2ResultLong): Created.
11221
11222         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
11223         (joinPushes): Added.  Joins two char pushes into a word push.
11224
11225 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
11226
11227         * support/cpp2/Makefile.in (install): Added creation of dest dir.
11228
11229         * support/makebin/Makefile (install): Added creation of dest dir.
11230
11231 2001-10-24 Karl Bongers <karl AT turbobit.com>
11232
11233         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
11234
11235 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
11236
11237         * src/z80/ralloc.c: Turned off faulty pack for one use.
11238
11239         * src/z80/peeph-gbz80.def: Removed redundent restart options.
11240
11241         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
11242
11243 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
11244
11245         * support/regression/Makefile: Improved clean
11246
11247         * support/regression/ports/gbz80/spec.mk: Added clean
11248
11249         * support/regression/ports/host/spec.mk: Added clean
11250
11251         * support/regression/ports/z80/spec.mk: Added clean
11252
11253         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
11254
11255         * support/regression/ports/mcs51/timeout.c: little improvements
11256
11257 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
11258
11259         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
11260
11261         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
11262
11263         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
11264
11265 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
11266
11267         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
11268
11269         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
11270
11271 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
11272         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
11273
11274         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
11275
11276         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
11277
11278         * src/mcs51/main.c (_linkCmd): Added bin path to command.
11279
11280         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
11281
11282         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
11283
11284         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
11285
11286         * support/regression/tests/longor.c: Added.
11287
11288 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
11289
11290         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
11291
11292         * as/mcs51/aslink.h: define PATH_MAX
11293
11294         * as/mcs51/asm.h: define PATH_MAX
11295
11296         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
11297
11298         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
11299
11300         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
11301
11302         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
11303
11304         * src/SDCCglobl.h: define PATH_MAX
11305
11306         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
11307
11308         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
11309
11310 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
11311
11312         * src/z80/gen.c (gencjneshort): Fixed
11313
11314         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
11315
11316 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
11317
11318         * support/regression/tests/bug-469671.c: Added.
11319
11320         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
11321
11322 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
11323
11324         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
11325
11326         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
11327
11328 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
11329
11330         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
11331
11332         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
11333
11334         * src/device/lib/_mullong.c : removed hint: nooverlay bug
11335
11336         * src/device/lib/_divuint.c : removed hint: nooverlay bug
11337
11338         * src/device/lib/_divulong.c: removed hint: nooverlay bug
11339
11340         * src/device/lib/_moduint.c : removed hint: nooverlay bug
11341
11342         * src/device/lib/_modulong.c: removed hint: nooverlay bug
11343
11344 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
11345
11346         * 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.
11347
11348         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
11349
11350         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
11351
11352 2001-10-07    <johan AT FRIJA>
11353
11354         * device/lib/gets.c (gets): fixed the return value.
11355
11356 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
11357         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
11358
11359         * 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.
11360
11361         * 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.
11362
11363         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
11364
11365         * src/pic/gen.c: Removed Safe_strdup.
11366
11367         * configure.in: Added option to enable libgc support.
11368
11369         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
11370         (bitVectUnion): Optimised.
11371         (bitVectIntersect): Optimised.
11372         (bitVectBitsInCommon): Optimised.
11373         (bitVectCplAnd): Optimised.
11374
11375         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
11376
11377 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11378
11379         * src/SDCCmain.c: distinguish between assembler debug and plain options
11380
11381         * src/avr/main.c:   remove standard assembler options
11382
11383         * src/ds390/main.c: remove standard assembler options
11384
11385         * src/mcs51/main.c: remove standard assembler options
11386
11387         * src/port.h: removed "PENDING" comment
11388
11389 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11390
11391         * src/device/lib/_mulint.c  : new, with assember functions
11392
11393         * src/device/lib/_mullong.c : new, with assember functions
11394
11395         * src/device/lib/_divuint.c : with assember functions
11396
11397         * src/device/lib/_divsint.c : with assember functions
11398
11399         * src/device/lib/_divulong.c: with assember functions
11400
11401         * src/device/lib/_divslong.c: with assember functions
11402
11403         * src/device/lib/_moduint.c : with assember functions
11404
11405         * src/device/lib/_modsint.c : with assember functions
11406
11407         * src/device/lib/_modulong.c: with assember functions
11408
11409         * src/device/lib/_modslong.c: with assember functions
11410
11411         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
11412
11413         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
11414
11415         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
11416                                       replaced _mululong.c and _mulslong.c by _mullong.c
11417
11418 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
11419
11420         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
11421
11422 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11423
11424         * src/SDCCglue.c: test, if win32api is available for MINGW
11425
11426 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
11427
11428         * src/SDCCsymt.c: no more _modifier in printTypeChain()
11429         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
11430         * support/regression/ports/gbz80/spec.mk: removed GENERIC
11431         * support/regression/ports/host/spec.mk: removed GENERIC
11432         * support/regression/ports/mcs51/spec.mk: removed GENERIC
11433         * support/regression/ports/z80/spec.mk: removed GENERIC
11434
11435 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
11436
11437         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
11438
11439         * support/regression/tests/bug-467035.c: Created.
11440
11441 2001-10-01    <johan AT FRIJA>
11442
11443         * src/SDCC.y: fixed bug #466586 part 1
11444
11445 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
11446
11447         * SDCCicode.c: z80 has no generic pointers
11448         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11449
11450 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11451
11452         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11453
11454 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11455
11456         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11457
11458         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11459
11460 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11461
11462         * configure.in: Fixed up so that ucsim is only configured once.
11463
11464         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11465
11466         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11467         (getPathDifference): As above.
11468
11469         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11470
11471         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11472
11473 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11474         * .version: Updated to 2.3.1
11475
11476         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11477         Added copyright header.
11478
11479         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11480         (assemble): Added support for macro based assembler commands.
11481         (linkEdit): Added support for macro based linker commands.
11482         (preProcess): Changed the pre-processor to use macros.
11483         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11484         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11485
11486         * device/lib/z80/crt0.s: Added module name for debugging.
11487
11488 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11489
11490         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11491
11492         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11493
11494         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11495
11496         * src/Makefile.in: Added SDCCmacro and SDCCutil
11497
11498 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11499
11500         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11501
11502 2001-09-16    <johan AT FRIJA>
11503
11504         * 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.
11505
11506 2001-09-15    <johan AT FRIJA>
11507
11508         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11509         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11510
11511 2001-09-11    <johan AT FRIJA>
11512
11513         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11514
11515 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11516
11517         * support/regression/tests/bug-460444.c: Added test case.
11518
11519         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11520         (genCast): Added justification for all of the asserts.
11521
11522 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11523
11524         * support/regression/support.c: _xdata replaced by xdata
11525
11526         * support/regression/spec.mk: removed _generic
11527
11528 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11529
11530         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11531
11532         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11533         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11534
11535         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11536
11537         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11538
11539         * support/regression/tests/bug-460010.c: Added test case.
11540
11541         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11542
11543 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11544
11545         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11546
11547         * support/regression/testfwk.c: removed workaround for bug #436344
11548
11549         * support/regression/tests/bp.c: use less memory with mcs51
11550
11551         * support/regression/tests/bug-441448.c: use less memory
11552
11553         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11554
11555         * support/regression/collate-results.py: typo
11556
11557 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11558
11559         * support/regression/tests/fetchoverlap.c: Added new test case.
11560
11561         * support/regression/tests/bp.c: Added new test case.
11562
11563         * support/regression/tests/bug-448984.c: Added new test case.
11564
11565         * support/regression/tests/pow2shifts.c: Added new test case.
11566
11567         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11568         (genlshTwo): Fixed right shift for count > 8.
11569
11570         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11571
11572 2001-09-08    <johan AT FRIJA>
11573
11574         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11575
11576 2001-09-07    <johan AT FRIJA>
11577
11578         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11579
11580         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11581
11582 2001-09-06    <johan AT FRIJA>
11583
11584         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11585         * bernhard noted me at this: "() equals to (void)" (1.38)
11586
11587 2001-09-05    <johan AT FRIJA>
11588
11589         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11590
11591 2001-09-04    <johan AT FRIJA>
11592
11593         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11594
11595
11596 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11597
11598         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11599
11600 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11601
11602         * link/z80/aslink.h: Fixed path for PATH_MAX
11603
11604 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11605
11606         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11607
11608         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11609
11610         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11611
11612         * 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.
11613
11614 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11615
11616         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11617         (genCmp): Fixed up genCmp for the GB with longs.
11618
11619         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11620
11621         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11622
11623         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11624
11625         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11626
11627 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11628
11629         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11630
11631 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11632
11633         * 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.
11634
11635         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11636
11637 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11638
11639         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11640
11641         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11642
11643 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11644
11645   * sim/ucsim/configure:    little improvement of Cygwin-detection
11646   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11647   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11648   * support/regression/tests/bug-221100.c: small changes for mcs51
11649   * support/regression/tests/bug-221168.c: small changes for mcs51
11650   * support/regression/tests/bug-227710.c: small changes for mcs51
11651   * support/regression/tests/staticinit.c: small changes for mcs51
11652   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11653   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11654   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11655
11656 $Revision$