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