* configure.in, configure: have device/lib/pic configured
[fw/sdcc] / ChangeLog
1 2005-09-23 Raphael Neider <rneider AT web.de>
2
3         * configure.in, configure: have device/lib/pic configured
4         * device/lib/Makefile.in: added model-pic14
5         * device/lib/clean.mk: added pic/ to clean rule
6         * device/lib/pic: added rudimentary pic14 library providing support
7           functions for multiplication/division/generic pointer access
8         * src/SDCCopt.c (convilong): mark support functions as extern
9           for pic14 port as well
10         * src/pic/gen.c (genMult): added assertions,
11           (genpic14Code): emit warning on unhandled iCodes
12         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
13         * src/pic/pcode.c (pCodeOpCopy),
14         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
15           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
16           SFR_REGISTER}), made safe for future extensions
17         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
18           instructions even if preceeded by SKIP instructions (also remove
19           them); removed unused code
20         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
21           prevents leaving parts of the structure uninitialized after copying
22
23 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
24
25         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
26           ago by me
27         * support/regression/tests/addsub.c: added test for the bug
28
29 2005-09-21 Raphael Neider <rneider AT web.de>
30
31         * device/include/pic16/pic18f1220.h,
32           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
33         * device/lib/pic16/Makefile.rules: added missing opening paren
34         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
35           are provided in genutils.c,
36           (genUminusFloat,genUminus,genCmpEq): added asserts on different
37           operand/result sizes,
38           (genCmp): assert on NULL pointers first, then check deref'ed values
39         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
40           result size
41
42 2005-09-18 Raphael Neider <rneider AT web.de>
43
44         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
45           as these are now unused,
46           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
47         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
48           local, avoids uninitialized pointer dereference on r->name
49         * src/pic16/ralloc.c (newReg): fixed indentation
50
51 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
52
53         * src/SDCCval.c (constVal): fixed bug 730366
54         * support/Util/SDCCerr.c,
55         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
56
57 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
58
59         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
60
61 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
62
63         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
64
65 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
66
67         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
68           (hex2dec): made hex_digit unsigned char, removed ascii dependance
69         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
70           (hex2dec): made hex_digit unsigned char, removed ascii dependance
71         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
72         * packihx/packihx.c (hexDigit): made c unsigned char
73         * as/mcs51/lklibr.c (fndsym),
74         * link/z80/lkgb.c (gb),
75         * link/z80/lklibr.c (fndsym),
76         * link/z80/lkrloc.c (relr),
77         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
78         * src/SDCC.lex (checkCurrFile, process_pragma),
79         * src/SDCCglue.c (spacesToUnderscores),
80         * src/SDCCmain.c (setParseWithComma, processFile),
81         * src/asm.c (tvsprintf, printCLine),
82         * src/avr/gen.c (emitcode, aopPut),
83         * src/ds390/gen.c (emitcode),
84         * src/hc08/gen.c (emitcode, emitinline),
85         * src/mcs51/gen.c (emitcode, genInline),
86         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
87           tokenizeLineNode),
88         * src/pic/ralloc.c (debugLog),
89         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
90           tokenizeLineNode),
91         * src/pic16/ralloc.c (debugLog),
92         * src/z80/main.c (_process_pragma):
93            made all ctype.h function calls safe
94         * src/SDCCopt.c: include math.h for fabs
95         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
96           and used them throughout the code to make ctype.h function calls safe
97         * src/ds390/main.c (asmLineNodeFromLineNode),
98         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
99         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
100            unsigned char*
101         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
102           (newpCodeAsmDir): made ctype.h function calls safe
103         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
104           pic16_emitcode):  made lbp unsigned char*
105         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
106           (pic16_newpCodeAsmDir): made ctype.h function calls safe
107         * src/xa51/gen.c (emitcode),
108         * src/z80/gen.c (_emit2): made lbp unsigned char*
109         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
110            char*
111
112 2005-09-05 Raphael Neider <rneider AT web.de>
113
114         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
115           access bank splitpoint
116
117 2005-09-05 Raphael Neider <rneider AT web.de>
118
119         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
120
121 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
122
123         * .version: changed to version 2.5.3
124         * doc/sdccman.lyx: changed version to 2.5.3,
125           documented --codeseg and --constseg and pragma codeseg and constseg,
126           documented bit parameters (reentrant) and bit returning
127         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
128            currFunc->recvSize, but is this ok for all ports?
129           (ast2iCode): result of ~ on unsigned char must be cast to int for
130            bool to work
131         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
132           function pointers in bit space
133         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
134           (processFuncArgs): call port.reg_parm() with reentrancy info
135         * src/port.h,
136         * src/avr/main.c,
137         * src/ds390/main.c,
138         * src/hc08/main.c,
139         * src/pic/main.c,
140         * src/pic16/main.c,
141         * src/xa51/main.c,
142         * src/z80/main.c: port.reg_parm prototype extended with
143           "bool reentrant" parameter
144         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
145           options.stackAuto for allocating bit register parameters
146         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
147           (genSend): set BitBankUsed if it is,
148           (selectRegBank): factored out of genCall for use in genPcall,
149           (genCall): removed redundant dtype assignmen, use selectRegBank,
150           (genPcall): handle returning in Carry properly, save in F0 if needed,
151           (genReceive): handle bit register parameters
152         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
153           (mcs51_assignRegisters): enable bit registers for all reentrant
154            functions and don't set BitBankUsed unconditionally
155         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
156         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
157         * support/regression/tests/funptrs.c: added tests for BOOL and for return
158
159 2005-08-27 Borut Razem <borut.razem AT siol.net>
160
161         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
162         ppc-osx (Darwin) does not support -u option. It seems that it is
163         supported only on Linux - GNU cp
164
165 2005-08-25 Borut Razem <borut.razem AT siol.net>
166
167         * sim/ucsim/gui.src/serio.src/Makefile.in,
168           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
169           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
170           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
171           install and strip, since the strip at /usr/ccs/bin should be used
172           on solaris
173
174 2005-08-24 Borut Razem <borut.razem AT siol.net>
175
176         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
177
178 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
179
180         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
181         ffffffffu
182
183 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
184
185         * as/mcs51/aslink.h: completed lkrloc.c prototypes
186         * as/mcs51/lkmain.c (link_main): fixed warning
187         * device/include/stdbool.h: ds390 has no advanced bit support yet
188         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
189         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
190         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
191           and updated their macros
192         * src/SDCCval.c (constVal): updated comment for renamed b_long
193
194 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
195
196         * as/mcs51/asdata.c: changed ctype['['] to BINOP
197         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
198           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
199           (oprio): set priority for '['
200         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
201            and adb_24_bit
202         * as/mcs51/asm.h: added defines R_BIT and S_BIT
203         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
204         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
205         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
206           added overlayable BIT_BANK area
207         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
208           (summary2): explain 'T' in legenda
209         * as/mcs51/lkrloc.c: replaced old K&R style,
210           (relr): added R_BIT processing,
211           (errmsg): added "Bit-addressable relocation error",
212           (adb_bit): added for converting from byte- to bit-addressable space,
213           (adb_24_bit): added for converting from byte- to bit-addressable space
214         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
215            used in reentrant functions now even as return value
216         * device/lib/_gptrput.c (_gptrput): removed obsolete code
217         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
218           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
219         * src/SDCCglobl.h: added indicator BitBankUsed
220         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
221            the bit registers b0-b7
222         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
223           (geniCodeCast): fixed bug 1263853,
224           (geniCodeLogicAndOr): put result in bool or char,
225           (geniCodeReceive): added parameter func for accessing the return type,
226           (geniCodeFunctionBody): pass func to geniCodeReceive
227         * src/SDCCmain.c: added indicator BitBankUsed
228         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
229         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
230           (checkSClass): don't put automatic bool/bit on stack,
231           (checkFunction): removed check on function cannot return bit
232         * src/SDCCsymt.h: added newBoolLink prototype
233         * src/mcs51/gen.c (rb1regs): added bit registers,
234           (movc): created for assigning to carry,
235           (pushReg, popReg): created for pushing registers,
236           (sameRegs): check both AOP_REG and AOP_CRY types,
237           (aopOp): handle bit registers,
238           (aopPut): optimization no self-assign,
239           (saveRegisters): push reg->base (bits) only once for bit registers,
240            and use pushReg,
241           (unsaveRegisters): pop reg->base only once and use popReg,
242           (assignResultValue): added parameter func and return in carry for bits,
243           (genIpush): optimization no reload in A if not changed,
244           (genSend): bit parameters in reentrant functions are passed in bit
245            registers by first assigning to bits in B, then save registers and
246            copy B to bits,
247           (genCall): handle returning in Carry properly, save it in F0 if needed,
248           (genPcall): updated assignResultValue call, this is not safe yet for bit
249            returning function !!!
250           (genFunction): don't generate equ's for bit registers and use pushReg,
251           (genEndFunction): take care of bit returning functions and use popReg,
252           (genRet): return bit in Carry,
253           (genIfx): optimize bit registers and other directly addressable bits,
254           (genReceive): updated assignResultValue call
255         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
256           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
257            registers when using stack-auto
258         * src/mcs51/ralloc.c (_G): added allBitregs,
259           (regs8051): added the bit registers,
260           (createStackSpil): use macro IS_BIT,
261           (getRegBit): added to allocate a bit register, else spill,
262           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
263           (updateRegUsage): factored out to ease stepping while debugging,
264           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
265            also allocate bit registers,
266           (fillGaps): handle bit registers,
267           (findAllBitregs): added to create bit vector with all bit registers,
268           (mcs51_allBitregs): returns this bit vector,
269           (mcs51_assignRegisters): when using stack-auto use bit registers for
270            passing parameters and creating local variables
271         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
272
273 2005-08-22 Borut Razem <borut.razem AT siol.net>
274
275         * device/lib/Makefile.in: replaced find option -or with -o
276           to make it run on solaris
277
278 2005-08-22 Raphael Neider <rneider AT web.de>
279
280         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
281           fixes #1265442 (crash on Solaris)
282
283 2005-08-20 Borut Razem <borut.razem AT siol.net>
284
285         * configure, configure.in: added tests for libsocket and libnsl libraries,
286           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
287           from support/regression/Makefile.in
288         * support/regression/Makefile.in: added
289         * device/lib/pic16/Makefile.common.in: force make to use bash shell
290         * sim/ucsim/libtool: regenerated on sparc-solaris
291         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
292           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
293           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
294           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
295           sparc-solaris, which doesn't use GNU ld linker
296         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
297         * as/Makefile: find on sparc-solaris does not support -maxdepth option
298
299 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
300
301         * src/mcs51/peeph.def: updated comments
302
303 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
304
305         * device/lib/_gptrget.c,
306         * device/lib/_gptrput.c: slightly shorter
307         * doc/sdccman.lyx: incremented version
308         * src/mcs51/peeph.def: moved peephole comments to the line of first
309           change to better keep line correlation, reanimated 186.e
310         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
311
312 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
313
314         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
315           David Saxton with quotes around file name.
316
317 2005-08-15 Borut Razem <borut.razem AT siol.net>
318
319         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
320           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
321           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
322           make tests run on x86_64 platform
323
324 2005-08-13 Raphael Neider <rneider AT web.de>
325
326         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
327           as it might be executed DURING a build (parallel make is wonderful)
328
329 2005-08-13 Raphael Neider <rneider AT web.de>
330
331         * device/lib/Makefile.in (port-specific-objects-pic16):
332           revert to cp $(PORT)/bin/*.* $(PORTDIR)
333         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
334           dependency
335         * device/lib/pic16/Makefile.rules: build subdirs before creating
336           the library, removed builddir rule, create $(builddir) early in
337           recurse rule, use empty recurse rule for leaf directories
338         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
339           mkdir errors (race condition), removed duplicate suffix "hex"
340           from clean rules
341         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
342         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
343           prevents mkdir -p from aborting on Alpha
344
345 2005-08-12 Raphael Neider <rneider AT web.de>
346
347         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
348           db-statements in order to allow for arrays of pointers in code
349           sections to be placed without interspersed 0-padding, fixes
350           bug #1256215
351         * (emitStatistics): fixed division by zero for pic18f1220
352         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
353           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
354         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
355         * (pic16_pCodeConstString): keep track of already emitted string
356           literals to prevent "duplicate definitions of symbol _str_NR"
357         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
358           debug message
359         * device/lib/Makefile.in: ignore failing PIC16 library builds
360         * device/lib/pic16/Makefile: do not build if gputils are missing
361         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
362
363 2005-08-10 Raphael Neider <rneider AT web.de>
364
365         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
366           my last commit)
367
368 2005-08-10 Raphael Neider <rneider AT web.de>
369
370         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
371           Rokas' patch to add the new fixed point type "__fixed16x16"
372         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
373           functions for __fixed16x16 arithmetics
374         * device/lib/pic16: reimplemented the build system to support
375           a separate build directory, better handling of libio (create
376           the library in a separate subdir for each architecture) and
377           easier configuration (centralized in Makefile.common)
378
379 2005-08-07 Raphael Neider <rneider AT web.de>
380
381         * src/pic16/gen.c (genrshTwo): fixed sign extension
382         * src/pic16/device.c: added pic18f2320, 4220 and 4320
383         * device/include/pic16/pic18f2220.h: changed some bit definitions,
384           added T0CONbits
385         * device/include/pic16/pic18f4220.h: NEW, header for
386           pic18f4220 and pic18f4320
387         * device/include/pic16/pic18fregs.h: added new devices,
388           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
389         * device/include/pic16/signal.h: resolved name clashes
390           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
391           to also allow testing for interrupt enable bits, added
392           comments on how to use the macros
393         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
394         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
395           register definitions for the devices
396         * device/lib/pic16/pics.all: added new devices
397         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
398           allocated memory
399         * device/lib/pic16/libc/stdlib/memfree: do not count
400           the block header as free memory
401         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
402           simplified and added missing end-of-blocklist-marker
403           (reported by Peter Onion, fixes #1252814)
404         * (_mergeHeapBlock): fixed loop condition
405         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
406           len==0, restructured code
407         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
408           up a bit, reduced bitfield accesses, prevent endless loops
409           in case of heap corruption
410         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
411           "unreferenced arguments/must return a value" warnings
412         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
413           replaced BAUDREG with SPBRG
414         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
415           device/lib/pic16/debug/gstack/gstack.c: replaced
416           _naked, _asm, _endasm with __naked, __asm, __endasm
417
418 2005-08-05 Raphael Neider <rneider AT web.de>
419
420         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
421           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
422
423 2005-08-05 Borut Razem <borut.razem AT siol.net>
424
425         * device/lib/Makefile.in: added missing ';'
426         * configure: removed ^M characters
427
428 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
429
430         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
431           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
432           License
433
434 2005-08-04 Borut Razem <borut.razem AT siol.net>
435
436         * configure.in: pic16 libraries build 2nd try - enable running
437           configure in device/lib/pic16
438         * configure: regenerated from configure.in
439         * device/lib/Makefile.in: create $(PORT)/bin directory
440
441 2005-08-03 Raphael Neider <rneider AT web.de>
442
443         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
444           to get/set values via pointers
445         * (genUnpackBits,genPackBits): changed detection of
446           ptr->bitfield vs. sym.bitfield, fixed access via generic
447           pointers, removed dead (wrong) code for multibyte bitfields
448         * (genNearPointerGet, genGenPointerGet): removed useless code,
449           fixed bitfield detection, fixes #1250594
450         * (genNearPointerSet): removed useless code
451         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
452           and introduced macro pic16_emitpcode that conditionally emits
453           the origin of the following pCode (useful for debugging SDCC)
454         * src/pic16/pcode.c: changed (and disabled) some debug outputs
455         * (createDefmap): fixed handling of LFSR for --optimize-df
456
457 2005-08-02 Borut Razem <borut.razem AT siol.net>
458
459         * device/lib/Makefile.in: pic16 libraries build enabled since
460           gputils-0.13.2 are now localy installed at sourceforge's compile farm
461
462 2005-08-02 Raphael Neider <rneider AT web.de>
463
464         * src/pic16/gen.c (genPackBits): removed deprecated warning
465         * (genGenPointerSet): fixed bitfield detection
466
467 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
468
469         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
470
471 2005-07-31 Raphael Neider <rneider AT web.de>
472
473         * device/lib/pic16/libdev/pic18f458.c,
474           device/include/pic16/pic18f458.h: added missing T0CONbits
475
476 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
477
478         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
479
480 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
481
482         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
483
484 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
485
486         * device/include/mcs51/at89c51ed2.h: added.
487
488 2005-07-23 Raphael Neider <rneider AT web.de>
489
490         * src/pic/gen.h: added emitpcode macro for debugging
491         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
492           and replace by macro adding debug information on demand
493         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
494         * (gencjne): tried to fix; replaced with correct (slower) code
495         * (gen{Unp,P}ackBits): fixed single bit access
496         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
497         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
498           previous instruction
499         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
500           register has to be handled with care (forbidding movement
501           of assignments/uses, removing assignments completely, ...)
502         * (pCodeOptime2pCodes): make use of regIsSpecial
503         * added lots of debugging output (commented out)
504         * src/pic/rallloc.c (deassignLRs): prevent operand registers
505           from being reused as result UNLESS it is known to work
506
507 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
508
509         * support/Util/dbuf.h: include <stddef.h> for size_t
510         * .version: changed to version 2.5.2
511
512 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
513
514         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
515
516 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
517
518         * src/hc08/gen.c (genMinus): fixed bug #1241835,
519           (genModOneByte): removed needless psha/pula
520
521 2005-07-22 Raphael Neider <rneider AT web.de>
522
523         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
524           have PIC14 handled like PIC16, fixes broken pic14 linker calls
525         * src/pic/gen.c (resolveIfx): do not "invent" labels
526         * (genSkipc): changed to positive logic
527         * (genSkipCond): removed as no longer needed
528         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
529           backport from PIC16
530         * (genLeftShift): check operands are in different registers
531         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
532           INCF does not update CARRY...
533         * src/pic/main.c: fixed _linkCmd
534         * src/pic/pcode.c (unlinkpCode): added inactive code
535         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
536           alive (do not assign result and operand overlapping registers)
537
538 2005-07-22 Raphael Neider <rneider AT web.de>
539
540         * src/pic/device.c (dump_sfr): replaced register declaration with
541           call to emitSymbolToFile() to avoid duplicate symbols
542         * (assignRelocatableRegisters): do not declare external symbols
543         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
544           right (take size of type, not etype)
545         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
546         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
547         * (packRegsForAccUse): disabled assignment of WREG as
548           the result reg to prevent occurence of just fixed #1235003,
549           fixes #1242954
550         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
551           symbols (avoids duplicate symbols in .asm file)
552         * (pic14emitRegularMap): use emitSymbolToFile()
553         * src/pic/gen.c (aopOp): fixed spillLocation handling
554         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
555         * (genDataPointerSet): removed unneccessary variables/output
556
557 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
558
559         * as/mcs51/lkarea.c: enlarged codemap for banked memory
560         * device/lib/mcs51/crtbank.asm: added # to 0x0F
561
562 2005-07-21 Raphael Neider <rneider AT web.de>
563
564         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
565           architecture cannot handle them efficiently, fixes bug #1235003
566         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
567           check for empty sets before using them (fixes bug #1232190)
568
569 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
570
571         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
572           (lnksect2): generate warnings for memory overlap
573         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
574           constseg to set the name of these segments so you can instruct the linker
575           to place them in banks
576         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
577         * src/SDCCglobl.h: added MODEL_HUGE to enum,
578           added code_seg and const_seg to options
579         * src/SDCCglue.c (emitMaps): use options.const_seg,
580           (createInterruptVect): put interrupt vectors in segment HOME,
581           (glue): put HOME before static segment and put the main glue in HOME,
582           (glue): use options.code_seg
583         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
584         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
585           these segments so you can instruct the linker to place them in banks
586           (linkEdit): use code_loc for HOME segment which should be the first
587           segment in code memory now
588         * src/SDCCmem.c: fixed more stuff like bug 1238386
589         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
590           (changePointer): don't change function pointers to code pointers for
591           banked functions,
592           (compareType): added exceptional check for banked function pointers
593         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
594         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
595           after static in code memory
596         * src/mcs51/gen.c: added aopLiteralLong prototype,
597           (aopForSym): use getSize for functions,
598           (genCall): generate banked calls over one trampoline __sdcc_banked_call
599           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
600           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
601           the segment,
602           (genPcall): use call for literal function pointers and generate banked
603           calls over the one trampoline so there's only one place for the user to
604           modify according to his/hers hardware,
605           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
606           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
607         * src/mcs51/main.c: added keyword banked,
608           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
609         * support/Util/SDCCerr.c,
610         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
611           needed for passing the bank and address to the trampoline
612         * device/lib/mcs51/crtbank.asm: added for bankswitching
613         * device/lib/mcs51/Makefile: added crtbank
614
615 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
616
617         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
618           for fields at offset 0 of a struct or union as reported
619           on 2005-07-07 in the developer mailing list.
620
621 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
622
623         * src/SDCCmem.c: fixed bug 1238386
624
625 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
626
627         * src/mcs51/peeph.def: added labelrefcounting for peepholes
628           (patch #1144962), added peephole 300, enabled 259.x
629         * doc/sdccman.lyx: removed screenshot and provided link instead
630
631 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
632
633         * doc/sdccman.lyx: added section about debugging with ddd
634         * doc/figures/ddd_example.eps: screenshot of debugging session
635
636 2005-07-04 Raphael Neider <rneider AT web.de>
637
638         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
639           like CODE pointers, fixes #1115683
640         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
641           call, fixes bugs #1232211, #1228110,
642           fixed wrong casts to pCodeFlow from pCodeInstructions
643
644 2005-07-04 Raphael Neider <rneider AT web.de>
645
646         * src/pic/gen.c (popGet): changed assert to allow for
647           bit operands
648         * (popGetAddr): changed signature to provide
649           an additional index, patched all call sites
650         * (genCmpEq): handle literal-like operands correctly
651         * (genAddrOf): added sanity checks on __code/__data pointers
652         * (genAssign): added handling of symbols from __code section
653         * (gencjne): do not generate code for comparisons whose result
654           is neither stored nor used, fixes bug #1171114
655         * (AccLsh, AccRsh): operate on operand instead of WREG
656         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
657           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
658           by known count
659         * rewrote complete shift-by-literal logic, commented unused
660           functions out
661         * (genConstPointerGet): get multiple bytes (if result size > 1),
662           fixed handling of non-immediate addresses
663         * (genPointerGet): handle CODE pointers like CONST pointers
664         * (genpic14Code): insert C-SRC lines as Cource-pCodes
665         * ({aop,op}_isLitLike): NEW, single place to decide whether an
666           operand is to be treated as a literal or not
667         * (mov2w,genPcall,genCmpEq),
668           src/pic/genarith.c: use aop_isLitLike() to decide between
669           literal/register contents
670         * (addSign): added missing offset
671         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
672           only emit comment in debug-mode,
673           use {aop,op}_isLitLike throughout the file
674         * src/pic/glue.c: fix initializers for pointers (work in progress)
675         * src/pic/pcode.c (get_op): honor index on _const symbols
676         * ({reset,dump}pCodeStatistics): NEW, estimate code size
677         * (dumppBlock): added pCode size estimation
678         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
679           check for IS_SYMOP before OP_SYMBOL'ing
680         * fixed indentation, compacted switch-statements
681         * (allocReg): find free register and allocate it instead of
682           allocating new registers all the time
683         * (deassignLRs): prevent POINTER_GET's from being assigned the same
684           registers as its operands (necessary only for multibyte GETs)
685
686 2005-07-01 Raphael Neider <rneider AT web.de>
687
688         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
689           debugging .asm-output macros FENTRY + FEXIT
690         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
691           way... I wonder...
692         * (emitpComment): NEW, printf to pCode
693         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
694           offset handling
695         * (popGetAddr): NEW, variant of popGet to access an immediates
696           high(er) bytes instead of the n'th byte of memory they reference,
697           replaced popGet with popGetAddr where neccessary
698         * (genDataPointerGet): reactivated and fixed implementation
699         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
700           accesses
701         * (genDataPointerSet): fixed multibyte assignments
702         * (genpic14Code): fixed --i-code-in-asm handling
703         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
704         * (genPlus): fixed index-out-of-bounds error
705         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
706         * src/pic/ralloc.c: added debugging output macro FENTRY2
707         * (spillThis): fixed indentation, enbraced for-body for clarity
708         * (rematStr): commented out as now unused
709         * (regTypeNum): commented out special spill case (overwrites
710           arbitrary values)
711         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
712
713 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
714
715         * doc/sdccman.lyx: documented sfr16/sfr32,
716           added example for using storage class with function pointers
717         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
718
719 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
720
721         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
722         * device/lib/_itoa.c,
723         * device/lib/_ltoa.c: optimized codesize
724         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
725           but don't know how to suppress the double warning.
726         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
727         * support/Util/SDCCerr.c,
728         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
729
730 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
731
732         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
733           fixed old K&R prototypes
734         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
735         * device/lib/_gptrget.c,
736         * device/lib/_gptrgetc.c,
737         * device/lib/_gptrput.c: changed versions for new memory indicator values,
738           also new versions for small generic pointers and banked generic pointers
739         * src/port.h: added const_name
740         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
741         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
742         * src/SDCCcse.c (findPrevIc): check all associative operators
743         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
744         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
745         * src/SDCCmem.c: updated comments,
746           set far-space to 0 for pdata, results in optimized code
747         * src/SDCCmem.h: added macro CONST_NAME
748         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
749           moving the info into the highest bits, see also gptrget/gptrput
750         * src/src.dsp: added sdcc.ico to project files
751         * src/avr/gen.c (genCast): fixed bug 0x%d
752         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
753         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
754           relation between ptr_type and DCL_TYPE,
755           (genCast): fixed bug 0x%d
756         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
757           (CODE)" for const_name
758         * src/hc08/gen.c (genCast): fixed bug 0x%d
759         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
760           (hc08_port): added "CONST (CODE)" for const_name
761         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
762           (aopForRemat, adjustArithmeticResult): disconnected direct relation
763           between ptr_type and DCL_TYPE,
764           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
765           operand* and took AOP() inside function so sfr-ness can be checked,
766           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
767           new prototype,
768           (genFunction, genEndFunction): optimized stack setup,
769           (genMinus): optimized for literals with ending zeroes (in bytes),
770           (genCast): fixed bug 0x%d
771         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
772           (mcs51_port): added "CONST (CODE)" for const_name
773         * src/mcs51/peeph.def: made rule 226 more generic
774         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
775         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
776         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
777         * src/z80/main.c (z80_port): added NULL for const_name,
778           (gbz80_port): added NULL for const_name
779         * support/regression/tests/bug663539.c,
780         * support/regression/tests/sfr16.c: new tests
781
782 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
783
784         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
785
786 2005-06-24 Raphael Neider <rneider AT web.de>
787
788         * device/lib/pic16/libdev/pic18f[68][567]20.c:
789           corrected typos...
790         * device/include/pic16/signal.h: added USBIF
791           and SIG_USB
792
793 2005-06-24 Raphael Neider <rneider AT web.de>
794
795         * device/lib/pic16/libdev/pic18f2455.c,
796           device/include/pic16/pic18f2455.h: NEW
797         * device/include/pic16/pic18fregs.h,
798           device/lib/pic16/pics.all,
799           src/pic16/device.c: added 18f2455
800         * device/lib/pic16/libdev/pic18f[68][567]20.c,
801           device/include/pic16/{pic18f[68][567].h,usart.h}:
802           replaced MULTIPLE_USARTS define with more relaible
803           compatibility sfrs (for USART access)
804
805 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
806
807         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
808           and the output asm file line is printed on two lines.
809
810 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
811
812         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
813           BGT, BLE, BHI, and BLS instructions
814         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
815           genCmpEq): removed
816         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
817           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
818           fixes bug #1216342
819         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
820
821 2005-06-15 Raphael Neider <rneider AT web.de>
822
823         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
824         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
825         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
826           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
827           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
828
829 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
830
831         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
832           Marcel Telka in bug #1215704
833
834 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
835
836         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
837           located in shared memory bank.
838
839 2005-05-31 Raphael Neider <rneider AT web.de>
840
841         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
842           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
843           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
844
845 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
846
847         * device/lib/_strncpy.c: fixed the fix
848
849 2005-05-26 Raphael Neider <rneider AT web.de>
850
851         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
852           initializers with \0, bug #1208187
853         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
854           intializers with \0, bug #1208187
855
856 2005-05-26 Raphael Neider <rneider AT web.de>
857
858         * src/pic16/glue.c (pic16_printIvalChar): fixed string
859           initializers with \0, bug #1208187
860         * src/pic16/main.c (_process_pragma): added sanity checks
861           for stack position and size, emit warnings when appropriate
862
863 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
864
865         * device/lib/_strncpy.c: fixed not filling with \0
866
867 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
868
869         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
870           createFunction),
871         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
872           compound_statement),
873         * src/SDCCsymt.h,
874         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
875
876 2005-05-24 Raphael Neider <rneider AT web.de>
877
878         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
879
880 2005-05-24 Raphael Neider <rneider AT web.de>
881
882         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
883           TRISE definitions, closes bug #1162453
884
885 2005-05-22 Raphael Neider <rneider AT web.de>
886
887         * src/pic16/main.c (_process_pragma): check for missing
888           arguments to pragmas code and udata
889         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
890           consistency fixes to match other headers (thanks to Jim Paris)
891         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
892
893 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
894
895         * src/SDCCicode.c (isOperandEqual): fixed missing ;
896
897 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
898
899         * support/regression/tests/bug1198642.c: new test
900         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
901         * src/SDCCcse.c (findPrevIc): added comment, please have a look
902         * support/scripts/resource.h,
903         * support/scripts/resource.rc,
904         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
905         * support/scripts/sdcc.ico: added 32x32 icon
906
907 2005-05-18 Raphael Neider <rneider AT web.de>
908
909         * device/lib/pic16/libdev/pic18f*.c,
910         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
911           keywords to "__sfr" and "__at (X)"
912         * device/include/pic16/pic18fregs.h: added pic18f4520
913         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
914           #1203088 (MPLAB compatibility)
915
916 2005-05-17 Raphael Neider <rneider AT web.de>
917
918         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
919         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
920         * device/lib/pic16/pics.all: added new devices
921         * src/pic16/device.c: added support for pic18f4520
922
923 2005-05-16 Raphael Neider <rneider AT web.de>
924         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
925         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
926         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
927           convenience function for bit access
928
929 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
930
931         * device/lib/printf_large.c: fixed bug 1193299
932         * support/regression/tests/bug1057979.c: added test %3.3s
933
934 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
935
936         * device/include/mcs51/8051.h,
937         * device/include/mcs51/8052.h: made parseable with lint
938         * device/include/mcs51/lint.h: added include file for (sp)lint
939         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
940         * doc/cdbfileformat.lyx,
941         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
942
943 2005-05-14 Raphael Neider <rneider AT web.de>
944
945         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
946         * device/lib/pic16/libc/stdlib/itoa.c (new)
947         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
948         * device/lib/pic16/libio/Makefile: exclude subdir according to
949           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
950         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
951         * src/pic16/gen.c (genFunction): prevent annoying warning
952         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
953           nameclashes on BeOS
954         * support/cpp2/cppmain.c (cpp_output_string): new
955         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
956           fixes bug 1116802
957
958 2005-05-13 Borut Razem <borut.razem AT siol.net>
959
960         * src/SDCCmain.c (linkEdit): fixed bug 1195202
961
962 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
963
964         * .version: changed to version 2.5.1; back to bleeding edge development
965
966 2005-05-11 Borut Razem <borut.razem AT siol.net>
967
968         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
969           generate PDF version 1.3 documents
970
971 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
972
973         * .version: changed to version 2.5.0
974
975 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
976
977         * doc/sdccman.lyx: updated weblinks, index and smaller updates
978
979 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
980
981         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
982         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
983         well as many smaller updates.
984         * .version: changed to version 2.5.0-pre1
985
986 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
987
988         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
989
990 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
991
992         * support/regression/tests/bug1185672.c: added
993         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
994           bug 1185672
995         * src/mcs51/gen.c (genCall): added comments, made it look safer
996         * src/mcs51/gen.c (genEndFunction): simplified
997
998 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
999
1000         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1001
1002 2005-04-14 Borut Razem <borut.razem AT siol.net>
1003
1004         * fixed bug 1045046 - SIGSEGV with really simple code?:
1005           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1006           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1007
1008 2005-04-14 Borut Razem <borut.razem AT siol.net>
1009
1010         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1011           src/pic16/device.h: temporarily disabled experimental #inline pragma
1012           for 2.5.0 release
1013
1014 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1015
1016         * device/include/z80/stdio.h,
1017         * device/include/z80/string.h: removed these highly incomplete files so
1018           SDCC can use the default ones in device/include/
1019
1020 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1021
1022         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1023         gcc warning.
1024         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1025         fix sdcpp warnings.
1026
1027 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1028
1029         * device/include/malloc.h: removed redundant __reentrant prototypes
1030         * device/lib/_mullong.c: added working xstack variant in asm (C version
1031           doesn't pass regression tests)
1032         * device/lib/bpx.c: used __data and made bpx char for mcs51
1033         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1034           (createFunction): fixed bug with xstackPtr
1035         * src/SDCCcse.c: corrected comments
1036         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1037           (killDeadCode, eBBlockFromiCode): removed unused code
1038         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1039           corrected comments
1040         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1041           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1042           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1043           (genModOneByte): fixed warning in MSVC
1044         * src/mcs51/main.c (): added comments
1045         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1046
1047 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1048
1049         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1050
1051 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1052
1053         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1054
1055 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1056
1057         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1058         characters arrays of larger size than the declared one.
1059
1060 2005-04-10 Borut Razem <borut.razem AT siol.net>
1061
1062         * src/pic/gen.c (genInline),
1063           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1064           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1065           (findNextInstruction), (findPrevInstruction),
1066           (findInstructionUsingLabel),
1067           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1068         * src/pic/pcode.c (findLabel): added missing '\n'
1069         * src/src.dsp: added SDCCdwarf2.c to the project
1070
1071 2005-04-09 Borut Razem <borut.razem AT siol.net>
1072
1073         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1074
1075 2005-04-08 Raphael Neider <rneider AT web.de>
1076
1077         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1078           into the chain after a given one) and mergeDefmapSymbols (combine
1079           defmap entries for each symbol per pcode)
1080         * (createDefmap): have defmap entries merged in the end
1081         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1082           a symbol before replacing one access type's symbol, merge symbols in
1083           the end (replacement symbol might already have an entry)
1084         * (assignValnums): keep reference to written WREG intact
1085
1086 2005-04-08 Raphael Neider <rneider AT web.de>
1087
1088         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1089           Alpha)
1090
1091 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1092
1093         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1094         bytes
1095
1096 2005-04-07 Raphael Neider <rneider AT web.de>
1097
1098         * device/include/pic16/usart.h: added compatibility defines for
1099           devices with more than one USART
1100         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1101
1102 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1103
1104         * device/lib/Makefile.in: updated for port specific include
1105
1106 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1107
1108         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1109
1110 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1111
1112         * device/include/8051.h,
1113         * device/include/8052.h,
1114         * device/include/at89S8252.h,
1115         * device/include/at89c55.h,
1116         * device/include/at89x051.h,
1117         * device/include/at89x51.h,
1118         * device/include/at89x52.h,
1119         * device/include/mcs51reg.h,
1120         * device/include/reg51.h,
1121         * device/include/reg764.h,
1122         * device/include/regc515c.h,
1123         * device/include/sab80515.h: (re)moved these 12 files
1124         * device/include/mcs51/8051.h,
1125         * device/include/mcs51/8052.h,
1126         * device/include/mcs51/at89S8252.h,
1127         * device/include/mcs51/at89c55.h,
1128         * device/include/mcs51/at89x051.h,
1129         * device/include/mcs51/at89x51.h,
1130         * device/include/mcs51/at89x52.h,
1131         * device/include/mcs51/mcs51reg.h,
1132         * device/include/mcs51/reg51.h,
1133         * device/include/mcs51/reg764.h,
1134         * device/include/mcs51/regc515c.h,
1135         * device/include/mcs51/sab80515.h: and added them here
1136
1137 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1138
1139         * device/include/stdarg.h: changed SDCC specific keywords to double
1140           underlined form.
1141         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1142           mcs51 and ds390.
1143         * device/include/hc08/mc68hc908gp32.h,
1144         * device/include/hc08/mc68hc908jb8.h,
1145         * device/include/hc08/mc68hc908jkjl.h,
1146         * device/include/hc08/mc68hc908qy.h: fixed comments
1147         * device/include/mcs51/README: updated
1148         * device/include/mcs51/c8051f120.h: added PINRSF
1149         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1150         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1151           amidst code. Also inline is not supported.
1152
1153 2005-04-06 Raphael Neider <rneider AT web.de>
1154
1155         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1156         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1157           callers stack/frame pointers
1158
1159 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1160
1161         * device/include/pic16/usart.h: added, missing in previous commit,
1162         * device/include/pic16/adc.h: fixed typo,
1163         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1164         commit,
1165         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1166         <p18fxxx.inc>
1167         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1168         uninitialized because a bug appears with gplink
1169         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1170         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1171         complains for unrecognised option
1172
1173 2005-04-05 Raphael Neider <rneider AT web.de>
1174
1175         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1176           structs as well (using memcpy)
1177         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1178           on ISRs (GOTO has no label)
1179         * src/pic16/device.h: added OF_OPTIMIZE_DF
1180         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1181           new data flow analysis/optimization
1182         * src/pic16/pcode.c: added (prototypes for and implementation of)
1183           dataflow analysis functions, fixed pCodeInstructions' inCond and
1184           outCond values, made RCALL a branch instruction
1185         * (pic16_unlinkpCode): keep C line if possible
1186         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1187           C line moved if possible
1188         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1189         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1190           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1191         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1192           new flow)
1193         * (pic16_getJumptabpCode): NEW, needed in...
1194         * (LinkFlow): fixed handling of jumptables, calls and conditional
1195           branches
1196         * (pic16_InsertCommentAfter): NEW
1197         * (pic16_pCodeReplace): made verbose and flow preserving
1198         * (AnalyzeFlow): added call to data flow analysis
1199         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1200         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1201         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1202
1203 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1204
1205         * src/SDCCast.c (decorateType): fixed bug #1105626
1206
1207 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1208
1209         * device/include/asm/pic16/features.h,
1210         * pic18f*.h headers,
1211         * device/include/pic16/adc.h,
1212         * device/include/pic16/delay.h,
1213         * device/include/pic16/i2c.h,
1214         * device/include/pic16/malloc.h,
1215         * device/include/pic16/stdio.h,
1216         * device/include/pic16/stdlib.h,
1217         * device/include/pic16/string.h,
1218         * device/lib/pic16/libc/stdio/printf_tiny.c,
1219         * device/lib/pic16/libc/stdio/printf_small.c,
1220         * device/lib/pic16/libc/stdio/strmgpsim.c,
1221         * device/lib/pic16/libc/stdio/strmmssp.c,
1222         * device/lib/pic16/libc/stdio/strmusart.c,
1223         * device/lib/pic16/libc/stdio/vfprintf.c,
1224         * device/lib/pic16/libc/stdlib/ltoa.c,
1225         * device/lib/pic16/libc/stdlib/putchar.c,
1226         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1227         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1228         * device/lib/pic16/libc/stdlib/memchrram.c,
1229         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1230         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1231         * device/lib/pic16/libio/adc/adcbusy.c,
1232         * device/lib/pic16/libio/adc/adcread.c,
1233         * device/lib/pic16/libio/adc/adcsetch.c,
1234         * device/lib/pic16/libio/usart/ubaud.c,
1235         * device/lib/pic16/libio/usart/ubusy.c,
1236         * device/lib/pic16/libio/usart/udrdy.c,
1237         * device/lib/pic16/libio/usart/uopen.c,
1238         * device/lib/pic16/libio/usart/uputc.c,
1239         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1240         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1241         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1242         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1243         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1244         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1245         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1246         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1247         specific keywords to double underlined form,
1248         * device/lib/pic16/libc/Makefile.rules,
1249         * device/lib/pic16/libsdcc/Makefile.rules,
1250         * device/lib/pic16/libm/Makefile,
1251         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1252         to compile with C standard set in Makefile.common
1253         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1254         rand.c and crc.c in compilation process,
1255         * device/lib/pic16/libsdcc/int/divuint.c,
1256         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1257         `c' from signed to unsigned,
1258         * device/lib/pic16/startup/crt0.c,
1259         * device/lib/pic16/startup/crt0i.c,
1260         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1261         keywords to double underlined form, bug fixes in _do_cinit function
1262         which prevented the correct initialization of the .idata segment,
1263         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1264         core to enter a infinite loop
1265         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1266
1267 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1268
1269         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1270
1271 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1272
1273         * device/include/Makefile.in: add support for hc08 subdirectory
1274         * device/include/hc08/: new subdirectory
1275         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1276         Lucas Loizaga, thanks!
1277         * device/include/hc08/mc68hc908qy.h,
1278         * device/include/hc08/mc68hc908gp32.h,
1279         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1280         their own directory. Changed internal macro names to use the compiler
1281         reserved namespace. Changed SDCC specific keywords to double
1282         underlined form.
1283         * device/include/math.h,
1284         * device/include/malloc.h,
1285         * device/include/stdarg.h,
1286         * device/include/stdbool.h
1287         * device/include/string.h,
1288         * device/include/tinibios.h,
1289         * device/include/ds400rom.h,
1290         * device/include/8051.h,
1291         * device/include/8052.h,
1292         * device/include/80c51xa.h,
1293         * device/include/at89c55.h,
1294         * device/include/at89S8252.h,
1295         * device/include/at89x51.h,
1296         * device/include/at89x52.h,
1297         * device/include/ds80c390.h,
1298         * device/include/reg764.h,
1299         * device/include/regc515c.h,
1300         * device/include/sab80515.h,
1301         * device/include/mcs51/c8051f000.h,
1302         * device/include/mcs51/c8051f018.h,
1303         * device/include/mcs51/c8051f020.h,
1304         * device/include/mcs51/c8051f040.h,
1305         * device/include/mcs51/c8051f060.h,
1306         * device/include/mcs51/c8051f120.h,
1307         * device/include/mcs51/c8051f300.h,
1308         * device/include/mcs51/c8051f310.h,
1309         * device/include/mcs51/c8051f320.h,
1310         * device/include/mcs51/c8051f330.h,
1311         * device/include/mcs51/c8051f350.h,
1312         * device/include/z180.h: Changed SDCC specific keywords to double
1313         underlined form.
1314
1315 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1316
1317         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1318         18F4455,
1319         * (pic16_assignConfigWordValue): disable testing of configuration
1320         register value with config mask,
1321         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1322         function with port->fun_prefix,
1323         * (genFunction): when generating a naked interrupt function never
1324         create an absolute segment placed in interrupt vector address, place
1325         the actual interrupt function at IVA instead, when an interrupt
1326         function is generated with unspecified interrupt then do not create
1327         the absolute section,
1328         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1329         code for generating a call to generic pointer get/put function with
1330         a call to function pic16_callGenericPointer(),
1331         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1332         the call to the generic pointer get/put functions with prefixing the
1333         function name with port->fun_prefix,
1334         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1335         * src/pic16/main.c (_process_pragma): prefix function with
1336         port->fun_prefix,
1337         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1338         calling assembler, old 18Fxxxx macro is deprecated,
1339         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1340         PC_ASMDIR in while condition,
1341         * (findInstruction): add PC_ASMDIR in while condition,
1342         * (buildCallTree): prefix main with port->fun_prefix,
1343         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1344         identifier for variable with banked access in instructions BTFSS,
1345         BTFSC, BCF, BSF, BTG
1346         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1347         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1348         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1349         perform optimization when enviroment variable NO_REG_OPT is set,
1350         * (insideLRBlock): NEW, return 1 if register is inside an
1351         INF_LOCALREGS block,
1352         * (RemoveRegFromLRBlock): remove a register that is completely
1353         eliminated by register optimization, but it is still left in local
1354         register store/restore in/from stack block,
1355         * (Remove2pcodes): after removing register, check to see if it
1356         should be removed from local register store/restore in/from stack
1357         block,
1358         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1359         DUMMY_READ_VOLATILE,
1360
1361         * device/include/pic16/adc.h: minor prototype modifications and
1362         update,
1363         * device/include/pic16/malloc.h: added GPL notice various
1364         modifications,
1365         * device/include/pic16/stdint.h: NEW, standard header for ints
1366         * device/include/pic16/delay.h: NEW, header for delay functions,
1367         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1368         delay1mtcy,
1369         * device/include/pic16/signal.h: NEW, header providing helper macros
1370         for implementing signal handlers,
1371         * device/include/pic16/stdio.h: added prototypes for functions,
1372         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1373         prototypes for stdin and stdout, added macro PUTCHAR to
1374         automatically implement putchar function prototype,
1375         * device/include/pic16/usart.h: modified and updated USART library,
1376         * device/lib/pic16/libio/adc/,
1377         * device/lib/pic16/libio/i2c: some modifications to improve library
1378         performance,
1379         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1380         family of functions,
1381         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1382         family of functions and other sources,
1383         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1384         of the PIC18Fxx[28] devices,
1385         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1386         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1387         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1388         _do_cinit function, because the previous failed when local variables
1389         where not placed in the same memory bank,
1390         * device/lib/pic16/libsdcc/char/: various modifications to improve
1391         library performance,
1392         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1393         information on the new functions of the c library and more...
1394
1395 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1396
1397         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1398
1399 2005-03-26 Raphael Neider <rneider AT web.de>
1400
1401         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1402           if condition == CARRY)
1403         * (genCmp): adapted to new genSkipc semantics
1404         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1405           on rIfx (genCmp was broken)
1406
1407 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1408
1409         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1410         * src/z80/main.c (_keywords[]),
1411         * src/SDCCglobal.h (struct options),
1412         * src/SDCC.y,
1413         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1414         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1415         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1416         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1417         always available in leading double underscore form. The C99 support is
1418         mostly missing, but it's a start.
1419         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1420         reserved identifier "__data".
1421
1422 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1423
1424         * src/mcs51/peeph.def: fixed bug 1170013
1425
1426 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1427
1428         * device/include/mcs51reg.h: fixed bug 842007
1429
1430 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1431
1432         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1433         last time.
1434
1435 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1436
1437         * src/port.h (struct PORT),
1438         * src/avr/ralloc.c (avr_assignRegisters),
1439         * src/avr/main.c,
1440         * src/ds390/ralloc.c (ds390_assignRegisters),
1441         * src/ds390/main.c,
1442         * src/hc08/ralloc.c (hc08_assignRegisters),
1443         * src/hc08/main.c,
1444         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1445         * src/mcs51/main.c,
1446         * src/pic/ralloc.c (pic14_assignRegisters),
1447         * src/pic/main.c,
1448         * src/pic16/ralloc.c (pic16_assignRegisters),
1449         * src/pic16/main.c,
1450         * src/xa51/ralloc.c (xa51_assignRegisters),
1451         * src/xa51/main.c,
1452         * src/z80/ralloc.c (z80_assignRegisters),
1453         * src/z80/ralloc.h,
1454         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1455         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1456         * src/SDCCcse.h,
1457         * src/SDCCdflow.c (computeDataFlow),
1458         * src/SDCCdflow.h,
1459         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1460         * src/SDCCloop.h,
1461         * src/SDCCcflow.c (*),
1462         * src/SDCCcflow.h,
1463         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1464         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1465         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1466         immedDom() returning wrong block; probably fixes bug #1160833)
1467
1468 2005-03-20 Borut Razem <borut.razem AT siol.net>
1469
1470         * support/scripts/inc2h.pl: WIN32 port
1471
1472 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1473
1474         * device/lib/makefile.in: added abs.c and labs.c
1475
1476 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1477
1478         * device/include/stdint.h: added
1479         * device/lib/abs.c: added
1480         * device/lib/labs.c: added
1481         * device/include/stdlib.h: added abs() and labs() prototypes
1482         * device/lib/libsdcc.lib: added abs and labs
1483         * device/include/float.h,
1484         * device/lib/_fsmul.c,
1485         * device/lib/printf_fast.c,
1486         * device/lib/printf_tiny.c: updated comments
1487
1488 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1489
1490         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1491         bug #1164313
1492
1493 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1494
1495         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1496         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1497
1498 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1499
1500         * device/lib/printf_large.c: removed inline assembly for portability and
1501           readability. Use printf_fast if speed or size are more important.
1502         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1503         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1504
1505 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1506
1507         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1508         prevent compiler warning
1509
1510 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1511
1512         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1513         moved to level 0 and declared as static. Also they are explicit
1514         placed in access bank. This was necessery because some times they
1515         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1516         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1517         optimizations. Currently only compare to unsigned char is implemented,
1518         * src/pic16/gen.c: added fReturnIdx array,
1519         * (struct resolvedIfx) is moved to gen.h and made public,
1520         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1521         * (aopForSym): added an optimization to directly store in stack of
1522         the operand of a SEND iCode,
1523         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1524         but as registers instead (AOP_REG) using the fReturnIdx array,
1525         * (pic16_freeAsmop): remove the freed register from the
1526         _G.sregsAlloc field,
1527         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1528         a compare of 'WREG',
1529         * (pic16_popGetTempRegCond): changed function prototype, now
1530         function takes also a bitVector argument v which holds the current
1531         set of registers that are allocated for stack access by aopForSym,
1532         registers allocated in aopForSym for accessing stack symbols are not
1533         any more part of the functions usedRegs field,
1534         * (genCall): some times aopOp is called for a stack variable to be
1535         send, aopForSym might perform the push, if this is true make sure
1536         that genCall doesn't push the variable twice by testing _G.resDirect,
1537         * (genFunction): changed testing for unspecified interrupt number
1538         from 256 to INTNO_UNSPEC,
1539         * modified selection scheme of frame pointer generation. Previously
1540         if function did use local registers a frame pointer was generated,
1541         now a frame pointer is generated only if function has arguments
1542         (that need PLUSW2 register access), or has stack arguments, or the
1543         compiler is not instructed to omit the frame pointer,
1544         * (genEndFunction): before restoring local registers that were saved
1545         in the function preamble, also restore the registers that *might*
1546         have been allocated for stack access,
1547         * (genRet): removed some old comments,
1548         * (genCmp, the active (RN's) version): added a call to the
1549         pic16_genCmp_special function to perform the compare with a more
1550         robust and optimized way,
1551         * (genInline): a feature has been added in inline code generation,
1552         which allows a wildcard variable substitution when writing inline
1553         assembly. Code is incomplete and experimental therefore undocumented,
1554         * (genCast): changed order of aopOp for result and right to allow
1555         aopForSym to directly load the result if possible,
1556         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1557         perform an optimized compare on some selected special occasions,
1558         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1559         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1560         generate an IVT any more,
1561         * src/pic16/main.c (pic16_optionsTable): added command line option
1562         --optimize-cmp,
1563         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1564         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1565         macros,
1566         * src/pic16/NOTES: Raphael Neider added in list of active developers
1567         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1568         jumptable_end to prevent bug #,
1569         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1570         inCond and outCond fields,
1571         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1572         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1573         turn off register spilling,
1574         * (packRegsForOneUse): synced with other ports' versions although it
1575         is not used currently,
1576         * (pic16_packRegisters): added an optimization while reading
1577         structure bitfields, some registers may be saved (malloc code is
1578         decreased by 80 bytes)
1579
1580 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1581
1582         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1583         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1584         this can be optimized more?
1585
1586 2005-03-10 Raphael Neider <rneider AT web.de>
1587
1588         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1589           genNearPointerGet): (hopefully) fixed access to bitfields via
1590           pointers (p->bitN = x; and x = p->bitN; failed)
1591
1592 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1593
1594         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1595
1596 2005-03-09 Raphael Neider <rneider AT web.de>
1597
1598         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1599
1600 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1601
1602         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1603         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1604           (regTypeNum): set REG_BIT type if necessary
1605         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1606         * support/regression/tests/critical.c: check bug 1144613
1607
1608 2005-03-02 Raphael Neider <rneider AT web.de>
1609
1610         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1611
1612 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1613
1614         * src/avr/ralloc.c (serialRegAssign),
1615         * src/ds390/ralloc.c (serialRegAssign),
1616         * src/hc08/ralloc.c (serialRegAssign),
1617         * src/mcs51/ralloc.c (serialRegAssign),
1618         * src/pic/ralloc.c (serialRegAssign),
1619         * src/pic16/ralloc.c (serialRegAssign),
1620         * src/xa51/ralloc.c (serialRegAssign),
1621         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1622
1623 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1624
1625         * src/SDCCast.c (decorateType): fixed bug 1124787
1626
1627 2005-02-20 Hubert Sack <sack AT digiplan.de>
1628         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1629
1630         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1631         patch #1121755
1632
1633 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1634
1635         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1636         to keep the correct label reference count when adding/removing references
1637         to labels. A peephole file using this is appended to patch #1144962.
1638
1639 2005-02-14 Raphael Neider <rneider AT web.de>
1640
1641         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1642         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1643         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1644           retrievals of result operand's value on assignment
1645
1646 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1647
1648         * device/include/pic16/string.h: modified prototype for memccpy()
1649         to memccpy(void *, void *, char, size_t)
1650         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1651         check whether to omit frame pointer or not,
1652         * (genInline): convert all occurences of "\n" to LF in inline
1653         assembler blocks, this helps formatting the inline text,
1654         * (pic16_loadFSR0): modified prototype,
1655         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1656         removed some 8051 legacy code,
1657         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1658         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1659         before allocating temporary registers in functions,
1660
1661 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1662
1663         * support/regression/tests/bitvars.c: corrected the "fix"
1664
1665 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1666
1667         * support/regression/tests/bitvars.c,
1668         * support/regression/tests/bitwise.c,
1669         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1670
1671 2005-02-10 Raphael Neider <rneider AT web.de>
1672
1673         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1674           different size for Alpha
1675         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1676
1677 2005-02-09 Raphael Neider <rneider AT web.de>
1678
1679         * src/SDCC.lex(doPragma) : save and restore warning options as well
1680           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1681         * have #pragma less_pedantic set the errorlevel to WARNING
1682           (fixes #1117001)
1683         * (cloneOptimize) : fixed wrong malloc's size
1684         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1685           facilitate correct handling of #pragma (save|restore)
1686
1687 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1688
1689         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1690
1691 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1692
1693         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1694
1695 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1696
1697         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1698
1699 2005-02-02 Raphael Neider <rneider AT web.de>
1700
1701         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1702         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1703         * (pic16_storeForReturn): fixed to allow returning function pointers
1704         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1705         * device/include/pic16/{stddef.h,stdbool.h}: added
1706
1707 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1708
1709         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1710
1711 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1712
1713         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1714         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1715          appeared to be required
1716
1717 2005-01-31 Borut Razem <borut.razem AT siol.net>
1718
1719         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1720           include/mcs51 and include/z80 directories to the package
1721
1722 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1723
1724         * src/hc08/gen.c (genFunction): fixed bug #1112752
1725
1726 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1727
1728         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1729
1730 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1731
1732         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1733
1734 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1735
1736         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1737
1738 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1739
1740         * device/include/c8051fxxx.h: removed these 6 files
1741         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1742
1743 2005-01-26 Raphael Neider <rneider AT web.de>
1744
1745         * src/pic16/gen.c (genAssign): fixed assignment from longs
1746           in codespace (were cut to three bytes)
1747         * (genDummyRead): implemented (except for CODESPACE...),
1748           fixed bug #1108575
1749         * src/pic16/glue.c (emitStatistics): beautified
1750         * device/lib/pic16/libm/Makefile: added include path
1751
1752 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1753
1754         * src/z80/gen.c (aopPut): fixed bug #1103902
1755
1756 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1757
1758         * device/lib/expf.c: fixed bug #1095792
1759
1760 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1761
1762         * device/lib/pic16/libm: added Math library sources
1763
1764 2005-01-24 Raphael Neider <rneider AT web.de>
1765
1766         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1767           to enable upcast to pCodeOpReg2 (there is no type tag to
1768           differenciate the two and pic16_popGet2p cast into PCOR2)
1769         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1770           (sizeof(sectNames) changed to sizeof(sectName))
1771           Both patches fix segfaults under MinGW.
1772
1773 2005-01-23 Raphael Neider <rneider AT web.de>
1774
1775         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1776           Safe_[mc]?alloc()'ed variables
1777         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1778           of (byte sized) temporaries (assign them to WREG for now)
1779         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1780           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1781           this might fix SIGSEGVs on MinGW...
1782         * src/SDCCopt.c (killDeadCode): restored original behaviour
1783           (volatile operands might get thrown away though)
1784
1785 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1786
1787         * src/pic16/gen.c: fixed bug #1106975,
1788         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1789         pointer update, INTCON is saved, global interrupts are disabled and
1790         restored after updateing TOS.
1791         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1792         * added function attribute 'shadowregs' to take advantage of shadow
1793         registers,
1794         * added function attribute 'wparam' as an alternative to the wparam
1795         pragma,
1796         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1797         user declares a non-ISR function as 'shadowregs',
1798         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1799
1800 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1801
1802         * .version: bumped version number to 2.4.8
1803         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1804         pic16 port,
1805         * device/lib/pic16/libio/i2c/: I2C module support library,
1806         * device/include/pic16/i2c.h: I2C support library header,
1807         * device/lib/pic16/libc/stdio/: standard IO support sources,
1808         * (printf_small.c): printf_small() source, supports float print,
1809         * (printf_tiny.c): printf_tiny() source, does not support floats,
1810         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1811         enable global optimizations for entire library source, other
1812         Makefiles in the source tree are also modified to reflect this,
1813         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1814         function,
1815         * doc/sdccman.lyx: updated to reflect new changes,
1816         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1817         sym->onStack if-case,
1818         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1819         sbit, idata, _idata, xdata, _xdata,
1820         * added pragma library, to link an external library, (see doc),
1821         * removed command line options, --pomit-config-words, --pomit-ivt,
1822         --pleave-reset-vector,
1823         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1824         when calling assembler to reflect memory model used, also define
1825         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1826         reflect stack model used,
1827         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1828         on stack return NULL,
1829
1830 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1831
1832         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1833           of the operands is volatile. Fixes #1020220
1834
1835 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1836
1837         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1838         * (OptimizeRegUsage): make sure that there is really no other flow where
1839           the first pCode is used
1840
1841 2005-01-22 Raphael Neider <rneider AT web.de>
1842
1843         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1844           to fix #1106967 (pCode->seq are not set up correctly)
1845
1846 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1847
1848         * src/SDCCglue.c (glue): make sure code area is declared before the
1849         static initialization area.
1850
1851 2005-01-21 Raphael Neider <rneider AT web.de>
1852
1853         * device/lib/Makefile.in: fixed test for pic16 install dir
1854         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1855           optimizations
1856         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1857           added --optimize-goto compiler switch and pragma wparam documentation
1858         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1859         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1860           and PRODH closing bug #1071770 (peephole optimizer)
1861
1862 2005-01-19 Raphael Neider <rneider AT web.de>
1863
1864         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1865           cmdLine buffers (used when calling sdcpp...) are large enough
1866           (MAX_PATH=256 truncates arguments leading to system halts when
1867           used in MinGW...)
1868         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1869         * (genUminus): rewritten to for efficiency
1870         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1871           used uninitialized in some cases)
1872         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1873           copy the third byte from the int -- now assumes 0x80 (data memory)
1874         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1875           operands (genAddLit expects the iCode's operands to swapped as
1876           well), fixed leftover bytes (crashed for short left operands)
1877         * (pic16_genMinusDec): performance improvements, removed false
1878           PIC14 emitSKPNCs
1879         * (pic16_genMinus): fixed to cope with differently sized operands
1880         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1881           for --obanksel > 1
1882         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1883         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1884           new banksel optimization
1885         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1886           analysis for temporary registers (segfaults...)
1887         * src/pic16/peeph.def: added rule
1888
1889 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1890
1891         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1892         which converts a float number to its ASCII representation
1893         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1894         functions to convert the fractional and integer part of a float to ASCII,
1895         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1896         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1897         ram
1898         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1899         _STATMEM macros,
1900         * device/include/pic16/adc.h: added GPL info,
1901         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1902         a pCodeOp as tested operand,
1903         * (genNearPointerGet): optimized bit testing, does not use
1904         intermediate register for bit value, test directly instead with
1905         BTFSS, BTFSC, works only for single bits,
1906         * (genpic16Code): dump the name of the iCode in the asm,
1907         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1908         renamed to pic16_decodeOp,
1909         * (serialRegAssign): do not allocate a temporary register for iCode
1910         sequences that test a single bit for 1/0
1911
1912 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1913
1914         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1915         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1916         access stack and frame pointers. They are initially assigned to
1917         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1918         accessing SFRs. Updated all occurences of modification of stack or
1919         frame pointer in gen.c and pcode.c,
1920         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1921         assigning of a literal value to pointers,
1922         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1923         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1924         selected
1925
1926 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1927
1928         * doc/sdccman.lyx: update documentation about stack pragma, added
1929         some info for stack memory models
1930
1931 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1932
1933         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1934
1935 2005-01-08 Raphael Neider <rneider AT web.de>
1936
1937         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1938           udata sections to fix bug #1097823
1939
1940 2005-01-05 Raphael Neider <rneider AT web.de>
1941
1942         * src/pic16/gen.c (genGenericShift): added handling of differently
1943           sized left operand and result
1944
1945 2005-01-04 Raphael Neider <rneider AT web.de>
1946
1947         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1948         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1949           to hold the condition bit)
1950         * added new version of genCmp (old code available via #define)
1951         * added new version of genShiftLeft/genShiftRight in a generic
1952           way, now supports shifting by negative values
1953         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1954           shiftCount (expected by genGenericShift)
1955         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1956         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1957           dump
1958         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1959           is an invalid literal too...)
1960
1961 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1962
1963         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1964         from Raphael Neider,
1965         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1966         for 8-bit literals. This fixes some literal operands which are sign
1967         extended to 16-bits ints when instruction needs only 8-bits.
1968
1969 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1970
1971         * device/lib/logf.c: added mcs51 assembly version
1972         * device/lib/expf.c: added mcs51 assembly version
1973         * device/lib/_logexpf.c: new shared asm code for expf and logf
1974         * device/include/math.h: add defines for assembly math library
1975         * device/lib/Makefile.in: build new _logexpf.c
1976         * device/lib/libfloat.lib: use new _logexpf.c
1977
1978 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1979
1980         * src/pic/device.c
1981         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1982           device types which have less than 0x7f registers.
1983
1984 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1985
1986         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1987
1988 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1989
1990         * device/lib/printf_fast.c: only build on supported arch.
1991         * device/lib/printf_tiny.c: only build on supported arch.
1992         * device/lib/printf_fast_f.c: only build if asm float lib
1993         * device/lib/_fsget1arg.c: only build if asm float lib
1994         * device/lib/_fsget2args.c: only build if asm float lib
1995         * device/lib/_fsnormalize.c: only build if asm float lib
1996         * device/lib/_fsreturnval.c: only build if asm float lib
1997         * device/lib/_fsrshift.c: only build if asm float lib
1998         * device/lib/_fsswapargs.c: only build if asm float lib
1999         * device/include/stdio.h: don't provide print_fast,
2000           print_fast_f, print_tiny prototypes if --xstack used
2001
2002 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2003
2004         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2005         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2006           to the SOURCES
2007
2008 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2009
2010         * device/lib/printf_fast_f.c: same as printf_fast, but
2011           with floating point enabled
2012         * device/lib/printf_fast.c: minor tweaks
2013         * device/include/stdio.h: add printf_fast_f
2014
2015 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2016
2017         * src/SDCCmain.c: make --float-reent default for mcs51
2018         * device/lib/_fsadd.c: added mcs51 assembly version
2019         * device/lib/_fssub.c: added mcs51 assembly version
2020         * device/lib/_fsmul.c: added mcs51 assembly version
2021         * device/lib/_fsdiv.c: added mcs51 assembly version
2022         * device/lib/_fseq.c: added mcs51 assembly version
2023         * device/lib/_fsneq.c: added mcs51 assembly version
2024         * device/lib/_fsgt.c: added mcs51 assembly version
2025         * device/lib/_fslt.c: added mcs51 assembly version
2026         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2027         * device/lib/Makefile.in: add _fscmp to build
2028         * device/lib/libfloat.lib: add _fscmp to build
2029
2030 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2031
2032         * device/lib/_fs2slong.c: added mcs51 assembly version
2033         * device/lib/_fs2sint.c: added mcs51 assembly version
2034         * device/lib/_fs2schar.c: added mcs51 assembly version
2035         * device/lib/_fs2ulong.c: added mcs51 assembly version
2036         * device/lib/_fs2uint.c: added mcs51 assembly version
2037         * device/lib/_fs2uchar.c: added mcs51 assembly version
2038         * device/lib/_slong2fs.c: added mcs51 assembly version
2039         * device/lib/_sint2fs.c: added mcs51 assembly version
2040         * device/lib/_schar2fs.c: added mcs51 assembly version
2041         * device/lib/_ulong2fs.c: added mcs51 assembly version
2042         * device/lib/_uint2fs.c: added mcs51 assembly version
2043         * device/lib/_uchar2fs.c: added mcs51 assembly version
2044         * device/include/float.h: added #define to select asm vs c
2045
2046 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2047
2048         * device/lib/printf_fast.c: improvements to float output
2049         * device/include/float.h: add defines for assembly float library
2050         * device/lib/_fsget1arg.c: receive 1 float arg
2051         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2052         * device/lib/_fsnormalize.c: normalize a float
2053         * device/lib/_fsreturnval.c: return float, various helper routines
2054         * device/lib/_fsrshift.c: right shift a float's mantissa
2055         * device/lib/_fsswapargs.c: swap 2 floats
2056         * device/lib/Makefile.in: build these 6 new files for mcs51
2057         * device/lib/libfloat.lib: add these 6 files to the library
2058
2059 2004-12-26 Borut Razem <borut.razem AT siol.net>
2060
2061         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2062           built by gcc 3.4.2
2063
2064 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2065
2066         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2067           and fully reentrant and register bank neutral.
2068         * device/lib/printf_fast.c: added float (not enabled by default),
2069           added compact/slower integer (also not enabled by default),
2070           improved size/speed of fast integer code, other minor changes
2071         * device/include/stdio.h, device/lib/Makefile.in,
2072           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2073
2074 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2075
2076         * src/pic16/pcode.c: declaring variables other than at the start of a
2077           block is not supported in C by VC6.
2078
2079 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2080
2081         * applied a previous patch from Raphael Neider that wasn't included
2082         in the previous commits, which fixes infinite loops within jumptable
2083         improvements,
2084         * made some fixes that previous patches introduced
2085
2086 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2087
2088         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2089         that fixes an issue with AOP_PCODE asmop's offset,
2090         * (pic16_popCopyReg): update instance field too,
2091         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2092         function of pic port,
2093         * (genCmp, genAnd, genAssign),
2094         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2095
2096 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2097
2098         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2099         variables initial values to idata section,
2100         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2101         variables in some functions. This utilizes parmBytes field of iCode
2102         structure to hold the offset of the variable in stack. (might be
2103         able to use the stack field too?)
2104         * applied patch from Raphael Neider # ### , # ###
2105         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2106         variable initial values in idata section,
2107         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2108         for static variables with initial value
2109         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2110         applied fix in while loop from Raphael Neider.
2111
2112 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2113
2114         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2115         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2116         * src/ds390/ralloc.c (serialRegAssign): spill bits
2117         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2118         * support/Util/SDCCerr.c,
2119         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2120         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2121         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2122
2123 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2124
2125         * device/include/sdcc-lib.h: inserted LGPL, added includes
2126           asm/ds390/features.h and asm/mcs51/features.h
2127         * device/include/asm/default/features.h,
2128         * device/include/asm/gbz80/features.h,
2129         * device/include/asm/z80/features.h: added empty _AUTOMEM
2130           and _STATMEM
2131         * device/include/asm/ds390/features.h,
2132         * device/include/asm/mcs51/features.h: added files with defines for
2133           _AUTOMEM and _STATMEM indicating automatic and static storage class
2134         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2135         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2136         * src/SDCCicode.c (geniCodeCast),
2137         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2138         * src/SDCCloop.c (loopInduction): removed unused variable lr
2139         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2140           to convertToFcall to include char modulo (RFE 1065037), added check
2141           if left operand is unsigned and use abs of literal value
2142         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2143           as it doesn't work after conversion from peephole.def to peephole.rul
2144         * src/mcs51/gen.c (toBoolean): added check for size,
2145           (genModOneByte): optimized code for signed char modulo a literal
2146           power of 2 (thanks to Hubert Sack),
2147           (genRRC): removed unnecessary "clr c",
2148           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2149         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2150           jump optimization,
2151           swapped rules 256.c and 256.d,
2152           extended 256.d by using new multiple checks (thanks Erik),
2153           added rules 256.e and 256.f,
2154           updated rule 261.a and 261.b to new generated code
2155         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2156
2157 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2158
2159         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2160           induction related bugs, including first part of bug #1074377
2161
2162 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2163
2164         * applied patch from bug-report #1076292,
2165         * applied patches for genAnd and Goto-optimizations for Raphael
2166         Neider,
2167         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2168         dump a less iCode information,
2169         * src/pic16/device.h (pic16_options_t): added field debgen,
2170         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2171         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2172         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2173         puclic,
2174         * (various functions): added macros FENTRY and FENTRY2 to functions,
2175         to emit function prologue,
2176         * (various functions): fixed indentation,
2177         * (genNearPointerGet): fixed loading of FSR0,
2178         * (genPackBits): applied patch from Raphael Neider to fix updating
2179         of FSR0 and touching only the modified bits,
2180         * src/pic16/genarith.c (various functions): added macros FENTRY to
2181         emit function prologue in comments,
2182         * src/pic16/pcode.h: added functions debugf2, debugf3,
2183         * src/pic16/ralloc.c: partial fix for packForPush caused
2184         segmentation fault,
2185
2186 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2187
2188         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2189           <stsp AT users.sourceforge.net> with reversed byte order
2190         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2191
2192 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2193
2194         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2195           bug #1074377
2196         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2197         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2198
2199 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2200
2201         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2202
2203 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2204
2205         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2206           conditions,
2207           (setFromConditionArgs): friendly operand parser for peephole rules,
2208           (operandBaseName, operandsNotRelated): new peephole condition
2209           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2210           architecture specific register naming into account, handles n-way
2211           comparisons, and supports quoted literals
2212         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2213
2214 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2215
2216         * src/mcs51/peeph.def: fixed bug #1076940
2217
2218 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2219
2220         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2221
2222 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2223
2224         Adding support for replacing ljmps with sjmps in jumptables
2225         generated for switch statements. For now you need to set the
2226         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2227         Now 4 algorithms for mcs51 jumptable generation are used:
2228         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2229         addresses loaded pc-relative for up to 112 cases and stack-pushing
2230         target addresses loaded with offset from dptr for up to 256 cases.
2231
2232         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2233         * src/mcs51/main.c: adapted constants for switch table generation
2234         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2235
2236 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2237
2238         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2239         * support/regression/tests/bug1057979.c: added test for bug 1073386
2240
2241 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2242
2243         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2244         compilers
2245
2246 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2247
2248         * src/pic16/device.h,
2249         * src/pic16/genarith.c,
2250         * src/pic16/glue.c,
2251         * src/pic16/main.c,
2252         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2253
2254 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2255
2256         Large cummulative patch for pic16 port.
2257         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2258         to call when a stack overflow occurs,
2259         * (malloc.h): added CVS Id tag,
2260         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2261         variable,
2262         * added libc directory. The current version of LibC contains string
2263         functions, ctype functions and macros and some functions of the
2264         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2265         be extensively tested in the future. Standard disclaimer here.
2266         Library is not automatically build yet. But one can build it by
2267         invoking 'make' inside the libc directory.
2268         * added ADC library under libio. Preliminary version yet.
2269
2270         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2271         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2272         aopForRemat() now and not by pic16_aopOp(),
2273         * (pic16_popGetTempReg): removed warning messgae when allocating
2274         temporary registers, its a buggy feature and will be removed,
2275         * (pic16_popGet): set register instance field in AOP_CRY,
2276         * (pic16_outBitC): fixed for results in size greater than 1,
2277         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2278         * (pic16_storeForReturn): optimized return of 0,
2279         * (genCmp): experimental code for new genCmp which uses PIC18's
2280         special compare&skip instructions. Initial tests fail some times
2281         with variables grater than 1 byte in size, so new code is disabled,
2282         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2283         a single bit,
2284         * (genCast): began a fix to optimize the casting of a bit to another
2285         bit, now assigning a bitfield to another bitfield will fail, sorry,
2286         * src/pic16/main.c: disabled the use of lr-support feature,
2287         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2288         * added some function prototypes, added function _debugf prototype,
2289         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2290         bits with offset (case PO_GPR_BIT),
2291         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2292         command line,
2293         * (isBankInstruction): modified to return 0 for no banking instruction,
2294         and 1 for banking instruction,
2295         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2296         caused stop processing pCodes after a inline assembly block,
2297         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2298         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2299         registers when it shouldn't,
2300         * src/pic16/ralloc.c (allocReg): add preliminary support for
2301         supporting a limited set of temporary registers,
2302
2303 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2304
2305         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2306           genDataPointerSet): ensure assignments always copy in MSB to LSB
2307           order,
2308           (loadRegFromAop): recognize CLRH optimization,
2309           (genFunction): optimize RECEIVE iCodes in reentrant functions
2310
2311 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2312
2313         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2314           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2315           selected.
2316         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2317         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2318           contiguous with data
2319
2320 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2321
2322         * device/lib/_gptrget.c (_gptrget),
2323         * device/lib/_gptrgetc.c (_gptrgetc),
2324         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2325           instead of sjmp to ret
2326         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2327           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2328
2329 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2330
2331         * .version: bumped version to 2.4.7
2332         * device/lib/_gptrget.c (_gptrget): is now _naked
2333         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2334         * device/lib/_gptrput.c (_gptrput): is now _naked
2335         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2336           (createFunction): fixed xstack
2337         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2338         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2339           or bit either,
2340           (geniCodeCritical): store original interrupt state in an iTemp bit
2341           var unless stack-auto
2342         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2343         * src/SDCCmain.c (setIncludePath): added include/target to search path
2344         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2345         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2346           prototype,
2347           (processFuncArgs): put bit vars in bit area
2348         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2349           unsaveRBank): fixed xstack,
2350           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2351           (genFunction, genEndFunction): fixed xstack,
2352           (genAssign): optimization don't walk backwards through mem
2353         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2354         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2355         * support/regression/Makefile: also make library (for stack-auto) when
2356           making "all" and added "test-mcs51-xstack-auto"
2357         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2358         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2359         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2360         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2361         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2362           make-library by MAKE_LIBRARY
2363         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2364           regression tests for xstack
2365         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2366         * support/regression/tests/critical.c: test for critical on mcs51
2367
2368 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2369
2370         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2371           built version of sdcc instead of installed version
2372
2373 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2374
2375         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2376         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2377           vprintf.c now
2378         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2379         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2380           WARNING: remove device/lib/build/z80/printf.o by hand when
2381           updating from previous build!
2382         * device/lib/z80/printf.c: updated comment
2383         * support/regression/tests/bug1057979.c: test all ports now
2384         * support/regression/tests/bug1065458.c: file added
2385
2386 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2387
2388         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2389           *_start and *_end symbols for static functions
2390
2391 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2392
2393         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2394           and search crt0.o in all library paths,
2395           (setIncludePath): proper handling of --nostdinc,
2396           (setLibPath): proper handling of --nostdlib
2397         * support/regression/Makefile,
2398         * support/regression/ports/ds390/spec.mk,
2399         * support/regression/ports/gbz80/spec.mk,
2400         * support/regression/ports/hc08/spec.mk,
2401         * support/regression/ports/mcs51/spec.mk,
2402         * support/regression/ports/mcs51-large/spec.mk,
2403         * support/regression/ports/mcs51-stack-auto/spec.mk,
2404         * support/regression/ports/z80/spec.mk: use include and lib files from
2405           built version of sdcc instead of installed version
2406         * doc/sdccman.lyx: fixed typo in --nostdinc
2407
2408 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2409
2410         * src/pic/pcode.c,
2411         * src/pic/device.c,
2412         * src/pic/ralloc.c,
2413         * src/pic/gen.c : added support to generate code for struct bit fields.
2414
2415 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2416
2417         * as/xa51/xa_version.h,
2418         * device/include/errno.h,
2419         * device/include/regc515c.h,
2420         * device/lib/_itoa.c,
2421         * device/lib/_ltoa.c,
2422         * device/lib/ser_ir_cts_rts.c,
2423         * sim/ucsim/xa.src/glob.cc,
2424         * sim/ucsim/xa.src/inst_gen.cc,
2425         * sim/ucsim/xa.src/xa_bit.cc,
2426         * sim/ucsim/xa.src/xa_sfr.cc,
2427         * sim/ucsim/z80.src/inst_dd.cc,
2428         * sim/ucsim/z80.src/inst_fdcb.cc,
2429         * support/scripts/keil2sdcc.pl,
2430         * src/pic16/pic16.dsp,
2431         * src/pic16/pic16a.dsp: corrected cvs line endings
2432         * device/lib/printf_large.c: fixed bug 1057979
2433         * src/pic16/gen.c: fixed non-C standard code
2434         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2435         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2436         * support/regression/ports/mcs51/support.c: reload T1 asap
2437         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2438           pdata use and clear idata startup behaviour
2439         * support/regression/tests/bug1057979.c: added
2440
2441 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2442
2443         * device/examples/ds390/ow390/ad26.h,
2444         * device/examples/ds390/ow390/cnt1d.h,
2445         * device/examples/ds390/ow390/crcutil.c,
2446         * device/examples/ds390/ow390/ownet.h,
2447         * device/examples/ds390/ow390/owsesu.c,
2448         * device/examples/ds390/ow390/swt12.h,
2449         * device/examples/ds390/ow390/swtoper.c,
2450         * device/examples/ds390/ow390/temp10.h,
2451         * device/examples/ds390/ow390/thermodl.c,
2452         * device/examples/ds390/tinitalk/tinitalk.dsp,
2453         * device/examples/ds390/tinitalk/tinitalk.dsw,
2454         * device/examples/mcs51/clock/hw.h,
2455         * device/examples/mcs51/simple2/go.bat,
2456         * device/examples/serialcomm/windows/serial.h,
2457         * device/examples/xa51/dummy.c,
2458         * device/examples/xa51/hello.c,
2459         * device/include/80c51xa.h,
2460         * device/include/at89x051.h: corrected cvs line endings
2461
2462 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2463
2464         * src/pic16/main.c (options): added command line --gstack, to trace
2465         stack over/under flows,
2466         * added pragma 'wparam' to allow passing first byte of function
2467         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2468         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2469         call to __gstack_test function and sets up the symbol as extern,
2470         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2471         * popaop): added call to pic16_testStackOverflow,
2472         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2473         wparamList list,
2474         * (genCall, genPcall): now all parameters are passed via stack
2475         except in functions that are pass to wparam pragma in which WREG is
2476         used too,
2477         * (genPcall): REENTRANT flag is checked to see if variable prototype
2478         contains reentrant keyword, don't call a non-reentrant function, via
2479         a reentrant function pointer or vice versa, functions are never
2480         passed via WREG,
2481         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2482         D.Winkler,
2483         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2484         SIGSEGV when accessing a NULL register stucture,
2485         * (pic16_printGPointerType): modified to handle UPPER modifier for
2486         function initializers, changed prototype of function to simpler one,
2487         * (pic16_printIvalFuncPtr): check to see if function is already
2488         added in externs list,
2489         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2490         optimized a move from W to SFR with a move to the same register
2491         later after a CALL,
2492         * device/lib/pic16/debug: NEW directory, contains debug features
2493         which are enabled when linking with libdebug.lib, currently command
2494         line option --gstack enables stack pointer tracing for over/under
2495         flow, corresponding sources are in debug/gstack
2496
2497 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2498
2499         * doc/sdccman.lyx: updated SDCC version,
2500         * (PIC16 port): update list of command line options,
2501         * src/pic16/device.h (structure pic16_options_t): added field gstack
2502         to enable stack overflow tracing on push/pops,
2503         * src/pic16/device.c (statistics structure): added statistics
2504         structure,
2505         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2506         pic16_dump_int_registers): increase statistics counters for each
2507         * variable which is encountered
2508         * (pic16_dump_usection): emit each .udata variable to its own udata
2509         section,
2510         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2511         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2512         parameters via stack, otherwise use old scheme,
2513         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2514         assembler output file,
2515         * src/pic16/main.c: added command line options --gstack to enable
2516         push/pop tracing for stack overflow,
2517         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2518         instructions): added size of each instruction,
2519         * (pic16_countInstruction): estimate size of instructions in
2520         the_pFile list, inline assembly blocks are not counted,
2521         * (pic16_FixRegisterBanking): trace previous register usage, when
2522         banksel optimizations is greater than 0, don't emit a redudant
2523         banksel directive,
2524
2525 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2526
2527         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2528         * src/pic16/ralloc.c : applied same fix for pic16.
2529         * src/pic/gen.c : tidied it up a little.
2530
2531 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2532
2533         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2534         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2535
2536 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2537
2538         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2539
2540 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2541
2542         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2543         non-reentrant function __modsint in the interrupt function (thus
2544         corrupting math operations during serial I/O)
2545         * device/lib/ser_ir.c: as above, changed buffersize
2546         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2547         256.c,d for zeroing
2548         * doc/Makefile: added option -t for rsync
2549
2550 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2551
2552         * src/SDCCast.h (struct ast),
2553         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2554
2555 2004-10-20 Borut Razem <borut.razem AT siol.net>
2556
2557         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2558         package
2559
2560 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2561
2562         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2563         makefile targets,
2564         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2565         support functions to replace long sequences of MOVFF's from access
2566         bank registers to stack and vice versa,
2567         * src/pic16/device.h: added new field opt_flags, where optimization
2568         flags can be set to enable certain features,
2569         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2570         * pBlock, (genFunction, genEndFunction): surroung loop for
2571         saving/loading used registers in stack with PC_INFO pCodes,
2572         INF_LREGS. Code in between can then be optimized by pCode optimizer
2573         to support function calls,
2574         * (genDataPointerSet): fixed bug which loaded float fields in
2575         structures with corrupt data,
2576         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2577         in a standard way debug info on stderr. Feature used for developing
2578         and debugging only,
2579         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2580         obsolete chunks of code,
2581         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2582         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2583         * pic16/src/pcode.c (pic16_newpCodeInfo,
2584         * (pic16_newpCodeOpLocalRegs),
2585         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2586         feature,
2587         * (pic16_pCodeConstString): printing of the initial value of a
2588         symbol as a comment is inhibited since parsing was already done by
2589         copyStr and output is corrupt,
2590         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2591
2592 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2593
2594         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2595
2596 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2597
2598         * as/mcs51/lkarea.c: removed old K&R style,
2599           (lnksect): changed check on boundary error,
2600           (lnksect2): changed check on boundary error,
2601           (lnksect2): extend XSTK to end of page if size = 1
2602         * as/mcs51/lkmain.c: removed old K&R style,
2603           (Areas51): create l_IRAM symbol
2604         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2605         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2606           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2607         * device/lib/_mullong.c: added version to be compiled with xstack
2608         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2609         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2610         * device/lib/mcs51/crtxstack.asm: fixed comment
2611         * src/SDCCglue.c: maxInterrupts defaults to 0,
2612           (emitMaps): added pdata,
2613           (createInterruptVect): (re)moved default,
2614           (glue): added pdata,
2615           (glue): moved __start__xstack to XSTK with default size 1
2616         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2617           and options.float_rent when options.stackAuto is set,
2618           (linkEdit): only write XDATA_NAME if provided on command line
2619         * src/SDCCmem.h,
2620         * src/SDCCmem.c: added pdata
2621         * src/port.h: added pdata_name to PORT
2622         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2623           (saveRegisters, unsaveRegisters): removed usage of B,
2624           (genMinus): fixed accumulator clash,
2625           (genJumpTab): added comment, this needs another look
2626         * src/mcs51/gen.c: added check for "B in use" paranoia,
2627           added pushB() and popB()
2628         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2629           chance
2630         * src/avr/main.c,
2631         * src/ds390/main.c,
2632         * src/hc08/main.c,
2633         * src/mcs51/main.c,
2634         * src/pic/main.c,
2635         * src/pic16/main.c,
2636         * src/xa51/main.c,
2637         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2638           added PSEG (PAG,XDATA) or NULL to port specifier
2639         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2640         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2641           (_mcs51_genInitStartup): removed __start__xstack equ,
2642           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2643         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2644         * src/z80/gen.c (_rleAppend): fixed warnings
2645         * support/regression/tests/zeropad.c: added pdata test
2646         * .version: bumped to 2.4.6
2647
2648 2004-10-17 Borut Razem <borut.razem AT siol.net>
2649
2650         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2651         as a part of nightly build
2652
2653 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2654
2655         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2656         WREG holds the first byte function parameters,
2657         * (aopForSym): take special case for symbols which are in FARSPACE
2658         but in CODESPACE too,
2659         * (assignResultValue): modified to take into account _G.useWreg,
2660         * (genCall): don't use wreg for parameter passing when function is
2661         declared as reentrant, too, added optimization INCF to stack
2662         pointer when stack parameter count is 1,
2663         * (genFunction, genEndFunction): refurnished and fixed to not using
2664         wreg for passing parameters when function has varargs or is
2665         reentrant, fixed bug with symbol name compare for generating
2666         functions in absolute address,
2667         * (pic16_storeForReturn): refurnished,
2668         * (genCmp): began writing a new version of the function, not ready
2669         yet, therefore it is disabled,
2670         * (genAssign): do not read code memory when assigning a function to
2671         a pointer function,
2672         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2673         array of characters, not pointer,
2674         * (pic16initialComments): in debug mode emit an .ident directive for
2675         the assembler,
2676         * (_process_pragma): emit a new warning type (internal to pic16)
2677         when setting stack to default length, emit a similar warning when
2678         placing a function at absolute address and address is not word aligned
2679         * (_pic16_parseOptions): added 'return TRUE' statement,
2680         * (_pic16_linkEdit): if compiling a source, then add the source's
2681         file object, first in the list of objects to link,
2682
2683 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2684
2685         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2686         * src/pic/main.c : removed VC warning.
2687         * src/pic/gen.c : changed comment.
2688
2689 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2690
2691         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2692         reference to a deprecated symbol _GPTRREG was causing failure to
2693         link. Thanks G. M. Gallant for the info.
2694
2695 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2696
2697         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2698         comments for Bugs item #954788.
2699
2700 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2701
2702         * src/pic16/device.c (pic16_dump_gsection,
2703         * pic16_groupRegistersInSection): handle symbols declared to be in
2704         access bank differently,
2705         * src/pic16/gen.c (struct _G): added field resDirect,
2706         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2707         send values read from stack directly to result and don't allocate
2708         temporary values,
2709         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2710         same registers,
2711         * (pic16_sameRegsOfs): NEW,
2712         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2713         free because they were not allocated from temporary pool,
2714         * pic16_popRegFromString): workaround to fix a problem with
2715         allocating variables twice or never,
2716         * (genGenPointerGet): using PRODL instead of FSR0H,
2717         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2718         instead of FSR0H,
2719         * (genAssign): take advantage of the _G.resDirect flag,
2720         * (genCast): around line 11844, use mov2f instead of directly
2721         MOVFF'ing between operands to account for literal values,
2722         * src/pic16/genutils.c: some new debug functions for gpsim have been
2723         added,
2724         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2725         float with integer part only,
2726         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2727         place variables in access bank
2728         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2729         updated sources to reflect recent changes in gen.c
2730
2731 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2732
2733         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2734         sources that searched for headers in installation path, now the
2735         device/include/pic16 is used,
2736         * src/pic16/glue.c (pic16glue),
2737         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2738         .line directives if not in debug mode, this suppresses assembler's
2739         warnings for ignored directives
2740
2741 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2742
2743         * src/port.h: made reset_regparms prototype void parameter explicit.
2744         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2745         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2746         * doc/sdccman.lyx: documented warning disabling and how to use
2747           printf_large to make it print floats.
2748         * device/include/stdbool.h: NEW
2749         * device/lib/_atof.c,
2750         * device/lib/_divuint.c,
2751         * device/lib/_divulong.c,
2752         * device/lib/expf.c,
2753         * device/lib/printf_large.c,
2754         * device/lib/sincosf.c,
2755         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2756         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2757           a completely reentrant lib.
2758
2759 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2760
2761         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2762         * device/include/pic16/stdio.h: fixed bug with colon
2763
2764 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2765
2766         * device/include/pic16/stdio.h,
2767         * device/include/pic16/stdlib.h,
2768         * device/include/pic16/math.h: NEW
2769         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2770         declared as _naked to reduce overhead
2771         * device/lib/Makefile.in (target port-specific-objects-pic16):
2772         changed * to *.* so to ignore the CVS directory,
2773         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2774         stacked variables back in stack,
2775         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2776         corruption
2777
2778 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2779
2780         * .version: bumped version number to 2.4.5
2781         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2782         * support/Util/SDCCerr.c (messages structure): added entry for
2783         W_POSSBUG2
2784
2785         Large cumulative patch for pic16 port and libraries.
2786         * device/include/pic16/sdcc-lib.h,
2787         * device/include/pic16/stdarg.h,
2788         * device/include/asm/pic16/features.h,
2789         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2790         * device/include/pic16/float.h: changes reentrant keyword with
2791         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2792         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2793         updated target build-libraries to include objects from gptr,
2794         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2795         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2796         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2797         all function headings,
2798         * src/SDCCmain.c: added global parameter userIncDirsSet,
2799         * (parseCmdLine): when option -I is encountered add directory to
2800         userIncDirsSet too,
2801         * src/version.awk: added space between control and long,
2802         * src/pic16/NOTES: added some notes for the port,
2803         * src/pic16/gen.c: added prototype for mov2fp function,
2804         * (fReturnpic16[]): properly named return value registers,
2805         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2806         * (aopForSym): added code to handle symbols with onStack flag set,
2807         symbols onStack are allocated PTRSIZE bytes,
2808         * (aopFreeAsmop): handles special case where asmops are stack objects,
2809         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2810         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2811         added argument lock to trace flaws in allocating temporary registers
2812         when developing port,
2813         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2814         * (pic16_popRegFromString): reenabled allocating a direct register
2815         from string,
2816         * (assignResultValue): various beautifications,
2817         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2818         referenced function argument,
2819         * (genIpush): reenabled to allow stacked arguments, handles only
2820         ic->parmPush iCodes,
2821         * (genCall, genPcall): major changes to allow for variable argument
2822         functions, fixed a bug with falsely restoring stack pointer after
2823         returning from call,
2824         * (genFunction): pending code for critical function,
2825         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2826         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2827         * (genNearPointerGet): fixed bug with indirect reading, was always
2828         reading from INDF0
2829         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2830         pointers,
2831         * (genAddrOf): rewrote code to take address of a stacked function parameter
2832         * (genCast): fixed casting to generic pointer type,
2833         * src/pic16/gen.h: added AOP_STA,
2834         * (struct asmop): added field stk,
2835         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2836         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2837         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2838         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2839         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2840         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2841         generic pointers,
2842         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2843         and library paths,
2844         * (pic16_port structure): generic pointer size is set to 3,
2845         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2846         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2847         compiler warning,
2848         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2849         operand is an iTemp,
2850
2851 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2852
2853         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2854         * debugger/mcs51/simi.c: addapt new syntax of s51
2855
2856 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2857
2858         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2859         * src/pic16/pcode.c: commented out some calls to free() in order to
2860         fix bug #989576,
2861
2862 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2863
2864         * src/SDCCicode.h,
2865         * src/SDCCicode.c (isiCodeInFunctionCall),
2866         * src/avr/ralloc.c (selectSpil),
2867         * src/pic/ralloc.c (selectSpil),
2868         * src/pic16/ralloc.c (selectSpil),
2869         * src/ds390/ralloc.c (selectSpil),
2870         * src/hc08/ralloc.c (selectSpil),
2871         * src/xa51/ralloc.c (selectSpil),
2872         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2873         stack in the middle of a function call sequence (fixes bug #1020268)
2874         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2875         costs associated with the minimum switch case.
2876
2877 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2878
2879         * src/SDCC.lex: fixed bug #1030549
2880
2881 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2882
2883         * src/SDCCcse.h (struct cseDef),
2884         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2885         over a function call if the CSE is derived from a symbol whose
2886         address has been taken (fixes bug #1029883)
2887         * support/regression/tests/bug-1029883: a new regression test for
2888         this bug
2889
2890 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2891
2892         * src/hc08/gen.c (emitinline): fixed bug #1029778
2893         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2894         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2895         and starts toward RFE #905167)
2896
2897 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2898
2899         * src/pic16/gen.c (mov2f): New function to move an operand to
2900         another without considering if it is a literal or a register,
2901         * (pic16_sameRegs): don't check if they are both AOP_REG,
2902         * (AccRsh): removed andmask=0 lines,
2903         * (genLeftShift): duplicated to be improved in future versions,
2904         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2905         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2906         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2907         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2908         * (insertBankSwitch): fixed inserting banksel directives algorithm
2909         for instructions that follow a skip instruction, this fixes a report
2910         for broken subtraction code generation,
2911         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2912         iCode is a left op, just in case result and right share the same
2913         registers
2914
2915 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2916
2917         * src/hc08/main.c,
2918         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2919         preservation of HX
2920         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2921         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2922         on 2004-09-12; it was buggy
2923
2924 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2925
2926         * src/SDCCsymt.h: removed RESULT_CHECK
2927         * src/SDCCast.c,
2928         * src/SDCCglue.c,
2929         * src/SDCCval.c,
2930         * src/pic/glue.c,
2931         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2932
2933 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2934
2935         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2936         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2937         configuration values no more rejected by compiler, they are assigned
2938         to configuration registers with a warning message instead,
2939         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2940         the for-loop so last conf register is emitted too,
2941         * (_pic16_initPaths): link library libsdcc.lib by default,
2942         * (_hasNativeMulFor): modified test for multiplication according to
2943         Raphael Neider's remarks. Integer multiplication is also done with
2944         support functions,
2945         * device/include/pic16/pic18fregs.h: corrected type error in while
2946         testing and including 18f6720 header file
2947
2948 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2949
2950         * src/pic16/device.h (pic16_options): removed field use_crt,
2951         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2952         until an optimization to handle single bits is added,
2953         * (pic16_loadFSR0): moved before genUnpackBits,
2954         * (genAnd): some white lines removed,
2955         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2956         leave_reset flags in pic16_options when using crt modules,
2957
2958 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2959
2960         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2961           for bugs 898889 & 979599. Also used some safer print instructions.
2962
2963 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2964
2965         * src/pic16/device.h (pic16_options_t): added field use_crt,
2966         crt_name, no_crt,
2967         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2968         catch a probable future bug,
2969         * src/pic16/gen.c: aopIdx function commented out,
2970         * (genAssign): commented out old code which used aopIdx,
2971         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2972         code, added if conditionals to take into account the --use-crt
2973         command line options,
2974         * src/pic16/main.c (pic16_optionsTable): added new command line
2975         options, --use-crt= and --no-crt,
2976         * (_pic16_linkEdit): now the proper crt object is added in the
2977         linker command line except than when --no-crt is specified,
2978         * src/pic16/pcode.c,
2979         * src/pic16/pcode.h: added some structures and functions for a new
2980         optimization scheme to compansate for instruction overhead between
2981         same iCodes, this scheme is currently under development and is not
2982         working in any way,
2983         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2984         to && operator,
2985         * device/lib/pic16/startup/crt0i.c,
2986         * device/lib/pic16/startup/crt0iz.c: added global char variable
2987         __uflags to force the generation of an idata section
2988
2989 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2990
2991         * doc/Makefile,
2992         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2993         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2994
2995 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2996
2997         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2998         Frieder) and clarified the default code optimization mode
2999
3000 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3001
3002         * src/SDCC.lex (doPragma, process_pragma),
3003         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3004         "opt_code_size", and "opt_code_balanced"
3005         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3006         regrouped options by category, added support for category headers
3007         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3008         and "--opt-code-size"
3009         * doc/sdccman.lyx: documented these new options and pragmas
3010         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3011         preference into account
3012
3013 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3014
3015         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3016           geniCodePreDec): Fixed bug 904237 by generating a warning
3017         * src/SDCCerr.h,
3018         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3019
3020 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3021
3022         * src/pic/device.c : When no max ram set validate full memory range.
3023         * src/pic/pcode.c,
3024         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3025
3026 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3027
3028         * device/lib/_gptrget.c,
3029         * device/lib/_gptrput.c: updated comment
3030         * device/lib/calloc.c,
3031         * device/lib/free.c,
3032         * device/lib/malloc.c,
3033         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3034         * src/SDCCcse.c (cseBBlock),
3035         * src/SDCCicode.c (printOperand, geniCodeArray),
3036         * src/SDCCicode.h (struct operand): fixed bug 868103
3037         * support/regression/tests/bug-868103.c: added
3038         * src/SDCCast.c (searchLitOp),
3039         * src/SDCCcse.h (struct cseDef),
3040         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3041         * src/SDCCicode.h (struct operand),
3042         * src/SDCCsymt.h (struct sym_link),
3043         * src/avr/gen.c (hasInc),
3044         * src/ds390/gen.c (hasInc),
3045         * src/hc08/gen.c (genPlusIncr, hasInc),
3046         * src/mcs51/gen.c (hasInc),
3047         * src/pic16/glue.c (pic16_printIvalChar),
3048         * src/pic16/ralloc.c (regWithIdx),
3049         * src/xa51/gen.c (hasInc) : removed warnings
3050         * src/SDCCast.c (createBlock): added comment ???
3051         * src/hc08/ralloc.c: updated comments
3052
3053 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3054
3055         * doc/sdccman.lyx: updated section on switch statements, added
3056         section about semaphore locking
3057         * doc/Makefile: added option -info for latex2html
3058         * device/lib/_gptrget.c,
3059         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3060
3061 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3062
3063         * src/pic/device.h,
3064         * src/pic/device.c,
3065         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3066          maxram is less than 0x100.
3067
3068 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3069
3070         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3071
3072 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3073
3074         * src/port.h,
3075         * src/mcs51/main.c,
3076         * src/ds390/main.c,
3077         * src/z80/main.c,
3078         * src/hc08/main.c,
3079         * src/pic/main.c,
3080         * src/pic16/main.c,
3081         * src/avr/main.c,
3082         * src/xa51/main.c
3083         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3084         a jump table is the best form for a switch statement, including
3085         automatic insertion of missing cases to make the case range
3086         continuous. Developed in collaboration with Frieder Ferlemann.
3087
3088 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3089
3090         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3091         accumulator result if it needs sign extension
3092
3093 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3094
3095         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3096
3097 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3098
3099         * device/lib/gbz80/printf.c,
3100         * device/lib/z80/printf.c: removed define for NULL
3101
3102 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3103
3104         * as/xa51/xa_link.c,
3105         * device/examples/ds390/ow390/ad26.c,
3106         * device/examples/ds390/ow390/cnt1d.c,
3107         * device/examples/ds390/ow390/counter.c,
3108         * device/examples/ds390/ow390/ds2480.h,
3109         * device/examples/ds390/ow390/ds2480ut.c,
3110         * device/examples/ds390/ow390/findtype.c,
3111         * device/examples/ds390/ow390/gethumd.c,
3112         * device/examples/ds390/ow390/owllu.c,
3113         * device/examples/ds390/ow390/ownetu.c,
3114         * device/examples/ds390/ow390/swt12.c,
3115         * device/examples/ds390/ow390/swtloop.c,
3116         * device/examples/ds390/ow390/temp.c,
3117         * device/examples/ds390/ow390/temp10.c,
3118         * device/examples/ds390/ow390/thermo21.c,
3119         * device/examples/ds390/ow390/tinilnk.c,
3120         * device/examples/ds390/ow390/tstfind.c,
3121         * device/examples/serialcomm/windows/serial.cpp,
3122         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3123         * device/include/reg51.h: fixed line endings for cvs
3124
3125 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3126
3127         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3128         packRegsForAccUse, packRegisters): new accumulator register
3129         packing algorithm
3130         * support/regression/ports/hc08/support.c (_putchar): suppress
3131         warning of unused variable
3132         * src/SDCCicode.c: added SWAP entry to codeTable
3133
3134 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3135
3136         * device/lib/sprintf.c: forgot to add this file before previous commit
3137
3138 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3139
3140         * src/pic16/gen.c (genPackBits): added operand right in function
3141         parameters, load result directly if p_type is POINTER (that is
3142         called by genNearPointerSet)
3143         * (genUnPackBits): added operand left in function parameters,
3144         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3145         FSR0 if accessing bitfields,
3146
3147 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3148
3149         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3150           _print_format; updated printf, sprintf, vsprintf
3151         * device/include/asm/default/features.h: corrected comment/define
3152         * device/lib/Makefile.in: added sprintf.c
3153         * device/lib/libsdcc.lib: added sprintf module
3154         * device/lib/printf_large.c,
3155         * device/lib/vprintf.c,
3156         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3157           into these 3 files
3158         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3159         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3160         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3161           hc08 test
3162         * support/regression/tests/zeropad.c: define idata as data for hc08
3163
3164 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3165
3166         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3167         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3168         labels are referenced at least once (even if a reference is not found)
3169         * src/hc08/gen.c (emitcode): set isComment flag for comments
3170         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3171         loads), rules 6a..6b (optimize jumps to return)
3172
3173 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3174
3175         * device/lib/acosf.c (acosf),
3176         * device/lib/asinf.c (asinf),
3177         * device/lib/atanf.c (atanf),
3178         * device/lib/ceilf.c (ceilf),
3179         * device/lib/cosf.c (cosf),
3180         * device/lib/coshf.c (coshf),
3181         * device/lib/cotf.c (cotf),
3182         * device/lib/fabsf.c (fabsf),
3183         * device/lib/floorf.c (floorf),
3184         * device/lib/log10f.c (log10f),
3185         * device/lib/logf.c (logf),
3186         * device/lib/sinf.c (sinf),
3187         * device/lib/sinhf.c (sinhf),
3188         * device/lib/sqrtf.c (sqrtf),
3189         * device/lib/tanf.c (tanf),
3190         * device/lib/tanhf.c (tanhf),
3191         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3192         replaced all instances of "reentrant" in the library functions
3193         defined in math.h with this macro.
3194         * support/regression/tests/float_trans.c: reenabled test for hc08
3195
3196 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3197
3198         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3199         erroneously deleted
3200
3201 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3202
3203         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3204         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3205         multi-byte volatile operands are used
3206         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3207         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3208         initialization to area GSINIT0 so that it would always precede
3209         any static initializers in GSINIT
3210         * support/regression/tests/zeropad.c: fixed idata define for hc08
3211         * support/regression/tests/bug-927659.c,
3212         * support/regression/tests/float_trans.c: disabled tests for hc08
3213         pending missing library routines
3214         * .version: increased version number to 2.4.4 - hc08 port now passes
3215         regression tests
3216
3217
3218 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3219
3220         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3221         * Makefile.common.in,
3222         * as/Makefile,
3223         * as/hc08/Makefile.in,
3224         * as/mcs51/Makefile.in,
3225         * as/z80/Makefile.in,
3226         * debugger/mcs51/Makefile.in,
3227         * device/include/Makefile.in,
3228         * device/lib/Makefile.in,
3229         * doc/Makefile,
3230         * link/Makefile,
3231         * link/z80/Makefile.in,
3232         * packihx/Makefile.in,
3233         * sim/ucsim/main_in.mk,
3234         * sim/ucsim/avr.src/Makefile.in,
3235         * sim/ucsim/doc/Makefile.in,
3236         * sim/ucsim/gui.src/serio.src/Makefile.in,
3237         * sim/ucsim/hc08.src/Makefile.in,
3238         * sim/ucsim/s51.src/Makefile.in,
3239         * sim/ucsim/xa.src/Makefile.in,
3240         * sim/ucsim/z80.src/Makefile.in,
3241         * src/Makefile.in,
3242         * support/cpp2/Makefile.in,
3243         * support/librarian/Makefile,
3244         * support/makebin/Makefile: added DESTDIR to the install path proposed
3245         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3246         * doc/sdccman.lyx: added DESTDIR documentation
3247
3248 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3249
3250         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3251         instruction for interrupt handlers, use fast returns when returning
3252         from high priority interrupts
3253
3254 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3255
3256         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3257         code generation
3258         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3259         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3260         bugs, ported much of Bernhard's code from mcs51
3261         * src/mcs51/gen.c (genSend),
3262         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3263         than one when calling a reentrant function
3264         * device/lib/_mullong.c: defined an alternate struct layout for big
3265         endian ports (hc08)
3266
3267 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3268
3269         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3270         test
3271
3272 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3273
3274         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3275         are sane and complete before asking the port its prefered parameter
3276         passing method (fixes bug #1017633)
3277         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3278         and _ret3
3279
3280 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3281
3282         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3283         problem in bitfields >= 8 bits.
3284
3285 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3286
3287         * src/SDCCsymt.c: undid changes that were not meant to be committed
3288
3289 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3290
3291         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3292
3293 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3294
3295         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3296           copied and wrong bit got inverted
3297
3298 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3299
3300         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3301         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3302         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3303         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3304         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3305         assignments to bitfields at known addresses
3306         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3307         reads from bitfields at known addresses
3308         * src/hc08/ralloc.c (packRegisters),
3309         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3310         genhc08Code): optimize pointer get values used as conditionals
3311         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3312         and branch
3313
3314 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3315
3316         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3317         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3318         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3319         as conditionals
3320
3321 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3322
3323         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3324
3325 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3326
3327         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3328         related problems
3329
3330 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3331
3332         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3333
3334 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3335
3336         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3337         mcs51 port
3338
3339 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3340
3341         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3342
3343 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3344
3345         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3346         cases use more compact code.
3347
3348 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3349
3350         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3351
3352 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3353
3354         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3355
3356 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3357
3358         * src/SDCCsymt.h,
3359         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3360         parameter of changePointer() from symbol* to sym_link*
3361         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3362         * src/SDCCsymt.c (compareType): void* type is castable to other
3363         pointers, but not necesarily an exact match.
3364         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3365         is no longer blindly treated as an exact match.
3366         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3367
3368 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3369
3370         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3371
3372 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3373
3374         * src/pic/gen.c,
3375         * src/pic/pcode.c,
3376         * src/pic/ralloc.h,
3377         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3378
3379 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3380
3381         * src/pic/device.c,
3382         * src/pic/device.h,
3383         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3384
3385 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3386
3387         * src/mcs51/gen.c (emitcode): fixed bug #992819
3388
3389 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3390
3391         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3392           there's no need to make it worse
3393
3394 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3395
3396         * src/mcs51/ralloc.c (deassignLR),
3397         * src/ds390/ralloc.c (deassignLR),
3398         * src/hc08/ralloc.c (deassignLR),
3399         * src/z80/ralloc.c (deassignLR),
3400         * src/pic/ralloc.c (deassignLR),
3401         * src/pic16/ralloc.c (deassignLR),
3402         * src/avr/ralloc.c (deassignLR),
3403         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3404         rlivePoint): fixed another part of bug #971834
3405
3406 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3407
3408         * src/z80/main.c: enabled "critical" keyword
3409         * src/z80/mappings.i,
3410         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3411         functions (fixes bug #979646)
3412         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3413
3414 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3415
3416         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3417           such as c:\mydir.
3418
3419 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3420
3421         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3422           doesn't disable too much optimizations
3423
3424 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3425
3426         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3427
3428 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3429
3430         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3431
3432 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3433
3434         * src/pic/gen.c tidied up tabs
3435         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3436         * src/pic/main.c tidied up tabs
3437         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3438         * src/pic/pcoderegs.c tidied up tabs
3439         * src/pic/ralloc.c tidied up tabs
3440
3441 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3442
3443         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3444         to S_FIXED for pic16 port and when symbol is not in level 0,
3445         allocate for S_REGISTER storage class and pic16 port, too,
3446         * src/pic16/device.h: prototype for checkSym,
3447         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3448         * (pic16_assignConfigWordValue): test the value and the mask to
3449         validate that the value is suitable for the configuration word,
3450         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3451         collect extern declared symbols, don't emit symbol twice, check
3452         first if symbol is in publics set first,
3453         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3454         * added command line '--fstack' which enables an experimental
3455         feature for stack access, too buggy to be used yet...
3456         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3457         * (pic16_allocDirReg): when register has storage class S_REGISTER
3458         allocate in pic16_dynAccessRegs,
3459         * device/include/pic16/pic18f????.h: modified configuration word
3460         naming convention, words started as CONFIG0H but should be CONFIG1H
3461
3462 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3463
3464         * device/include/mcs51reg.h: fixed bug 970993
3465
3466 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3467
3468         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3469         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3470         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3471         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3472         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3473         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3474           error/warning numbers,
3475           added function setWarningDisabled()
3476         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3477         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3478           _memcmp.c _memmove.c calloc.c realloc.c free.c
3479         * support/regression/tests/malloc.c: added tests for new functionality
3480         * support/regression/tests/zeropad.c: added tests for truncated initializers
3481           and initialized char arrays starting with '\x0'
3482         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3483
3484 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3485
3486         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3487
3488 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3489
3490         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3491         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3492         peephole 177.e. Thanks to anonymous
3493
3494 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3495
3496         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3497         function isn't used in the source but referenced as a
3498         variable initializer then declare it as extern in .asm file
3499
3500 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3501
3502         * .version: increased version number to 2.4.3
3503
3504         Adding version extension according to ChangeLog CVS revision
3505         * src/Makefile.in (target all): added dependency 'version.h'
3506         * (rule version.h): added rule to create version.h from ChangeLog,
3507         * (rule dep): added dependency version.h,
3508         * src/version.awk: AWK script to create version.h
3509         * src/SDCCdwarf2.c (dwWriteModule),
3510         * src/SDCCglue.c (initialComments),
3511         * src/SDCCmain.c (printVersionInfo): modified to write after
3512         version string the version extension number,
3513         * src/SDCCutil.c: included "version.h"
3514         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3515         number,
3516         * src/SDCCutil.h: added prototype for getBuildNumber
3517
3518         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3519         includeDirsSet, too,
3520         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3521         const char [] is found in function prototype...
3522
3523         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3524         moving to WREG with source is already in WREG,
3525         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3526         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3527         * (aopForSym): stack'ed symbols are partially supported, added
3528         if-clause to support symbols in FARSPACE,
3529         * (sameRegs): added test for AOP_ACC to see if registers are same,
3530         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3531         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3532         * (pic16_popRegFromString): will not allocate a new register if it
3533         doesn't find one by name, bug may have introduced...
3534         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3535         * (genIpush): revived to use pic16 port's stack,
3536         * (genAddrOf): added incomplete case for stack'ed operand,
3537         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3538         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3539         can handle multibyte operands,
3540         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3541         * (pic16initialComments): added message for MPLAB compatibility
3542         mode enabled,
3543         * src/pic16/main.h: prototype for pic16_mplab_comp,
3544         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3545         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3546         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3547         because of increased complexity of procedure,
3548         * (_process_pragma): stack pragma changed to format 'stack pos len',
3549         emit symbol '_stack_end' to conform with gplink,
3550         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3551         to search for register,
3552         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3553         PO_GPR_REGISTER,
3554         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3555         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3556         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3557         case for PO_GPR_REGISTER,
3558         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3559         dies, the new era is ahead !...
3560         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3561         pic16_dynInternalRegs,
3562         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3563         * (pic16_allocDirReg): minor optimizations and bug fixes,
3564         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3565
3566         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3567         load stack and frame pointer with address of 'stack_end' symbol
3568
3569 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3570
3571         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3572         without source code but only variable initializers
3573
3574 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3575
3576         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3577         external are not declared as extern to reduce overhead while linking
3578
3579 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3580
3581         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3582
3583 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3584
3585         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3586           Yee Keat for the patch
3587         * src/SDCCast.c (decorateType): fixed bug #979599
3588         * src/ds390/gen.h: removed local fReturnSizeDS390
3589         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3590         * src/ds390/gen.c (genAnd, genOr, genXor),
3591         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3592
3593 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3594
3595         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3596         add relFilesSet to $3, manipulate $2 to handle linking of object
3597         files without source files in command line,
3598         * device/include/pic16 (all headers): added ID location macros,
3599         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3600         entries for ID location bytes,
3601         * (pic16_assignIdByteValue): NEW,
3602         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3603         added field dumpcalltree to pic16_options_t,
3604         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3605         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3606         emitting rFalseIfx label after check_carry label,
3607         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3608         pic16_emitDIRegs), NEW
3609         * (pic16glue): dump .calltree file when option --calltree found,
3610         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3611         * (_pic16_genAssemblerPreamble): emit ID locations after
3612         configuration registers,
3613         * (pic16_linkCmd): modifications of the link command,
3614         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3615         * (pic16_pCodeInitRegisters): don't init stack registers,
3616         * (pic16_findPrevInstruction): fixed bug,
3617         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3618         bug with immediate registers,
3619         * (buildCallTree): traces stack push and pop,
3620         * (pct2): dump also stack usage for each function,
3621         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3622         * (pic16_allocDirReg): various modifications,
3623         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3624         fixed to 1,
3625
3626 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3627
3628         * src/pic16/pcode.c: removed buggy double colon
3629
3630 2004-07-01 Borut Razem <borut.razem AT siol.net>
3631
3632         * support/scripts/sdcc.nsi: added include/pic16 to setup
3633
3634 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3635
3636         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3637         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3638         target 'clean',
3639         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3640         specific command line arguments. Also added sample lkr script
3641         for placing a variable at a specific memory bank.
3642         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3643         at a specific memory bank,
3644         * (pic16_dump_isection): fixed bug which caused string literals to
3645         be omitted when dumping idata section,
3646         * (pic16_groupRegistersInSection): added code to handle registers
3647         in specific memory banks,
3648         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3649         public, all references are renamed too,
3650         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3651         AOP_DPTR2,
3652         * (pic16_storeForReturn): added case to handle when dest is WREG,
3653         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3654         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3655         pic16_rel_udata, check to see if that register is marked as being
3656         a member of a specific memory bank,
3657         * (pic16_printIvalCharPtr): added code to add string literals either
3658         to code or the idata sections,
3659         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3660         also accept the 'udata' pragma,
3661         * src/pic16/main.h: new structure types sectName and sectSym
3662         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3663         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3664         * (pic16_findPrevInstruction): fixed, it returned nothing,
3665         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3666         instruction combinations,
3667         * (pic16_FixRegisterBanking): heavily reorganised,
3668         * (pic16_AnalyzeBanking): if generating banksel directives is
3669         disabled, then don't call FixRegisterBanking at all,
3670         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3671         completely removed,
3672         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3673
3674 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3675
3676         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3677         Phuah Yee Keat <yk.phuah AT nestac.com>
3678
3679 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3680
3681         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3682         correctly the IVT even if it is relocated to some other location
3683
3684 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3685
3686         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3687         * device/include/pic16/pic18f2220.h: NEW,
3688         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3689         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3690         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3691         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3692         nodefaultlibs, ivt_loc is the location of the interrupt vector
3693         table, and nodefaultlibs signs that default libraries should not be
3694         linked in link stage,
3695         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3696         according to --ivt-loc argument,
3697         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3698         when pragma stack is found,
3699
3700 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3701
3702         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3703         256 (range check), 257 (do while), 258.a-f (bit banging
3704         f.e. on 3-wire SPI bus)
3705
3706 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3707
3708         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3709         variables used exclusively within a loop
3710
3711 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3712
3713         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3714
3715 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3716
3717         * src/SDCClrange.c (computeClash): fixed bug #971834
3718
3719 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3720
3721         * src/mcs51/gen.c (genCmp): fixed bug #975903
3722         * src/hc08/gen.c (operandsEqu),
3723         * src/ds390/gen.c (operandsEqu),
3724         * src/z80/gen.c (operandsEqu),
3725         * src/pic/gen.c (operandsEqu),
3726         * src/pic16/gen.c (operandsEqu),
3727         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3728         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3729
3730 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3731
3732         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3733
3734 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3735
3736         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3737         default case in switch statement,
3738         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3739         to eliminate problem with initialisation of pointers, but problem
3740         still exists,
3741         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3742         * (emitStaticSegment): removed various lines emitting debug info,
3743         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3744         added processor registers for utilizing EEPROM,
3745         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3746         configurable and set 8
3747
3748 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3749
3750         * .version: increased version number to 2.4.2,
3751
3752         Cumulative patch for pic16 port
3753         * src/pic16/device.c: changed scheme to dump initial values for
3754         variables in idata segment, all print_idata* functions were removed,
3755         now the pic16_printIval* will be called,
3756         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3757         * _pic16_printPointerType, pic16_printPointerType,
3758         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3759         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3760         NEW, similar to the respective functions in SDCCglue.c,
3761         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3762         way, emitting hex bytes,
3763         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3764
3765 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3766
3767         * src/avr/ralloc.c (serialRegAssign),
3768         * src/xa51/ralloc.c (serialRegAssign),
3769         * src/pic/ralloc.c (serialRegAssign),
3770         * src/pic16/ralloc.c (serialRegAssign),
3771         * src/hc08/ralloc.c (serialRegAssign),
3772         * src/z80/ralloc.c (serialRegAssign),
3773         * src/ds390/ralloc.c (serialRegAssign),
3774         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3775
3776 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3777
3778         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3779         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3780
3781 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3782
3783         Cumulative patch for pic16 port:
3784         * src/pic16/device.h (typedef PIC16_device) modified fields for
3785         defining microcontrollers,
3786         * src/pic16/device.c: added new info for all devices in Pics16 array,
3787         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3788         to be optimised out by the pCode optimiser,
3789         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3790         specially, bug reported by G.M. Gallant,
3791         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3792         as force'd so that cannot be optimised out by pCode optimiser,
3793         * src/pic16/pcode.c,
3794         * src/pic16/pcodepeeph.c,
3795         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3796         they are disabled by default, but can be enabled explicit with
3797         command argument --denable-peeps, for testing,
3798         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3799         --pomit-ivt in COMPILE_FLAGS
3800
3801 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3802
3803         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3804           compilation on MSVC
3805
3806 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3807
3808         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3809
3810 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3811
3812         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3813         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3814
3815 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3816
3817         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3818         would only assign 0x300001 register.
3819
3820 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3821
3822         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3823         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3824
3825 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3826
3827         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3828         for ds80c400
3829         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3830         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3831         added peephole 254 (left shift), 255 (jump table)
3832
3833 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3834
3835         * device/lib/Makefile.in: removed comment line with model-pic16,
3836         * (target port-specific-objects-pic16): the libraries and objects
3837         are copied to the build directory form the device/lib/pic16/bin
3838         directory
3839
3840         Cumulative patch concerning pic16 port:
3841         * library directory has been re-organized,
3842         * added support for PIC18F1220,
3843         * added headers and library sources for chips 18f1220,18f6520,
3844         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3845
3846         * configuration registers setting has changed, now each supported
3847         device has a complete description of the registers it uses,
3848         * all initialisations are moved to idata sections, these section
3849         can be absolute or relocatable,
3850         * fixed initialisation of codespace variables,
3851         * fixed warning about PCLATU and gpsim,
3852         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3853         * (genAssign): use table reads when assigning from variables in codespace,
3854         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3855         char/int variables placed in codespace,
3856         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3857         registers set in .asm file, no need for --pomit-config-words anymore,
3858         * (pic16glue): some 8051 legacy segments are commented out
3859         (to be removed completely),
3860         * added support for alternative assembler and linker with --asm=
3861         and --link= command line arguments,
3862         * peepholes are disabled automatically in the port, no need to
3863         specify on command line,
3864         * port supports natively char/int/long multiplication, but converts
3865         all divisions to support functions,
3866         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3867         to the file set in variable $2,
3868         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3869         strings in ASCII format and not in hex,
3870         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3871         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3872         allocate proper register if iCodes aren't temporary,
3873
3874 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3875
3876         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3877
3878 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3879
3880         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3881         is commented out
3882
3883 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3884
3885         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3886         computed address is reused
3887         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3888         multi-byte bitfields
3889
3890 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3891
3892         * src/z80/gen.c: (genArrayInit): must check for pointers too
3893
3894 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3895
3896         * support/regression/tests/zeropad.c: never meant to commit the
3897           nestedstruct test: removed, added check for GCC version
3898
3899 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3900
3901         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3902         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3903         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3904           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3905           bugs 928906 and 954082 half-empty initializers
3906         * src/SDCCsymt.h,
3907         * src/SDCCsymt.c (getAllocSize): added for above fix
3908         * src/z80/gen.c (genArrayInit): fixed bug 741044
3909         * support/regression/tests/zeropad.c: added tests
3910
3911 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3912
3913         * src/pic16/device.c (pic16_dump_section): corrected bug which
3914         caused some symbols of the libraries to be misplaced
3915
3916 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3917
3918         * src/pic16/glue.c,
3919         * src/pic16/ralloc.h,
3920         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3921         to fix conflict with pic port
3922
3923 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3924
3925         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3926         externs configuration variables,
3927         * src/pic16/ralloc.h,
3928         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3929         prototype in header, commented out some debug messages
3930
3931 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3932
3933         * src/pic16/glue.c,
3934         * src/pic16/main.c,
3935         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3936         for gpasm COFF object generation. Thanks to D. Hawkins for
3937         his patch info
3938
3939 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3940
3941         * src/ds390/main.c,
3942         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3943         Brock for spotting this)
3944         * src/ds390/gen.c (genEndFunction),
3945         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3946         interrupt handler and critical. Disable push/pop optimizations when
3947         peephole optimizations disabled.
3948
3949 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3950
3951         Updated pic16 library sources and headers.
3952         * device/lib/pic16/pic18f*/ ,
3953         * device/include/pic16/*.h: modified to handle structured SFR
3954         definitions
3955
3956 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3957
3958         * src/port.h (PORT structure): added hook initPaths, now each
3959         port can declare its own default search paths,
3960         which can been seen with the --print-search-dirs option,
3961         see pic16 port for example,
3962         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3963         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3964         * (doPrintSearchDirs): NEW, replaces in a central manner the
3965         printing of search dirs which was split in set*Paths functions,
3966         * (main): added call to port->initPaths and doPrintSearchDirs,
3967         * src/avr/main.c,
3968         * src/ds390/main.c,
3969         * src/hc08/main.c,
3970         * src/izt/i186.c,
3971         * src/izt/tlcs900h.c,
3972         * src/mcs51/main.c,
3973         * src/pic/main.c,
3974         * src/pic16/main.c: modified port structures to reflect addition of
3975         initPaths hook,
3976
3977         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3978         * (pic16_dump_section): for registers in same address reserve memory once,
3979         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3980         to no_banksel,
3981         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3982         result is greater in size than right or left,
3983         * (pic16_genUMult8X8_8): there are some cases where the result can
3984         be 16 bits size, so handle these,
3985         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3986         * (pic16_outBitC): modified to emit pcodes,
3987         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3988         or not,
3989         * (genDivOneByte): implemented algorithm to divide 8-bits,
3990         * (genCmp): uncommented goto, but issues still exist,
3991         * (genAnd): fixed a bug with variables >8bits,
3992         * (genPackBits): optimization added that uses BCF/BSF to change a
3993         single bit,
3994         * (genAssign): fixed bug when assigning floating point literals,
3995         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3996         __sdcc_gsinit_startup label,
3997         * src/pic16/main.c (_pic16_init): removed search directory
3998         initialisations,
3999         * (_pic16_initPaths): NEW, used to initialise search directories,
4000         * (_hasNativeMulFor): support functions for all except char/int
4001         multiplication, and char division,
4002         * (PIC16_port struct): modified entry for native mul support,
4003         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4004         no_banksel option,
4005         * (buildCallTree): call to register_usage is ifdef'ed out,
4006
4007 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4008
4009         * device/include/string.h: applied Stas Sergeev's patch to make this
4010         header file compatible with the preprocessor -Wundef option
4011         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4012         failure (fixes bug #941458)
4013
4014 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4015
4016         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4017         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4018         that the variable, not the function, should be static
4019         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4020         to be consistent with non-literal case
4021
4022 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4023
4024         * src/SDCCast.c (isConformingBody): fixed bug #949967
4025         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4026         convilong): fixed bug #952086
4027
4028 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4029
4030         * src/SDCCmem.c (allocVariables): fixed bug #955321
4031
4032 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4033
4034         * src/hc08/main.c (_hc08_genAssemblerEnd),
4035         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4036         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4037         completely eliminated the use of a temporary file
4038         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4039         when more than one file linked
4040         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4041
4042 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4043
4044         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4045         which fixes bug #543481
4046         * support/regression/tests/bug-751703.c: fixed comments left from a
4047         cut and paste error
4048         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4049         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4050         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4051         scopes
4052         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4053         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4054         are now changed to underscores in moduleName
4055
4056 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4057
4058         * as/mcs51/lkmem.c: better fix for bug #954173
4059
4060 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4061         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4062
4063         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4064         * device/include/c8051f000.h,
4065         * device/include/c8051f120.h,
4066         * device/include/c8051f300.h,
4067         * device/include/c8051f310.h,
4068         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4069         PWM16) and detab'ed
4070
4071 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4072
4073         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4074         and mailing lists, doc'ed --no-peep-comments, removed reference
4075         to knoppix (newest version has no LyX/LaTeX), other minor changes
4076         * src/SDCCglue.c (glue): save 2 bytes stack space with
4077         option --main-return. The ljmp could probably be avoided too
4078
4079 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4080
4081         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4082
4083 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4084
4085         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4086         * src/SDCCopt.c (isLocalWithoutDef),
4087         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4088         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4089         (credit to Maarten Brock for patch #949363, on which this is based)
4090         * support/regression/tests/bug-751703.c: some test cases of extern used
4091         within inner scopes.
4092
4093 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4094
4095         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4096         SPEC_STRUCT
4097         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4098         struct definitions
4099         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4100         dwWriteLabel): fix to create valid debugger symbols even when
4101         the module name has non-alphanumeric symbols in it
4102         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4103         when a variable's allocation has been optimized away
4104
4105
4106 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4107
4108         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4109         * src/hc08/main.c,
4110         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4111         * src/mcs51/main.c,
4112         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4113         * src/ds390/main.c,
4114         * src/z80/gen.c (z80_emitDebuggerSymbol),
4115         * src/z80/main.c,
4116         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4117         * src/pic/main.c,
4118         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4119         * src/pic16/main.c,
4120         * src/avr/gen.c (avr_emitDebuggerSymbol),
4121         * src/avr/main.c,
4122         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4123         * src/xa51/main.c,
4124         * src/SDCCdebug.c (emitDebuggerSymbol),
4125         * src/SDCCdebug.h,
4126         * src/port.h: added a debugger struct to the port struct. Added a
4127         callback for defining debugger symbols
4128
4129         * src/SDCCast.c (createLabel),
4130         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4131         with isitmp = 1
4132         * src/SDCCicode.h,
4133         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4134         iCode back to the ast for the function
4135
4136         * src/hc08/ralloc.c (hc08_assignRegisters),
4137         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4138         unneeded fields from the regs struct.
4139         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4140         pushReg() & pullReg() functions instead of emitcode()
4141
4142         * src/hc08/gen.c (genLabel, genhc08Code),
4143         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4144
4145         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4146         debugger hooks
4147
4148         * src/hc08/gen.c (genEndFunction, genhc08Code),
4149         * src/hc08/gen.h,
4150         * src/mcs51/gen.c (genEndFunction, gen51Code),
4151         * src/mcs51/gen.h,
4152         * src/ds390/gen.c (genEndFunction, gen390Code),
4153         * src/ds390/gen.h,
4154         * src/z80/gen.c (genEndFunction, genZ80Code),
4155         * src/z80/gen.h,
4156         * src/z80/z80.h,
4157         * src/pic/gen.c (genEndFunction, genpic14Code),
4158         * src/pic/gen.h,
4159         * src/pic16/gen.c (genEndFunction, genpic16Code),
4160         * src/pic16/gen.h,
4161         * src/avr/gen.c (genEndFunction, genAVRCode),
4162         * src/avr/gen.h,
4163         * src/xa51/gen.c (genEndFunction, genXA51Code),
4164         * src/xa51/gen.h,
4165         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4166         specific code to cdbFile.c and out of the backend code generators
4167
4168         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4169         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4170         starting address is now 0
4171
4172         * as/hc08/asm.h,
4173         * as/hc08/m08pst.c,
4174         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4175         assembler directive for DWARF support
4176         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4177
4178         * src/src.dsp,
4179         * src/Makefile.in,
4180         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4181
4182 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4183
4184         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4185         and inappropriate peephole optimization in jump tables
4186
4187 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4188
4189         * as/hc08/m08pst.c,
4190         * src/SDCCglue.c: sdccopt works for the hc08 port now
4191
4192 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4193
4194         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4195
4196 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4197
4198         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4199
4200 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4201
4202         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4203         rules
4204         * src/SDCCmain.c,
4205         * src/SDCCglobl.h,
4206         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4207         comments from the peephole optimizer replacement rules
4208         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4209         symbols
4210         * src/SDCCcse.c (updateSpillLocation),
4211         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4212         equivalents
4213         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4214         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4215         objects far pointers
4216
4217 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4218
4219         * src/SDCCsymt.h: a missing part of my last change
4220         * src/pic/ralloc.c (regTypeNum),
4221         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4222
4223 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4224
4225         * src/SDCCicode.h,
4226         * src/SDCCicode.c (aggrToPtrDclType),
4227         * src/SDCCptropt.h,
4228         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4229         ptrPseudoSymConvert),
4230         * src/pic/ralloc.c (regTypeNum),
4231         * src/pic16/ralloc.c (regTypeNum),
4232         * src/hc08/ralloc.c (regTypeNum),
4233         * src/ds390/ralloc.c (regTypeNum),
4234         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4235         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4236
4237 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4238
4239         * link/z80/lkmain.c (afile),
4240         * as/hc08/lkmain.c (afile),
4241         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4242         prevent a pointer problem when a filename has no directory and
4243         no extension specified.
4244
4245 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4246
4247         * link/z80/lkmain.c (afile): allow periods in directory names
4248         * link/z80/lkmain.c (afile),
4249         * as/mcs51/lkmain.c (afile),
4250         * as/hc08/lkmain.c (afile): allow linker script file to have an
4251         extension other than ".lnk"
4252         * link/z80/lklex.c (getfid),
4253         * link/z80/lkmain.c (parse),
4254         * as/mcs51/lklex.c (getfid),
4255         * as/mcs51/lkmain.c (parse),
4256         * as/hc08/lklex.c (getfid),
4257         * as/hc08/lkmain.c (parse): Support comments in the linker script
4258         file on lines by themselves and after filenames
4259
4260 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4261
4262         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4263
4264 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4265
4266         * src/z80/peeph-z80.def: removed some peephole rules that don't
4267         work with multibyte arithmetic (fixed bug #937126)
4268         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4269         to registers and not global variables
4270         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4271         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4272         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4273         checking for assignments not internally generated (fixed bug #931895)
4274         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4275         structure member (fixed bug #930072)
4276
4277 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4278
4279         * src/SDCCmain.c (linkEdit),
4280         * src/hc08/main.c (_hc08_parseOptions),
4281         * as/hc08/Makefile.in,
4282         * as/hc08/aslink.h,
4283         * as/hc08/asm.h,
4284         * as/hc08/m08pst.c,
4285         * as/hc08/lkrloc.c (relr, rele),
4286         * as/hc08/lkarea.c (lnkarea)
4287         * as/hc08/lkmain.c (afile, parse),
4288         * as/hc08/lkelf.c: support for ELF output
4289         * as/hc08/lks19.c (s19),
4290         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4291
4292 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4293
4294         * as/mcs51/lkihx.c: Fixed bug #899105.
4295
4296 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4297
4298         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4299         .dsp files from Unix to DOS.
4300
4301 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4302
4303         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4304         function pointers; we have been compliant for several months now.
4305         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4306         change that was accidently commented out
4307         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4308         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4309         bug #922319
4310
4311 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4312
4313         * src/hc08/gen.c: output of all of the internal debugging information
4314         is now controlled by the D() macro; it is disabled by default
4315
4316 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4317
4318         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4319         harder to keep the same registers during a CAST iCode
4320         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4321         long via int can be done in a single cast, if the signedness is
4322         correct.
4323         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4324         putchar() in tinibios.c in ds390's library
4325
4326 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4327
4328         * src/SDCCast.c (decorateType): fixed bug #898889,
4329         cast result of a literal complement too
4330         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4331         fixed check for bitfields
4332
4333 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4334
4335         * src/SDCCicode.c (geniCodeLogic): made it static,
4336         (geniCodeLogicAndOr): added in order to fix bug #905492,
4337         (ast2iCode): fixed bug #905492
4338         * support/regression/tests/bug-905492.c: added
4339         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4340         (processParms): fixed bug #927659: don't copy parms, this will clear
4341         decorated flag
4342         * support/regression/tests/bug-927659.c: added
4343
4344 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4345
4346         * src/SDCCast.c (addCast): don't cast float to char
4347         * device/lib/libsdcc.lib: added _memmove
4348
4349 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4350
4351         * device/lib/large/Makefile: fixed parallel execution by
4352         replacing `make` by `$(MAKE)`
4353
4354 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4355
4356         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4357         offsets (fixes bug #923936)
4358
4359 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4360
4361         * device/lib/small/Makefile: fixed parallel execution by
4362         replacing `make` by `$(MAKE)`
4363
4364 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4365
4366         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4367
4368 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4369
4370         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4371         * src/regression/Makefile: Regression test was not running.
4372
4373 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4374
4375         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4376         complement if possible
4377         * src/SDCCval.c (valComplement),
4378         * src/SDCCicode.c (operandOperation): fixed complement of literal
4379         * support/regression/tests/onebyte.c (testComplement): added
4380
4381 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4382
4383         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4384         return an optimized tree; actually replace actParm with the new tree
4385         * src/SDCCast.h: added some parantheses to remove side effects
4386         * support/regression/tests/bug-920866.c
4387
4388 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4389         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4390         Bit operands were not being handled properly in the pic14 port.
4391         (now src/regression/add.c passes again).
4392
4393 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4394
4395         * src/SDCC.y (labeled_statement): case and default no longer require
4396         a following statement (RFE #893037)
4397
4398 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4399
4400         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4401         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4402         disabled (fixes bug #916294)
4403         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4404         "mov a,acc"; patch provided by Lenny Story
4405         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4406
4407 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4408
4409         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4410         functions
4411         * src/ds390/gen.c (genFunction, genEndFunction),
4412         * src/ds390/ralloc.c (ds390_assignRegisters),
4413         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4414         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4415         pushed if there are parameters passed on the stack. Also, a cleaner
4416         way to decide if r0/r1 should be pushed/popped. (Together they fix
4417         bug #918693)
4418
4419 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4420
4421         * doc/sdccman.lyx,
4422         * device/lib/mcs51/crtpagesfr.asm,
4423         * device/lib/mcs51/crtxinit.asm,
4424         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4425         to avoid confusion with Si Lab's SFRPAGE register.
4426
4427 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4428
4429         * src/SDCCglue.c (emitMaps): allow public sfr variables
4430         * src/SDCCglue.c (initialComments): include compiler build date
4431         with compiler version and put the timestamp of the generated
4432         assembly file on a serperate line to be less confusing.
4433         * src/port.h: added genInitStartup hook
4434         * src/avr/main.c,
4435         * src/ds390/main.c,
4436         * src/hc08/main.c,
4437         * src/pic/main.c,
4438         * src/pic16/main.c,
4439         * src/xa51/main.c,
4440         * src/z80/main.c: genInitStartup initialize as NULL (default to
4441         historical behaviour)
4442         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4443         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4444         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4445         library instead of hard coding it into the compiler.
4446         * support/regression/ports/mcs51-stack-auto/spec.mk,
4447         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4448         * device/lib/mcs51/Makefile,
4449         * device/lib/small/Makefile,
4450         * device/lib/large/Makefile,
4451         * device/lib/mcs51/crtpagesfr.asm,
4452         * device/lib/mcs51/crtstart.asm,
4453         * device/lib/mcs51/crtxclear.asm,
4454         * device/lib/mcs51/crtxinit.asm,
4455         * device/lib/mcs51/crtclear.asm,
4456         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4457         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4458         and into user configurable files.
4459         * device/lib/clean.mk: clean mcs51 directory too
4460         * support/regression/tests/longlit.c: added static to T1 declaration
4461         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4462         accesses in the initialization code
4463
4464 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4465
4466         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4467         OSCTRIMVAL as noted in bug #916008
4468
4469 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4470
4471         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4472         in loops with multiple exits (reported as incorrect registers
4473         used by Martin Helmling in Sdcc-user list)
4474
4475 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4476
4477         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4478         made ds390 register extensions look less like error messages
4479
4480 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4481
4482         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4483         reported by Adam Wozniak in Sdcc-user list
4484
4485 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4486
4487         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4488         arithmetic optimizations, added debug output
4489
4490 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4491
4492         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4493         * sdcc.spec: updated and split sdcc into 3 rpms
4494         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4495         needed for literals of LEFT_OP and '+'
4496         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4497         introduced RESULT_TYPE_NOPROM
4498         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4499         left shift
4500         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4501         limited promotion to int only for '*'
4502         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4503
4504 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4505
4506         * src/pic16/gen.c (genSkip),
4507         (genc16bit2lit), (gencjneshort): commented out
4508         (is_LitOp): new helper function, checks operand type
4509         (genCmpEq): rewritten
4510
4511 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4512
4513         * support/regression/tests/bug-908454.c: added
4514
4515 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4516
4517         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4518         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4519         (geniCodeCast): cosmetic, don't preserve bit storage class
4520         (geniCodeLeftShift): added promotion
4521         (geniCodeLogic): fixed regression
4522         * src/SDCCsymt.c (computeTypeOr): accept bits too
4523         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4524
4525 2004-03-07  Borut Razem <borut.razem AT siol.net>
4526
4527         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4528
4529 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4530
4531         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4532         version of pic16_genPackRegisters which does not check if ic is a
4533         CAST operator,
4534         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4535         function cause string1.c regression test fails
4536
4537 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4538
4539         * sim/ucsim/configure.in,
4540         * sim/ucsim/configure,
4541         * sim/ucsim/doc/Makefile.in: use docdir
4542         * src/SDCC.y: fixed sbit atrributes
4543         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4544         * src/SDCCast.c (decorateType): |^& need special promotion handling
4545         * src/SDCCast.h,
4546         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4547         * src/SDCCsymt.h (computeType),
4548         * src/SDCCicode.c: computeType() needs op
4549         * src/SDCCsymt.c (checkTypeSanity),
4550         * doc/sddman.lyx: "plain" bitfields are unsigned
4551         * src/SDCCsymt.c (computeTypeOr): added
4552         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4553         |^& ops
4554         * src/SDCCval.c (val*): computeType() needs op
4555         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4556         * support/regression/tests/onebyte.c: added tests for |^&
4557
4558 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4559
4560         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4561         for writing icode into asm output.
4562
4563 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4564
4565         * src/pic16/device.c: added some debug lines enabled
4566         with macro DEBUG_CHECK,
4567         * src/pic16/genarith.c: more debug in genPlus,
4568         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4569         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4570         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4571         * (aopForSym): onStack symbols are re-placed in data memspace,
4572         and onStack flag is cleared,
4573         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4574         copy temporary pcodeop,
4575         * (genPcall): added warning for not updating PCLATU,
4576         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4577         always true for pic16 port,
4578         * (genMultOneWord): NEW, supports integer multiplication,
4579         * (genMult): modified to call genMultOneWord,
4580         * (ifxForOp): added warning when return NULL,
4581         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4582         flag is set before call to operandFromSymbol for implicit
4583         added structures,
4584         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4585         options.intlong_rent are set by default,
4586         * (_hasNativeMulFor): modified to allow port generation of integer
4587         multiplication,
4588         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4589         set regtype to REG_SFR for all registers, restricting seting the
4590         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4591
4592 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4593
4594         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4595         more than 500 times in the regression tests
4596
4597 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4598
4599         * support/Util/SDCCerr.h,
4600         * support/Util/SDCCerr.c,
4601         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4602         enumerator_list),
4603         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4604         for symbol conflicts.
4605         * support/valdiags/tests/enum.c,
4606         * support/valdiags/tests/tentdecl.c,
4607         * support/valdiags/tests/struct.c: expect possible error messages
4608         referring to original symbol definitions.
4609         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4610         * src/SDCCsymt.h,
4611         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4612
4613 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4614
4615         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4616
4617 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4618
4619         * src/pic16/ralloc.c (newReg): fixed bug #908929
4620
4621 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4622
4623         * src/ds390/gen.c: added missing #include "main.h"
4624
4625 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4626
4627         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4628         checking if symbol is already in set,
4629         * src/pic16/device.h: prototype for checkAddSym,
4630         * src/pic16/gen.c: (_G): added entry interruptvector,
4631         * (assignResultValue): removed some commented out lines,
4632         * (genFunction): check for ISR via sym->type, absolute section for
4633         interrupt code is created via a new pBlock, the goto instruction is
4634         placed now correctly at the interrupt vector position, changed all
4635         references from ivec to _G.interruptvector,
4636         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4637         is the interrupt is a high priority one, same for return from ISR,
4638         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4639         externs to calls of checkAddSym,
4640         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4641         pic16_pcode_verbose flag is set,
4642         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4643         * src/pic16/pcoderegs.c: message about how many registers are saved
4644         will only be emitted if pic16_pcode_verbose flag is set,
4645
4646 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4647
4648         * src/ds390/ralloc.h,
4649         * src/ds390/ralloc.c (ds390_regWithIdx),
4650         * src/ds390/gen.c (emitcode),
4651         * src/ds390/main.h,
4652         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4653         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4654         ds390operandCompare, getRegsRead, getRegsWritten,
4655         initializeAsmLineNode): customized instruction size calculation for
4656         ds390, started basis for some register optimizations
4657         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4658         corresponding assembly output
4659         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4660         missing push/pop of r0/r1. Optimized push/pops
4661
4662 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4663
4664         * src/mcs51/main.c (instructionSize): fixed ACALL size
4665         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4666
4667 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4668
4669         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4670         the sorting of rlist with NULL elements
4671         * (print_idataType, print_idata): NEW to create idata sections
4672         * src/pic16/device.h: idataSymSet new variable
4673         * src/pic16/gen.c (genFunction): fixed some bugs in string
4674         comparing, improved the absolute section creation for ISRs,
4675         added FSR0L/FSR0H in registers that are saved in an ISR,
4676         * (genInline): fixed the processing of inline snippets,
4677         now they undergo no process by the peephole optimizer
4678         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4679         are placed in idataSymSet,
4680         * (pic16emitStaticSeg): extern symbols are added in externs,
4681         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4682         switching when aboslute variables are placed in access bank memory
4683         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4684         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4685         commented out with #if,
4686         * (pic16_packRegisters): reintroduce the check for CAST because some
4687         symbols are not correctly handled,
4688         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4689         pCodeInstruction instead of pCode,
4690         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4691         pCodeAsmDir definition,
4692         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4693         directive, then the argument directive is emitted without the leading
4694         tab, hack for inline labels which must be in the first column,
4695         * (compareLabel,pic16_findNextInstruction),
4696         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4697         * (insertBankSwitch): modified for the new pCodeAsmDir,
4698
4699 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4700         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4701
4702         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4703         instance,
4704         * (pushSide): commented out with #if,
4705         * (assignResultValue): fixed some typos in saving
4706         registers,
4707         * (genPcall): FIXED and sync'ed with genCall,
4708         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4709         * (genNearPointerGet): fixed to handle some more cases,
4710         implementation scheme via table reads,
4711         * (genConstPointerGet): modified to access code memory correct,
4712         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4713         and improved to handle some cases
4714         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4715         instead of "RETLW" for init data
4716         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4717         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4718         variables are placed in access bank memory (<0x80 and >=0xf80),
4719         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4720         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4721         TBLWT_POSTDEC,TBLWT_PREINC
4722         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4723         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4724         directives
4725         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4726         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4727         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4728         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4729
4730 2004-02-29  Borut Razem <borut.razem AT siol.net>
4731
4732         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4733         support/Util/findme.h, support/Util/system.h: enhance binary relative
4734         search for lib and include by using findProgramPath()
4735
4736 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4737
4738         * src/SDCCpeeph.h,
4739         * src/SDCCpeeph.c (pcDistance),
4740         * src/port.h,
4741         * src/mcs51/ralloc.h,
4742         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4743         * src/mcs51/main.h,
4744         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4745         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4746         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4747         size calculation port specific, started basis for some register
4748         optimizations
4749         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4750         missing push/pop of r0/r1. Optimized push/pops
4751         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4752         * device/lib/_modsint.c (_modsint),
4753         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4754         and stack version so regression tests pass
4755
4756 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4757
4758         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4759         * src/SDCCast.c (decorateType): catch another small optimization
4760         with '?' operator
4761         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4762         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4763         modified to finally use computeType() all over SDCC,
4764         see Feature Request #877103
4765         * src/SDCCval.h: cosmetic
4766         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4767         valCompare(); regression tested in muldiv.c
4768         * support/regression/tests/muldiv.c (testMod): mod sign follows
4769         dividend only
4770
4771 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4772
4773         * src/SDCCast.c (decorateType): fixed bug #902362
4774         * doc/INSTALL.txt: fixed install instructions for win32
4775
4776 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4777
4778         * device/include/Makefile.in (install): fixed by replacing spaces
4779         by tabs
4780         * doc/README.txt,
4781         * doc/INSTALL.txt: updated for release
4782         * doc/sdccman.lyx: added warning for --xstack being buggy
4783
4784 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4785
4786         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4787         to eliminate build warnings.
4788         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4789
4790 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4791            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4792
4793         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4794         removed -penable-stack, added comment for stack pragma, added
4795         warning for not initializing the stack/frame registers, removed
4796         comment at interrupts section
4797
4798         Stack is made permanent, there is no ability to disable stack usage.
4799         * src/pic16/device.h,
4800         * src/pic16/device.c: removed all references to USE_STACK macro,
4801         * src/pic16/device.c (pic16_dump_section): when no elements in
4802         rlist, free rlist before return,
4803         * (pic16_dump_int_registers): NEW, internal registers are a new set
4804         of general purpose registers reused by each function,
4805         * (checkAddReg): returns 1 if registers is added to set,
4806         * (pic16_groupRegistersInSection): when a registers is of type
4807         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4808         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4809         SRCASECMP macro is moved here from device.c
4810         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4811         PO_PCLATU, PO_PRODL, PO_PRODH,
4812         * (pic16_pCodeOpType, genMinus,
4813         changed compares to "a" register, with AOP_ACC,
4814         * (pic16_genPlus): fixed some bugs and indented properly,
4815         * (pic16_addSign): changed size to size+offset in the MOVWF
4816         instruction,
4817         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4818         multiply 8-bit operand by literal, result is 8-bit,
4819         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4820         multiply 2 8-bit operand, result is 8-bit,
4821         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4822         genUMult8X*_16,
4823         * src/pic16/gen.c: changed accUse to contain WREG only,
4824         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4825         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4826         true, do not use immediate addressing any more unless sym is a
4827         pointer in codespace,
4828         * (aopForRemat): do not use immediate addressing when symbol not in
4829         codespace and when symbol's address is requested,
4830         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4831         accUse size (= 1),
4832         * (aopGet): added case for AOP_ACC and don't return "accumulator
4833         bug" but WREG instead,
4834         * (popGetTempReg): pushes contents of temporary register in stack,
4835         * (popReleaseTempReg): pops contents of temporary register from
4836         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4837         * (pic16_popGet): separated case AOP_ACC to return register WREG
4838         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4839         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4840         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4841         the use of immediate pointers to certain cases only.
4842
4843         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4844         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4845         * (assignResultValue, genCall, genRet): modified to use the new
4846         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4847         genPcall is still broken,
4848         * (genFunction): added code to create 'A' type pBlocks when
4849         interrupt functions are generated, code not extensively tested yet,
4850         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4851         * (genEndFunction): modified so ISRs pop stored registers from stack,
4852         * (genMultOneByte): cleanup,
4853         * (AccRsh): added flag andmask, to and result with appropriate mask,
4854         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4855         * (genDataPointerGet): fixed and reenabled its use,
4856         * (genNearDataPointerGet): bugs fixed,
4857         * (genDataPointerSet): bugs fixed,
4858         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4859         pic16_DumpSymbol, pic16_DumpOp,
4860         * src/pic16/genutils.h: function prototypes for the above functions,
4861         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4862         pointers,
4863         * (pic16emitRegularMap): many many many improvements, but needs a
4864         major cleanup,
4865         * src/pic16/main.c: enable_stack in pic16_options is removed,
4866         * (_pic16_parseOptions): removed command line options -penable-stack,
4867         * (_process_pragma): emit stack symbol only when stack pragma is
4868         processed,
4869         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4870         redirected to FSR0L/FSR0H pair,
4871         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4872         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4873         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4874         for immediates,
4875         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4876         * (dumpPicOptype): NEW,
4877         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4878         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4879         with movff instruction,
4880         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4881         added pic16_int_regs, some packRegsFor* functions are commented out,
4882         because produce errors,
4883         * src/pic16/NOTES: minor modifications
4884
4885 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4886
4887         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4888         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4889         --pack-iram.
4890         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4891         * as/mcs51/lkaomf51.c: fixed bug #895763
4892
4893 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4894
4895         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4896
4897 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4898
4899         * doc/sdccman.lyx: added details about the HC08 storage classes and
4900         interrupts, fixed the register usage info for z80 & gbz80
4901
4902 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4903
4904         * doc/sdccman.lyx: added more pic16 port documentation
4905         * device/include/pic16/: added header pic18fregs.h
4906
4907 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4908
4909         * doc/sdccman.lyx: added Vangelis' contribution
4910
4911 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4912
4913         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4914         extend to the next CALL or PCALL, not just to the next CALL.
4915
4916 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4917
4918         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4919
4920 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4921
4922         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4923         bug #895752 and a better fix for bug #716790
4924
4925 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4926
4927         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4928
4929 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4930
4931         * doc/sdccman.lyx: minor changes, minor changed
4932
4933 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4934
4935         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4936         which can't handle SDCC_NEWONEBYTEOPS,
4937         (geniCodeMultiply): removed conversion from mult to shift for pic14
4938         and pic16
4939
4940 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4941
4942         * src/hc08/gen.h,
4943         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4944         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4945         thus fixing bug #895406
4946
4947 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4948
4949         * device/lib/_modsint.c,
4950         * device/lib/_modslong.c: sign follows divisor only
4951         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4952         signs or signedness can be ignored
4953         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4954         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4955         added optimization for IFX,
4956         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4957         arguments;
4958         reenabled optimization for IFX, which was removed on 2004-01-11
4959         * src/SDCCast.h: added return type IFX
4960         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4961         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4962         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4963         SDCC_OLDONEBYTEOPS selects the old behaviour
4964         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4965         changed again and commented promotion rule
4966         * src/SDCCval.c (valDiv): promotion no longer necessary
4967         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4968         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4969         rewritten
4970         * support/regression/tests/onebyte.c: added
4971
4972 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4973
4974         * gen.c (genInline): reverted to old code for assemnling inline
4975         code because of bug reported James Chadd
4976
4977 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4978
4979         * ralloc.h: missing declarations from previous patch,
4980         seems that patch for ralloc.h was never applied, fixed
4981
4982 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4983            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4984
4985         * pcode.c,
4986         * pcode.h,
4987         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4988         indirect addressing. Marked FSR0 as deprecated
4989         * gen.c (pointerCode): commented out, not needed now
4990         (pic16_popGet2p): new MOVFF helper function
4991         (genGenPointerGet),
4992         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4993         (shiftRLong): removed duplicate debugging info
4994
4995 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4996
4997         * src/ds390/gen.c (genNearPointerGet),
4998         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4999         optimization with bits, but not bitfields.
5000         * src/ds390/ralloc.c (packRegisters),
5001         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5002
5003 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5004
5005         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5006
5007 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5008
5009         * src/SDCCsymt.h,
5010         * src/SDCCicode.c (operandFromSymbol),
5011         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5012         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5013         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5014         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5015         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5016         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5017         bug #892038
5018         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5019         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5020         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5021         * src/SDCCsymt.c (newSymbol),
5022         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5023         enumerator_list),
5024         * src/SDCCval.h,
5025         * src/SDCCval.c (newiList): fixed bug #885705
5026
5027 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5028
5029         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5030         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5031
5032 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5033
5034         * device/include/c8051f120.h,
5035         * device/include/c8051f300.h,
5036         * device/include/c8051f310.h: added/updated header files for Silicon
5037         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5038         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5039         in new section Submitting patches
5040
5041 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5042
5043         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5044         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5045         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5046         genGenPointerSet),
5047         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5048         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5049         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5050         genGenPointerSet),
5051         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5052         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5053         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5054         genGenPointerSet),
5055         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5056         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5057         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5058         genGenPointerSet): fixed bug #892400
5059         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5060         to eliminate build warnings.
5061         * src/SDCCast.c (processParms),
5062         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5063         fixed bug 751859
5064         * support/valdiag/valdiag.py: added GCC to the list of defines active
5065         when compiling with gcc
5066
5067 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5068
5069         * support/Util/SDCCerr.h,
5070         * support/Util/SDCCerr.c,
5071         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5072         with an incomplete type (fixed bug #883734)
5073         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5074
5075 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5076
5077         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5078
5079 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5080
5081         * src/SDCCast.c (decorateType),
5082         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5083         function pointer implementation
5084         * support/regression/tests/funptrs.c: added tests to verify both forms
5085         of function pointers work correctly. Added tests to verify parameters
5086         are passed in the correct order.
5087
5088 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5089
5090         * device.c (regCompare): registers are sorted by ascending
5091         address and increasing size,
5092         * main.c (_pic16_finaliseOptions): removed the declaration
5093         of compiler macro MCU. Now a macro of the format pic18fxxxx
5094         will be defined from the command line
5095
5096 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5097             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5098
5099         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5100         PCOP_RLCF was overwritten!
5101         * gen.c (genSkip): commented out calls to pic16_emitcode,
5102         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5103         * (genlshTwo),
5104         * (genRRC): added debugging info,
5105         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5106         overwritten while shifting,
5107         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5108         overwritten while shifting,
5109         * (AccLsh),
5110         * (AccRsh),
5111         * (shiftLLeftOrResult),
5112         * (shiftRLeftOrResult),
5113         * (shiftRLong),
5114         * (shiftLLong): Implemented with pic16_emitpcode
5115         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5116         * (genLeftShift): Fixed bug, operand for shift by variable always
5117         was "and"ed with 0x0f,
5118         * (genLeftShiftLiteral),
5119         * (genrshTwo),
5120         * (genRightShiftLiteral): added debugging info,
5121         * (genrshFour): added comment,
5122         * (genRightShift): determined signedness from operand "left"
5123         instead of "result"
5124
5125 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5126
5127         * src/SDCCicode.c (geniCodeParms),
5128         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5129         function pointers, fixed function pointer bugs #861242 and #861896
5130
5131 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5132
5133         * device/include/c8051f000.h,
5134         * device/include/c8051f120.h,
5135         * device/include/c8051f300.h: added header files for Silicon
5136         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5137
5138 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5139
5140         * src/SDCCast.c (processParams): added new type flow and restructured
5141         (gatherAutoInit): added new type flow
5142         (addCast): cosmetic changes
5143         (getLeftResultType): added new type flow for array indices, patch
5144         provided by Stas, see FR #877103
5145         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5146         array index patch by Stas
5147         * src/SDCCast.h: added prototype getResultTypeFromType()
5148         * src/SDCCval.h,
5149         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5150         * src/pic/glue.c (pic14emitStaticSeg),
5151         * src/pic16/glue.c (pic16emitStaticSeg),
5152         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5153         for initialization of symbols
5154         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5155         * support/Util/SDCCerr.h:
5156         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5157         * .version: bumped version number to 2.3.8
5158         * device/include/Makefile.in (install),
5159         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5160         avoid warnings
5161
5162 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5163
5164         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5165         Slade Rich fixed an optimization bug
5166         * src/pic/pcodepeep.c,
5167         * src/pic/pcoderegs.c
5168         * doc/Makefile (install): added test for directory
5169
5170 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5171
5172         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5173         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5174         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5175         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5176         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5177         * as/mcs51/asexpr.c (term),
5178         * as/hc08/asexpr.c (term): fixed bug #887146
5179
5180 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5181
5182         * src/z80/gen.c (genMult): handle single byte result product
5183         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5184         DUMMY_READ_VOLATILE (fixed bug #886367)
5185
5186 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5187
5188         * support/regression/tests/libmullong.c: fixed logic, on little endian
5189         hosts we ended without a mullong_wrapper()
5190
5191 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5192
5193         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5194         virus/worm forged address usage.
5195
5196 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5197
5198         Fixed promotion, it should be done on AST level:
5199         * src/SDCCast.c (addCast): added promotion to int
5200         (decorateType): updated call to upCast()
5201         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5202         usualUnaryConversions()
5203
5204 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5205
5206         * support/regression/tests/literalop.c (mulWrapper): Added a
5207         wrapper to remove integer overflow warnings.
5208
5209         * support/regression/tests/float_trans.c: Made work on host.
5210
5211         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5212         location of sz80.
5213
5214         * support/regression/generate-cases.py (main): Changed from inline
5215         to a main method.
5216
5217         * doc/Makefile (install): Changed to depth first to get rid of
5218         missing directory install warning.
5219
5220         * as/Makefile (install-doc): Made work on Mac.
5221
5222 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5223
5224         * src/SDCCast.c: added an additional type flow in decorateType() of
5225         opposite direction, see feature request #860006; it's enabled at runtime
5226         by setting the environment variable SDCC_NEWTYPEFLOW
5227         * src/SDCCast.h: changed prototype of decorateType()
5228         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5229         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5230         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5231         see feature request #877103
5232         * src/SDCCval.c: updated call of decorateType()
5233         (valBitwise): fixed bug #882876
5234         (valMinus): added promotion
5235         (valLogicAndOr): result is unsigned
5236         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5237         * src/SDCCsymt.c (computeType),
5238         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5239         must not cause an unsigned operation
5240         * src/pic/glue (pic14emitRegularMap),
5241         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5242
5243 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5244
5245         * src/pic/pcode.c (PCodeID): commented out left over debug code
5246
5247 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5248
5249         * support/valdiag/tests/overflow.c: added shift tests
5250         * src/pic/device.c,
5251         * src/pic/gen.c,
5252         * src/pic/gen.h,
5253         * src/pic/glue.c,
5254         * src/pic/main.c,
5255         * src/pic/pcode.c,
5256         * src/pic/pcode.h,
5257         * src/pic/pcodepeep.c,
5258         * src/pic/pcoderegs.c,
5259         * src/pic/ralloc.c,
5260         * src/pic/ralloc.h: applied patch from Slade Rich;
5261         added support for multiple code pages and multiple RAM banks on the
5262         PIC 14 port. The ASM files now no longer simply assume all the
5263         code / RAM are in the same page / bank. This means the linker can
5264         safely allocate code/RAM of separate ASM files to different pages/banks.
5265         * doc/sdccman.lyx: added Slade's tips
5266         * src/mcs51/peeph.def: fixed bug #880768
5267
5268 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5269
5270         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5271         * src/SDCCast.c (decorateType): fixed bug #880197
5272
5273 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5274
5275         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5276         getopt.h.
5277
5278         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5279         strtof is not part of C89 and isn't included with Mac OS X.
5280
5281 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5282
5283         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5284         shiftL2Left2Result): fixed bug #879326
5285         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5286         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5287         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5288         address fetch for clr instruction
5289         * device/lib/hc08/_mulint.c: created optimized assembly version
5290         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5291
5292 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5293
5294         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5295         proposed in FR #877103
5296
5297 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5298
5299         * src/SDCCval.c (cheapestVal): added missing checks
5300         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5301         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5302
5303 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5304
5305         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5306         equal operands
5307
5308 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5309
5310         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5311         loaded with the linker search paths (-L arguments) and the libraries
5312         to be linked with the current source (-l arguments). Changes
5313         currently will affect only the pic16 port.
5314         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5315         include path the port specific paths and port specific libraries,
5316         * gplink command now contains the $3 argument,
5317         * src/pic16/device.h,
5318         * src/pic16/device.c,: structure PIC_device is made public and
5319         renamed to PIC16_device, the same for variable Pics which is renamed
5320         to Pics16. Updated all references to them.
5321         * src/pic16/glue.c (pic16glue): corrected bug with code
5322         initialization which bypassed the variable initializations block.
5323
5324         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5325         COMPILE_FLAGS and added the --nostdinc option
5326
5327 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5328
5329         * device/include/mc68hc908jb8.h: Register defs for another member
5330         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5331
5332 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5333
5334         Documenting changes from previous commits.
5335         * configure.in (version 1.56),
5336         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5337         when generating output files to configure the pic16 library,
5338         but now I've commented it out, since gputils aren't installed in the
5339         SF compile farm, so library won't compile
5340
5341         * device/lib/Makefile.in (version 1.56): initially I've added in
5342         target 'all' the prerequestive 'model-pic16' so it compiled the
5343         pic16 library, but now I've commented it out for the same reasons
5344         above,
5345         * added targets 'model-pic16' and 'objects-pic16' to compile the
5346         library
5347         * added target 'port-specific-objects-pic16' to handle the
5348         generated libraries and copy them into the build/ directory
5349         * added target 'clean-intermediate-pic16' to clean intermediate
5350         files into pic16 directory
5351         * in target 'installdirs' added line to create directory pic16 in
5352         the installation path
5353
5354         * device/include/Makefile.in (version 1.11): in target 'install'
5355         added lines to copy all header files to installation path,
5356         * in target 'installdirs' added line create directory for pic16
5357         headers in the installation path
5358
5359 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5360
5361         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5362          a function call
5363
5364 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5365
5366         * configure,
5367         * device/lib/configure.in,
5368         * device/lib/configure: fixed for autoconf 2.57
5369
5370 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5371
5372         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5373         option so that it actually works. Made it specific to the z80, since
5374         the gbz80 doesn't have these kinds of I/O ports.
5375
5376 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5377
5378         * device/include/z180.h,
5379         * device/lib/_memcpy.c,
5380         * device/lib/_memmove.c,
5381         * device/lib/_mulint.c,
5382         * device/lib/ser_ir.c,
5383         * device/lib/ser_ir_cts_rts.c,
5384         * device/lib/_strcmp.c,
5385         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5386         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5387         portmode; added deprecation warning for bank= and protmode= forms.
5388         Also, guard against buffer overflow.
5389         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5390
5391 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5392
5393         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5394         changed interrupt vector table generation to only emit declared vectors.
5395         * device/include/Makefile.in: added missing backslash
5396         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5397
5398 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5399
5400         Mainly changes to support compilation of the device libraries
5401         * src/pic16/device.c: stack is allocated via symbol and not
5402         via literal number. The symbol is placed in the corresponding
5403         position of the data ram
5404         * (pic16_dump_section): relocatable and absolute uninitialized
5405         data are now emitted in sorted order to reduce section naming,
5406         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5407         weren't marked as being in the access bank,
5408
5409 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5410
5411         Added portion of GNU PIC Library under the directory
5412         device/include/pic16 and device/lib/pic16. These files
5413         contain the declarations of SFRs for the PIC18Fxx2 devices.
5414         The directory is initialized via configure from toplevel.
5415
5416 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5417
5418         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5419         the spilllocations to be compared correctly
5420
5421 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5422
5423         * src/SDCCast.c (decorateType): fixed bug introduced today
5424
5425 2004-01-12  Borut Razem <borut.razem AT siol.net>
5426
5427         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5428         doc/sdccman.lyx: upper case pragmas are deprecated
5429
5430 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5431
5432         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5433         in simpler and even better code
5434
5435 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5436
5437         * src/SDCCicode.c (operandOperation): fixed bug #874819
5438         * src/SDCCast.c (decorateType): fixed
5439         char foo (unsigned long ul) { return ul > 0; }
5440
5441 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5442
5443         * doc/sdccman.lyx: Moved and added some sections, small changes
5444         all over. Telling LaTeX to be less strict with word spacing
5445         to better keep the right margin. Changed some notes about
5446         maintainance of the ports in section 3.2.1 - is it OK like this?
5447
5448 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5449
5450         SDCC source changes:
5451         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5452         convilong): modified to inform the pic16 port that builtin functions
5453         are external
5454
5455         PIC16 PORT specific changes:
5456         * src/pic16/device.c pic16_dump_equates() added,
5457         processor registers declared internally by the port are emitted in
5458         the translation as equates,
5459         * src/pic16/gen.c: inline code is passed unprocessed to the
5460         translation,
5461         * (pic16_popGetLit2): fnuction modified to take second operand as
5462         pCodeOp pointer and not as literal,
5463         * (popRegFromIdx): prefixed with pic16_,
5464         * (pic16_popCombine2): modified to receive already allocated pCode
5465         operands,
5466         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5467         * (genFunction): initializes local stack frame and pushes on stack
5468         all the registers used by this function,
5469         * (genEndFunction): restores all registers from stack and restores
5470         stack frame,
5471         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5472         improvements,
5473         * (pic16glue): changed the program startup sequence,
5474         * added new dbName code 'A' for functions placed in absolute section
5475         * src/pic16/main.c: added function attribute _naked,
5476         * added pragma 'code' to place a fnuction at an absolute address,
5477         * added command line arguments --debug-ralloc and --pcode-verbose,
5478         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5479         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5480         * (pic16_newpCodeOpLit2): modified to take the second operand as
5481         pCodeOp pointer,
5482         * (pic16_printpBlock): modified to emit each function in a separate
5483         section,
5484         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5485         UPPER for immediate operands,
5486         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5487         instruction,
5488         * src/pic16/peeph.def: all peepholes with movff are commented out,
5489         because there is a problem in the pcode peep optimizer,
5490         * src/pic16/ralloc.c: the register allocator can now reuse local
5491         function symbols for another function. This saves register usage.
5492         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5493
5494         Added file src/pic16/NOTES with information about program writing on
5495         the current port version.
5496
5497 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5498
5499         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5500         and peephole 252 (array access)
5501
5502 2004-01-09  Borut Razem <borut.razem AT siol.net>
5503
5504         * src/SDCCmain.c : fixed #872250: -l command line defined library
5505           files are scanned before standard library files
5506
5507 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5508
5509         * src/SDCCast.c (decorateType): fixed bug #874046
5510
5511 2004-01-09  Borut Razem <borut.razem AT siol.net>
5512
5513         * support/scripts/sdcc.nsi: remove previous installation
5514
5515 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5516
5517         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5518         bytes for last interrupt vector (mcs51)
5519         * sdcc.spec: fixed typo
5520
5521 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5522
5523         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5524         gen51Code): more efficient parameter receive for --model-large
5525         ("bug" #845294)
5526
5527 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5528
5529         * src/ds390/main.c,
5530         * src/z80/main.c: added missed needLinkerScript flags (more than
5531         one port structure defined in these file)
5532         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5533         bug #795325
5534
5535 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5536
5537         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5538         * src/port.h: added flag needLinkerScript in port->linker
5539         structure to inform whether to create a .lnk file or not,
5540         * src/avr/main.c,
5541         * src/ds390/main.c,
5542         * src/hc08/main.c,
5543         * src/mcs51/main.c,
5544         * src/pic/main.c,
5545         * src/pic16/main.c,
5546         * src/xa51/main.c,
5547         * src/z80/main.c: changed appropriately to configure
5548         needLinkerScript flag
5549         * src/pic/gen.c,
5550         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5551         * src/pic/glue.c: added variable udata_section_name to
5552         override default uninitialized data segment definition for
5553         devices only with SHAREBANK memory (reported from Erik Epetrich)
5554         * (pic14emitOverlay): modified to emit a commented overlay segment
5555         directive when no overlay data exist
5556         * (picglue): modified to emit uninitialized data segment
5557         according to udata_section_name
5558         * src/pic/main.c (_pic14_parseOptions): added command line
5559         options --udata-section-name=[name] to override default
5560         udata definition name
5561         * modified _linkCmd and _asmCmd to include compiler passed
5562         arguments via -W option
5563         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5564         object file from '.rel' to '.o' in port->linker structure,
5565         changed size of fptr from 2 to 3 in port structure
5566
5567 2004-01-07  Borut Razem <borut.razem AT siol.net>
5568
5569         * support/scripts/sdcc.nsi: update PATH
5570         * support/scripts/sdcc.ico: craeted
5571
5572 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5573
5574         * device/include/Makefile.in: fix install
5575         * doc/Makefile: fix install
5576
5577 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5578
5579         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5580         in bug #860505
5581         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5582         how the function variable allocation summary is displayed; also
5583         include information about variables allocated to the overlay
5584         segment
5585
5586 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5587
5588         * as/mcs51/lkmain.c: Help about -Y option
5589         * as/mcs51/lkarea.c: Fixed gcc warnings
5590
5591 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5592
5593         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5594         fixed warning
5595         * support/valdiag/tests/overflow.c: added
5596         * src/SDCCast.c (decorateType),
5597         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5598         LEFT_OP (left shift)
5599
5600 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5601
5602         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5603         (default behaviour).
5604
5605 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5606
5607         A python script to validate compiler diagnostic messages. It can be
5608         used to verify that sdcc complains about bad c source code and
5609         gives a good location of the error.
5610         * support/valdiag/Makefile,
5611         * support/valdiag/valdiag.py,
5612         * support/valdiag/tests/*
5613
5614 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5615
5616         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5617         * src/SDCCsymt.c (newEnumType),
5618         * src/SDCCsymt.h
5619         * support/Util/SDCCerr.c,
5620         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5621         enum related bugs.
5622         * support/regression/tests/enum.c: added test for enum values that
5623         require at least 2 bytes of storage.
5624
5625 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5626
5627         * src/common.h: added ifndef/define/endif macros
5628         around the header file.
5629         Bug reported from Jesus Calvino-Fraga
5630
5631 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5632
5633         * sdcc.spec: updated
5634         * device/include/Makefile.in: don't install CVS directories
5635         * device/lib/Makefile.in: added removal of CVS directories after install
5636         * doc/Makefile: fixed install, added local_icons
5637         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5638         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5639         * src/ds390/gen.c (genRightShift): fixed bug #870788
5640         * src/SDCCast.c (decorateType): fixed bug #870781
5641
5642 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5643
5644         PIC16 port related changes:
5645         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5646         added variable stackPos,
5647
5648         * gen.c: genCall, assignResultValue: added support for
5649         pushing/retrieving function parameters to/from stack,
5650         genFunction,genEndFunction: setup stack frame for the
5651         generated function,
5652         genAddrOf: will be changed according to bug 863624
5653
5654         * added files genutils.c and genutils.h which contain gen*
5655         debugged and optimised functions extracted from gen.c
5656
5657         * glue.c: added variable 'externs' which holds extern symbols,
5658         pic16emitRegularMap: is modified to properly handle relocatable
5659          symbols under the new scheme,
5660         pic16createInterruptVect: is modified
5661         pic16printPublics: is modified to emit 'global' assembler directives,
5662         added pic16_printExterns to print extern symbols,
5663         pic16glue: initializes stack/frame pointer in the beginning of
5664         the assembly output. Temporary hack, will be corrected later,
5665         because gplink yet does not support stack and SDCC does not
5666         yet support a type of crt0.o object to create the final binary.
5667
5668         * Removed many lines that contain 8051 legacy code.
5669         * The code is finally placed under a 'code' directive.
5670         * Added port specific options.
5671
5672         * _process_pragma: simplified since now we do not need *special*
5673         include file to define SFR registers. But a separate header
5674         will be needed. This will be developed later.
5675         * _pic16_parseOptions: added, parses port specific options:
5676         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5677         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5678         --preplace-udata-with=
5679
5680         * _pic16_setDefaultOptions: modified to initialize section names,
5681         but hack is temporarly out of order since it needs improvement.
5682         * _pic16_genAssemblerPreamble: configuration words are emitted by
5683         their address instead of their name. This part is incomplete and
5684         supports only the 18Fxx2 devices. Other devices will emit an error
5685         during assembly since they do not contain the same set of config
5686         registers
5687         * _pic16_genIVT: is modified,
5688
5689         * pcode.c: added definitions for some hardware registers that are needed
5690         for stack support
5691         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5692         All PCI entries are updated. Now LFSR is supported.
5693         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5694         * added pic16_newpCodeOpLit2 to support instructions with
5695         two literal arguments
5696         * pic16_pCode2str: corrected code that emits assembler instructions
5697         with two literal operands and those that have an access bit modifier
5698         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5699         this fixes a bug which caused some labels to be lost, when an
5700         assembler directive was added, i.e. banksel,
5701         * pic16_FixRegisterBanking: improved logic that causes the insertion
5702         of bank switching,
5703         * InlineFunction: functions that are called once, are not any more
5704         inlined. This can be a port option in the future,
5705
5706         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5707
5708         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5709         hold the corresponding uninitialized symbols,
5710         * pic16_allocProcessorRegister: registers have explicit marked the
5711         accessBank field,
5712         * pic16_allocInternalRegister: registers are explicit marked as
5713         not used,
5714         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5715         processing list, so bit registers were lost,
5716         *
5717
5718         * ralloc.h: added field 'accessBank' and original symbol operand
5719         in register definition,
5720         * removed the field isMapped from register definition,
5721
5722         ** Several functions have been removed from various sources:
5723         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5724         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5725         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5726         pic16_assignRelocatableRegisters
5727
5728         ** others have been introduced:
5729         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5730         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5731
5732 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5733
5734         * support/scripts/inc2h.pl: changed definition of BIT_AT
5735         to emit 'sbit at' instead of 'bit at'. This was a request.
5736
5737         PIC16 port related preliminary changes:
5738         * gen.c: prefixed function popRegFromString with
5739         pic16_ and all references to it corrected
5740         * pcode.c: all pic16_pc_* hardware registers prefixed
5741         with underscore (_),
5742         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5743         * ralloc.c: newReg(): when register is REG_SFR then
5744         set address to rIdx,
5745         pic16_allocProcessorRegister(): marks register wasUsed=0
5746         pic16_writeUsedRegs(): added a call to assign processor
5747         registers via pic16_assignFixedRegisters
5748
5749 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5750
5751         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5752         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5753         variables in unused register banks.  Also the SSEG is placed
5754         wherever there is enough space for it, and IDATA can be anywhere
5755         in internal RAM.  For now compile using -Wl-Y[stack_size].
5756         The mem file is different for this option as well, since it
5757         makes no sense of talking about DSEG lenght.
5758
5759 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5760
5761         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5762         in certain cases, e.g. when ROM assignment, patch provided
5763         from Albert den Haan.
5764
5765 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5766
5767         Many signedness and type propagation fixes:
5768         * src/SDCCicode.c: made geniCodeCast() static
5769         replaced SPEC_ by IS_ (cosmetic)
5770         (operandOperation): fixed div and mod operation
5771         (usualBinaryConversions): added support for promotion of char
5772         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5773         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5774         (geniCodeAdd): an array index will stay unsigned, even if promoted
5775         from char to int
5776         (geniCodeArray): ditto
5777         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5778         * src/SDCCsymt.c (computeType): added more support for char;
5779         promotion of char is selectable by promoteCharToInt, fixed signedness
5780         for all cases
5781         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5782         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5783         * src/SDCCval (val*): replaced signedness calculation by
5784         computeType()
5785         rearranged if-branches (cosmetic)
5786         (valShift): added warning W_SHIFT_CHANGED
5787         (valCompare): fixed problem with different types
5788         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5789         * support/regression/tests/literalop.c: added many cases
5790         * support/regression/tests/ast_constant_folding.c: changed finally to
5791         'unsigned int'
5792         * .version: new year, new version: 2.3.7
5793         * src/SDCCmain.c (main): applied patch #866468
5794         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5795         provided by Scott Bronson
5796         * doc/sdccman.lyx: updated documentation for sdcdb
5797         updated and added chapter tips
5798
5799 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5800
5801         * src/SDCCsymt.h: missing from yesterday's commits
5802
5803 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5804
5805         * src/SDCC.y (struct_or_union_specifier),
5806         * support/Util/SDCCerr.c,
5807         * support/Util/SDCCerr.h: verify that struct & union tags are used
5808         as declared.
5809
5810 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5811
5812         * src/SDCCglobl.h: missing from yesterday's commits
5813
5814 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5815
5816         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5817         sft_attributes, struct_declaration, parameter_declaration,
5818         type_name, start_block, declaration_list),
5819         * src/SDCC.lex (check_type): support redefinition of typedef names
5820
5821 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5822
5823         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5824         aligned xdata arrays. Erik helped me with the if clause.
5825
5826 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5827
5828         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5829         warning
5830
5831 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5832
5833         * src/SDCCast.h,
5834         * src/SDCCast.c (newAst_),
5835         * src/SDCCicode.h,
5836         * src/SDCCicode.c (ast2iCode, newiCode),
5837         * src/SDCCglobl.h,
5838         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5839         expr, statement, expression_statement, selection_statement,
5840         iteration_statement, expr_opt, jump_statement): foundation for tracking
5841         sequence points
5842         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5843         point code too)
5844
5845 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5846
5847         * support/Util/SDCCerr.c,
5848         * src/SDCCast.h,
5849         * src/SDCCast.c (createCase, createDefault, decorateType),
5850         * src/SDCClabel.c (labelUnreach),
5851         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5852         to error messages.
5853         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5854         (with thanks to Stas Sergeev)
5855         * device/include/time.h,
5856         * device/lib/time.c (CheckTime): suppress unreachable code warning
5857
5858 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5859
5860         * src/SDCCast.c (createIvalCharPtr),
5861         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5862         bug #753752)
5863         * support/regression/tests/nullstring.c: tests for these two bugs
5864
5865 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5866
5867         * support/Util/SDCCerr.h,
5868         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5869         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5870         about storage class and 'at' used inside struct or union
5871         * src/SDCCBBlock.c (iCodeFromeBBlock),
5872         * src/SDCCcse.c (ifxOptimize),
5873         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5874         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5875         printIval, emitStaticSeg, emitOverlay),
5876         * src/SDCClabel.c (deleteIfx),
5877         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5878         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5879         gatherAutoInit, processParms),
5880         * support/Util/SDCCerr.h,
5881         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5882         reporting for post-parse errors.
5883
5884 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5885
5886         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5887         implicit casts via union; they don't work on big endian systems
5888         (possible fix for bug #861138)
5889
5890 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5891
5892         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5893         * src/mcs51/main.c: fixed the fix for bug #737001
5894
5895 2003-12-15  Borut Razem <borut.razem AT siol.net>
5896
5897         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5898
5899 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5900
5901         * support/makebin/makebin.c: put output in binary mode
5902
5903 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5904
5905         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5906         xdata and data memory on startup. Set the environment variable
5907         SDCC_NOGENRAMCLEAR to disable this.
5908         * src/mcs51/peephole.def,
5909         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5910         (allows non-interrupt and interrupt code to safely compete for a resource
5911         without the non-interrupt code having to disable interrupts)
5912
5913 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5914
5915         * src/SDCCicode.c (geniCodeAdd),
5916         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5917         with valFromType if type might be a pointer and host is big endian).
5918         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5919         types, not just integer types.
5920         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5921         multiply defined with mismatching "at" address.
5922
5923 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5924
5925         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5926         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5927         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5928         with embedded nulls (fixed bug #753752)
5929
5930 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5931
5932         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5933         Apparently this did not see much testing (endless loop)
5934
5935 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5936
5937         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5938
5939 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5940
5941         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5942         gracefully handle NULL memmap pointers
5943
5944 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5945
5946         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5947         instead of deleting the iCode when an operand is volatile
5948         * src/z80/gen.c (genDummyRead),
5949         * src/mcs51/gen.c (genDummyRead),
5950         * src/ds390/gen.c (genDummyRead),
5951         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5952         not just IC_RIGHT
5953         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5954         * src/SDCC.y: fixed bug #850420
5955
5956 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5957
5958         Applied z80 i/o port patch from Peter Townson and fixed some operators
5959         to better handle operands in A register.
5960         * device/include/z180.h
5961         * src/SDCC.y
5962         * src/SDCCglue.c
5963         * src/z80/gen.c
5964         * src/z80/gen.h
5965         * src/z80/main.c
5966         * src/z80/peeph-z80.def
5967         * src/z80/peeph.def
5968         * src/z80/z80.h
5969
5970 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5971
5972         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5973
5974 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5975
5976         * device/lib/hc08/_mullong.c: Removed extra #endif
5977
5978 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5979
5980         * sim/ucsim/hc08.src/inst.cc,
5981         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5982         carries from x to h
5983         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5984         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5985         * device/include/stdarg.h: fixed varargs for hc08
5986         * device/lib/Makefile.in,
5987         * device/lib/hc08/Makefile,
5988         * device/lib/hc08/_mulint.c,
5989         * device/lib/hc08/_mullong.c: fixed some endian problems
5990
5991 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5992
5993         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5994         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5995         * device/lib/_gptrget.c,
5996         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5997
5998 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5999
6000         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6001         * src/SDCCast.c (astErrors): fixed bug #846007
6002         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6003
6004 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6005
6006         * src/SDCCast.c (decorateType): disabled a transformation I added in
6007         revision 1.188 (access to fields of a structure at an absolute address);
6008         it breaks with bitfields, extern declarations, and gcse analysis.
6009         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6010         could be assigned through a pointer, so don't complain.
6011         * src/SDCCast.c (astErrors),
6012         * src/SDCCast.h,
6013         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6014
6015 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6016
6017         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6018         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6019         output of __config directives, since gpasm now supports them
6020         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6021         pre-processor macro, i.e. -DMCU=p18f452
6022         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6023         and modified to handle 'cast' icode similarly to '=' icode
6024         * src/pic16/device.h (typedef struct PIC_device): added field
6025         'extMIface' to indicate that chip has external memory interface
6026         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6027         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6028         18F8720
6029
6030 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6031
6032         * src/SDCC.y (pointer): fixed bug #846006
6033         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6034         * src/SDCCast.c (decorateType): fixed bug #846009
6035         * src/ds390/peeph.def,
6036         * src/ds390/gen.c (genAnd, genOr),
6037         * src/mcs51/peeph.def,
6038         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6039
6040 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6041
6042         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6043         * src/SDCCdflow.c
6044         * src/SDCCcse.c
6045         * src/SDCCcse.h
6046         * src/SDCCBBlock.h
6047         * src/SDCCBBlock.c
6048
6049 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6050
6051         fixed bug #845089
6052         * src/SDCCbitv.h,
6053         * src/SDCCbitv.c: added function to free a bitvector
6054         * src/SDCClrange.h,
6055         * src/SDCClrange.c: added function to recompute the liveranges
6056         * src/avr/ralloc.c,
6057         * src/ds390/ralloc.c,
6058         * src/hc08/ralloc.c,
6059         * src/mcs51/ralloc.c,
6060         * src/pic/ralloc.c,
6061         * src/pic16/ralloc.c,
6062         * src/xa51/ralloc.c,
6063         * src/z80/ralloc.c: recompute the liveranges after register packing
6064
6065 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6066
6067         * src/SDCCloop.c (newInduction): fixed bug #845630
6068
6069 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6070
6071         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6072         inadvertantly left behind from my 2003-11-12 change
6073
6074 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6075
6076         Updated headers I neglected to commit yesterday.
6077         * src/SDCClrange.h,
6078         * src/SDCCicode.h
6079
6080 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6081
6082         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6083         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6084         * src/SDCCopt.c (eBBlockFromiCode),
6085         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6086         the creation of the key hash table from the sequencing so it can be used
6087         earlier (for some GCSE bug fixes still pending)
6088
6089 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6090
6091         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6092         * support/regression/tests/addsub.c: testing genPlus shortcut
6093
6094 2003-11-15  Borut Razem <borut.razem AT siol.net>
6095
6096         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6097
6098 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6099
6100         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6101         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6102         ordering is immaterial.
6103         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6104
6105 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6106
6107         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6108         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6109         (SIGSEV) of bug #840381
6110         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6111         unlink new file before rename if new and old filenames are the same)
6112
6113 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6114
6115         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6116         uninitialized variables) for the mcs51. Set environment variable
6117         SDCC_GENRAMCLEAR to test.
6118         xdata initialization slightly shorter
6119
6120 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6121
6122         * src/SDCCsymt.h,
6123         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6124         #838241 & 780691 (basicly the same bug)
6125         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6126         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6127
6128 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6129
6130         * src/SDCCmain.c (linkEdit): "fix" #834252
6131
6132 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6133
6134         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6135         * src/SDCCast.h,
6136         * src/SDCC.y: fixed bug #819403
6137
6138 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6139
6140         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6141         the reentrant attribute.
6142         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6143         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6144         simulation
6145         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6146         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6147         erroneously reduced to a literal.
6148         * src/hc08/ralloc.c (packRegisters, rematStr),
6149         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6150         some cases
6151
6152 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6153
6154         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6155         * doc/sdccman.lyx: changed from 'article' to 'book'
6156         * doc/Makefile: readded test_suite_spec and cdbfileformat
6157
6158 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6159
6160         * device/include/stdlib.h: include malloc.h to comply with ANSI
6161         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6162
6163 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6164
6165         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6166         * doc/clean.mk: also remove *.out files
6167         * doc/sdccman.lyx: some additions, larger top/bottom margins
6168
6169 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6170
6171         * src/SDCC.y: fixed bug #837365
6172         * support/regression/tests/bitopcse.c
6173         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6174         a symbol (might be valop instead)
6175         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6176         * device/lib/clean.mk: added hc08 to the cleaning list
6177
6178 2003-11-04  Borut Razem <borut.razem AT siol.net>
6179
6180         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6181           made 2003-11-04
6182         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6183           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6184           malloc is declared in standard stdlib.h
6185
6186 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6187
6188         * device/lib/hc08/Makefile: need to clean .rel not .o files
6189         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6190
6191 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6192
6193         * src/port.h,
6194         * src/hc08/main.c,
6195         * src/mcs51/main.c,
6196         * src/ds390/main.c,
6197         * src/z80/main.c,
6198         * src/avr/main.c,
6199         * src/pic/main.c,
6200         * src/pic16/main.c,
6201         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6202         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6203         tests (which uses the port's oclsExpense function)
6204         * src/SDCC.y,
6205         * src/SDCCast.c,
6206         * src/SDCCicode.c,
6207         * src/hc08/gen.c,
6208         * src/ds390/gen.c,
6209         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6210
6211 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6212
6213         * src/SDCCcse.c (ifxOptimize),
6214         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6215         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6216         deleting the IFX iCode.
6217         * src/hc08/ralloc.c: reduced unneeded slocs
6218         * src/hc08/gen.c: fixed bug in asmopToBoolean
6219
6220 2003-11-04  Borut Razem <borut.razem AT siol.net>
6221
6222         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6223           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6224           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6225           transferred to configure
6226
6227 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6228
6229         Use headers defined in the C[++] standards:
6230         * sim/ucsim/gui.src/serio.src/fileio.cc
6231         * sim/ucsim/gui.src/serio.src/frontend.cc
6232         * sim/ucsim/gui.src/serio.src/main.cc
6233         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6234         * support/Util/NewAlloc.c
6235         * as/hc08/lklibr.c
6236         * as/mcs51/lklibr.c
6237         * as/z80/aslist.c
6238         * as/z80/assym.c
6239
6240 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6241
6242         * Added MSVC projects for hc08 assembler and linker:
6243         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6244         /as/hc08/link_hc08.dsp
6245
6246 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6247
6248         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6249
6250 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6251
6252         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6253
6254 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6255
6256         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6257
6258 2003-10-31  Borut Razem <borut.razem AT siol.net>
6259
6260         * support/cpp2/cpplib.h,
6261           support/cpp2/cpplib.c,
6262           support/cpp2/cpplex.c,
6263           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6264           to switch _asm block preprocessing on / off. Default is
6265           #pragma preproc_asm +
6266
6267 2003-10-31  Borut Razem <borut.razem AT siol.net>
6268
6269         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6270           when outputting comment blocks (when executed with -C option) and
6271           _asm (SDCPP specific) blocks
6272
6273 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6274
6275         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6276
6277 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6278
6279         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6280
6281 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6282
6283         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6284         * src/SDCCast.c (decorateType): fixed bug #832664
6285
6286 2003-10-31  Borut Razem <borut.razem AT siol.net>
6287
6288         * support\cpp2\cpplex.c: fixed for SDCPP:
6289           comments(when executed with -C option) and _asm blocks
6290           were included even if they where in skipped #if block.
6291           Applied solution from GCC cpp 3.3.2
6292
6293 2003-10-31  Borut Razem <borut.razem AT siol.net>
6294
6295         * src/SDCC.lex: sdcc now understands both formats:
6296           '# <line_number> <file_name>' and
6297           '#line <line_number> <file_name>'
6298         * support/cpp2/cppmain.c: sdcpp now generates the standard
6299           '# <line_number> <file_name>' instead of former
6300           '#line <line_number> <file_name>'
6301
6302 2003-10-30  Borut Razem <borut.razem AT siol.net>
6303
6304         * support/cpp2/cpphash.h,
6305         * support/cpp2/cpplib.h
6306         * support/cpp2/cpplex.c,
6307         * support/cpp2/cppmain.c,
6308         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6309
6310 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6311
6312         Fixed a number of problems revealed by bug #827883.
6313         * src/SDCCloop.c (loopInvariants): Spill location of the
6314         result operand should be recomputed if extracted from
6315         a loop. Also, don't extract assignments of an iTemp
6316         from a literal.
6317         * src/SDCCast.c (isConformingBody): loop reversal should
6318         not occur if the control variable is involved with a
6319         relational operator.
6320
6321 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6322
6323         * .version: bumped to 2.3.6 to reflect the big improvements
6324         made by Erik and Klaus. Thanks!
6325
6326 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6327
6328         Replaced the livrange code.
6329         * src/SDCClrange.c: added new LR code
6330         * src/SDCCloop.c,
6331         * src/SDCCBBlock.h: removed remainig parts from old LR code
6332         * src/ds390/ralloc.c,
6333         * src/ds390/gen.c: minor fixes to make it work with new code
6334
6335 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6336
6337         * as/hc08/asm.h,
6338         * as/hc08/lkrloc.c,
6339         * src/hc08/gen.c,
6340         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6341         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6342         (tweaked fix for bug #818696)
6343
6344 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6345
6346         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6347
6348 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6349
6350         * src/SDCCmain.c,
6351         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6352         * src/mcs51/gen.c (gencjneshort),
6353         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6354         more efficient (per Scott Bronson's suggestion)
6355
6356 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6357
6358         Extended the semantics of the critical keyword to include
6359         individual statements. See RFE #827755 and #799831
6360         * src/SDCC.y
6361         * src/SDCCicode.c
6362         * src/SDCCopt.c
6363         * src/SDCCast.c
6364         * support/Util/SDCCerr.c
6365         * support/Util/SDCCerr.h
6366         * src/mcs51/gen.c
6367         * src/ds390/gen.c
6368         * src/hc08/gen.c
6369
6370 2003-10-19  Borut Razem <borut.razem AT siol.net>
6371
6372         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6373
6374 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6375
6376         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6377         Fixed bug #818696
6378         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6379         and predecrement operand is displayed
6380
6381 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6382
6383         * src/SDCCval.c (valMinus): fixed bug #826041
6384
6385 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6386
6387         Some hc08 related updates that I missed earlier
6388         * sim/ucsim/stypes.h
6389         * support/regression/ports/hc08/spec.mk
6390
6391 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6392
6393         New target "hc08" for the Motorola 68hc08 family of micros
6394
6395         * configure
6396         * configure.in
6397         * Makefile
6398         * src/hc08/*
6399         * src/SDCCmain.c
6400         * src/port.h
6401         * sim/ucsim/hc08.src/*
6402         * sim/ucsim/configure.in
6403         * src/ucsim/configure
6404         * sim/ucsim/packages_in.mk
6405         * as/hc08/*
6406         * as/Makefile
6407         * device/include/mc68hc908qy.h
6408         * device/lib/hc08/*
6409         * device/lib/Makefile.in
6410         * support/regression/ports/hc08/*
6411         * support/regression/Makefile
6412
6413 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6414
6415         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6416         regression test
6417         * src/ds390/gen.c (genCast): fixed bug #821957
6418
6419 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6420
6421         * device/lib/logf.c: "fixed" overlay bug
6422         * support/regression/ports/host/spec.mk: added m library
6423         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6424         * support/regression/tests/float_trans: added (for Eric)
6425
6426 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6427
6428         * src/mcs51/gen.c (genCpl): fixed bug
6429         http://sf.net/mailarchive/message.php?msg_id=6263915
6430
6431 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6432
6433         * src/SDCCast.c (decorateType): added extended constant folding
6434         * src/SDCCsymt.c (computeType): cleanup
6435         * src/SDCCval.c (valShift): minor optimization
6436         * support/regression/tests/ast_constant_folding.c: added
6437
6438 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6439
6440         * src/SDCCmain.c: removed some unintended changes
6441
6442 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6443
6444         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6445         * src/z80/gen.c: fixed part of bug #817589
6446         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6447
6448 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6449
6450         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6451         * src/SDCCcflow.c
6452         * src/SDCCcse.c
6453         * src/SDCCdflow.c
6454         * src/SDCClabel.c
6455         * src/SDCClrange.c
6456         * src/SDCCmem.c
6457         * src/SDCCopt.c
6458         * src/SDCCpeeph.c
6459         * src/SDCCset.c
6460         * src/avr/ralloc.c
6461         * src/ds390/ralloc.c
6462         * src/izt/ralloc.c
6463         * src/mcs51/ralloc.c
6464         * src/pic/ralloc.c
6465         * src/pic16/ralloc.c
6466         * src/xa51/ralloc.c
6467         * src/z80/ralloc.c
6468         * src/z80/gen.c: removed unused label "release:"
6469
6470 2003-10-06  Borut Razem <borut.razem AT siol.net>
6471
6472         * src/SDCC.lex: removed definition of unused variables
6473           save_optimize and save_options
6474
6475 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6476
6477         * clean.mk: removed '=' in "-maxdepth=1"
6478         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6479         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6480
6481 2003-10-06  Borut Razem <borut.razem AT siol.net>
6482
6483         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6484           my_unput() replaced by unput()
6485
6486 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6487
6488         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6489         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6490         type-punned pointer will break strict-aliasing rules"
6491         Old LR behaviour is again default; Klaus' LR can be choosen by
6492         defining the environment variable LRKLAUS
6493         * src/SDCCBBlock.h
6494         * src/SDCCloop.c
6495         * src/SDCClrange.c
6496         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6497         * clean.mk: fixed removal of files in bin/CVS/
6498         * device/lib/clean.mk: fixed removal of directories small and large
6499         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6500         * src/SDCCicode.c,
6501         * src/SDCCval.c: removed superflous test for pedantic
6502
6503 2003-10-05  Borut Razem <borut.razem AT siol.net>
6504
6505         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6506           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6507           message "unmatched #pragma SAVE and #pragma RESTORE"
6508
6509 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6510
6511         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6512           assembly, critical functions, atomic, nojtbound)
6513
6514 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6515
6516         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6517         * src/SDCCBBlock.h
6518         * src/SDCCloop.c
6519         * src/SDCCloop.h
6520         * src/SDCClrange.c
6521
6522 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6523
6524         * src/z80/gen.h,
6525         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6526         * src/mcs51/gen.h
6527         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6528         * src/ds390/gen.h
6529         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6530         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6531         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6532
6533 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6534
6535         * src/z80/gen.c (genRet): fixed bug #524753
6536         * src/z80/gen.c (genCast): fixed internal error on cast from
6537         pointer to long
6538         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6539         fix for bug #477835 to the z80
6540         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6541         for tracking iCodes in the peephole optimizer for z80
6542
6543 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6544
6545         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6546         the other part of bug #814548
6547         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6548
6549 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6550
6551         * src/SDCCcse.c: fixed part of bug #814548
6552
6553 2003-09-28  Borut Razem <borut.razem AT siol.net>
6554
6555         * src/asm.c: rewrite of printILine() to use temporary file instead
6556           a pipe
6557         * src/xa51/main.c: commented out declaration of int rewinds
6558
6559 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6560
6561         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6562
6563 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6564
6565         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6566         * src/asm.c (printILine): Fixed bug #811015
6567
6568 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6569
6570         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6571         freeing.
6572
6573 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6574
6575         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6576         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6577         to correctly handle general case of AOP_PAIRPTR
6578         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6579
6580 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6581
6582         * src/mcs51/ralloc.c (fillGaps),
6583         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6584         register positioning bug)
6585
6586 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6587
6588         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6589
6590 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6591
6592         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6593         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6594         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6595         (ralloc doesn't intentionally do this now, but perhaps later)
6596         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6597         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6598         register positioning bugs (Fixed bug #762602 and #795325)
6599         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6600         (Fixed bug #808779)
6601         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6602         lines that --i-code-in-asm generates
6603
6604 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6605
6606         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6607         trying to fclose a FILE* that was already closed.
6608
6609 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6610
6611         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6612         of const struct should be treated as if const themselves)
6613
6614 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6615
6616         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6617
6618 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6619
6620         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6621         Unix (/n) and DOS (/r/n) line terminations.
6622
6623 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6624
6625         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6626         bug #613775
6627
6628 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6629
6630         * src/mcs51/gen.c (genFunction, genEndFunction),
6631         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6632         and restore of EA so that stack offsets to parameters are
6633         correct when using both critical and reentrant/stack-auto.
6634         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6635         size (can be triggered in error if sloc is shared between
6636         different sized objects)
6637         * device/include/float.h: fixed macros to explicitly use
6638         unsigned long where needed
6639
6640 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6641
6642         Feature req. 799831: added code to allow nesting of critical functions
6643         * src/mcs51/gen.c (genFunction, genEndFunction)
6644         * src/ds390/gen.c (genFunction, genEndFunction)
6645
6646 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6647
6648         * src/SDCCsymt.c (sclsFromPtr),
6649         * src/SDCCsymt.h,
6650         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6651         support for standard C idiom of memory mapped variables; for
6652         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6653         to xdata int at 0x1234 tempvar = 1.
6654         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6655         provided by Akiya ISHIDA
6656
6657 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6658
6659         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6660         * src/SDCCval.c (constVal): added reduction from int to char
6661         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6662         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6663         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6664         to ignore the sign
6665         * support/regression/tests/shifts.c: fixed
6666
6667 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6668
6669         * src/z80/gen.c (genXor): Fixed bug #805445
6670
6671 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6672
6673         Fixed bug #621531 (const & volatile confusion in the type chain).
6674         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6675         refer to the const or volatile state of the pointer itself.
6676
6677         * src/SDCCast.c
6678         * src/SDCCglue.c
6679         * src/SDCCicode.c
6680         * src/SDCCsymt.c
6681         * src/SDCCval.c
6682         * src/SDCC.y
6683         * src/SDCCsymt.h
6684         * src/pic/gen.c
6685         * src/pic/ralloc.c
6686         * src/pic16/gen.c
6687         * src/pic16/ralloc.c
6688         * support/regression/tests/const.c
6689
6690 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6691
6692         When checking for duplicated modules, use absolute paths
6693         instead of relative paths.  Files changed:
6694
6695         * as/mcs51/lklib.c
6696         * link/z80/lklib.c
6697
6698 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6699
6700         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6701
6702 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6703
6704         * device/include/string.h: added size_t typedef, changed
6705         prototypes to use size_t, eliminated separate reentrant and
6706         non-reentrant declarations, added _memmove declaration
6707         * device/lib/_memcpy.c: changed to use size_t instead of int,
6708         changed /4 to >>2 to avoid division library call
6709         * device/lib/_memcmp.c,
6710         * device/lib/_memset.c,
6711         * device/lib/_strncat.c,
6712         * device/lib/_strncpy.c,
6713         * device/lib/_strncmp.c: changed to use size_t instead of int
6714         * device/lib/_memmove.c: new file (fixed bug #772294)
6715         * device/lib/Makefile.in: added _memmove.c
6716         * device/lib/z80/asm_strings.s: fixed bug #772290
6717         * support/regression/tests/bitfields.c: attempt to fix host assertion
6718         failure on amd64-unknown-linux2.2
6719
6720 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6721
6722         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6723         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6724         * as/z80/asmain.c (main): fixed bug #801766
6725
6726 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6727
6728         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6729         compilers
6730
6731 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6732
6733         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6734         reported in bug #800609
6735
6736 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6737
6738         * Top header beautifications in src/pic16 directory:
6739           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6740           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6741           pcoderegs.h, ralloc.c, ralloc.h
6742         * main.c: added top header and GPL license notice
6743         * pcode.c: fixed the if-conditional warning
6744
6745 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6746
6747         * device/lib/_mullong.c: replaced int by short for gcc
6748
6749 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6750
6751         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6752         and JUMPTABLE iCodes properly now (worked by accident before)
6753         * src/mcs51/gen.c (leftRightUseAcc),
6754         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6755         iCode properly now. Use getSize instead of nRegs since a & b
6756         aren't part of the nRegs tally.
6757
6758 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6759
6760         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6761         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6762           before instructions that use the _STATUS register
6763
6764 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6765
6766         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6767         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6768         fetching of the pointer
6769         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6770         copied from genNearPointerSet()
6771         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6772         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6773         If they pop r0/r1 they must be called in the opposite order than aopOp().
6774         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6775         (resp. --stack-auto), prepared for --xstack
6776
6777 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6778
6779         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6780
6781 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6782
6783         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6784         these ports have their own __sdcc_external_start()
6785
6786 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6787
6788         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6789         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6790         type for bits was changed. It resulted in bit variables becoming
6791         global, which is not permitted in PIC 14 assembly output.
6792
6793 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6794
6795         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6796
6797 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6798
6799         Z80 and MCS51 linkers complaint if a public symbol is defined
6800         in more than one library module:
6801
6802         * as/mcs51/lklib.c
6803         * link/z80/lklib.c
6804         * as/mcs51/Makefile.in
6805
6806 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6807
6808         A few small changes that speed up the peephole optimizer.
6809
6810         * src/SDCCpeeph.c
6811
6812 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6813
6814         Try to make the peephole optimizer smarter by maintaining
6815         an association between the assembly source code and the
6816         iCodes that originated them. Put this information to use
6817         with a new peephole rule condition "notVolatile" so that
6818         the rules can be aggressive yet still safe.
6819
6820         * src/SDCCpeeph.c
6821         * src/SDCCpeeph.h
6822         * src/mcs51/gen.c
6823         * src/mcs51/peeph.def
6824
6825 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6826
6827         Fixed bug #741761
6828
6829         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6830         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6831         if the left or right operand symbols have the accuse flag set.
6832
6833 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6834
6835         Changed the type of the result of the ! (NOT) operator to char;
6836         previously it returned the same type as the source. This allows
6837         us to eliminate all the genFloatNot functions (all of its target
6838         implementations were very buggy) since !float can use the same
6839         code as !long now.
6840
6841         * src/SDCCicode.c (ast2iCode): ! returns char
6842         * src/mcs51/gen.c (genNot, genNotFloat),
6843         * src/ds390/gen.c (genNot, genNotFloat),
6844         * src/z80/gen.c (genNot, genNotFloat),
6845         * src/pic/gen.c (genNot, genNotFloat),
6846         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6847
6848 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6849
6850         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6851         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6852            during interrupts. Ensure WSAVE is located at a shared bank address.
6853         2. Fixed page selection in some places
6854         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6855            the registers name strings.
6856         4. Fixed "signed / unsigned compare" compiler warnings.
6857         5. The PIC port manages its own allocation of the general purpose
6858            registers, but makes no attempt to reuse them. As a result when
6859            compiling it soon runs out of general purpose registers. Some
6860            additional code was added to the files pcode.c and device.c to walk
6861            through the function call tree and rename the registers so that they
6862            get reused.
6863
6864         * src/pic/device.c
6865         * src/pic/gen.c
6866         * src/pic/glue.c
6867         * src/pic/pcode.c
6868         * src/pic/pcode.h
6869         * src/pic/ralloc.c
6870         * src/pic/ralloc.h
6871         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6872         genPlus() & genMinus() when the result is the same as left or right
6873
6874 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6875
6876         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6877
6878 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6879
6880         Made bitfield a distinct type from bit so that bitfields
6881         convert as per ANSI C and bits retain their traditional
6882         boolean style behaviour. Implemented bitfield support in
6883         the z80 port.
6884
6885         * src/SDCCsymt.h,
6886         * src/SDCCsymt.c,
6887         * src/SDCCast.c,
6888         * src/cdbFile.c,
6889         * src/mcs51/gen.c,
6890         * src/ds390/gen.c: bit v bitfield split
6891         * src/z80/gen.c: New support for bitfields
6892         * support/regression/tests/bitfields.c: reenabled z80,
6893         added more tests
6894
6895 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6896
6897         Rules 246.x, 247.x relate to bitfields, the others speed up
6898         access to xdata mapped I/O devices.
6899
6900         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6901
6902 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6903
6904         Cleaned up genPackBits and genUnpackBits and added two helper
6905         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6906         for literal assignments in genPackBits (thanks to Frieder for
6907         reminding me).
6908
6909         * src/mcs51/gen.c
6910         * src/ds390/gen.c
6911
6912 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6913
6914         Fixed bug #748310 (pointer to function type mishandled when the
6915         function name is omitted). Also fixed a SIGSEGV when a function
6916         attribute (reentrant, etc) is used on a non-function or on a
6917         function but misplaced before the parameter list.
6918
6919         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6920         bug #748310
6921         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6922         * support/Util/SDCCerr.h,
6923         * support/Util/SDCCerr.c: Added func attr misuse error msg
6924
6925 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6926
6927         Fixed bug #787649 by anonymous
6928         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6929         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6930
6931 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6932
6933         Fixed numerous bitfield problems.
6934
6935         * src/SDCC.y: More bitfield related error checking
6936         * src/SDCCsymt.h,
6937         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6938         * support/Util/SDCCerr.h,
6939         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6940         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6941         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6942         * support/regression/tests/bitfields.c: tests added
6943
6944 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6945
6946         Made the constant following the "interrupt" keyword optional. If
6947         omitted, the function will not automatically be given an entry
6948         in the interrupt vector table (similar to #pragma NOIV, but
6949         less syntacticly kludgy). The interrupt number is also now
6950         range checked. Also fixed a bug in the high order bit example
6951         in the manual.
6952
6953         * src/SDCC.y
6954         * src/SDCCmem.c
6955         * src/SDCCglue.c
6956         * src/SDCCsymt.h
6957         * support/Util/SDCCerr.c
6958         * support/Util/SDCCerr.h
6959         * doc/sdccman.lyx
6960
6961 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6962
6963         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6964         * src/SDCCicode.c (operandOperation): rewritten some ops
6965         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6966         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6967         other type
6968         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6969         be re-activated by defining REDUCE_LITERALS)
6970         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6971         unsigned, but are signed by default
6972         * src/SDCCval.c (constVal): rearranged
6973         * src/SDCCval.c (valMod): preliminary fix
6974         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6975         * support/regression/literalop.c: added, work in progress
6976
6977 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6978
6979         Generate warnings for useless declarations like "char data;"
6980         that don't do what new users expect.
6981
6982         * src/SDCC.y
6983         * support/Util/SDCCerr.h
6984         * support/Util/SDCCerr.c
6985
6986 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6987
6988         * src/SDCCval.c (valMult): fix overflow detection of negative int
6989
6990 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6991
6992         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6993
6994         Changes to support big endian targets:
6995
6996         * src/ports.h
6997         * src/SDCCglue.c
6998         * src/avr/main.c
6999         * src/ds390/main.c
7000         * src/izt/i186.c
7001         * src/mcs51/main.c
7002         * src/pic/main.c
7003         * src/pic16/main.c
7004         * src/xa51/main.c
7005         * src/z80/main.c
7006
7007 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7008
7009         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7010         * device/lib/time.c: fixed warning "integer overflow in expression"
7011
7012 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7013
7014         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7015         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7016         constants are unsigned; added recognition of "u" flag for unsigned
7017         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7018         * src/SDCCval.c (valDiv, valMod): fixed signdness
7019         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7020         signedness of modulo, left and right shift
7021         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7022         * support/Util/SDCCerr.h: added warning W_INT_OVL
7023         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7024         * src/SDCCast.c (ast_print): improved output of constants
7025
7026 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7027
7028         Fixed some warnings when building with MSVC:
7029
7030         * as\mcs51\asdata.c
7031         * as\z80\asdata.c
7032         * as\mcs51\asm.h
7033         * as\z80\asm.h
7034         * link\z80\aslink.h
7035         * link\z80\lkdata.c
7036         * link\z80\lkeval.c
7037         * link\z80\lkgb.c
7038         * link\z80\lkihx.c
7039         * link\z80\lks19.c
7040         * link\z80\lksym.c
7041         * support\cpp2\cpplib.c
7042         * src\ds390\gen.c
7043         * src\mcs51\gen.c
7044
7045 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7046
7047         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7048
7049 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7050
7051         * support\librarian\clean.mk: Do not remove Makefile.
7052         * support\librarian\Makefile: added.
7053
7054 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7055
7056         Added librarian to MSVC build:
7057         * all.dsp
7058         * sdcc.dsw
7059         * support\librarian\librarian.dsp
7060
7061         'configure' not needed for librarian, removed:
7062         * support\librarian\configure
7063         * support\librarian\configure.in
7064         * support\librarian\config_in.h
7065         * support\librarian\Makefile.in
7066
7067         Hopefully these ones built the librarian and the rest of sdcc properly:
7068         * Makefile
7069         * Makefile.common.in
7070
7071         Messed up 'configure', so revert to previous version:
7072         * configure
7073         * configure.in
7074
7075 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7076
7077         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7078         there, while the mantissa of a double is "only" 53 bits wide.
7079
7080 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7081
7082         Adding sdcclib to the build.  MSVC project coming soon.
7083         Files added/changed:
7084
7085         * support\librarian\clean.mk
7086         * support\librarian\configure
7087         * support\librarian\configure.in
7088         * support\librarian\config_in.h
7089         * support\librarian\Makefile.bcc
7090         * support\librarian\Makefile.in
7091         * support\librarian\sdcclib.c
7092         * Makefile.bcc
7093         * Makefile
7094         * Makefile.common.in
7095         * configure
7096         * configure.in
7097
7098 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7099
7100         Linker now complaints if linked modules have conflicting options, for
7101         example, one compiled using --model-large and another one compiled with
7102         --model-small.  The following files were modified:
7103
7104         * as\mcs51\asdata.c
7105         * as\mcs51\aslink.h
7106         * as\mcs51\asm.h
7107         * as\mcs51\asmain.c
7108         * as\mcs51\asout.c
7109         * as\mcs51\i51pst.c
7110         * as\mcs51\lkdata.c
7111         * as\mcs51\lklibr.c
7112         * as\mcs51\lkmain.c
7113         * as\z80\asdata.c
7114         * as\z80\asm.h
7115         * as\z80\asmain.c
7116         * as\z80\asout.c
7117         * as\z80\z80pst.c
7118         * link\z80\aslink.h
7119         * link\z80\lkdata.c
7120         * link\z80\lklibr.c
7121         * link\z80\lkmain.c
7122         * src\SDCCglue.c
7123
7124 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7125
7126         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7127         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7128
7129 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7130
7131         * src/z80/mappings.i: fix _mul[us][int,long] entries
7132
7133 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7134
7135         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7136
7137 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7138
7139         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7140         * support/regression/tests/bitopcse.c: added
7141         fixed warning:
7142         * src/avr/gen.c:
7143         * src/pic/gen.c:
7144         * src/pic16/gen.c:
7145         * src/z80/gen.c:
7146         * src/xa51/gen.c:
7147
7148 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7149
7150         added support for new library format to z80, gbz80 linkers:
7151         *link/z80/aslink.h
7152         *link/z80/lklex.c
7153         *link/z80/lklib.c
7154         *link/z80/lklist.c
7155
7156 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7157
7158         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7159         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7160
7161 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7162
7163         added DUMMY_READ_VOLATILE:
7164         * src/SDCC.y:
7165         * src/avr/gen.c:
7166         * src/xa51/gen.c:
7167         * src/z80/gen.c:
7168         * src/pic/gen.c:
7169         * src/pic16/gen.c:
7170         * src/mcs51/gen.c:
7171         * src/ds390/gen.c:
7172         * src/SDCCcse.c (algebraicOpts): many improvements
7173         * src/SDCCcse.h: removed algebraicOpts()
7174         * src/SDCCicode.c (picDummyRead): added
7175
7176 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7177
7178         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7179         "Insufficient space in data memory".
7180
7181 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7182
7183         * src/mcs51/gen.c: fixed bug #771358
7184         * src/z80/gen.c: fixed bug #759087
7185
7186 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7187
7188         * src/pic16/glue.c: minor cleanup by Vangelis
7189
7190 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7191
7192         * device/include/regc515c.h: fixed #758477
7193         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7194         * device/lib/_gptrput.c: saved a few bytes
7195         * my tab spacing is 8, yours too?)
7196         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7197         * device/lib/serial.c: process RX bytes earlier than TX bytes
7198         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7199
7200 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7201
7202         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7203
7204 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7205
7206     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7207
7208 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7209
7210         * device/lib/Makefile.in: bad fix, reverted to 1.43
7211
7212 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7213
7214         * device/lib/Makefile.in: added missing z80 object files
7215
7216 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7217
7218         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7219         pic16 progress by Vangelis:
7220         * src/SDCCglobl.h:
7221         * src/SDCCmain.c:
7222         * src/pic/Makefile:
7223         * src/pic:
7224         * pic/Makefile:
7225         * pic16/device.c:
7226         * pic16/device.h:
7227         * pic16/gen.c:
7228         * pic16/gen.h:
7229         * pic16/genarith.c:
7230         * pic16/glue.c:
7231         * pic16/main.c:
7232         * pic16/pcode.c:
7233         * pic16/pcode.h:
7234         * pic16/pcodepeep.c:
7235         * pic16/peeph.def:
7236
7237 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7238
7239     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7240
7241 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7242
7243     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7244     added gbz80 build to MSVC project.
7245     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7246     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7247     from 8051 stuff and setup so it links using a .lnk file.
7248
7249 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7250
7251     * support/librarian/sdcclib.c: sdcc librarian.
7252     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7253     with sdcclib.
7254
7255 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7256
7257     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7258
7259 2003-07-02  Borut Razem <borut.razem AT siol.net>
7260
7261         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7262         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7263         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7264         src/xa51/main.c, src/z80/main.c:
7265         virtualization of glue() function: each port has it's own glue function,
7266         which is accessed by do_glue function pointer in PORT.general structure
7267
7268 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7269
7270         * DS800C400 fun, improved ROM interface and tinibios.
7271
7272 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7273
7274         * More support for DS80C400. Now includes beginning of interface to ROM.
7275
7276 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7277
7278         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7279
7280 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7281
7282         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7283
7284 2003-06-19  Borut Razem <borut.razem AT siol.net>
7285
7286         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7287
7288 2003-06-19  Borut Razem <borut.razem AT siol.net>
7289
7290         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7291         fixed Z80 port - crt0.o: cannot open.
7292
7293 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7294
7295         * support/Util/MySystem.c (merge_command): revert bad fix
7296
7297 2003-06-18  Borut Razem <borut.razem AT siol.net>
7298
7299         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7300
7301 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7302
7303         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7304         option --use-stdout sends errors to stdout instead of stderr.
7305
7306 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7307
7308         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7309
7310 2003-06-15  Borut Razem <borut.razem AT siol.net>
7311
7312         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7313         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7314         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7315         fixed width array of pointers replaced with sets;
7316         multiple include and lib paths ared transferred to preprocessor and linker
7317         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7318         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7319         fixed width array of pointers
7320         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7321         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7322         fixupPath(), getPathDifference()
7323         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7324         fixed width array of pointers
7325
7326 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7327
7328         * src/pic16/ralloc.c: fix warnings
7329         * src/pic16/pcode.c: fix warning
7330
7331 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7332
7333          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7334         know all the details, but essentially this set of changes enable
7335         the pic16 port to generate movff instructions and generate assembler
7336         directives,
7337         * src/SDCCmain.c:
7338         * src/pic16/gen.c:
7339         * src/pic16/glue.c:
7340         * src/pic16/pcode.c:
7341         * src/pic16/device.c:
7342         * src/pic16/main.c:
7343         * src/pic16/pcode.h:
7344         * src/pic16/pcoderegs.c:
7345         * src/pic16/ralloc.c:
7346         * src/pic16/ralloc.h:
7347
7348 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7349
7350         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7351         added option --vc, so sdcc errors and warnings are compatible with
7352         Microsoft Visual Studio.
7353
7354 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7355
7356         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7357           device/lib/libfloat.lib: added atof function.
7358
7359 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7360
7361         * doc/sdccman.lyx: updated to Lyx 1.3
7362         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7363         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7364         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7365
7366 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7367
7368         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7369
7370 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7371
7372         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7373           additions to the "related tools/documentation" section
7374
7375 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7376
7377         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7378
7379 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7380
7381         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7382         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7383
7384 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7385
7386         * doc/sdccman.lyx: fix double dash and other minor things
7387         * doc/Makefile: fix double dash
7388
7389 2003-05-28  Karl Bongers(patches from Martin Helmling)
7390         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7391           condition and ignore commands.
7392
7393 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7394
7395         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7396           is in parts still quite out of date, I did changes as far as I felt makes sense
7397           for a non-native english speaker.
7398           Please feel free to add to the manual or to correct my changes.
7399         * doc/Makefile: undid touching the date of intermediate tex files.
7400
7401 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7402
7403         * doc/sdccman.lyx: Manual has an index now
7404
7405 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7406
7407         Finalize muluint/mulsint and mululong/mulslong merging:
7408         * device/lib/_mulint.c
7409         * device/lib/_mullong.c
7410         * device/lib/gbz80/mul.s
7411         * device/lib/gbz80/stubs.s
7412         * device/lib/z80/mul.s
7413         * device/lib/z80/stubs.s
7414         * src/SDCCsymt.c (initCSupport)
7415
7416 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7417
7418         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7419         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7420           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7421           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7422           instead of /Zm500.
7423
7424 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7425
7426         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7427           the regression tests I'm not brave enough to enable 245.b, 245.c
7428         * doc/sdccman.lyx: added latex preamble for hyperref package.
7429           Using pdflatex this will give you a hyperlinked pdf file with
7430           bookmarks. (prepend '%' before /usepackage if this breaks something)
7431
7432 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7433
7434          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7435
7436 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7437
7438         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7439
7440 2003-05-21    <johan AT balder>
7441
7442         * src/SDCCglue.c (printIval): fixed bug #739934
7443
7444 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7445
7446         Applied patch from bug 737905 (renamed yylineo to mylineno):
7447         * src/altlex.c
7448         * src/SDCCast.c
7449         * src/SDCglobl.h
7450         * src/SDCC.lex
7451         * src/SDCCsymt.c
7452         * src/SDCCval.c
7453         * src/pic16/pcode.c: Cleaned warnings
7454         * src/pic16/pcodeflow.c: Cleaned warnings
7455         * src/pic16/pcoderegs.c: Cleaned warnings
7456
7457 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7458
7459         * src/pic16/pcode.c: Cleaned warnings
7460         * src/pic16/pcodepeep.c: Cleaned warnings
7461         * src/pic16/ralloc.c: Cleaned warnings
7462
7463 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7464
7465         * doc/sdccman.lyx: fixed bug 739745
7466         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7467
7468 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7469
7470         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7471         it can be defined with CFLAGS when running configure
7472         * src/SDCCmain.c: fixed compiling + linking with object files
7473
7474 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7475
7476         * configure.in: configure for pic16 port,
7477             added --disable-pic16-port
7478         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7479         * src/SDCCmain.c: linkOptions is changed to set *,
7480             added if/endif conditional macros to remove options help
7481             messages from optionsTable when a port is not configured, added
7482             support for the PIc16 port in the ports table, when executing
7483             the compiler with no port specified on command line, a default
7484             port is selected with the new macro DEFAULT_PORT which is
7485             defined in port.h, in setDefaultOptions() linkOptions is removed
7486             from initialization assignment, since now it is a set,
7487             parseCmdLine uses setParseWithComma for linkOptions, in
7488             linkEdit() linkOptions are accessed with new function indexSet()
7489             which returns the i'th item of a set variable. See SDCCset.c, in
7490             linkEdit() when calling buildCmdLine(), added linkOptions as
7491             last argument. Now users can pass arguments to gplink via the
7492             -Wl option, main() uses pic16glue() to glue up pic16 programs
7493         * src/SDCCpeeph.c: various changes to support pic16
7494         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7495             return the i'th item of the set
7496         * src/SDCCset.h: added function prototype for indexSet()
7497         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7498         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7499         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7500             added macro DEFAULT_PORT
7501         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7502         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7503             generated
7504         * src/pic16/glue.c: commented out some error producing lines
7505         * src/pic16/main.c: __config directives are commented out to stop
7506             gpasm complaining and test the linkage with gplink, _linkCmd and
7507             _asmCmd changed to be more gplink and gpasm friendly
7508         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7509             produced an error when parsed, peep rule 12 is added to utilize
7510             movff, but it is commented out since the pCode does not support
7511             yet a command with 2 address arguments
7512
7513 2003-05-18    <johan AT balder>
7514
7515         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7516         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7517 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7518
7519         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7520   Added feature to script commands from file.
7521
7522 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7523
7524         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7525         * src/SDCCutil.c: include ctype.h for win32
7526
7527 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7528
7529         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7530
7531 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7532
7533         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7534   Fixed so you can set breakpoints prior to run, run does not stop
7535   on entry now.  Add tbreak.  Other enhancements and fixes for use
7536   with ddd.
7537
7538 2003-05-12  Borut Razem <borut.razem AT siol.net>
7539
7540         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7541
7542 2003-05-11  Borut Razem <borut.razem AT siol.net>
7543
7544         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7545         the path of bin directory, so that PATH is the only env. variable, which has to be set
7546         in case of standard installation.
7547         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7548         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7549         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7550
7551 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7552
7553         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7554         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7555         temp files are in the port dir; clean the gen/test directory when
7556         generating new test.c
7557         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7558         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7559         * support/regression/tests/zeropad.c: added
7560
7561 2003-05-09    <johan AT balder>
7562
7563         * src/SDCCglue.c: fixed bug #597940
7564
7565 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7566
7567         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7568   cache sfr, optimize next,step, fix off by one sourceline,
7569   support ddd list function.
7570         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7571
7572 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7573
7574         * support/regression/HTMLgen.py: added compare_s2f()
7575         * support/regression/Makefile: redo 1.27
7576         * support/regression/generate-cases.py: redo 1.5
7577
7578 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7579
7580         * support/regression/tests/float.c: workaround 33 bit hex constant
7581         * support/regression/tests/simplefloat.c: fix division for host
7582
7583 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7584
7585         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7586         that tame's the PIC's over-aggressive optimizer.
7587
7588 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7589
7590          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7591          support for MSVC.
7592
7593 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7594
7595         Initial support for DS80C400. "Hello world" runs on TINIm400
7596         (with polled I/O).
7597
7598 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7599
7600          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7601          * Some notes on ddd usage added in debugger/README
7602          Martin Helmling adding more features and fixes for ddd GUI debugger.
7603          Code added for nexti, stepi, up, down, and other adjustments.
7604
7605 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7606
7607         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7608         * src/pic/peeph.def Added two rules to optimize carry manipulation
7609         * src/pic/* removed debug printfs
7610
7611 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7612
7613         * debugger/mcs51/cmd.c: added header newalloc.h
7614
7615 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7616
7617         * as/Makefile: new EXEEXT
7618         * as/z80/Makefile: remove trailing slash of BUILDIR
7619         * as/z80/clean.mk: new EXEEXT
7620         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7621         * support/cpp2/Makefile.in: new EXEEXT
7622         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7623
7624 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7625
7626         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7627         EXEEXT was introduced to fix all related problems with targets
7628         "clean", "install" and "uninstall"; a couple of further flaws
7629         especially with "clean" have been fixed too
7630         * as/mcs51/Makefile.in
7631         * as/mcs51/clean.mk
7632         * as/z80/Makefile
7633         * Makefile
7634         * clean.mk
7635         * debugger/mcs51/Makefile.in
7636         * debugger/mcs51/clean.mk
7637         * link/z80/Makefile
7638         * link/z80/Makefile.in
7639         * link/z80/clean.mk
7640         * link/Makefile
7641         * packihx/Makefile.in
7642         * packihx/clean.mk
7643         * sim/ucsim/Makefile
7644         * sim/ucsim/clean.mk
7645         * sim/ucsim/avr.src/Makefile.in
7646         * sim/ucsim/avr.src/clean.mk
7647         * sim/ucsim/s51.src/Makefile.in
7648         * sim/ucsim/s51.src/clean.mk
7649         * sim/ucsim/xa.src/Makefile.in
7650         * sim/ucsim/xa.src/clean.mk
7651         * sim/ucsim/z80.src/Makefile.in
7652         * sim/ucsim/z80.src/clean.mk
7653         * sim/ucsim/main_in.mk
7654         * sim/ucsim/packages_in.mk
7655         * sim/ucsim/gui.src/Makefile.in
7656         * sim/ucsim/gui.src/serio.src/Makefile.in
7657         * sim/ucsim/gui.src/serio.src/clean.mk
7658         * src/Makefile.in
7659         * src/clean.mk
7660         * support/cpp2/Makefile.in
7661         * support/cpp2/clean.mk
7662         * support/makebin/Makefile
7663         * support/makebin/clean.mk
7664         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7665         * doc/sdccman.lyx: --program-suffix no longer needed
7666
7667 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7668
7669          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7670          Martin Helmling added support for ddd GUI debugger.
7671          Code added to display assembly, set variables, and other commands
7672          to interface to ddd.
7673
7674 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7675
7676         * as/Makefile: fix target clean
7677         * as/clean.mk: fix target clean
7678         * as/z80/clean.mk: fix target clean
7679
7680 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7681
7682         * Makefile.common.in: added  AT EXEEXT AT
7683         * configure.in: removed all mingw32 stuff
7684         * configure: rebuilt from configure.in
7685         * doc/sdccman.lyx: updated section "installation"
7686         * support/scripts/sdcc_mingw32: adapted to configure
7687         * support/scripts/sdcc_cygwin_mingw32: added
7688
7689 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7690
7691         * src/pic Added object file support for the PIC port
7692         * src/pic Applied patch from Craig Franklin (this started the object file support)
7693         * src/regression Updated the PIC regression tests for object files
7694
7695 2003-04-20  Borut Razem <borut.razem AT siol.net>
7696
7697         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7698           lklex.c: In function `getfid':
7699           lklex.c:203: warning: array subscript has type `char'
7700         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7701           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7702         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7703           stack handling macros
7704
7705 2003-04-19  Borut Razem <borut.razem AT siol.net>
7706
7707         * "handling space characters in file path" task:
7708         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7709         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7710         * support/Util/MySystem.h: make it self-sufficient
7711         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7712           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7713           handling space characters in file path
7714         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7715           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7716         * support/Util/MySystem.c: handling space characters in executable's path
7717
7718 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7719
7720         * as/z80/Makefile: fix permanent rebuild of z80
7721         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7722         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7723
7724 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7725
7726         * src/SDCCopt.c: add special case optimization to replace modulo by
7727           a power of two with a bitwise AND.
7728
7729 2003-04-18    <johan AT balder>
7730
7731         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7732
7733 2003-04-17    <johan AT balder>
7734
7735         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7736         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7737
7738 2003-04-13  Borut Razem <borut.razem AT siol.net>
7739
7740         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7741         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7742           fixed mingw problem in adl_NORMALIZE_PATH
7743
7744 2003-04-12  Borut Razem <borut.razem AT siol.net>
7745
7746         * fixed "#pragma SAVE/RESTORE can not be nested":
7747         * src/SDCC.lex: reworked pragma handling functions
7748         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7749         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7750
7751 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7752
7753         * src/SDCCutil.c (pathEquivalent): defined but not used
7754         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7755         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7756         * configure: rebuilt from configure.in
7757         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7758         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7759         * device/include/Makefile.in: replace sdcc_datadir
7760         * device/lib/Makefile.in: replace sdcc_datadir
7761         * Makefile.common.in: add LDFLAGS from configure
7762         * packihx/Makefile.in: use LDFLAGS
7763         * src/Makefile.in: use LDFLAGS
7764         * support/cpp2/Makefile.in: add LDFLAGS from configure
7765         * support/makebin/Makefile: use LDFLAGS
7766         * .version: bumped version number to 2.3.5
7767
7768 2003-04-12  Borut Razem <borut.razem AT siol.net>
7769
7770         * completed "different paths" task:
7771         * src/SDCCmacro.c: fixed bug in handling quotes
7772         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7773         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7774
7775 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7776
7777         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7778
7779 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7780
7781         * ds390/gen.c ds390/peeph.def: fix bug 706781
7782
7783 2003-04-11  Borut Razem <borut.razem AT siol.net>
7784
7785         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7786
7787 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7788
7789         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7790         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7791          set - this bit used to not be set...).
7792         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7793           bad code in PIC Port
7794         * src/regression/and2.c added to test bug 609268
7795         * src/regression/Makefile added and2.c to regression test
7796
7797
7798 2003-04-08    <johan AT CP255758-A>
7799
7800         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7801         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7802         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7803
7804 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7805
7806         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7807         fix bug #487815
7808         * support/cpp2/Makefile.in: fix bug #487815
7809         * configure: rebuilt from configure.in
7810         * Makefile.common.in: docdir changed, new path suffixes
7811         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7812         * sdcc_vc_in.h: reflect changes from sdccconf.h
7813         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7814         * src/SDCCutil.h: remove BINDIR hack
7815         * doc/sdccman.lyx: update new path hierarchy
7816
7817 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7818
7819         * src/SDCCpeeph.c: added okToRemoveSLOC test
7820
7821 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7822
7823         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7824
7825 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7826
7827         * src/SDCCpeeph.c: added labelIsReturnOnly test
7828         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7829
7830 2003-04-05    <johan AT balder>
7831
7832         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7833         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7834         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7835         * src/SDCCast.c: fixed a warning
7836         * src/SDCCast.h: fixed a warning
7837         * src/SDCCicode.c (operandFromAst): fixed a warning
7838
7839 2003-04-04    <johan AT balder>
7840
7841         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7842         * src/SDCCast.c (decorateType): fixed bug #715076
7843         * src/SDCC.y: fixed bug #702907
7844
7845 2003-04-03    <johan AT balder>
7846
7847         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7848         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7849         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7850         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7851         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7852
7853 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7854
7855         * _decdptr.c: fix return values
7856         * _gptrget.c: fix return values
7857         * _gptrgetc.c: fix return values
7858         * _gptrput.c: fix return values
7859         * _mulint.c: fix return values
7860         * as/z80/Makefile: fix 'make -j' problem
7861
7862 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7863
7864         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7865         * configure.in: big cleanup, updated to autoconf 2.5x
7866         * configure: rebuilt from configure.in
7867         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7868         * sdcc_vc_in.h: reflect changes from sdccconf.h
7869         * doc/Makefile: fixed a flaw in "make install"
7870
7871 2003-04-02    <johan AT balder>
7872
7873         * src/ds390/gen.c (genCmp): no comments
7874         * src/mcs51/gen.c (genCmp): no comments
7875         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7876         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7877
7878 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7879
7880         * support/regression/generate-cases.py: place generated file in given sub directory
7881         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7882         * support/regression/Makefile: improvements for 'make -j';
7883         side effect: it's simpler and faster now
7884
7885 2003-03-31  Borut Razem <borut.razem AT siol.net>
7886
7887         * src/z80/main.c: link-{port} and as-{port} defined without path
7888         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7889
7890 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7891
7892         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7893
7894 2003-03-30  Borut Razem <borut.razem AT siol.net>
7895
7896         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7897           changed type of list parameter to set
7898         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7899         * src/port.h: changed type of do_assemble() parameter to set
7900         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7901           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7902           definition of "cppoutfilename" macro with NULL value in preProcess()
7903         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7904         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7905         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7906           replaced with set *binPathSet
7907         * shash_add() deallocates the item, if allready exsists, before adding the new one
7908         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7909
7910 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7911
7912         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7913           a nested for loop bug in the PIC port
7914         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7915           for loops
7916
7917 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7918
7919         * support/Util/dbuf.h: remove C++ stuff to make it portable
7920
7921 2003-03-28  Borut Razem <borut.razem AT siol.net>
7922
7923         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7924           literal strings in stringLiteral()
7925         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7926         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7927           to the project
7928
7929 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7930
7931         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7932
7933 2003-03-26    <johan AT balder>
7934
7935         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7936         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7937         * src/SDCCast.c (decorateType): fixed " -v < 3"
7938
7939 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7940
7941         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7942         Added Lenny Story's debug infrastructure changes:
7943         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7944         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7945         * src/cdbFile.c: added
7946         * src/SDCCdebug.c: added
7947         * src/SDCCdebug.h: added
7948         * src/SDCCast.c (createFunction)
7949         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7950         * src/SDCCmain.c (parseCmdLine, main)
7951         * src/SDCCmem.c (redoStackOffsets)
7952         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7953         * src/SDCCsymt.h
7954         * src/common.h
7955         * src/avr/gen.c (genAVRCode)
7956         * src/ds390/gen.c (gen390Code)
7957         * src/mcs51/gen.c (gen51Code)
7958         * src/pic/gen.c (genpic14Code)
7959         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7960         * src/xa51/gen.c (genXA51Code)
7961         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7962
7963 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7964
7965         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7966         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7967
7968 2003-03-22    <johan AT balder>
7969
7970         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7971
7972 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7973
7974         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7975         * doc/cdbfileformat.lyx: added, written by Lenny Story
7976         * doc/Makefile: added cdbfileformat.lyx
7977         * doc/clean.mk: added cdbfileformat.lyx
7978
7979 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7980
7981         * src/mcs51/peeph.def: fix bug #705773
7982
7983 2003-03-20    <johan AT balder>
7984
7985         An sfr/sbit can have an "at #" AND an initializer
7986         * src/SDCCsymt.c (checkSClass):
7987         * src/SDCCmem.c (allocGlobal):
7988         * src/SDCCmem.c (allocLocal):
7989         * src/SDCCast.c (createBlock):
7990
7991 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7992
7993         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7994
7995 2003-03-16    <johan AT balder>
7996
7997         Undid the hackup of const and volatile, the problem is much bigger
7998         * src/SDCC.y:1.65
7999         * src/SDCCast.c:1.171
8000         * src/SDCCglue.c:1.138
8001         * src/SDCCicode.c:1.146
8002         * src/SDCCsymt.c:1.150
8003         * src/SDCCval.c:1.65
8004
8005 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8006
8007         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8008         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8009
8010 2003-03-13    <johan AT balder>
8011
8012         Hackup const and volatile modifiers in type chains a bit:
8013         * src/SDCC.y:1.63
8014         * src/SDCCast.c:1.169
8015         * src/SDCCglue.c:1.136
8016         * src/SDCCicode.c:1.143
8017         * src/SDCCsymt.c1.146
8018         * src/SDCCsymt.h1.59
8019         * src/SDCCval.c:1.63
8020
8021 2003-03-12    <johan AT balder>
8022
8023         * src/SDCCBBlock.h: more LRH debugging junk
8024         * src/SDCCcflow.h: more LRH debugging junk
8025         * src/SDCCloop.c: more LRH debugging junk
8026         * src/SDCC.y (struct_declaration): fixed bug #697590
8027         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8028         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8029         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8030
8031 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8032         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8033         test function names must now match exactly).
8034         * src/SDCCcse.c: added special case in findCheaperOp to allow
8035         extending a short integer. Makes less awful code for bug 700121 test case.
8036
8037 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8038
8039         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8040         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8041
8042 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8043
8044         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8045         actually called (operandsNotEqual() was called for all
8046         operandsNotEqualX tests).
8047
8048 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8049
8050         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8051         with shorter literals. Fixes bug 700121.
8052
8053 2003-03-11    <johan AT balder>
8054
8055         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8056
8057 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8058
8059         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8060         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8061
8062 2003-03-10  Borut Razem <borut.razem AT siol.net>
8063
8064         * src/SDCCmain.c: pipe preprocessor's output
8065         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8066         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8067         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8068         which closes all pipes in pipeSet set
8069         * src/SDCCset.c: free deleted item in function deleteSetItem()
8070         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8071         moved from z80 to src subproject
8072         * .version: increased version number to 2.3.4
8073
8074 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8075
8076         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8077         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8078         * support/regression/ports/xa51/spec.mk: fix typo
8079
8080 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8081
8082         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8083
8084 2003-03-09  Borut Razem <borut.razem AT siol.net>
8085
8086         * src/SDCCmain.c: pipe preprocessor's output
8087         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8088         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8089         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8090         which closes all pipes in pipeSet set
8091         * src/SDCCset.c: free deleted item in function deleteSetItem()
8092         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8093         moved from z80 to src subproject
8094
8095 2003-03-09  Borut Razem <borut.razem AT siol.net>
8096
8097         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8098         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8099         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8100         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8101         * src/SDCCglobl.h: unification of WIN32 native definitions
8102
8103 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8104
8105         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8106
8107 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8108
8109         * src/configure.in:   check for endianess (even while cross-compiling)
8110         * src/configure:      check for endianess (even while cross-compiling)
8111         * src/configure_in.h: check for endianess (even while cross-compiling)
8112         * src/avr/gen.c:        remove old endianess stuff
8113         * src/mcs51/gen.c:      remove old endianess stuff
8114         * src/ds390/gen.c:      remove old endianess stuff
8115         * src/pic/gen.c:        remove old endianess stuff
8116         * src/pic/genarith.c:   remove old endianess stuff
8117         * src/pic/glue.c:       fix endianess check
8118         * src/pic16/gen.c:      remove old endianess stuff
8119         * src/pic16/genarith.c: remove old endianess stuff
8120         * src/pic16/glue.c:     fix endianess check
8121         * src/xa51/gen.c:       remove old endianess stuff
8122         * src/z80/gen.c:        fix endianess check
8123         * src/SDCCglue.c:       fix endianess check
8124         * src/ds390/peeph.def: fix bug 700036
8125
8126 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8127
8128         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8129         * src/configure: find appropriate data-types on host for SDCC's int and long
8130         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8131         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8132         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8133
8134 2003-03-07    <johan AT balder>
8135
8136         Just a big NOOP:
8137                 some minor cleanups before the big shot
8138                 OP_DEFS and OP_USES now use Kevin's protection
8139                 new option --nolabelopt
8140
8141         * src/SDCCBBlock.c:
8142         * src/SDCCast.c,:
8143         * src/SDCCcflow.c:
8144         * src/SDCCcse.c:
8145         * src/SDCCicode.c:
8146         * src/SDCCicode.h:
8147         * src/SDCClabel.c:
8148         * src/SDCCloop.c:
8149         * src/SDCCmain.c:
8150         * src/ds390/ralloc.c:
8151         * src/mcs51/ralloc.c:
8152         * src/pic/ralloc.c:
8153         * src/xa51/ralloc.c:
8154         * src/z80/ralloc.c:
8155
8156 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8157
8158         * src/pic/pcode.c (get_op): fix 64 bit warnings
8159         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8160         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8161         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8162         * support/regression/tests/malloc.c: fix 64 bit warnings
8163
8164 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8165
8166         * src/mcs51/gen.c (genMinus): fixed bug 696436
8167
8168 2003-03-02  Borut Razem <borut.razem AT siol.net>
8169
8170         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8171
8172 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8173
8174         * configure.in: test for mkstemp
8175         * sdccconf_in.h: add HAVE_MKSTEMP
8176
8177 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8178
8179         * device/include/ctype.h: removed warning while using --stack-auto
8180         * device/include/malloc.h: removed warning while using --stack-auto
8181         * device/include/string.h: removed warning while using --stack-auto
8182
8183 2003-02-23  Borut Razem <borut.razem AT siol.net>
8184
8185         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8186         because NDEBUG is defined (see man assert)
8187         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8188
8189 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8190
8191         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8192         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8193
8194 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8195
8196         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8197         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8198
8199 2003-02-18    <johan AT balder>
8200
8201         * as/mcs51/asmain.c (asmbl): module can start with a digit
8202         * as/z80/asmain.c (asmbl): module can start with a digit
8203
8204 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8205
8206         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8207         * src/asm.c: fix pipe() for Mingw32
8208
8209 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8210
8211         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8212         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8213         make -V work again; --c1mode reads now from stdin
8214         * doc/sdccman.lyx: added --c1mode
8215         * support/Util/SDCCerr.c: new messages for c1 mode
8216         * support/Util/SDCCerr.h: new messages for c1 mode
8217         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8218
8219 2003-02-15    <johan AT balder>
8220
8221         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8222
8223 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8224
8225         * doc/sdccman.lyx: Environment variables, -o and other minor things
8226
8227 2003-02-14    <johan AT balder>
8228
8229         * src/xa51/main.c: before anyone really tries to use it :)
8230
8231         * Install doc's in share/sdcc/doc
8232         * removed some obsolete files
8233         * Do a proper make distclean and uninstall
8234         M Makefile.common.in
8235         R sdccbuild.sh
8236         M as/Makefile
8237         M device/include/Makefile.in
8238         M device/lib/Makefile.in
8239         M doc/sdccman.lyx
8240         M link/Makefile
8241         M sim/ucsim/doc/Makefile.in
8242         M src/clean.mk
8243         R src/avr/peeph.rul
8244         R src/xa51/peeph.rul
8245         M support/cpp2/Makefile.in
8246         M support/makebin/Makefile
8247
8248
8249 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8250
8251         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8252
8253 2003-02-10  Borut Razem <borut.razem AT siol.net>
8254
8255         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8256         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8257         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8258         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8259         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8260         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8261         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8262         src/z80/Makefile.bcc: Borland Makefile cleanup
8263         * as/z80/Makefile.bcc: Added Borland Makefile
8264         * support/cpp2/borland.h: Removed
8265
8266 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8267
8268         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8269         * src/SDCC.lex: new pragma NOIV
8270         * src/SDCCglobl.h: new pragma NOIV
8271         * src/SDCCmem.c: new pragma NOIV
8272
8273 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8274
8275         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8276
8277 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8278
8279         * src/SDCCmain.c: signal handling is switched off by --debug
8280         * doc/Makefile: small fix for install; use clean.mk again
8281         * doc/clean.mk: clean *.pdf and *.html too
8282
8283 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8284
8285         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8286         * device/lib/printfl.c: fix a ds390 bug by making it portable
8287         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8288         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8289         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8290         * debugger/mcs51/cmd.c: converted multi-line string literals
8291         * sim/ucsim/globals.cc: converted multi-line string literals
8292         * src/SDCCmain.c: introduced signal handler to remove temp files
8293         * doc/Makefile: small tweaks, implement clean
8294         * doc: removed generated files
8295
8296 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8297
8298         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8299         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8300         Address Record is not correctly generated for DS390."
8301
8302 2003-02-02  Borut Razem <borut.razem AT siol.net>
8303
8304         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8305         * as/mcs51/asm.h: fixed compilation with Borland C
8306         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8307         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8308         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8309         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8310         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8311         src/z80/Makefile.bcc: delete $(LIB) only if exist
8312         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8313
8314 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8315
8316         * device/include/malloc.h: introduced NULL
8317         * device/include/string.h: introduced NULL
8318         * device/include/stdlib.h: introduced NULL
8319         * device/lib/_memcpy.c: removed NULL
8320         * device/lib/_strcat.c: removed NULL
8321         * device/lib/_strchr.c: removed NULL
8322         * device/lib/_strcmp.c: removed NULL
8323         * device/lib/_strcpy.c: removed NULL
8324         * device/lib/_strcspn.c: removed NULL
8325         * device/lib/_strlen.c: removed NULL
8326         * device/lib/_strncat.c: removed NULL
8327         * device/lib/_strncmp.c: removed NULL
8328         * device/lib/_strncpy.c: removed NULL
8329         * device/lib/_strpbrk.c: removed NULL
8330         * device/lib/_strrchr.c: removed NULL
8331         * device/lib/_strspn.c: removed NULL
8332         * device/lib/_strstr.c: removed NULL
8333         * device/lib/_strtok.c: removed NULL
8334         * device/lib/malloc.c: removed NULL, include own header
8335
8336 2003-02-02    <johan AT balder>
8337
8338         * 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
8339         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8340         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8341         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8342         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8343         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8344
8345 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8346
8347         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8348         area 'DATA'"
8349
8350 2003-02-01    <johan AT balder>
8351
8352         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8353
8354 2003-01-31    <johan AT CP255758-A>
8355
8356         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8357
8358 2003-01-30    <johan AT balder>
8359
8360         * src/SDCCBBlock.c: automatic bug detection
8361         * src/SDCCicode.c: automatic bug detection
8362
8363 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8364
8365         * src/SDCCglobl.h:   now --xram-size 0 works
8366         * src/SDCCmain.c:    now --xram-size 0 works
8367
8368 2003-01-29    <johan AT balder>
8369
8370         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8371
8372 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8373
8374         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8375         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8376         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8377         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8378         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8379         * src/SDCCmain.c:    Added options --xram-size and --code-size
8380
8381 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8382
8383         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8384         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8385
8386 2003-01-27    <johan AT balder>
8387
8388         * src/SDCC.y: fixed bug #613764
8389
8390 2003-01-26    <johan AT balder>
8391
8392         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8393         * src/SDCCsymt.h: fixed bug #673374
8394         * src/SDCCglue.c: fixed bug #661910
8395         * src/SDCCast.c: fixed bug #458099 and 673374
8396
8397 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8398
8399         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8400         * as/mcs51/strcmpi.h: added
8401         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8402         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8403         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8404         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8405         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8406         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8407         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8408         * as/mcs51/Makefile.aslink: new module strcmpi
8409         * as/mcs51/Makefile.asx8051: new module strcmpi
8410         * as/mcs51/Makefil.bcc: new module strcmpi
8411         * as/mcs51/Makefile.in: new module strcmpi
8412         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8413
8414 2003-01-26    <johan AT balder>
8415
8416         * src/SDCCglue.c: reverted back to 1.124
8417         * src/SDCCast.c: reverted back to 1.156
8418         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8419
8420 2003-01-25    <johan AT balder>
8421
8422         * src/SDCCglue.c: A better fix for bug #661910
8423         * src/SDCCast.c: A better fix for bug #661910
8424         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8425
8426 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8427
8428         * src/Makefile.in: remove spawn.o
8429         * src/SDCCmain.c: remove spawn.h
8430         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8431         * src/spawn.c: removed
8432         * src/spawn.h: removed
8433         * support/regression/ports/ds390/spec.mk: link with -r
8434
8435 2003-01-24    <johan AT CP255758-A>
8436
8437         * src/ds390/gen.c (aopOp): fixed bug #667458
8438         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8439         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8440         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8441
8442 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8443
8444         * src/mcs51/peeph.def: better assembler identation by Frieder
8445         * src/mcs51/gen.c: better assembler identation by Frieder
8446
8447 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8448
8449         * as/z80/string.h: removed for gcc 3.2
8450         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8451         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8452
8453 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8454
8455         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8456         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8457         * support/regression/Makefile: separate temp files for ports
8458         * support/regression/generate-cases.py: separate temp files for ports
8459         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8460         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8461
8462 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8463
8464         * moved tinitalk to device/examples/ds390
8465
8466 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8467
8468         * as/mcs51/lkmem.c: rflag is for DS390
8469         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8470         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8471                          (linkEdit): move mem- and map-files the same way as ihx-files
8472         * src/z80/main.c (_setDefaultOptions): removed --generic
8473         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8474         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8475         * src/pic/glue.c (picglue): --c1mode works again
8476         * src/pic16/glue.c (pic16glue): --c1mode works again
8477         * src/asm.c (printCLine): fix #660034
8478
8479 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8480
8481         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8482         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8483         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8484         * as/mcs51/lkmem (summary): better fix for sp problem
8485         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8486         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8487         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8488                                               remove --stack-after-data
8489
8490 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8491
8492         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8493         * src/SDCCutil.c (join): ugly bug: missing '\0'
8494         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8495
8496 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8497
8498         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8499         * src/port.h: typo
8500         * src/pic/main.c (_asmCmd): gpasm supports -o
8501         * src/z80/main.c: more general macros
8502         * device/lib/Makefile.in: remove intermediate files
8503
8504 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8505
8506         * .version: Bumped version number to 2.3.3
8507         * src/SDCCBBlock.c: new option -o
8508         * src/SDCCglobl.h: new option -o
8509         * src/SDCCglue.c: new option -o
8510         * src/SDCCmain.c: new option -o
8511         * src/asm.c: new option -o
8512         * src/ds390/main.c: new option -o
8513         * src/pic/glue.c: new option -o
8514         * src/pic/pcode.c: new option -o
8515         * src/pic/ralloc.c: new option -o
8516         * src/pic16/glue.c: new option -o
8517         * src/pic16/pcode.c: new option -o
8518         * src/pic16/ralloc.c: new option -o
8519         * src/z80/main.c: new option -o
8520         * device/lib/Makefile.in: use -o
8521         * support/regression/ports/ds390/spec.mk: use -o
8522         * support/regression/ports/gbz80/spec.mk: use -o
8523         * support/regression/ports/mcs51/spec.mk: use -o
8524         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8525         * support/regression/ports/z80/spec.mk: use -o
8526         * support/regression/ports/ucz80/spec.mk: use -o
8527         * support/regression/ports/xa51/spec.mk: use -o
8528         * support/regression/fwk/lib/timeout.c: fix usage string
8529
8530 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8531         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8532
8533 2003-01-07    <johan AT balder>
8534
8535         * src/SDCCast.c (decorateType): fixed bug #600035
8536
8537 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8538         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8539         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8540         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8541         * src/pic/pcode.c: outcommented unused variable to remove warnings
8542         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8543
8544 2003-01-06    <karl AT turbobit.com>
8545         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8546    regression tests.
8547
8548 2003-01-06    <johan AT balder>
8549
8550         * src/SDCCicode.c: fixed array add
8551
8552 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8553         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8554         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8555
8556 2003-01-04    <johan AT balder>
8557
8558         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8559
8560 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8561         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8562
8563 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8564         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8565         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8566
8567 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8568         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8569
8570 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8571         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8572
8573 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8574         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8575
8576 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8577
8578     * in \sdcc\as\mcs51\ changed these files in order to create an
8579     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8580     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8581     following files to include the previous two files: aslink.dsp,
8582     Makefile.aslink, Makefile.bcc, and Makefile.in.
8583
8584     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8585     .adb instead of .cdb
8586
8587 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8588
8589         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8590         value from option --iram-size.
8591
8592 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8593
8594         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8595         dram[] array.
8596
8597 2002-09-18    <wiml AT hhhh.org>
8598
8599         * SDCClrange.h: exposed setFromRange() and setToRange()
8600         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8601           packRegsForAccUse() (bug 542397)
8602         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8603           multiple times and emitting the fetch operations more than once
8604           added aopGetUsesAcc() function to allow binary operators to
8605           fetch their operands in the correct order; made genMinus() emit
8606           compact code for X = LITERAL - Y
8607
8608 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8609         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8610         sprintf() in line 1267.
8611
8612 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8613         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8614         like ports.
8615
8616 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8617         Changes to aslink (All the changes are marked with 'JCF'):
8618
8619         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8620         summary().
8621
8622         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8623         area BSEG.  Also moves, if possible, the DATA area down into the internal
8624         ram so more space is available.
8625
8626         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8627         sflag.
8628
8629         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8630         not bytes.  Function summary() which creates a memory usage summary
8631         file with extension .mem.  Reports of overlaping stack and small stack
8632         size.  If the space for the stack is less than 16 bytes aslink trows a
8633         warning.
8634
8635         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8636         the 8051.  Option 'y' for memory summary output file.
8637
8638         Changes to sdcc (All the changes are marked with 'JCF'):
8639
8640         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8641
8642         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8643         overlaying area for it (uses RegBankUsed[4]).
8644
8645         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8646         bank zero as used by default.  By default aslink locates the stack
8647         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8648         the creation of the .mem file.  Delegates the allocation of data area
8649         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8650         the begining of the stack area to aslink.
8651
8652         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8653         glue() in SDCCglue.c creates an area for it.
8654
8655 2002-09-03  Borut Razem <borut.razem AT siol.net>
8656         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8657         sdcc/src/pic/glue.c:
8658         introduced atexit() handler for teporay files removal in case of
8659         errors, assertions, ...
8660
8661 2002-08-29  Borut Razem <borut.razem AT siol.net>
8662         * sdcc/support/cpp2/auto-host_vc_in.h:
8663         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8664         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8665         Maybe there is a similar problem with BORLANDC? It should be checked!
8666
8667         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8668         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8669         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8670         was not executed, and the compiler (cl) launched a warning:
8671         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8672
8673 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8674         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8675
8676 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8677         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8678
8679         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8680           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8681           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8682           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8683           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8684           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8685           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8686         - added Release configuration in VS projects
8687         - review of compiler an linker options
8688         - VC .exe files are generated in bin_vc directory, not to interfere
8689           with binaries generated from other projects (cygwin, mingw, bcc ...)
8690
8691         * sdcc/src/yacc.dsp: added
8692
8693         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8694         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8695         and insert the version number definitions from .version
8696
8697         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8698
8699         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8700         added - genarate auto-host.h using auto-host_vc_in.h as template
8701
8702         * sdcc/sdcc_vc.h,
8703         removed from CVS, generated automatically
8704
8705 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8706         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8707
8708 2002-08-11  Borut Razem <borut.razem AT siol.net>
8709         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8710
8711 2002-08-10  Borut Razem <borut.razem AT siol.net>
8712         * src/SDCCmain.c (main):
8713         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8714         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8715         The consequence was that some temporary files were not removed.
8716
8717         * src/SDCCglue.c:
8718         unification of code in functions tempfilename() and tempfile():
8719         function tempnam() is defined in Visual Studio 6.0 and .NET
8720
8721         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8722
8723         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8724           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8725         - removed compiler command line option /WX: Treats all warnings as errors
8726         - update a list of source files, included into the project
8727
8728         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8729           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8730         changed project type to Generic Project so that can be correcly converted to VS.NET project
8731
8732         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8733
8734         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8735
8736         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8737
8738         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8739         added return 0 statements after assert() to make compiler happy
8740
8741         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8742         added newline in the def file to keep MSC compiler satisfied
8743
8744         * sdcc/src/z80/gen.c:
8745         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8746           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8747         - solved MSC error in function aopDump()
8748
8749         * sdcc_vc.h: define PREFIX as "\\sdcc"
8750
8751 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8752         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8753
8754 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8755         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8756         - Rewrote the register banking algorithm.
8757         - Added pCode live-range analysis to registers (for now, only non-used and
8758         singly-used registers optimized away)
8759
8760         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8761
8762         * 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.
8763
8764 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8765         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8766
8767 2002-04-22  Michael Hope  <michaelh AT vroom>
8768
8769         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8770
8771         * configure.in (DD_COPT): Added include support required for gbdk.
8772
8773         * .version: Bumped version number just to increase it.
8774
8775         * src/SDCCmain.c: Added -nostdinc to the default options.
8776
8777 2002-04-15  Michael Hope  <michaelh AT vroom>
8778
8779         * device/lib/z80/printf.c (sprintf): Added.
8780
8781         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8782
8783         * src/z80/peeph.def: Added transpose redundent load rule.
8784
8785         * src/z80/main.c: Added force callee saves for jaune.
8786
8787         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8788
8789         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8790
8791 2002-03-28  Johan Knol  <johan AT balder>
8792
8793         * src/SDCCval.c: fixed bug #532436
8794
8795 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8796         * /src/port.h:
8797         Added "char *Processor" field to the port structure.
8798
8799         * /src/SDCCmain.c:
8800         Added -p option. Allows port dependent processor to be specified.
8801
8802         * all ports:
8803         Initialized the new field char *Processor field to NULL in all ports
8804
8805         * /src/pic/*:
8806         Compiler generated registers for interrupt context saving
8807         were not getting allocated.
8808
8809 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8810
8811         * /src/SDCCast.c:
8812         Fixed left shift. Will promote the left side of a left shift
8813         if a) left shifting more than size of operand or b) when assigned
8814         to something size > size of left side
8815
8816 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8817         * src/pic/*
8818         tons of changes. Register allocation has been
8819         rewritten. Added customization for the various PICs. Flow
8820         analysis is restructured. ...
8821
8822         * src/pic/device.h:
8823         Added
8824
8825         * src/pic/device.c:
8826         Added. device.c is a PIC port hack to accomodate variations
8827         in PIC devices.
8828
8829 2002-03-13  Michael Hope  <michaelh AT vroom>
8830
8831         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8832
8833 2002-03-04  johanknol  <johanknol AT manik>
8834
8835         * /src/SDCCval.c: fixed
8836
8837         const unsigned char arr[][2] = { { 0, 1 } };
8838         t18.c:1: error: Initializer element is not constant
8839
8840 2002-03-04  bela  <bela AT manik>
8841
8842         * /device/include/mcs51reg.h:
8843         ds89c420 register definition update
8844
8845 2002-03-03    <johan AT FRIJA>
8846
8847         * support/Util/SDCCerr.c: did something, but don't no why anymore
8848
8849         * support/regression/tests/bug-524691.c: made it a little less shy
8850
8851         * src/SDCCast.c (decorateType): fixed bug #524697
8852
8853         * src/SDCCast.c: made some lineno improvements
8854
8855         * src/SDCCval.c (getNelements): changed warning to error
8856
8857         * src/SDCCglue.c (printIvalArray): changed warning to error
8858
8859         * src/SDCCicode.c: fixed a warning for mingw
8860
8861         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8862
8863         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8864
8865 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8866
8867         * src/ds390/peeph.def:
8868         Added some more peephole rules
8869
8870         * src/ds390/gen.c: Various fixes & enhancements
8871
8872         * src/SDCClrange.c, src/SDCClrange.h:
8873         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8874
8875         * src/ds390/ralloc.c:
8876         various fixes & enhancements (ds390) specific
8877
8878         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8879         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8880         from rallocs.
8881
8882         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8883
8884 2002-03-02    <johan AT FRIJA>
8885
8886         * src/SDCCast.c (decorateType): fixed bug #524708
8887
8888         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8889
8890         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8891
8892 2002-03-01  Michael Hope  <michaelh AT vroom>
8893
8894         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8895
8896         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8897
8898 2002-03-01    <johan AT FRIJA>
8899
8900         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8901
8902         * src/SDCCast.c (decorateType): fixed bug #524209
8903
8904         * src/SDCCval.c (valNot): fixed bug #524195
8905
8906 2002-02-26    <johan AT balder>
8907
8908         * src/xa51/gen.c: fixed a warning
8909
8910         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8911
8912         * src/SDCCast.c (decorateType): fixed bug #522534
8913
8914 2002-02-23    <johan AT balder>
8915
8916         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8917
8918 2002-02-22    <johan AT balder>
8919
8920         * src/SDCCast.c: fixed bug #514865
8921
8922         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8923
8924 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8925
8926         * sdcc/src/SDCCloop.c:
8927         Previous fix was not good. basic blocks that have "break" or "return" are
8928         not really partof a loop , but live ranges used in these blocks should
8929         be live thru the entire loop, so set partOfLoop but don't add them to
8930         loop region
8931
8932 2002-02-21    <johan AT FRIJA>
8933
8934         * src/SDCCcse.c: fixed bug #514308
8935
8936 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8937
8938         * src/SDCCloop.c:
8939         Fixed BUG #519583. If a conditional block ended in a return/break
8940         statement inside a loop, it was not being considered part of the loop.
8941
8942         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8943
8944 2002-02-10  Karl Bongers <karl AT turbobit.com>
8945
8946         * debugger/*:
8947         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8948         with lots of comments and notes.
8949
8950         * device/examples/test2.c:
8951         Fix bug, "red" variable not being initialized(compiler complained).
8952
8953         * device/examples/Makefile, examples/test3.c:
8954         Add Makefile in device/examples folder, compiles test3.c
8955         for use as a multiple module SDCDB test case.
8956
8957         * sim/ucsim/cmd.src/cmdset.cc:
8958         Took out debug printfs in ucsim "next" command.
8959
8960         * sim/ucsim/xa.src:
8961         Karl and Johan start ucsim XA support.  Most dissassembly working,
8962         about 75% emulation done(plenty of work remaining).
8963
8964         * sim/ucsim/z80.src:
8965         Add Z80 support to ucsim, add test-ucz80 regression test,
8966         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8967         Notice z80 compiler fails on examples/test3.c/crc code.
8968
8969 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8970
8971         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8972         Added support for --parms-in-bank1
8973
8974         * src/ds390/peeph.def:
8975         added a few more peephole optimzations
8976
8977         * src/ds390/main.c:
8978         1) added __builtin_inp & __builtin_outp used to read in data of given length
8979            from a memory mapped port
8980         2) added __builtin_memcmp
8981         3) added __builtin_swapw swap bytes of a short
8982
8983         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8984         1) handle multiple send & receives from register bank1
8985         2) ralloc can now allocate DPTR1 to some liveRanges
8986
8987         * src/SDCCsymt.c, src/SDCCsymt.h:
8988         changes to handle multiple sends & receives
8989
8990         * src/SDCCptropt.h:
8991         added some pointer arithmetic optimization
8992
8993         * src/SDCCptropt.c:
8994         added some pointer arithmetic optimizations but not stable yet so not
8995         called from anywhere (will get this working shortly)
8996
8997         * src/SDCCopt.c: fixed for multiple sends & receives
8998
8999         * src/SDCCmain.c:
9000         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9001         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9002            set preprocessor defines (depending on options)
9003
9004         * src/SDCCicode.c, src/SDCCicode.h:
9005         changes made to handle multiple sends & receives
9006
9007         * src/SDCCglobl.h:
9008         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9009
9010         * src/SDCCcse.c, src/SDCCcse.h:
9011         added function findbackward def (to be used in upcoming optimization)
9012
9013         * src/SDCCcflow.c, src/SDCCcflow.h:
9014         added function returnAtEnd - to determine if a basic block terminates with
9015         a RETURN iCode
9016
9017         * src/SDCCast.c, src/SDCCast.h:
9018         added option parms-in-bank1
9019
9020         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9021         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9022         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9023         adjusted for --parms-in-bank1 option
9024
9025         * device/include/string.h:
9026         donot redefine "reentrant" keyword
9027
9028         * device/include/ds80c390.h: Added some more SFRs
9029
9030 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9031
9032         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9033
9034 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9035
9036         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9037
9038 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9039
9040         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9041
9042 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9043
9044         * Added --xram-movc option
9045
9046 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9047
9048         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9049
9050 2002-01-11  Johan Knol
9051
9052         * Added math lib of Jesus Calvino-Fraga
9053
9054 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9055
9056         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9057         * support/regression/Makefile: new target test-mcs51-stack-auto
9058         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9059
9060 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9061
9062         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9063
9064 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9065
9066         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9067
9068 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9069
9070         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9071
9072         * src/SDCCglue.h: add definition for printIvalChar()
9073
9074 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9075
9076         * src/SDCCast.c: fix #498138 by Johan
9077
9078         * src/SDCCglue.c: fix #498138 by Johan
9079
9080 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9081
9082         * support/regression/Makefile: fix clean
9083
9084         * support/regression/ports/ds390/support.c: fix transmission of last character
9085
9086 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9087
9088         * /sdcc/src/ds390/gen.c:
9089         a) improved computing address of stack variable
9090         b) took out some #if 0 code
9091         c) improved parmBytes adjustment
9092         d) improved genPlusIncr & genMinusIncr
9093         e) genCmp could generate bad code (when left assigned to DPTR)
9094         f) Fixed bug in hasInc
9095
9096         * /sdcc/src/ds390/ralloc.c:
9097         a) packRegsForSupport could mess up live information (Fixed)
9098         b) packRegsDPTRuse could be incorrect for left & right shift
9099
9100         * /sdcc/src/mcs51/ralloc.c:
9101         packRegsForSupport could mess up the live information (Fixed)
9102
9103         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9104
9105         * /sdcc/src/SDCCast.c:
9106         can reverse a loop even if function call is present as long
9107         as the loop control variable is local & is not passed as parameter
9108
9109 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9110
9111         * /sdcc/ChangeLog: *** empty log message ***
9112
9113         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9114         More builtin function additions for TININative
9115
9116         * /sdcc/src/ds390/ralloc.c:
9117         Had broken the regression testsuite
9118
9119         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9120
9121         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9122         Added funcattr hasStackParms will be set for reentrant functions when there
9123         are paramteres on the stack, this helps in minimizing frame pointer generation
9124         typeFromStr can handle function pointers now
9125
9126         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9127         *** empty log message ***
9128
9129 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9130
9131         * /src/ds390/gen.c, /src/ds390/main.c:
9132         More builtin function additions for TININative
9133
9134         * /src/ds390/ralloc.c:
9135         Had broken the regression testsuite
9136
9137         * /src/SDCCast.c: Fixed a bug in dumptree
9138
9139         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9140         Added funcattr hasStackParms will be set for reentrant functions when there
9141         are paramteres on the stack, this helps in minimizing frame pointer generation
9142         typeFromStr can handle function pointers now
9143
9144         * /doc/builtins.txt, /doc/TININative.txt:
9145         *** empty log message ***
9146
9147
9148 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9149
9150         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9151         ALPHA version for -mTININative
9152
9153         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9154         updated to reflect changes in the port structure
9155
9156         * /src/port.h:
9157         added function do_assemble (similar to do_link) if non-null this function
9158         will be called to do assembly (-mTININative) requires a multi command
9159         assembly
9160         added function genAssemblerEnd will be called to generate assembler Epilogue
9161
9162         * /src/SDCCsymt.c:
9163         added _JavaNative to debug info printing
9164
9165         * /src/SDCCmain.c: added option --tini-libid
9166         added port->do_assemble function (-mTININative) has a multi command assemble
9167
9168         * /src/SDCCglue.c: Disabled "constExpr" check
9169         added port->genAssemblerEnd function
9170
9171         * /src/SDCCglobl.h: Added option --tini-libid value
9172
9173         * /src/SDCCast.h:
9174         tookout optimizeCompare from the header (has no external references)
9175
9176         * /src/SDCCast.c: made one more function "static"
9177
9178 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9179
9180         * src/z80/mappings.i: Added z80asm support.
9181
9182         * src/z80/main.c: Added z80asm support on --asm=z80asm
9183
9184         * src/z80/gen.c: Fixed asm portability issues.
9185
9186         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9187
9188         * src/SDCCglue.c (printExterns): Added global/extern split.
9189
9190 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9191
9192         * support/regression/Makefile: added test for mcs51 model large
9193
9194         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9195
9196         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9197
9198 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9199
9200         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9201
9202 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9203
9204         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9205
9206         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9207
9208 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9209
9210         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9211
9212         * support/regression/tests/simplefloat.c: Port to mcs51.
9213
9214 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9215         * support/regression/tests/bug-485362.c: Added.
9216
9217         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9218
9219         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9220
9221         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9222
9223         * src/z80/gen.c (aopDump): Added a dump function.
9224
9225 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9226         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9227
9228         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9229
9230         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9231
9232         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9233
9234         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9235
9236         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9237
9238         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9239
9240         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9241
9242         * support/regression/ports/ds390/support.c: Use tinibios.
9243
9244         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9245
9246 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9247
9248         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9249         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9250
9251         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9252
9253         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9254
9255 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9256
9257         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9258
9259         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9260         (packRegsForIYUse): Created and optimised.
9261
9262 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9263
9264         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9265 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9266
9267         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9268
9269         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9270
9271         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9272
9273 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9274
9275         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9276
9277         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9278
9279 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9280
9281         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9282
9283         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9284
9285         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9286
9287 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9288
9289         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9290         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9291         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9292
9293         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9294
9295         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9296         (genNotFloat): Added.
9297         (genUminusFloat): Added.
9298
9299         * device/lib/z80/Makefile: Added floating pt stubs.
9300
9301         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9302
9303         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9304
9305         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9306
9307 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9308
9309         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9310
9311         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9312
9313         * sdcc/support/regression/Makefile: Add port ds390.
9314
9315         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9316
9317         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9318
9319         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9320
9321         * sdcc/support/regression/ports/ds390/support.c: Added.
9322
9323         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9324
9325         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9326
9327         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9328
9329 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9330
9331         * device/include/malloc.h: Added z80 and gbz80 support.
9332
9333         * device/lib/gbz80/heap.s: Added.
9334
9335         * device/lib/z80/heap.s: Added.
9336
9337         * device/lib/malloc.c: Added z80 and gbz80 support.
9338
9339         * support/regression/tests/malloc.c (testMalloc): Added.
9340
9341         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9342
9343         * support/regression/tests/bug-478094.c: Added.
9344
9345         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9346
9347 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9348
9349         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9350
9351         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9352
9353         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9354
9355         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9356
9357         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9358
9359 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9360
9361         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9362
9363 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9364
9365         * support/regression/tests/bug-477927.c: Added.
9366
9367         * src/z80/peeph.def: Added minor rules.
9368
9369         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9370
9371         * src/z80/peeph.def: Added jump optimisation modification.
9372
9373 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9374
9375         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9376
9377 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9378
9379         * support/regression/tests/funptrs.c: Added.
9380
9381 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9382
9383         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9384
9385 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9386
9387         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9388
9389         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9390
9391         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9392         (movLeft2ResultLong): Created.
9393
9394         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9395         (joinPushes): Added.  Joins two char pushes into a word push.
9396
9397 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9398
9399         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9400
9401         * support/makebin/Makefile (install): Added creation of dest dir.
9402
9403 2001-10-24 Karl Bongers <karl AT turbobit.com>
9404
9405         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9406
9407 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9408
9409         * src/z80/ralloc.c: Turned off faulty pack for one use.
9410
9411         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9412
9413         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9414
9415 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9416
9417         * support/regression/Makefile: Improved clean
9418
9419         * support/regression/ports/gbz80/spec.mk: Added clean
9420
9421         * support/regression/ports/host/spec.mk: Added clean
9422
9423         * support/regression/ports/z80/spec.mk: Added clean
9424
9425         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9426
9427         * support/regression/ports/mcs51/timeout.c: little improvements
9428
9429 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9430
9431         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9432
9433         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9434
9435         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9436
9437 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9438
9439         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9440
9441         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9442
9443 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9444         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9445
9446         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9447
9448         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9449
9450         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9451
9452         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9453
9454         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9455
9456         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9457
9458         * support/regression/tests/longor.c: Added.
9459
9460 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9461
9462         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9463
9464         * as/mcs51/aslink.h: define PATH_MAX
9465
9466         * as/mcs51/asm.h: define PATH_MAX
9467
9468         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9469
9470         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9471
9472         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9473
9474         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9475
9476         * src/SDCCglobl.h: define PATH_MAX
9477
9478         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9479
9480         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9481
9482 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9483
9484         * src/z80/gen.c (gencjneshort): Fixed
9485
9486         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9487
9488 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9489
9490         * support/regression/tests/bug-469671.c: Added.
9491
9492         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9493
9494 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9495
9496         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9497
9498         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9499
9500 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9501
9502         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9503
9504         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9505
9506         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9507
9508         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9509
9510         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9511
9512         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9513
9514         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9515
9516 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9517
9518         * 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.
9519
9520         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9521
9522         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9523
9524 2001-10-07    <johan AT FRIJA>
9525
9526         * device/lib/gets.c (gets): fixed the return value.
9527
9528 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9529         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9530
9531         * 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.
9532
9533         * 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.
9534
9535         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9536
9537         * src/pic/gen.c: Removed Safe_strdup.
9538
9539         * configure.in: Added option to enable libgc support.
9540
9541         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9542         (bitVectUnion): Optimised.
9543         (bitVectIntersect): Optimised.
9544         (bitVectBitsInCommon): Optimised.
9545         (bitVectCplAnd): Optimised.
9546
9547         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9548
9549 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9550
9551         * src/SDCCmain.c: distinguish between assembler debug and plain options
9552
9553         * src/avr/main.c:   remove standard assembler options
9554
9555         * src/ds390/main.c: remove standard assembler options
9556
9557         * src/mcs51/main.c: remove standard assembler options
9558
9559         * src/port.h: removed "PENDING" comment
9560
9561 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9562
9563         * src/device/lib/_mulint.c  : new, with assember functions
9564
9565         * src/device/lib/_mullong.c : new, with assember functions
9566
9567         * src/device/lib/_divuint.c : with assember functions
9568
9569         * src/device/lib/_divsint.c : with assember functions
9570
9571         * src/device/lib/_divulong.c: with assember functions
9572
9573         * src/device/lib/_divslong.c: with assember functions
9574
9575         * src/device/lib/_moduint.c : with assember functions
9576
9577         * src/device/lib/_modsint.c : with assember functions
9578
9579         * src/device/lib/_modulong.c: with assember functions
9580
9581         * src/device/lib/_modslong.c: with assember functions
9582
9583         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9584
9585         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9586
9587         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9588                                       replaced _mululong.c and _mulslong.c by _mullong.c
9589
9590 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9591
9592         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9593
9594 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9595
9596         * src/SDCCglue.c: test, if win32api is available for MINGW
9597
9598 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9599
9600         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9601         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9602         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9603         * support/regression/ports/host/spec.mk: removed GENERIC
9604         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9605         * support/regression/ports/z80/spec.mk: removed GENERIC
9606
9607 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9608
9609         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9610
9611         * support/regression/tests/bug-467035.c: Created.
9612
9613 2001-10-01    <johan AT FRIJA>
9614
9615         * src/SDCC.y: fixed bug #466586 part 1
9616
9617 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9618
9619         * SDCCicode.c: z80 has no generic pointers
9620         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9621
9622 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9623
9624         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9625
9626 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9627
9628         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9629
9630         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9631
9632 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9633
9634         * configure.in: Fixed up so that ucsim is only configured once.
9635
9636         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9637
9638         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9639         (getPathDifference): As above.
9640
9641         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9642
9643         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9644
9645 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9646         * .version: Updated to 2.3.1
9647
9648         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9649         Added copyright header.
9650
9651         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9652         (assemble): Added support for macro based assembler commands.
9653         (linkEdit): Added support for macro based linker commands.
9654         (preProcess): Changed the pre-processor to use macros.
9655         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9656         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9657
9658         * device/lib/z80/crt0.s: Added module name for debugging.
9659
9660 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9661
9662         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9663
9664         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9665
9666         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9667
9668         * src/Makefile.in: Added SDCCmacro and SDCCutil
9669
9670 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9671
9672         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9673
9674 2001-09-16    <johan AT FRIJA>
9675
9676         * 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.
9677
9678 2001-09-15    <johan AT FRIJA>
9679
9680         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9681         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9682
9683 2001-09-11    <johan AT FRIJA>
9684
9685         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9686
9687 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9688
9689         * support/regression/tests/bug-460444.c: Added test case.
9690
9691         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9692         (genCast): Added justification for all of the asserts.
9693
9694 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9695
9696         * support/regression/support.c: _xdata replaced by xdata
9697
9698         * support/regression/spec.mk: removed _generic
9699
9700 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9701
9702         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9703
9704         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9705         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9706
9707         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9708
9709         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9710
9711         * support/regression/tests/bug-460010.c: Added test case.
9712
9713         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9714
9715 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9716
9717         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9718
9719         * support/regression/testfwk.c: removed workaround for bug #436344
9720
9721         * support/regression/tests/bp.c: use less memory with mcs51
9722
9723         * support/regression/tests/bug-441448.c: use less memory
9724
9725         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9726
9727         * support/regression/collate-results.py: typo
9728
9729 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9730
9731         * support/regression/tests/fetchoverlap.c: Added new test case.
9732
9733         * support/regression/tests/bp.c: Added new test case.
9734
9735         * support/regression/tests/bug-448984.c: Added new test case.
9736
9737         * support/regression/tests/pow2shifts.c: Added new test case.
9738
9739         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9740         (genlshTwo): Fixed right shift for count > 8.
9741
9742         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9743
9744 2001-09-08    <johan AT FRIJA>
9745
9746         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9747
9748 2001-09-07    <johan AT FRIJA>
9749
9750         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9751
9752         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9753
9754 2001-09-06    <johan AT FRIJA>
9755
9756         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9757         * bernhard noted me at this: "() equals to (void)" (1.38)
9758
9759 2001-09-05    <johan AT FRIJA>
9760
9761         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9762
9763 2001-09-04    <johan AT FRIJA>
9764
9765         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9766
9767
9768 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9769
9770         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9771
9772 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9773
9774         * link/z80/aslink.h: Fixed path for PATH_MAX
9775
9776 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9777
9778         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9779
9780         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9781
9782         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9783
9784         * 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.
9785
9786 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9787
9788         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9789         (genCmp): Fixed up genCmp for the GB with longs.
9790
9791         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9792
9793         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9794
9795         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9796
9797         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9798
9799 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9800
9801         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9802
9803 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9804
9805         * 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.
9806
9807         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9808
9809 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9810
9811         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9812
9813         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9814
9815 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9816
9817   * sim/ucsim/configure:    little improvement of Cygwin-detection
9818   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9819   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9820   * support/regression/tests/bug-221100.c: small changes for mcs51
9821   * support/regression/tests/bug-221168.c: small changes for mcs51
9822   * support/regression/tests/bug-227710.c: small changes for mcs51
9823   * support/regression/tests/staticinit.c: small changes for mcs51
9824   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9825   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9826   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9827
9828 $Revision$