* src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
[fw/sdcc] / ChangeLog
1 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2
3         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
4         variables initial values to idata section,
5         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
6         variables in some functions. This utilizes parmBytes field of iCode
7         structure to hold the offset of the variable in stack. (might be
8         able to use the stack field too?)
9         * applied patch from Raphael Neider # ### , # ###
10         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
11         variable initial values in idata section,
12         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
13         for static variables with initial value
14         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
15         applied fix in while loop from Raphael Neider.
16
17 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
18
19         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
20         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
21         * src/ds390/ralloc.c (serialRegAssign): spill bits
22         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
23         * support/Util/SDCCerr.c,
24         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
25         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
26         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
27
28 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
29
30         * device/include/sdcc-lib.h: inserted LGPL, added includes
31           asm/ds390/features.h and asm/mcs51/features.h
32         * device/include/asm/default/features.h,
33         * device/include/asm/gbz80/features.h,
34         * device/include/asm/z80/features.h: added empty _AUTOMEM
35           and _STATMEM
36         * device/include/asm/ds390/features.h,
37         * device/include/asm/mcs51/features.h: added files with defines for
38           _AUTOMEM and _STATMEM indicating automatic and static storage class
39         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
40         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
41         * src/SDCCicode.c (geniCodeCast),
42         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
43         * src/SDCCloop.c (loopInduction): removed unused variable lr
44         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
45           to convertToFcall to include char modulo (RFE 1065037), added check
46           if left operand is unsigned and use abs of literal value
47         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
48           as it doesn't work after conversion from peephole.def to peephole.rul
49         * src/mcs51/gen.c (toBoolean): added check for size,
50           (genModOneByte): optimized code for signed char modulo a literal
51           power of 2 (thanks to Hubert Sack),
52           (genRRC): removed unnecessary "clr c",
53           (genRLC): replaced "add a,acc" with cheaper "rlc a"
54         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
55           jump optimization,
56           swapped rules 256.c and 256.d,
57           extended 256.d by using new multiple checks (thanks Erik),
58           added rules 256.e and 256.f,
59           updated rule 261.a and 261.b to new generated code
60         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
61
62 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
63
64         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
65           induction related bugs, including first part of bug #1074377
66
67 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
68
69         * applied patch from bug-report #1076292,
70         * applied patches for genAnd and Goto-optimizations for Raphael
71         Neider,
72         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
73         dump a less iCode information,
74         * src/pic16/device.h (pic16_options_t): added field debgen,
75         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
76         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
77         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
78         puclic,
79         * (various functions): added macros FENTRY and FENTRY2 to functions,
80         to emit function prologue,
81         * (various functions): fixed indentation,
82         * (genNearPointerGet): fixed loading of FSR0,
83         * (genPackBits): applied patch from Raphael Neider to fix updating
84         of FSR0 and touching only the modified bits,
85         * src/pic16/genarith.c (various functions): added macros FENTRY to
86         emit function prologue in comments,
87         * src/pic16/pcode.h: added functions debugf2, debugf3,
88         * src/pic16/ralloc.c: partial fix for packForPush caused
89         segmentation fault,
90
91 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
92
93         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
94           <stsp AT users.sourceforge.net> with reversed byte order
95         * support/regression/tests/rotate.c: added (ds390 skips some tests)
96
97 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
98
99         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
100           bug #1074377
101         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
102         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
103
104 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
105
106         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
107
108 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
109
110         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
111           conditions,
112           (setFromConditionArgs): friendly operand parser for peephole rules,
113           (operandBaseName, operandsNotRelated): new peephole condition
114           "operandsNotRelated" -- similar to "operandsNotSame", but takes
115           architecture specific register naming into account, handles n-way
116           comparisons, and supports quoted literals
117         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
118
119 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
120
121         * src/mcs51/peeph.def: fixed bug #1076940
122
123 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
124
125         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
126
127 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
128
129         Adding support for replacing ljmps with sjmps in jumptables
130         generated for switch statements. For now you need to set the
131         environment variable SDCC_SJMP_JUMPTABLE to enable this.
132         Now 4 algorithms for mcs51 jumptable generation are used:
133         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
134         addresses loaded pc-relative for up to 112 cases and stack-pushing
135         target addresses loaded with offset from dptr for up to 256 cases.
136
137         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
138         * src/mcs51/main.c: adapted constants for switch table generation
139         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
140
141 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
142
143         * device/lib/printf_large.c (_print_format): fixed bug 1073386
144         * support/regression/tests/bug1057979.c: added test for bug 1073386
145
146 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
147
148         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
149         compilers
150
151 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
152
153         * src/pic16/device.h,
154         * src/pic16/genarith.c,
155         * src/pic16/glue.c,
156         * src/pic16/main.c,
157         * src/pic16/pcode.c: applied patches #1068154 and #1070213
158
159 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
160
161         Large cummulative patch for pic16 port.
162         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
163         to call when a stack overflow occurs,
164         * (malloc.h): added CVS Id tag,
165         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
166         variable,
167         * added libc directory. The current version of LibC contains string
168         functions, ctype functions and macros and some functions of the
169         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
170         be extensively tested in the future. Standard disclaimer here.
171         Library is not automatically build yet. But one can build it by
172         invoking 'make' inside the libc directory.
173         * added ADC library under libio. Preliminary version yet.
174
175         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
176         * src/pic16/gen.c (aopForRemat): asmop size is filled by
177         aopForRemat() now and not by pic16_aopOp(),
178         * (pic16_popGetTempReg): removed warning messgae when allocating
179         temporary registers, its a buggy feature and will be removed,
180         * (pic16_popGet): set register instance field in AOP_CRY,
181         * (pic16_outBitC): fixed for results in size greater than 1,
182         * (genUminusFloat): fixed for pic16, ported code from mcs51,
183         * (pic16_storeForReturn): optimized return of 0,
184         * (genCmp): experimental code for new genCmp which uses PIC18's
185         special compare&skip instructions. Initial tests fail some times
186         with variables grater than 1 byte in size, so new code is disabled,
187         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
188         a single bit,
189         * (genCast): began a fix to optimize the casting of a bit to another
190         bit, now assigning a bitfield to another bitfield will fail, sorry,
191         * src/pic16/main.c: disabled the use of lr-support feature,
192         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
193         * added some function prototypes, added function _debugf prototype,
194         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
195         bits with offset (case PO_GPR_BIT),
196         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
197         command line,
198         * (isBankInstruction): modified to return 0 for no banking instruction,
199         and 1 for banking instruction,
200         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
201         caused stop processing pCodes after a inline assembly block,
202         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
203         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
204         registers when it shouldn't,
205         * src/pic16/ralloc.c (allocReg): add preliminary support for
206         supporting a limited set of temporary registers,
207
208 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
209
210         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
211           genDataPointerSet): ensure assignments always copy in MSB to LSB
212           order,
213           (loadRegFromAop): recognize CLRH optimization,
214           (genFunction): optimize RECEIVE iCodes in reentrant functions
215
216 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
217
218         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
219           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
220           selected.
221         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
222         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
223           contiguous with data
224
225 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
226
227         * device/lib/_gptrget.c (_gptrget),
228         * device/lib/_gptrgetc.c (_gptrgetc),
229         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
230           instead of sjmp to ret
231         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
232           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
233
234 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
235
236         * .version: bumped version to 2.4.7
237         * device/lib/_gptrget.c (_gptrget): is now _naked
238         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
239         * device/lib/_gptrput.c (_gptrput): is now _naked
240         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
241           (createFunction): fixed xstack
242         * src/SDCCglue.c (emitMaps): set allocation required for bit area
243         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
244           or bit either,
245           (geniCodeCritical): store original interrupt state in an iTemp bit
246           var unless stack-auto
247         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
248         * src/SDCCmain.c (setIncludePath): added include/target to search path
249         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
250         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
251           prototype,
252           (processFuncArgs): put bit vars in bit area
253         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
254           unsaveRBank): fixed xstack,
255           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
256           (genFunction, genEndFunction): fixed xstack,
257           (genAssign): optimization don't walk backwards through mem
258         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
259         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
260         * support/regression/Makefile: also make library (for stack-auto) when
261           making "all" and added "test-mcs51-xstack-auto"
262         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
263         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
264         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
265         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
266         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
267           make-library by MAKE_LIBRARY
268         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
269           regression tests for xstack
270         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
271         * support/regression/tests/critical.c: test for critical on mcs51
272
273 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
274
275         * support/regression/ports/ucz80/spec.mk: use include and lib files from
276           built version of sdcc instead of installed version
277
278 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
279
280         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
281         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
282           vprintf.c now
283         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
284         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
285           WARNING: remove device/lib/build/z80/printf.o by hand when
286           updating from previous build!
287         * device/lib/z80/printf.c: updated comment
288         * support/regression/tests/bug1057979.c: test all ports now
289         * support/regression/tests/bug1065458.c: file added
290
291 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
292
293         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
294           *_start and *_end symbols for static functions
295
296 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
297
298         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
299           and search crt0.o in all library paths,
300           (setIncludePath): proper handling of --nostdinc,
301           (setLibPath): proper handling of --nostdlib
302         * support/regression/Makefile,
303         * support/regression/ports/ds390/spec.mk,
304         * support/regression/ports/gbz80/spec.mk,
305         * support/regression/ports/hc08/spec.mk,
306         * support/regression/ports/mcs51/spec.mk,
307         * support/regression/ports/mcs51-large/spec.mk,
308         * support/regression/ports/mcs51-stack-auto/spec.mk,
309         * support/regression/ports/z80/spec.mk: use include and lib files from
310           built version of sdcc instead of installed version
311         * doc/sdccman.lyx: fixed typo in --nostdinc
312
313 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
314
315         * src/pic/pcode.c,
316         * src/pic/device.c,
317         * src/pic/ralloc.c,
318         * src/pic/gen.c : added support to generate code for struct bit fields.
319
320 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
321
322         * as/xa51/xa_version.h,
323         * device/include/errno.h,
324         * device/include/regc515c.h,
325         * device/lib/_itoa.c,
326         * device/lib/_ltoa.c,
327         * device/lib/ser_ir_cts_rts.c,
328         * sim/ucsim/xa.src/glob.cc,
329         * sim/ucsim/xa.src/inst_gen.cc,
330         * sim/ucsim/xa.src/xa_bit.cc,
331         * sim/ucsim/xa.src/xa_sfr.cc,
332         * sim/ucsim/z80.src/inst_dd.cc,
333         * sim/ucsim/z80.src/inst_fdcb.cc,
334         * support/scripts/keil2sdcc.pl,
335         * src/pic16/pic16.dsp,
336         * src/pic16/pic16a.dsp: corrected cvs line endings
337         * device/lib/printf_large.c: fixed bug 1057979
338         * src/pic16/gen.c: fixed non-C standard code
339         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
340         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
341         * support/regression/ports/mcs51/support.c: reload T1 asap
342         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
343           pdata use and clear idata startup behaviour
344         * support/regression/tests/bug1057979.c: added
345
346 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
347
348         * device/examples/ds390/ow390/ad26.h,
349         * device/examples/ds390/ow390/cnt1d.h,
350         * device/examples/ds390/ow390/crcutil.c,
351         * device/examples/ds390/ow390/ownet.h,
352         * device/examples/ds390/ow390/owsesu.c,
353         * device/examples/ds390/ow390/swt12.h,
354         * device/examples/ds390/ow390/swtoper.c,
355         * device/examples/ds390/ow390/temp10.h,
356         * device/examples/ds390/ow390/thermodl.c,
357         * device/examples/ds390/tinitalk/tinitalk.dsp,
358         * device/examples/ds390/tinitalk/tinitalk.dsw,
359         * device/examples/mcs51/clock/hw.h,
360         * device/examples/mcs51/simple2/go.bat,
361         * device/examples/serialcomm/windows/serial.h,
362         * device/examples/xa51/dummy.c,
363         * device/examples/xa51/hello.c,
364         * device/include/80c51xa.h,
365         * device/include/at89x051.h: corrected cvs line endings
366
367 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
368
369         * src/pic16/main.c (options): added command line --gstack, to trace
370         stack over/under flows,
371         * added pragma 'wparam' to allow passing first byte of function
372         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
373         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
374         call to __gstack_test function and sets up the symbol as extern,
375         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
376         * popaop): added call to pic16_testStackOverflow,
377         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
378         wparamList list,
379         * (genCall, genPcall): now all parameters are passed via stack
380         except in functions that are pass to wparam pragma in which WREG is
381         used too,
382         * (genPcall): REENTRANT flag is checked to see if variable prototype
383         contains reentrant keyword, don't call a non-reentrant function, via
384         a reentrant function pointer or vice versa, functions are never
385         passed via WREG,
386         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
387         D.Winkler,
388         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
389         SIGSEGV when accessing a NULL register stucture,
390         * (pic16_printGPointerType): modified to handle UPPER modifier for
391         function initializers, changed prototype of function to simpler one,
392         * (pic16_printIvalFuncPtr): check to see if function is already
393         added in externs list,
394         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
395         optimized a move from W to SFR with a move to the same register
396         later after a CALL,
397         * device/lib/pic16/debug: NEW directory, contains debug features
398         which are enabled when linking with libdebug.lib, currently command
399         line option --gstack enables stack pointer tracing for over/under
400         flow, corresponding sources are in debug/gstack
401
402 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
403
404         * doc/sdccman.lyx: updated SDCC version,
405         * (PIC16 port): update list of command line options,
406         * src/pic16/device.h (structure pic16_options_t): added field gstack
407         to enable stack overflow tracing on push/pops,
408         * src/pic16/device.c (statistics structure): added statistics
409         structure,
410         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
411         pic16_dump_int_registers): increase statistics counters for each
412         * variable which is encountered
413         * (pic16_dump_usection): emit each .udata variable to its own udata
414         section,
415         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
416         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
417         parameters via stack, otherwise use old scheme,
418         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
419         assembler output file,
420         * src/pic16/main.c: added command line options --gstack to enable
421         push/pop tracing for stack overflow,
422         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
423         instructions): added size of each instruction,
424         * (pic16_countInstruction): estimate size of instructions in
425         the_pFile list, inline assembly blocks are not counted,
426         * (pic16_FixRegisterBanking): trace previous register usage, when
427         banksel optimizations is greater than 0, don't emit a redudant
428         banksel directive,
429
430 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
431
432         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
433         * src/pic16/ralloc.c : applied same fix for pic16.
434         * src/pic/gen.c : tidied it up a little.
435
436 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
437
438         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
439         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
440
441 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
442
443         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
444
445 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
446
447         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
448         non-reentrant function __modsint in the interrupt function (thus
449         corrupting math operations during serial I/O)
450         * device/lib/ser_ir.c: as above, changed buffersize
451         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
452         256.c,d for zeroing
453         * doc/Makefile: added option -t for rsync
454
455 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
456
457         * src/SDCCast.h (struct ast),
458         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
459
460 2004-10-20 Borut Razem <borut.razem AT siol.net>
461
462         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
463         package
464
465 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
466
467         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
468         makefile targets,
469         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
470         support functions to replace long sequences of MOVFF's from access
471         bank registers to stack and vice versa,
472         * src/pic16/device.h: added new field opt_flags, where optimization
473         flags can be set to enable certain features,
474         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
475         * pBlock, (genFunction, genEndFunction): surroung loop for
476         saving/loading used registers in stack with PC_INFO pCodes,
477         INF_LREGS. Code in between can then be optimized by pCode optimizer
478         to support function calls,
479         * (genDataPointerSet): fixed bug which loaded float fields in
480         structures with corrupt data,
481         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
482         in a standard way debug info on stderr. Feature used for developing
483         and debugging only,
484         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
485         obsolete chunks of code,
486         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
487         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
488         * pic16/src/pcode.c (pic16_newpCodeInfo,
489         * (pic16_newpCodeOpLocalRegs),
490         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
491         feature,
492         * (pic16_pCodeConstString): printing of the initial value of a
493         symbol as a comment is inhibited since parsing was already done by
494         copyStr and output is corrupt,
495         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
496
497 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
498
499         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
500
501 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
502
503         * as/mcs51/lkarea.c: removed old K&R style,
504           (lnksect): changed check on boundary error,
505           (lnksect2): changed check on boundary error,
506           (lnksect2): extend XSTK to end of page if size = 1
507         * as/mcs51/lkmain.c: removed old K&R style,
508           (Areas51): create l_IRAM symbol
509         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
510         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
511           model-mcs51-stack-auto, added model-mcs51-xstack-auto
512         * device/lib/_mullong.c: added version to be compiled with xstack
513         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
514         * device/lib/mcs51/crtxclear.asm: clear pdata as well
515         * device/lib/mcs51/crtxstack.asm: fixed comment
516         * src/SDCCglue.c: maxInterrupts defaults to 0,
517           (emitMaps): added pdata,
518           (createInterruptVect): (re)moved default,
519           (glue): added pdata,
520           (glue): moved __start__xstack to XSTK with default size 1
521         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
522           and options.float_rent when options.stackAuto is set,
523           (linkEdit): only write XDATA_NAME if provided on command line
524         * src/SDCCmem.h,
525         * src/SDCCmem.c: added pdata
526         * src/port.h: added pdata_name to PORT
527         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
528           (saveRegisters, unsaveRegisters): removed usage of B,
529           (genMinus): fixed accumulator clash,
530           (genJumpTab): added comment, this needs another look
531         * src/mcs51/gen.c: added check for "B in use" paranoia,
532           added pushB() and popB()
533         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
534           chance
535         * src/avr/main.c,
536         * src/ds390/main.c,
537         * src/hc08/main.c,
538         * src/mcs51/main.c,
539         * src/pic/main.c,
540         * src/pic16/main.c,
541         * src/xa51/main.c,
542         * src/z80/main.c: (reset_regparms) made void parameter explicit and
543           added PSEG (PAG,XDATA) or NULL to port specifier
544         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
545         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
546           (_mcs51_genInitStartup): removed __start__xstack equ,
547           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
548         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
549         * src/z80/gen.c (_rleAppend): fixed warnings
550         * support/regression/tests/zeropad.c: added pdata test
551         * .version: bumped to 2.4.6
552
553 2004-10-17 Borut Razem <borut.razem AT siol.net>
554
555         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
556         as a part of nightly build
557
558 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
559
560         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
561         WREG holds the first byte function parameters,
562         * (aopForSym): take special case for symbols which are in FARSPACE
563         but in CODESPACE too,
564         * (assignResultValue): modified to take into account _G.useWreg,
565         * (genCall): don't use wreg for parameter passing when function is
566         declared as reentrant, too, added optimization INCF to stack
567         pointer when stack parameter count is 1,
568         * (genFunction, genEndFunction): refurnished and fixed to not using
569         wreg for passing parameters when function has varargs or is
570         reentrant, fixed bug with symbol name compare for generating
571         functions in absolute address,
572         * (pic16_storeForReturn): refurnished,
573         * (genCmp): began writing a new version of the function, not ready
574         yet, therefore it is disabled,
575         * (genAssign): do not read code memory when assigning a function to
576         a pointer function,
577         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
578         array of characters, not pointer,
579         * (pic16initialComments): in debug mode emit an .ident directive for
580         the assembler,
581         * (_process_pragma): emit a new warning type (internal to pic16)
582         when setting stack to default length, emit a similar warning when
583         placing a function at absolute address and address is not word aligned
584         * (_pic16_parseOptions): added 'return TRUE' statement,
585         * (_pic16_linkEdit): if compiling a source, then add the source's
586         file object, first in the list of objects to link,
587
588 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
589
590         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
591         * src/pic/main.c : removed VC warning.
592         * src/pic/gen.c : changed comment.
593
594 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
595
596         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
597         reference to a deprecated symbol _GPTRREG was causing failure to
598         link. Thanks G. M. Gallant for the info.
599
600 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
601
602         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
603         comments for Bugs item #954788.
604
605 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
606
607         * src/pic16/device.c (pic16_dump_gsection,
608         * pic16_groupRegistersInSection): handle symbols declared to be in
609         access bank differently,
610         * src/pic16/gen.c (struct _G): added field resDirect,
611         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
612         send values read from stack directly to result and don't allocate
613         temporary values,
614         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
615         same registers,
616         * (pic16_sameRegsOfs): NEW,
617         * (freeAsmop): if _G.resDirect is set then do not mark registers as
618         free because they were not allocated from temporary pool,
619         * pic16_popRegFromString): workaround to fix a problem with
620         allocating variables twice or never,
621         * (genGenPointerGet): using PRODL instead of FSR0H,
622         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
623         instead of FSR0H,
624         * (genAssign): take advantage of the _G.resDirect flag,
625         * (genCast): around line 11844, use mov2f instead of directly
626         MOVFF'ing between operands to account for literal values,
627         * src/pic16/genutils.c: some new debug functions for gpsim have been
628         added,
629         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
630         float with integer part only,
631         * src/pic16/main.c (_process_pragma): handle pragma udata access to
632         place variables in access bank
633         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
634         updated sources to reflect recent changes in gen.c
635
636 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
637
638         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
639         sources that searched for headers in installation path, now the
640         device/include/pic16 is used,
641         * src/pic16/glue.c (pic16glue),
642         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
643         .line directives if not in debug mode, this suppresses assembler's
644         warnings for ignored directives
645
646 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
647
648         * src/port.h: made reset_regparms prototype void parameter explicit.
649         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
650         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
651         * doc/sdccman.lyx: documented warning disabling and how to use
652           printf_large to make it print floats.
653         * device/include/stdbool.h: NEW
654         * device/lib/_atof.c,
655         * device/lib/_divuint.c,
656         * device/lib/_divulong.c,
657         * device/lib/expf.c,
658         * device/lib/printf_large.c,
659         * device/lib/sincosf.c,
660         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
661         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
662           a completely reentrant lib.
663
664 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
665
666         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
667         * device/include/pic16/stdio.h: fixed bug with colon
668
669 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
670
671         * device/include/pic16/stdio.h,
672         * device/include/pic16/stdlib.h,
673         * device/include/pic16/math.h: NEW
674         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
675         declared as _naked to reduce overhead
676         * device/lib/Makefile.in (target port-specific-objects-pic16):
677         changed * to *.* so to ignore the CVS directory,
678         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
679         stacked variables back in stack,
680         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
681         corruption
682
683 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
684
685         * .version: bumped version number to 2.4.5
686         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
687         * support/Util/SDCCerr.c (messages structure): added entry for
688         W_POSSBUG2
689
690         Large cumulative patch for pic16 port and libraries.
691         * device/include/pic16/sdcc-lib.h,
692         * device/include/pic16/stdarg.h,
693         * device/include/asm/pic16/features.h,
694         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
695         * device/include/pic16/float.h: changes reentrant keyword with
696         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
697         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
698         updated target build-libraries to include objects from gptr,
699         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
700         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
701         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
702         all function headings,
703         * src/SDCCmain.c: added global parameter userIncDirsSet,
704         * (parseCmdLine): when option -I is encountered add directory to
705         userIncDirsSet too,
706         * src/version.awk: added space between control and long,
707         * src/pic16/NOTES: added some notes for the port,
708         * src/pic16/gen.c: added prototype for mov2fp function,
709         * (fReturnpic16[]): properly named return value registers,
710         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
711         * (aopForSym): added code to handle symbols with onStack flag set,
712         symbols onStack are allocated PTRSIZE bytes,
713         * (aopFreeAsmop): handles special case where asmops are stack objects,
714         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
715         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
716         added argument lock to trace flaws in allocating temporary registers
717         when developing port,
718         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
719         * (pic16_popRegFromString): reenabled allocating a direct register
720         from string,
721         * (assignResultValue): various beautifications,
722         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
723         referenced function argument,
724         * (genIpush): reenabled to allow stacked arguments, handles only
725         ic->parmPush iCodes,
726         * (genCall, genPcall): major changes to allow for variable argument
727         functions, fixed a bug with falsely restoring stack pointer after
728         returning from call,
729         * (genFunction): pending code for critical function,
730         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
731         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
732         * (genNearPointerGet): fixed bug with indirect reading, was always
733         reading from INDF0
734         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
735         pointers,
736         * (genAddrOf): rewrote code to take address of a stacked function parameter
737         * (genCast): fixed casting to generic pointer type,
738         * src/pic16/gen.h: added AOP_STA,
739         * (struct asmop): added field stk,
740         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
741         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
742         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
743         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
744         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
745         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
746         generic pointers,
747         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
748         and library paths,
749         * (pic16_port structure): generic pointer size is set to 3,
750         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
751         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
752         compiler warning,
753         * src/pic16/ralloc.c (allocReg): prevent allocating register when
754         operand is an iTemp,
755
756 2004-09-24 Martin Helmling <mh AT octo-soft.de>
757
758         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
759         * debugger/mcs51/simi.c: addapt new syntax of s51
760
761 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
762
763         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
764         * src/pic16/pcode.c: commented out some calls to free() in order to
765         fix bug #989576,
766
767 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
768
769         * src/SDCCicode.h,
770         * src/SDCCicode.c (isiCodeInFunctionCall),
771         * src/avr/ralloc.c (selectSpil),
772         * src/pic/ralloc.c (selectSpil),
773         * src/pic16/ralloc.c (selectSpil),
774         * src/ds390/ralloc.c (selectSpil),
775         * src/hc08/ralloc.c (selectSpil),
776         * src/xa51/ralloc.c (selectSpil),
777         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
778         stack in the middle of a function call sequence (fixes bug #1020268)
779         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
780         costs associated with the minimum switch case.
781
782 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
783
784         * src/SDCC.lex: fixed bug #1030549
785
786 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
787
788         * src/SDCCcse.h (struct cseDef),
789         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
790         over a function call if the CSE is derived from a symbol whose
791         address has been taken (fixes bug #1029883)
792         * support/regression/tests/bug-1029883: a new regression test for
793         this bug
794
795 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
796
797         * src/hc08/gen.c (emitinline): fixed bug #1029778
798         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
799         to a cast object is no longer a syntax error ("fixes" bug #1030006,
800         and starts toward RFE #905167)
801
802 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
803
804         * src/pic16/gen.c (mov2f): New function to move an operand to
805         another without considering if it is a literal or a register,
806         * (pic16_sameRegs): don't check if they are both AOP_REG,
807         * (AccRsh): removed andmask=0 lines,
808         * (genLeftShift): duplicated to be improved in future versions,
809         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
810         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
811         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
812         * (pic16initMnemonics): added initialization for POC_INFSNZW,
813         * (insertBankSwitch): fixed inserting banksel directives algorithm
814         for instructions that follow a skip instruction, this fixes a report
815         for broken subtraction code generation,
816         * src/pic16/ralloc.c (deassignLRs): do not free register if current
817         iCode is a left op, just in case result and right share the same
818         registers
819
820 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
821
822         * src/hc08/main.c,
823         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
824         preservation of HX
825         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
826         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
827         on 2004-09-12; it was buggy
828
829 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
830
831         * src/SDCCsymt.h: removed RESULT_CHECK
832         * src/SDCCast.c,
833         * src/SDCCglue.c,
834         * src/SDCCval.c,
835         * src/pic/glue.c,
836         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
837
838 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
839
840         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
841         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
842         configuration values no more rejected by compiler, they are assigned
843         to configuration registers with a warning message instead,
844         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
845         the for-loop so last conf register is emitted too,
846         * (_pic16_initPaths): link library libsdcc.lib by default,
847         * (_hasNativeMulFor): modified test for multiplication according to
848         Raphael Neider's remarks. Integer multiplication is also done with
849         support functions,
850         * device/include/pic16/pic18fregs.h: corrected type error in while
851         testing and including 18f6720 header file
852
853 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
854
855         * src/pic16/device.h (pic16_options): removed field use_crt,
856         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
857         until an optimization to handle single bits is added,
858         * (pic16_loadFSR0): moved before genUnpackBits,
859         * (genAnd): some white lines removed,
860         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
861         leave_reset flags in pic16_options when using crt modules,
862
863 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
864
865         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
866           for bugs 898889 & 979599. Also used some safer print instructions.
867
868 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
869
870         * src/pic16/device.h (pic16_options_t): added field use_crt,
871         crt_name, no_crt,
872         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
873         catch a probable future bug,
874         * src/pic16/gen.c: aopIdx function commented out,
875         * (genAssign): commented out old code which used aopIdx,
876         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
877         code, added if conditionals to take into account the --use-crt
878         command line options,
879         * src/pic16/main.c (pic16_optionsTable): added new command line
880         options, --use-crt= and --no-crt,
881         * (_pic16_linkEdit): now the proper crt object is added in the
882         linker command line except than when --no-crt is specified,
883         * src/pic16/pcode.c,
884         * src/pic16/pcode.h: added some structures and functions for a new
885         optimization scheme to compansate for instruction overhead between
886         same iCodes, this scheme is currently under development and is not
887         working in any way,
888         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
889         to && operator,
890         * device/lib/pic16/startup/crt0i.c,
891         * device/lib/pic16/startup/crt0iz.c: added global char variable
892         __uflags to force the generation of an idata section
893
894 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
895
896         * doc/Makefile,
897         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
898         * doc/sdccman.lyx: updated sdcc version to 2.4.4
899
900 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
901
902         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
903         Frieder) and clarified the default code optimization mode
904
905 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
906
907         * src/SDCC.lex (doPragma, process_pragma),
908         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
909         "opt_code_size", and "opt_code_balanced"
910         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
911         regrouped options by category, added support for category headers
912         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
913         and "--opt-code-size"
914         * doc/sdccman.lyx: documented these new options and pragmas
915         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
916         preference into account
917
918 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
919
920         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
921           geniCodePreDec): Fixed bug 904237 by generating a warning
922         * src/SDCCerr.h,
923         * src/SDCCerr.c: added warning W_SIZEOF_VOID
924
925 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
926
927         * src/pic/device.c : When no max ram set validate full memory range.
928         * src/pic/pcode.c,
929         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
930
931 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
932
933         * device/lib/_gptrget.c,
934         * device/lib/_gptrput.c: updated comment
935         * device/lib/calloc.c,
936         * device/lib/free.c,
937         * device/lib/malloc.c,
938         * device/lib/realloc.c: added LGPL, made them reentrant-safe
939         * src/SDCCcse.c (cseBBlock),
940         * src/SDCCicode.c (printOperand, geniCodeArray),
941         * src/SDCCicode.h (struct operand): fixed bug 868103
942         * support/regression/tests/bug-868103.c: added
943         * src/SDCCast.c (searchLitOp),
944         * src/SDCCcse.h (struct cseDef),
945         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
946         * src/SDCCicode.h (struct operand),
947         * src/SDCCsymt.h (struct sym_link),
948         * src/avr/gen.c (hasInc),
949         * src/ds390/gen.c (hasInc),
950         * src/hc08/gen.c (genPlusIncr, hasInc),
951         * src/mcs51/gen.c (hasInc),
952         * src/pic16/glue.c (pic16_printIvalChar),
953         * src/pic16/ralloc.c (regWithIdx),
954         * src/xa51/gen.c (hasInc) : removed warnings
955         * src/SDCCast.c (createBlock): added comment ???
956         * src/hc08/ralloc.c: updated comments
957
958 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
959
960         * doc/sdccman.lyx: updated section on switch statements, added
961         section about semaphore locking
962         * doc/Makefile: added option -info for latex2html
963         * device/lib/_gptrget.c,
964         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
965
966 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
967
968         * src/pic/device.h,
969         * src/pic/device.c,
970         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
971          maxram is less than 0x100.
972
973 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
974
975         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
976
977 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
978
979         * src/port.h,
980         * src/mcs51/main.c,
981         * src/ds390/main.c,
982         * src/z80/main.c,
983         * src/hc08/main.c,
984         * src/pic/main.c,
985         * src/pic16/main.c,
986         * src/avr/main.c,
987         * src/xa51/main.c
988         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
989         a jump table is the best form for a switch statement, including
990         automatic insertion of missing cases to make the case range
991         continuous. Developed in collaboration with Frieder Ferlemann.
992
993 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
994
995         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
996         accumulator result if it needs sign extension
997
998 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
999
1000         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
1001
1002 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
1003
1004         * device/lib/gbz80/printf.c,
1005         * device/lib/z80/printf.c: removed define for NULL
1006
1007 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
1008
1009         * as/xa51/xa_link.c,
1010         * device/examples/ds390/ow390/ad26.c,
1011         * device/examples/ds390/ow390/cnt1d.c,
1012         * device/examples/ds390/ow390/counter.c,
1013         * device/examples/ds390/ow390/ds2480.h,
1014         * device/examples/ds390/ow390/ds2480ut.c,
1015         * device/examples/ds390/ow390/findtype.c,
1016         * device/examples/ds390/ow390/gethumd.c,
1017         * device/examples/ds390/ow390/owllu.c,
1018         * device/examples/ds390/ow390/ownetu.c,
1019         * device/examples/ds390/ow390/swt12.c,
1020         * device/examples/ds390/ow390/swtloop.c,
1021         * device/examples/ds390/ow390/temp.c,
1022         * device/examples/ds390/ow390/temp10.c,
1023         * device/examples/ds390/ow390/thermo21.c,
1024         * device/examples/ds390/ow390/tinilnk.c,
1025         * device/examples/ds390/ow390/tstfind.c,
1026         * device/examples/serialcomm/windows/serial.cpp,
1027         * device/examples/serialcomm/windows/test_serialcomm.cpp,
1028         * device/include/reg51.h: fixed line endings for cvs
1029
1030 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1031
1032         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
1033         packRegsForAccUse, packRegisters): new accumulator register
1034         packing algorithm
1035         * support/regression/ports/hc08/support.c (_putchar): suppress
1036         warning of unused variable
1037         * src/SDCCicode.c: added SWAP entry to codeTable
1038
1039 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
1040
1041         * device/lib/sprintf.c: forgot to add this file before previous commit
1042
1043 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
1044
1045         * src/pic16/gen.c (genPackBits): added operand right in function
1046         parameters, load result directly if p_type is POINTER (that is
1047         called by genNearPointerSet)
1048         * (genUnPackBits): added operand left in function parameters,
1049         * (genNearPointerGet, genNearPointerSet): prevent the loading of
1050         FSR0 if accessing bitfields,
1051
1052 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
1053
1054         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
1055           _print_format; updated printf, sprintf, vsprintf
1056         * device/include/asm/default/features.h: corrected comment/define
1057         * device/lib/Makefile.in: added sprintf.c
1058         * device/lib/libsdcc.lib: added sprintf module
1059         * device/lib/printf_large.c,
1060         * device/lib/vprintf.c,
1061         * device/lib/sprintf.c: totally refactored printf_large and vprintf
1062           into these 3 files
1063         * support/regression/Makefile: changed ALL_PORTS into a usefull default
1064         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
1065         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
1066           hc08 test
1067         * support/regression/tests/zeropad.c: define idata as data for hc08
1068
1069 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1070
1071         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
1072         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
1073         labels are referenced at least once (even if a reference is not found)
1074         * src/hc08/gen.c (emitcode): set isComment flag for comments
1075         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
1076         loads), rules 6a..6b (optimize jumps to return)
1077
1078 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1079
1080         * device/lib/acosf.c (acosf),
1081         * device/lib/asinf.c (asinf),
1082         * device/lib/atanf.c (atanf),
1083         * device/lib/ceilf.c (ceilf),
1084         * device/lib/cosf.c (cosf),
1085         * device/lib/coshf.c (coshf),
1086         * device/lib/cotf.c (cotf),
1087         * device/lib/fabsf.c (fabsf),
1088         * device/lib/floorf.c (floorf),
1089         * device/lib/log10f.c (log10f),
1090         * device/lib/logf.c (logf),
1091         * device/lib/sinf.c (sinf),
1092         * device/lib/sinhf.c (sinhf),
1093         * device/lib/sqrtf.c (sqrtf),
1094         * device/lib/tanf.c (tanf),
1095         * device/lib/tanhf.c (tanhf),
1096         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
1097         replaced all instances of "reentrant" in the library functions
1098         defined in math.h with this macro.
1099         * support/regression/tests/float_trans.c: reenabled test for hc08
1100
1101 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
1102
1103         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
1104         erroneously deleted
1105
1106 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1107
1108         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
1109         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
1110         multi-byte volatile operands are used
1111         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
1112         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
1113         initialization to area GSINIT0 so that it would always precede
1114         any static initializers in GSINIT
1115         * support/regression/tests/zeropad.c: fixed idata define for hc08
1116         * support/regression/tests/bug-927659.c,
1117         * support/regression/tests/float_trans.c: disabled tests for hc08
1118         pending missing library routines
1119         * .version: increased version number to 2.4.4 - hc08 port now passes
1120         regression tests
1121
1122
1123 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
1124
1125         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
1126         * Makefile.common.in,
1127         * as/Makefile,
1128         * as/hc08/Makefile.in,
1129         * as/mcs51/Makefile.in,
1130         * as/z80/Makefile.in,
1131         * debugger/mcs51/Makefile.in,
1132         * device/include/Makefile.in,
1133         * device/lib/Makefile.in,
1134         * doc/Makefile,
1135         * link/Makefile,
1136         * link/z80/Makefile.in,
1137         * packihx/Makefile.in,
1138         * sim/ucsim/main_in.mk,
1139         * sim/ucsim/avr.src/Makefile.in,
1140         * sim/ucsim/doc/Makefile.in,
1141         * sim/ucsim/gui.src/serio.src/Makefile.in,
1142         * sim/ucsim/hc08.src/Makefile.in,
1143         * sim/ucsim/s51.src/Makefile.in,
1144         * sim/ucsim/xa.src/Makefile.in,
1145         * sim/ucsim/z80.src/Makefile.in,
1146         * src/Makefile.in,
1147         * support/cpp2/Makefile.in,
1148         * support/librarian/Makefile,
1149         * support/makebin/Makefile: added DESTDIR to the install path proposed
1150         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
1151         * doc/sdccman.lyx: added DESTDIR documentation
1152
1153 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
1154
1155         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
1156         instruction for interrupt handlers, use fast returns when returning
1157         from high priority interrupts
1158
1159 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1160
1161         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
1162         code generation
1163         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
1164         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
1165         bugs, ported much of Bernhard's code from mcs51
1166         * src/mcs51/gen.c (genSend),
1167         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
1168         than one when calling a reentrant function
1169         * device/lib/_mullong.c: defined an alternate struct layout for big
1170         endian ports (hc08)
1171
1172 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1173
1174         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
1175         test
1176
1177 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1178
1179         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
1180         are sane and complete before asking the port its prefered parameter
1181         passing method (fixes bug #1017633)
1182         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
1183         and _ret3
1184
1185 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1186
1187         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
1188         problem in bitfields >= 8 bits.
1189
1190 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
1191
1192         * src/SDCCsymt.c: undid changes that were not meant to be committed
1193
1194 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
1195
1196         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
1197
1198 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
1199
1200         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
1201           copied and wrong bit got inverted
1202
1203 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1204
1205         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
1206         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
1207         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
1208         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
1209         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
1210         assignments to bitfields at known addresses
1211         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
1212         reads from bitfields at known addresses
1213         * src/hc08/ralloc.c (packRegisters),
1214         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
1215         genhc08Code): optimize pointer get values used as conditionals
1216         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
1217         and branch
1218
1219 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1220
1221         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
1222         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
1223         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
1224         as conditionals
1225
1226 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1227
1228         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
1229
1230 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1231
1232         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
1233         related problems
1234
1235 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
1236
1237         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
1238
1239 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1240
1241         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
1242         mcs51 port
1243
1244 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1245
1246         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
1247
1248 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1249
1250         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
1251         cases use more compact code.
1252
1253 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
1254
1255         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
1256
1257 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1258
1259         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
1260
1261 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1262
1263         * src/SDCCsymt.h,
1264         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
1265         parameter of changePointer() from symbol* to sym_link*
1266         * src/SDCCast.c (decorateType): call changePointer() for CAST op
1267         * src/SDCCsymt.c (compareType): void* type is castable to other
1268         pointers, but not necesarily an exact match.
1269         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
1270         is no longer blindly treated as an exact match.
1271         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
1272
1273 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
1274
1275         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
1276
1277 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
1278
1279         * src/pic/gen.c,
1280         * src/pic/pcode.c,
1281         * src/pic/ralloc.h,
1282         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
1283
1284 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
1285
1286         * src/pic/device.c,
1287         * src/pic/device.h,
1288         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
1289
1290 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1291
1292         * src/mcs51/gen.c (emitcode): fixed bug #992819
1293
1294 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
1295
1296         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
1297           there's no need to make it worse
1298
1299 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1300
1301         * src/mcs51/ralloc.c (deassignLR),
1302         * src/ds390/ralloc.c (deassignLR),
1303         * src/hc08/ralloc.c (deassignLR),
1304         * src/z80/ralloc.c (deassignLR),
1305         * src/pic/ralloc.c (deassignLR),
1306         * src/pic16/ralloc.c (deassignLR),
1307         * src/avr/ralloc.c (deassignLR),
1308         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
1309         rlivePoint): fixed another part of bug #971834
1310
1311 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1312
1313         * src/z80/main.c: enabled "critical" keyword
1314         * src/z80/mappings.i,
1315         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
1316         functions (fixes bug #979646)
1317         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
1318
1319 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1320
1321         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
1322           such as c:\mydir.
1323
1324 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
1325
1326         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
1327           doesn't disable too much optimizations
1328
1329 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
1330
1331         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
1332
1333 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
1334
1335         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
1336
1337 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
1338
1339         * src/pic/gen.c tidied up tabs
1340         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
1341         * src/pic/main.c tidied up tabs
1342         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
1343         * src/pic/pcoderegs.c tidied up tabs
1344         * src/pic/ralloc.c tidied up tabs
1345
1346 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
1347
1348         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
1349         to S_FIXED for pic16 port and when symbol is not in level 0,
1350         allocate for S_REGISTER storage class and pic16 port, too,
1351         * src/pic16/device.h: prototype for checkSym,
1352         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
1353         * (pic16_assignConfigWordValue): test the value and the mask to
1354         validate that the value is suitable for the configuration word,
1355         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
1356         collect extern declared symbols, don't emit symbol twice, check
1357         first if symbol is in publics set first,
1358         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
1359         * added command line '--fstack' which enables an experimental
1360         feature for stack access, too buggy to be used yet...
1361         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
1362         * (pic16_allocDirReg): when register has storage class S_REGISTER
1363         allocate in pic16_dynAccessRegs,
1364         * device/include/pic16/pic18f????.h: modified configuration word
1365         naming convention, words started as CONFIG0H but should be CONFIG1H
1366
1367 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1368
1369         * device/include/mcs51reg.h: fixed bug 970993
1370
1371 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
1372
1373         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
1374         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
1375         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
1376         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
1377         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
1378         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
1379           error/warning numbers,
1380           added function setWarningDisabled()
1381         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
1382         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
1383           _memcmp.c _memmove.c calloc.c realloc.c free.c
1384         * support/regression/tests/malloc.c: added tests for new functionality
1385         * support/regression/tests/zeropad.c: added tests for truncated initializers
1386           and initialized char arrays starting with '\x0'
1387         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
1388
1389 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
1390
1391         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
1392
1393 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1394
1395         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
1396         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
1397         peephole 177.e. Thanks to anonymous
1398
1399 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
1400
1401         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
1402         function isn't used in the source but referenced as a
1403         variable initializer then declare it as extern in .asm file
1404
1405 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
1406
1407         * .version: increased version number to 2.4.3
1408
1409         Adding version extension according to ChangeLog CVS revision
1410         * src/Makefile.in (target all): added dependency 'version.h'
1411         * (rule version.h): added rule to create version.h from ChangeLog,
1412         * (rule dep): added dependency version.h,
1413         * src/version.awk: AWK script to create version.h
1414         * src/SDCCdwarf2.c (dwWriteModule),
1415         * src/SDCCglue.c (initialComments),
1416         * src/SDCCmain.c (printVersionInfo): modified to write after
1417         version string the version extension number,
1418         * src/SDCCutil.c: included "version.h"
1419         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
1420         number,
1421         * src/SDCCutil.h: added prototype for getBuildNumber
1422
1423         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
1424         includeDirsSet, too,
1425         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
1426         const char [] is found in function prototype...
1427
1428         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
1429         moving to WREG with source is already in WREG,
1430         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
1431         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
1432         * (aopForSym): stack'ed symbols are partially supported, added
1433         if-clause to support symbols in FARSPACE,
1434         * (sameRegs): added test for AOP_ACC to see if registers are same,
1435         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
1436         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
1437         * (pic16_popRegFromString): will not allocate a new register if it
1438         doesn't find one by name, bug may have introduced...
1439         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
1440         * (genIpush): revived to use pic16 port's stack,
1441         * (genAddrOf): added incomplete case for stack'ed operand,
1442         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
1443         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
1444         can handle multibyte operands,
1445         * src/pic16/glue.c (pic16_printIval*): some debug info added,
1446         * (pic16initialComments): added message for MPLAB compatibility
1447         mode enabled,
1448         * src/pic16/main.h: prototype for pic16_mplab_comp,
1449         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
1450         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
1451         * (_pic16_linkEdit): NEW, handles link stage, transferred here
1452         because of increased complexity of procedure,
1453         * (_process_pragma): stack pragma changed to format 'stack pos len',
1454         emit symbol '_stack_end' to conform with gplink,
1455         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
1456         to search for register,
1457         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
1458         PO_GPR_REGISTER,
1459         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
1460         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
1461         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
1462         case for PO_GPR_REGISTER,
1463         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
1464         dies, the new era is ahead !...
1465         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
1466         pic16_dynInternalRegs,
1467         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
1468         * (pic16_allocDirReg): minor optimizations and bug fixes,
1469         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
1470
1471         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
1472         load stack and frame pointer with address of 'stack_end' symbol
1473
1474 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
1475
1476         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
1477         without source code but only variable initializers
1478
1479 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
1480
1481         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
1482         external are not declared as extern to reduce overhead while linking
1483
1484 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
1485
1486         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
1487
1488 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
1489
1490         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
1491           Yee Keat for the patch
1492         * src/SDCCast.c (decorateType): fixed bug #979599
1493         * src/ds390/gen.h: removed local fReturnSizeDS390
1494         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
1495         * src/ds390/gen.c (genAnd, genOr, genXor),
1496         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
1497
1498 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
1499
1500         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
1501         add relFilesSet to $3, manipulate $2 to handle linking of object
1502         files without source files in command line,
1503         * device/include/pic16 (all headers): added ID location macros,
1504         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
1505         entries for ID location bytes,
1506         * (pic16_assignIdByteValue): NEW,
1507         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
1508         added field dumpcalltree to pic16_options_t,
1509         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
1510         is used instead of pic16_Gstack_base_addr, check if (ifx) before
1511         emitting rFalseIfx label after check_carry label,
1512         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
1513         pic16_emitDIRegs), NEW
1514         * (pic16glue): dump .calltree file when option --calltree found,
1515         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
1516         * (_pic16_genAssemblerPreamble): emit ID locations after
1517         configuration registers,
1518         * (pic16_linkCmd): modifications of the link command,
1519         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
1520         * (pic16_pCodeInitRegisters): don't init stack registers,
1521         * (pic16_findPrevInstruction): fixed bug,
1522         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
1523         bug with immediate registers,
1524         * (buildCallTree): traces stack push and pop,
1525         * (pct2): dump also stack usage for each function,
1526         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
1527         * (pic16_allocDirReg): various modifications,
1528         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
1529         fixed to 1,
1530
1531 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
1532
1533         * src/pic16/pcode.c: removed buggy double colon
1534
1535 2004-07-01 Borut Razem <borut.razem AT siol.net>
1536
1537         * support/scripts/sdcc.nsi: added include/pic16 to setup
1538
1539 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
1540
1541         * device/lib/Makefile.in: fixed bug in target objects-pic16,
1542         * device/lib/pic16/Makefile: prefixed with dash (-) command under
1543         target 'clean',
1544         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
1545         specific command line arguments. Also added sample lkr script
1546         for placing a variable at a specific memory bank.
1547         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
1548         at a specific memory bank,
1549         * (pic16_dump_isection): fixed bug which caused string literals to
1550         be omitted when dumping idata section,
1551         * (pic16_groupRegistersInSection): added code to handle registers
1552         in specific memory banks,
1553         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
1554         public, all references are renamed too,
1555         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
1556         AOP_DPTR2,
1557         * (pic16_storeForReturn): added case to handle when dest is WREG,
1558         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
1559         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
1560         pic16_rel_udata, check to see if that register is marked as being
1561         a member of a specific memory bank,
1562         * (pic16_printIvalCharPtr): added code to add string literals either
1563         to code or the idata sections,
1564         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
1565         also accept the 'udata' pragma,
1566         * src/pic16/main.h: new structure types sectName and sectSym
1567         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
1568         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
1569         * (pic16_findPrevInstruction): fixed, it returned nothing,
1570         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
1571         instruction combinations,
1572         * (pic16_FixRegisterBanking): heavily reorganised,
1573         * (pic16_AnalyzeBanking): if generating banksel directives is
1574         disabled, then don't call FixRegisterBanking at all,
1575         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
1576         completely removed,
1577         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
1578
1579 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
1580
1581         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
1582         Phuah Yee Keat <yk.phuah AT nestac.com>
1583
1584 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
1585
1586         * src/pic16/glue.c (pic16createInterruptVect): function now emits
1587         correctly the IVT even if it is relocated to some other location
1588
1589 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
1590
1591         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
1592         * device/include/pic16/pic18f2220.h: NEW,
1593         * device/lib/pic16/libdev/pic18f2220.c: NEW,
1594         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
1595         * src/pic16/device.c (struct Pics16): added info for 18f2220,
1596         * src/pic16/device.h (struct pic16_options): added ivt_loc and
1597         nodefaultlibs, ivt_loc is the location of the interrupt vector
1598         table, and nodefaultlibs signs that default libraries should not be
1599         linked in link stage,
1600         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
1601         according to --ivt-loc argument,
1602         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
1603         when pragma stack is found,
1604
1605 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1606
1607         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
1608         256 (range check), 257 (do while), 258.a-f (bit banging
1609         f.e. on 3-wire SPI bus)
1610
1611 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1612
1613         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
1614         variables used exclusively within a loop
1615
1616 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
1617
1618         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
1619
1620 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1621
1622         * src/SDCClrange.c (computeClash): fixed bug #971834
1623
1624 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1625
1626         * src/mcs51/gen.c (genCmp): fixed bug #975903
1627         * src/hc08/gen.c (operandsEqu),
1628         * src/ds390/gen.c (operandsEqu),
1629         * src/z80/gen.c (operandsEqu),
1630         * src/pic/gen.c (operandsEqu),
1631         * src/pic16/gen.c (operandsEqu),
1632         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
1633         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
1634
1635 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1636
1637         * src/SDCCcse.c (cseBBlock): fixed bug #966963
1638
1639 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
1640
1641         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
1642         default case in switch statement,
1643         * glue.c (pic16_initPointer): expr is initialised via decoarteType
1644         to eliminate problem with initialisation of pointers, but problem
1645         still exists,
1646         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
1647         * (emitStaticSegment): removed various lines emitting debug info,
1648         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
1649         added processor registers for utilizing EEPROM,
1650         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
1651         configurable and set 8
1652
1653 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
1654
1655         * .version: increased version number to 2.4.2,
1656
1657         Cumulative patch for pic16 port
1658         * src/pic16/device.c: changed scheme to dump initial values for
1659         variables in idata segment, all print_idata* functions were removed,
1660         now the pic16_printIval* will be called,
1661         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
1662         * _pic16_printPointerType, pic16_printPointerType,
1663         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
1664         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
1665         NEW, similar to the respective functions in SDCCglue.c,
1666         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
1667         way, emitting hex bytes,
1668         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
1669
1670 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1671
1672         * src/avr/ralloc.c (serialRegAssign),
1673         * src/xa51/ralloc.c (serialRegAssign),
1674         * src/pic/ralloc.c (serialRegAssign),
1675         * src/pic16/ralloc.c (serialRegAssign),
1676         * src/hc08/ralloc.c (serialRegAssign),
1677         * src/z80/ralloc.c (serialRegAssign),
1678         * src/ds390/ralloc.c (serialRegAssign),
1679         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
1680
1681 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1682
1683         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
1684         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
1685
1686 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
1687
1688         Cumulative patch for pic16 port:
1689         * src/pic16/device.h (typedef PIC16_device) modified fields for
1690         defining microcontrollers,
1691         * src/pic16/device.c: added new info for all devices in Pics16 array,
1692         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
1693         to be optimised out by the pCode optimiser,
1694         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
1695         specially, bug reported by G.M. Gallant,
1696         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
1697         as force'd so that cannot be optimised out by pCode optimiser,
1698         * src/pic16/pcode.c,
1699         * src/pic16/pcodepeeph.c,
1700         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
1701         they are disabled by default, but can be enabled explicit with
1702         command argument --denable-peeps, for testing,
1703         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
1704         --pomit-ivt in COMPILE_FLAGS
1705
1706 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
1707
1708         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
1709           compilation on MSVC
1710
1711 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
1712
1713         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
1714
1715 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1716
1717         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
1718         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
1719
1720 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
1721
1722         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
1723         would only assign 0x300001 register.
1724
1725 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
1726
1727         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
1728         in COMPILE_FLAGS. Thanks to G. Gallant for report.
1729
1730 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1731
1732         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
1733         for ds80c400
1734         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
1735         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
1736         added peephole 254 (left shift), 255 (jump table)
1737
1738 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
1739
1740         * device/lib/Makefile.in: removed comment line with model-pic16,
1741         * (target port-specific-objects-pic16): the libraries and objects
1742         are copied to the build directory form the device/lib/pic16/bin
1743         directory
1744
1745         Cumulative patch concerning pic16 port:
1746         * library directory has been re-organized,
1747         * added support for PIC18F1220,
1748         * added headers and library sources for chips 18f1220,18f6520,
1749         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
1750
1751         * configuration registers setting has changed, now each supported
1752         device has a complete description of the registers it uses,
1753         * all initialisations are moved to idata sections, these section
1754         can be absolute or relocatable,
1755         * fixed initialisation of codespace variables,
1756         * fixed warning about PCLATU and gpsim,
1757         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
1758         * (genAssign): use table reads when assigning from variables in codespace,
1759         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
1760         char/int variables placed in codespace,
1761         * (pic16_emitConfigRegs): NEW, emits a list with configuration
1762         registers set in .asm file, no need for --pomit-config-words anymore,
1763         * (pic16glue): some 8051 legacy segments are commented out
1764         (to be removed completely),
1765         * added support for alternative assembler and linker with --asm=
1766         and --link= command line arguments,
1767         * peepholes are disabled automatically in the port, no need to
1768         specify on command line,
1769         * port supports natively char/int/long multiplication, but converts
1770         all divisions to support functions,
1771         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
1772         to the file set in variable $2,
1773         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
1774         strings in ASCII format and not in hex,
1775         * ralloc.c (serialRegAssign): added a triplet of conditional calls
1776         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
1777         allocate proper register if iCodes aren't temporary,
1778
1779 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
1780
1781         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
1782
1783 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
1784
1785         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
1786         is commented out
1787
1788 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1789
1790         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
1791         computed address is reused
1792         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
1793         multi-byte bitfields
1794
1795 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
1796
1797         * src/z80/gen.c: (genArrayInit): must check for pointers too
1798
1799 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
1800
1801         * support/regression/tests/zeropad.c: never meant to commit the
1802           nestedstruct test: removed, added check for GCC version
1803
1804 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
1805
1806         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
1807         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
1808         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
1809           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
1810           bugs 928906 and 954082 half-empty initializers
1811         * src/SDCCsymt.h,
1812         * src/SDCCsymt.c (getAllocSize): added for above fix
1813         * src/z80/gen.c (genArrayInit): fixed bug 741044
1814         * support/regression/tests/zeropad.c: added tests
1815
1816 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
1817
1818         * src/pic16/device.c (pic16_dump_section): corrected bug which
1819         caused some symbols of the libraries to be misplaced
1820
1821 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
1822
1823         * src/pic16/glue.c,
1824         * src/pic16/ralloc.h,
1825         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
1826         to fix conflict with pic port
1827
1828 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
1829
1830         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
1831         externs configuration variables,
1832         * src/pic16/ralloc.h,
1833         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
1834         prototype in header, commented out some debug messages
1835
1836 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
1837
1838         * src/pic16/glue.c,
1839         * src/pic16/main.c,
1840         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
1841         for gpasm COFF object generation. Thanks to D. Hawkins for
1842         his patch info
1843
1844 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1845
1846         * src/ds390/main.c,
1847         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
1848         Brock for spotting this)
1849         * src/ds390/gen.c (genEndFunction),
1850         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
1851         interrupt handler and critical. Disable push/pop optimizations when
1852         peephole optimizations disabled.
1853
1854 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
1855
1856         Updated pic16 library sources and headers.
1857         * device/lib/pic16/pic18f*/ ,
1858         * device/include/pic16/*.h: modified to handle structured SFR
1859         definitions
1860
1861 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
1862
1863         * src/port.h (PORT structure): added hook initPaths, now each
1864         port can declare its own default search paths,
1865         which can been seen with the --print-search-dirs option,
1866         see pic16 port for example,
1867         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
1868         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
1869         * (doPrintSearchDirs): NEW, replaces in a central manner the
1870         printing of search dirs which was split in set*Paths functions,
1871         * (main): added call to port->initPaths and doPrintSearchDirs,
1872         * src/avr/main.c,
1873         * src/ds390/main.c,
1874         * src/hc08/main.c,
1875         * src/izt/i186.c,
1876         * src/izt/tlcs900h.c,
1877         * src/mcs51/main.c,
1878         * src/pic/main.c,
1879         * src/pic16/main.c: modified port structures to reflect addition of
1880         initPaths hook,
1881
1882         * src/pic16/device.c (regCompare): registers are finally sorted by name,
1883         * (pic16_dump_section): for registers in same address reserve memory once,
1884         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
1885         to no_banksel,
1886         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
1887         result is greater in size than right or left,
1888         * (pic16_genUMult8X8_8): there are some cases where the result can
1889         be 16 bits size, so handle these,
1890         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
1891         * (pic16_outBitC): modified to emit pcodes,
1892         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
1893         or not,
1894         * (genDivOneByte): implemented algorithm to divide 8-bits,
1895         * (genCmp): uncommented goto, but issues still exist,
1896         * (genAnd): fixed a bug with variables >8bits,
1897         * (genPackBits): optimization added that uses BCF/BSF to change a
1898         single bit,
1899         * (genAssign): fixed bug when assigning floating point literals,
1900         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
1901         __sdcc_gsinit_startup label,
1902         * src/pic16/main.c (_pic16_init): removed search directory
1903         initialisations,
1904         * (_pic16_initPaths): NEW, used to initialise search directories,
1905         * (_hasNativeMulFor): support functions for all except char/int
1906         multiplication, and char division,
1907         * (PIC16_port struct): modified entry for native mul support,
1908         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
1909         no_banksel option,
1910         * (buildCallTree): call to register_usage is ifdef'ed out,
1911
1912 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1913
1914         * device/include/string.h: applied Stas Sergeev's patch to make this
1915         header file compatible with the preprocessor -Wundef option
1916         * src/SDCCmain.c (main): abort compilation if preprocessor reports
1917         failure (fixes bug #941458)
1918
1919 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1920
1921         * src/SDCCopt.c (killDeadCode): fixed bug #907733
1922         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
1923         that the variable, not the function, should be static
1924         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
1925         to be consistent with non-literal case
1926
1927 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1928
1929         * src/SDCCast.c (isConformingBody): fixed bug #949967
1930         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
1931         convilong): fixed bug #952086
1932
1933 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1934
1935         * src/SDCCmem.c (allocVariables): fixed bug #955321
1936
1937 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1938
1939         * src/hc08/main.c (_hc08_genAssemblerEnd),
1940         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
1941         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
1942         completely eliminated the use of a temporary file
1943         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
1944         when more than one file linked
1945         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
1946
1947 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1948
1949         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
1950         which fixes bug #543481
1951         * support/regression/tests/bug-751703.c: fixed comments left from a
1952         cut and paste error
1953         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
1954         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
1955         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
1956         scopes
1957         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
1958         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
1959         are now changed to underscores in moduleName
1960
1961 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1962
1963         * as/mcs51/lkmem.c: better fix for bug #954173
1964
1965 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1966         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1967
1968         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
1969         * device/include/c8051f000.h,
1970         * device/include/c8051f120.h,
1971         * device/include/c8051f300.h,
1972         * device/include/c8051f310.h,
1973         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
1974         PWM16) and detab'ed
1975
1976 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1977
1978         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
1979         and mailing lists, doc'ed --no-peep-comments, removed reference
1980         to knoppix (newest version has no LyX/LaTeX), other minor changes
1981         * src/SDCCglue.c (glue): save 2 bytes stack space with
1982         option --main-return. The ljmp could probably be avoided too
1983
1984 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1985
1986         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
1987
1988 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1989
1990         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
1991         * src/SDCCopt.c (isLocalWithoutDef),
1992         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
1993         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
1994         (credit to Maarten Brock for patch #949363, on which this is based)
1995         * support/regression/tests/bug-751703.c: some test cases of extern used
1996         within inner scopes.
1997
1998 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1999
2000         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
2001         SPEC_STRUCT
2002         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
2003         struct definitions
2004         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
2005         dwWriteLabel): fix to create valid debugger symbols even when
2006         the module name has non-alphanumeric symbols in it
2007         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
2008         when a variable's allocation has been optimized away
2009
2010
2011 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2012
2013         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
2014         * src/hc08/main.c,
2015         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
2016         * src/mcs51/main.c,
2017         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
2018         * src/ds390/main.c,
2019         * src/z80/gen.c (z80_emitDebuggerSymbol),
2020         * src/z80/main.c,
2021         * src/pic/gen.c (pic14_emitDebuggerSymbol),
2022         * src/pic/main.c,
2023         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
2024         * src/pic16/main.c,
2025         * src/avr/gen.c (avr_emitDebuggerSymbol),
2026         * src/avr/main.c,
2027         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
2028         * src/xa51/main.c,
2029         * src/SDCCdebug.c (emitDebuggerSymbol),
2030         * src/SDCCdebug.h,
2031         * src/port.h: added a debugger struct to the port struct. Added a
2032         callback for defining debugger symbols
2033
2034         * src/SDCCast.c (createLabel),
2035         * src/SDCC.y (labeled_statement): mark all compiler generated labels
2036         with isitmp = 1
2037         * src/SDCCicode.h,
2038         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
2039         iCode back to the ast for the function
2040
2041         * src/hc08/ralloc.c (hc08_assignRegisters),
2042         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
2043         unneeded fields from the regs struct.
2044         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
2045         pushReg() & pullReg() functions instead of emitcode()
2046
2047         * src/hc08/gen.c (genLabel, genhc08Code),
2048         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
2049
2050         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
2051         debugger hooks
2052
2053         * src/hc08/gen.c (genEndFunction, genhc08Code),
2054         * src/hc08/gen.h,
2055         * src/mcs51/gen.c (genEndFunction, gen51Code),
2056         * src/mcs51/gen.h,
2057         * src/ds390/gen.c (genEndFunction, gen390Code),
2058         * src/ds390/gen.h,
2059         * src/z80/gen.c (genEndFunction, genZ80Code),
2060         * src/z80/gen.h,
2061         * src/z80/z80.h,
2062         * src/pic/gen.c (genEndFunction, genpic14Code),
2063         * src/pic/gen.h,
2064         * src/pic16/gen.c (genEndFunction, genpic16Code),
2065         * src/pic16/gen.h,
2066         * src/avr/gen.c (genEndFunction, genAVRCode),
2067         * src/avr/gen.h,
2068         * src/xa51/gen.c (genEndFunction, genXA51Code),
2069         * src/xa51/gen.h,
2070         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
2071         specific code to cdbFile.c and out of the backend code generators
2072
2073         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
2074         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
2075         starting address is now 0
2076
2077         * as/hc08/asm.h,
2078         * as/hc08/m08pst.c,
2079         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
2080         assembler directive for DWARF support
2081         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
2082
2083         * src/src.dsp,
2084         * src/Makefile.in,
2085         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
2086
2087 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2088
2089         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
2090         and inappropriate peephole optimization in jump tables
2091
2092 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2093
2094         * as/hc08/m08pst.c,
2095         * src/SDCCglue.c: sdccopt works for the hc08 port now
2096
2097 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
2098
2099         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
2100
2101 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2102
2103         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
2104
2105 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2106
2107         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
2108         rules
2109         * src/SDCCmain.c,
2110         * src/SDCCglobl.h,
2111         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
2112         comments from the peephole optimizer replacement rules
2113         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
2114         symbols
2115         * src/SDCCcse.c (updateSpillLocation),
2116         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
2117         equivalents
2118         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
2119         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
2120         objects far pointers
2121
2122 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2123
2124         * src/SDCCsymt.h: a missing part of my last change
2125         * src/pic/ralloc.c (regTypeNum),
2126         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
2127
2128 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2129
2130         * src/SDCCicode.h,
2131         * src/SDCCicode.c (aggrToPtrDclType),
2132         * src/SDCCptropt.h,
2133         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
2134         ptrPseudoSymConvert),
2135         * src/pic/ralloc.c (regTypeNum),
2136         * src/pic16/ralloc.c (regTypeNum),
2137         * src/hc08/ralloc.c (regTypeNum),
2138         * src/ds390/ralloc.c (regTypeNum),
2139         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
2140         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
2141
2142 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2143
2144         * link/z80/lkmain.c (afile),
2145         * as/hc08/lkmain.c (afile),
2146         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
2147         prevent a pointer problem when a filename has no directory and
2148         no extension specified.
2149
2150 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2151
2152         * link/z80/lkmain.c (afile): allow periods in directory names
2153         * link/z80/lkmain.c (afile),
2154         * as/mcs51/lkmain.c (afile),
2155         * as/hc08/lkmain.c (afile): allow linker script file to have an
2156         extension other than ".lnk"
2157         * link/z80/lklex.c (getfid),
2158         * link/z80/lkmain.c (parse),
2159         * as/mcs51/lklex.c (getfid),
2160         * as/mcs51/lkmain.c (parse),
2161         * as/hc08/lklex.c (getfid),
2162         * as/hc08/lkmain.c (parse): Support comments in the linker script
2163         file on lines by themselves and after filenames
2164
2165 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2166
2167         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
2168
2169 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2170
2171         * src/z80/peeph-z80.def: removed some peephole rules that don't
2172         work with multibyte arithmetic (fixed bug #937126)
2173         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
2174         to registers and not global variables
2175         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
2176         geniCodePreInc, geniCodePostDec, geniCodePreDec,
2177         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
2178         checking for assignments not internally generated (fixed bug #931895)
2179         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
2180         structure member (fixed bug #930072)
2181
2182 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2183
2184         * src/SDCCmain.c (linkEdit),
2185         * src/hc08/main.c (_hc08_parseOptions),
2186         * as/hc08/Makefile.in,
2187         * as/hc08/aslink.h,
2188         * as/hc08/asm.h,
2189         * as/hc08/m08pst.c,
2190         * as/hc08/lkrloc.c (relr, rele),
2191         * as/hc08/lkarea.c (lnkarea)
2192         * as/hc08/lkmain.c (afile, parse),
2193         * as/hc08/lkelf.c: support for ELF output
2194         * as/hc08/lks19.c (s19),
2195         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
2196
2197 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2198
2199         * as/mcs51/lkihx.c: Fixed bug #899105.
2200
2201 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2202
2203         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
2204         .dsp files from Unix to DOS.
2205
2206 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2207
2208         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
2209         function pointers; we have been compliant for several months now.
2210         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
2211         change that was accidently commented out
2212         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
2213         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
2214         bug #922319
2215
2216 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2217
2218         * src/hc08/gen.c: output of all of the internal debugging information
2219         is now controlled by the D() macro; it is disabled by default
2220
2221 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2222
2223         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
2224         harder to keep the same registers during a CAST iCode
2225         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
2226         long via int can be done in a single cast, if the signedness is
2227         correct.
2228         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
2229         putchar() in tinibios.c in ds390's library
2230
2231 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
2232
2233         * src/SDCCast.c (decorateType): fixed bug #898889,
2234         cast result of a literal complement too
2235         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
2236         fixed check for bitfields
2237
2238 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
2239
2240         * src/SDCCicode.c (geniCodeLogic): made it static,
2241         (geniCodeLogicAndOr): added in order to fix bug #905492,
2242         (ast2iCode): fixed bug #905492
2243         * support/regression/tests/bug-905492.c: added
2244         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
2245         (processParms): fixed bug #927659: don't copy parms, this will clear
2246         decorated flag
2247         * support/regression/tests/bug-927659.c: added
2248
2249 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
2250
2251         * src/SDCCast.c (addCast): don't cast float to char
2252         * device/lib/libsdcc.lib: added _memmove
2253
2254 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
2255
2256         * device/lib/large/Makefile: fixed parallel execution by
2257         replacing `make` by `$(MAKE)`
2258
2259 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2260
2261         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
2262         offsets (fixes bug #923936)
2263
2264 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
2265
2266         * device/lib/small/Makefile: fixed parallel execution by
2267         replacing `make` by `$(MAKE)`
2268
2269 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
2270
2271         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
2272
2273 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
2274
2275         * src/pic/gen.c (genCpl): multi-byte complements were not working.
2276         * src/regression/Makefile: Regression test was not running.
2277
2278 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
2279
2280         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
2281         complement if possible
2282         * src/SDCCval.c (valComplement),
2283         * src/SDCCicode.c (operandOperation): fixed complement of literal
2284         * support/regression/tests/onebyte.c (testComplement): added
2285
2286 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
2287
2288         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
2289         return an optimized tree; actually replace actParm with the new tree
2290         * src/SDCCast.h: added some parantheses to remove side effects
2291         * support/regression/tests/bug-920866.c
2292
2293 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
2294         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
2295         Bit operands were not being handled properly in the pic14 port.
2296         (now src/regression/add.c passes again).
2297
2298 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2299
2300         * src/SDCC.y (labeled_statement): case and default no longer require
2301         a following statement (RFE #893037)
2302
2303 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2304
2305         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
2306         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
2307         disabled (fixes bug #916294)
2308         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
2309         "mov a,acc"; patch provided by Lenny Story
2310         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
2311
2312 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2313
2314         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
2315         functions
2316         * src/ds390/gen.c (genFunction, genEndFunction),
2317         * src/ds390/ralloc.c (ds390_assignRegisters),
2318         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
2319         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
2320         pushed if there are parameters passed on the stack. Also, a cleaner
2321         way to decide if r0/r1 should be pushed/popped. (Together they fix
2322         bug #918693)
2323
2324 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2325
2326         * doc/sdccman.lyx,
2327         * device/lib/mcs51/crtpagesfr.asm,
2328         * device/lib/mcs51/crtxinit.asm,
2329         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
2330         to avoid confusion with Si Lab's SFRPAGE register.
2331
2332 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2333
2334         * src/SDCCglue.c (emitMaps): allow public sfr variables
2335         * src/SDCCglue.c (initialComments): include compiler build date
2336         with compiler version and put the timestamp of the generated
2337         assembly file on a serperate line to be less confusing.
2338         * src/port.h: added genInitStartup hook
2339         * src/avr/main.c,
2340         * src/ds390/main.c,
2341         * src/hc08/main.c,
2342         * src/pic/main.c,
2343         * src/pic16/main.c,
2344         * src/xa51/main.c,
2345         * src/z80/main.c: genInitStartup initialize as NULL (default to
2346         historical behaviour)
2347         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
2348         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
2349         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
2350         library instead of hard coding it into the compiler.
2351         * support/regression/ports/mcs51-stack-auto/spec.mk,
2352         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
2353         * device/lib/mcs51/Makefile,
2354         * device/lib/small/Makefile,
2355         * device/lib/large/Makefile,
2356         * device/lib/mcs51/crtpagesfr.asm,
2357         * device/lib/mcs51/crtstart.asm,
2358         * device/lib/mcs51/crtxclear.asm,
2359         * device/lib/mcs51/crtxinit.asm,
2360         * device/lib/mcs51/crtclear.asm,
2361         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
2362         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
2363         and into user configurable files.
2364         * device/lib/clean.mk: clean mcs51 directory too
2365         * support/regression/tests/longlit.c: added static to T1 declaration
2366         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
2367         accesses in the initialization code
2368
2369 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2370
2371         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
2372         OSCTRIMVAL as noted in bug #916008
2373
2374 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2375
2376         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
2377         in loops with multiple exits (reported as incorrect registers
2378         used by Martin Helmling in Sdcc-user list)
2379
2380 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2381
2382         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
2383         made ds390 register extensions look less like error messages
2384
2385 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2386
2387         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
2388         reported by Adam Wozniak in Sdcc-user list
2389
2390 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
2391
2392         * src/SDCCast.c (decorateType): fixed with bug and promotion in
2393         arithmetic optimizations, added debug output
2394
2395 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
2396
2397         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
2398         * sdcc.spec: updated and split sdcc into 3 rpms
2399         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
2400         needed for literals of LEFT_OP and '+'
2401         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
2402         introduced RESULT_TYPE_NOPROM
2403         (geniCodeMultiply): fixed logic for decision if mul is optimized to
2404         left shift
2405         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
2406         limited promotion to int only for '*'
2407         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
2408
2409 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
2410
2411         * src/pic16/gen.c (genSkip),
2412         (genc16bit2lit), (gencjneshort): commented out
2413         (is_LitOp): new helper function, checks operand type
2414         (genCmpEq): rewritten
2415
2416 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
2417
2418         * support/regression/tests/bug-908454.c: added
2419
2420 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
2421
2422         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
2423         * src/SDCCicode.c (usualBinaryConversions): op needs int type
2424         (geniCodeCast): cosmetic, don't preserve bit storage class
2425         (geniCodeLeftShift): added promotion
2426         (geniCodeLogic): fixed regression
2427         * src/SDCCsymt.c (computeTypeOr): accept bits too
2428         (compareType): 2nd part of fix for bug #908454, needed for bitfields
2429
2430 2004-03-07  Borut Razem <borut.razem AT siol.net>
2431
2432         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
2433
2434 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
2435
2436         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
2437         version of pic16_genPackRegisters which does not check if ic is a
2438         CAST operator,
2439         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
2440         function cause string1.c regression test fails
2441
2442 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
2443
2444         * sim/ucsim/configure.in,
2445         * sim/ucsim/configure,
2446         * sim/ucsim/doc/Makefile.in: use docdir
2447         * src/SDCC.y: fixed sbit atrributes
2448         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
2449         * src/SDCCast.c (decorateType): |^& need special promotion handling
2450         * src/SDCCast.h,
2451         * src/SDCCsymt.h: moved definition of RESULT_TYPE
2452         * src/SDCCsymt.h (computeType),
2453         * src/SDCCicode.c: computeType() needs op
2454         * src/SDCCsymt.c (checkTypeSanity),
2455         * doc/sddman.lyx: "plain" bitfields are unsigned
2456         * src/SDCCsymt.c (computeTypeOr): added
2457         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
2458         |^& ops
2459         * src/SDCCval.c (val*): computeType() needs op
2460         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
2461         * support/regression/tests/onebyte.c: added tests for |^&
2462
2463 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
2464
2465         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
2466         for writing icode into asm output.
2467
2468 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
2469
2470         * src/pic16/device.c: added some debug lines enabled
2471         with macro DEBUG_CHECK,
2472         * src/pic16/genarith.c: more debug in genPlus,
2473         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
2474         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
2475         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
2476         * (aopForSym): onStack symbols are re-placed in data memspace,
2477         and onStack flag is cleared,
2478         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
2479         copy temporary pcodeop,
2480         * (genPcall): added warning for not updating PCLATU,
2481         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
2482         always true for pic16 port,
2483         * (genMultOneWord): NEW, supports integer multiplication,
2484         * (genMult): modified to call genMultOneWord,
2485         * (ifxForOp): added warning when return NULL,
2486         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
2487         flag is set before call to operandFromSymbol for implicit
2488         added structures,
2489         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
2490         options.intlong_rent are set by default,
2491         * (_hasNativeMulFor): modified to allow port generation of integer
2492         multiplication,
2493         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
2494         set regtype to REG_SFR for all registers, restricting seting the
2495         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
2496
2497 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2498
2499         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
2500         more than 500 times in the regression tests
2501
2502 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2503
2504         * support/Util/SDCCerr.h,
2505         * support/Util/SDCCerr.c,
2506         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
2507         enumerator_list),
2508         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
2509         for symbol conflicts.
2510         * support/valdiags/tests/enum.c,
2511         * support/valdiags/tests/tentdecl.c,
2512         * support/valdiags/tests/struct.c: expect possible error messages
2513         referring to original symbol definitions.
2514         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
2515         * src/SDCCsymt.h,
2516         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
2517
2518 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
2519
2520         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
2521
2522 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
2523
2524         * src/pic16/ralloc.c (newReg): fixed bug #908929
2525
2526 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2527
2528         * src/ds390/gen.c: added missing #include "main.h"
2529
2530 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
2531
2532         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
2533         checking if symbol is already in set,
2534         * src/pic16/device.h: prototype for checkAddSym,
2535         * src/pic16/gen.c: (_G): added entry interruptvector,
2536         * (assignResultValue): removed some commented out lines,
2537         * (genFunction): check for ISR via sym->type, absolute section for
2538         interrupt code is created via a new pBlock, the goto instruction is
2539         placed now correctly at the interrupt vector position, changed all
2540         references from ivec to _G.interruptvector,
2541         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
2542         is the interrupt is a high priority one, same for return from ISR,
2543         * src/pic16/glue.c: changed all calls of addSetHead for publics and
2544         externs to calls of checkAddSym,
2545         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
2546         pic16_pcode_verbose flag is set,
2547         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
2548         * src/pic16/pcoderegs.c: message about how many registers are saved
2549         will only be emitted if pic16_pcode_verbose flag is set,
2550
2551 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2552
2553         * src/ds390/ralloc.h,
2554         * src/ds390/ralloc.c (ds390_regWithIdx),
2555         * src/ds390/gen.c (emitcode),
2556         * src/ds390/main.h,
2557         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
2558         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
2559         ds390operandCompare, getRegsRead, getRegsWritten,
2560         initializeAsmLineNode): customized instruction size calculation for
2561         ds390, started basis for some register optimizations
2562         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
2563         corresponding assembly output
2564         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
2565         missing push/pop of r0/r1. Optimized push/pops
2566
2567 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2568
2569         * src/mcs51/main.c (instructionSize): fixed ACALL size
2570         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
2571
2572 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
2573
2574         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
2575         the sorting of rlist with NULL elements
2576         * (print_idataType, print_idata): NEW to create idata sections
2577         * src/pic16/device.h: idataSymSet new variable
2578         * src/pic16/gen.c (genFunction): fixed some bugs in string
2579         comparing, improved the absolute section creation for ISRs,
2580         added FSR0L/FSR0H in registers that are saved in an ISR,
2581         * (genInline): fixed the processing of inline snippets,
2582         now they undergo no process by the peephole optimizer
2583         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
2584         are placed in idataSymSet,
2585         * (pic16emitStaticSeg): extern symbols are added in externs,
2586         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
2587         switching when aboslute variables are placed in access bank memory
2588         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
2589         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
2590         commented out with #if,
2591         * (pic16_packRegisters): reintroduce the check for CAST because some
2592         symbols are not correctly handled,
2593         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
2594         pCodeInstruction instead of pCode,
2595         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
2596         pCodeAsmDir definition,
2597         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
2598         directive, then the argument directive is emitted without the leading
2599         tab, hack for inline labels which must be in the first column,
2600         * (compareLabel,pic16_findNextInstruction),
2601         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
2602         * (insertBankSwitch): modified for the new pCodeAsmDir,
2603
2604 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
2605         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
2606
2607         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
2608         instance,
2609         * (pushSide): commented out with #if,
2610         * (assignResultValue): fixed some typos in saving
2611         registers,
2612         * (genPcall): FIXED and sync'ed with genCall,
2613         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
2614         * (genNearPointerGet): fixed to handle some more cases,
2615         implementation scheme via table reads,
2616         * (genConstPointerGet): modified to access code memory correct,
2617         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
2618         and improved to handle some cases
2619         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
2620         instead of "RETLW" for init data
2621         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
2622         not IN_DIRSPACE, work around to reduce bank switching when aboslute
2623         variables are placed in access bank memory (<0x80 and >=0xf80),
2624         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
2625         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
2626         TBLWT_POSTDEC,TBLWT_PREINC
2627         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
2628         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
2629         directives
2630         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
2631         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
2632         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
2633         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
2634
2635 2004-02-29  Borut Razem <borut.razem AT siol.net>
2636
2637         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
2638         support/Util/findme.h, support/Util/system.h: enhance binary relative
2639         search for lib and include by using findProgramPath()
2640
2641 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2642
2643         * src/SDCCpeeph.h,
2644         * src/SDCCpeeph.c (pcDistance),
2645         * src/port.h,
2646         * src/mcs51/ralloc.h,
2647         * src/mcs51/ralloc.c (mcs51_regWithIdx),
2648         * src/mcs51/main.h,
2649         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
2650         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
2651         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
2652         size calculation port specific, started basis for some register
2653         optimizations
2654         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
2655         missing push/pop of r0/r1. Optimized push/pops
2656         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
2657         * device/lib/_modsint.c (_modsint),
2658         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
2659         and stack version so regression tests pass
2660
2661 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
2662
2663         * src/Makefile.in (dep): include SLIBOBJS in dependency check
2664         * src/SDCCast.c (decorateType): catch another small optimization
2665         with '?' operator
2666         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
2667         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
2668         modified to finally use computeType() all over SDCC,
2669         see Feature Request #877103
2670         * src/SDCCval.h: cosmetic
2671         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
2672         valCompare(); regression tested in muldiv.c
2673         * support/regression/tests/muldiv.c (testMod): mod sign follows
2674         dividend only
2675
2676 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
2677
2678         * src/SDCCast.c (decorateType): fixed bug #902362
2679         * doc/INSTALL.txt: fixed install instructions for win32
2680
2681 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
2682
2683         * device/include/Makefile.in (install): fixed by replacing spaces
2684         by tabs
2685         * doc/README.txt,
2686         * doc/INSTALL.txt: updated for release
2687         * doc/sdccman.lyx: added warning for --xstack being buggy
2688
2689 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
2690
2691         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
2692         to eliminate build warnings.
2693         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
2694
2695 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
2696            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
2697
2698         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
2699         removed -penable-stack, added comment for stack pragma, added
2700         warning for not initializing the stack/frame registers, removed
2701         comment at interrupts section
2702
2703         Stack is made permanent, there is no ability to disable stack usage.
2704         * src/pic16/device.h,
2705         * src/pic16/device.c: removed all references to USE_STACK macro,
2706         * src/pic16/device.c (pic16_dump_section): when no elements in
2707         rlist, free rlist before return,
2708         * (pic16_dump_int_registers): NEW, internal registers are a new set
2709         of general purpose registers reused by each function,
2710         * (checkAddReg): returns 1 if registers is added to set,
2711         * (pic16_groupRegistersInSection): when a registers is of type
2712         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
2713         * src/pic16/device.h: memRange and Assigned Memory are deleted,
2714         SRCASECMP macro is moved here from device.c
2715         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
2716         PO_PCLATU, PO_PRODL, PO_PRODH,
2717         * (pic16_pCodeOpType, genMinus,
2718         changed compares to "a" register, with AOP_ACC,
2719         * (pic16_genPlus): fixed some bugs and indented properly,
2720         * (pic16_addSign): changed size to size+offset in the MOVWF
2721         instruction,
2722         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
2723         multiply 8-bit operand by literal, result is 8-bit,
2724         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
2725         multiply 2 8-bit operand, result is 8-bit,
2726         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
2727         genUMult8X*_16,
2728         * src/pic16/gen.c: changed accUse to contain WREG only,
2729         * (pic16_emitcomment): renamed to pic16_emitpcomment,
2730         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
2731         true, do not use immediate addressing any more unless sym is a
2732         pointer in codespace,
2733         * (aopForRemat): do not use immediate addressing when symbol not in
2734         codespace and when symbol's address is requested,
2735         * (aopOp): for-loop in if(sym->accUse) is modified for the new
2736         accUse size (= 1),
2737         * (aopGet): added case for AOP_ACC and don't return "accumulator
2738         bug" but WREG instead,
2739         * (popGetTempReg): pushes contents of temporary register in stack,
2740         * (popReleaseTempReg): pops contents of temporary register from
2741         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
2742         * (pic16_popGet): separated case AOP_ACC to return register WREG
2743         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
2744         or PO_IMMEDIATE and initializes their instance/offset appropriately,
2745         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
2746         the use of immediate pointers to certain cases only.
2747
2748         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
2749         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
2750         * (assignResultValue, genCall, genRet): modified to use the new
2751         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
2752         genPcall is still broken,
2753         * (genFunction): added code to create 'A' type pBlocks when
2754         interrupt functions are generated, code not extensively tested yet,
2755         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
2756         * (genEndFunction): modified so ISRs pop stored registers from stack,
2757         * (genMultOneByte): cleanup,
2758         * (AccRsh): added flag andmask, to and result with appropriate mask,
2759         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
2760         * (genDataPointerGet): fixed and reenabled its use,
2761         * (genNearDataPointerGet): bugs fixed,
2762         * (genDataPointerSet): bugs fixed,
2763         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
2764         pic16_DumpSymbol, pic16_DumpOp,
2765         * src/pic16/genutils.h: function prototypes for the above functions,
2766         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
2767         pointers,
2768         * (pic16emitRegularMap): many many many improvements, but needs a
2769         major cleanup,
2770         * src/pic16/main.c: enable_stack in pic16_options is removed,
2771         * (_pic16_parseOptions): removed command line options -penable-stack,
2772         * (_process_pragma): emit stack symbol only when stack pragma is
2773         processed,
2774         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
2775         redirected to FSR0L/FSR0H pair,
2776         * (pic16_get_op, pic16_get_op2): modifications and improvements,
2777         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
2778         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
2779         for immediates,
2780         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
2781         * (dumpPicOptype): NEW,
2782         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
2783         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
2784         with movff instruction,
2785         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
2786         added pic16_int_regs, some packRegsFor* functions are commented out,
2787         because produce errors,
2788         * src/pic16/NOTES: minor modifications
2789
2790 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2791
2792         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
2793         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
2794         --pack-iram.
2795         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
2796         * as/mcs51/lkaomf51.c: fixed bug #895763
2797
2798 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
2799
2800         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
2801
2802 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2803
2804         * doc/sdccman.lyx: added details about the HC08 storage classes and
2805         interrupts, fixed the register usage info for z80 & gbz80
2806
2807 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
2808
2809         * doc/sdccman.lyx: added more pic16 port documentation
2810         * device/include/pic16/: added header pic18fregs.h
2811
2812 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
2813
2814         * doc/sdccman.lyx: added Vangelis' contribution
2815
2816 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2817
2818         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
2819         extend to the next CALL or PCALL, not just to the next CALL.
2820
2821 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
2822
2823         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
2824
2825 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2826
2827         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
2828         bug #895752 and a better fix for bug #716790
2829
2830 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2831
2832         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
2833
2834 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2835
2836         * doc/sdccman.lyx: minor changes, minor changed
2837
2838 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
2839
2840         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
2841         which can't handle SDCC_NEWONEBYTEOPS,
2842         (geniCodeMultiply): removed conversion from mult to shift for pic14
2843         and pic16
2844
2845 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2846
2847         * src/hc08/gen.h,
2848         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
2849         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
2850         thus fixing bug #895406
2851
2852 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
2853
2854         * device/lib/_modsint.c,
2855         * device/lib/_modslong.c: sign follows divisor only
2856         * src/hc08/gen.c (genMultOneByte): if result size is 1,
2857         signs or signedness can be ignored
2858         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
2859         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
2860         added optimization for IFX,
2861         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
2862         arguments;
2863         reenabled optimization for IFX, which was removed on 2004-01-11
2864         * src/SDCCast.h: added return type IFX
2865         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
2866         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
2867         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
2868         SDCC_OLDONEBYTEOPS selects the old behaviour
2869         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
2870         changed again and commented promotion rule
2871         * src/SDCCval.c (valDiv): promotion no longer necessary
2872         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
2873         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
2874         rewritten
2875         * support/regression/tests/onebyte.c: added
2876
2877 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
2878
2879         * gen.c (genInline): reverted to old code for assemnling inline
2880         code because of bug reported James Chadd
2881
2882 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
2883
2884         * ralloc.h: missing declarations from previous patch,
2885         seems that patch for ralloc.h was never applied, fixed
2886
2887 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
2888            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
2889
2890         * pcode.c,
2891         * pcode.h,
2892         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
2893         indirect addressing. Marked FSR0 as deprecated
2894         * gen.c (pointerCode): commented out, not needed now
2895         (pic16_popGet2p): new MOVFF helper function
2896         (genGenPointerGet),
2897         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
2898         (shiftRLong): removed duplicate debugging info
2899
2900 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2901
2902         * src/ds390/gen.c (genNearPointerGet),
2903         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
2904         optimization with bits, but not bitfields.
2905         * src/ds390/ralloc.c (packRegisters),
2906         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
2907
2908 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
2909
2910         * src/SDCCcse.c (algebraicOpts): copy operands before modification
2911
2912 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2913
2914         * src/SDCCsymt.h,
2915         * src/SDCCicode.c (operandFromSymbol),
2916         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
2917         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
2918         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
2919         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
2920         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
2921         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
2922         bug #892038
2923         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
2924         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
2925         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
2926         * src/SDCCsymt.c (newSymbol),
2927         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
2928         enumerator_list),
2929         * src/SDCCval.h,
2930         * src/SDCCval.c (newiList): fixed bug #885705
2931
2932 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2933
2934         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
2935         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
2936
2937 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2938
2939         * device/include/c8051f120.h,
2940         * device/include/c8051f300.h,
2941         * device/include/c8051f310.h: added/updated header files for Silicon
2942         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
2943         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
2944         in new section Submitting patches
2945
2946 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2947
2948         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
2949         genFarPointerGet, genCodePointerGet, genGenPointerGet,
2950         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
2951         genGenPointerSet),
2952         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
2953         genFarPointerGet, genCodePointerGet, genGenPointerGet,
2954         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
2955         genGenPointerSet),
2956         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
2957         genFarPointerGet, genCodePointerGet, genGenPointerGet,
2958         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
2959         genGenPointerSet),
2960         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
2961         genFarPointerGet, genCodePointerGet, genGenPointerGet,
2962         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
2963         genGenPointerSet): fixed bug #892400
2964         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
2965         to eliminate build warnings.
2966         * src/SDCCast.c (processParms),
2967         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
2968         fixed bug 751859
2969         * support/valdiag/valdiag.py: added GCC to the list of defines active
2970         when compiling with gcc
2971
2972 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2973
2974         * support/Util/SDCCerr.h,
2975         * support/Util/SDCCerr.c,
2976         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
2977         with an incomplete type (fixed bug #883734)
2978         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
2979
2980 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2981
2982         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
2983
2984 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2985
2986         * src/SDCCast.c (decorateType),
2987         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
2988         function pointer implementation
2989         * support/regression/tests/funptrs.c: added tests to verify both forms
2990         of function pointers work correctly. Added tests to verify parameters
2991         are passed in the correct order.
2992
2993 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
2994
2995         * device.c (regCompare): registers are sorted by ascending
2996         address and increasing size,
2997         * main.c (_pic16_finaliseOptions): removed the declaration
2998         of compiler macro MCU. Now a macro of the format pic18fxxxx
2999         will be defined from the command line
3000
3001 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
3002             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
3003
3004         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
3005         PCOP_RLCF was overwritten!
3006         * gen.c (genSkip): commented out calls to pic16_emitcode,
3007         * (genCmpEQ): fixed "long" compares, only high word did get compared,
3008         * (genlshTwo),
3009         * (genRRC): added debugging info,
3010         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
3011         overwritten while shifting,
3012         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
3013         overwritten while shifting,
3014         * (AccLsh),
3015         * (AccRsh),
3016         * (shiftLLeftOrResult),
3017         * (shiftRLeftOrResult),
3018         * (shiftRLong),
3019         * (shiftLLong): Implemented with pic16_emitpcode
3020         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
3021         * (genLeftShift): Fixed bug, operand for shift by variable always
3022         was "and"ed with 0x0f,
3023         * (genLeftShiftLiteral),
3024         * (genrshTwo),
3025         * (genRightShiftLiteral): added debugging info,
3026         * (genrshFour): added comment,
3027         * (genRightShift): determined signedness from operand "left"
3028         instead of "result"
3029
3030 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3031
3032         * src/SDCCicode.c (geniCodeParms),
3033         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
3034         function pointers, fixed function pointer bugs #861242 and #861896
3035
3036 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3037
3038         * device/include/c8051f000.h,
3039         * device/include/c8051f120.h,
3040         * device/include/c8051f300.h: added header files for Silicon
3041         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
3042
3043 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
3044
3045         * src/SDCCast.c (processParams): added new type flow and restructured
3046         (gatherAutoInit): added new type flow
3047         (addCast): cosmetic changes
3048         (getLeftResultType): added new type flow for array indices, patch
3049         provided by Stas, see FR #877103
3050         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
3051         array index patch by Stas
3052         * src/SDCCast.h: added prototype getResultTypeFromType()
3053         * src/SDCCval.h,
3054         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
3055         * src/pic/glue.c (pic14emitStaticSeg),
3056         * src/pic16/glue.c (pic16emitStaticSeg),
3057         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
3058         for initialization of symbols
3059         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
3060         * support/Util/SDCCerr.h:
3061         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
3062         * .version: bumped version number to 2.3.8
3063         * device/include/Makefile.in (install),
3064         * doc/Makefile (install): changed to 'rm `find ...`' construct to
3065         avoid warnings
3066
3067 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
3068
3069         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
3070         Slade Rich fixed an optimization bug
3071         * src/pic/pcodepeep.c,
3072         * src/pic/pcoderegs.c
3073         * doc/Makefile (install): added test for directory
3074
3075 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3076
3077         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
3078         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
3079         * src/pic/ralloc.c (getRegPtr, getRegGpr),
3080         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
3081         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
3082         * as/mcs51/asexpr.c (term),
3083         * as/hc08/asexpr.c (term): fixed bug #887146
3084
3085 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3086
3087         * src/z80/gen.c (genMult): handle single byte result product
3088         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
3089         DUMMY_READ_VOLATILE (fixed bug #886367)
3090
3091 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
3092
3093         * support/regression/tests/libmullong.c: fixed logic, on little endian
3094         hosts we ended without a mullong_wrapper()
3095
3096 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3097
3098         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
3099         virus/worm forged address usage.
3100
3101 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
3102
3103         Fixed promotion, it should be done on AST level:
3104         * src/SDCCast.c (addCast): added promotion to int
3105         (decorateType): updated call to upCast()
3106         * src/SDCCicode.c (geniCodeLeftShift): removed call to
3107         usualUnaryConversions()
3108
3109 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
3110
3111         * support/regression/tests/literalop.c (mulWrapper): Added a
3112         wrapper to remove integer overflow warnings.
3113
3114         * support/regression/tests/float_trans.c: Made work on host.
3115
3116         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
3117         location of sz80.
3118
3119         * support/regression/generate-cases.py (main): Changed from inline
3120         to a main method.
3121
3122         * doc/Makefile (install): Changed to depth first to get rid of
3123         missing directory install warning.
3124
3125         * as/Makefile (install-doc): Made work on Mac.
3126
3127 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
3128
3129         * src/SDCCast.c: added an additional type flow in decorateType() of
3130         opposite direction, see feature request #860006; it's enabled at runtime
3131         by setting the environment variable SDCC_NEWTYPEFLOW
3132         * src/SDCCast.h: changed prototype of decorateType()
3133         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
3134         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
3135         'char' to 'int' can be omitted, if both operands are 'unsigned char';
3136         see feature request #877103
3137         * src/SDCCval.c: updated call of decorateType()
3138         (valBitwise): fixed bug #882876
3139         (valMinus): added promotion
3140         (valLogicAndOr): result is unsigned
3141         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
3142         * src/SDCCsymt.c (computeType),
3143         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
3144         must not cause an unsigned operation
3145         * src/pic/glue (pic14emitRegularMap),
3146         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
3147
3148 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
3149
3150         * src/pic/pcode.c (PCodeID): commented out left over debug code
3151
3152 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
3153
3154         * support/valdiag/tests/overflow.c: added shift tests
3155         * src/pic/device.c,
3156         * src/pic/gen.c,
3157         * src/pic/gen.h,
3158         * src/pic/glue.c,
3159         * src/pic/main.c,
3160         * src/pic/pcode.c,
3161         * src/pic/pcode.h,
3162         * src/pic/pcodepeep.c,
3163         * src/pic/pcoderegs.c,
3164         * src/pic/ralloc.c,
3165         * src/pic/ralloc.h: applied patch from Slade Rich;
3166         added support for multiple code pages and multiple RAM banks on the
3167         PIC 14 port. The ASM files now no longer simply assume all the
3168         code / RAM are in the same page / bank. This means the linker can
3169         safely allocate code/RAM of separate ASM files to different pages/banks.
3170         * doc/sdccman.lyx: added Slade's tips
3171         * src/mcs51/peeph.def: fixed bug #880768
3172
3173 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3174
3175         * src/hc08/ralloc.c (rematStr): fixed bug #879282
3176         * src/SDCCast.c (decorateType): fixed bug #880197
3177
3178 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
3179
3180         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
3181         getopt.h.
3182
3183         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
3184         strtof is not part of C89 and isn't included with Mac OS X.
3185
3186 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3187
3188         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
3189         shiftL2Left2Result): fixed bug #879326
3190         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
3191         (genMultOneByte): fixed bug in signed vs unsigned multiplication
3192         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
3193         address fetch for clr instruction
3194         * device/lib/hc08/_mulint.c: created optimized assembly version
3195         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
3196
3197 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
3198
3199         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
3200         proposed in FR #877103
3201
3202 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
3203
3204         * src/SDCCval.c (cheapestVal): added missing checks
3205         * src/SDCCicode.c (usualBinaryConversions): fixed condition
3206         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
3207
3208 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
3209
3210         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
3211         equal operands
3212
3213 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
3214
3215         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
3216         loaded with the linker search paths (-L arguments) and the libraries
3217         to be linked with the current source (-l arguments). Changes
3218         currently will affect only the pic16 port.
3219         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
3220         include path the port specific paths and port specific libraries,
3221         * gplink command now contains the $3 argument,
3222         * src/pic16/device.h,
3223         * src/pic16/device.c,: structure PIC_device is made public and
3224         renamed to PIC16_device, the same for variable Pics which is renamed
3225         to Pics16. Updated all references to them.
3226         * src/pic16/glue.c (pic16glue): corrected bug with code
3227         initialization which bypassed the variable initializations block.
3228
3229         * device/lib/pic16/Makefile.rules: removed --penable-stack from
3230         COMPILE_FLAGS and added the --nostdinc option
3231
3232 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3233
3234         * device/include/mc68hc908jb8.h: Register defs for another member
3235         of the hc08 family. Contributed by Bjorn Bringert - thanks!
3236
3237 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
3238
3239         Documenting changes from previous commits.
3240         * configure.in (version 1.56),
3241         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
3242         when generating output files to configure the pic16 library,
3243         but now I've commented it out, since gputils aren't installed in the
3244         SF compile farm, so library won't compile
3245
3246         * device/lib/Makefile.in (version 1.56): initially I've added in
3247         target 'all' the prerequestive 'model-pic16' so it compiled the
3248         pic16 library, but now I've commented it out for the same reasons
3249         above,
3250         * added targets 'model-pic16' and 'objects-pic16' to compile the
3251         library
3252         * added target 'port-specific-objects-pic16' to handle the
3253         generated libraries and copy them into the build/ directory
3254         * added target 'clean-intermediate-pic16' to clean intermediate
3255         files into pic16 directory
3256         * in target 'installdirs' added line to create directory pic16 in
3257         the installation path
3258
3259         * device/include/Makefile.in (version 1.11): in target 'install'
3260         added lines to copy all header files to installation path,
3261         * in target 'installdirs' added line create directory for pic16
3262         headers in the installation path
3263
3264 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
3265
3266         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
3267          a function call
3268
3269 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
3270
3271         * configure,
3272         * device/lib/configure.in,
3273         * device/lib/configure: fixed for autoconf 2.57
3274
3275 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3276
3277         * src/z80/main.c (_parseOptions): fixed the portmode= command line
3278         option so that it actually works. Made it specific to the z80, since
3279         the gbz80 doesn't have these kinds of I/O ports.
3280
3281 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3282
3283         * device/include/z180.h,
3284         * device/lib/_memcpy.c,
3285         * device/lib/_memmove.c,
3286         * device/lib/_mulint.c,
3287         * device/lib/ser_ir.c,
3288         * device/lib/ser_ir_cts_rts.c,
3289         * device/lib/_strcmp.c,
3290         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
3291         * src/z80/main.c (_process_pragma): add support for pragmas bank and
3292         portmode; added deprecation warning for bank= and protmode= forms.
3293         Also, guard against buffer overflow.
3294         * src/z80/gen.c (aopGet): generate better code for sfr banked read
3295
3296 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3297
3298         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
3299         changed interrupt vector table generation to only emit declared vectors.
3300         * device/include/Makefile.in: added missing backslash
3301         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
3302
3303 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
3304
3305         Mainly changes to support compilation of the device libraries
3306         * src/pic16/device.c: stack is allocated via symbol and not
3307         via literal number. The symbol is placed in the corresponding
3308         position of the data ram
3309         * (pic16_dump_section): relocatable and absolute uninitialized
3310         data are now emitted in sorted order to reduce section naming,
3311         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
3312         weren't marked as being in the access bank,
3313
3314 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
3315
3316         Added portion of GNU PIC Library under the directory
3317         device/include/pic16 and device/lib/pic16. These files
3318         contain the declarations of SFRs for the PIC18Fxx2 devices.
3319         The directory is initialized via configure from toplevel.
3320
3321 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
3322
3323         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
3324         the spilllocations to be compared correctly
3325
3326 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
3327
3328         * src/SDCCast.c (decorateType): fixed bug introduced today
3329
3330 2004-01-12  Borut Razem <borut.razem AT siol.net>
3331
3332         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
3333         doc/sdccman.lyx: upper case pragmas are deprecated
3334
3335 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
3336
3337         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
3338         in simpler and even better code
3339
3340 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
3341
3342         * src/SDCCicode.c (operandOperation): fixed bug #874819
3343         * src/SDCCast.c (decorateType): fixed
3344         char foo (unsigned long ul) { return ul > 0; }
3345
3346 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3347
3348         * doc/sdccman.lyx: Moved and added some sections, small changes
3349         all over. Telling LaTeX to be less strict with word spacing
3350         to better keep the right margin. Changed some notes about
3351         maintainance of the ports in section 3.2.1 - is it OK like this?
3352
3353 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3354
3355         SDCC source changes:
3356         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
3357         convilong): modified to inform the pic16 port that builtin functions
3358         are external
3359
3360         PIC16 PORT specific changes:
3361         * src/pic16/device.c pic16_dump_equates() added,
3362         processor registers declared internally by the port are emitted in
3363         the translation as equates,
3364         * src/pic16/gen.c: inline code is passed unprocessed to the
3365         translation,
3366         * (pic16_popGetLit2): fnuction modified to take second operand as
3367         pCodeOp pointer and not as literal,
3368         * (popRegFromIdx): prefixed with pic16_,
3369         * (pic16_popCombine2): modified to receive already allocated pCode
3370         operands,
3371         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
3372         * (genFunction): initializes local stack frame and pushes on stack
3373         all the registers used by this function,
3374         * (genEndFunction): restores all registers from stack and restores
3375         stack frame,
3376         * src/pic16/glue.c (pic16emitRegularMap): various changes and
3377         improvements,
3378         * (pic16glue): changed the program startup sequence,
3379         * added new dbName code 'A' for functions placed in absolute section
3380         * src/pic16/main.c: added function attribute _naked,
3381         * added pragma 'code' to place a fnuction at an absolute address,
3382         * added command line arguments --debug-ralloc and --pcode-verbose,
3383         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
3384         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
3385         * (pic16_newpCodeOpLit2): modified to take the second operand as
3386         pCodeOp pointer,
3387         * (pic16_printpBlock): modified to emit each function in a separate
3388         section,
3389         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
3390         UPPER for immediate operands,
3391         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
3392         instruction,
3393         * src/pic16/peeph.def: all peepholes with movff are commented out,
3394         because there is a problem in the pcode peep optimizer,
3395         * src/pic16/ralloc.c: the register allocator can now reuse local
3396         function symbols for another function. This saves register usage.
3397         * src/pic16/ralloc.h: added flag isLocal in structure regs,
3398
3399         Added file src/pic16/NOTES with information about program writing on
3400         the current port version.
3401
3402 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3403
3404         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
3405         and peephole 252 (array access)
3406
3407 2004-01-09  Borut Razem <borut.razem AT siol.net>
3408
3409         * src/SDCCmain.c : fixed #872250: -l command line defined library
3410           files are scanned before standard library files
3411
3412 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3413
3414         * src/SDCCast.c (decorateType): fixed bug #874046
3415
3416 2004-01-09  Borut Razem <borut.razem AT siol.net>
3417
3418         * support/scripts/sdcc.nsi: remove previous installation
3419
3420 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3421
3422         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
3423         bytes for last interrupt vector (mcs51)
3424         * sdcc.spec: fixed typo
3425
3426 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3427
3428         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
3429         gen51Code): more efficient parameter receive for --model-large
3430         ("bug" #845294)
3431
3432 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3433
3434         * src/ds390/main.c,
3435         * src/z80/main.c: added missed needLinkerScript flags (more than
3436         one port structure defined in these file)
3437         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
3438         bug #795325
3439
3440 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
3441
3442         * src/SDCCmain.c: removed various references to DEFAULT_PORT
3443         * src/port.h: added flag needLinkerScript in port->linker
3444         structure to inform whether to create a .lnk file or not,
3445         * src/avr/main.c,
3446         * src/ds390/main.c,
3447         * src/hc08/main.c,
3448         * src/mcs51/main.c,
3449         * src/pic/main.c,
3450         * src/pic16/main.c,
3451         * src/xa51/main.c,
3452         * src/z80/main.c: changed appropriately to configure
3453         needLinkerScript flag
3454         * src/pic/gen.c,
3455         * src/pic16/gen.c (genAddrOf): fixed bug #863624
3456         * src/pic/glue.c: added variable udata_section_name to
3457         override default uninitialized data segment definition for
3458         devices only with SHAREBANK memory (reported from Erik Epetrich)
3459         * (pic14emitOverlay): modified to emit a commented overlay segment
3460         directive when no overlay data exist
3461         * (picglue): modified to emit uninitialized data segment
3462         according to udata_section_name
3463         * src/pic/main.c (_pic14_parseOptions): added command line
3464         options --udata-section-name=[name] to override default
3465         udata definition name
3466         * modified _linkCmd and _asmCmd to include compiler passed
3467         arguments via -W option
3468         * src/pic16/main.c: added $l in _asmCmd, changed extension for
3469         object file from '.rel' to '.o' in port->linker structure,
3470         changed size of fptr from 2 to 3 in port structure
3471
3472 2004-01-07  Borut Razem <borut.razem AT siol.net>
3473
3474         * support/scripts/sdcc.nsi: update PATH
3475         * support/scripts/sdcc.ico: craeted
3476
3477 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
3478
3479         * device/include/Makefile.in: fix install
3480         * doc/Makefile: fix install
3481
3482 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3483
3484         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
3485         in bug #860505
3486         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
3487         how the function variable allocation summary is displayed; also
3488         include information about variables allocated to the overlay
3489         segment
3490
3491 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3492
3493         * as/mcs51/lkmain.c: Help about -Y option
3494         * as/mcs51/lkarea.c: Fixed gcc warnings
3495
3496 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
3497
3498         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
3499         fixed warning
3500         * support/valdiag/tests/overflow.c: added
3501         * src/SDCCast.c (decorateType),
3502         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
3503         LEFT_OP (left shift)
3504
3505 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3506
3507         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
3508         (default behaviour).
3509
3510 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3511
3512         A python script to validate compiler diagnostic messages. It can be
3513         used to verify that sdcc complains about bad c source code and
3514         gives a good location of the error.
3515         * support/valdiag/Makefile,
3516         * support/valdiag/valdiag.py,
3517         * support/valdiag/tests/*
3518
3519 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3520
3521         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
3522         * src/SDCCsymt.c (newEnumType),
3523         * src/SDCCsymt.h
3524         * support/Util/SDCCerr.c,
3525         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
3526         enum related bugs.
3527         * support/regression/tests/enum.c: added test for enum values that
3528         require at least 2 bytes of storage.
3529
3530 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
3531
3532         * src/common.h: added ifndef/define/endif macros
3533         around the header file.
3534         Bug reported from Jesus Calvino-Fraga
3535
3536 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
3537
3538         * sdcc.spec: updated
3539         * device/include/Makefile.in: don't install CVS directories
3540         * device/lib/Makefile.in: added removal of CVS directories after install
3541         * doc/Makefile: fixed install, added local_icons
3542         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
3543         * src/mcs51/gen.c (genRightShift): fixed bug #870788
3544         * src/ds390/gen.c (genRightShift): fixed bug #870788
3545         * src/SDCCast.c (decorateType): fixed bug #870781
3546
3547 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
3548
3549         PIC16 port related changes:
3550         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
3551         added variable stackPos,
3552
3553         * gen.c: genCall, assignResultValue: added support for
3554         pushing/retrieving function parameters to/from stack,
3555         genFunction,genEndFunction: setup stack frame for the
3556         generated function,
3557         genAddrOf: will be changed according to bug 863624
3558
3559         * added files genutils.c and genutils.h which contain gen*
3560         debugged and optimised functions extracted from gen.c
3561
3562         * glue.c: added variable 'externs' which holds extern symbols,
3563         pic16emitRegularMap: is modified to properly handle relocatable
3564          symbols under the new scheme,
3565         pic16createInterruptVect: is modified
3566         pic16printPublics: is modified to emit 'global' assembler directives,
3567         added pic16_printExterns to print extern symbols,
3568         pic16glue: initializes stack/frame pointer in the beginning of
3569         the assembly output. Temporary hack, will be corrected later,
3570         because gplink yet does not support stack and SDCC does not
3571         yet support a type of crt0.o object to create the final binary.
3572
3573         * Removed many lines that contain 8051 legacy code.
3574         * The code is finally placed under a 'code' directive.
3575         * Added port specific options.
3576
3577         * _process_pragma: simplified since now we do not need *special*
3578         include file to define SFR registers. But a separate header
3579         will be needed. This will be developed later.
3580         * _pic16_parseOptions: added, parses port specific options:
3581         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
3582         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
3583         --preplace-udata-with=
3584
3585         * _pic16_setDefaultOptions: modified to initialize section names,
3586         but hack is temporarly out of order since it needs improvement.
3587         * _pic16_genAssemblerPreamble: configuration words are emitted by
3588         their address instead of their name. This part is incomplete and
3589         supports only the 18Fxx2 devices. Other devices will emit an error
3590         during assembly since they do not contain the same set of config
3591         registers
3592         * _pic16_genIVT: is modified,
3593
3594         * pcode.c: added definitions for some hardware registers that are needed
3595         for stack support
3596         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
3597         All PCI entries are updated. Now LFSR is supported.
3598         * Removed pic16_pciTRIS is mentioned by mdubuc in source
3599         * added pic16_newpCodeOpLit2 to support instructions with
3600         two literal arguments
3601         * pic16_pCode2str: corrected code that emits assembler instructions
3602         with two literal operands and those that have an access bit modifier
3603         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
3604         this fixes a bug which caused some labels to be lost, when an
3605         assembler directive was added, i.e. banksel,
3606         * pic16_FixRegisterBanking: improved logic that causes the insertion
3607         of bank switching,
3608         * InlineFunction: functions that are called once, are not any more
3609         inlined. This can be a port option in the future,
3610
3611         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
3612
3613         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
3614         hold the corresponding uninitialized symbols,
3615         * pic16_allocProcessorRegister: registers have explicit marked the
3616         accessBank field,
3617         * pic16_allocInternalRegister: registers are explicit marked as
3618         not used,
3619         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
3620         processing list, so bit registers were lost,
3621         *
3622
3623         * ralloc.h: added field 'accessBank' and original symbol operand
3624         in register definition,
3625         * removed the field isMapped from register definition,
3626
3627         ** Several functions have been removed from various sources:
3628         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
3629         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
3630         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
3631         pic16_assignRelocatableRegisters
3632
3633         ** others have been introduced:
3634         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
3635         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
3636
3637 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
3638
3639         * support/scripts/inc2h.pl: changed definition of BIT_AT
3640         to emit 'sbit at' instead of 'bit at'. This was a request.
3641
3642         PIC16 port related preliminary changes:
3643         * gen.c: prefixed function popRegFromString with
3644         pic16_ and all references to it corrected
3645         * pcode.c: all pic16_pc_* hardware registers prefixed
3646         with underscore (_),
3647         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
3648         * ralloc.c: newReg(): when register is REG_SFR then
3649         set address to rIdx,
3650         pic16_allocProcessorRegister(): marks register wasUsed=0
3651         pic16_writeUsedRegs(): added a call to assign processor
3652         registers via pic16_assignFixedRegisters
3653
3654 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3655
3656         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
3657         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
3658         variables in unused register banks.  Also the SSEG is placed
3659         wherever there is enough space for it, and IDATA can be anywhere
3660         in internal RAM.  For now compile using -Wl-Y[stack_size].
3661         The mem file is different for this option as well, since it
3662         makes no sense of talking about DSEG lenght.
3663
3664 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
3665
3666         * src/SDCClrange.c: fixed bug 869095 that caused segfault
3667         in certain cases, e.g. when ROM assignment, patch provided
3668         from Albert den Haan.
3669
3670 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
3671
3672         Many signedness and type propagation fixes:
3673         * src/SDCCicode.c: made geniCodeCast() static
3674         replaced SPEC_ by IS_ (cosmetic)
3675         (operandOperation): fixed div and mod operation
3676         (usualBinaryConversions): added support for promotion of char
3677         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
3678         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
3679         (geniCodeAdd): an array index will stay unsigned, even if promoted
3680         from char to int
3681         (geniCodeArray): ditto
3682         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
3683         * src/SDCCsymt.c (computeType): added more support for char;
3684         promotion of char is selectable by promoteCharToInt, fixed signedness
3685         for all cases
3686         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
3687         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
3688         * src/SDCCval (val*): replaced signedness calculation by
3689         computeType()
3690         rearranged if-branches (cosmetic)
3691         (valShift): added warning W_SHIFT_CHANGED
3692         (valCompare): fixed problem with different types
3693         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
3694         * support/regression/tests/literalop.c: added many cases
3695         * support/regression/tests/ast_constant_folding.c: changed finally to
3696         'unsigned int'
3697         * .version: new year, new version: 2.3.7
3698         * src/SDCCmain.c (main): applied patch #866468
3699         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
3700         provided by Scott Bronson
3701         * doc/sdccman.lyx: updated documentation for sdcdb
3702         updated and added chapter tips
3703
3704 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3705
3706         * src/SDCCsymt.h: missing from yesterday's commits
3707
3708 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3709
3710         * src/SDCC.y (struct_or_union_specifier),
3711         * support/Util/SDCCerr.c,
3712         * support/Util/SDCCerr.h: verify that struct & union tags are used
3713         as declared.
3714
3715 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3716
3717         * src/SDCCglobl.h: missing from yesterday's commits
3718
3719 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3720
3721         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
3722         sft_attributes, struct_declaration, parameter_declaration,
3723         type_name, start_block, declaration_list),
3724         * src/SDCC.lex (check_type): support redefinition of typedef names
3725
3726 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3727
3728         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
3729         aligned xdata arrays. Erik helped me with the if clause.
3730
3731 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3732
3733         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
3734         warning
3735
3736 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3737
3738         * src/SDCCast.h,
3739         * src/SDCCast.c (newAst_),
3740         * src/SDCCicode.h,
3741         * src/SDCCicode.c (ast2iCode, newiCode),
3742         * src/SDCCglobl.h,
3743         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
3744         expr, statement, expression_statement, selection_statement,
3745         iteration_statement, expr_opt, jump_statement): foundation for tracking
3746         sequence points
3747         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
3748         point code too)
3749
3750 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3751
3752         * support/Util/SDCCerr.c,
3753         * src/SDCCast.h,
3754         * src/SDCCast.c (createCase, createDefault, decorateType),
3755         * src/SDCClabel.c (labelUnreach),
3756         * src/SDCC.y (labeled_statement, jump_statement): More improvements
3757         to error messages.
3758         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
3759         (with thanks to Stas Sergeev)
3760         * device/include/time.h,
3761         * device/lib/time.c (CheckTime): suppress unreachable code warning
3762
3763 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3764
3765         * src/SDCCast.c (createIvalCharPtr),
3766         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
3767         bug #753752)
3768         * support/regression/tests/nullstring.c: tests for these two bugs
3769
3770 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3771
3772         * support/Util/SDCCerr.h,
3773         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
3774         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
3775         about storage class and 'at' used inside struct or union
3776         * src/SDCCBBlock.c (iCodeFromeBBlock),
3777         * src/SDCCcse.c (ifxOptimize),
3778         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
3779         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
3780         printIval, emitStaticSeg, emitOverlay),
3781         * src/SDCClabel.c (deleteIfx),
3782         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
3783         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
3784         gatherAutoInit, processParms),
3785         * support/Util/SDCCerr.h,
3786         * support/Util/SDCCerr.c (werrorfl): Support for better error location
3787         reporting for post-parse errors.
3788
3789 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3790
3791         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
3792         implicit casts via union; they don't work on big endian systems
3793         (possible fix for bug #861138)
3794
3795 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3796
3797         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
3798         * src/mcs51/main.c: fixed the fix for bug #737001
3799
3800 2003-12-15  Borut Razem <borut.razem AT siol.net>
3801
3802         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
3803
3804 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3805
3806         * support/makebin/makebin.c: put output in binary mode
3807
3808 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3809
3810         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
3811         xdata and data memory on startup. Set the environment variable
3812         SDCC_NOGENRAMCLEAR to disable this.
3813         * src/mcs51/peephole.def,
3814         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
3815         (allows non-interrupt and interrupt code to safely compete for a resource
3816         without the non-interrupt code having to disable interrupts)
3817
3818 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3819
3820         * src/SDCCicode.c (geniCodeAdd),
3821         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
3822         with valFromType if type might be a pointer and host is big endian).
3823         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
3824         types, not just integer types.
3825         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
3826         multiply defined with mismatching "at" address.
3827
3828 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3829
3830         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
3831         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
3832         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
3833         with embedded nulls (fixed bug #753752)
3834
3835 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3836
3837         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
3838         Apparently this did not see much testing (endless loop)
3839
3840 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3841
3842         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
3843
3844 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3845
3846         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
3847         gracefully handle NULL memmap pointers
3848
3849 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3850
3851         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
3852         instead of deleting the iCode when an operand is volatile
3853         * src/z80/gen.c (genDummyRead),
3854         * src/mcs51/gen.c (genDummyRead),
3855         * src/ds390/gen.c (genDummyRead),
3856         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
3857         not just IC_RIGHT
3858         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
3859         * src/SDCC.y: fixed bug #850420
3860
3861 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3862
3863         Applied z80 i/o port patch from Peter Townson and fixed some operators
3864         to better handle operands in A register.
3865         * device/include/z180.h
3866         * src/SDCC.y
3867         * src/SDCCglue.c
3868         * src/z80/gen.c
3869         * src/z80/gen.h
3870         * src/z80/main.c
3871         * src/z80/peeph-z80.def
3872         * src/z80/peeph.def
3873         * src/z80/z80.h
3874
3875 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3876
3877         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
3878
3879 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3880
3881         * device/lib/hc08/_mullong.c: Removed extra #endif
3882
3883 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3884
3885         * sim/ucsim/hc08.src/inst.cc,
3886         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
3887         carries from x to h
3888         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
3889         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
3890         * device/include/stdarg.h: fixed varargs for hc08
3891         * device/lib/Makefile.in,
3892         * device/lib/hc08/Makefile,
3893         * device/lib/hc08/_mulint.c,
3894         * device/lib/hc08/_mullong.c: fixed some endian problems
3895
3896 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3897
3898         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
3899         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
3900         * device/lib/_gptrget.c,
3901         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
3902
3903 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3904
3905         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
3906         * src/SDCCast.c (astErrors): fixed bug #846007
3907         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
3908
3909 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3910
3911         * src/SDCCast.c (decorateType): disabled a transformation I added in
3912         revision 1.188 (access to fields of a structure at an absolute address);
3913         it breaks with bitfields, extern declarations, and gcse analysis.
3914         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
3915         could be assigned through a pointer, so don't complain.
3916         * src/SDCCast.c (astErrors),
3917         * src/SDCCast.h,
3918         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
3919
3920 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
3921
3922         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
3923         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
3924         output of __config directives, since gpasm now supports them
3925         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
3926         pre-processor macro, i.e. -DMCU=p18f452
3927         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
3928         and modified to handle 'cast' icode similarly to '=' icode
3929         * src/pic16/device.h (typedef struct PIC_device): added field
3930         'extMIface' to indicate that chip has external memory interface
3931         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
3932         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
3933         18F8720
3934
3935 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3936
3937         * src/SDCC.y (pointer): fixed bug #846006
3938         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
3939         * src/SDCCast.c (decorateType): fixed bug #846009
3940         * src/ds390/peeph.def,
3941         * src/ds390/gen.c (genAnd, genOr),
3942         * src/mcs51/peeph.def,
3943         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
3944
3945 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3946
3947         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
3948         * src/SDCCdflow.c
3949         * src/SDCCcse.c
3950         * src/SDCCcse.h
3951         * src/SDCCBBlock.h
3952         * src/SDCCBBlock.c
3953
3954 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
3955
3956         fixed bug #845089
3957         * src/SDCCbitv.h,
3958         * src/SDCCbitv.c: added function to free a bitvector
3959         * src/SDCClrange.h,
3960         * src/SDCClrange.c: added function to recompute the liveranges
3961         * src/avr/ralloc.c,
3962         * src/ds390/ralloc.c,
3963         * src/hc08/ralloc.c,
3964         * src/mcs51/ralloc.c,
3965         * src/pic/ralloc.c,
3966         * src/pic16/ralloc.c,
3967         * src/xa51/ralloc.c,
3968         * src/z80/ralloc.c: recompute the liveranges after register packing
3969
3970 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
3971
3972         * src/SDCCloop.c (newInduction): fixed bug #845630
3973
3974 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3975
3976         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
3977         inadvertantly left behind from my 2003-11-12 change
3978
3979 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3980
3981         Updated headers I neglected to commit yesterday.
3982         * src/SDCClrange.h,
3983         * src/SDCCicode.h
3984
3985 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3986
3987         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
3988         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
3989         * src/SDCCopt.c (eBBlockFromiCode),
3990         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
3991         the creation of the key hash table from the sequencing so it can be used
3992         earlier (for some GCSE bug fixes still pending)
3993
3994 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3995
3996         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
3997         * support/regression/tests/addsub.c: testing genPlus shortcut
3998
3999 2003-11-15  Borut Razem <borut.razem AT siol.net>
4000
4001         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
4002
4003 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4004
4005         * src/SDCCcse.c (cseBBlock): fixed bug #527779
4006         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
4007         ordering is immaterial.
4008         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
4009
4010 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4011
4012         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
4013         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
4014         (SIGSEV) of bug #840381
4015         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
4016         unlink new file before rename if new and old filenames are the same)
4017
4018 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4019
4020         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
4021         uninitialized variables) for the mcs51. Set environment variable
4022         SDCC_GENRAMCLEAR to test.
4023         xdata initialization slightly shorter
4024
4025 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4026
4027         * src/SDCCsymt.h,
4028         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
4029         #838241 & 780691 (basicly the same bug)
4030         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
4031         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
4032
4033 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
4034
4035         * src/SDCCmain.c (linkEdit): "fix" #834252
4036
4037 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4038
4039         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
4040         * src/SDCCast.h,
4041         * src/SDCC.y: fixed bug #819403
4042
4043 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4044
4045         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
4046         the reentrant attribute.
4047         * src/hc08/gen.c (genPackBits): added missing stack readjustment
4048         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
4049         simulation
4050         * src/SDCCast.c (decorateType): fixed bug with storage class not being
4051         updated during pointer dereference; f.e. ~(((char *)1)*) was being
4052         erroneously reduced to a literal.
4053         * src/hc08/ralloc.c (packRegisters, rematStr),
4054         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
4055         some cases
4056
4057 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4058
4059         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
4060         * doc/sdccman.lyx: changed from 'article' to 'book'
4061         * doc/Makefile: readded test_suite_spec and cdbfileformat
4062
4063 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
4064
4065         * device/include/stdlib.h: include malloc.h to comply with ANSI
4066         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
4067
4068 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4069
4070         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
4071         * doc/clean.mk: also remove *.out files
4072         * doc/sdccman.lyx: some additions, larger top/bottom margins
4073
4074 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4075
4076         * src/SDCC.y: fixed bug #837365
4077         * support/regression/tests/bitopcse.c
4078         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
4079         a symbol (might be valop instead)
4080         * device/lib/Makefile.in: added errno.c to HC08SOURCES
4081         * device/lib/clean.mk: added hc08 to the cleaning list
4082
4083 2003-11-04  Borut Razem <borut.razem AT siol.net>
4084
4085         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
4086           made 2003-11-04
4087         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
4088           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
4089           malloc is declared in standard stdlib.h
4090
4091 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4092
4093         * device/lib/hc08/Makefile: need to clean .rel not .o files
4094         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
4095
4096 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4097
4098         * src/port.h,
4099         * src/hc08/main.c,
4100         * src/mcs51/main.c,
4101         * src/ds390/main.c,
4102         * src/z80/main.c,
4103         * src/avr/main.c,
4104         * src/pic/main.c,
4105         * src/pic16/main.c,
4106         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
4107         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
4108         tests (which uses the port's oclsExpense function)
4109         * src/SDCC.y,
4110         * src/SDCCast.c,
4111         * src/SDCCicode.c,
4112         * src/hc08/gen.c,
4113         * src/ds390/gen.c,
4114         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
4115
4116 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4117
4118         * src/SDCCcse.c (ifxOptimize),
4119         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
4120         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
4121         deleting the IFX iCode.
4122         * src/hc08/ralloc.c: reduced unneeded slocs
4123         * src/hc08/gen.c: fixed bug in asmopToBoolean
4124
4125 2003-11-04  Borut Razem <borut.razem AT siol.net>
4126
4127         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
4128           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
4129           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
4130           transferred to configure
4131
4132 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
4133
4134         Use headers defined in the C[++] standards:
4135         * sim/ucsim/gui.src/serio.src/fileio.cc
4136         * sim/ucsim/gui.src/serio.src/frontend.cc
4137         * sim/ucsim/gui.src/serio.src/main.cc
4138         * sim/ucsim/gui.src/serio.src/posix_signal.cc
4139         * support/Util/NewAlloc.c
4140         * as/hc08/lklibr.c
4141         * as/mcs51/lklibr.c
4142         * as/z80/aslist.c
4143         * as/z80/assym.c
4144
4145 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4146
4147         * Added MSVC projects for hc08 assembler and linker:
4148         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
4149         /as/hc08/link_hc08.dsp
4150
4151 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
4152
4153         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
4154
4155 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
4156
4157         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
4158
4159 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4160
4161         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
4162
4163 2003-10-31  Borut Razem <borut.razem AT siol.net>
4164
4165         * support/cpp2/cpplib.h,
4166           support/cpp2/cpplib.c,
4167           support/cpp2/cpplex.c,
4168           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
4169           to switch _asm block preprocessing on / off. Default is
4170           #pragma preproc_asm +
4171
4172 2003-10-31  Borut Razem <borut.razem AT siol.net>
4173
4174         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
4175           when outputting comment blocks (when executed with -C option) and
4176           _asm (SDCPP specific) blocks
4177
4178 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4179
4180         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
4181
4182 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
4183
4184         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
4185
4186 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
4187
4188         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
4189         * src/SDCCast.c (decorateType): fixed bug #832664
4190
4191 2003-10-31  Borut Razem <borut.razem AT siol.net>
4192
4193         * support\cpp2\cpplex.c: fixed for SDCPP:
4194           comments(when executed with -C option) and _asm blocks
4195           were included even if they where in skipped #if block.
4196           Applied solution from GCC cpp 3.3.2
4197
4198 2003-10-31  Borut Razem <borut.razem AT siol.net>
4199
4200         * src/SDCC.lex: sdcc now understands both formats:
4201           '# <line_number> <file_name>' and
4202           '#line <line_number> <file_name>'
4203         * support/cpp2/cppmain.c: sdcpp now generates the standard
4204           '# <line_number> <file_name>' instead of former
4205           '#line <line_number> <file_name>'
4206
4207 2003-10-30  Borut Razem <borut.razem AT siol.net>
4208
4209         * support/cpp2/cpphash.h,
4210         * support/cpp2/cpplib.h
4211         * support/cpp2/cpplex.c,
4212         * support/cpp2/cppmain.c,
4213         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
4214
4215 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4216
4217         Fixed a number of problems revealed by bug #827883.
4218         * src/SDCCloop.c (loopInvariants): Spill location of the
4219         result operand should be recomputed if extracted from
4220         a loop. Also, don't extract assignments of an iTemp
4221         from a literal.
4222         * src/SDCCast.c (isConformingBody): loop reversal should
4223         not occur if the control variable is involved with a
4224         relational operator.
4225
4226 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
4227
4228         * .version: bumped to 2.3.6 to reflect the big improvements
4229         made by Erik and Klaus. Thanks!
4230
4231 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
4232
4233         Replaced the livrange code.
4234         * src/SDCClrange.c: added new LR code
4235         * src/SDCCloop.c,
4236         * src/SDCCBBlock.h: removed remainig parts from old LR code
4237         * src/ds390/ralloc.c,
4238         * src/ds390/gen.c: minor fixes to make it work with new code
4239
4240 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4241
4242         * as/hc08/asm.h,
4243         * as/hc08/lkrloc.c,
4244         * src/hc08/gen.c,
4245         * src/hc08/ralloc.c: Fix various warnings related to the hc08
4246         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
4247         (tweaked fix for bug #818696)
4248
4249 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4250
4251         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
4252
4253 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4254
4255         * src/SDCCmain.c,
4256         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
4257         * src/mcs51/gen.c (gencjneshort),
4258         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
4259         more efficient (per Scott Bronson's suggestion)
4260
4261 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4262
4263         Extended the semantics of the critical keyword to include
4264         individual statements. See RFE #827755 and #799831
4265         * src/SDCC.y
4266         * src/SDCCicode.c
4267         * src/SDCCopt.c
4268         * src/SDCCast.c
4269         * support/Util/SDCCerr.c
4270         * support/Util/SDCCerr.h
4271         * src/mcs51/gen.c
4272         * src/ds390/gen.c
4273         * src/hc08/gen.c
4274
4275 2003-10-19  Borut Razem <borut.razem AT siol.net>
4276
4277         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
4278
4279 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4280
4281         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
4282         Fixed bug #818696
4283         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
4284         and predecrement operand is displayed
4285
4286 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
4287
4288         * src/SDCCval.c (valMinus): fixed bug #826041
4289
4290 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4291
4292         Some hc08 related updates that I missed earlier
4293         * sim/ucsim/stypes.h
4294         * support/regression/ports/hc08/spec.mk
4295
4296 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4297
4298         New target "hc08" for the Motorola 68hc08 family of micros
4299
4300         * configure
4301         * configure.in
4302         * Makefile
4303         * src/hc08/*
4304         * src/SDCCmain.c
4305         * src/port.h
4306         * sim/ucsim/hc08.src/*
4307         * sim/ucsim/configure.in
4308         * src/ucsim/configure
4309         * sim/ucsim/packages_in.mk
4310         * as/hc08/*
4311         * as/Makefile
4312         * device/include/mc68hc908qy.h
4313         * device/lib/hc08/*
4314         * device/lib/Makefile.in
4315         * support/regression/ports/hc08/*
4316         * support/regression/Makefile
4317
4318 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4319
4320         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
4321         regression test
4322         * src/ds390/gen.c (genCast): fixed bug #821957
4323
4324 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
4325
4326         * device/lib/logf.c: "fixed" overlay bug
4327         * support/regression/ports/host/spec.mk: added m library
4328         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
4329         * support/regression/tests/float_trans: added (for Eric)
4330
4331 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
4332
4333         * src/mcs51/gen.c (genCpl): fixed bug
4334         http://sf.net/mailarchive/message.php?msg_id=6263915
4335
4336 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
4337
4338         * src/SDCCast.c (decorateType): added extended constant folding
4339         * src/SDCCsymt.c (computeType): cleanup
4340         * src/SDCCval.c (valShift): minor optimization
4341         * support/regression/tests/ast_constant_folding.c: added
4342
4343 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4344
4345         * src/SDCCmain.c: removed some unintended changes
4346
4347 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4348
4349         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
4350         * src/z80/gen.c: fixed part of bug #817589
4351         * src/SDCCsymt.c (checkFunction): fixed bug #817895
4352
4353 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
4354
4355         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
4356         * src/SDCCcflow.c
4357         * src/SDCCcse.c
4358         * src/SDCCdflow.c
4359         * src/SDCClabel.c
4360         * src/SDCClrange.c
4361         * src/SDCCmem.c
4362         * src/SDCCopt.c
4363         * src/SDCCpeeph.c
4364         * src/SDCCset.c
4365         * src/avr/ralloc.c
4366         * src/ds390/ralloc.c
4367         * src/izt/ralloc.c
4368         * src/mcs51/ralloc.c
4369         * src/pic/ralloc.c
4370         * src/pic16/ralloc.c
4371         * src/xa51/ralloc.c
4372         * src/z80/ralloc.c
4373         * src/z80/gen.c: removed unused label "release:"
4374
4375 2003-10-06  Borut Razem <borut.razem AT siol.net>
4376
4377         * src/SDCC.lex: removed definition of unused variables
4378           save_optimize and save_options
4379
4380 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
4381
4382         * clean.mk: removed '=' in "-maxdepth=1"
4383         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
4384         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
4385
4386 2003-10-06  Borut Razem <borut.razem AT siol.net>
4387
4388         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
4389           my_unput() replaced by unput()
4390
4391 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
4392
4393         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
4394         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
4395         type-punned pointer will break strict-aliasing rules"
4396         Old LR behaviour is again default; Klaus' LR can be choosen by
4397         defining the environment variable LRKLAUS
4398         * src/SDCCBBlock.h
4399         * src/SDCCloop.c
4400         * src/SDCClrange.c
4401         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
4402         * clean.mk: fixed removal of files in bin/CVS/
4403         * device/lib/clean.mk: fixed removal of directories small and large
4404         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
4405         * src/SDCCicode.c,
4406         * src/SDCCval.c: removed superflous test for pedantic
4407
4408 2003-10-05  Borut Razem <borut.razem AT siol.net>
4409
4410         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
4411           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
4412           message "unmatched #pragma SAVE and #pragma RESTORE"
4413
4414 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4415
4416         * doc/sdccman.lyx: various additions and updates (interrupts, inline
4417           assembly, critical functions, atomic, nojtbound)
4418
4419 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
4420
4421         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
4422         * src/SDCCBBlock.h
4423         * src/SDCCloop.c
4424         * src/SDCCloop.h
4425         * src/SDCClrange.c
4426
4427 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4428
4429         * src/z80/gen.h,
4430         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
4431         * src/mcs51/gen.h
4432         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
4433         * src/ds390/gen.h
4434         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
4435         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
4436         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
4437
4438 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4439
4440         * src/z80/gen.c (genRet): fixed bug #524753
4441         * src/z80/gen.c (genCast): fixed internal error on cast from
4442         pointer to long
4443         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
4444         fix for bug #477835 to the z80
4445         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
4446         for tracking iCodes in the peephole optimizer for z80
4447
4448 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4449
4450         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
4451         the other part of bug #814548
4452         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
4453
4454 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
4455
4456         * src/SDCCcse.c: fixed part of bug #814548
4457
4458 2003-09-28  Borut Razem <borut.razem AT siol.net>
4459
4460         * src/asm.c: rewrite of printILine() to use temporary file instead
4461           a pipe
4462         * src/xa51/main.c: commented out declaration of int rewinds
4463
4464 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4465
4466         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
4467
4468 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4469
4470         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
4471         * src/asm.c (printILine): Fixed bug #811015
4472
4473 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4474
4475         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
4476         freeing.
4477
4478 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4479
4480         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
4481         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
4482         to correctly handle general case of AOP_PAIRPTR
4483         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
4484
4485 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4486
4487         * src/mcs51/ralloc.c (fillGaps),
4488         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
4489         register positioning bug)
4490
4491 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
4492
4493         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
4494
4495 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4496
4497         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
4498         genCodePointerGet, genGenPointerGet, genFarPointerSet,
4499         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
4500         (ralloc doesn't intentionally do this now, but perhaps later)
4501         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
4502         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
4503         register positioning bugs (Fixed bug #762602 and #795325)
4504         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
4505         (Fixed bug #808779)
4506         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
4507         lines that --i-code-in-asm generates
4508
4509 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4510
4511         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
4512         trying to fclose a FILE* that was already closed.
4513
4514 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4515
4516         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
4517         of const struct should be treated as if const themselves)
4518
4519 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
4520
4521         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
4522
4523 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4524
4525         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
4526         Unix (/n) and DOS (/r/n) line terminations.
4527
4528 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4529
4530         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
4531         bug #613775
4532
4533 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4534
4535         * src/mcs51/gen.c (genFunction, genEndFunction),
4536         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
4537         and restore of EA so that stack offsets to parameters are
4538         correct when using both critical and reentrant/stack-auto.
4539         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
4540         size (can be triggered in error if sloc is shared between
4541         different sized objects)
4542         * device/include/float.h: fixed macros to explicitly use
4543         unsigned long where needed
4544
4545 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
4546
4547         Feature req. 799831: added code to allow nesting of critical functions
4548         * src/mcs51/gen.c (genFunction, genEndFunction)
4549         * src/ds390/gen.c (genFunction, genEndFunction)
4550
4551 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4552
4553         * src/SDCCsymt.c (sclsFromPtr),
4554         * src/SDCCsymt.h,
4555         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
4556         support for standard C idiom of memory mapped variables; for
4557         example, *((xdata int*)0x1234) = 1 is now internally equivalent
4558         to xdata int at 0x1234 tempvar = 1.
4559         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
4560         provided by Akiya ISHIDA
4561
4562 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
4563
4564         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
4565         * src/SDCCval.c (constVal): added reduction from int to char
4566         * src/SDCCval.c (valMult, valDiv): fixed sign handling
4567         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
4568         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
4569         to ignore the sign
4570         * support/regression/tests/shifts.c: fixed
4571
4572 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4573
4574         * src/z80/gen.c (genXor): Fixed bug #805445
4575
4576 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4577
4578         Fixed bug #621531 (const & volatile confusion in the type chain).
4579         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
4580         refer to the const or volatile state of the pointer itself.
4581
4582         * src/SDCCast.c
4583         * src/SDCCglue.c
4584         * src/SDCCicode.c
4585         * src/SDCCsymt.c
4586         * src/SDCCval.c
4587         * src/SDCC.y
4588         * src/SDCCsymt.h
4589         * src/pic/gen.c
4590         * src/pic/ralloc.c
4591         * src/pic16/gen.c
4592         * src/pic16/ralloc.c
4593         * support/regression/tests/const.c
4594
4595 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4596
4597         When checking for duplicated modules, use absolute paths
4598         instead of relative paths.  Files changed:
4599
4600         * as/mcs51/lklib.c
4601         * link/z80/lklib.c
4602
4603 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4604
4605         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
4606
4607 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4608
4609         * device/include/string.h: added size_t typedef, changed
4610         prototypes to use size_t, eliminated separate reentrant and
4611         non-reentrant declarations, added _memmove declaration
4612         * device/lib/_memcpy.c: changed to use size_t instead of int,
4613         changed /4 to >>2 to avoid division library call
4614         * device/lib/_memcmp.c,
4615         * device/lib/_memset.c,
4616         * device/lib/_strncat.c,
4617         * device/lib/_strncpy.c,
4618         * device/lib/_strncmp.c: changed to use size_t instead of int
4619         * device/lib/_memmove.c: new file (fixed bug #772294)
4620         * device/lib/Makefile.in: added _memmove.c
4621         * device/lib/z80/asm_strings.s: fixed bug #772290
4622         * support/regression/tests/bitfields.c: attempt to fix host assertion
4623         failure on amd64-unknown-linux2.2
4624
4625 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4626
4627         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
4628         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
4629         * as/z80/asmain.c (main): fixed bug #801766
4630
4631 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
4632
4633         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
4634         compilers
4635
4636 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4637
4638         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
4639         reported in bug #800609
4640
4641 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
4642
4643         * Top header beautifications in src/pic16 directory:
4644           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
4645           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
4646           pcoderegs.h, ralloc.c, ralloc.h
4647         * main.c: added top header and GPL license notice
4648         * pcode.c: fixed the if-conditional warning
4649
4650 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
4651
4652         * device/lib/_mullong.c: replaced int by short for gcc
4653
4654 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4655
4656         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
4657         and JUMPTABLE iCodes properly now (worked by accident before)
4658         * src/mcs51/gen.c (leftRightUseAcc),
4659         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
4660         iCode properly now. Use getSize instead of nRegs since a & b
4661         aren't part of the nRegs tally.
4662
4663 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
4664
4665         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
4666         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
4667           before instructions that use the _STATUS register
4668
4669 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
4670
4671         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
4672         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
4673         fetching of the pointer
4674         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
4675         copied from genNearPointerSet()
4676         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
4677         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
4678         If they pop r0/r1 they must be called in the opposite order than aopOp().
4679         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
4680         (resp. --stack-auto), prepared for --xstack
4681
4682 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4683
4684         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
4685
4686 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
4687
4688         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
4689         these ports have their own __sdcc_external_start()
4690
4691 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
4692
4693         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
4694         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
4695         type for bits was changed. It resulted in bit variables becoming
4696         global, which is not permitted in PIC 14 assembly output.
4697
4698 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4699
4700         * doc/sdccman.lyx: various additions and updates. Rearranged sections
4701
4702 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4703
4704         Z80 and MCS51 linkers complaint if a public symbol is defined
4705         in more than one library module:
4706
4707         * as/mcs51/lklib.c
4708         * link/z80/lklib.c
4709         * as/mcs51/Makefile.in
4710
4711 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4712
4713         A few small changes that speed up the peephole optimizer.
4714
4715         * src/SDCCpeeph.c
4716
4717 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4718
4719         Try to make the peephole optimizer smarter by maintaining
4720         an association between the assembly source code and the
4721         iCodes that originated them. Put this information to use
4722         with a new peephole rule condition "notVolatile" so that
4723         the rules can be aggressive yet still safe.
4724
4725         * src/SDCCpeeph.c
4726         * src/SDCCpeeph.h
4727         * src/mcs51/gen.c
4728         * src/mcs51/peeph.def
4729
4730 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4731
4732         Fixed bug #741761
4733
4734         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
4735         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
4736         if the left or right operand symbols have the accuse flag set.
4737
4738 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4739
4740         Changed the type of the result of the ! (NOT) operator to char;
4741         previously it returned the same type as the source. This allows
4742         us to eliminate all the genFloatNot functions (all of its target
4743         implementations were very buggy) since !float can use the same
4744         code as !long now.
4745
4746         * src/SDCCicode.c (ast2iCode): ! returns char
4747         * src/mcs51/gen.c (genNot, genNotFloat),
4748         * src/ds390/gen.c (genNot, genNotFloat),
4749         * src/z80/gen.c (genNot, genNotFloat),
4750         * src/pic/gen.c (genNot, genNotFloat),
4751         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
4752
4753 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
4754
4755         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
4756         1. Interrupt would not compile properly. Ensure PCLATH register is saved
4757            during interrupts. Ensure WSAVE is located at a shared bank address.
4758         2. Fixed page selection in some places
4759         3. Fixed BTFSS/C to where necessary use registers directly and not simply
4760            the registers name strings.
4761         4. Fixed "signed / unsigned compare" compiler warnings.
4762         5. The PIC port manages its own allocation of the general purpose
4763            registers, but makes no attempt to reuse them. As a result when
4764            compiling it soon runs out of general purpose registers. Some
4765            additional code was added to the files pcode.c and device.c to walk
4766            through the function call tree and rename the registers so that they
4767            get reused.
4768
4769         * src/pic/device.c
4770         * src/pic/gen.c
4771         * src/pic/glue.c
4772         * src/pic/pcode.c
4773         * src/pic/pcode.h
4774         * src/pic/ralloc.c
4775         * src/pic/ralloc.h
4776         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
4777         genPlus() & genMinus() when the result is the same as left or right
4778
4779 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4780
4781         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
4782
4783 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4784
4785         Made bitfield a distinct type from bit so that bitfields
4786         convert as per ANSI C and bits retain their traditional
4787         boolean style behaviour. Implemented bitfield support in
4788         the z80 port.
4789
4790         * src/SDCCsymt.h,
4791         * src/SDCCsymt.c,
4792         * src/SDCCast.c,
4793         * src/cdbFile.c,
4794         * src/mcs51/gen.c,
4795         * src/ds390/gen.c: bit v bitfield split
4796         * src/z80/gen.c: New support for bitfields
4797         * support/regression/tests/bitfields.c: reenabled z80,
4798         added more tests
4799
4800 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4801
4802         Rules 246.x, 247.x relate to bitfields, the others speed up
4803         access to xdata mapped I/O devices.
4804
4805         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
4806
4807 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4808
4809         Cleaned up genPackBits and genUnpackBits and added two helper
4810         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
4811         for literal assignments in genPackBits (thanks to Frieder for
4812         reminding me).
4813
4814         * src/mcs51/gen.c
4815         * src/ds390/gen.c
4816
4817 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4818
4819         Fixed bug #748310 (pointer to function type mishandled when the
4820         function name is omitted). Also fixed a SIGSEGV when a function
4821         attribute (reentrant, etc) is used on a non-function or on a
4822         function but misplaced before the parameter list.
4823
4824         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
4825         bug #748310
4826         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
4827         * support/Util/SDCCerr.h,
4828         * support/Util/SDCCerr.c: Added func attr misuse error msg
4829
4830 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
4831
4832         Fixed bug #787649 by anonymous
4833         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
4834         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
4835
4836 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4837
4838         Fixed numerous bitfield problems.
4839
4840         * src/SDCC.y: More bitfield related error checking
4841         * src/SDCCsymt.h,
4842         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
4843         * support/Util/SDCCerr.h,
4844         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
4845         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
4846         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
4847         * support/regression/tests/bitfields.c: tests added
4848
4849 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4850
4851         Made the constant following the "interrupt" keyword optional. If
4852         omitted, the function will not automatically be given an entry
4853         in the interrupt vector table (similar to #pragma NOIV, but
4854         less syntacticly kludgy). The interrupt number is also now
4855         range checked. Also fixed a bug in the high order bit example
4856         in the manual.
4857
4858         * src/SDCC.y
4859         * src/SDCCmem.c
4860         * src/SDCCglue.c
4861         * src/SDCCsymt.h
4862         * support/Util/SDCCerr.c
4863         * support/Util/SDCCerr.h
4864         * doc/sdccman.lyx
4865
4866 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
4867
4868         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
4869         * src/SDCCicode.c (operandOperation): rewritten some ops
4870         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
4871         * src/SDCCsymt.c (computeType): literals are handled the same way as any
4872         other type
4873         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
4874         be re-activated by defining REDUCE_LITERALS)
4875         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
4876         unsigned, but are signed by default
4877         * src/SDCCval.c (constVal): rearranged
4878         * src/SDCCval.c (valMod): preliminary fix
4879         * src/SDCCval.c (valCastLiteral): use TYPE_* types
4880         * support/regression/literalop.c: added, work in progress
4881
4882 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4883
4884         Generate warnings for useless declarations like "char data;"
4885         that don't do what new users expect.
4886
4887         * src/SDCC.y
4888         * support/Util/SDCCerr.h
4889         * support/Util/SDCCerr.c
4890
4891 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
4892
4893         * src/SDCCval.c (valMult): fix overflow detection of negative int
4894
4895 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4896
4897         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
4898
4899         Changes to support big endian targets:
4900
4901         * src/ports.h
4902         * src/SDCCglue.c
4903         * src/avr/main.c
4904         * src/ds390/main.c
4905         * src/izt/i186.c
4906         * src/mcs51/main.c
4907         * src/pic/main.c
4908         * src/pic16/main.c
4909         * src/xa51/main.c
4910         * src/z80/main.c
4911
4912 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
4913
4914         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
4915         * device/lib/time.c: fixed warning "integer overflow in expression"
4916
4917 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
4918
4919         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
4920         * src/SDCCval.c (constVal): changed default to signed; hex and octal
4921         constants are unsigned; added recognition of "u" flag for unsigned
4922         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
4923         * src/SDCCval.c (valDiv, valMod): fixed signdness
4924         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
4925         signedness of modulo, left and right shift
4926         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
4927         * support/Util/SDCCerr.h: added warning W_INT_OVL
4928         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
4929         * src/SDCCast.c (ast_print): improved output of constants
4930
4931 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4932
4933         Fixed some warnings when building with MSVC:
4934
4935         * as\mcs51\asdata.c
4936         * as\z80\asdata.c
4937         * as\mcs51\asm.h
4938         * as\z80\asm.h
4939         * link\z80\aslink.h
4940         * link\z80\lkdata.c
4941         * link\z80\lkeval.c
4942         * link\z80\lkgb.c
4943         * link\z80\lkihx.c
4944         * link\z80\lks19.c
4945         * link\z80\lksym.c
4946         * support\cpp2\cpplib.c
4947         * src\ds390\gen.c
4948         * src\mcs51\gen.c
4949
4950 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
4951
4952         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
4953
4954 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4955
4956         * support\librarian\clean.mk: Do not remove Makefile.
4957         * support\librarian\Makefile: added.
4958
4959 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4960
4961         Added librarian to MSVC build:
4962         * all.dsp
4963         * sdcc.dsw
4964         * support\librarian\librarian.dsp
4965
4966         'configure' not needed for librarian, removed:
4967         * support\librarian\configure
4968         * support\librarian\configure.in
4969         * support\librarian\config_in.h
4970         * support\librarian\Makefile.in
4971
4972         Hopefully these ones built the librarian and the rest of sdcc properly:
4973         * Makefile
4974         * Makefile.common.in
4975
4976         Messed up 'configure', so revert to previous version:
4977         * configure
4978         * configure.in
4979
4980 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
4981
4982         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
4983         there, while the mantissa of a double is "only" 53 bits wide.
4984
4985 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4986
4987         Adding sdcclib to the build.  MSVC project coming soon.
4988         Files added/changed:
4989
4990         * support\librarian\clean.mk
4991         * support\librarian\configure
4992         * support\librarian\configure.in
4993         * support\librarian\config_in.h
4994         * support\librarian\Makefile.bcc
4995         * support\librarian\Makefile.in
4996         * support\librarian\sdcclib.c
4997         * Makefile.bcc
4998         * Makefile
4999         * Makefile.common.in
5000         * configure
5001         * configure.in
5002
5003 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5004
5005         Linker now complaints if linked modules have conflicting options, for
5006         example, one compiled using --model-large and another one compiled with
5007         --model-small.  The following files were modified:
5008
5009         * as\mcs51\asdata.c
5010         * as\mcs51\aslink.h
5011         * as\mcs51\asm.h
5012         * as\mcs51\asmain.c
5013         * as\mcs51\asout.c
5014         * as\mcs51\i51pst.c
5015         * as\mcs51\lkdata.c
5016         * as\mcs51\lklibr.c
5017         * as\mcs51\lkmain.c
5018         * as\z80\asdata.c
5019         * as\z80\asm.h
5020         * as\z80\asmain.c
5021         * as\z80\asout.c
5022         * as\z80\z80pst.c
5023         * link\z80\aslink.h
5024         * link\z80\lkdata.c
5025         * link\z80\lklibr.c
5026         * link\z80\lkmain.c
5027         * src\SDCCglue.c
5028
5029 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5030
5031         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
5032         as/mcs51/lklibr.c: Generate a warning when a library is not found.
5033
5034 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
5035
5036         * src/z80/mappings.i: fix _mul[us][int,long] entries
5037
5038 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5039
5040         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
5041
5042 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
5043
5044         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
5045         * support/regression/tests/bitopcse.c: added
5046         fixed warning:
5047         * src/avr/gen.c:
5048         * src/pic/gen.c:
5049         * src/pic16/gen.c:
5050         * src/z80/gen.c:
5051         * src/xa51/gen.c:
5052
5053 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5054
5055         added support for new library format to z80, gbz80 linkers:
5056         *link/z80/aslink.h
5057         *link/z80/lklex.c
5058         *link/z80/lklib.c
5059         *link/z80/lklist.c
5060
5061 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
5062
5063         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
5064         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
5065
5066 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
5067
5068         added DUMMY_READ_VOLATILE:
5069         * src/SDCC.y:
5070         * src/avr/gen.c:
5071         * src/xa51/gen.c:
5072         * src/z80/gen.c:
5073         * src/pic/gen.c:
5074         * src/pic16/gen.c:
5075         * src/mcs51/gen.c:
5076         * src/ds390/gen.c:
5077         * src/SDCCcse.c (algebraicOpts): many improvements
5078         * src/SDCCcse.h: removed algebraicOpts()
5079         * src/SDCCicode.c (picDummyRead): added
5080
5081 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5082
5083         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
5084         "Insufficient space in data memory".
5085
5086 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5087
5088         * src/mcs51/gen.c: fixed bug #771358
5089         * src/z80/gen.c: fixed bug #759087
5090
5091 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
5092
5093         * src/pic16/glue.c: minor cleanup by Vangelis
5094
5095 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5096
5097         * device/include/regc515c.h: fixed #758477
5098         * device/lib/_gptrget.c: saving some cycles in generic pointer get
5099         * device/lib/_gptrput.c: saved a few bytes
5100         * my tab spacing is 8, yours too?)
5101         * device/lib/_ser.c: process RX bytes earlier than TX bytes
5102         * device/lib/serial.c: process RX bytes earlier than TX bytes
5103         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
5104
5105 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5106
5107         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
5108
5109 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5110
5111     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
5112
5113 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
5114
5115         * device/lib/Makefile.in: bad fix, reverted to 1.43
5116
5117 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
5118
5119         * device/lib/Makefile.in: added missing z80 object files
5120
5121 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
5122
5123         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
5124         pic16 progress by Vangelis:
5125         * src/SDCCglobl.h:
5126         * src/SDCCmain.c:
5127         * src/pic/Makefile:
5128         * src/pic:
5129         * pic/Makefile:
5130         * pic16/device.c:
5131         * pic16/device.h:
5132         * pic16/gen.c:
5133         * pic16/gen.h:
5134         * pic16/genarith.c:
5135         * pic16/glue.c:
5136         * pic16/main.c:
5137         * pic16/pcode.c:
5138         * pic16/pcode.h:
5139         * pic16/pcodepeep.c:
5140         * pic16/peeph.def:
5141
5142 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5143
5144     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
5145
5146 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5147
5148     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
5149     added gbz80 build to MSVC project.
5150     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
5151     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
5152     from 8051 stuff and setup so it links using a .lnk file.
5153
5154 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5155
5156     * support/librarian/sdcclib.c: sdcc librarian.
5157     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
5158     with sdcclib.
5159
5160 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5161
5162     * as/mcs51/lkmain.c: properly handle extensions in function afile.
5163
5164 2003-07-02  Borut Razem <borut.razem AT siol.net>
5165
5166         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
5167         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
5168         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
5169         src/xa51/main.c, src/z80/main.c:
5170         virtualization of glue() function: each port has it's own glue function,
5171         which is accessed by do_glue function pointer in PORT.general structure
5172
5173 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
5174
5175         * DS800C400 fun, improved ROM interface and tinibios.
5176
5177 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
5178
5179         * More support for DS80C400. Now includes beginning of interface to ROM.
5180
5181 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
5182
5183         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
5184
5185 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5186
5187         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
5188
5189 2003-06-19  Borut Razem <borut.razem AT siol.net>
5190
5191         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
5192
5193 2003-06-19  Borut Razem <borut.razem AT siol.net>
5194
5195         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
5196         fixed Z80 port - crt0.o: cannot open.
5197
5198 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
5199
5200         * support/Util/MySystem.c (merge_command): revert bad fix
5201
5202 2003-06-18  Borut Razem <borut.razem AT siol.net>
5203
5204         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
5205
5206 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5207
5208         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
5209         option --use-stdout sends errors to stdout instead of stderr.
5210
5211 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
5212
5213         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
5214
5215 2003-06-15  Borut Razem <borut.razem AT siol.net>
5216
5217         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
5218         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
5219         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
5220         fixed width array of pointers replaced with sets;
5221         multiple include and lib paths ared transferred to preprocessor and linker
5222         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
5223         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
5224         fixed width array of pointers
5225         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
5226         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
5227         fixupPath(), getPathDifference()
5228         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
5229         fixed width array of pointers
5230
5231 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
5232
5233         * src/pic16/ralloc.c: fix warnings
5234         * src/pic16/pcode.c: fix warning
5235
5236 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
5237
5238          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
5239         know all the details, but essentially this set of changes enable
5240         the pic16 port to generate movff instructions and generate assembler
5241         directives,
5242         * src/SDCCmain.c:
5243         * src/pic16/gen.c:
5244         * src/pic16/glue.c:
5245         * src/pic16/pcode.c:
5246         * src/pic16/device.c:
5247         * src/pic16/main.c:
5248         * src/pic16/pcode.h:
5249         * src/pic16/pcoderegs.c:
5250         * src/pic16/ralloc.c:
5251         * src/pic16/ralloc.h:
5252
5253 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5254
5255         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
5256         added option --vc, so sdcc errors and warnings are compatible with
5257         Microsoft Visual Studio.
5258
5259 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5260
5261         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
5262           device/lib/libfloat.lib: added atof function.
5263
5264 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
5265
5266         * doc/sdccman.lyx: updated to Lyx 1.3
5267         * doc/cdbfileformat.lyx: updated to Lyx 1.3
5268         * doc/test_suite_spec.lyx: updated to Lyx 1.3
5269         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
5270
5271 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
5272
5273         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
5274
5275 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5276
5277         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
5278           additions to the "related tools/documentation" section
5279
5280 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
5281
5282         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
5283
5284 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
5285
5286         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
5287         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
5288
5289 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
5290
5291         * doc/sdccman.lyx: fix double dash and other minor things
5292         * doc/Makefile: fix double dash
5293
5294 2003-05-28  Karl Bongers(patches from Martin Helmling)
5295         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
5296           condition and ignore commands.
5297
5298 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5299
5300         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
5301           is in parts still quite out of date, I did changes as far as I felt makes sense
5302           for a non-native english speaker.
5303           Please feel free to add to the manual or to correct my changes.
5304         * doc/Makefile: undid touching the date of intermediate tex files.
5305
5306 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5307
5308         * doc/sdccman.lyx: Manual has an index now
5309
5310 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
5311
5312         Finalize muluint/mulsint and mululong/mulslong merging:
5313         * device/lib/_mulint.c
5314         * device/lib/_mullong.c
5315         * device/lib/gbz80/mul.s
5316         * device/lib/gbz80/stubs.s
5317         * device/lib/z80/mul.s
5318         * device/lib/z80/stubs.s
5319         * src/SDCCsymt.c (initCSupport)
5320
5321 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5322
5323         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
5324         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
5325           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
5326           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
5327           instead of /Zm500.
5328
5329 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5330
5331         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
5332           the regression tests I'm not brave enough to enable 245.b, 245.c
5333         * doc/sdccman.lyx: added latex preamble for hyperref package.
5334           Using pdflatex this will give you a hyperlinked pdf file with
5335           bookmarks. (prepend '%' before /usepackage if this breaks something)
5336
5337 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5338
5339          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
5340
5341 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
5342
5343         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
5344
5345 2003-05-21    <johan AT balder>
5346
5347         * src/SDCCglue.c (printIval): fixed bug #739934
5348
5349 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
5350
5351         Applied patch from bug 737905 (renamed yylineo to mylineno):
5352         * src/altlex.c
5353         * src/SDCCast.c
5354         * src/SDCglobl.h
5355         * src/SDCC.lex
5356         * src/SDCCsymt.c
5357         * src/SDCCval.c
5358         * src/pic16/pcode.c: Cleaned warnings
5359         * src/pic16/pcodeflow.c: Cleaned warnings
5360         * src/pic16/pcoderegs.c: Cleaned warnings
5361
5362 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
5363
5364         * src/pic16/pcode.c: Cleaned warnings
5365         * src/pic16/pcodepeep.c: Cleaned warnings
5366         * src/pic16/ralloc.c: Cleaned warnings
5367
5368 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
5369
5370         * doc/sdccman.lyx: fixed bug 739745
5371         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
5372
5373 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
5374
5375         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
5376         it can be defined with CFLAGS when running configure
5377         * src/SDCCmain.c: fixed compiling + linking with object files
5378
5379 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
5380
5381         * configure.in: configure for pic16 port,
5382             added --disable-pic16-port
5383         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
5384         * src/SDCCmain.c: linkOptions is changed to set *,
5385             added if/endif conditional macros to remove options help
5386             messages from optionsTable when a port is not configured, added
5387             support for the PIc16 port in the ports table, when executing
5388             the compiler with no port specified on command line, a default
5389             port is selected with the new macro DEFAULT_PORT which is
5390             defined in port.h, in setDefaultOptions() linkOptions is removed
5391             from initialization assignment, since now it is a set,
5392             parseCmdLine uses setParseWithComma for linkOptions, in
5393             linkEdit() linkOptions are accessed with new function indexSet()
5394             which returns the i'th item of a set variable. See SDCCset.c, in
5395             linkEdit() when calling buildCmdLine(), added linkOptions as
5396             last argument. Now users can pass arguments to gplink via the
5397             -Wl option, main() uses pic16glue() to glue up pic16 programs
5398         * src/SDCCpeeph.c: various changes to support pic16
5399         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
5400             return the i'th item of the set
5401         * src/SDCCset.h: added function prototype for indexSet()
5402         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
5403         * src/clean.mk: added pic16 in CLEANALLPORTS variable
5404         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
5405             added macro DEFAULT_PORT
5406         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
5407         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
5408             generated
5409         * src/pic16/glue.c: commented out some error producing lines
5410         * src/pic16/main.c: __config directives are commented out to stop
5411             gpasm complaining and test the linkage with gplink, _linkCmd and
5412             _asmCmd changed to be more gplink and gpasm friendly
5413         * src/pic16/peeph.def: peep rule 3 is commented out, since it
5414             produced an error when parsed, peep rule 12 is added to utilize
5415             movff, but it is commented out since the pCode does not support
5416             yet a command with 2 address arguments
5417
5418 2003-05-18    <johan AT balder>
5419
5420         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
5421         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
5422 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
5423
5424         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
5425   Added feature to script commands from file.
5426
5427 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
5428
5429         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
5430         * src/SDCCutil.c: include ctype.h for win32
5431
5432 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
5433
5434         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
5435
5436 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
5437
5438         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
5439   Fixed so you can set breakpoints prior to run, run does not stop
5440   on entry now.  Add tbreak.  Other enhancements and fixes for use
5441   with ddd.
5442
5443 2003-05-12  Borut Razem <borut.razem AT siol.net>
5444
5445         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
5446
5447 2003-05-11  Borut Razem <borut.razem AT siol.net>
5448
5449         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
5450         the path of bin directory, so that PATH is the only env. variable, which has to be set
5451         in case of standard installation.
5452         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
5453         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
5454         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
5455
5456 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
5457
5458         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
5459         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
5460         temp files are in the port dir; clean the gen/test directory when
5461         generating new test.c
5462         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
5463         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
5464         * support/regression/tests/zeropad.c: added
5465
5466 2003-05-09    <johan AT balder>
5467
5468         * src/SDCCglue.c: fixed bug #597940
5469
5470 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
5471
5472         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
5473   cache sfr, optimize next,step, fix off by one sourceline,
5474   support ddd list function.
5475         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
5476
5477 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
5478
5479         * support/regression/HTMLgen.py: added compare_s2f()
5480         * support/regression/Makefile: redo 1.27
5481         * support/regression/generate-cases.py: redo 1.5
5482
5483 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
5484
5485         * support/regression/tests/float.c: workaround 33 bit hex constant
5486         * support/regression/tests/simplefloat.c: fix division for host
5487
5488 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
5489
5490         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
5491         that tame's the PIC's over-aggressive optimizer.
5492
5493 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5494
5495          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
5496          support for MSVC.
5497
5498 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
5499
5500         Initial support for DS80C400. "Hello world" runs on TINIm400
5501         (with polled I/O).
5502
5503 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
5504
5505          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
5506          * Some notes on ddd usage added in debugger/README
5507          Martin Helmling adding more features and fixes for ddd GUI debugger.
5508          Code added for nexti, stepi, up, down, and other adjustments.
5509
5510 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
5511
5512         * src/pic/pCodepeep.c non-wildcard asmops are now handled
5513         * src/pic/peeph.def Added two rules to optimize carry manipulation
5514         * src/pic/* removed debug printfs
5515
5516 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
5517
5518         * debugger/mcs51/cmd.c: added header newalloc.h
5519
5520 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
5521
5522         * as/Makefile: new EXEEXT
5523         * as/z80/Makefile: remove trailing slash of BUILDIR
5524         * as/z80/clean.mk: new EXEEXT
5525         * Makefile.common.in: add to CFLAGS (and others), don't replace it
5526         * support/cpp2/Makefile.in: new EXEEXT
5527         * src/pic/glue.c (pic14emitRegularMap): fixed warning
5528
5529 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
5530
5531         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
5532         EXEEXT was introduced to fix all related problems with targets
5533         "clean", "install" and "uninstall"; a couple of further flaws
5534         especially with "clean" have been fixed too
5535         * as/mcs51/Makefile.in
5536         * as/mcs51/clean.mk
5537         * as/z80/Makefile
5538         * Makefile
5539         * clean.mk
5540         * debugger/mcs51/Makefile.in
5541         * debugger/mcs51/clean.mk
5542         * link/z80/Makefile
5543         * link/z80/Makefile.in
5544         * link/z80/clean.mk
5545         * link/Makefile
5546         * packihx/Makefile.in
5547         * packihx/clean.mk
5548         * sim/ucsim/Makefile
5549         * sim/ucsim/clean.mk
5550         * sim/ucsim/avr.src/Makefile.in
5551         * sim/ucsim/avr.src/clean.mk
5552         * sim/ucsim/s51.src/Makefile.in
5553         * sim/ucsim/s51.src/clean.mk
5554         * sim/ucsim/xa.src/Makefile.in
5555         * sim/ucsim/xa.src/clean.mk
5556         * sim/ucsim/z80.src/Makefile.in
5557         * sim/ucsim/z80.src/clean.mk
5558         * sim/ucsim/main_in.mk
5559         * sim/ucsim/packages_in.mk
5560         * sim/ucsim/gui.src/Makefile.in
5561         * sim/ucsim/gui.src/serio.src/Makefile.in
5562         * sim/ucsim/gui.src/serio.src/clean.mk
5563         * src/Makefile.in
5564         * src/clean.mk
5565         * support/cpp2/Makefile.in
5566         * support/cpp2/clean.mk
5567         * support/makebin/Makefile
5568         * support/makebin/clean.mk
5569         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
5570         * doc/sdccman.lyx: --program-suffix no longer needed
5571
5572 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
5573
5574          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
5575          Martin Helmling added support for ddd GUI debugger.
5576          Code added to display assembly, set variables, and other commands
5577          to interface to ddd.
5578
5579 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
5580
5581         * as/Makefile: fix target clean
5582         * as/clean.mk: fix target clean
5583         * as/z80/clean.mk: fix target clean
5584
5585 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
5586
5587         * Makefile.common.in: added  AT EXEEXT AT
5588         * configure.in: removed all mingw32 stuff
5589         * configure: rebuilt from configure.in
5590         * doc/sdccman.lyx: updated section "installation"
5591         * support/scripts/sdcc_mingw32: adapted to configure
5592         * support/scripts/sdcc_cygwin_mingw32: added
5593
5594 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
5595
5596         * src/pic Added object file support for the PIC port
5597         * src/pic Applied patch from Craig Franklin (this started the object file support)
5598         * src/regression Updated the PIC regression tests for object files
5599
5600 2003-04-20  Borut Razem <borut.razem AT siol.net>
5601
5602         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
5603           lklex.c: In function `getfid':
5604           lklex.c:203: warning: array subscript has type `char'
5605         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
5606           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
5607         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
5608           stack handling macros
5609
5610 2003-04-19  Borut Razem <borut.razem AT siol.net>
5611
5612         * "handling space characters in file path" task:
5613         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
5614         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
5615         * support/Util/MySystem.h: make it self-sufficient
5616         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
5617           src/z80/main.c, sdcc/as/mcs51/lklex.c:
5618           handling space characters in file path
5619         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
5620           (it will be used by assemblers, which have their own includes, e.g. gpasm)
5621         * support/Util/MySystem.c: handling space characters in executable's path
5622
5623 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
5624
5625         * as/z80/Makefile: fix permanent rebuild of z80
5626         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
5627         * support/regression/tests/bitfields.c: added Johan's bitfields.c
5628
5629 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
5630
5631         * src/SDCCopt.c: add special case optimization to replace modulo by
5632           a power of two with a bitwise AND.
5633
5634 2003-04-18    <johan AT balder>
5635
5636         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
5637
5638 2003-04-17    <johan AT balder>
5639
5640         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
5641         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
5642
5643 2003-04-13  Borut Razem <borut.razem AT siol.net>
5644
5645         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
5646         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
5647           fixed mingw problem in adl_NORMALIZE_PATH
5648
5649 2003-04-12  Borut Razem <borut.razem AT siol.net>
5650
5651         * fixed "#pragma SAVE/RESTORE can not be nested":
5652         * src/SDCC.lex: reworked pragma handling functions
5653         * sdcc/src/SDCCglobl.h: reworked stack handling macros
5654         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
5655
5656 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
5657
5658         * src/SDCCutil.c (pathEquivalent): defined but not used
5659         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
5660         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
5661         * configure: rebuilt from configure.in
5662         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
5663         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
5664         * device/include/Makefile.in: replace sdcc_datadir
5665         * device/lib/Makefile.in: replace sdcc_datadir
5666         * Makefile.common.in: add LDFLAGS from configure
5667         * packihx/Makefile.in: use LDFLAGS
5668         * src/Makefile.in: use LDFLAGS
5669         * support/cpp2/Makefile.in: add LDFLAGS from configure
5670         * support/makebin/Makefile: use LDFLAGS
5671         * .version: bumped version number to 2.3.5
5672
5673 2003-04-12  Borut Razem <borut.razem AT siol.net>
5674
5675         * completed "different paths" task:
5676         * src/SDCCmacro.c: fixed bug in handling quotes
5677         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
5678         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
5679
5680 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
5681
5682         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
5683
5684 2003-04-11 kevin Vigor <kevin AT vigor.nu>
5685
5686         * ds390/gen.c ds390/peeph.def: fix bug 706781
5687
5688 2003-04-11  Borut Razem <borut.razem AT siol.net>
5689
5690         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
5691
5692 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
5693
5694         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
5695         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
5696          set - this bit used to not be set...).
5697         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
5698           bad code in PIC Port
5699         * src/regression/and2.c added to test bug 609268
5700         * src/regression/Makefile added and2.c to regression test
5701
5702
5703 2003-04-08    <johan AT CP255758-A>
5704
5705         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
5706         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
5707         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
5708
5709 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
5710
5711         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
5712         fix bug #487815
5713         * support/cpp2/Makefile.in: fix bug #487815
5714         * configure: rebuilt from configure.in
5715         * Makefile.common.in: docdir changed, new path suffixes
5716         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
5717         * sdcc_vc_in.h: reflect changes from sdccconf.h
5718         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
5719         * src/SDCCutil.h: remove BINDIR hack
5720         * doc/sdccman.lyx: update new path hierarchy
5721
5722 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
5723
5724         * src/SDCCpeeph.c: added okToRemoveSLOC test
5725
5726 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
5727
5728         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
5729
5730 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
5731
5732         * src/SDCCpeeph.c: added labelIsReturnOnly test
5733         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
5734
5735 2003-04-05    <johan AT balder>
5736
5737         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
5738         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
5739         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
5740         * src/SDCCast.c: fixed a warning
5741         * src/SDCCast.h: fixed a warning
5742         * src/SDCCicode.c (operandFromAst): fixed a warning
5743
5744 2003-04-04    <johan AT balder>
5745
5746         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
5747         * src/SDCCast.c (decorateType): fixed bug #715076
5748         * src/SDCC.y: fixed bug #702907
5749
5750 2003-04-03    <johan AT balder>
5751
5752         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
5753         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
5754         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
5755         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
5756         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
5757
5758 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
5759
5760         * _decdptr.c: fix return values
5761         * _gptrget.c: fix return values
5762         * _gptrgetc.c: fix return values
5763         * _gptrput.c: fix return values
5764         * _mulint.c: fix return values
5765         * as/z80/Makefile: fix 'make -j' problem
5766
5767 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
5768
5769         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
5770         * configure.in: big cleanup, updated to autoconf 2.5x
5771         * configure: rebuilt from configure.in
5772         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
5773         * sdcc_vc_in.h: reflect changes from sdccconf.h
5774         * doc/Makefile: fixed a flaw in "make install"
5775
5776 2003-04-02    <johan AT balder>
5777
5778         * src/ds390/gen.c (genCmp): no comments
5779         * src/mcs51/gen.c (genCmp): no comments
5780         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
5781         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
5782
5783 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
5784
5785         * support/regression/generate-cases.py: place generated file in given sub directory
5786         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
5787         * support/regression/Makefile: improvements for 'make -j';
5788         side effect: it's simpler and faster now
5789
5790 2003-03-31  Borut Razem <borut.razem AT siol.net>
5791
5792         * src/z80/main.c: link-{port} and as-{port} defined without path
5793         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
5794
5795 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
5796
5797         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
5798
5799 2003-03-30  Borut Razem <borut.razem AT siol.net>
5800
5801         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
5802           changed type of list parameter to set
5803         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
5804         * src/port.h: changed type of do_assemble() parameter to set
5805         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
5806           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
5807           definition of "cppoutfilename" macro with NULL value in preProcess()
5808         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
5809         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
5810         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
5811           replaced with set *binPathSet
5812         * shash_add() deallocates the item, if allready exsists, before adding the new one
5813         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
5814
5815 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
5816
5817         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
5818           a nested for loop bug in the PIC port
5819         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
5820           for loops
5821
5822 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
5823
5824         * support/Util/dbuf.h: remove C++ stuff to make it portable
5825
5826 2003-03-28  Borut Razem <borut.razem AT siol.net>
5827
5828         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
5829           literal strings in stringLiteral()
5830         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
5831         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
5832           to the project
5833
5834 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
5835
5836         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
5837
5838 2003-03-26    <johan AT balder>
5839
5840         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
5841         * src/ds390/gen.c (saveRegisters): catched symbol abuse
5842         * src/SDCCast.c (decorateType): fixed " -v < 3"
5843
5844 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
5845
5846         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
5847         Added Lenny Story's debug infrastructure changes:
5848         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
5849         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
5850         * src/cdbFile.c: added
5851         * src/SDCCdebug.c: added
5852         * src/SDCCdebug.h: added
5853         * src/SDCCast.c (createFunction)
5854         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
5855         * src/SDCCmain.c (parseCmdLine, main)
5856         * src/SDCCmem.c (redoStackOffsets)
5857         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
5858         * src/SDCCsymt.h
5859         * src/common.h
5860         * src/avr/gen.c (genAVRCode)
5861         * src/ds390/gen.c (gen390Code)
5862         * src/mcs51/gen.c (gen51Code)
5863         * src/pic/gen.c (genpic14Code)
5864         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
5865         * src/xa51/gen.c (genXA51Code)
5866         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
5867
5868 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5869
5870         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
5871         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
5872
5873 2003-03-22    <johan AT balder>
5874
5875         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
5876
5877 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
5878
5879         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
5880         * doc/cdbfileformat.lyx: added, written by Lenny Story
5881         * doc/Makefile: added cdbfileformat.lyx
5882         * doc/clean.mk: added cdbfileformat.lyx
5883
5884 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
5885
5886         * src/mcs51/peeph.def: fix bug #705773
5887
5888 2003-03-20    <johan AT balder>
5889
5890         An sfr/sbit can have an "at #" AND an initializer
5891         * src/SDCCsymt.c (checkSClass):
5892         * src/SDCCmem.c (allocGlobal):
5893         * src/SDCCmem.c (allocLocal):
5894         * src/SDCCast.c (createBlock):
5895
5896 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
5897
5898         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
5899
5900 2003-03-16    <johan AT balder>
5901
5902         Undid the hackup of const and volatile, the problem is much bigger
5903         * src/SDCC.y:1.65
5904         * src/SDCCast.c:1.171
5905         * src/SDCCglue.c:1.138
5906         * src/SDCCicode.c:1.146
5907         * src/SDCCsymt.c:1.150
5908         * src/SDCCval.c:1.65
5909
5910 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
5911
5912         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
5913         * src/ds390/gen.c (genAddrOf): fixed bug #704087
5914
5915 2003-03-13    <johan AT balder>
5916
5917         Hackup const and volatile modifiers in type chains a bit:
5918         * src/SDCC.y:1.63
5919         * src/SDCCast.c:1.169
5920         * src/SDCCglue.c:1.136
5921         * src/SDCCicode.c:1.143
5922         * src/SDCCsymt.c1.146
5923         * src/SDCCsymt.h1.59
5924         * src/SDCCval.c:1.63
5925
5926 2003-03-12    <johan AT balder>
5927
5928         * src/SDCCBBlock.h: more LRH debugging junk
5929         * src/SDCCcflow.h: more LRH debugging junk
5930         * src/SDCCloop.c: more LRH debugging junk
5931         * src/SDCC.y (struct_declaration): fixed bug #697590
5932         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
5933         * src/ds390/gen.c (aopForRemat): fixed bug #700031
5934         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
5935
5936 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
5937         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
5938         test function names must now match exactly).
5939         * src/SDCCcse.c: added special case in findCheaperOp to allow
5940         extending a short integer. Makes less awful code for bug 700121 test case.
5941
5942 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5943
5944         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
5945         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
5946
5947 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
5948
5949         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
5950         actually called (operandsNotEqual() was called for all
5951         operandsNotEqualX tests).
5952
5953 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
5954
5955         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
5956         with shorter literals. Fixes bug 700121.
5957
5958 2003-03-11    <johan AT balder>
5959
5960         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
5961
5962 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
5963
5964         * src/SDCCloop.c (mergeRegions): an evil beast is dead
5965         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
5966
5967 2003-03-10  Borut Razem <borut.razem AT siol.net>
5968
5969         * src/SDCCmain.c: pipe preprocessor's output
5970         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
5971         * sdcc_vc_in.h: define pclose as _pclose for WIN32
5972         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
5973         which closes all pipes in pipeSet set
5974         * src/SDCCset.c: free deleted item in function deleteSetItem()
5975         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
5976         moved from z80 to src subproject
5977         * .version: increased version number to 2.3.4
5978
5979 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
5980
5981         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
5982         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
5983         * support/regression/ports/xa51/spec.mk: fix typo
5984
5985 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
5986
5987         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
5988
5989 2003-03-09  Borut Razem <borut.razem AT siol.net>
5990
5991         * src/SDCCmain.c: pipe preprocessor's output
5992         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
5993         * sdcc_vc_in.h: define pclose as _pclose for WIN32
5994         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
5995         which closes all pipes in pipeSet set
5996         * src/SDCCset.c: free deleted item in function deleteSetItem()
5997         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
5998         moved from z80 to src subproject
5999
6000 2003-03-09  Borut Razem <borut.razem AT siol.net>
6001
6002         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
6003         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
6004         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
6005         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
6006         * src/SDCCglobl.h: unification of WIN32 native definitions
6007
6008 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6009
6010         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
6011
6012 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
6013
6014         * src/configure.in:   check for endianess (even while cross-compiling)
6015         * src/configure:      check for endianess (even while cross-compiling)
6016         * src/configure_in.h: check for endianess (even while cross-compiling)
6017         * src/avr/gen.c:        remove old endianess stuff
6018         * src/mcs51/gen.c:      remove old endianess stuff
6019         * src/ds390/gen.c:      remove old endianess stuff
6020         * src/pic/gen.c:        remove old endianess stuff
6021         * src/pic/genarith.c:   remove old endianess stuff
6022         * src/pic/glue.c:       fix endianess check
6023         * src/pic16/gen.c:      remove old endianess stuff
6024         * src/pic16/genarith.c: remove old endianess stuff
6025         * src/pic16/glue.c:     fix endianess check
6026         * src/xa51/gen.c:       remove old endianess stuff
6027         * src/z80/gen.c:        fix endianess check
6028         * src/SDCCglue.c:       fix endianess check
6029         * src/ds390/peeph.def: fix bug 700036
6030
6031 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
6032
6033         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
6034         * src/configure: find appropriate data-types on host for SDCC's int and long
6035         * src/configure.in: find appropriate data-types on host for SDCC's int and long
6036         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
6037         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
6038
6039 2003-03-07    <johan AT balder>
6040
6041         Just a big NOOP:
6042                 some minor cleanups before the big shot
6043                 OP_DEFS and OP_USES now use Kevin's protection
6044                 new option --nolabelopt
6045
6046         * src/SDCCBBlock.c:
6047         * src/SDCCast.c,:
6048         * src/SDCCcflow.c:
6049         * src/SDCCcse.c:
6050         * src/SDCCicode.c:
6051         * src/SDCCicode.h:
6052         * src/SDCClabel.c:
6053         * src/SDCCloop.c:
6054         * src/SDCCmain.c:
6055         * src/ds390/ralloc.c:
6056         * src/mcs51/ralloc.c:
6057         * src/pic/ralloc.c:
6058         * src/xa51/ralloc.c:
6059         * src/z80/ralloc.c:
6060
6061 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
6062
6063         * src/pic/pcode.c (get_op): fix 64 bit warnings
6064         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
6065         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
6066         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
6067         * support/regression/tests/malloc.c: fix 64 bit warnings
6068
6069 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
6070
6071         * src/mcs51/gen.c (genMinus): fixed bug 696436
6072
6073 2003-03-02  Borut Razem <borut.razem AT siol.net>
6074
6075         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
6076
6077 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
6078
6079         * configure.in: test for mkstemp
6080         * sdccconf_in.h: add HAVE_MKSTEMP
6081
6082 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
6083
6084         * device/include/ctype.h: removed warning while using --stack-auto
6085         * device/include/malloc.h: removed warning while using --stack-auto
6086         * device/include/string.h: removed warning while using --stack-auto
6087
6088 2003-02-23  Borut Razem <borut.razem AT siol.net>
6089
6090         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
6091         because NDEBUG is defined (see man assert)
6092         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
6093
6094 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6095
6096         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
6097         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
6098
6099 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6100
6101         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
6102         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
6103
6104 2003-02-18    <johan AT balder>
6105
6106         * as/mcs51/asmain.c (asmbl): module can start with a digit
6107         * as/z80/asmain.c (asmbl): module can start with a digit
6108
6109 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
6110
6111         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
6112         * src/asm.c: fix pipe() for Mingw32
6113
6114 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
6115
6116         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
6117         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
6118         make -V work again; --c1mode reads now from stdin
6119         * doc/sdccman.lyx: added --c1mode
6120         * support/Util/SDCCerr.c: new messages for c1 mode
6121         * support/Util/SDCCerr.h: new messages for c1 mode
6122         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
6123
6124 2003-02-15    <johan AT balder>
6125
6126         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
6127
6128 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
6129
6130         * doc/sdccman.lyx: Environment variables, -o and other minor things
6131
6132 2003-02-14    <johan AT balder>
6133
6134         * src/xa51/main.c: before anyone really tries to use it :)
6135
6136         * Install doc's in share/sdcc/doc
6137         * removed some obsolete files
6138         * Do a proper make distclean and uninstall
6139         M Makefile.common.in
6140         R sdccbuild.sh
6141         M as/Makefile
6142         M device/include/Makefile.in
6143         M device/lib/Makefile.in
6144         M doc/sdccman.lyx
6145         M link/Makefile
6146         M sim/ucsim/doc/Makefile.in
6147         M src/clean.mk
6148         R src/avr/peeph.rul
6149         R src/xa51/peeph.rul
6150         M support/cpp2/Makefile.in
6151         M support/makebin/Makefile
6152
6153
6154 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
6155
6156         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
6157
6158 2003-02-10  Borut Razem <borut.razem AT siol.net>
6159
6160         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
6161         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
6162         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
6163         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
6164         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
6165         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
6166         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
6167         src/z80/Makefile.bcc: Borland Makefile cleanup
6168         * as/z80/Makefile.bcc: Added Borland Makefile
6169         * support/cpp2/borland.h: Removed
6170
6171 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
6172
6173         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
6174         * src/SDCC.lex: new pragma NOIV
6175         * src/SDCCglobl.h: new pragma NOIV
6176         * src/SDCCmem.c: new pragma NOIV
6177
6178 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
6179
6180         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
6181
6182 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
6183
6184         * src/SDCCmain.c: signal handling is switched off by --debug
6185         * doc/Makefile: small fix for install; use clean.mk again
6186         * doc/clean.mk: clean *.pdf and *.html too
6187
6188 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
6189
6190         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
6191         * device/lib/printfl.c: fix a ds390 bug by making it portable
6192         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
6193         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
6194         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
6195         * debugger/mcs51/cmd.c: converted multi-line string literals
6196         * sim/ucsim/globals.cc: converted multi-line string literals
6197         * src/SDCCmain.c: introduced signal handler to remove temp files
6198         * doc/Makefile: small tweaks, implement clean
6199         * doc: removed generated files
6200
6201 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6202
6203         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
6204         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
6205         Address Record is not correctly generated for DS390."
6206
6207 2003-02-02  Borut Razem <borut.razem AT siol.net>
6208
6209         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
6210         * as/mcs51/asm.h: fixed compilation with Borland C
6211         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
6212         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
6213         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
6214         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
6215         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
6216         src/z80/Makefile.bcc: delete $(LIB) only if exist
6217         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
6218
6219 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
6220
6221         * device/include/malloc.h: introduced NULL
6222         * device/include/string.h: introduced NULL
6223         * device/include/stdlib.h: introduced NULL
6224         * device/lib/_memcpy.c: removed NULL
6225         * device/lib/_strcat.c: removed NULL
6226         * device/lib/_strchr.c: removed NULL
6227         * device/lib/_strcmp.c: removed NULL
6228         * device/lib/_strcpy.c: removed NULL
6229         * device/lib/_strcspn.c: removed NULL
6230         * device/lib/_strlen.c: removed NULL
6231         * device/lib/_strncat.c: removed NULL
6232         * device/lib/_strncmp.c: removed NULL
6233         * device/lib/_strncpy.c: removed NULL
6234         * device/lib/_strpbrk.c: removed NULL
6235         * device/lib/_strrchr.c: removed NULL
6236         * device/lib/_strspn.c: removed NULL
6237         * device/lib/_strstr.c: removed NULL
6238         * device/lib/_strtok.c: removed NULL
6239         * device/lib/malloc.c: removed NULL, include own header
6240
6241 2003-02-02    <johan AT balder>
6242
6243         * 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
6244         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
6245         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
6246         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
6247         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
6248         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
6249
6250 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6251
6252         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
6253         area 'DATA'"
6254
6255 2003-02-01    <johan AT balder>
6256
6257         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
6258
6259 2003-01-31    <johan AT CP255758-A>
6260
6261         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
6262
6263 2003-01-30    <johan AT balder>
6264
6265         * src/SDCCBBlock.c: automatic bug detection
6266         * src/SDCCicode.c: automatic bug detection
6267
6268 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6269
6270         * src/SDCCglobl.h:   now --xram-size 0 works
6271         * src/SDCCmain.c:    now --xram-size 0 works
6272
6273 2003-01-29    <johan AT balder>
6274
6275         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
6276
6277 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6278
6279         * as/mcs51/aslink.h: Added options --xram-size and --code-size
6280         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
6281         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
6282         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
6283         * src/SDCCglobl.h:   Added options --xram-size and --code-size
6284         * src/SDCCmain.c:    Added options --xram-size and --code-size
6285
6286 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
6287
6288         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
6289         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
6290
6291 2003-01-27    <johan AT balder>
6292
6293         * src/SDCC.y: fixed bug #613764
6294
6295 2003-01-26    <johan AT balder>
6296
6297         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
6298         * src/SDCCsymt.h: fixed bug #673374
6299         * src/SDCCglue.c: fixed bug #661910
6300         * src/SDCCast.c: fixed bug #458099 and 673374
6301
6302 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
6303
6304         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
6305         * as/mcs51/strcmpi.h: added
6306         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
6307         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
6308         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
6309         * as/mcs51/assym.c: strcmpi -> as_strcmpi
6310         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
6311         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
6312         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
6313         * as/mcs51/Makefile.aslink: new module strcmpi
6314         * as/mcs51/Makefile.asx8051: new module strcmpi
6315         * as/mcs51/Makefil.bcc: new module strcmpi
6316         * as/mcs51/Makefile.in: new module strcmpi
6317         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
6318
6319 2003-01-26    <johan AT balder>
6320
6321         * src/SDCCglue.c: reverted back to 1.124
6322         * src/SDCCast.c: reverted back to 1.156
6323         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
6324
6325 2003-01-25    <johan AT balder>
6326
6327         * src/SDCCglue.c: A better fix for bug #661910
6328         * src/SDCCast.c: A better fix for bug #661910
6329         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
6330
6331 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
6332
6333         * src/Makefile.in: remove spawn.o
6334         * src/SDCCmain.c: remove spawn.h
6335         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
6336         * src/spawn.c: removed
6337         * src/spawn.h: removed
6338         * support/regression/ports/ds390/spec.mk: link with -r
6339
6340 2003-01-24    <johan AT CP255758-A>
6341
6342         * src/ds390/gen.c (aopOp): fixed bug #667458
6343         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
6344         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
6345         (createIvalCharPtr): an ival doesn't always have a storage class anymore
6346
6347 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
6348
6349         * src/mcs51/peeph.def: better assembler identation by Frieder
6350         * src/mcs51/gen.c: better assembler identation by Frieder
6351
6352 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
6353
6354         * as/z80/string.h: removed for gcc 3.2
6355         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
6356         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
6357
6358 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
6359
6360         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
6361         * src/SDCCpeeph.c (replaceRule): fix bug #663503
6362         * support/regression/Makefile: separate temp files for ports
6363         * support/regression/generate-cases.py: separate temp files for ports
6364         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
6365         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
6366
6367 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
6368
6369         * moved tinitalk to device/examples/ds390
6370
6371 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
6372
6373         * as/mcs51/lkmem.c: rflag is for DS390
6374         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
6375         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
6376                          (linkEdit): move mem- and map-files the same way as ihx-files
6377         * src/z80/main.c (_setDefaultOptions): removed --generic
6378         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
6379         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
6380         * src/pic/glue.c (picglue): --c1mode works again
6381         * src/pic16/glue.c (pic16glue): --c1mode works again
6382         * src/asm.c (printCLine): fix #660034
6383
6384 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
6385
6386         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
6387         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
6388         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
6389         * as/mcs51/lkmem (summary): better fix for sp problem
6390         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
6391         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
6392         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
6393                                               remove --stack-after-data
6394
6395 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
6396
6397         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
6398         * src/SDCCutil.c (join): ugly bug: missing '\0'
6399         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
6400
6401 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
6402
6403         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
6404         * src/port.h: typo
6405         * src/pic/main.c (_asmCmd): gpasm supports -o
6406         * src/z80/main.c: more general macros
6407         * device/lib/Makefile.in: remove intermediate files
6408
6409 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
6410
6411         * .version: Bumped version number to 2.3.3
6412         * src/SDCCBBlock.c: new option -o
6413         * src/SDCCglobl.h: new option -o
6414         * src/SDCCglue.c: new option -o
6415         * src/SDCCmain.c: new option -o
6416         * src/asm.c: new option -o
6417         * src/ds390/main.c: new option -o
6418         * src/pic/glue.c: new option -o
6419         * src/pic/pcode.c: new option -o
6420         * src/pic/ralloc.c: new option -o
6421         * src/pic16/glue.c: new option -o
6422         * src/pic16/pcode.c: new option -o
6423         * src/pic16/ralloc.c: new option -o
6424         * src/z80/main.c: new option -o
6425         * device/lib/Makefile.in: use -o
6426         * support/regression/ports/ds390/spec.mk: use -o
6427         * support/regression/ports/gbz80/spec.mk: use -o
6428         * support/regression/ports/mcs51/spec.mk: use -o
6429         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
6430         * support/regression/ports/z80/spec.mk: use -o
6431         * support/regression/ports/ucz80/spec.mk: use -o
6432         * support/regression/ports/xa51/spec.mk: use -o
6433         * support/regression/fwk/lib/timeout.c: fix usage string
6434
6435 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
6436         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
6437
6438 2003-01-07    <johan AT balder>
6439
6440         * src/SDCCast.c (decorateType): fixed bug #600035
6441
6442 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
6443         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
6444         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
6445         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
6446         * src/pic/pcode.c: outcommented unused variable to remove warnings
6447         * src/pic/ralloc.c: outcommented unused variable to remove warnings
6448
6449 2003-01-06    <karl AT turbobit.com>
6450         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
6451    regression tests.
6452
6453 2003-01-06    <johan AT balder>
6454
6455         * src/SDCCicode.c: fixed array add
6456
6457 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
6458         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
6459         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
6460
6461 2003-01-04    <johan AT balder>
6462
6463         * src/SDCCval.c (getNelements): fixed the initialized array of structures
6464
6465 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6466         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
6467
6468 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
6469         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
6470         * support/regression/tests/bug-524697.c: fit mem usage into 8032
6471
6472 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
6473         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
6474
6475 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
6476         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
6477
6478 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
6479         * src/mcs51/main.c: removed {bindir}{sep} from aslink
6480
6481 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6482
6483     * in \sdcc\as\mcs51\ changed these files in order to create an
6484     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
6485     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
6486     following files to include the previous two files: aslink.dsp,
6487     Makefile.aslink, Makefile.bcc, and Makefile.in.
6488
6489     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
6490     .adb instead of .cdb
6491
6492 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6493
6494         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
6495         value from option --iram-size.
6496
6497 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6498
6499         * \sdcc\as\mcs51\lklist.c: added boundary check before using
6500         dram[] array.
6501
6502 2002-09-18    <wiml AT hhhh.org>
6503
6504         * SDCClrange.h: exposed setFromRange() and setToRange()
6505         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
6506           packRegsForAccUse() (bug 542397)
6507         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
6508           multiple times and emitting the fetch operations more than once
6509           added aopGetUsesAcc() function to allow binary operators to
6510           fetch their operands in the correct order; made genMinus() emit
6511           compact code for X = LITERAL - Y
6512
6513 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6514         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
6515         sprintf() in line 1267.
6516
6517 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6518         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
6519         like ports.
6520
6521 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6522         Changes to aslink (All the changes are marked with 'JCF'):
6523
6524         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
6525         summary().
6526
6527         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
6528         area BSEG.  Also moves, if possible, the DATA area down into the internal
6529         ram so more space is available.
6530
6531         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
6532         sflag.
6533
6534         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
6535         not bytes.  Function summary() which creates a memory usage summary
6536         file with extension .mem.  Reports of overlaping stack and small stack
6537         size.  If the space for the stack is less than 16 bytes aslink trows a
6538         warning.
6539
6540         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
6541         the 8051.  Option 'y' for memory summary output file.
6542
6543         Changes to sdcc (All the changes are marked with 'JCF'):
6544
6545         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
6546
6547         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
6548         overlaying area for it (uses RegBankUsed[4]).
6549
6550         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
6551         bank zero as used by default.  By default aslink locates the stack
6552         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
6553         the creation of the .mem file.  Delegates the allocation of data area
6554         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
6555         the begining of the stack area to aslink.
6556
6557         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
6558         glue() in SDCCglue.c creates an area for it.
6559
6560 2002-09-03  Borut Razem <borut.razem AT siol.net>
6561         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
6562         sdcc/src/pic/glue.c:
6563         introduced atexit() handler for teporay files removal in case of
6564         errors, assertions, ...
6565
6566 2002-08-29  Borut Razem <borut.razem AT siol.net>
6567         * sdcc/support/cpp2/auto-host_vc_in.h:
6568         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
6569         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
6570         Maybe there is a similar problem with BORLANDC? It should be checked!
6571
6572         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
6573         corrected improper use of assert: the assignment to clr variable was done inside the assert.
6574         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
6575         was not executed, and the compiler (cl) launched a warning:
6576         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
6577
6578 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6579         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
6580
6581 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
6582         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
6583
6584         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
6585           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
6586           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
6587           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
6588           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
6589           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
6590           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
6591         - added Release configuration in VS projects
6592         - review of compiler an linker options
6593         - VC .exe files are generated in bin_vc directory, not to interfere
6594           with binaries generated from other projects (cygwin, mingw, bcc ...)
6595
6596         * sdcc/src/yacc.dsp: added
6597
6598         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
6599         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
6600         and insert the version number definitions from .version
6601
6602         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
6603
6604         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
6605         added - genarate auto-host.h using auto-host_vc_in.h as template
6606
6607         * sdcc/sdcc_vc.h,
6608         removed from CVS, generated automatically
6609
6610 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
6611         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
6612
6613 2002-08-11  Borut Razem <borut.razem AT siol.net>
6614         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
6615
6616 2002-08-10  Borut Razem <borut.razem AT siol.net>
6617         * src/SDCCmain.c (main):
6618         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
6619         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
6620         The consequence was that some temporary files were not removed.
6621
6622         * src/SDCCglue.c:
6623         unification of code in functions tempfilename() and tempfile():
6624         function tempnam() is defined in Visual Studio 6.0 and .NET
6625
6626         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
6627
6628         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
6629           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
6630         - removed compiler command line option /WX: Treats all warnings as errors
6631         - update a list of source files, included into the project
6632
6633         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
6634           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
6635         changed project type to Generic Project so that can be correcly converted to VS.NET project
6636
6637         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
6638
6639         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
6640
6641         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
6642
6643         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
6644         added return 0 statements after assert() to make compiler happy
6645
6646         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
6647         added newline in the def file to keep MSC compiler satisfied
6648
6649         * sdcc/src/z80/gen.c:
6650         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
6651           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
6652         - solved MSC error in function aopDump()
6653
6654         * sdcc_vc.h: define PREFIX as "\\sdcc"
6655
6656 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
6657         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
6658
6659 2002-06-22  Scott Dattalo <scott AT dattalo.com>
6660         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
6661         - Rewrote the register banking algorithm.
6662         - Added pCode live-range analysis to registers (for now, only non-used and
6663         singly-used registers optimized away)
6664
6665         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
6666
6667         * 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.
6668
6669 2002-05-10  Scott Dattalo <scott AT dattalo.com>
6670         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
6671
6672 2002-04-22  Michael Hope  <michaelh AT vroom>
6673
6674         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
6675
6676         * configure.in (DD_COPT): Added include support required for gbdk.
6677
6678         * .version: Bumped version number just to increase it.
6679
6680         * src/SDCCmain.c: Added -nostdinc to the default options.
6681
6682 2002-04-15  Michael Hope  <michaelh AT vroom>
6683
6684         * device/lib/z80/printf.c (sprintf): Added.
6685
6686         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
6687
6688         * src/z80/peeph.def: Added transpose redundent load rule.
6689
6690         * src/z80/main.c: Added force callee saves for jaune.
6691
6692         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
6693
6694         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
6695
6696 2002-03-28  Johan Knol  <johan AT balder>
6697
6698         * src/SDCCval.c: fixed bug #532436
6699
6700 2002-03-14  Scott Dattalo <scott AT dattalo.com>
6701         * /src/port.h:
6702         Added "char *Processor" field to the port structure.
6703
6704         * /src/SDCCmain.c:
6705         Added -p option. Allows port dependent processor to be specified.
6706
6707         * all ports:
6708         Initialized the new field char *Processor field to NULL in all ports
6709
6710         * /src/pic/*:
6711         Compiler generated registers for interrupt context saving
6712         were not getting allocated.
6713
6714 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
6715
6716         * /src/SDCCast.c:
6717         Fixed left shift. Will promote the left side of a left shift
6718         if a) left shifting more than size of operand or b) when assigned
6719         to something size > size of left side
6720
6721 2002-03-14  Scott Dattalo <scott AT dattalo.com>
6722         * src/pic/*
6723         tons of changes. Register allocation has been
6724         rewritten. Added customization for the various PICs. Flow
6725         analysis is restructured. ...
6726
6727         * src/pic/device.h:
6728         Added
6729
6730         * src/pic/device.c:
6731         Added. device.c is a PIC port hack to accomodate variations
6732         in PIC devices.
6733
6734 2002-03-13  Michael Hope  <michaelh AT vroom>
6735
6736         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
6737
6738 2002-03-04  johanknol  <johanknol AT manik>
6739
6740         * /src/SDCCval.c: fixed
6741
6742         const unsigned char arr[][2] = { { 0, 1 } };
6743         t18.c:1: error: Initializer element is not constant
6744
6745 2002-03-04  bela  <bela AT manik>
6746
6747         * /device/include/mcs51reg.h:
6748         ds89c420 register definition update
6749
6750 2002-03-03    <johan AT FRIJA>
6751
6752         * support/Util/SDCCerr.c: did something, but don't no why anymore
6753
6754         * support/regression/tests/bug-524691.c: made it a little less shy
6755
6756         * src/SDCCast.c (decorateType): fixed bug #524697
6757
6758         * src/SDCCast.c: made some lineno improvements
6759
6760         * src/SDCCval.c (getNelements): changed warning to error
6761
6762         * src/SDCCglue.c (printIvalArray): changed warning to error
6763
6764         * src/SDCCicode.c: fixed a warning for mingw
6765
6766         * src/SDCCast.c (decorateType): fixed the << promotion for ops
6767
6768         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
6769
6770 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
6771
6772         * src/ds390/peeph.def:
6773         Added some more peephole rules
6774
6775         * src/ds390/gen.c: Various fixes & enhancements
6776
6777         * src/SDCClrange.c, src/SDCClrange.h:
6778         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
6779
6780         * src/ds390/ralloc.c:
6781         various fixes & enhancements (ds390) specific
6782
6783         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
6784         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
6785         from rallocs.
6786
6787         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
6788
6789 2002-03-02    <johan AT FRIJA>
6790
6791         * src/SDCCast.c (decorateType): fixed bug #524708
6792
6793         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
6794
6795         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
6796
6797 2002-03-01  Michael Hope  <michaelh AT vroom>
6798
6799         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
6800
6801         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
6802
6803 2002-03-01    <johan AT FRIJA>
6804
6805         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
6806
6807         * src/SDCCast.c (decorateType): fixed bug #524209
6808
6809         * src/SDCCval.c (valNot): fixed bug #524195
6810
6811 2002-02-26    <johan AT balder>
6812
6813         * src/xa51/gen.c: fixed a warning
6814
6815         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
6816
6817         * src/SDCCast.c (decorateType): fixed bug #522534
6818
6819 2002-02-23    <johan AT balder>
6820
6821         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
6822
6823 2002-02-22    <johan AT balder>
6824
6825         * src/SDCCast.c: fixed bug #514865
6826
6827         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
6828
6829 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
6830
6831         * sdcc/src/SDCCloop.c:
6832         Previous fix was not good. basic blocks that have "break" or "return" are
6833         not really partof a loop , but live ranges used in these blocks should
6834         be live thru the entire loop, so set partOfLoop but don't add them to
6835         loop region
6836
6837 2002-02-21    <johan AT FRIJA>
6838
6839         * src/SDCCcse.c: fixed bug #514308
6840
6841 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
6842
6843         * src/SDCCloop.c:
6844         Fixed BUG #519583. If a conditional block ended in a return/break
6845         statement inside a loop, it was not being considered part of the loop.
6846
6847         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
6848
6849 2002-02-10  Karl Bongers <karl AT turbobit.com>
6850
6851         * debugger/*:
6852         Fixed up SDCDB debugger somewhat.  Updated debugger/README
6853         with lots of comments and notes.
6854
6855         * device/examples/test2.c:
6856         Fix bug, "red" variable not being initialized(compiler complained).
6857
6858         * device/examples/Makefile, examples/test3.c:
6859         Add Makefile in device/examples folder, compiles test3.c
6860         for use as a multiple module SDCDB test case.
6861
6862         * sim/ucsim/cmd.src/cmdset.cc:
6863         Took out debug printfs in ucsim "next" command.
6864
6865         * sim/ucsim/xa.src:
6866         Karl and Johan start ucsim XA support.  Most dissassembly working,
6867         about 75% emulation done(plenty of work remaining).
6868
6869         * sim/ucsim/z80.src:
6870         Add Z80 support to ucsim, add test-ucz80 regression test,
6871         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
6872         Notice z80 compiler fails on examples/test3.c/crc code.
6873
6874 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
6875
6876         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
6877         Added support for --parms-in-bank1
6878
6879         * src/ds390/peeph.def:
6880         added a few more peephole optimzations
6881
6882         * src/ds390/main.c:
6883         1) added __builtin_inp & __builtin_outp used to read in data of given length
6884            from a memory mapped port
6885         2) added __builtin_memcmp
6886         3) added __builtin_swapw swap bytes of a short
6887
6888         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
6889         1) handle multiple send & receives from register bank1
6890         2) ralloc can now allocate DPTR1 to some liveRanges
6891
6892         * src/SDCCsymt.c, src/SDCCsymt.h:
6893         changes to handle multiple sends & receives
6894
6895         * src/SDCCptropt.h:
6896         added some pointer arithmetic optimization
6897
6898         * src/SDCCptropt.c:
6899         added some pointer arithmetic optimizations but not stable yet so not
6900         called from anywhere (will get this working shortly)
6901
6902         * src/SDCCopt.c: fixed for multiple sends & receives
6903
6904         * src/SDCCmain.c:
6905         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
6906         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
6907            set preprocessor defines (depending on options)
6908
6909         * src/SDCCicode.c, src/SDCCicode.h:
6910         changes made to handle multiple sends & receives
6911
6912         * src/SDCCglobl.h:
6913         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
6914
6915         * src/SDCCcse.c, src/SDCCcse.h:
6916         added function findbackward def (to be used in upcoming optimization)
6917
6918         * src/SDCCcflow.c, src/SDCCcflow.h:
6919         added function returnAtEnd - to determine if a basic block terminates with
6920         a RETURN iCode
6921
6922         * src/SDCCast.c, src/SDCCast.h:
6923         added option parms-in-bank1
6924
6925         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
6926         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
6927         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
6928         adjusted for --parms-in-bank1 option
6929
6930         * device/include/string.h:
6931         donot redefine "reentrant" keyword
6932
6933         * device/include/ds80c390.h: Added some more SFRs
6934
6935 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
6936
6937         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
6938
6939 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
6940
6941         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
6942
6943 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
6944
6945         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
6946
6947 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
6948
6949         * Added --xram-movc option
6950
6951 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
6952
6953         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
6954
6955 2002-01-11  Johan Knol
6956
6957         * Added math lib of Jesus Calvino-Fraga
6958
6959 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
6960
6961         * src/SDCCmain.c (processFile): fix processing of ../../src.c
6962         * support/regression/Makefile: new target test-mcs51-stack-auto
6963         * support/regression/ports/mcs51-stack-auto/spec.mk: added
6964
6965 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
6966
6967         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
6968
6969 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
6970
6971         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
6972
6973 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
6974
6975         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
6976
6977         * src/SDCCglue.h: add definition for printIvalChar()
6978
6979 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
6980
6981         * src/SDCCast.c: fix #498138 by Johan
6982
6983         * src/SDCCglue.c: fix #498138 by Johan
6984
6985 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
6986
6987         * support/regression/Makefile: fix clean
6988
6989         * support/regression/ports/ds390/support.c: fix transmission of last character
6990
6991 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
6992
6993         * /sdcc/src/ds390/gen.c:
6994         a) improved computing address of stack variable
6995         b) took out some #if 0 code
6996         c) improved parmBytes adjustment
6997         d) improved genPlusIncr & genMinusIncr
6998         e) genCmp could generate bad code (when left assigned to DPTR)
6999         f) Fixed bug in hasInc
7000
7001         * /sdcc/src/ds390/ralloc.c:
7002         a) packRegsForSupport could mess up live information (Fixed)
7003         b) packRegsDPTRuse could be incorrect for left & right shift
7004
7005         * /sdcc/src/mcs51/ralloc.c:
7006         packRegsForSupport could mess up the live information (Fixed)
7007
7008         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
7009
7010         * /sdcc/src/SDCCast.c:
7011         can reverse a loop even if function call is present as long
7012         as the loop control variable is local & is not passed as parameter
7013
7014 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
7015
7016         * /sdcc/ChangeLog: *** empty log message ***
7017
7018         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
7019         More builtin function additions for TININative
7020
7021         * /sdcc/src/ds390/ralloc.c:
7022         Had broken the regression testsuite
7023
7024         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
7025
7026         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
7027         Added funcattr hasStackParms will be set for reentrant functions when there
7028         are paramteres on the stack, this helps in minimizing frame pointer generation
7029         typeFromStr can handle function pointers now
7030
7031         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
7032         *** empty log message ***
7033
7034 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
7035
7036         * /src/ds390/gen.c, /src/ds390/main.c:
7037         More builtin function additions for TININative
7038
7039         * /src/ds390/ralloc.c:
7040         Had broken the regression testsuite
7041
7042         * /src/SDCCast.c: Fixed a bug in dumptree
7043
7044         * /src/SDCCsymt.c, /src/SDCCsymt.h:
7045         Added funcattr hasStackParms will be set for reentrant functions when there
7046         are paramteres on the stack, this helps in minimizing frame pointer generation
7047         typeFromStr can handle function pointers now
7048
7049         * /doc/builtins.txt, /doc/TININative.txt:
7050         *** empty log message ***
7051
7052
7053 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
7054
7055         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
7056         ALPHA version for -mTININative
7057
7058         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
7059         updated to reflect changes in the port structure
7060
7061         * /src/port.h:
7062         added function do_assemble (similar to do_link) if non-null this function
7063         will be called to do assembly (-mTININative) requires a multi command
7064         assembly
7065         added function genAssemblerEnd will be called to generate assembler Epilogue
7066
7067         * /src/SDCCsymt.c:
7068         added _JavaNative to debug info printing
7069
7070         * /src/SDCCmain.c: added option --tini-libid
7071         added port->do_assemble function (-mTININative) has a multi command assemble
7072
7073         * /src/SDCCglue.c: Disabled "constExpr" check
7074         added port->genAssemblerEnd function
7075
7076         * /src/SDCCglobl.h: Added option --tini-libid value
7077
7078         * /src/SDCCast.h:
7079         tookout optimizeCompare from the header (has no external references)
7080
7081         * /src/SDCCast.c: made one more function "static"
7082
7083 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
7084
7085         * src/z80/mappings.i: Added z80asm support.
7086
7087         * src/z80/main.c: Added z80asm support on --asm=z80asm
7088
7089         * src/z80/gen.c: Fixed asm portability issues.
7090
7091         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
7092
7093         * src/SDCCglue.c (printExterns): Added global/extern split.
7094
7095 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
7096
7097         * support/regression/Makefile: added test for mcs51 model large
7098
7099         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
7100
7101         * support/regression/ports/gbz80/spec.mk: added -mgbz80
7102
7103 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
7104
7105         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
7106
7107 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
7108
7109         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
7110
7111         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
7112
7113 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
7114
7115         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
7116
7117         * support/regression/tests/simplefloat.c: Port to mcs51.
7118
7119 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
7120         * support/regression/tests/bug-485362.c: Added.
7121
7122         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
7123
7124         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
7125
7126         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
7127
7128         * src/z80/gen.c (aopDump): Added a dump function.
7129
7130 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
7131         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
7132
7133         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
7134
7135         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
7136
7137         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
7138
7139         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
7140
7141         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
7142
7143         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
7144
7145         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
7146
7147         * support/regression/ports/ds390/support.c: Use tinibios.
7148
7149         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
7150
7151 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
7152
7153         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
7154         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
7155
7156         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
7157
7158         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
7159
7160 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
7161
7162         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
7163
7164         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
7165         (packRegsForIYUse): Created and optimised.
7166
7167 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
7168
7169         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
7170 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
7171
7172         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
7173
7174         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
7175
7176         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
7177
7178 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
7179
7180         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
7181
7182         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
7183
7184 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
7185
7186         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
7187
7188         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
7189
7190         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
7191
7192 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
7193
7194         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
7195         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
7196         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
7197
7198         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
7199
7200         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
7201         (genNotFloat): Added.
7202         (genUminusFloat): Added.
7203
7204         * device/lib/z80/Makefile: Added floating pt stubs.
7205
7206         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
7207
7208         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
7209
7210         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
7211
7212 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
7213
7214         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
7215
7216         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
7217
7218         * sdcc/support/regression/Makefile: Add port ds390.
7219
7220         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
7221
7222         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
7223
7224         * sdcc/support/regression/ports/ds390/spec.mk: Added.
7225
7226         * sdcc/support/regression/ports/ds390/support.c: Added.
7227
7228         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
7229
7230         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
7231
7232         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
7233
7234 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
7235
7236         * device/include/malloc.h: Added z80 and gbz80 support.
7237
7238         * device/lib/gbz80/heap.s: Added.
7239
7240         * device/lib/z80/heap.s: Added.
7241
7242         * device/lib/malloc.c: Added z80 and gbz80 support.
7243
7244         * support/regression/tests/malloc.c (testMalloc): Added.
7245
7246         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
7247
7248         * support/regression/tests/bug-478094.c: Added.
7249
7250         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
7251
7252 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
7253
7254         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
7255
7256         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
7257
7258         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
7259
7260         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
7261
7262         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
7263
7264 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
7265
7266         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
7267
7268 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
7269
7270         * support/regression/tests/bug-477927.c: Added.
7271
7272         * src/z80/peeph.def: Added minor rules.
7273
7274         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
7275
7276         * src/z80/peeph.def: Added jump optimisation modification.
7277
7278 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
7279
7280         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
7281
7282 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
7283
7284         * support/regression/tests/funptrs.c: Added.
7285
7286 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
7287
7288         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
7289
7290 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
7291
7292         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
7293
7294         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
7295
7296         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
7297         (movLeft2ResultLong): Created.
7298
7299         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
7300         (joinPushes): Added.  Joins two char pushes into a word push.
7301
7302 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
7303
7304         * support/cpp2/Makefile.in (install): Added creation of dest dir.
7305
7306         * support/makebin/Makefile (install): Added creation of dest dir.
7307
7308 2001-10-24 Karl Bongers <karl AT turbobit.com>
7309
7310         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
7311
7312 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
7313
7314         * src/z80/ralloc.c: Turned off faulty pack for one use.
7315
7316         * src/z80/peeph-gbz80.def: Removed redundent restart options.
7317
7318         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
7319
7320 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
7321
7322         * support/regression/Makefile: Improved clean
7323
7324         * support/regression/ports/gbz80/spec.mk: Added clean
7325
7326         * support/regression/ports/host/spec.mk: Added clean
7327
7328         * support/regression/ports/z80/spec.mk: Added clean
7329
7330         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
7331
7332         * support/regression/ports/mcs51/timeout.c: little improvements
7333
7334 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
7335
7336         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
7337
7338         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
7339
7340         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
7341
7342 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
7343
7344         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
7345
7346         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
7347
7348 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
7349         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
7350
7351         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
7352
7353         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
7354
7355         * src/mcs51/main.c (_linkCmd): Added bin path to command.
7356
7357         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
7358
7359         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
7360
7361         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
7362
7363         * support/regression/tests/longor.c: Added.
7364
7365 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
7366
7367         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
7368
7369         * as/mcs51/aslink.h: define PATH_MAX
7370
7371         * as/mcs51/asm.h: define PATH_MAX
7372
7373         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
7374
7375         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
7376
7377         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
7378
7379         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
7380
7381         * src/SDCCglobl.h: define PATH_MAX
7382
7383         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
7384
7385         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
7386
7387 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
7388
7389         * src/z80/gen.c (gencjneshort): Fixed
7390
7391         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
7392
7393 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
7394
7395         * support/regression/tests/bug-469671.c: Added.
7396
7397         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
7398
7399 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
7400
7401         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
7402
7403         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
7404
7405 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
7406
7407         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
7408
7409         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
7410
7411         * src/device/lib/_mullong.c : removed hint: nooverlay bug
7412
7413         * src/device/lib/_divuint.c : removed hint: nooverlay bug
7414
7415         * src/device/lib/_divulong.c: removed hint: nooverlay bug
7416
7417         * src/device/lib/_moduint.c : removed hint: nooverlay bug
7418
7419         * src/device/lib/_modulong.c: removed hint: nooverlay bug
7420
7421 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
7422
7423         * 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.
7424
7425         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
7426
7427         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
7428
7429 2001-10-07    <johan AT FRIJA>
7430
7431         * device/lib/gets.c (gets): fixed the return value.
7432
7433 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
7434         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
7435
7436         * 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.
7437
7438         * 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.
7439
7440         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
7441
7442         * src/pic/gen.c: Removed Safe_strdup.
7443
7444         * configure.in: Added option to enable libgc support.
7445
7446         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
7447         (bitVectUnion): Optimised.
7448         (bitVectIntersect): Optimised.
7449         (bitVectBitsInCommon): Optimised.
7450         (bitVectCplAnd): Optimised.
7451
7452         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
7453
7454 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
7455
7456         * src/SDCCmain.c: distinguish between assembler debug and plain options
7457
7458         * src/avr/main.c:   remove standard assembler options
7459
7460         * src/ds390/main.c: remove standard assembler options
7461
7462         * src/mcs51/main.c: remove standard assembler options
7463
7464         * src/port.h: removed "PENDING" comment
7465
7466 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
7467
7468         * src/device/lib/_mulint.c  : new, with assember functions
7469
7470         * src/device/lib/_mullong.c : new, with assember functions
7471
7472         * src/device/lib/_divuint.c : with assember functions
7473
7474         * src/device/lib/_divsint.c : with assember functions
7475
7476         * src/device/lib/_divulong.c: with assember functions
7477
7478         * src/device/lib/_divslong.c: with assember functions
7479
7480         * src/device/lib/_moduint.c : with assember functions
7481
7482         * src/device/lib/_modsint.c : with assember functions
7483
7484         * src/device/lib/_modulong.c: with assember functions
7485
7486         * src/device/lib/_modslong.c: with assember functions
7487
7488         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
7489
7490         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
7491
7492         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
7493                                       replaced _mululong.c and _mulslong.c by _mullong.c
7494
7495 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
7496
7497         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
7498
7499 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
7500
7501         * src/SDCCglue.c: test, if win32api is available for MINGW
7502
7503 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
7504
7505         * src/SDCCsymt.c: no more _modifier in printTypeChain()
7506         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
7507         * support/regression/ports/gbz80/spec.mk: removed GENERIC
7508         * support/regression/ports/host/spec.mk: removed GENERIC
7509         * support/regression/ports/mcs51/spec.mk: removed GENERIC
7510         * support/regression/ports/z80/spec.mk: removed GENERIC
7511
7512 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
7513
7514         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
7515
7516         * support/regression/tests/bug-467035.c: Created.
7517
7518 2001-10-01    <johan AT FRIJA>
7519
7520         * src/SDCC.y: fixed bug #466586 part 1
7521
7522 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
7523
7524         * SDCCicode.c: z80 has no generic pointers
7525         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
7526
7527 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
7528
7529         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
7530
7531 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
7532
7533         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
7534
7535         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
7536
7537 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
7538
7539         * configure.in: Fixed up so that ucsim is only configured once.
7540
7541         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
7542
7543         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
7544         (getPathDifference): As above.
7545
7546         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
7547
7548         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
7549
7550 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
7551         * .version: Updated to 2.3.1
7552
7553         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
7554         Added copyright header.
7555
7556         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
7557         (assemble): Added support for macro based assembler commands.
7558         (linkEdit): Added support for macro based linker commands.
7559         (preProcess): Changed the pre-processor to use macros.
7560         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
7561         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
7562
7563         * device/lib/z80/crt0.s: Added module name for debugging.
7564
7565 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
7566
7567         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
7568
7569         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
7570
7571         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
7572
7573         * src/Makefile.in: Added SDCCmacro and SDCCutil
7574
7575 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
7576
7577         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
7578
7579 2001-09-16    <johan AT FRIJA>
7580
7581         * 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.
7582
7583 2001-09-15    <johan AT FRIJA>
7584
7585         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
7586         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
7587
7588 2001-09-11    <johan AT FRIJA>
7589
7590         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
7591
7592 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
7593
7594         * support/regression/tests/bug-460444.c: Added test case.
7595
7596         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
7597         (genCast): Added justification for all of the asserts.
7598
7599 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
7600
7601         * support/regression/support.c: _xdata replaced by xdata
7602
7603         * support/regression/spec.mk: removed _generic
7604
7605 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
7606
7607         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
7608
7609         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
7610         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
7611
7612         * src/z80/peeph.def: Added a rule to optimise shift then compare.
7613
7614         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
7615
7616         * support/regression/tests/bug-460010.c: Added test case.
7617
7618         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
7619
7620 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
7621
7622         * support/regression/Makefile: inter-port-clean adjusted for mcs51
7623
7624         * support/regression/testfwk.c: removed workaround for bug #436344
7625
7626         * support/regression/tests/bp.c: use less memory with mcs51
7627
7628         * support/regression/tests/bug-441448.c: use less memory
7629
7630         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
7631
7632         * support/regression/collate-results.py: typo
7633
7634 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
7635
7636         * support/regression/tests/fetchoverlap.c: Added new test case.
7637
7638         * support/regression/tests/bp.c: Added new test case.
7639
7640         * support/regression/tests/bug-448984.c: Added new test case.
7641
7642         * support/regression/tests/pow2shifts.c: Added new test case.
7643
7644         * src/z80/gen.c: Turned off the noise it normally generates for the release.
7645         (genlshTwo): Fixed right shift for count > 8.
7646
7647         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
7648
7649 2001-09-08    <johan AT FRIJA>
7650
7651         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
7652
7653 2001-09-07    <johan AT FRIJA>
7654
7655         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
7656
7657         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
7658
7659 2001-09-06    <johan AT FRIJA>
7660
7661         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
7662         * bernhard noted me at this: "() equals to (void)" (1.38)
7663
7664 2001-09-05    <johan AT FRIJA>
7665
7666         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
7667
7668 2001-09-04    <johan AT FRIJA>
7669
7670         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
7671
7672
7673 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
7674
7675         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
7676
7677 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
7678
7679         * link/z80/aslink.h: Fixed path for PATH_MAX
7680
7681 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
7682
7683         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
7684
7685         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
7686
7687         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
7688
7689         * 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.
7690
7691 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
7692
7693         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
7694         (genCmp): Fixed up genCmp for the GB with longs.
7695
7696         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
7697
7698         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
7699
7700         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
7701
7702         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
7703
7704 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
7705
7706         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
7707
7708 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
7709
7710         * 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.
7711
7712         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
7713
7714 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
7715
7716         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
7717
7718         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
7719
7720 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
7721
7722   * sim/ucsim/configure:    little improvement of Cygwin-detection
7723   * sim/ucsim/configure.in: little improvement of Cygwin-detection
7724   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
7725   * support/regression/tests/bug-221100.c: small changes for mcs51
7726   * support/regression/tests/bug-221168.c: small changes for mcs51
7727   * support/regression/tests/bug-227710.c: small changes for mcs51
7728   * support/regression/tests/staticinit.c: small changes for mcs51
7729   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
7730   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
7731   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
7732
7733 $Revision$