ca4c42a553f855e759762645fa29df75d864be00
[fw/sdcc] / ChangeLog
1 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
2
3         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
4           (selectSpil): fixed bug 1337835 by not spilling bit variables
5         * support/regression/tests/bug1337835.c: added test for this bug
6         * src/mcs51/peeph.def: restart after rule 3.c,
7           addded rules 263.x to optimize loading constants
8
9 2005-10-26 Raphael Neider <rneider AT web.de>
10
11         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
12         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
13           (genAssign): emit warning when casting literals to generic pointer
14             type, also applies when taking the address of a fixed variable,
15           (genCast): improved casting to generic pointers
16         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
17           extern variables, added verbose error message
18         * device/include/pic16/{string.h,errno.h}: added #pragma library c
19
20 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
21
22         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
23         carry must be complemented too
24         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
25         could be emitted by genMinus
26         * src/SDCCval.c (constVal): fixed bug 1305065
27
28 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
29
30         * src/SDCCast.c (addCast): added promotion for bit variables
31         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
32         promotion casts + optimisation
33         (optimizeGetWord): fix warning 'i' might be used uninitialized
34         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
35         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
36
37 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
38
39         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
40         all chars are promoted to int; promotion should be handled in SDCCast.c
41
42 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
43
44         * device/lib/_strcmp.c: Fixed bug 1326457
45
46 2005-10-11 Raphael Neider <rneider AT web.de>
47
48         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
49         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
50
51 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
52
53         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
54         * support/regression/tests/sfr16.c: added test for the sfr32 bug
55
56 2005-10-04 Raphael Neider <rneider AT web.de>
57
58         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
59           device/lib/pic16/pics.all: added pic18f1320
60         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
61
62 2005-09-30 Raphael Neider <rneider AT web.de>
63
64         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
65         * src/pic16/devices.inc: NEW, provides device descriptions
66         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
67
68 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
69
70         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
71           GETHBIT
72
73 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
74
75         * doc/sdccman.lyx: updated Highest Order Bit documentation,
76           documented Any Order Bit, Higher Order Byte and Higher Order Word
77         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
78         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
79           (optimizeGetAbit): new, to get any bit, not only the high bit,
80           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
81           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
82           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
83           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
84             RIGHT_OP: also try GETBYTE, GETWORD optimization,
85             GETABIT, GETBYTE, GETWORD: decorate them,
86           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
87           (ast_print): added GETABIT, GETBYTE, GETWORD
88         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
89         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
90           (geniCodeBinary): new generic binary icode,
91           (ast2iCode): added GETABIT, GETBYTE, GETWORD
92         * src/port.h: updated comment for PORT.hasExtBitOp
93         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
94           (genGetByte): new, to get a single byte,
95           (genGetWord): new, to get a word from a long,
96           (gen51Code): added GETABIT, GETBYTE, GETWORD
97         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
98
99 2005-09-23 Raphael Neider <rneider AT web.de>
100
101         * configure.in, configure: have device/lib/pic configured
102         * device/lib/Makefile.in: added model-pic14
103         * device/lib/clean.mk: added pic/ to clean rule
104         * device/lib/pic: added rudimentary pic14 library providing support
105           functions for multiplication/division/generic pointer access
106         * src/SDCCopt.c (convilong): mark support functions as extern
107           for pic14 port as well
108         * src/pic/gen.c (genMult): added assertions,
109           (genpic14Code): emit warning on unhandled iCodes
110         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
111         * src/pic/pcode.c (pCodeOpCopy),
112         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
113           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
114           SFR_REGISTER}), made safe for future extensions
115         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
116           instructions even if preceeded by SKIP instructions (also remove
117           them); removed unused code
118         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
119           prevents leaving parts of the structure uninitialized after copying
120
121 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
122
123         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
124           ago by me
125         * support/regression/tests/addsub.c: added test for the bug
126
127 2005-09-21 Raphael Neider <rneider AT web.de>
128
129         * device/include/pic16/pic18f1220.h,
130           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
131         * device/lib/pic16/Makefile.rules: added missing opening paren
132         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
133           are provided in genutils.c,
134           (genUminusFloat,genUminus,genCmpEq): added asserts on different
135           operand/result sizes,
136           (genCmp): assert on NULL pointers first, then check deref'ed values
137         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
138           result size
139
140 2005-09-18 Raphael Neider <rneider AT web.de>
141
142         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
143           as these are now unused,
144           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
145         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
146           local, avoids uninitialized pointer dereference on r->name
147         * src/pic16/ralloc.c (newReg): fixed indentation
148
149 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
150
151         * src/SDCCval.c (constVal): fixed bug 730366
152         * support/Util/SDCCerr.c,
153         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
154
155 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
156
157         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
158
159 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
160
161         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
162
163 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
164
165         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
166           (hex2dec): made hex_digit unsigned char, removed ascii dependance
167         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
168           (hex2dec): made hex_digit unsigned char, removed ascii dependance
169         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
170         * packihx/packihx.c (hexDigit): made c unsigned char
171         * as/mcs51/lklibr.c (fndsym),
172         * link/z80/lkgb.c (gb),
173         * link/z80/lklibr.c (fndsym),
174         * link/z80/lkrloc.c (relr),
175         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
176         * src/SDCC.lex (checkCurrFile, process_pragma),
177         * src/SDCCglue.c (spacesToUnderscores),
178         * src/SDCCmain.c (setParseWithComma, processFile),
179         * src/asm.c (tvsprintf, printCLine),
180         * src/avr/gen.c (emitcode, aopPut),
181         * src/ds390/gen.c (emitcode),
182         * src/hc08/gen.c (emitcode, emitinline),
183         * src/mcs51/gen.c (emitcode, genInline),
184         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
185           tokenizeLineNode),
186         * src/pic/ralloc.c (debugLog),
187         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
188           tokenizeLineNode),
189         * src/pic16/ralloc.c (debugLog),
190         * src/z80/main.c (_process_pragma):
191            made all ctype.h function calls safe
192         * src/SDCCopt.c: include math.h for fabs
193         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
194           and used them throughout the code to make ctype.h function calls safe
195         * src/ds390/main.c (asmLineNodeFromLineNode),
196         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
197         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
198            unsigned char*
199         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
200           (newpCodeAsmDir): made ctype.h function calls safe
201         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
202           pic16_emitcode):  made lbp unsigned char*
203         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
204           (pic16_newpCodeAsmDir): made ctype.h function calls safe
205         * src/xa51/gen.c (emitcode),
206         * src/z80/gen.c (_emit2): made lbp unsigned char*
207         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
208            char*
209
210 2005-09-05 Raphael Neider <rneider AT web.de>
211
212         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
213           access bank splitpoint
214
215 2005-09-05 Raphael Neider <rneider AT web.de>
216
217         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
218
219 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
220
221         * .version: changed to version 2.5.3
222         * doc/sdccman.lyx: changed version to 2.5.3,
223           documented --codeseg and --constseg and pragma codeseg and constseg,
224           documented bit parameters (reentrant) and bit returning
225         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
226            currFunc->recvSize, but is this ok for all ports?
227           (ast2iCode): result of ~ on unsigned char must be cast to int for
228            bool to work
229         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
230           function pointers in bit space
231         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
232           (processFuncArgs): call port.reg_parm() with reentrancy info
233         * src/port.h,
234         * src/avr/main.c,
235         * src/ds390/main.c,
236         * src/hc08/main.c,
237         * src/pic/main.c,
238         * src/pic16/main.c,
239         * src/xa51/main.c,
240         * src/z80/main.c: port.reg_parm prototype extended with
241           "bool reentrant" parameter
242         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
243           options.stackAuto for allocating bit register parameters
244         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
245           (genSend): set BitBankUsed if it is,
246           (selectRegBank): factored out of genCall for use in genPcall,
247           (genCall): removed redundant dtype assignmen, use selectRegBank,
248           (genPcall): handle returning in Carry properly, save in F0 if needed,
249           (genReceive): handle bit register parameters
250         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
251           (mcs51_assignRegisters): enable bit registers for all reentrant
252            functions and don't set BitBankUsed unconditionally
253         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
254         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
255         * support/regression/tests/funptrs.c: added tests for BOOL and for return
256
257 2005-08-27 Borut Razem <borut.razem AT siol.net>
258
259         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
260         ppc-osx (Darwin) does not support -u option. It seems that it is
261         supported only on Linux - GNU cp
262
263 2005-08-25 Borut Razem <borut.razem AT siol.net>
264
265         * sim/ucsim/gui.src/serio.src/Makefile.in,
266           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
267           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
268           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
269           install and strip, since the strip at /usr/ccs/bin should be used
270           on solaris
271
272 2005-08-24 Borut Razem <borut.razem AT siol.net>
273
274         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
275
276 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
277
278         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
279         ffffffffu
280
281 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
282
283         * as/mcs51/aslink.h: completed lkrloc.c prototypes
284         * as/mcs51/lkmain.c (link_main): fixed warning
285         * device/include/stdbool.h: ds390 has no advanced bit support yet
286         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
287         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
288         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
289           and updated their macros
290         * src/SDCCval.c (constVal): updated comment for renamed b_long
291
292 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
293
294         * as/mcs51/asdata.c: changed ctype['['] to BINOP
295         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
296           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
297           (oprio): set priority for '['
298         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
299            and adb_24_bit
300         * as/mcs51/asm.h: added defines R_BIT and S_BIT
301         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
302         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
303         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
304           added overlayable BIT_BANK area
305         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
306           (summary2): explain 'T' in legenda
307         * as/mcs51/lkrloc.c: replaced old K&R style,
308           (relr): added R_BIT processing,
309           (errmsg): added "Bit-addressable relocation error",
310           (adb_bit): added for converting from byte- to bit-addressable space,
311           (adb_24_bit): added for converting from byte- to bit-addressable space
312         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
313            used in reentrant functions now even as return value
314         * device/lib/_gptrput.c (_gptrput): removed obsolete code
315         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
316           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
317         * src/SDCCglobl.h: added indicator BitBankUsed
318         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
319            the bit registers b0-b7
320         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
321           (geniCodeCast): fixed bug 1263853,
322           (geniCodeLogicAndOr): put result in bool or char,
323           (geniCodeReceive): added parameter func for accessing the return type,
324           (geniCodeFunctionBody): pass func to geniCodeReceive
325         * src/SDCCmain.c: added indicator BitBankUsed
326         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
327         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
328           (checkSClass): don't put automatic bool/bit on stack,
329           (checkFunction): removed check on function cannot return bit
330         * src/SDCCsymt.h: added newBoolLink prototype
331         * src/mcs51/gen.c (rb1regs): added bit registers,
332           (movc): created for assigning to carry,
333           (pushReg, popReg): created for pushing registers,
334           (sameRegs): check both AOP_REG and AOP_CRY types,
335           (aopOp): handle bit registers,
336           (aopPut): optimization no self-assign,
337           (saveRegisters): push reg->base (bits) only once for bit registers,
338            and use pushReg,
339           (unsaveRegisters): pop reg->base only once and use popReg,
340           (assignResultValue): added parameter func and return in carry for bits,
341           (genIpush): optimization no reload in A if not changed,
342           (genSend): bit parameters in reentrant functions are passed in bit
343            registers by first assigning to bits in B, then save registers and
344            copy B to bits,
345           (genCall): handle returning in Carry properly, save it in F0 if needed,
346           (genPcall): updated assignResultValue call, this is not safe yet for bit
347            returning function !!!
348           (genFunction): don't generate equ's for bit registers and use pushReg,
349           (genEndFunction): take care of bit returning functions and use popReg,
350           (genRet): return bit in Carry,
351           (genIfx): optimize bit registers and other directly addressable bits,
352           (genReceive): updated assignResultValue call
353         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
354           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
355            registers when using stack-auto
356         * src/mcs51/ralloc.c (_G): added allBitregs,
357           (regs8051): added the bit registers,
358           (createStackSpil): use macro IS_BIT,
359           (getRegBit): added to allocate a bit register, else spill,
360           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
361           (updateRegUsage): factored out to ease stepping while debugging,
362           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
363            also allocate bit registers,
364           (fillGaps): handle bit registers,
365           (findAllBitregs): added to create bit vector with all bit registers,
366           (mcs51_allBitregs): returns this bit vector,
367           (mcs51_assignRegisters): when using stack-auto use bit registers for
368            passing parameters and creating local variables
369         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
370
371 2005-08-22 Borut Razem <borut.razem AT siol.net>
372
373         * device/lib/Makefile.in: replaced find option -or with -o
374           to make it run on solaris
375
376 2005-08-22 Raphael Neider <rneider AT web.de>
377
378         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
379           fixes #1265442 (crash on Solaris)
380
381 2005-08-20 Borut Razem <borut.razem AT siol.net>
382
383         * configure, configure.in: added tests for libsocket and libnsl libraries,
384           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
385           from support/regression/Makefile.in
386         * support/regression/Makefile.in: added
387         * device/lib/pic16/Makefile.common.in: force make to use bash shell
388         * sim/ucsim/libtool: regenerated on sparc-solaris
389         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
390           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
391           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
392           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
393           sparc-solaris, which doesn't use GNU ld linker
394         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
395         * as/Makefile: find on sparc-solaris does not support -maxdepth option
396
397 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
398
399         * src/mcs51/peeph.def: updated comments
400
401 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
402
403         * device/lib/_gptrget.c,
404         * device/lib/_gptrput.c: slightly shorter
405         * doc/sdccman.lyx: incremented version
406         * src/mcs51/peeph.def: moved peephole comments to the line of first
407           change to better keep line correlation, reanimated 186.e
408         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
409
410 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
411
412         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
413           David Saxton with quotes around file name.
414
415 2005-08-15 Borut Razem <borut.razem AT siol.net>
416
417         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
418           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
419           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
420           make tests run on x86_64 platform
421
422 2005-08-13 Raphael Neider <rneider AT web.de>
423
424         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
425           as it might be executed DURING a build (parallel make is wonderful)
426
427 2005-08-13 Raphael Neider <rneider AT web.de>
428
429         * device/lib/Makefile.in (port-specific-objects-pic16):
430           revert to cp $(PORT)/bin/*.* $(PORTDIR)
431         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
432           dependency
433         * device/lib/pic16/Makefile.rules: build subdirs before creating
434           the library, removed builddir rule, create $(builddir) early in
435           recurse rule, use empty recurse rule for leaf directories
436         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
437           mkdir errors (race condition), removed duplicate suffix "hex"
438           from clean rules
439         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
440         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
441           prevents mkdir -p from aborting on Alpha
442
443 2005-08-12 Raphael Neider <rneider AT web.de>
444
445         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
446           db-statements in order to allow for arrays of pointers in code
447           sections to be placed without interspersed 0-padding, fixes
448           bug #1256215
449         * (emitStatistics): fixed division by zero for pic18f1220
450         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
451           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
452         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
453         * (pic16_pCodeConstString): keep track of already emitted string
454           literals to prevent "duplicate definitions of symbol _str_NR"
455         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
456           debug message
457         * device/lib/Makefile.in: ignore failing PIC16 library builds
458         * device/lib/pic16/Makefile: do not build if gputils are missing
459         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
460
461 2005-08-10 Raphael Neider <rneider AT web.de>
462
463         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
464           my last commit)
465
466 2005-08-10 Raphael Neider <rneider AT web.de>
467
468         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
469           Rokas' patch to add the new fixed point type "__fixed16x16"
470         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
471           functions for __fixed16x16 arithmetics
472         * device/lib/pic16: reimplemented the build system to support
473           a separate build directory, better handling of libio (create
474           the library in a separate subdir for each architecture) and
475           easier configuration (centralized in Makefile.common)
476
477 2005-08-07 Raphael Neider <rneider AT web.de>
478
479         * src/pic16/gen.c (genrshTwo): fixed sign extension
480         * src/pic16/device.c: added pic18f2320, 4220 and 4320
481         * device/include/pic16/pic18f2220.h: changed some bit definitions,
482           added T0CONbits
483         * device/include/pic16/pic18f4220.h: NEW, header for
484           pic18f4220 and pic18f4320
485         * device/include/pic16/pic18fregs.h: added new devices,
486           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
487         * device/include/pic16/signal.h: resolved name clashes
488           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
489           to also allow testing for interrupt enable bits, added
490           comments on how to use the macros
491         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
492         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
493           register definitions for the devices
494         * device/lib/pic16/pics.all: added new devices
495         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
496           allocated memory
497         * device/lib/pic16/libc/stdlib/memfree: do not count
498           the block header as free memory
499         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
500           simplified and added missing end-of-blocklist-marker
501           (reported by Peter Onion, fixes #1252814)
502         * (_mergeHeapBlock): fixed loop condition
503         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
504           len==0, restructured code
505         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
506           up a bit, reduced bitfield accesses, prevent endless loops
507           in case of heap corruption
508         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
509           "unreferenced arguments/must return a value" warnings
510         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
511           replaced BAUDREG with SPBRG
512         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
513           device/lib/pic16/debug/gstack/gstack.c: replaced
514           _naked, _asm, _endasm with __naked, __asm, __endasm
515
516 2005-08-05 Raphael Neider <rneider AT web.de>
517
518         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
519           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
520
521 2005-08-05 Borut Razem <borut.razem AT siol.net>
522
523         * device/lib/Makefile.in: added missing ';'
524         * configure: removed ^M characters
525
526 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
527
528         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
529           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
530           License
531
532 2005-08-04 Borut Razem <borut.razem AT siol.net>
533
534         * configure.in: pic16 libraries build 2nd try - enable running
535           configure in device/lib/pic16
536         * configure: regenerated from configure.in
537         * device/lib/Makefile.in: create $(PORT)/bin directory
538
539 2005-08-03 Raphael Neider <rneider AT web.de>
540
541         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
542           to get/set values via pointers
543         * (genUnpackBits,genPackBits): changed detection of
544           ptr->bitfield vs. sym.bitfield, fixed access via generic
545           pointers, removed dead (wrong) code for multibyte bitfields
546         * (genNearPointerGet, genGenPointerGet): removed useless code,
547           fixed bitfield detection, fixes #1250594
548         * (genNearPointerSet): removed useless code
549         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
550           and introduced macro pic16_emitpcode that conditionally emits
551           the origin of the following pCode (useful for debugging SDCC)
552         * src/pic16/pcode.c: changed (and disabled) some debug outputs
553         * (createDefmap): fixed handling of LFSR for --optimize-df
554
555 2005-08-02 Borut Razem <borut.razem AT siol.net>
556
557         * device/lib/Makefile.in: pic16 libraries build enabled since
558           gputils-0.13.2 are now localy installed at sourceforge's compile farm
559
560 2005-08-02 Raphael Neider <rneider AT web.de>
561
562         * src/pic16/gen.c (genPackBits): removed deprecated warning
563         * (genGenPointerSet): fixed bitfield detection
564
565 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
566
567         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
568
569 2005-07-31 Raphael Neider <rneider AT web.de>
570
571         * device/lib/pic16/libdev/pic18f458.c,
572           device/include/pic16/pic18f458.h: added missing T0CONbits
573
574 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
575
576         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
577
578 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
579
580         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
581
582 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
583
584         * device/include/mcs51/at89c51ed2.h: added.
585
586 2005-07-23 Raphael Neider <rneider AT web.de>
587
588         * src/pic/gen.h: added emitpcode macro for debugging
589         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
590           and replace by macro adding debug information on demand
591         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
592         * (gencjne): tried to fix; replaced with correct (slower) code
593         * (gen{Unp,P}ackBits): fixed single bit access
594         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
595         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
596           previous instruction
597         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
598           register has to be handled with care (forbidding movement
599           of assignments/uses, removing assignments completely, ...)
600         * (pCodeOptime2pCodes): make use of regIsSpecial
601         * added lots of debugging output (commented out)
602         * src/pic/rallloc.c (deassignLRs): prevent operand registers
603           from being reused as result UNLESS it is known to work
604
605 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
606
607         * support/Util/dbuf.h: include <stddef.h> for size_t
608         * .version: changed to version 2.5.2
609
610 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
611
612         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
613
614 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
615
616         * src/hc08/gen.c (genMinus): fixed bug #1241835,
617           (genModOneByte): removed needless psha/pula
618
619 2005-07-22 Raphael Neider <rneider AT web.de>
620
621         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
622           have PIC14 handled like PIC16, fixes broken pic14 linker calls
623         * src/pic/gen.c (resolveIfx): do not "invent" labels
624         * (genSkipc): changed to positive logic
625         * (genSkipCond): removed as no longer needed
626         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
627           backport from PIC16
628         * (genLeftShift): check operands are in different registers
629         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
630           INCF does not update CARRY...
631         * src/pic/main.c: fixed _linkCmd
632         * src/pic/pcode.c (unlinkpCode): added inactive code
633         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
634           alive (do not assign result and operand overlapping registers)
635
636 2005-07-22 Raphael Neider <rneider AT web.de>
637
638         * src/pic/device.c (dump_sfr): replaced register declaration with
639           call to emitSymbolToFile() to avoid duplicate symbols
640         * (assignRelocatableRegisters): do not declare external symbols
641         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
642           right (take size of type, not etype)
643         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
644         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
645         * (packRegsForAccUse): disabled assignment of WREG as
646           the result reg to prevent occurence of just fixed #1235003,
647           fixes #1242954
648         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
649           symbols (avoids duplicate symbols in .asm file)
650         * (pic14emitRegularMap): use emitSymbolToFile()
651         * src/pic/gen.c (aopOp): fixed spillLocation handling
652         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
653         * (genDataPointerSet): removed unneccessary variables/output
654
655 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
656
657         * as/mcs51/lkarea.c: enlarged codemap for banked memory
658         * device/lib/mcs51/crtbank.asm: added # to 0x0F
659
660 2005-07-21 Raphael Neider <rneider AT web.de>
661
662         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
663           architecture cannot handle them efficiently, fixes bug #1235003
664         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
665           check for empty sets before using them (fixes bug #1232190)
666
667 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
668
669         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
670           (lnksect2): generate warnings for memory overlap
671         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
672           constseg to set the name of these segments so you can instruct the linker
673           to place them in banks
674         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
675         * src/SDCCglobl.h: added MODEL_HUGE to enum,
676           added code_seg and const_seg to options
677         * src/SDCCglue.c (emitMaps): use options.const_seg,
678           (createInterruptVect): put interrupt vectors in segment HOME,
679           (glue): put HOME before static segment and put the main glue in HOME,
680           (glue): use options.code_seg
681         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
682         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
683           these segments so you can instruct the linker to place them in banks
684           (linkEdit): use code_loc for HOME segment which should be the first
685           segment in code memory now
686         * src/SDCCmem.c: fixed more stuff like bug 1238386
687         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
688           (changePointer): don't change function pointers to code pointers for
689           banked functions,
690           (compareType): added exceptional check for banked function pointers
691         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
692         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
693           after static in code memory
694         * src/mcs51/gen.c: added aopLiteralLong prototype,
695           (aopForSym): use getSize for functions,
696           (genCall): generate banked calls over one trampoline __sdcc_banked_call
697           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
698           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
699           the segment,
700           (genPcall): use call for literal function pointers and generate banked
701           calls over the one trampoline so there's only one place for the user to
702           modify according to his/hers hardware,
703           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
704           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
705         * src/mcs51/main.c: added keyword banked,
706           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
707         * support/Util/SDCCerr.c,
708         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
709           needed for passing the bank and address to the trampoline
710         * device/lib/mcs51/crtbank.asm: added for bankswitching
711         * device/lib/mcs51/Makefile: added crtbank
712
713 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
714
715         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
716           for fields at offset 0 of a struct or union as reported
717           on 2005-07-07 in the developer mailing list.
718
719 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
720
721         * src/SDCCmem.c: fixed bug 1238386
722
723 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
724
725         * src/mcs51/peeph.def: added labelrefcounting for peepholes
726           (patch #1144962), added peephole 300, enabled 259.x
727         * doc/sdccman.lyx: removed screenshot and provided link instead
728
729 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
730
731         * doc/sdccman.lyx: added section about debugging with ddd
732         * doc/figures/ddd_example.eps: screenshot of debugging session
733
734 2005-07-04 Raphael Neider <rneider AT web.de>
735
736         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
737           like CODE pointers, fixes #1115683
738         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
739           call, fixes bugs #1232211, #1228110,
740           fixed wrong casts to pCodeFlow from pCodeInstructions
741
742 2005-07-04 Raphael Neider <rneider AT web.de>
743
744         * src/pic/gen.c (popGet): changed assert to allow for
745           bit operands
746         * (popGetAddr): changed signature to provide
747           an additional index, patched all call sites
748         * (genCmpEq): handle literal-like operands correctly
749         * (genAddrOf): added sanity checks on __code/__data pointers
750         * (genAssign): added handling of symbols from __code section
751         * (gencjne): do not generate code for comparisons whose result
752           is neither stored nor used, fixes bug #1171114
753         * (AccLsh, AccRsh): operate on operand instead of WREG
754         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
755           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
756           by known count
757         * rewrote complete shift-by-literal logic, commented unused
758           functions out
759         * (genConstPointerGet): get multiple bytes (if result size > 1),
760           fixed handling of non-immediate addresses
761         * (genPointerGet): handle CODE pointers like CONST pointers
762         * (genpic14Code): insert C-SRC lines as Cource-pCodes
763         * ({aop,op}_isLitLike): NEW, single place to decide whether an
764           operand is to be treated as a literal or not
765         * (mov2w,genPcall,genCmpEq),
766           src/pic/genarith.c: use aop_isLitLike() to decide between
767           literal/register contents
768         * (addSign): added missing offset
769         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
770           only emit comment in debug-mode,
771           use {aop,op}_isLitLike throughout the file
772         * src/pic/glue.c: fix initializers for pointers (work in progress)
773         * src/pic/pcode.c (get_op): honor index on _const symbols
774         * ({reset,dump}pCodeStatistics): NEW, estimate code size
775         * (dumppBlock): added pCode size estimation
776         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
777           check for IS_SYMOP before OP_SYMBOL'ing
778         * fixed indentation, compacted switch-statements
779         * (allocReg): find free register and allocate it instead of
780           allocating new registers all the time
781         * (deassignLRs): prevent POINTER_GET's from being assigned the same
782           registers as its operands (necessary only for multibyte GETs)
783
784 2005-07-01 Raphael Neider <rneider AT web.de>
785
786         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
787           debugging .asm-output macros FENTRY + FEXIT
788         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
789           way... I wonder...
790         * (emitpComment): NEW, printf to pCode
791         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
792           offset handling
793         * (popGetAddr): NEW, variant of popGet to access an immediates
794           high(er) bytes instead of the n'th byte of memory they reference,
795           replaced popGet with popGetAddr where neccessary
796         * (genDataPointerGet): reactivated and fixed implementation
797         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
798           accesses
799         * (genDataPointerSet): fixed multibyte assignments
800         * (genpic14Code): fixed --i-code-in-asm handling
801         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
802         * (genPlus): fixed index-out-of-bounds error
803         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
804         * src/pic/ralloc.c: added debugging output macro FENTRY2
805         * (spillThis): fixed indentation, enbraced for-body for clarity
806         * (rematStr): commented out as now unused
807         * (regTypeNum): commented out special spill case (overwrites
808           arbitrary values)
809         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
810
811 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
812
813         * doc/sdccman.lyx: documented sfr16/sfr32,
814           added example for using storage class with function pointers
815         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
816
817 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
818
819         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
820         * device/lib/_itoa.c,
821         * device/lib/_ltoa.c: optimized codesize
822         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
823           but don't know how to suppress the double warning.
824         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
825         * support/Util/SDCCerr.c,
826         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
827
828 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
829
830         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
831           fixed old K&R prototypes
832         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
833         * device/lib/_gptrget.c,
834         * device/lib/_gptrgetc.c,
835         * device/lib/_gptrput.c: changed versions for new memory indicator values,
836           also new versions for small generic pointers and banked generic pointers
837         * src/port.h: added const_name
838         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
839         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
840         * src/SDCCcse.c (findPrevIc): check all associative operators
841         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
842         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
843         * src/SDCCmem.c: updated comments,
844           set far-space to 0 for pdata, results in optimized code
845         * src/SDCCmem.h: added macro CONST_NAME
846         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
847           moving the info into the highest bits, see also gptrget/gptrput
848         * src/src.dsp: added sdcc.ico to project files
849         * src/avr/gen.c (genCast): fixed bug 0x%d
850         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
851         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
852           relation between ptr_type and DCL_TYPE,
853           (genCast): fixed bug 0x%d
854         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
855           (CODE)" for const_name
856         * src/hc08/gen.c (genCast): fixed bug 0x%d
857         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
858           (hc08_port): added "CONST (CODE)" for const_name
859         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
860           (aopForRemat, adjustArithmeticResult): disconnected direct relation
861           between ptr_type and DCL_TYPE,
862           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
863           operand* and took AOP() inside function so sfr-ness can be checked,
864           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
865           new prototype,
866           (genFunction, genEndFunction): optimized stack setup,
867           (genMinus): optimized for literals with ending zeroes (in bytes),
868           (genCast): fixed bug 0x%d
869         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
870           (mcs51_port): added "CONST (CODE)" for const_name
871         * src/mcs51/peeph.def: made rule 226 more generic
872         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
873         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
874         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
875         * src/z80/main.c (z80_port): added NULL for const_name,
876           (gbz80_port): added NULL for const_name
877         * support/regression/tests/bug663539.c,
878         * support/regression/tests/sfr16.c: new tests
879
880 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
881
882         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
883
884 2005-06-24 Raphael Neider <rneider AT web.de>
885
886         * device/lib/pic16/libdev/pic18f[68][567]20.c:
887           corrected typos...
888         * device/include/pic16/signal.h: added USBIF
889           and SIG_USB
890
891 2005-06-24 Raphael Neider <rneider AT web.de>
892
893         * device/lib/pic16/libdev/pic18f2455.c,
894           device/include/pic16/pic18f2455.h: NEW
895         * device/include/pic16/pic18fregs.h,
896           device/lib/pic16/pics.all,
897           src/pic16/device.c: added 18f2455
898         * device/lib/pic16/libdev/pic18f[68][567]20.c,
899           device/include/pic16/{pic18f[68][567].h,usart.h}:
900           replaced MULTIPLE_USARTS define with more relaible
901           compatibility sfrs (for USART access)
902
903 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
904
905         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
906           and the output asm file line is printed on two lines.
907
908 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
909
910         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
911           BGT, BLE, BHI, and BLS instructions
912         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
913           genCmpEq): removed
914         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
915           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
916           fixes bug #1216342
917         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
918
919 2005-06-15 Raphael Neider <rneider AT web.de>
920
921         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
922         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
923         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
924           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
925           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
926
927 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
928
929         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
930           Marcel Telka in bug #1215704
931
932 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
933
934         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
935           located in shared memory bank.
936
937 2005-05-31 Raphael Neider <rneider AT web.de>
938
939         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
940           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
941           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
942
943 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
944
945         * device/lib/_strncpy.c: fixed the fix
946
947 2005-05-26 Raphael Neider <rneider AT web.de>
948
949         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
950           initializers with \0, bug #1208187
951         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
952           intializers with \0, bug #1208187
953
954 2005-05-26 Raphael Neider <rneider AT web.de>
955
956         * src/pic16/glue.c (pic16_printIvalChar): fixed string
957           initializers with \0, bug #1208187
958         * src/pic16/main.c (_process_pragma): added sanity checks
959           for stack position and size, emit warnings when appropriate
960
961 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
962
963         * device/lib/_strncpy.c: fixed not filling with \0
964
965 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
966
967         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
968           createFunction),
969         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
970           compound_statement),
971         * src/SDCCsymt.h,
972         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
973
974 2005-05-24 Raphael Neider <rneider AT web.de>
975
976         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
977
978 2005-05-24 Raphael Neider <rneider AT web.de>
979
980         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
981           TRISE definitions, closes bug #1162453
982
983 2005-05-22 Raphael Neider <rneider AT web.de>
984
985         * src/pic16/main.c (_process_pragma): check for missing
986           arguments to pragmas code and udata
987         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
988           consistency fixes to match other headers (thanks to Jim Paris)
989         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
990
991 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
992
993         * src/SDCCicode.c (isOperandEqual): fixed missing ;
994
995 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
996
997         * support/regression/tests/bug1198642.c: new test
998         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
999         * src/SDCCcse.c (findPrevIc): added comment, please have a look
1000         * support/scripts/resource.h,
1001         * support/scripts/resource.rc,
1002         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
1003         * support/scripts/sdcc.ico: added 32x32 icon
1004
1005 2005-05-18 Raphael Neider <rneider AT web.de>
1006
1007         * device/lib/pic16/libdev/pic18f*.c,
1008         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
1009           keywords to "__sfr" and "__at (X)"
1010         * device/include/pic16/pic18fregs.h: added pic18f4520
1011         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
1012           #1203088 (MPLAB compatibility)
1013
1014 2005-05-17 Raphael Neider <rneider AT web.de>
1015
1016         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
1017         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
1018         * device/lib/pic16/pics.all: added new devices
1019         * src/pic16/device.c: added support for pic18f4520
1020
1021 2005-05-16 Raphael Neider <rneider AT web.de>
1022         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
1023         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
1024         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
1025           convenience function for bit access
1026
1027 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1028
1029         * device/lib/printf_large.c: fixed bug 1193299
1030         * support/regression/tests/bug1057979.c: added test %3.3s
1031
1032 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1033
1034         * device/include/mcs51/8051.h,
1035         * device/include/mcs51/8052.h: made parseable with lint
1036         * device/include/mcs51/lint.h: added include file for (sp)lint
1037         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1038         * doc/cdbfileformat.lyx,
1039         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1040
1041 2005-05-14 Raphael Neider <rneider AT web.de>
1042
1043         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1044         * device/lib/pic16/libc/stdlib/itoa.c (new)
1045         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1046         * device/lib/pic16/libio/Makefile: exclude subdir according to
1047           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1048         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1049         * src/pic16/gen.c (genFunction): prevent annoying warning
1050         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1051           nameclashes on BeOS
1052         * support/cpp2/cppmain.c (cpp_output_string): new
1053         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1054           fixes bug 1116802
1055
1056 2005-05-13 Borut Razem <borut.razem AT siol.net>
1057
1058         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1059
1060 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1061
1062         * .version: changed to version 2.5.1; back to bleeding edge development
1063
1064 2005-05-11 Borut Razem <borut.razem AT siol.net>
1065
1066         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1067           generate PDF version 1.3 documents
1068
1069 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1070
1071         * .version: changed to version 2.5.0
1072
1073 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1074
1075         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1076
1077 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1078
1079         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1080         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1081         well as many smaller updates.
1082         * .version: changed to version 2.5.0-pre1
1083
1084 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1085
1086         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1087
1088 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1089
1090         * support/regression/tests/bug1185672.c: added
1091         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1092           bug 1185672
1093         * src/mcs51/gen.c (genCall): added comments, made it look safer
1094         * src/mcs51/gen.c (genEndFunction): simplified
1095
1096 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1097
1098         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1099
1100 2005-04-14 Borut Razem <borut.razem AT siol.net>
1101
1102         * fixed bug 1045046 - SIGSEGV with really simple code?:
1103           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1104           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1105
1106 2005-04-14 Borut Razem <borut.razem AT siol.net>
1107
1108         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1109           src/pic16/device.h: temporarily disabled experimental #inline pragma
1110           for 2.5.0 release
1111
1112 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1113
1114         * device/include/z80/stdio.h,
1115         * device/include/z80/string.h: removed these highly incomplete files so
1116           SDCC can use the default ones in device/include/
1117
1118 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1119
1120         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1121         gcc warning.
1122         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1123         fix sdcpp warnings.
1124
1125 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1126
1127         * device/include/malloc.h: removed redundant __reentrant prototypes
1128         * device/lib/_mullong.c: added working xstack variant in asm (C version
1129           doesn't pass regression tests)
1130         * device/lib/bpx.c: used __data and made bpx char for mcs51
1131         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1132           (createFunction): fixed bug with xstackPtr
1133         * src/SDCCcse.c: corrected comments
1134         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1135           (killDeadCode, eBBlockFromiCode): removed unused code
1136         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1137           corrected comments
1138         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1139           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1140           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1141           (genModOneByte): fixed warning in MSVC
1142         * src/mcs51/main.c (): added comments
1143         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1144
1145 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1146
1147         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1148
1149 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1150
1151         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1152
1153 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1154
1155         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1156         characters arrays of larger size than the declared one.
1157
1158 2005-04-10 Borut Razem <borut.razem AT siol.net>
1159
1160         * src/pic/gen.c (genInline),
1161           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1162           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1163           (findNextInstruction), (findPrevInstruction),
1164           (findInstructionUsingLabel),
1165           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1166         * src/pic/pcode.c (findLabel): added missing '\n'
1167         * src/src.dsp: added SDCCdwarf2.c to the project
1168
1169 2005-04-09 Borut Razem <borut.razem AT siol.net>
1170
1171         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1172
1173 2005-04-08 Raphael Neider <rneider AT web.de>
1174
1175         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1176           into the chain after a given one) and mergeDefmapSymbols (combine
1177           defmap entries for each symbol per pcode)
1178         * (createDefmap): have defmap entries merged in the end
1179         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1180           a symbol before replacing one access type's symbol, merge symbols in
1181           the end (replacement symbol might already have an entry)
1182         * (assignValnums): keep reference to written WREG intact
1183
1184 2005-04-08 Raphael Neider <rneider AT web.de>
1185
1186         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1187           Alpha)
1188
1189 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1190
1191         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1192         bytes
1193
1194 2005-04-07 Raphael Neider <rneider AT web.de>
1195
1196         * device/include/pic16/usart.h: added compatibility defines for
1197           devices with more than one USART
1198         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1199
1200 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1201
1202         * device/lib/Makefile.in: updated for port specific include
1203
1204 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1205
1206         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1207
1208 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1209
1210         * device/include/8051.h,
1211         * device/include/8052.h,
1212         * device/include/at89S8252.h,
1213         * device/include/at89c55.h,
1214         * device/include/at89x051.h,
1215         * device/include/at89x51.h,
1216         * device/include/at89x52.h,
1217         * device/include/mcs51reg.h,
1218         * device/include/reg51.h,
1219         * device/include/reg764.h,
1220         * device/include/regc515c.h,
1221         * device/include/sab80515.h: (re)moved these 12 files
1222         * device/include/mcs51/8051.h,
1223         * device/include/mcs51/8052.h,
1224         * device/include/mcs51/at89S8252.h,
1225         * device/include/mcs51/at89c55.h,
1226         * device/include/mcs51/at89x051.h,
1227         * device/include/mcs51/at89x51.h,
1228         * device/include/mcs51/at89x52.h,
1229         * device/include/mcs51/mcs51reg.h,
1230         * device/include/mcs51/reg51.h,
1231         * device/include/mcs51/reg764.h,
1232         * device/include/mcs51/regc515c.h,
1233         * device/include/mcs51/sab80515.h: and added them here
1234
1235 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1236
1237         * device/include/stdarg.h: changed SDCC specific keywords to double
1238           underlined form.
1239         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1240           mcs51 and ds390.
1241         * device/include/hc08/mc68hc908gp32.h,
1242         * device/include/hc08/mc68hc908jb8.h,
1243         * device/include/hc08/mc68hc908jkjl.h,
1244         * device/include/hc08/mc68hc908qy.h: fixed comments
1245         * device/include/mcs51/README: updated
1246         * device/include/mcs51/c8051f120.h: added PINRSF
1247         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1248         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1249           amidst code. Also inline is not supported.
1250
1251 2005-04-06 Raphael Neider <rneider AT web.de>
1252
1253         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1254         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1255           callers stack/frame pointers
1256
1257 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1258
1259         * device/include/pic16/usart.h: added, missing in previous commit,
1260         * device/include/pic16/adc.h: fixed typo,
1261         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1262         commit,
1263         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1264         <p18fxxx.inc>
1265         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1266         uninitialized because a bug appears with gplink
1267         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1268         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1269         complains for unrecognised option
1270
1271 2005-04-05 Raphael Neider <rneider AT web.de>
1272
1273         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1274           structs as well (using memcpy)
1275         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1276           on ISRs (GOTO has no label)
1277         * src/pic16/device.h: added OF_OPTIMIZE_DF
1278         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1279           new data flow analysis/optimization
1280         * src/pic16/pcode.c: added (prototypes for and implementation of)
1281           dataflow analysis functions, fixed pCodeInstructions' inCond and
1282           outCond values, made RCALL a branch instruction
1283         * (pic16_unlinkpCode): keep C line if possible
1284         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1285           C line moved if possible
1286         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1287         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1288           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1289         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1290           new flow)
1291         * (pic16_getJumptabpCode): NEW, needed in...
1292         * (LinkFlow): fixed handling of jumptables, calls and conditional
1293           branches
1294         * (pic16_InsertCommentAfter): NEW
1295         * (pic16_pCodeReplace): made verbose and flow preserving
1296         * (AnalyzeFlow): added call to data flow analysis
1297         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1298         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1299         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1300
1301 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1302
1303         * src/SDCCast.c (decorateType): fixed bug #1105626
1304
1305 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1306
1307         * device/include/asm/pic16/features.h,
1308         * pic18f*.h headers,
1309         * device/include/pic16/adc.h,
1310         * device/include/pic16/delay.h,
1311         * device/include/pic16/i2c.h,
1312         * device/include/pic16/malloc.h,
1313         * device/include/pic16/stdio.h,
1314         * device/include/pic16/stdlib.h,
1315         * device/include/pic16/string.h,
1316         * device/lib/pic16/libc/stdio/printf_tiny.c,
1317         * device/lib/pic16/libc/stdio/printf_small.c,
1318         * device/lib/pic16/libc/stdio/strmgpsim.c,
1319         * device/lib/pic16/libc/stdio/strmmssp.c,
1320         * device/lib/pic16/libc/stdio/strmusart.c,
1321         * device/lib/pic16/libc/stdio/vfprintf.c,
1322         * device/lib/pic16/libc/stdlib/ltoa.c,
1323         * device/lib/pic16/libc/stdlib/putchar.c,
1324         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1325         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1326         * device/lib/pic16/libc/stdlib/memchrram.c,
1327         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1328         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1329         * device/lib/pic16/libio/adc/adcbusy.c,
1330         * device/lib/pic16/libio/adc/adcread.c,
1331         * device/lib/pic16/libio/adc/adcsetch.c,
1332         * device/lib/pic16/libio/usart/ubaud.c,
1333         * device/lib/pic16/libio/usart/ubusy.c,
1334         * device/lib/pic16/libio/usart/udrdy.c,
1335         * device/lib/pic16/libio/usart/uopen.c,
1336         * device/lib/pic16/libio/usart/uputc.c,
1337         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1338         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1339         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1340         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1341         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1342         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1343         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1344         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1345         specific keywords to double underlined form,
1346         * device/lib/pic16/libc/Makefile.rules,
1347         * device/lib/pic16/libsdcc/Makefile.rules,
1348         * device/lib/pic16/libm/Makefile,
1349         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1350         to compile with C standard set in Makefile.common
1351         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1352         rand.c and crc.c in compilation process,
1353         * device/lib/pic16/libsdcc/int/divuint.c,
1354         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1355         `c' from signed to unsigned,
1356         * device/lib/pic16/startup/crt0.c,
1357         * device/lib/pic16/startup/crt0i.c,
1358         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1359         keywords to double underlined form, bug fixes in _do_cinit function
1360         which prevented the correct initialization of the .idata segment,
1361         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1362         core to enter a infinite loop
1363         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1364
1365 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1366
1367         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1368
1369 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1370
1371         * device/include/Makefile.in: add support for hc08 subdirectory
1372         * device/include/hc08/: new subdirectory
1373         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1374         Lucas Loizaga, thanks!
1375         * device/include/hc08/mc68hc908qy.h,
1376         * device/include/hc08/mc68hc908gp32.h,
1377         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1378         their own directory. Changed internal macro names to use the compiler
1379         reserved namespace. Changed SDCC specific keywords to double
1380         underlined form.
1381         * device/include/math.h,
1382         * device/include/malloc.h,
1383         * device/include/stdarg.h,
1384         * device/include/stdbool.h
1385         * device/include/string.h,
1386         * device/include/tinibios.h,
1387         * device/include/ds400rom.h,
1388         * device/include/8051.h,
1389         * device/include/8052.h,
1390         * device/include/80c51xa.h,
1391         * device/include/at89c55.h,
1392         * device/include/at89S8252.h,
1393         * device/include/at89x51.h,
1394         * device/include/at89x52.h,
1395         * device/include/ds80c390.h,
1396         * device/include/reg764.h,
1397         * device/include/regc515c.h,
1398         * device/include/sab80515.h,
1399         * device/include/mcs51/c8051f000.h,
1400         * device/include/mcs51/c8051f018.h,
1401         * device/include/mcs51/c8051f020.h,
1402         * device/include/mcs51/c8051f040.h,
1403         * device/include/mcs51/c8051f060.h,
1404         * device/include/mcs51/c8051f120.h,
1405         * device/include/mcs51/c8051f300.h,
1406         * device/include/mcs51/c8051f310.h,
1407         * device/include/mcs51/c8051f320.h,
1408         * device/include/mcs51/c8051f330.h,
1409         * device/include/mcs51/c8051f350.h,
1410         * device/include/z180.h: Changed SDCC specific keywords to double
1411         underlined form.
1412
1413 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1414
1415         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1416         18F4455,
1417         * (pic16_assignConfigWordValue): disable testing of configuration
1418         register value with config mask,
1419         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1420         function with port->fun_prefix,
1421         * (genFunction): when generating a naked interrupt function never
1422         create an absolute segment placed in interrupt vector address, place
1423         the actual interrupt function at IVA instead, when an interrupt
1424         function is generated with unspecified interrupt then do not create
1425         the absolute section,
1426         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1427         code for generating a call to generic pointer get/put function with
1428         a call to function pic16_callGenericPointer(),
1429         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1430         the call to the generic pointer get/put functions with prefixing the
1431         function name with port->fun_prefix,
1432         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1433         * src/pic16/main.c (_process_pragma): prefix function with
1434         port->fun_prefix,
1435         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1436         calling assembler, old 18Fxxxx macro is deprecated,
1437         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1438         PC_ASMDIR in while condition,
1439         * (findInstruction): add PC_ASMDIR in while condition,
1440         * (buildCallTree): prefix main with port->fun_prefix,
1441         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1442         identifier for variable with banked access in instructions BTFSS,
1443         BTFSC, BCF, BSF, BTG
1444         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1445         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1446         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1447         perform optimization when enviroment variable NO_REG_OPT is set,
1448         * (insideLRBlock): NEW, return 1 if register is inside an
1449         INF_LOCALREGS block,
1450         * (RemoveRegFromLRBlock): remove a register that is completely
1451         eliminated by register optimization, but it is still left in local
1452         register store/restore in/from stack block,
1453         * (Remove2pcodes): after removing register, check to see if it
1454         should be removed from local register store/restore in/from stack
1455         block,
1456         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1457         DUMMY_READ_VOLATILE,
1458
1459         * device/include/pic16/adc.h: minor prototype modifications and
1460         update,
1461         * device/include/pic16/malloc.h: added GPL notice various
1462         modifications,
1463         * device/include/pic16/stdint.h: NEW, standard header for ints
1464         * device/include/pic16/delay.h: NEW, header for delay functions,
1465         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1466         delay1mtcy,
1467         * device/include/pic16/signal.h: NEW, header providing helper macros
1468         for implementing signal handlers,
1469         * device/include/pic16/stdio.h: added prototypes for functions,
1470         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1471         prototypes for stdin and stdout, added macro PUTCHAR to
1472         automatically implement putchar function prototype,
1473         * device/include/pic16/usart.h: modified and updated USART library,
1474         * device/lib/pic16/libio/adc/,
1475         * device/lib/pic16/libio/i2c: some modifications to improve library
1476         performance,
1477         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1478         family of functions,
1479         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1480         family of functions and other sources,
1481         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1482         of the PIC18Fxx[28] devices,
1483         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1484         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1485         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1486         _do_cinit function, because the previous failed when local variables
1487         where not placed in the same memory bank,
1488         * device/lib/pic16/libsdcc/char/: various modifications to improve
1489         library performance,
1490         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1491         information on the new functions of the c library and more...
1492
1493 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1494
1495         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1496
1497 2005-03-26 Raphael Neider <rneider AT web.de>
1498
1499         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1500           if condition == CARRY)
1501         * (genCmp): adapted to new genSkipc semantics
1502         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1503           on rIfx (genCmp was broken)
1504
1505 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1506
1507         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1508         * src/z80/main.c (_keywords[]),
1509         * src/SDCCglobal.h (struct options),
1510         * src/SDCC.y,
1511         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1512         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1513         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1514         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1515         always available in leading double underscore form. The C99 support is
1516         mostly missing, but it's a start.
1517         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1518         reserved identifier "__data".
1519
1520 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1521
1522         * src/mcs51/peeph.def: fixed bug 1170013
1523
1524 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1525
1526         * device/include/mcs51reg.h: fixed bug 842007
1527
1528 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1529
1530         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1531         last time.
1532
1533 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1534
1535         * src/port.h (struct PORT),
1536         * src/avr/ralloc.c (avr_assignRegisters),
1537         * src/avr/main.c,
1538         * src/ds390/ralloc.c (ds390_assignRegisters),
1539         * src/ds390/main.c,
1540         * src/hc08/ralloc.c (hc08_assignRegisters),
1541         * src/hc08/main.c,
1542         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1543         * src/mcs51/main.c,
1544         * src/pic/ralloc.c (pic14_assignRegisters),
1545         * src/pic/main.c,
1546         * src/pic16/ralloc.c (pic16_assignRegisters),
1547         * src/pic16/main.c,
1548         * src/xa51/ralloc.c (xa51_assignRegisters),
1549         * src/xa51/main.c,
1550         * src/z80/ralloc.c (z80_assignRegisters),
1551         * src/z80/ralloc.h,
1552         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1553         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1554         * src/SDCCcse.h,
1555         * src/SDCCdflow.c (computeDataFlow),
1556         * src/SDCCdflow.h,
1557         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1558         * src/SDCCloop.h,
1559         * src/SDCCcflow.c (*),
1560         * src/SDCCcflow.h,
1561         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1562         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1563         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1564         immedDom() returning wrong block; probably fixes bug #1160833)
1565
1566 2005-03-20 Borut Razem <borut.razem AT siol.net>
1567
1568         * support/scripts/inc2h.pl: WIN32 port
1569
1570 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1571
1572         * device/lib/makefile.in: added abs.c and labs.c
1573
1574 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1575
1576         * device/include/stdint.h: added
1577         * device/lib/abs.c: added
1578         * device/lib/labs.c: added
1579         * device/include/stdlib.h: added abs() and labs() prototypes
1580         * device/lib/libsdcc.lib: added abs and labs
1581         * device/include/float.h,
1582         * device/lib/_fsmul.c,
1583         * device/lib/printf_fast.c,
1584         * device/lib/printf_tiny.c: updated comments
1585
1586 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1587
1588         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1589         bug #1164313
1590
1591 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1592
1593         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1594         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1595
1596 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1597
1598         * device/lib/printf_large.c: removed inline assembly for portability and
1599           readability. Use printf_fast if speed or size are more important.
1600         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1601         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1602
1603 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1604
1605         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1606         prevent compiler warning
1607
1608 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1609
1610         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1611         moved to level 0 and declared as static. Also they are explicit
1612         placed in access bank. This was necessery because some times they
1613         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1614         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1615         optimizations. Currently only compare to unsigned char is implemented,
1616         * src/pic16/gen.c: added fReturnIdx array,
1617         * (struct resolvedIfx) is moved to gen.h and made public,
1618         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1619         * (aopForSym): added an optimization to directly store in stack of
1620         the operand of a SEND iCode,
1621         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1622         but as registers instead (AOP_REG) using the fReturnIdx array,
1623         * (pic16_freeAsmop): remove the freed register from the
1624         _G.sregsAlloc field,
1625         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1626         a compare of 'WREG',
1627         * (pic16_popGetTempRegCond): changed function prototype, now
1628         function takes also a bitVector argument v which holds the current
1629         set of registers that are allocated for stack access by aopForSym,
1630         registers allocated in aopForSym for accessing stack symbols are not
1631         any more part of the functions usedRegs field,
1632         * (genCall): some times aopOp is called for a stack variable to be
1633         send, aopForSym might perform the push, if this is true make sure
1634         that genCall doesn't push the variable twice by testing _G.resDirect,
1635         * (genFunction): changed testing for unspecified interrupt number
1636         from 256 to INTNO_UNSPEC,
1637         * modified selection scheme of frame pointer generation. Previously
1638         if function did use local registers a frame pointer was generated,
1639         now a frame pointer is generated only if function has arguments
1640         (that need PLUSW2 register access), or has stack arguments, or the
1641         compiler is not instructed to omit the frame pointer,
1642         * (genEndFunction): before restoring local registers that were saved
1643         in the function preamble, also restore the registers that *might*
1644         have been allocated for stack access,
1645         * (genRet): removed some old comments,
1646         * (genCmp, the active (RN's) version): added a call to the
1647         pic16_genCmp_special function to perform the compare with a more
1648         robust and optimized way,
1649         * (genInline): a feature has been added in inline code generation,
1650         which allows a wildcard variable substitution when writing inline
1651         assembly. Code is incomplete and experimental therefore undocumented,
1652         * (genCast): changed order of aopOp for result and right to allow
1653         aopForSym to directly load the result if possible,
1654         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1655         perform an optimized compare on some selected special occasions,
1656         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1657         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1658         generate an IVT any more,
1659         * src/pic16/main.c (pic16_optionsTable): added command line option
1660         --optimize-cmp,
1661         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1662         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1663         macros,
1664         * src/pic16/NOTES: Raphael Neider added in list of active developers
1665         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1666         jumptable_end to prevent bug #,
1667         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1668         inCond and outCond fields,
1669         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1670         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1671         turn off register spilling,
1672         * (packRegsForOneUse): synced with other ports' versions although it
1673         is not used currently,
1674         * (pic16_packRegisters): added an optimization while reading
1675         structure bitfields, some registers may be saved (malloc code is
1676         decreased by 80 bytes)
1677
1678 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1679
1680         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1681         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1682         this can be optimized more?
1683
1684 2005-03-10 Raphael Neider <rneider AT web.de>
1685
1686         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1687           genNearPointerGet): (hopefully) fixed access to bitfields via
1688           pointers (p->bitN = x; and x = p->bitN; failed)
1689
1690 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1691
1692         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1693
1694 2005-03-09 Raphael Neider <rneider AT web.de>
1695
1696         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1697
1698 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1699
1700         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1701         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1702           (regTypeNum): set REG_BIT type if necessary
1703         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1704         * support/regression/tests/critical.c: check bug 1144613
1705
1706 2005-03-02 Raphael Neider <rneider AT web.de>
1707
1708         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1709
1710 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1711
1712         * src/avr/ralloc.c (serialRegAssign),
1713         * src/ds390/ralloc.c (serialRegAssign),
1714         * src/hc08/ralloc.c (serialRegAssign),
1715         * src/mcs51/ralloc.c (serialRegAssign),
1716         * src/pic/ralloc.c (serialRegAssign),
1717         * src/pic16/ralloc.c (serialRegAssign),
1718         * src/xa51/ralloc.c (serialRegAssign),
1719         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1720
1721 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1722
1723         * src/SDCCast.c (decorateType): fixed bug 1124787
1724
1725 2005-02-20 Hubert Sack <sack AT digiplan.de>
1726         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1727
1728         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1729         patch #1121755
1730
1731 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1732
1733         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1734         to keep the correct label reference count when adding/removing references
1735         to labels. A peephole file using this is appended to patch #1144962.
1736
1737 2005-02-14 Raphael Neider <rneider AT web.de>
1738
1739         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1740         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1741         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1742           retrievals of result operand's value on assignment
1743
1744 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1745
1746         * device/include/pic16/string.h: modified prototype for memccpy()
1747         to memccpy(void *, void *, char, size_t)
1748         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1749         check whether to omit frame pointer or not,
1750         * (genInline): convert all occurences of "\n" to LF in inline
1751         assembler blocks, this helps formatting the inline text,
1752         * (pic16_loadFSR0): modified prototype,
1753         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1754         removed some 8051 legacy code,
1755         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1756         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1757         before allocating temporary registers in functions,
1758
1759 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1760
1761         * support/regression/tests/bitvars.c: corrected the "fix"
1762
1763 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1764
1765         * support/regression/tests/bitvars.c,
1766         * support/regression/tests/bitwise.c,
1767         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1768
1769 2005-02-10 Raphael Neider <rneider AT web.de>
1770
1771         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1772           different size for Alpha
1773         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1774
1775 2005-02-09 Raphael Neider <rneider AT web.de>
1776
1777         * src/SDCC.lex(doPragma) : save and restore warning options as well
1778           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1779         * have #pragma less_pedantic set the errorlevel to WARNING
1780           (fixes #1117001)
1781         * (cloneOptimize) : fixed wrong malloc's size
1782         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1783           facilitate correct handling of #pragma (save|restore)
1784
1785 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1786
1787         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1788
1789 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1790
1791         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1792
1793 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1794
1795         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1796
1797 2005-02-02 Raphael Neider <rneider AT web.de>
1798
1799         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1800         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1801         * (pic16_storeForReturn): fixed to allow returning function pointers
1802         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1803         * device/include/pic16/{stddef.h,stdbool.h}: added
1804
1805 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1806
1807         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1808
1809 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1810
1811         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1812         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1813          appeared to be required
1814
1815 2005-01-31 Borut Razem <borut.razem AT siol.net>
1816
1817         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1818           include/mcs51 and include/z80 directories to the package
1819
1820 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1821
1822         * src/hc08/gen.c (genFunction): fixed bug #1112752
1823
1824 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1825
1826         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1827
1828 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1829
1830         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1831
1832 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1833
1834         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1835
1836 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1837
1838         * device/include/c8051fxxx.h: removed these 6 files
1839         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1840
1841 2005-01-26 Raphael Neider <rneider AT web.de>
1842
1843         * src/pic16/gen.c (genAssign): fixed assignment from longs
1844           in codespace (were cut to three bytes)
1845         * (genDummyRead): implemented (except for CODESPACE...),
1846           fixed bug #1108575
1847         * src/pic16/glue.c (emitStatistics): beautified
1848         * device/lib/pic16/libm/Makefile: added include path
1849
1850 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1851
1852         * src/z80/gen.c (aopPut): fixed bug #1103902
1853
1854 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1855
1856         * device/lib/expf.c: fixed bug #1095792
1857
1858 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1859
1860         * device/lib/pic16/libm: added Math library sources
1861
1862 2005-01-24 Raphael Neider <rneider AT web.de>
1863
1864         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1865           to enable upcast to pCodeOpReg2 (there is no type tag to
1866           differenciate the two and pic16_popGet2p cast into PCOR2)
1867         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1868           (sizeof(sectNames) changed to sizeof(sectName))
1869           Both patches fix segfaults under MinGW.
1870
1871 2005-01-23 Raphael Neider <rneider AT web.de>
1872
1873         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1874           Safe_[mc]?alloc()'ed variables
1875         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1876           of (byte sized) temporaries (assign them to WREG for now)
1877         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1878           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1879           this might fix SIGSEGVs on MinGW...
1880         * src/SDCCopt.c (killDeadCode): restored original behaviour
1881           (volatile operands might get thrown away though)
1882
1883 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1884
1885         * src/pic16/gen.c: fixed bug #1106975,
1886         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1887         pointer update, INTCON is saved, global interrupts are disabled and
1888         restored after updateing TOS.
1889         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1890         * added function attribute 'shadowregs' to take advantage of shadow
1891         registers,
1892         * added function attribute 'wparam' as an alternative to the wparam
1893         pragma,
1894         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1895         user declares a non-ISR function as 'shadowregs',
1896         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1897
1898 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1899
1900         * .version: bumped version number to 2.4.8
1901         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1902         pic16 port,
1903         * device/lib/pic16/libio/i2c/: I2C module support library,
1904         * device/include/pic16/i2c.h: I2C support library header,
1905         * device/lib/pic16/libc/stdio/: standard IO support sources,
1906         * (printf_small.c): printf_small() source, supports float print,
1907         * (printf_tiny.c): printf_tiny() source, does not support floats,
1908         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1909         enable global optimizations for entire library source, other
1910         Makefiles in the source tree are also modified to reflect this,
1911         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1912         function,
1913         * doc/sdccman.lyx: updated to reflect new changes,
1914         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1915         sym->onStack if-case,
1916         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1917         sbit, idata, _idata, xdata, _xdata,
1918         * added pragma library, to link an external library, (see doc),
1919         * removed command line options, --pomit-config-words, --pomit-ivt,
1920         --pleave-reset-vector,
1921         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1922         when calling assembler to reflect memory model used, also define
1923         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1924         reflect stack model used,
1925         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1926         on stack return NULL,
1927
1928 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1929
1930         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1931           of the operands is volatile. Fixes #1020220
1932
1933 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1934
1935         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1936         * (OptimizeRegUsage): make sure that there is really no other flow where
1937           the first pCode is used
1938
1939 2005-01-22 Raphael Neider <rneider AT web.de>
1940
1941         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1942           to fix #1106967 (pCode->seq are not set up correctly)
1943
1944 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1945
1946         * src/SDCCglue.c (glue): make sure code area is declared before the
1947         static initialization area.
1948
1949 2005-01-21 Raphael Neider <rneider AT web.de>
1950
1951         * device/lib/Makefile.in: fixed test for pic16 install dir
1952         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1953           optimizations
1954         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1955           added --optimize-goto compiler switch and pragma wparam documentation
1956         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1957         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1958           and PRODH closing bug #1071770 (peephole optimizer)
1959
1960 2005-01-19 Raphael Neider <rneider AT web.de>
1961
1962         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1963           cmdLine buffers (used when calling sdcpp...) are large enough
1964           (MAX_PATH=256 truncates arguments leading to system halts when
1965           used in MinGW...)
1966         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1967         * (genUminus): rewritten to for efficiency
1968         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1969           used uninitialized in some cases)
1970         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1971           copy the third byte from the int -- now assumes 0x80 (data memory)
1972         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1973           operands (genAddLit expects the iCode's operands to swapped as
1974           well), fixed leftover bytes (crashed for short left operands)
1975         * (pic16_genMinusDec): performance improvements, removed false
1976           PIC14 emitSKPNCs
1977         * (pic16_genMinus): fixed to cope with differently sized operands
1978         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1979           for --obanksel > 1
1980         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1981         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1982           new banksel optimization
1983         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1984           analysis for temporary registers (segfaults...)
1985         * src/pic16/peeph.def: added rule
1986
1987 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1988
1989         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1990         which converts a float number to its ASCII representation
1991         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1992         functions to convert the fractional and integer part of a float to ASCII,
1993         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1994         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1995         ram
1996         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1997         _STATMEM macros,
1998         * device/include/pic16/adc.h: added GPL info,
1999         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
2000         a pCodeOp as tested operand,
2001         * (genNearPointerGet): optimized bit testing, does not use
2002         intermediate register for bit value, test directly instead with
2003         BTFSS, BTFSC, works only for single bits,
2004         * (genpic16Code): dump the name of the iCode in the asm,
2005         * src/pic16/ralloc.c (decodeOp): removed static declaration and
2006         renamed to pic16_decodeOp,
2007         * (serialRegAssign): do not allocate a temporary register for iCode
2008         sequences that test a single bit for 1/0
2009
2010 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
2011
2012         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
2013         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
2014         access stack and frame pointers. They are initially assigned to
2015         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
2016         accessing SFRs. Updated all occurences of modification of stack or
2017         frame pointer in gen.c and pcode.c,
2018         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
2019         assigning of a literal value to pointers,
2020         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
2021         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
2022         selected
2023
2024 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2025
2026         * doc/sdccman.lyx: update documentation about stack pragma, added
2027         some info for stack memory models
2028
2029 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2030
2031         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
2032
2033 2005-01-08 Raphael Neider <rneider AT web.de>
2034
2035         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2036           udata sections to fix bug #1097823
2037
2038 2005-01-05 Raphael Neider <rneider AT web.de>
2039
2040         * src/pic16/gen.c (genGenericShift): added handling of differently
2041           sized left operand and result
2042
2043 2005-01-04 Raphael Neider <rneider AT web.de>
2044
2045         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2046         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2047           to hold the condition bit)
2048         * added new version of genCmp (old code available via #define)
2049         * added new version of genShiftLeft/genShiftRight in a generic
2050           way, now supports shifting by negative values
2051         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2052           shiftCount (expected by genGenericShift)
2053         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2054         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2055           dump
2056         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2057           is an invalid literal too...)
2058
2059 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2060
2061         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2062         from Raphael Neider,
2063         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2064         for 8-bit literals. This fixes some literal operands which are sign
2065         extended to 16-bits ints when instruction needs only 8-bits.
2066
2067 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2068
2069         * device/lib/logf.c: added mcs51 assembly version
2070         * device/lib/expf.c: added mcs51 assembly version
2071         * device/lib/_logexpf.c: new shared asm code for expf and logf
2072         * device/include/math.h: add defines for assembly math library
2073         * device/lib/Makefile.in: build new _logexpf.c
2074         * device/lib/libfloat.lib: use new _logexpf.c
2075
2076 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2077
2078         * src/pic/device.c
2079         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2080           device types which have less than 0x7f registers.
2081
2082 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2083
2084         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2085
2086 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2087
2088         * device/lib/printf_fast.c: only build on supported arch.
2089         * device/lib/printf_tiny.c: only build on supported arch.
2090         * device/lib/printf_fast_f.c: only build if asm float lib
2091         * device/lib/_fsget1arg.c: only build if asm float lib
2092         * device/lib/_fsget2args.c: only build if asm float lib
2093         * device/lib/_fsnormalize.c: only build if asm float lib
2094         * device/lib/_fsreturnval.c: only build if asm float lib
2095         * device/lib/_fsrshift.c: only build if asm float lib
2096         * device/lib/_fsswapargs.c: only build if asm float lib
2097         * device/include/stdio.h: don't provide print_fast,
2098           print_fast_f, print_tiny prototypes if --xstack used
2099
2100 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2101
2102         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2103         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2104           to the SOURCES
2105
2106 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2107
2108         * device/lib/printf_fast_f.c: same as printf_fast, but
2109           with floating point enabled
2110         * device/lib/printf_fast.c: minor tweaks
2111         * device/include/stdio.h: add printf_fast_f
2112
2113 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2114
2115         * src/SDCCmain.c: make --float-reent default for mcs51
2116         * device/lib/_fsadd.c: added mcs51 assembly version
2117         * device/lib/_fssub.c: added mcs51 assembly version
2118         * device/lib/_fsmul.c: added mcs51 assembly version
2119         * device/lib/_fsdiv.c: added mcs51 assembly version
2120         * device/lib/_fseq.c: added mcs51 assembly version
2121         * device/lib/_fsneq.c: added mcs51 assembly version
2122         * device/lib/_fsgt.c: added mcs51 assembly version
2123         * device/lib/_fslt.c: added mcs51 assembly version
2124         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2125         * device/lib/Makefile.in: add _fscmp to build
2126         * device/lib/libfloat.lib: add _fscmp to build
2127
2128 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2129
2130         * device/lib/_fs2slong.c: added mcs51 assembly version
2131         * device/lib/_fs2sint.c: added mcs51 assembly version
2132         * device/lib/_fs2schar.c: added mcs51 assembly version
2133         * device/lib/_fs2ulong.c: added mcs51 assembly version
2134         * device/lib/_fs2uint.c: added mcs51 assembly version
2135         * device/lib/_fs2uchar.c: added mcs51 assembly version
2136         * device/lib/_slong2fs.c: added mcs51 assembly version
2137         * device/lib/_sint2fs.c: added mcs51 assembly version
2138         * device/lib/_schar2fs.c: added mcs51 assembly version
2139         * device/lib/_ulong2fs.c: added mcs51 assembly version
2140         * device/lib/_uint2fs.c: added mcs51 assembly version
2141         * device/lib/_uchar2fs.c: added mcs51 assembly version
2142         * device/include/float.h: added #define to select asm vs c
2143
2144 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2145
2146         * device/lib/printf_fast.c: improvements to float output
2147         * device/include/float.h: add defines for assembly float library
2148         * device/lib/_fsget1arg.c: receive 1 float arg
2149         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2150         * device/lib/_fsnormalize.c: normalize a float
2151         * device/lib/_fsreturnval.c: return float, various helper routines
2152         * device/lib/_fsrshift.c: right shift a float's mantissa
2153         * device/lib/_fsswapargs.c: swap 2 floats
2154         * device/lib/Makefile.in: build these 6 new files for mcs51
2155         * device/lib/libfloat.lib: add these 6 files to the library
2156
2157 2004-12-26 Borut Razem <borut.razem AT siol.net>
2158
2159         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2160           built by gcc 3.4.2
2161
2162 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2163
2164         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2165           and fully reentrant and register bank neutral.
2166         * device/lib/printf_fast.c: added float (not enabled by default),
2167           added compact/slower integer (also not enabled by default),
2168           improved size/speed of fast integer code, other minor changes
2169         * device/include/stdio.h, device/lib/Makefile.in,
2170           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2171
2172 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2173
2174         * src/pic16/pcode.c: declaring variables other than at the start of a
2175           block is not supported in C by VC6.
2176
2177 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2178
2179         * applied a previous patch from Raphael Neider that wasn't included
2180         in the previous commits, which fixes infinite loops within jumptable
2181         improvements,
2182         * made some fixes that previous patches introduced
2183
2184 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2185
2186         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2187         that fixes an issue with AOP_PCODE asmop's offset,
2188         * (pic16_popCopyReg): update instance field too,
2189         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2190         function of pic port,
2191         * (genCmp, genAnd, genAssign),
2192         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2193
2194 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2195
2196         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2197         variables initial values to idata section,
2198         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2199         variables in some functions. This utilizes parmBytes field of iCode
2200         structure to hold the offset of the variable in stack. (might be
2201         able to use the stack field too?)
2202         * applied patch from Raphael Neider # ### , # ###
2203         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2204         variable initial values in idata section,
2205         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2206         for static variables with initial value
2207         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2208         applied fix in while loop from Raphael Neider.
2209
2210 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2211
2212         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2213         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2214         * src/ds390/ralloc.c (serialRegAssign): spill bits
2215         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2216         * support/Util/SDCCerr.c,
2217         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2218         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2219         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2220
2221 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2222
2223         * device/include/sdcc-lib.h: inserted LGPL, added includes
2224           asm/ds390/features.h and asm/mcs51/features.h
2225         * device/include/asm/default/features.h,
2226         * device/include/asm/gbz80/features.h,
2227         * device/include/asm/z80/features.h: added empty _AUTOMEM
2228           and _STATMEM
2229         * device/include/asm/ds390/features.h,
2230         * device/include/asm/mcs51/features.h: added files with defines for
2231           _AUTOMEM and _STATMEM indicating automatic and static storage class
2232         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2233         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2234         * src/SDCCicode.c (geniCodeCast),
2235         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2236         * src/SDCCloop.c (loopInduction): removed unused variable lr
2237         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2238           to convertToFcall to include char modulo (RFE 1065037), added check
2239           if left operand is unsigned and use abs of literal value
2240         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2241           as it doesn't work after conversion from peephole.def to peephole.rul
2242         * src/mcs51/gen.c (toBoolean): added check for size,
2243           (genModOneByte): optimized code for signed char modulo a literal
2244           power of 2 (thanks to Hubert Sack),
2245           (genRRC): removed unnecessary "clr c",
2246           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2247         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2248           jump optimization,
2249           swapped rules 256.c and 256.d,
2250           extended 256.d by using new multiple checks (thanks Erik),
2251           added rules 256.e and 256.f,
2252           updated rule 261.a and 261.b to new generated code
2253         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2254
2255 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2256
2257         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2258           induction related bugs, including first part of bug #1074377
2259
2260 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2261
2262         * applied patch from bug-report #1076292,
2263         * applied patches for genAnd and Goto-optimizations for Raphael
2264         Neider,
2265         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2266         dump a less iCode information,
2267         * src/pic16/device.h (pic16_options_t): added field debgen,
2268         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2269         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2270         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2271         puclic,
2272         * (various functions): added macros FENTRY and FENTRY2 to functions,
2273         to emit function prologue,
2274         * (various functions): fixed indentation,
2275         * (genNearPointerGet): fixed loading of FSR0,
2276         * (genPackBits): applied patch from Raphael Neider to fix updating
2277         of FSR0 and touching only the modified bits,
2278         * src/pic16/genarith.c (various functions): added macros FENTRY to
2279         emit function prologue in comments,
2280         * src/pic16/pcode.h: added functions debugf2, debugf3,
2281         * src/pic16/ralloc.c: partial fix for packForPush caused
2282         segmentation fault,
2283
2284 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2285
2286         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2287           <stsp AT users.sourceforge.net> with reversed byte order
2288         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2289
2290 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2291
2292         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2293           bug #1074377
2294         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2295         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2296
2297 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2298
2299         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2300
2301 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2302
2303         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2304           conditions,
2305           (setFromConditionArgs): friendly operand parser for peephole rules,
2306           (operandBaseName, operandsNotRelated): new peephole condition
2307           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2308           architecture specific register naming into account, handles n-way
2309           comparisons, and supports quoted literals
2310         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2311
2312 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2313
2314         * src/mcs51/peeph.def: fixed bug #1076940
2315
2316 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2317
2318         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2319
2320 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2321
2322         Adding support for replacing ljmps with sjmps in jumptables
2323         generated for switch statements. For now you need to set the
2324         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2325         Now 4 algorithms for mcs51 jumptable generation are used:
2326         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2327         addresses loaded pc-relative for up to 112 cases and stack-pushing
2328         target addresses loaded with offset from dptr for up to 256 cases.
2329
2330         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2331         * src/mcs51/main.c: adapted constants for switch table generation
2332         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2333
2334 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2335
2336         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2337         * support/regression/tests/bug1057979.c: added test for bug 1073386
2338
2339 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2340
2341         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2342         compilers
2343
2344 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2345
2346         * src/pic16/device.h,
2347         * src/pic16/genarith.c,
2348         * src/pic16/glue.c,
2349         * src/pic16/main.c,
2350         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2351
2352 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2353
2354         Large cummulative patch for pic16 port.
2355         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2356         to call when a stack overflow occurs,
2357         * (malloc.h): added CVS Id tag,
2358         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2359         variable,
2360         * added libc directory. The current version of LibC contains string
2361         functions, ctype functions and macros and some functions of the
2362         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2363         be extensively tested in the future. Standard disclaimer here.
2364         Library is not automatically build yet. But one can build it by
2365         invoking 'make' inside the libc directory.
2366         * added ADC library under libio. Preliminary version yet.
2367
2368         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2369         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2370         aopForRemat() now and not by pic16_aopOp(),
2371         * (pic16_popGetTempReg): removed warning messgae when allocating
2372         temporary registers, its a buggy feature and will be removed,
2373         * (pic16_popGet): set register instance field in AOP_CRY,
2374         * (pic16_outBitC): fixed for results in size greater than 1,
2375         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2376         * (pic16_storeForReturn): optimized return of 0,
2377         * (genCmp): experimental code for new genCmp which uses PIC18's
2378         special compare&skip instructions. Initial tests fail some times
2379         with variables grater than 1 byte in size, so new code is disabled,
2380         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2381         a single bit,
2382         * (genCast): began a fix to optimize the casting of a bit to another
2383         bit, now assigning a bitfield to another bitfield will fail, sorry,
2384         * src/pic16/main.c: disabled the use of lr-support feature,
2385         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2386         * added some function prototypes, added function _debugf prototype,
2387         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2388         bits with offset (case PO_GPR_BIT),
2389         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2390         command line,
2391         * (isBankInstruction): modified to return 0 for no banking instruction,
2392         and 1 for banking instruction,
2393         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2394         caused stop processing pCodes after a inline assembly block,
2395         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2396         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2397         registers when it shouldn't,
2398         * src/pic16/ralloc.c (allocReg): add preliminary support for
2399         supporting a limited set of temporary registers,
2400
2401 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2402
2403         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2404           genDataPointerSet): ensure assignments always copy in MSB to LSB
2405           order,
2406           (loadRegFromAop): recognize CLRH optimization,
2407           (genFunction): optimize RECEIVE iCodes in reentrant functions
2408
2409 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2410
2411         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2412           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2413           selected.
2414         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2415         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2416           contiguous with data
2417
2418 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2419
2420         * device/lib/_gptrget.c (_gptrget),
2421         * device/lib/_gptrgetc.c (_gptrgetc),
2422         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2423           instead of sjmp to ret
2424         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2425           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2426
2427 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2428
2429         * .version: bumped version to 2.4.7
2430         * device/lib/_gptrget.c (_gptrget): is now _naked
2431         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2432         * device/lib/_gptrput.c (_gptrput): is now _naked
2433         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2434           (createFunction): fixed xstack
2435         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2436         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2437           or bit either,
2438           (geniCodeCritical): store original interrupt state in an iTemp bit
2439           var unless stack-auto
2440         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2441         * src/SDCCmain.c (setIncludePath): added include/target to search path
2442         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2443         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2444           prototype,
2445           (processFuncArgs): put bit vars in bit area
2446         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2447           unsaveRBank): fixed xstack,
2448           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2449           (genFunction, genEndFunction): fixed xstack,
2450           (genAssign): optimization don't walk backwards through mem
2451         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2452         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2453         * support/regression/Makefile: also make library (for stack-auto) when
2454           making "all" and added "test-mcs51-xstack-auto"
2455         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2456         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2457         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2458         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2459         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2460           make-library by MAKE_LIBRARY
2461         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2462           regression tests for xstack
2463         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2464         * support/regression/tests/critical.c: test for critical on mcs51
2465
2466 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2467
2468         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2469           built version of sdcc instead of installed version
2470
2471 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2472
2473         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2474         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2475           vprintf.c now
2476         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2477         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2478           WARNING: remove device/lib/build/z80/printf.o by hand when
2479           updating from previous build!
2480         * device/lib/z80/printf.c: updated comment
2481         * support/regression/tests/bug1057979.c: test all ports now
2482         * support/regression/tests/bug1065458.c: file added
2483
2484 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2485
2486         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2487           *_start and *_end symbols for static functions
2488
2489 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2490
2491         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2492           and search crt0.o in all library paths,
2493           (setIncludePath): proper handling of --nostdinc,
2494           (setLibPath): proper handling of --nostdlib
2495         * support/regression/Makefile,
2496         * support/regression/ports/ds390/spec.mk,
2497         * support/regression/ports/gbz80/spec.mk,
2498         * support/regression/ports/hc08/spec.mk,
2499         * support/regression/ports/mcs51/spec.mk,
2500         * support/regression/ports/mcs51-large/spec.mk,
2501         * support/regression/ports/mcs51-stack-auto/spec.mk,
2502         * support/regression/ports/z80/spec.mk: use include and lib files from
2503           built version of sdcc instead of installed version
2504         * doc/sdccman.lyx: fixed typo in --nostdinc
2505
2506 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2507
2508         * src/pic/pcode.c,
2509         * src/pic/device.c,
2510         * src/pic/ralloc.c,
2511         * src/pic/gen.c : added support to generate code for struct bit fields.
2512
2513 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2514
2515         * as/xa51/xa_version.h,
2516         * device/include/errno.h,
2517         * device/include/regc515c.h,
2518         * device/lib/_itoa.c,
2519         * device/lib/_ltoa.c,
2520         * device/lib/ser_ir_cts_rts.c,
2521         * sim/ucsim/xa.src/glob.cc,
2522         * sim/ucsim/xa.src/inst_gen.cc,
2523         * sim/ucsim/xa.src/xa_bit.cc,
2524         * sim/ucsim/xa.src/xa_sfr.cc,
2525         * sim/ucsim/z80.src/inst_dd.cc,
2526         * sim/ucsim/z80.src/inst_fdcb.cc,
2527         * support/scripts/keil2sdcc.pl,
2528         * src/pic16/pic16.dsp,
2529         * src/pic16/pic16a.dsp: corrected cvs line endings
2530         * device/lib/printf_large.c: fixed bug 1057979
2531         * src/pic16/gen.c: fixed non-C standard code
2532         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2533         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2534         * support/regression/ports/mcs51/support.c: reload T1 asap
2535         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2536           pdata use and clear idata startup behaviour
2537         * support/regression/tests/bug1057979.c: added
2538
2539 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2540
2541         * device/examples/ds390/ow390/ad26.h,
2542         * device/examples/ds390/ow390/cnt1d.h,
2543         * device/examples/ds390/ow390/crcutil.c,
2544         * device/examples/ds390/ow390/ownet.h,
2545         * device/examples/ds390/ow390/owsesu.c,
2546         * device/examples/ds390/ow390/swt12.h,
2547         * device/examples/ds390/ow390/swtoper.c,
2548         * device/examples/ds390/ow390/temp10.h,
2549         * device/examples/ds390/ow390/thermodl.c,
2550         * device/examples/ds390/tinitalk/tinitalk.dsp,
2551         * device/examples/ds390/tinitalk/tinitalk.dsw,
2552         * device/examples/mcs51/clock/hw.h,
2553         * device/examples/mcs51/simple2/go.bat,
2554         * device/examples/serialcomm/windows/serial.h,
2555         * device/examples/xa51/dummy.c,
2556         * device/examples/xa51/hello.c,
2557         * device/include/80c51xa.h,
2558         * device/include/at89x051.h: corrected cvs line endings
2559
2560 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2561
2562         * src/pic16/main.c (options): added command line --gstack, to trace
2563         stack over/under flows,
2564         * added pragma 'wparam' to allow passing first byte of function
2565         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2566         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2567         call to __gstack_test function and sets up the symbol as extern,
2568         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2569         * popaop): added call to pic16_testStackOverflow,
2570         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2571         wparamList list,
2572         * (genCall, genPcall): now all parameters are passed via stack
2573         except in functions that are pass to wparam pragma in which WREG is
2574         used too,
2575         * (genPcall): REENTRANT flag is checked to see if variable prototype
2576         contains reentrant keyword, don't call a non-reentrant function, via
2577         a reentrant function pointer or vice versa, functions are never
2578         passed via WREG,
2579         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2580         D.Winkler,
2581         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2582         SIGSEGV when accessing a NULL register stucture,
2583         * (pic16_printGPointerType): modified to handle UPPER modifier for
2584         function initializers, changed prototype of function to simpler one,
2585         * (pic16_printIvalFuncPtr): check to see if function is already
2586         added in externs list,
2587         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2588         optimized a move from W to SFR with a move to the same register
2589         later after a CALL,
2590         * device/lib/pic16/debug: NEW directory, contains debug features
2591         which are enabled when linking with libdebug.lib, currently command
2592         line option --gstack enables stack pointer tracing for over/under
2593         flow, corresponding sources are in debug/gstack
2594
2595 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2596
2597         * doc/sdccman.lyx: updated SDCC version,
2598         * (PIC16 port): update list of command line options,
2599         * src/pic16/device.h (structure pic16_options_t): added field gstack
2600         to enable stack overflow tracing on push/pops,
2601         * src/pic16/device.c (statistics structure): added statistics
2602         structure,
2603         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2604         pic16_dump_int_registers): increase statistics counters for each
2605         * variable which is encountered
2606         * (pic16_dump_usection): emit each .udata variable to its own udata
2607         section,
2608         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2609         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2610         parameters via stack, otherwise use old scheme,
2611         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2612         assembler output file,
2613         * src/pic16/main.c: added command line options --gstack to enable
2614         push/pop tracing for stack overflow,
2615         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2616         instructions): added size of each instruction,
2617         * (pic16_countInstruction): estimate size of instructions in
2618         the_pFile list, inline assembly blocks are not counted,
2619         * (pic16_FixRegisterBanking): trace previous register usage, when
2620         banksel optimizations is greater than 0, don't emit a redudant
2621         banksel directive,
2622
2623 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2624
2625         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2626         * src/pic16/ralloc.c : applied same fix for pic16.
2627         * src/pic/gen.c : tidied it up a little.
2628
2629 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2630
2631         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2632         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2633
2634 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2635
2636         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2637
2638 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2639
2640         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2641         non-reentrant function __modsint in the interrupt function (thus
2642         corrupting math operations during serial I/O)
2643         * device/lib/ser_ir.c: as above, changed buffersize
2644         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2645         256.c,d for zeroing
2646         * doc/Makefile: added option -t for rsync
2647
2648 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2649
2650         * src/SDCCast.h (struct ast),
2651         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2652
2653 2004-10-20 Borut Razem <borut.razem AT siol.net>
2654
2655         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2656         package
2657
2658 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2659
2660         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2661         makefile targets,
2662         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2663         support functions to replace long sequences of MOVFF's from access
2664         bank registers to stack and vice versa,
2665         * src/pic16/device.h: added new field opt_flags, where optimization
2666         flags can be set to enable certain features,
2667         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2668         * pBlock, (genFunction, genEndFunction): surroung loop for
2669         saving/loading used registers in stack with PC_INFO pCodes,
2670         INF_LREGS. Code in between can then be optimized by pCode optimizer
2671         to support function calls,
2672         * (genDataPointerSet): fixed bug which loaded float fields in
2673         structures with corrupt data,
2674         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2675         in a standard way debug info on stderr. Feature used for developing
2676         and debugging only,
2677         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2678         obsolete chunks of code,
2679         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2680         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2681         * pic16/src/pcode.c (pic16_newpCodeInfo,
2682         * (pic16_newpCodeOpLocalRegs),
2683         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2684         feature,
2685         * (pic16_pCodeConstString): printing of the initial value of a
2686         symbol as a comment is inhibited since parsing was already done by
2687         copyStr and output is corrupt,
2688         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2689
2690 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2691
2692         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2693
2694 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2695
2696         * as/mcs51/lkarea.c: removed old K&R style,
2697           (lnksect): changed check on boundary error,
2698           (lnksect2): changed check on boundary error,
2699           (lnksect2): extend XSTK to end of page if size = 1
2700         * as/mcs51/lkmain.c: removed old K&R style,
2701           (Areas51): create l_IRAM symbol
2702         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2703         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2704           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2705         * device/lib/_mullong.c: added version to be compiled with xstack
2706         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2707         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2708         * device/lib/mcs51/crtxstack.asm: fixed comment
2709         * src/SDCCglue.c: maxInterrupts defaults to 0,
2710           (emitMaps): added pdata,
2711           (createInterruptVect): (re)moved default,
2712           (glue): added pdata,
2713           (glue): moved __start__xstack to XSTK with default size 1
2714         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2715           and options.float_rent when options.stackAuto is set,
2716           (linkEdit): only write XDATA_NAME if provided on command line
2717         * src/SDCCmem.h,
2718         * src/SDCCmem.c: added pdata
2719         * src/port.h: added pdata_name to PORT
2720         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2721           (saveRegisters, unsaveRegisters): removed usage of B,
2722           (genMinus): fixed accumulator clash,
2723           (genJumpTab): added comment, this needs another look
2724         * src/mcs51/gen.c: added check for "B in use" paranoia,
2725           added pushB() and popB()
2726         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2727           chance
2728         * src/avr/main.c,
2729         * src/ds390/main.c,
2730         * src/hc08/main.c,
2731         * src/mcs51/main.c,
2732         * src/pic/main.c,
2733         * src/pic16/main.c,
2734         * src/xa51/main.c,
2735         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2736           added PSEG (PAG,XDATA) or NULL to port specifier
2737         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2738         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2739           (_mcs51_genInitStartup): removed __start__xstack equ,
2740           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2741         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2742         * src/z80/gen.c (_rleAppend): fixed warnings
2743         * support/regression/tests/zeropad.c: added pdata test
2744         * .version: bumped to 2.4.6
2745
2746 2004-10-17 Borut Razem <borut.razem AT siol.net>
2747
2748         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2749         as a part of nightly build
2750
2751 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2752
2753         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2754         WREG holds the first byte function parameters,
2755         * (aopForSym): take special case for symbols which are in FARSPACE
2756         but in CODESPACE too,
2757         * (assignResultValue): modified to take into account _G.useWreg,
2758         * (genCall): don't use wreg for parameter passing when function is
2759         declared as reentrant, too, added optimization INCF to stack
2760         pointer when stack parameter count is 1,
2761         * (genFunction, genEndFunction): refurnished and fixed to not using
2762         wreg for passing parameters when function has varargs or is
2763         reentrant, fixed bug with symbol name compare for generating
2764         functions in absolute address,
2765         * (pic16_storeForReturn): refurnished,
2766         * (genCmp): began writing a new version of the function, not ready
2767         yet, therefore it is disabled,
2768         * (genAssign): do not read code memory when assigning a function to
2769         a pointer function,
2770         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2771         array of characters, not pointer,
2772         * (pic16initialComments): in debug mode emit an .ident directive for
2773         the assembler,
2774         * (_process_pragma): emit a new warning type (internal to pic16)
2775         when setting stack to default length, emit a similar warning when
2776         placing a function at absolute address and address is not word aligned
2777         * (_pic16_parseOptions): added 'return TRUE' statement,
2778         * (_pic16_linkEdit): if compiling a source, then add the source's
2779         file object, first in the list of objects to link,
2780
2781 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2782
2783         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2784         * src/pic/main.c : removed VC warning.
2785         * src/pic/gen.c : changed comment.
2786
2787 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2788
2789         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2790         reference to a deprecated symbol _GPTRREG was causing failure to
2791         link. Thanks G. M. Gallant for the info.
2792
2793 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2794
2795         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2796         comments for Bugs item #954788.
2797
2798 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2799
2800         * src/pic16/device.c (pic16_dump_gsection,
2801         * pic16_groupRegistersInSection): handle symbols declared to be in
2802         access bank differently,
2803         * src/pic16/gen.c (struct _G): added field resDirect,
2804         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2805         send values read from stack directly to result and don't allocate
2806         temporary values,
2807         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2808         same registers,
2809         * (pic16_sameRegsOfs): NEW,
2810         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2811         free because they were not allocated from temporary pool,
2812         * pic16_popRegFromString): workaround to fix a problem with
2813         allocating variables twice or never,
2814         * (genGenPointerGet): using PRODL instead of FSR0H,
2815         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2816         instead of FSR0H,
2817         * (genAssign): take advantage of the _G.resDirect flag,
2818         * (genCast): around line 11844, use mov2f instead of directly
2819         MOVFF'ing between operands to account for literal values,
2820         * src/pic16/genutils.c: some new debug functions for gpsim have been
2821         added,
2822         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2823         float with integer part only,
2824         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2825         place variables in access bank
2826         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2827         updated sources to reflect recent changes in gen.c
2828
2829 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2830
2831         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2832         sources that searched for headers in installation path, now the
2833         device/include/pic16 is used,
2834         * src/pic16/glue.c (pic16glue),
2835         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2836         .line directives if not in debug mode, this suppresses assembler's
2837         warnings for ignored directives
2838
2839 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2840
2841         * src/port.h: made reset_regparms prototype void parameter explicit.
2842         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2843         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2844         * doc/sdccman.lyx: documented warning disabling and how to use
2845           printf_large to make it print floats.
2846         * device/include/stdbool.h: NEW
2847         * device/lib/_atof.c,
2848         * device/lib/_divuint.c,
2849         * device/lib/_divulong.c,
2850         * device/lib/expf.c,
2851         * device/lib/printf_large.c,
2852         * device/lib/sincosf.c,
2853         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2854         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2855           a completely reentrant lib.
2856
2857 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2858
2859         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2860         * device/include/pic16/stdio.h: fixed bug with colon
2861
2862 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2863
2864         * device/include/pic16/stdio.h,
2865         * device/include/pic16/stdlib.h,
2866         * device/include/pic16/math.h: NEW
2867         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2868         declared as _naked to reduce overhead
2869         * device/lib/Makefile.in (target port-specific-objects-pic16):
2870         changed * to *.* so to ignore the CVS directory,
2871         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2872         stacked variables back in stack,
2873         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2874         corruption
2875
2876 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2877
2878         * .version: bumped version number to 2.4.5
2879         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2880         * support/Util/SDCCerr.c (messages structure): added entry for
2881         W_POSSBUG2
2882
2883         Large cumulative patch for pic16 port and libraries.
2884         * device/include/pic16/sdcc-lib.h,
2885         * device/include/pic16/stdarg.h,
2886         * device/include/asm/pic16/features.h,
2887         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2888         * device/include/pic16/float.h: changes reentrant keyword with
2889         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2890         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2891         updated target build-libraries to include objects from gptr,
2892         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2893         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2894         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2895         all function headings,
2896         * src/SDCCmain.c: added global parameter userIncDirsSet,
2897         * (parseCmdLine): when option -I is encountered add directory to
2898         userIncDirsSet too,
2899         * src/version.awk: added space between control and long,
2900         * src/pic16/NOTES: added some notes for the port,
2901         * src/pic16/gen.c: added prototype for mov2fp function,
2902         * (fReturnpic16[]): properly named return value registers,
2903         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2904         * (aopForSym): added code to handle symbols with onStack flag set,
2905         symbols onStack are allocated PTRSIZE bytes,
2906         * (aopFreeAsmop): handles special case where asmops are stack objects,
2907         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2908         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2909         added argument lock to trace flaws in allocating temporary registers
2910         when developing port,
2911         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2912         * (pic16_popRegFromString): reenabled allocating a direct register
2913         from string,
2914         * (assignResultValue): various beautifications,
2915         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2916         referenced function argument,
2917         * (genIpush): reenabled to allow stacked arguments, handles only
2918         ic->parmPush iCodes,
2919         * (genCall, genPcall): major changes to allow for variable argument
2920         functions, fixed a bug with falsely restoring stack pointer after
2921         returning from call,
2922         * (genFunction): pending code for critical function,
2923         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2924         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2925         * (genNearPointerGet): fixed bug with indirect reading, was always
2926         reading from INDF0
2927         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2928         pointers,
2929         * (genAddrOf): rewrote code to take address of a stacked function parameter
2930         * (genCast): fixed casting to generic pointer type,
2931         * src/pic16/gen.h: added AOP_STA,
2932         * (struct asmop): added field stk,
2933         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2934         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2935         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2936         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2937         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2938         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2939         generic pointers,
2940         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2941         and library paths,
2942         * (pic16_port structure): generic pointer size is set to 3,
2943         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2944         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2945         compiler warning,
2946         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2947         operand is an iTemp,
2948
2949 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2950
2951         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2952         * debugger/mcs51/simi.c: addapt new syntax of s51
2953
2954 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2955
2956         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2957         * src/pic16/pcode.c: commented out some calls to free() in order to
2958         fix bug #989576,
2959
2960 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2961
2962         * src/SDCCicode.h,
2963         * src/SDCCicode.c (isiCodeInFunctionCall),
2964         * src/avr/ralloc.c (selectSpil),
2965         * src/pic/ralloc.c (selectSpil),
2966         * src/pic16/ralloc.c (selectSpil),
2967         * src/ds390/ralloc.c (selectSpil),
2968         * src/hc08/ralloc.c (selectSpil),
2969         * src/xa51/ralloc.c (selectSpil),
2970         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2971         stack in the middle of a function call sequence (fixes bug #1020268)
2972         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2973         costs associated with the minimum switch case.
2974
2975 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2976
2977         * src/SDCC.lex: fixed bug #1030549
2978
2979 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2980
2981         * src/SDCCcse.h (struct cseDef),
2982         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2983         over a function call if the CSE is derived from a symbol whose
2984         address has been taken (fixes bug #1029883)
2985         * support/regression/tests/bug-1029883: a new regression test for
2986         this bug
2987
2988 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2989
2990         * src/hc08/gen.c (emitinline): fixed bug #1029778
2991         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2992         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2993         and starts toward RFE #905167)
2994
2995 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2996
2997         * src/pic16/gen.c (mov2f): New function to move an operand to
2998         another without considering if it is a literal or a register,
2999         * (pic16_sameRegs): don't check if they are both AOP_REG,
3000         * (AccRsh): removed andmask=0 lines,
3001         * (genLeftShift): duplicated to be improved in future versions,
3002         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
3003         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
3004         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
3005         * (pic16initMnemonics): added initialization for POC_INFSNZW,
3006         * (insertBankSwitch): fixed inserting banksel directives algorithm
3007         for instructions that follow a skip instruction, this fixes a report
3008         for broken subtraction code generation,
3009         * src/pic16/ralloc.c (deassignLRs): do not free register if current
3010         iCode is a left op, just in case result and right share the same
3011         registers
3012
3013 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3014
3015         * src/hc08/main.c,
3016         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
3017         preservation of HX
3018         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
3019         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
3020         on 2004-09-12; it was buggy
3021
3022 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
3023
3024         * src/SDCCsymt.h: removed RESULT_CHECK
3025         * src/SDCCast.c,
3026         * src/SDCCglue.c,
3027         * src/SDCCval.c,
3028         * src/pic/glue.c,
3029         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
3030
3031 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
3032
3033         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
3034         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
3035         configuration values no more rejected by compiler, they are assigned
3036         to configuration registers with a warning message instead,
3037         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3038         the for-loop so last conf register is emitted too,
3039         * (_pic16_initPaths): link library libsdcc.lib by default,
3040         * (_hasNativeMulFor): modified test for multiplication according to
3041         Raphael Neider's remarks. Integer multiplication is also done with
3042         support functions,
3043         * device/include/pic16/pic18fregs.h: corrected type error in while
3044         testing and including 18f6720 header file
3045
3046 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3047
3048         * src/pic16/device.h (pic16_options): removed field use_crt,
3049         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3050         until an optimization to handle single bits is added,
3051         * (pic16_loadFSR0): moved before genUnpackBits,
3052         * (genAnd): some white lines removed,
3053         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3054         leave_reset flags in pic16_options when using crt modules,
3055
3056 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3057
3058         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3059           for bugs 898889 & 979599. Also used some safer print instructions.
3060
3061 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3062
3063         * src/pic16/device.h (pic16_options_t): added field use_crt,
3064         crt_name, no_crt,
3065         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3066         catch a probable future bug,
3067         * src/pic16/gen.c: aopIdx function commented out,
3068         * (genAssign): commented out old code which used aopIdx,
3069         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3070         code, added if conditionals to take into account the --use-crt
3071         command line options,
3072         * src/pic16/main.c (pic16_optionsTable): added new command line
3073         options, --use-crt= and --no-crt,
3074         * (_pic16_linkEdit): now the proper crt object is added in the
3075         linker command line except than when --no-crt is specified,
3076         * src/pic16/pcode.c,
3077         * src/pic16/pcode.h: added some structures and functions for a new
3078         optimization scheme to compansate for instruction overhead between
3079         same iCodes, this scheme is currently under development and is not
3080         working in any way,
3081         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3082         to && operator,
3083         * device/lib/pic16/startup/crt0i.c,
3084         * device/lib/pic16/startup/crt0iz.c: added global char variable
3085         __uflags to force the generation of an idata section
3086
3087 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3088
3089         * doc/Makefile,
3090         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3091         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3092
3093 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3094
3095         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3096         Frieder) and clarified the default code optimization mode
3097
3098 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3099
3100         * src/SDCC.lex (doPragma, process_pragma),
3101         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3102         "opt_code_size", and "opt_code_balanced"
3103         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3104         regrouped options by category, added support for category headers
3105         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3106         and "--opt-code-size"
3107         * doc/sdccman.lyx: documented these new options and pragmas
3108         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3109         preference into account
3110
3111 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3112
3113         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3114           geniCodePreDec): Fixed bug 904237 by generating a warning
3115         * src/SDCCerr.h,
3116         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3117
3118 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3119
3120         * src/pic/device.c : When no max ram set validate full memory range.
3121         * src/pic/pcode.c,
3122         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3123
3124 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3125
3126         * device/lib/_gptrget.c,
3127         * device/lib/_gptrput.c: updated comment
3128         * device/lib/calloc.c,
3129         * device/lib/free.c,
3130         * device/lib/malloc.c,
3131         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3132         * src/SDCCcse.c (cseBBlock),
3133         * src/SDCCicode.c (printOperand, geniCodeArray),
3134         * src/SDCCicode.h (struct operand): fixed bug 868103
3135         * support/regression/tests/bug-868103.c: added
3136         * src/SDCCast.c (searchLitOp),
3137         * src/SDCCcse.h (struct cseDef),
3138         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3139         * src/SDCCicode.h (struct operand),
3140         * src/SDCCsymt.h (struct sym_link),
3141         * src/avr/gen.c (hasInc),
3142         * src/ds390/gen.c (hasInc),
3143         * src/hc08/gen.c (genPlusIncr, hasInc),
3144         * src/mcs51/gen.c (hasInc),
3145         * src/pic16/glue.c (pic16_printIvalChar),
3146         * src/pic16/ralloc.c (regWithIdx),
3147         * src/xa51/gen.c (hasInc) : removed warnings
3148         * src/SDCCast.c (createBlock): added comment ???
3149         * src/hc08/ralloc.c: updated comments
3150
3151 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3152
3153         * doc/sdccman.lyx: updated section on switch statements, added
3154         section about semaphore locking
3155         * doc/Makefile: added option -info for latex2html
3156         * device/lib/_gptrget.c,
3157         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3158
3159 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3160
3161         * src/pic/device.h,
3162         * src/pic/device.c,
3163         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3164          maxram is less than 0x100.
3165
3166 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3167
3168         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3169
3170 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3171
3172         * src/port.h,
3173         * src/mcs51/main.c,
3174         * src/ds390/main.c,
3175         * src/z80/main.c,
3176         * src/hc08/main.c,
3177         * src/pic/main.c,
3178         * src/pic16/main.c,
3179         * src/avr/main.c,
3180         * src/xa51/main.c
3181         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3182         a jump table is the best form for a switch statement, including
3183         automatic insertion of missing cases to make the case range
3184         continuous. Developed in collaboration with Frieder Ferlemann.
3185
3186 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3187
3188         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3189         accumulator result if it needs sign extension
3190
3191 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3192
3193         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3194
3195 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3196
3197         * device/lib/gbz80/printf.c,
3198         * device/lib/z80/printf.c: removed define for NULL
3199
3200 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3201
3202         * as/xa51/xa_link.c,
3203         * device/examples/ds390/ow390/ad26.c,
3204         * device/examples/ds390/ow390/cnt1d.c,
3205         * device/examples/ds390/ow390/counter.c,
3206         * device/examples/ds390/ow390/ds2480.h,
3207         * device/examples/ds390/ow390/ds2480ut.c,
3208         * device/examples/ds390/ow390/findtype.c,
3209         * device/examples/ds390/ow390/gethumd.c,
3210         * device/examples/ds390/ow390/owllu.c,
3211         * device/examples/ds390/ow390/ownetu.c,
3212         * device/examples/ds390/ow390/swt12.c,
3213         * device/examples/ds390/ow390/swtloop.c,
3214         * device/examples/ds390/ow390/temp.c,
3215         * device/examples/ds390/ow390/temp10.c,
3216         * device/examples/ds390/ow390/thermo21.c,
3217         * device/examples/ds390/ow390/tinilnk.c,
3218         * device/examples/ds390/ow390/tstfind.c,
3219         * device/examples/serialcomm/windows/serial.cpp,
3220         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3221         * device/include/reg51.h: fixed line endings for cvs
3222
3223 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3224
3225         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3226         packRegsForAccUse, packRegisters): new accumulator register
3227         packing algorithm
3228         * support/regression/ports/hc08/support.c (_putchar): suppress
3229         warning of unused variable
3230         * src/SDCCicode.c: added SWAP entry to codeTable
3231
3232 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3233
3234         * device/lib/sprintf.c: forgot to add this file before previous commit
3235
3236 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3237
3238         * src/pic16/gen.c (genPackBits): added operand right in function
3239         parameters, load result directly if p_type is POINTER (that is
3240         called by genNearPointerSet)
3241         * (genUnPackBits): added operand left in function parameters,
3242         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3243         FSR0 if accessing bitfields,
3244
3245 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3246
3247         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3248           _print_format; updated printf, sprintf, vsprintf
3249         * device/include/asm/default/features.h: corrected comment/define
3250         * device/lib/Makefile.in: added sprintf.c
3251         * device/lib/libsdcc.lib: added sprintf module
3252         * device/lib/printf_large.c,
3253         * device/lib/vprintf.c,
3254         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3255           into these 3 files
3256         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3257         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3258         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3259           hc08 test
3260         * support/regression/tests/zeropad.c: define idata as data for hc08
3261
3262 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3263
3264         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3265         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3266         labels are referenced at least once (even if a reference is not found)
3267         * src/hc08/gen.c (emitcode): set isComment flag for comments
3268         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3269         loads), rules 6a..6b (optimize jumps to return)
3270
3271 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3272
3273         * device/lib/acosf.c (acosf),
3274         * device/lib/asinf.c (asinf),
3275         * device/lib/atanf.c (atanf),
3276         * device/lib/ceilf.c (ceilf),
3277         * device/lib/cosf.c (cosf),
3278         * device/lib/coshf.c (coshf),
3279         * device/lib/cotf.c (cotf),
3280         * device/lib/fabsf.c (fabsf),
3281         * device/lib/floorf.c (floorf),
3282         * device/lib/log10f.c (log10f),
3283         * device/lib/logf.c (logf),
3284         * device/lib/sinf.c (sinf),
3285         * device/lib/sinhf.c (sinhf),
3286         * device/lib/sqrtf.c (sqrtf),
3287         * device/lib/tanf.c (tanf),
3288         * device/lib/tanhf.c (tanhf),
3289         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3290         replaced all instances of "reentrant" in the library functions
3291         defined in math.h with this macro.
3292         * support/regression/tests/float_trans.c: reenabled test for hc08
3293
3294 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3295
3296         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3297         erroneously deleted
3298
3299 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3300
3301         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3302         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3303         multi-byte volatile operands are used
3304         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3305         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3306         initialization to area GSINIT0 so that it would always precede
3307         any static initializers in GSINIT
3308         * support/regression/tests/zeropad.c: fixed idata define for hc08
3309         * support/regression/tests/bug-927659.c,
3310         * support/regression/tests/float_trans.c: disabled tests for hc08
3311         pending missing library routines
3312         * .version: increased version number to 2.4.4 - hc08 port now passes
3313         regression tests
3314
3315
3316 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3317
3318         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3319         * Makefile.common.in,
3320         * as/Makefile,
3321         * as/hc08/Makefile.in,
3322         * as/mcs51/Makefile.in,
3323         * as/z80/Makefile.in,
3324         * debugger/mcs51/Makefile.in,
3325         * device/include/Makefile.in,
3326         * device/lib/Makefile.in,
3327         * doc/Makefile,
3328         * link/Makefile,
3329         * link/z80/Makefile.in,
3330         * packihx/Makefile.in,
3331         * sim/ucsim/main_in.mk,
3332         * sim/ucsim/avr.src/Makefile.in,
3333         * sim/ucsim/doc/Makefile.in,
3334         * sim/ucsim/gui.src/serio.src/Makefile.in,
3335         * sim/ucsim/hc08.src/Makefile.in,
3336         * sim/ucsim/s51.src/Makefile.in,
3337         * sim/ucsim/xa.src/Makefile.in,
3338         * sim/ucsim/z80.src/Makefile.in,
3339         * src/Makefile.in,
3340         * support/cpp2/Makefile.in,
3341         * support/librarian/Makefile,
3342         * support/makebin/Makefile: added DESTDIR to the install path proposed
3343         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3344         * doc/sdccman.lyx: added DESTDIR documentation
3345
3346 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3347
3348         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3349         instruction for interrupt handlers, use fast returns when returning
3350         from high priority interrupts
3351
3352 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3353
3354         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3355         code generation
3356         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3357         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3358         bugs, ported much of Bernhard's code from mcs51
3359         * src/mcs51/gen.c (genSend),
3360         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3361         than one when calling a reentrant function
3362         * device/lib/_mullong.c: defined an alternate struct layout for big
3363         endian ports (hc08)
3364
3365 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3366
3367         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3368         test
3369
3370 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3371
3372         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3373         are sane and complete before asking the port its prefered parameter
3374         passing method (fixes bug #1017633)
3375         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3376         and _ret3
3377
3378 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3379
3380         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3381         problem in bitfields >= 8 bits.
3382
3383 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3384
3385         * src/SDCCsymt.c: undid changes that were not meant to be committed
3386
3387 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3388
3389         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3390
3391 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3392
3393         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3394           copied and wrong bit got inverted
3395
3396 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3397
3398         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3399         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3400         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3401         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3402         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3403         assignments to bitfields at known addresses
3404         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3405         reads from bitfields at known addresses
3406         * src/hc08/ralloc.c (packRegisters),
3407         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3408         genhc08Code): optimize pointer get values used as conditionals
3409         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3410         and branch
3411
3412 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3413
3414         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3415         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3416         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3417         as conditionals
3418
3419 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3420
3421         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3422
3423 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3424
3425         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3426         related problems
3427
3428 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3429
3430         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3431
3432 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3433
3434         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3435         mcs51 port
3436
3437 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3438
3439         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3440
3441 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3442
3443         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3444         cases use more compact code.
3445
3446 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3447
3448         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3449
3450 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3451
3452         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3453
3454 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3455
3456         * src/SDCCsymt.h,
3457         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3458         parameter of changePointer() from symbol* to sym_link*
3459         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3460         * src/SDCCsymt.c (compareType): void* type is castable to other
3461         pointers, but not necesarily an exact match.
3462         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3463         is no longer blindly treated as an exact match.
3464         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3465
3466 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3467
3468         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3469
3470 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3471
3472         * src/pic/gen.c,
3473         * src/pic/pcode.c,
3474         * src/pic/ralloc.h,
3475         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3476
3477 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3478
3479         * src/pic/device.c,
3480         * src/pic/device.h,
3481         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3482
3483 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3484
3485         * src/mcs51/gen.c (emitcode): fixed bug #992819
3486
3487 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3488
3489         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3490           there's no need to make it worse
3491
3492 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3493
3494         * src/mcs51/ralloc.c (deassignLR),
3495         * src/ds390/ralloc.c (deassignLR),
3496         * src/hc08/ralloc.c (deassignLR),
3497         * src/z80/ralloc.c (deassignLR),
3498         * src/pic/ralloc.c (deassignLR),
3499         * src/pic16/ralloc.c (deassignLR),
3500         * src/avr/ralloc.c (deassignLR),
3501         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3502         rlivePoint): fixed another part of bug #971834
3503
3504 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3505
3506         * src/z80/main.c: enabled "critical" keyword
3507         * src/z80/mappings.i,
3508         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3509         functions (fixes bug #979646)
3510         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3511
3512 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3513
3514         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3515           such as c:\mydir.
3516
3517 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3518
3519         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3520           doesn't disable too much optimizations
3521
3522 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3523
3524         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3525
3526 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3527
3528         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3529
3530 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3531
3532         * src/pic/gen.c tidied up tabs
3533         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3534         * src/pic/main.c tidied up tabs
3535         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3536         * src/pic/pcoderegs.c tidied up tabs
3537         * src/pic/ralloc.c tidied up tabs
3538
3539 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3540
3541         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3542         to S_FIXED for pic16 port and when symbol is not in level 0,
3543         allocate for S_REGISTER storage class and pic16 port, too,
3544         * src/pic16/device.h: prototype for checkSym,
3545         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3546         * (pic16_assignConfigWordValue): test the value and the mask to
3547         validate that the value is suitable for the configuration word,
3548         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3549         collect extern declared symbols, don't emit symbol twice, check
3550         first if symbol is in publics set first,
3551         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3552         * added command line '--fstack' which enables an experimental
3553         feature for stack access, too buggy to be used yet...
3554         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3555         * (pic16_allocDirReg): when register has storage class S_REGISTER
3556         allocate in pic16_dynAccessRegs,
3557         * device/include/pic16/pic18f????.h: modified configuration word
3558         naming convention, words started as CONFIG0H but should be CONFIG1H
3559
3560 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3561
3562         * device/include/mcs51reg.h: fixed bug 970993
3563
3564 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3565
3566         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3567         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3568         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3569         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3570         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3571         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3572           error/warning numbers,
3573           added function setWarningDisabled()
3574         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3575         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3576           _memcmp.c _memmove.c calloc.c realloc.c free.c
3577         * support/regression/tests/malloc.c: added tests for new functionality
3578         * support/regression/tests/zeropad.c: added tests for truncated initializers
3579           and initialized char arrays starting with '\x0'
3580         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3581
3582 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3583
3584         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3585
3586 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3587
3588         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3589         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3590         peephole 177.e. Thanks to anonymous
3591
3592 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3593
3594         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3595         function isn't used in the source but referenced as a
3596         variable initializer then declare it as extern in .asm file
3597
3598 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3599
3600         * .version: increased version number to 2.4.3
3601
3602         Adding version extension according to ChangeLog CVS revision
3603         * src/Makefile.in (target all): added dependency 'version.h'
3604         * (rule version.h): added rule to create version.h from ChangeLog,
3605         * (rule dep): added dependency version.h,
3606         * src/version.awk: AWK script to create version.h
3607         * src/SDCCdwarf2.c (dwWriteModule),
3608         * src/SDCCglue.c (initialComments),
3609         * src/SDCCmain.c (printVersionInfo): modified to write after
3610         version string the version extension number,
3611         * src/SDCCutil.c: included "version.h"
3612         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3613         number,
3614         * src/SDCCutil.h: added prototype for getBuildNumber
3615
3616         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3617         includeDirsSet, too,
3618         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3619         const char [] is found in function prototype...
3620
3621         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3622         moving to WREG with source is already in WREG,
3623         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3624         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3625         * (aopForSym): stack'ed symbols are partially supported, added
3626         if-clause to support symbols in FARSPACE,
3627         * (sameRegs): added test for AOP_ACC to see if registers are same,
3628         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3629         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3630         * (pic16_popRegFromString): will not allocate a new register if it
3631         doesn't find one by name, bug may have introduced...
3632         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3633         * (genIpush): revived to use pic16 port's stack,
3634         * (genAddrOf): added incomplete case for stack'ed operand,
3635         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3636         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3637         can handle multibyte operands,
3638         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3639         * (pic16initialComments): added message for MPLAB compatibility
3640         mode enabled,
3641         * src/pic16/main.h: prototype for pic16_mplab_comp,
3642         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3643         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3644         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3645         because of increased complexity of procedure,
3646         * (_process_pragma): stack pragma changed to format 'stack pos len',
3647         emit symbol '_stack_end' to conform with gplink,
3648         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3649         to search for register,
3650         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3651         PO_GPR_REGISTER,
3652         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3653         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3654         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3655         case for PO_GPR_REGISTER,
3656         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3657         dies, the new era is ahead !...
3658         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3659         pic16_dynInternalRegs,
3660         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3661         * (pic16_allocDirReg): minor optimizations and bug fixes,
3662         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3663
3664         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3665         load stack and frame pointer with address of 'stack_end' symbol
3666
3667 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3668
3669         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3670         without source code but only variable initializers
3671
3672 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3673
3674         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3675         external are not declared as extern to reduce overhead while linking
3676
3677 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3678
3679         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3680
3681 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3682
3683         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3684           Yee Keat for the patch
3685         * src/SDCCast.c (decorateType): fixed bug #979599
3686         * src/ds390/gen.h: removed local fReturnSizeDS390
3687         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3688         * src/ds390/gen.c (genAnd, genOr, genXor),
3689         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3690
3691 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3692
3693         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3694         add relFilesSet to $3, manipulate $2 to handle linking of object
3695         files without source files in command line,
3696         * device/include/pic16 (all headers): added ID location macros,
3697         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3698         entries for ID location bytes,
3699         * (pic16_assignIdByteValue): NEW,
3700         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3701         added field dumpcalltree to pic16_options_t,
3702         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3703         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3704         emitting rFalseIfx label after check_carry label,
3705         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3706         pic16_emitDIRegs), NEW
3707         * (pic16glue): dump .calltree file when option --calltree found,
3708         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3709         * (_pic16_genAssemblerPreamble): emit ID locations after
3710         configuration registers,
3711         * (pic16_linkCmd): modifications of the link command,
3712         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3713         * (pic16_pCodeInitRegisters): don't init stack registers,
3714         * (pic16_findPrevInstruction): fixed bug,
3715         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3716         bug with immediate registers,
3717         * (buildCallTree): traces stack push and pop,
3718         * (pct2): dump also stack usage for each function,
3719         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3720         * (pic16_allocDirReg): various modifications,
3721         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3722         fixed to 1,
3723
3724 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3725
3726         * src/pic16/pcode.c: removed buggy double colon
3727
3728 2004-07-01 Borut Razem <borut.razem AT siol.net>
3729
3730         * support/scripts/sdcc.nsi: added include/pic16 to setup
3731
3732 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3733
3734         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3735         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3736         target 'clean',
3737         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3738         specific command line arguments. Also added sample lkr script
3739         for placing a variable at a specific memory bank.
3740         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3741         at a specific memory bank,
3742         * (pic16_dump_isection): fixed bug which caused string literals to
3743         be omitted when dumping idata section,
3744         * (pic16_groupRegistersInSection): added code to handle registers
3745         in specific memory banks,
3746         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3747         public, all references are renamed too,
3748         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3749         AOP_DPTR2,
3750         * (pic16_storeForReturn): added case to handle when dest is WREG,
3751         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3752         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3753         pic16_rel_udata, check to see if that register is marked as being
3754         a member of a specific memory bank,
3755         * (pic16_printIvalCharPtr): added code to add string literals either
3756         to code or the idata sections,
3757         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3758         also accept the 'udata' pragma,
3759         * src/pic16/main.h: new structure types sectName and sectSym
3760         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3761         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3762         * (pic16_findPrevInstruction): fixed, it returned nothing,
3763         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3764         instruction combinations,
3765         * (pic16_FixRegisterBanking): heavily reorganised,
3766         * (pic16_AnalyzeBanking): if generating banksel directives is
3767         disabled, then don't call FixRegisterBanking at all,
3768         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3769         completely removed,
3770         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3771
3772 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3773
3774         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3775         Phuah Yee Keat <yk.phuah AT nestac.com>
3776
3777 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3778
3779         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3780         correctly the IVT even if it is relocated to some other location
3781
3782 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3783
3784         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3785         * device/include/pic16/pic18f2220.h: NEW,
3786         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3787         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3788         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3789         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3790         nodefaultlibs, ivt_loc is the location of the interrupt vector
3791         table, and nodefaultlibs signs that default libraries should not be
3792         linked in link stage,
3793         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3794         according to --ivt-loc argument,
3795         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3796         when pragma stack is found,
3797
3798 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3799
3800         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3801         256 (range check), 257 (do while), 258.a-f (bit banging
3802         f.e. on 3-wire SPI bus)
3803
3804 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3805
3806         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3807         variables used exclusively within a loop
3808
3809 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3810
3811         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3812
3813 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3814
3815         * src/SDCClrange.c (computeClash): fixed bug #971834
3816
3817 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3818
3819         * src/mcs51/gen.c (genCmp): fixed bug #975903
3820         * src/hc08/gen.c (operandsEqu),
3821         * src/ds390/gen.c (operandsEqu),
3822         * src/z80/gen.c (operandsEqu),
3823         * src/pic/gen.c (operandsEqu),
3824         * src/pic16/gen.c (operandsEqu),
3825         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3826         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3827
3828 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3829
3830         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3831
3832 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3833
3834         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3835         default case in switch statement,
3836         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3837         to eliminate problem with initialisation of pointers, but problem
3838         still exists,
3839         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3840         * (emitStaticSegment): removed various lines emitting debug info,
3841         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3842         added processor registers for utilizing EEPROM,
3843         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3844         configurable and set 8
3845
3846 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3847
3848         * .version: increased version number to 2.4.2,
3849
3850         Cumulative patch for pic16 port
3851         * src/pic16/device.c: changed scheme to dump initial values for
3852         variables in idata segment, all print_idata* functions were removed,
3853         now the pic16_printIval* will be called,
3854         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3855         * _pic16_printPointerType, pic16_printPointerType,
3856         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3857         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3858         NEW, similar to the respective functions in SDCCglue.c,
3859         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3860         way, emitting hex bytes,
3861         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3862
3863 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3864
3865         * src/avr/ralloc.c (serialRegAssign),
3866         * src/xa51/ralloc.c (serialRegAssign),
3867         * src/pic/ralloc.c (serialRegAssign),
3868         * src/pic16/ralloc.c (serialRegAssign),
3869         * src/hc08/ralloc.c (serialRegAssign),
3870         * src/z80/ralloc.c (serialRegAssign),
3871         * src/ds390/ralloc.c (serialRegAssign),
3872         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3873
3874 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3875
3876         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3877         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3878
3879 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3880
3881         Cumulative patch for pic16 port:
3882         * src/pic16/device.h (typedef PIC16_device) modified fields for
3883         defining microcontrollers,
3884         * src/pic16/device.c: added new info for all devices in Pics16 array,
3885         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3886         to be optimised out by the pCode optimiser,
3887         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3888         specially, bug reported by G.M. Gallant,
3889         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3890         as force'd so that cannot be optimised out by pCode optimiser,
3891         * src/pic16/pcode.c,
3892         * src/pic16/pcodepeeph.c,
3893         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3894         they are disabled by default, but can be enabled explicit with
3895         command argument --denable-peeps, for testing,
3896         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3897         --pomit-ivt in COMPILE_FLAGS
3898
3899 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3900
3901         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3902           compilation on MSVC
3903
3904 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3905
3906         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3907
3908 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3909
3910         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3911         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3912
3913 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3914
3915         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3916         would only assign 0x300001 register.
3917
3918 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3919
3920         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3921         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3922
3923 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3924
3925         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3926         for ds80c400
3927         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3928         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3929         added peephole 254 (left shift), 255 (jump table)
3930
3931 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3932
3933         * device/lib/Makefile.in: removed comment line with model-pic16,
3934         * (target port-specific-objects-pic16): the libraries and objects
3935         are copied to the build directory form the device/lib/pic16/bin
3936         directory
3937
3938         Cumulative patch concerning pic16 port:
3939         * library directory has been re-organized,
3940         * added support for PIC18F1220,
3941         * added headers and library sources for chips 18f1220,18f6520,
3942         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3943
3944         * configuration registers setting has changed, now each supported
3945         device has a complete description of the registers it uses,
3946         * all initialisations are moved to idata sections, these section
3947         can be absolute or relocatable,
3948         * fixed initialisation of codespace variables,
3949         * fixed warning about PCLATU and gpsim,
3950         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3951         * (genAssign): use table reads when assigning from variables in codespace,
3952         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3953         char/int variables placed in codespace,
3954         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3955         registers set in .asm file, no need for --pomit-config-words anymore,
3956         * (pic16glue): some 8051 legacy segments are commented out
3957         (to be removed completely),
3958         * added support for alternative assembler and linker with --asm=
3959         and --link= command line arguments,
3960         * peepholes are disabled automatically in the port, no need to
3961         specify on command line,
3962         * port supports natively char/int/long multiplication, but converts
3963         all divisions to support functions,
3964         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3965         to the file set in variable $2,
3966         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3967         strings in ASCII format and not in hex,
3968         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3969         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3970         allocate proper register if iCodes aren't temporary,
3971
3972 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3973
3974         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3975
3976 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3977
3978         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3979         is commented out
3980
3981 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3982
3983         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3984         computed address is reused
3985         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3986         multi-byte bitfields
3987
3988 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3989
3990         * src/z80/gen.c: (genArrayInit): must check for pointers too
3991
3992 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3993
3994         * support/regression/tests/zeropad.c: never meant to commit the
3995           nestedstruct test: removed, added check for GCC version
3996
3997 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3998
3999         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
4000         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
4001         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
4002           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
4003           bugs 928906 and 954082 half-empty initializers
4004         * src/SDCCsymt.h,
4005         * src/SDCCsymt.c (getAllocSize): added for above fix
4006         * src/z80/gen.c (genArrayInit): fixed bug 741044
4007         * support/regression/tests/zeropad.c: added tests
4008
4009 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
4010
4011         * src/pic16/device.c (pic16_dump_section): corrected bug which
4012         caused some symbols of the libraries to be misplaced
4013
4014 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4015
4016         * src/pic16/glue.c,
4017         * src/pic16/ralloc.h,
4018         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
4019         to fix conflict with pic port
4020
4021 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
4022
4023         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
4024         externs configuration variables,
4025         * src/pic16/ralloc.h,
4026         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
4027         prototype in header, commented out some debug messages
4028
4029 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
4030
4031         * src/pic16/glue.c,
4032         * src/pic16/main.c,
4033         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
4034         for gpasm COFF object generation. Thanks to D. Hawkins for
4035         his patch info
4036
4037 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4038
4039         * src/ds390/main.c,
4040         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4041         Brock for spotting this)
4042         * src/ds390/gen.c (genEndFunction),
4043         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4044         interrupt handler and critical. Disable push/pop optimizations when
4045         peephole optimizations disabled.
4046
4047 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4048
4049         Updated pic16 library sources and headers.
4050         * device/lib/pic16/pic18f*/ ,
4051         * device/include/pic16/*.h: modified to handle structured SFR
4052         definitions
4053
4054 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4055
4056         * src/port.h (PORT structure): added hook initPaths, now each
4057         port can declare its own default search paths,
4058         which can been seen with the --print-search-dirs option,
4059         see pic16 port for example,
4060         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4061         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4062         * (doPrintSearchDirs): NEW, replaces in a central manner the
4063         printing of search dirs which was split in set*Paths functions,
4064         * (main): added call to port->initPaths and doPrintSearchDirs,
4065         * src/avr/main.c,
4066         * src/ds390/main.c,
4067         * src/hc08/main.c,
4068         * src/izt/i186.c,
4069         * src/izt/tlcs900h.c,
4070         * src/mcs51/main.c,
4071         * src/pic/main.c,
4072         * src/pic16/main.c: modified port structures to reflect addition of
4073         initPaths hook,
4074
4075         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4076         * (pic16_dump_section): for registers in same address reserve memory once,
4077         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4078         to no_banksel,
4079         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4080         result is greater in size than right or left,
4081         * (pic16_genUMult8X8_8): there are some cases where the result can
4082         be 16 bits size, so handle these,
4083         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4084         * (pic16_outBitC): modified to emit pcodes,
4085         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4086         or not,
4087         * (genDivOneByte): implemented algorithm to divide 8-bits,
4088         * (genCmp): uncommented goto, but issues still exist,
4089         * (genAnd): fixed a bug with variables >8bits,
4090         * (genPackBits): optimization added that uses BCF/BSF to change a
4091         single bit,
4092         * (genAssign): fixed bug when assigning floating point literals,
4093         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4094         __sdcc_gsinit_startup label,
4095         * src/pic16/main.c (_pic16_init): removed search directory
4096         initialisations,
4097         * (_pic16_initPaths): NEW, used to initialise search directories,
4098         * (_hasNativeMulFor): support functions for all except char/int
4099         multiplication, and char division,
4100         * (PIC16_port struct): modified entry for native mul support,
4101         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4102         no_banksel option,
4103         * (buildCallTree): call to register_usage is ifdef'ed out,
4104
4105 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4106
4107         * device/include/string.h: applied Stas Sergeev's patch to make this
4108         header file compatible with the preprocessor -Wundef option
4109         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4110         failure (fixes bug #941458)
4111
4112 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4113
4114         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4115         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4116         that the variable, not the function, should be static
4117         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4118         to be consistent with non-literal case
4119
4120 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4121
4122         * src/SDCCast.c (isConformingBody): fixed bug #949967
4123         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4124         convilong): fixed bug #952086
4125
4126 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4127
4128         * src/SDCCmem.c (allocVariables): fixed bug #955321
4129
4130 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4131
4132         * src/hc08/main.c (_hc08_genAssemblerEnd),
4133         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4134         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4135         completely eliminated the use of a temporary file
4136         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4137         when more than one file linked
4138         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4139
4140 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4141
4142         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4143         which fixes bug #543481
4144         * support/regression/tests/bug-751703.c: fixed comments left from a
4145         cut and paste error
4146         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4147         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4148         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4149         scopes
4150         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4151         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4152         are now changed to underscores in moduleName
4153
4154 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4155
4156         * as/mcs51/lkmem.c: better fix for bug #954173
4157
4158 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4159         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4160
4161         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4162         * device/include/c8051f000.h,
4163         * device/include/c8051f120.h,
4164         * device/include/c8051f300.h,
4165         * device/include/c8051f310.h,
4166         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4167         PWM16) and detab'ed
4168
4169 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4170
4171         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4172         and mailing lists, doc'ed --no-peep-comments, removed reference
4173         to knoppix (newest version has no LyX/LaTeX), other minor changes
4174         * src/SDCCglue.c (glue): save 2 bytes stack space with
4175         option --main-return. The ljmp could probably be avoided too
4176
4177 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4178
4179         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4180
4181 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4182
4183         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4184         * src/SDCCopt.c (isLocalWithoutDef),
4185         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4186         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4187         (credit to Maarten Brock for patch #949363, on which this is based)
4188         * support/regression/tests/bug-751703.c: some test cases of extern used
4189         within inner scopes.
4190
4191 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4192
4193         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4194         SPEC_STRUCT
4195         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4196         struct definitions
4197         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4198         dwWriteLabel): fix to create valid debugger symbols even when
4199         the module name has non-alphanumeric symbols in it
4200         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4201         when a variable's allocation has been optimized away
4202
4203
4204 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4205
4206         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4207         * src/hc08/main.c,
4208         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4209         * src/mcs51/main.c,
4210         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4211         * src/ds390/main.c,
4212         * src/z80/gen.c (z80_emitDebuggerSymbol),
4213         * src/z80/main.c,
4214         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4215         * src/pic/main.c,
4216         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4217         * src/pic16/main.c,
4218         * src/avr/gen.c (avr_emitDebuggerSymbol),
4219         * src/avr/main.c,
4220         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4221         * src/xa51/main.c,
4222         * src/SDCCdebug.c (emitDebuggerSymbol),
4223         * src/SDCCdebug.h,
4224         * src/port.h: added a debugger struct to the port struct. Added a
4225         callback for defining debugger symbols
4226
4227         * src/SDCCast.c (createLabel),
4228         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4229         with isitmp = 1
4230         * src/SDCCicode.h,
4231         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4232         iCode back to the ast for the function
4233
4234         * src/hc08/ralloc.c (hc08_assignRegisters),
4235         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4236         unneeded fields from the regs struct.
4237         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4238         pushReg() & pullReg() functions instead of emitcode()
4239
4240         * src/hc08/gen.c (genLabel, genhc08Code),
4241         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4242
4243         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4244         debugger hooks
4245
4246         * src/hc08/gen.c (genEndFunction, genhc08Code),
4247         * src/hc08/gen.h,
4248         * src/mcs51/gen.c (genEndFunction, gen51Code),
4249         * src/mcs51/gen.h,
4250         * src/ds390/gen.c (genEndFunction, gen390Code),
4251         * src/ds390/gen.h,
4252         * src/z80/gen.c (genEndFunction, genZ80Code),
4253         * src/z80/gen.h,
4254         * src/z80/z80.h,
4255         * src/pic/gen.c (genEndFunction, genpic14Code),
4256         * src/pic/gen.h,
4257         * src/pic16/gen.c (genEndFunction, genpic16Code),
4258         * src/pic16/gen.h,
4259         * src/avr/gen.c (genEndFunction, genAVRCode),
4260         * src/avr/gen.h,
4261         * src/xa51/gen.c (genEndFunction, genXA51Code),
4262         * src/xa51/gen.h,
4263         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4264         specific code to cdbFile.c and out of the backend code generators
4265
4266         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4267         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4268         starting address is now 0
4269
4270         * as/hc08/asm.h,
4271         * as/hc08/m08pst.c,
4272         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4273         assembler directive for DWARF support
4274         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4275
4276         * src/src.dsp,
4277         * src/Makefile.in,
4278         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4279
4280 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4281
4282         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4283         and inappropriate peephole optimization in jump tables
4284
4285 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4286
4287         * as/hc08/m08pst.c,
4288         * src/SDCCglue.c: sdccopt works for the hc08 port now
4289
4290 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4291
4292         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4293
4294 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4295
4296         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4297
4298 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4299
4300         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4301         rules
4302         * src/SDCCmain.c,
4303         * src/SDCCglobl.h,
4304         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4305         comments from the peephole optimizer replacement rules
4306         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4307         symbols
4308         * src/SDCCcse.c (updateSpillLocation),
4309         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4310         equivalents
4311         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4312         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4313         objects far pointers
4314
4315 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4316
4317         * src/SDCCsymt.h: a missing part of my last change
4318         * src/pic/ralloc.c (regTypeNum),
4319         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4320
4321 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4322
4323         * src/SDCCicode.h,
4324         * src/SDCCicode.c (aggrToPtrDclType),
4325         * src/SDCCptropt.h,
4326         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4327         ptrPseudoSymConvert),
4328         * src/pic/ralloc.c (regTypeNum),
4329         * src/pic16/ralloc.c (regTypeNum),
4330         * src/hc08/ralloc.c (regTypeNum),
4331         * src/ds390/ralloc.c (regTypeNum),
4332         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4333         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4334
4335 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4336
4337         * link/z80/lkmain.c (afile),
4338         * as/hc08/lkmain.c (afile),
4339         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4340         prevent a pointer problem when a filename has no directory and
4341         no extension specified.
4342
4343 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4344
4345         * link/z80/lkmain.c (afile): allow periods in directory names
4346         * link/z80/lkmain.c (afile),
4347         * as/mcs51/lkmain.c (afile),
4348         * as/hc08/lkmain.c (afile): allow linker script file to have an
4349         extension other than ".lnk"
4350         * link/z80/lklex.c (getfid),
4351         * link/z80/lkmain.c (parse),
4352         * as/mcs51/lklex.c (getfid),
4353         * as/mcs51/lkmain.c (parse),
4354         * as/hc08/lklex.c (getfid),
4355         * as/hc08/lkmain.c (parse): Support comments in the linker script
4356         file on lines by themselves and after filenames
4357
4358 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4359
4360         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4361
4362 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4363
4364         * src/z80/peeph-z80.def: removed some peephole rules that don't
4365         work with multibyte arithmetic (fixed bug #937126)
4366         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4367         to registers and not global variables
4368         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4369         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4370         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4371         checking for assignments not internally generated (fixed bug #931895)
4372         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4373         structure member (fixed bug #930072)
4374
4375 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4376
4377         * src/SDCCmain.c (linkEdit),
4378         * src/hc08/main.c (_hc08_parseOptions),
4379         * as/hc08/Makefile.in,
4380         * as/hc08/aslink.h,
4381         * as/hc08/asm.h,
4382         * as/hc08/m08pst.c,
4383         * as/hc08/lkrloc.c (relr, rele),
4384         * as/hc08/lkarea.c (lnkarea)
4385         * as/hc08/lkmain.c (afile, parse),
4386         * as/hc08/lkelf.c: support for ELF output
4387         * as/hc08/lks19.c (s19),
4388         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4389
4390 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4391
4392         * as/mcs51/lkihx.c: Fixed bug #899105.
4393
4394 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4395
4396         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4397         .dsp files from Unix to DOS.
4398
4399 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4400
4401         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4402         function pointers; we have been compliant for several months now.
4403         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4404         change that was accidently commented out
4405         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4406         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4407         bug #922319
4408
4409 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4410
4411         * src/hc08/gen.c: output of all of the internal debugging information
4412         is now controlled by the D() macro; it is disabled by default
4413
4414 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4415
4416         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4417         harder to keep the same registers during a CAST iCode
4418         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4419         long via int can be done in a single cast, if the signedness is
4420         correct.
4421         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4422         putchar() in tinibios.c in ds390's library
4423
4424 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4425
4426         * src/SDCCast.c (decorateType): fixed bug #898889,
4427         cast result of a literal complement too
4428         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4429         fixed check for bitfields
4430
4431 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4432
4433         * src/SDCCicode.c (geniCodeLogic): made it static,
4434         (geniCodeLogicAndOr): added in order to fix bug #905492,
4435         (ast2iCode): fixed bug #905492
4436         * support/regression/tests/bug-905492.c: added
4437         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4438         (processParms): fixed bug #927659: don't copy parms, this will clear
4439         decorated flag
4440         * support/regression/tests/bug-927659.c: added
4441
4442 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4443
4444         * src/SDCCast.c (addCast): don't cast float to char
4445         * device/lib/libsdcc.lib: added _memmove
4446
4447 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4448
4449         * device/lib/large/Makefile: fixed parallel execution by
4450         replacing `make` by `$(MAKE)`
4451
4452 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4453
4454         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4455         offsets (fixes bug #923936)
4456
4457 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4458
4459         * device/lib/small/Makefile: fixed parallel execution by
4460         replacing `make` by `$(MAKE)`
4461
4462 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4463
4464         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4465
4466 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4467
4468         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4469         * src/regression/Makefile: Regression test was not running.
4470
4471 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4472
4473         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4474         complement if possible
4475         * src/SDCCval.c (valComplement),
4476         * src/SDCCicode.c (operandOperation): fixed complement of literal
4477         * support/regression/tests/onebyte.c (testComplement): added
4478
4479 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4480
4481         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4482         return an optimized tree; actually replace actParm with the new tree
4483         * src/SDCCast.h: added some parantheses to remove side effects
4484         * support/regression/tests/bug-920866.c
4485
4486 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4487         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4488         Bit operands were not being handled properly in the pic14 port.
4489         (now src/regression/add.c passes again).
4490
4491 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4492
4493         * src/SDCC.y (labeled_statement): case and default no longer require
4494         a following statement (RFE #893037)
4495
4496 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4497
4498         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4499         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4500         disabled (fixes bug #916294)
4501         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4502         "mov a,acc"; patch provided by Lenny Story
4503         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4504
4505 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4506
4507         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4508         functions
4509         * src/ds390/gen.c (genFunction, genEndFunction),
4510         * src/ds390/ralloc.c (ds390_assignRegisters),
4511         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4512         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4513         pushed if there are parameters passed on the stack. Also, a cleaner
4514         way to decide if r0/r1 should be pushed/popped. (Together they fix
4515         bug #918693)
4516
4517 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4518
4519         * doc/sdccman.lyx,
4520         * device/lib/mcs51/crtpagesfr.asm,
4521         * device/lib/mcs51/crtxinit.asm,
4522         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4523         to avoid confusion with Si Lab's SFRPAGE register.
4524
4525 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4526
4527         * src/SDCCglue.c (emitMaps): allow public sfr variables
4528         * src/SDCCglue.c (initialComments): include compiler build date
4529         with compiler version and put the timestamp of the generated
4530         assembly file on a serperate line to be less confusing.
4531         * src/port.h: added genInitStartup hook
4532         * src/avr/main.c,
4533         * src/ds390/main.c,
4534         * src/hc08/main.c,
4535         * src/pic/main.c,
4536         * src/pic16/main.c,
4537         * src/xa51/main.c,
4538         * src/z80/main.c: genInitStartup initialize as NULL (default to
4539         historical behaviour)
4540         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4541         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4542         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4543         library instead of hard coding it into the compiler.
4544         * support/regression/ports/mcs51-stack-auto/spec.mk,
4545         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4546         * device/lib/mcs51/Makefile,
4547         * device/lib/small/Makefile,
4548         * device/lib/large/Makefile,
4549         * device/lib/mcs51/crtpagesfr.asm,
4550         * device/lib/mcs51/crtstart.asm,
4551         * device/lib/mcs51/crtxclear.asm,
4552         * device/lib/mcs51/crtxinit.asm,
4553         * device/lib/mcs51/crtclear.asm,
4554         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4555         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4556         and into user configurable files.
4557         * device/lib/clean.mk: clean mcs51 directory too
4558         * support/regression/tests/longlit.c: added static to T1 declaration
4559         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4560         accesses in the initialization code
4561
4562 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4563
4564         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4565         OSCTRIMVAL as noted in bug #916008
4566
4567 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4568
4569         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4570         in loops with multiple exits (reported as incorrect registers
4571         used by Martin Helmling in Sdcc-user list)
4572
4573 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4574
4575         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4576         made ds390 register extensions look less like error messages
4577
4578 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4579
4580         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4581         reported by Adam Wozniak in Sdcc-user list
4582
4583 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4584
4585         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4586         arithmetic optimizations, added debug output
4587
4588 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4589
4590         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4591         * sdcc.spec: updated and split sdcc into 3 rpms
4592         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4593         needed for literals of LEFT_OP and '+'
4594         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4595         introduced RESULT_TYPE_NOPROM
4596         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4597         left shift
4598         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4599         limited promotion to int only for '*'
4600         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4601
4602 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4603
4604         * src/pic16/gen.c (genSkip),
4605         (genc16bit2lit), (gencjneshort): commented out
4606         (is_LitOp): new helper function, checks operand type
4607         (genCmpEq): rewritten
4608
4609 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4610
4611         * support/regression/tests/bug-908454.c: added
4612
4613 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4614
4615         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4616         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4617         (geniCodeCast): cosmetic, don't preserve bit storage class
4618         (geniCodeLeftShift): added promotion
4619         (geniCodeLogic): fixed regression
4620         * src/SDCCsymt.c (computeTypeOr): accept bits too
4621         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4622
4623 2004-03-07  Borut Razem <borut.razem AT siol.net>
4624
4625         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4626
4627 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4628
4629         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4630         version of pic16_genPackRegisters which does not check if ic is a
4631         CAST operator,
4632         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4633         function cause string1.c regression test fails
4634
4635 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4636
4637         * sim/ucsim/configure.in,
4638         * sim/ucsim/configure,
4639         * sim/ucsim/doc/Makefile.in: use docdir
4640         * src/SDCC.y: fixed sbit atrributes
4641         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4642         * src/SDCCast.c (decorateType): |^& need special promotion handling
4643         * src/SDCCast.h,
4644         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4645         * src/SDCCsymt.h (computeType),
4646         * src/SDCCicode.c: computeType() needs op
4647         * src/SDCCsymt.c (checkTypeSanity),
4648         * doc/sddman.lyx: "plain" bitfields are unsigned
4649         * src/SDCCsymt.c (computeTypeOr): added
4650         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4651         |^& ops
4652         * src/SDCCval.c (val*): computeType() needs op
4653         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4654         * support/regression/tests/onebyte.c: added tests for |^&
4655
4656 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4657
4658         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4659         for writing icode into asm output.
4660
4661 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4662
4663         * src/pic16/device.c: added some debug lines enabled
4664         with macro DEBUG_CHECK,
4665         * src/pic16/genarith.c: more debug in genPlus,
4666         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4667         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4668         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4669         * (aopForSym): onStack symbols are re-placed in data memspace,
4670         and onStack flag is cleared,
4671         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4672         copy temporary pcodeop,
4673         * (genPcall): added warning for not updating PCLATU,
4674         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4675         always true for pic16 port,
4676         * (genMultOneWord): NEW, supports integer multiplication,
4677         * (genMult): modified to call genMultOneWord,
4678         * (ifxForOp): added warning when return NULL,
4679         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4680         flag is set before call to operandFromSymbol for implicit
4681         added structures,
4682         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4683         options.intlong_rent are set by default,
4684         * (_hasNativeMulFor): modified to allow port generation of integer
4685         multiplication,
4686         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4687         set regtype to REG_SFR for all registers, restricting seting the
4688         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4689
4690 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4691
4692         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4693         more than 500 times in the regression tests
4694
4695 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4696
4697         * support/Util/SDCCerr.h,
4698         * support/Util/SDCCerr.c,
4699         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4700         enumerator_list),
4701         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4702         for symbol conflicts.
4703         * support/valdiags/tests/enum.c,
4704         * support/valdiags/tests/tentdecl.c,
4705         * support/valdiags/tests/struct.c: expect possible error messages
4706         referring to original symbol definitions.
4707         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4708         * src/SDCCsymt.h,
4709         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4710
4711 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4712
4713         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4714
4715 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4716
4717         * src/pic16/ralloc.c (newReg): fixed bug #908929
4718
4719 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4720
4721         * src/ds390/gen.c: added missing #include "main.h"
4722
4723 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4724
4725         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4726         checking if symbol is already in set,
4727         * src/pic16/device.h: prototype for checkAddSym,
4728         * src/pic16/gen.c: (_G): added entry interruptvector,
4729         * (assignResultValue): removed some commented out lines,
4730         * (genFunction): check for ISR via sym->type, absolute section for
4731         interrupt code is created via a new pBlock, the goto instruction is
4732         placed now correctly at the interrupt vector position, changed all
4733         references from ivec to _G.interruptvector,
4734         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4735         is the interrupt is a high priority one, same for return from ISR,
4736         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4737         externs to calls of checkAddSym,
4738         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4739         pic16_pcode_verbose flag is set,
4740         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4741         * src/pic16/pcoderegs.c: message about how many registers are saved
4742         will only be emitted if pic16_pcode_verbose flag is set,
4743
4744 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4745
4746         * src/ds390/ralloc.h,
4747         * src/ds390/ralloc.c (ds390_regWithIdx),
4748         * src/ds390/gen.c (emitcode),
4749         * src/ds390/main.h,
4750         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4751         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4752         ds390operandCompare, getRegsRead, getRegsWritten,
4753         initializeAsmLineNode): customized instruction size calculation for
4754         ds390, started basis for some register optimizations
4755         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4756         corresponding assembly output
4757         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4758         missing push/pop of r0/r1. Optimized push/pops
4759
4760 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4761
4762         * src/mcs51/main.c (instructionSize): fixed ACALL size
4763         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4764
4765 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4766
4767         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4768         the sorting of rlist with NULL elements
4769         * (print_idataType, print_idata): NEW to create idata sections
4770         * src/pic16/device.h: idataSymSet new variable
4771         * src/pic16/gen.c (genFunction): fixed some bugs in string
4772         comparing, improved the absolute section creation for ISRs,
4773         added FSR0L/FSR0H in registers that are saved in an ISR,
4774         * (genInline): fixed the processing of inline snippets,
4775         now they undergo no process by the peephole optimizer
4776         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4777         are placed in idataSymSet,
4778         * (pic16emitStaticSeg): extern symbols are added in externs,
4779         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4780         switching when aboslute variables are placed in access bank memory
4781         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4782         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4783         commented out with #if,
4784         * (pic16_packRegisters): reintroduce the check for CAST because some
4785         symbols are not correctly handled,
4786         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4787         pCodeInstruction instead of pCode,
4788         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4789         pCodeAsmDir definition,
4790         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4791         directive, then the argument directive is emitted without the leading
4792         tab, hack for inline labels which must be in the first column,
4793         * (compareLabel,pic16_findNextInstruction),
4794         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4795         * (insertBankSwitch): modified for the new pCodeAsmDir,
4796
4797 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4798         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4799
4800         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4801         instance,
4802         * (pushSide): commented out with #if,
4803         * (assignResultValue): fixed some typos in saving
4804         registers,
4805         * (genPcall): FIXED and sync'ed with genCall,
4806         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4807         * (genNearPointerGet): fixed to handle some more cases,
4808         implementation scheme via table reads,
4809         * (genConstPointerGet): modified to access code memory correct,
4810         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4811         and improved to handle some cases
4812         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4813         instead of "RETLW" for init data
4814         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4815         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4816         variables are placed in access bank memory (<0x80 and >=0xf80),
4817         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4818         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4819         TBLWT_POSTDEC,TBLWT_PREINC
4820         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4821         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4822         directives
4823         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4824         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4825         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4826         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4827
4828 2004-02-29  Borut Razem <borut.razem AT siol.net>
4829
4830         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4831         support/Util/findme.h, support/Util/system.h: enhance binary relative
4832         search for lib and include by using findProgramPath()
4833
4834 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4835
4836         * src/SDCCpeeph.h,
4837         * src/SDCCpeeph.c (pcDistance),
4838         * src/port.h,
4839         * src/mcs51/ralloc.h,
4840         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4841         * src/mcs51/main.h,
4842         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4843         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4844         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4845         size calculation port specific, started basis for some register
4846         optimizations
4847         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4848         missing push/pop of r0/r1. Optimized push/pops
4849         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4850         * device/lib/_modsint.c (_modsint),
4851         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4852         and stack version so regression tests pass
4853
4854 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4855
4856         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4857         * src/SDCCast.c (decorateType): catch another small optimization
4858         with '?' operator
4859         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4860         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4861         modified to finally use computeType() all over SDCC,
4862         see Feature Request #877103
4863         * src/SDCCval.h: cosmetic
4864         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4865         valCompare(); regression tested in muldiv.c
4866         * support/regression/tests/muldiv.c (testMod): mod sign follows
4867         dividend only
4868
4869 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4870
4871         * src/SDCCast.c (decorateType): fixed bug #902362
4872         * doc/INSTALL.txt: fixed install instructions for win32
4873
4874 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4875
4876         * device/include/Makefile.in (install): fixed by replacing spaces
4877         by tabs
4878         * doc/README.txt,
4879         * doc/INSTALL.txt: updated for release
4880         * doc/sdccman.lyx: added warning for --xstack being buggy
4881
4882 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4883
4884         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4885         to eliminate build warnings.
4886         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4887
4888 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4889            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4890
4891         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4892         removed -penable-stack, added comment for stack pragma, added
4893         warning for not initializing the stack/frame registers, removed
4894         comment at interrupts section
4895
4896         Stack is made permanent, there is no ability to disable stack usage.
4897         * src/pic16/device.h,
4898         * src/pic16/device.c: removed all references to USE_STACK macro,
4899         * src/pic16/device.c (pic16_dump_section): when no elements in
4900         rlist, free rlist before return,
4901         * (pic16_dump_int_registers): NEW, internal registers are a new set
4902         of general purpose registers reused by each function,
4903         * (checkAddReg): returns 1 if registers is added to set,
4904         * (pic16_groupRegistersInSection): when a registers is of type
4905         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4906         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4907         SRCASECMP macro is moved here from device.c
4908         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4909         PO_PCLATU, PO_PRODL, PO_PRODH,
4910         * (pic16_pCodeOpType, genMinus,
4911         changed compares to "a" register, with AOP_ACC,
4912         * (pic16_genPlus): fixed some bugs and indented properly,
4913         * (pic16_addSign): changed size to size+offset in the MOVWF
4914         instruction,
4915         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4916         multiply 8-bit operand by literal, result is 8-bit,
4917         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4918         multiply 2 8-bit operand, result is 8-bit,
4919         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4920         genUMult8X*_16,
4921         * src/pic16/gen.c: changed accUse to contain WREG only,
4922         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4923         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4924         true, do not use immediate addressing any more unless sym is a
4925         pointer in codespace,
4926         * (aopForRemat): do not use immediate addressing when symbol not in
4927         codespace and when symbol's address is requested,
4928         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4929         accUse size (= 1),
4930         * (aopGet): added case for AOP_ACC and don't return "accumulator
4931         bug" but WREG instead,
4932         * (popGetTempReg): pushes contents of temporary register in stack,
4933         * (popReleaseTempReg): pops contents of temporary register from
4934         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4935         * (pic16_popGet): separated case AOP_ACC to return register WREG
4936         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4937         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4938         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4939         the use of immediate pointers to certain cases only.
4940
4941         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4942         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4943         * (assignResultValue, genCall, genRet): modified to use the new
4944         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4945         genPcall is still broken,
4946         * (genFunction): added code to create 'A' type pBlocks when
4947         interrupt functions are generated, code not extensively tested yet,
4948         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4949         * (genEndFunction): modified so ISRs pop stored registers from stack,
4950         * (genMultOneByte): cleanup,
4951         * (AccRsh): added flag andmask, to and result with appropriate mask,
4952         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4953         * (genDataPointerGet): fixed and reenabled its use,
4954         * (genNearDataPointerGet): bugs fixed,
4955         * (genDataPointerSet): bugs fixed,
4956         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4957         pic16_DumpSymbol, pic16_DumpOp,
4958         * src/pic16/genutils.h: function prototypes for the above functions,
4959         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4960         pointers,
4961         * (pic16emitRegularMap): many many many improvements, but needs a
4962         major cleanup,
4963         * src/pic16/main.c: enable_stack in pic16_options is removed,
4964         * (_pic16_parseOptions): removed command line options -penable-stack,
4965         * (_process_pragma): emit stack symbol only when stack pragma is
4966         processed,
4967         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4968         redirected to FSR0L/FSR0H pair,
4969         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4970         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4971         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4972         for immediates,
4973         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4974         * (dumpPicOptype): NEW,
4975         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4976         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4977         with movff instruction,
4978         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4979         added pic16_int_regs, some packRegsFor* functions are commented out,
4980         because produce errors,
4981         * src/pic16/NOTES: minor modifications
4982
4983 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4984
4985         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4986         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4987         --pack-iram.
4988         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4989         * as/mcs51/lkaomf51.c: fixed bug #895763
4990
4991 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4992
4993         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4994
4995 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4996
4997         * doc/sdccman.lyx: added details about the HC08 storage classes and
4998         interrupts, fixed the register usage info for z80 & gbz80
4999
5000 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
5001
5002         * doc/sdccman.lyx: added more pic16 port documentation
5003         * device/include/pic16/: added header pic18fregs.h
5004
5005 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
5006
5007         * doc/sdccman.lyx: added Vangelis' contribution
5008
5009 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5010
5011         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
5012         extend to the next CALL or PCALL, not just to the next CALL.
5013
5014 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
5015
5016         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
5017
5018 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5019
5020         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
5021         bug #895752 and a better fix for bug #716790
5022
5023 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5024
5025         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
5026
5027 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5028
5029         * doc/sdccman.lyx: minor changes, minor changed
5030
5031 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
5032
5033         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
5034         which can't handle SDCC_NEWONEBYTEOPS,
5035         (geniCodeMultiply): removed conversion from mult to shift for pic14
5036         and pic16
5037
5038 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5039
5040         * src/hc08/gen.h,
5041         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5042         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5043         thus fixing bug #895406
5044
5045 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5046
5047         * device/lib/_modsint.c,
5048         * device/lib/_modslong.c: sign follows divisor only
5049         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5050         signs or signedness can be ignored
5051         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5052         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5053         added optimization for IFX,
5054         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5055         arguments;
5056         reenabled optimization for IFX, which was removed on 2004-01-11
5057         * src/SDCCast.h: added return type IFX
5058         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5059         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5060         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5061         SDCC_OLDONEBYTEOPS selects the old behaviour
5062         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5063         changed again and commented promotion rule
5064         * src/SDCCval.c (valDiv): promotion no longer necessary
5065         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5066         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5067         rewritten
5068         * support/regression/tests/onebyte.c: added
5069
5070 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5071
5072         * gen.c (genInline): reverted to old code for assemnling inline
5073         code because of bug reported James Chadd
5074
5075 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5076
5077         * ralloc.h: missing declarations from previous patch,
5078         seems that patch for ralloc.h was never applied, fixed
5079
5080 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5081            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5082
5083         * pcode.c,
5084         * pcode.h,
5085         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5086         indirect addressing. Marked FSR0 as deprecated
5087         * gen.c (pointerCode): commented out, not needed now
5088         (pic16_popGet2p): new MOVFF helper function
5089         (genGenPointerGet),
5090         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5091         (shiftRLong): removed duplicate debugging info
5092
5093 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5094
5095         * src/ds390/gen.c (genNearPointerGet),
5096         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5097         optimization with bits, but not bitfields.
5098         * src/ds390/ralloc.c (packRegisters),
5099         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5100
5101 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5102
5103         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5104
5105 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5106
5107         * src/SDCCsymt.h,
5108         * src/SDCCicode.c (operandFromSymbol),
5109         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5110         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5111         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5112         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5113         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5114         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5115         bug #892038
5116         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5117         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5118         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5119         * src/SDCCsymt.c (newSymbol),
5120         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5121         enumerator_list),
5122         * src/SDCCval.h,
5123         * src/SDCCval.c (newiList): fixed bug #885705
5124
5125 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5126
5127         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5128         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5129
5130 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5131
5132         * device/include/c8051f120.h,
5133         * device/include/c8051f300.h,
5134         * device/include/c8051f310.h: added/updated header files for Silicon
5135         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5136         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5137         in new section Submitting patches
5138
5139 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5140
5141         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5142         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5143         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5144         genGenPointerSet),
5145         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5146         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5147         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5148         genGenPointerSet),
5149         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5150         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5151         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5152         genGenPointerSet),
5153         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5154         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5155         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5156         genGenPointerSet): fixed bug #892400
5157         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5158         to eliminate build warnings.
5159         * src/SDCCast.c (processParms),
5160         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5161         fixed bug 751859
5162         * support/valdiag/valdiag.py: added GCC to the list of defines active
5163         when compiling with gcc
5164
5165 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5166
5167         * support/Util/SDCCerr.h,
5168         * support/Util/SDCCerr.c,
5169         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5170         with an incomplete type (fixed bug #883734)
5171         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5172
5173 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5174
5175         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5176
5177 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5178
5179         * src/SDCCast.c (decorateType),
5180         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5181         function pointer implementation
5182         * support/regression/tests/funptrs.c: added tests to verify both forms
5183         of function pointers work correctly. Added tests to verify parameters
5184         are passed in the correct order.
5185
5186 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5187
5188         * device.c (regCompare): registers are sorted by ascending
5189         address and increasing size,
5190         * main.c (_pic16_finaliseOptions): removed the declaration
5191         of compiler macro MCU. Now a macro of the format pic18fxxxx
5192         will be defined from the command line
5193
5194 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5195             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5196
5197         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5198         PCOP_RLCF was overwritten!
5199         * gen.c (genSkip): commented out calls to pic16_emitcode,
5200         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5201         * (genlshTwo),
5202         * (genRRC): added debugging info,
5203         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5204         overwritten while shifting,
5205         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5206         overwritten while shifting,
5207         * (AccLsh),
5208         * (AccRsh),
5209         * (shiftLLeftOrResult),
5210         * (shiftRLeftOrResult),
5211         * (shiftRLong),
5212         * (shiftLLong): Implemented with pic16_emitpcode
5213         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5214         * (genLeftShift): Fixed bug, operand for shift by variable always
5215         was "and"ed with 0x0f,
5216         * (genLeftShiftLiteral),
5217         * (genrshTwo),
5218         * (genRightShiftLiteral): added debugging info,
5219         * (genrshFour): added comment,
5220         * (genRightShift): determined signedness from operand "left"
5221         instead of "result"
5222
5223 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5224
5225         * src/SDCCicode.c (geniCodeParms),
5226         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5227         function pointers, fixed function pointer bugs #861242 and #861896
5228
5229 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5230
5231         * device/include/c8051f000.h,
5232         * device/include/c8051f120.h,
5233         * device/include/c8051f300.h: added header files for Silicon
5234         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5235
5236 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5237
5238         * src/SDCCast.c (processParams): added new type flow and restructured
5239         (gatherAutoInit): added new type flow
5240         (addCast): cosmetic changes
5241         (getLeftResultType): added new type flow for array indices, patch
5242         provided by Stas, see FR #877103
5243         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5244         array index patch by Stas
5245         * src/SDCCast.h: added prototype getResultTypeFromType()
5246         * src/SDCCval.h,
5247         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5248         * src/pic/glue.c (pic14emitStaticSeg),
5249         * src/pic16/glue.c (pic16emitStaticSeg),
5250         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5251         for initialization of symbols
5252         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5253         * support/Util/SDCCerr.h:
5254         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5255         * .version: bumped version number to 2.3.8
5256         * device/include/Makefile.in (install),
5257         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5258         avoid warnings
5259
5260 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5261
5262         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5263         Slade Rich fixed an optimization bug
5264         * src/pic/pcodepeep.c,
5265         * src/pic/pcoderegs.c
5266         * doc/Makefile (install): added test for directory
5267
5268 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5269
5270         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5271         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5272         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5273         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5274         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5275         * as/mcs51/asexpr.c (term),
5276         * as/hc08/asexpr.c (term): fixed bug #887146
5277
5278 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5279
5280         * src/z80/gen.c (genMult): handle single byte result product
5281         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5282         DUMMY_READ_VOLATILE (fixed bug #886367)
5283
5284 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5285
5286         * support/regression/tests/libmullong.c: fixed logic, on little endian
5287         hosts we ended without a mullong_wrapper()
5288
5289 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5290
5291         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5292         virus/worm forged address usage.
5293
5294 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5295
5296         Fixed promotion, it should be done on AST level:
5297         * src/SDCCast.c (addCast): added promotion to int
5298         (decorateType): updated call to upCast()
5299         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5300         usualUnaryConversions()
5301
5302 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5303
5304         * support/regression/tests/literalop.c (mulWrapper): Added a
5305         wrapper to remove integer overflow warnings.
5306
5307         * support/regression/tests/float_trans.c: Made work on host.
5308
5309         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5310         location of sz80.
5311
5312         * support/regression/generate-cases.py (main): Changed from inline
5313         to a main method.
5314
5315         * doc/Makefile (install): Changed to depth first to get rid of
5316         missing directory install warning.
5317
5318         * as/Makefile (install-doc): Made work on Mac.
5319
5320 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5321
5322         * src/SDCCast.c: added an additional type flow in decorateType() of
5323         opposite direction, see feature request #860006; it's enabled at runtime
5324         by setting the environment variable SDCC_NEWTYPEFLOW
5325         * src/SDCCast.h: changed prototype of decorateType()
5326         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5327         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5328         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5329         see feature request #877103
5330         * src/SDCCval.c: updated call of decorateType()
5331         (valBitwise): fixed bug #882876
5332         (valMinus): added promotion
5333         (valLogicAndOr): result is unsigned
5334         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5335         * src/SDCCsymt.c (computeType),
5336         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5337         must not cause an unsigned operation
5338         * src/pic/glue (pic14emitRegularMap),
5339         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5340
5341 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5342
5343         * src/pic/pcode.c (PCodeID): commented out left over debug code
5344
5345 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5346
5347         * support/valdiag/tests/overflow.c: added shift tests
5348         * src/pic/device.c,
5349         * src/pic/gen.c,
5350         * src/pic/gen.h,
5351         * src/pic/glue.c,
5352         * src/pic/main.c,
5353         * src/pic/pcode.c,
5354         * src/pic/pcode.h,
5355         * src/pic/pcodepeep.c,
5356         * src/pic/pcoderegs.c,
5357         * src/pic/ralloc.c,
5358         * src/pic/ralloc.h: applied patch from Slade Rich;
5359         added support for multiple code pages and multiple RAM banks on the
5360         PIC 14 port. The ASM files now no longer simply assume all the
5361         code / RAM are in the same page / bank. This means the linker can
5362         safely allocate code/RAM of separate ASM files to different pages/banks.
5363         * doc/sdccman.lyx: added Slade's tips
5364         * src/mcs51/peeph.def: fixed bug #880768
5365
5366 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5367
5368         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5369         * src/SDCCast.c (decorateType): fixed bug #880197
5370
5371 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5372
5373         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5374         getopt.h.
5375
5376         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5377         strtof is not part of C89 and isn't included with Mac OS X.
5378
5379 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5380
5381         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5382         shiftL2Left2Result): fixed bug #879326
5383         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5384         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5385         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5386         address fetch for clr instruction
5387         * device/lib/hc08/_mulint.c: created optimized assembly version
5388         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5389
5390 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5391
5392         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5393         proposed in FR #877103
5394
5395 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5396
5397         * src/SDCCval.c (cheapestVal): added missing checks
5398         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5399         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5400
5401 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5402
5403         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5404         equal operands
5405
5406 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5407
5408         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5409         loaded with the linker search paths (-L arguments) and the libraries
5410         to be linked with the current source (-l arguments). Changes
5411         currently will affect only the pic16 port.
5412         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5413         include path the port specific paths and port specific libraries,
5414         * gplink command now contains the $3 argument,
5415         * src/pic16/device.h,
5416         * src/pic16/device.c,: structure PIC_device is made public and
5417         renamed to PIC16_device, the same for variable Pics which is renamed
5418         to Pics16. Updated all references to them.
5419         * src/pic16/glue.c (pic16glue): corrected bug with code
5420         initialization which bypassed the variable initializations block.
5421
5422         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5423         COMPILE_FLAGS and added the --nostdinc option
5424
5425 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5426
5427         * device/include/mc68hc908jb8.h: Register defs for another member
5428         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5429
5430 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5431
5432         Documenting changes from previous commits.
5433         * configure.in (version 1.56),
5434         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5435         when generating output files to configure the pic16 library,
5436         but now I've commented it out, since gputils aren't installed in the
5437         SF compile farm, so library won't compile
5438
5439         * device/lib/Makefile.in (version 1.56): initially I've added in
5440         target 'all' the prerequestive 'model-pic16' so it compiled the
5441         pic16 library, but now I've commented it out for the same reasons
5442         above,
5443         * added targets 'model-pic16' and 'objects-pic16' to compile the
5444         library
5445         * added target 'port-specific-objects-pic16' to handle the
5446         generated libraries and copy them into the build/ directory
5447         * added target 'clean-intermediate-pic16' to clean intermediate
5448         files into pic16 directory
5449         * in target 'installdirs' added line to create directory pic16 in
5450         the installation path
5451
5452         * device/include/Makefile.in (version 1.11): in target 'install'
5453         added lines to copy all header files to installation path,
5454         * in target 'installdirs' added line create directory for pic16
5455         headers in the installation path
5456
5457 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5458
5459         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5460          a function call
5461
5462 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5463
5464         * configure,
5465         * device/lib/configure.in,
5466         * device/lib/configure: fixed for autoconf 2.57
5467
5468 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5469
5470         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5471         option so that it actually works. Made it specific to the z80, since
5472         the gbz80 doesn't have these kinds of I/O ports.
5473
5474 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5475
5476         * device/include/z180.h,
5477         * device/lib/_memcpy.c,
5478         * device/lib/_memmove.c,
5479         * device/lib/_mulint.c,
5480         * device/lib/ser_ir.c,
5481         * device/lib/ser_ir_cts_rts.c,
5482         * device/lib/_strcmp.c,
5483         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5484         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5485         portmode; added deprecation warning for bank= and protmode= forms.
5486         Also, guard against buffer overflow.
5487         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5488
5489 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5490
5491         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5492         changed interrupt vector table generation to only emit declared vectors.
5493         * device/include/Makefile.in: added missing backslash
5494         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5495
5496 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5497
5498         Mainly changes to support compilation of the device libraries
5499         * src/pic16/device.c: stack is allocated via symbol and not
5500         via literal number. The symbol is placed in the corresponding
5501         position of the data ram
5502         * (pic16_dump_section): relocatable and absolute uninitialized
5503         data are now emitted in sorted order to reduce section naming,
5504         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5505         weren't marked as being in the access bank,
5506
5507 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5508
5509         Added portion of GNU PIC Library under the directory
5510         device/include/pic16 and device/lib/pic16. These files
5511         contain the declarations of SFRs for the PIC18Fxx2 devices.
5512         The directory is initialized via configure from toplevel.
5513
5514 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5515
5516         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5517         the spilllocations to be compared correctly
5518
5519 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5520
5521         * src/SDCCast.c (decorateType): fixed bug introduced today
5522
5523 2004-01-12  Borut Razem <borut.razem AT siol.net>
5524
5525         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5526         doc/sdccman.lyx: upper case pragmas are deprecated
5527
5528 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5529
5530         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5531         in simpler and even better code
5532
5533 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5534
5535         * src/SDCCicode.c (operandOperation): fixed bug #874819
5536         * src/SDCCast.c (decorateType): fixed
5537         char foo (unsigned long ul) { return ul > 0; }
5538
5539 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5540
5541         * doc/sdccman.lyx: Moved and added some sections, small changes
5542         all over. Telling LaTeX to be less strict with word spacing
5543         to better keep the right margin. Changed some notes about
5544         maintainance of the ports in section 3.2.1 - is it OK like this?
5545
5546 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5547
5548         SDCC source changes:
5549         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5550         convilong): modified to inform the pic16 port that builtin functions
5551         are external
5552
5553         PIC16 PORT specific changes:
5554         * src/pic16/device.c pic16_dump_equates() added,
5555         processor registers declared internally by the port are emitted in
5556         the translation as equates,
5557         * src/pic16/gen.c: inline code is passed unprocessed to the
5558         translation,
5559         * (pic16_popGetLit2): fnuction modified to take second operand as
5560         pCodeOp pointer and not as literal,
5561         * (popRegFromIdx): prefixed with pic16_,
5562         * (pic16_popCombine2): modified to receive already allocated pCode
5563         operands,
5564         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5565         * (genFunction): initializes local stack frame and pushes on stack
5566         all the registers used by this function,
5567         * (genEndFunction): restores all registers from stack and restores
5568         stack frame,
5569         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5570         improvements,
5571         * (pic16glue): changed the program startup sequence,
5572         * added new dbName code 'A' for functions placed in absolute section
5573         * src/pic16/main.c: added function attribute _naked,
5574         * added pragma 'code' to place a fnuction at an absolute address,
5575         * added command line arguments --debug-ralloc and --pcode-verbose,
5576         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5577         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5578         * (pic16_newpCodeOpLit2): modified to take the second operand as
5579         pCodeOp pointer,
5580         * (pic16_printpBlock): modified to emit each function in a separate
5581         section,
5582         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5583         UPPER for immediate operands,
5584         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5585         instruction,
5586         * src/pic16/peeph.def: all peepholes with movff are commented out,
5587         because there is a problem in the pcode peep optimizer,
5588         * src/pic16/ralloc.c: the register allocator can now reuse local
5589         function symbols for another function. This saves register usage.
5590         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5591
5592         Added file src/pic16/NOTES with information about program writing on
5593         the current port version.
5594
5595 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5596
5597         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5598         and peephole 252 (array access)
5599
5600 2004-01-09  Borut Razem <borut.razem AT siol.net>
5601
5602         * src/SDCCmain.c : fixed #872250: -l command line defined library
5603           files are scanned before standard library files
5604
5605 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5606
5607         * src/SDCCast.c (decorateType): fixed bug #874046
5608
5609 2004-01-09  Borut Razem <borut.razem AT siol.net>
5610
5611         * support/scripts/sdcc.nsi: remove previous installation
5612
5613 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5614
5615         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5616         bytes for last interrupt vector (mcs51)
5617         * sdcc.spec: fixed typo
5618
5619 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5620
5621         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5622         gen51Code): more efficient parameter receive for --model-large
5623         ("bug" #845294)
5624
5625 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5626
5627         * src/ds390/main.c,
5628         * src/z80/main.c: added missed needLinkerScript flags (more than
5629         one port structure defined in these file)
5630         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5631         bug #795325
5632
5633 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5634
5635         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5636         * src/port.h: added flag needLinkerScript in port->linker
5637         structure to inform whether to create a .lnk file or not,
5638         * src/avr/main.c,
5639         * src/ds390/main.c,
5640         * src/hc08/main.c,
5641         * src/mcs51/main.c,
5642         * src/pic/main.c,
5643         * src/pic16/main.c,
5644         * src/xa51/main.c,
5645         * src/z80/main.c: changed appropriately to configure
5646         needLinkerScript flag
5647         * src/pic/gen.c,
5648         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5649         * src/pic/glue.c: added variable udata_section_name to
5650         override default uninitialized data segment definition for
5651         devices only with SHAREBANK memory (reported from Erik Epetrich)
5652         * (pic14emitOverlay): modified to emit a commented overlay segment
5653         directive when no overlay data exist
5654         * (picglue): modified to emit uninitialized data segment
5655         according to udata_section_name
5656         * src/pic/main.c (_pic14_parseOptions): added command line
5657         options --udata-section-name=[name] to override default
5658         udata definition name
5659         * modified _linkCmd and _asmCmd to include compiler passed
5660         arguments via -W option
5661         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5662         object file from '.rel' to '.o' in port->linker structure,
5663         changed size of fptr from 2 to 3 in port structure
5664
5665 2004-01-07  Borut Razem <borut.razem AT siol.net>
5666
5667         * support/scripts/sdcc.nsi: update PATH
5668         * support/scripts/sdcc.ico: craeted
5669
5670 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5671
5672         * device/include/Makefile.in: fix install
5673         * doc/Makefile: fix install
5674
5675 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5676
5677         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5678         in bug #860505
5679         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5680         how the function variable allocation summary is displayed; also
5681         include information about variables allocated to the overlay
5682         segment
5683
5684 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5685
5686         * as/mcs51/lkmain.c: Help about -Y option
5687         * as/mcs51/lkarea.c: Fixed gcc warnings
5688
5689 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5690
5691         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5692         fixed warning
5693         * support/valdiag/tests/overflow.c: added
5694         * src/SDCCast.c (decorateType),
5695         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5696         LEFT_OP (left shift)
5697
5698 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5699
5700         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5701         (default behaviour).
5702
5703 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5704
5705         A python script to validate compiler diagnostic messages. It can be
5706         used to verify that sdcc complains about bad c source code and
5707         gives a good location of the error.
5708         * support/valdiag/Makefile,
5709         * support/valdiag/valdiag.py,
5710         * support/valdiag/tests/*
5711
5712 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5713
5714         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5715         * src/SDCCsymt.c (newEnumType),
5716         * src/SDCCsymt.h
5717         * support/Util/SDCCerr.c,
5718         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5719         enum related bugs.
5720         * support/regression/tests/enum.c: added test for enum values that
5721         require at least 2 bytes of storage.
5722
5723 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5724
5725         * src/common.h: added ifndef/define/endif macros
5726         around the header file.
5727         Bug reported from Jesus Calvino-Fraga
5728
5729 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5730
5731         * sdcc.spec: updated
5732         * device/include/Makefile.in: don't install CVS directories
5733         * device/lib/Makefile.in: added removal of CVS directories after install
5734         * doc/Makefile: fixed install, added local_icons
5735         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5736         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5737         * src/ds390/gen.c (genRightShift): fixed bug #870788
5738         * src/SDCCast.c (decorateType): fixed bug #870781
5739
5740 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5741
5742         PIC16 port related changes:
5743         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5744         added variable stackPos,
5745
5746         * gen.c: genCall, assignResultValue: added support for
5747         pushing/retrieving function parameters to/from stack,
5748         genFunction,genEndFunction: setup stack frame for the
5749         generated function,
5750         genAddrOf: will be changed according to bug 863624
5751
5752         * added files genutils.c and genutils.h which contain gen*
5753         debugged and optimised functions extracted from gen.c
5754
5755         * glue.c: added variable 'externs' which holds extern symbols,
5756         pic16emitRegularMap: is modified to properly handle relocatable
5757          symbols under the new scheme,
5758         pic16createInterruptVect: is modified
5759         pic16printPublics: is modified to emit 'global' assembler directives,
5760         added pic16_printExterns to print extern symbols,
5761         pic16glue: initializes stack/frame pointer in the beginning of
5762         the assembly output. Temporary hack, will be corrected later,
5763         because gplink yet does not support stack and SDCC does not
5764         yet support a type of crt0.o object to create the final binary.
5765
5766         * Removed many lines that contain 8051 legacy code.
5767         * The code is finally placed under a 'code' directive.
5768         * Added port specific options.
5769
5770         * _process_pragma: simplified since now we do not need *special*
5771         include file to define SFR registers. But a separate header
5772         will be needed. This will be developed later.
5773         * _pic16_parseOptions: added, parses port specific options:
5774         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5775         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5776         --preplace-udata-with=
5777
5778         * _pic16_setDefaultOptions: modified to initialize section names,
5779         but hack is temporarly out of order since it needs improvement.
5780         * _pic16_genAssemblerPreamble: configuration words are emitted by
5781         their address instead of their name. This part is incomplete and
5782         supports only the 18Fxx2 devices. Other devices will emit an error
5783         during assembly since they do not contain the same set of config
5784         registers
5785         * _pic16_genIVT: is modified,
5786
5787         * pcode.c: added definitions for some hardware registers that are needed
5788         for stack support
5789         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5790         All PCI entries are updated. Now LFSR is supported.
5791         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5792         * added pic16_newpCodeOpLit2 to support instructions with
5793         two literal arguments
5794         * pic16_pCode2str: corrected code that emits assembler instructions
5795         with two literal operands and those that have an access bit modifier
5796         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5797         this fixes a bug which caused some labels to be lost, when an
5798         assembler directive was added, i.e. banksel,
5799         * pic16_FixRegisterBanking: improved logic that causes the insertion
5800         of bank switching,
5801         * InlineFunction: functions that are called once, are not any more
5802         inlined. This can be a port option in the future,
5803
5804         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5805
5806         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5807         hold the corresponding uninitialized symbols,
5808         * pic16_allocProcessorRegister: registers have explicit marked the
5809         accessBank field,
5810         * pic16_allocInternalRegister: registers are explicit marked as
5811         not used,
5812         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5813         processing list, so bit registers were lost,
5814         *
5815
5816         * ralloc.h: added field 'accessBank' and original symbol operand
5817         in register definition,
5818         * removed the field isMapped from register definition,
5819
5820         ** Several functions have been removed from various sources:
5821         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5822         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5823         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5824         pic16_assignRelocatableRegisters
5825
5826         ** others have been introduced:
5827         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5828         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5829
5830 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5831
5832         * support/scripts/inc2h.pl: changed definition of BIT_AT
5833         to emit 'sbit at' instead of 'bit at'. This was a request.
5834
5835         PIC16 port related preliminary changes:
5836         * gen.c: prefixed function popRegFromString with
5837         pic16_ and all references to it corrected
5838         * pcode.c: all pic16_pc_* hardware registers prefixed
5839         with underscore (_),
5840         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5841         * ralloc.c: newReg(): when register is REG_SFR then
5842         set address to rIdx,
5843         pic16_allocProcessorRegister(): marks register wasUsed=0
5844         pic16_writeUsedRegs(): added a call to assign processor
5845         registers via pic16_assignFixedRegisters
5846
5847 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5848
5849         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5850         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5851         variables in unused register banks.  Also the SSEG is placed
5852         wherever there is enough space for it, and IDATA can be anywhere
5853         in internal RAM.  For now compile using -Wl-Y[stack_size].
5854         The mem file is different for this option as well, since it
5855         makes no sense of talking about DSEG lenght.
5856
5857 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5858
5859         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5860         in certain cases, e.g. when ROM assignment, patch provided
5861         from Albert den Haan.
5862
5863 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5864
5865         Many signedness and type propagation fixes:
5866         * src/SDCCicode.c: made geniCodeCast() static
5867         replaced SPEC_ by IS_ (cosmetic)
5868         (operandOperation): fixed div and mod operation
5869         (usualBinaryConversions): added support for promotion of char
5870         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5871         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5872         (geniCodeAdd): an array index will stay unsigned, even if promoted
5873         from char to int
5874         (geniCodeArray): ditto
5875         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5876         * src/SDCCsymt.c (computeType): added more support for char;
5877         promotion of char is selectable by promoteCharToInt, fixed signedness
5878         for all cases
5879         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5880         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5881         * src/SDCCval (val*): replaced signedness calculation by
5882         computeType()
5883         rearranged if-branches (cosmetic)
5884         (valShift): added warning W_SHIFT_CHANGED
5885         (valCompare): fixed problem with different types
5886         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5887         * support/regression/tests/literalop.c: added many cases
5888         * support/regression/tests/ast_constant_folding.c: changed finally to
5889         'unsigned int'
5890         * .version: new year, new version: 2.3.7
5891         * src/SDCCmain.c (main): applied patch #866468
5892         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5893         provided by Scott Bronson
5894         * doc/sdccman.lyx: updated documentation for sdcdb
5895         updated and added chapter tips
5896
5897 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5898
5899         * src/SDCCsymt.h: missing from yesterday's commits
5900
5901 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5902
5903         * src/SDCC.y (struct_or_union_specifier),
5904         * support/Util/SDCCerr.c,
5905         * support/Util/SDCCerr.h: verify that struct & union tags are used
5906         as declared.
5907
5908 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5909
5910         * src/SDCCglobl.h: missing from yesterday's commits
5911
5912 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5913
5914         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5915         sft_attributes, struct_declaration, parameter_declaration,
5916         type_name, start_block, declaration_list),
5917         * src/SDCC.lex (check_type): support redefinition of typedef names
5918
5919 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5920
5921         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5922         aligned xdata arrays. Erik helped me with the if clause.
5923
5924 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5925
5926         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5927         warning
5928
5929 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5930
5931         * src/SDCCast.h,
5932         * src/SDCCast.c (newAst_),
5933         * src/SDCCicode.h,
5934         * src/SDCCicode.c (ast2iCode, newiCode),
5935         * src/SDCCglobl.h,
5936         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5937         expr, statement, expression_statement, selection_statement,
5938         iteration_statement, expr_opt, jump_statement): foundation for tracking
5939         sequence points
5940         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5941         point code too)
5942
5943 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5944
5945         * support/Util/SDCCerr.c,
5946         * src/SDCCast.h,
5947         * src/SDCCast.c (createCase, createDefault, decorateType),
5948         * src/SDCClabel.c (labelUnreach),
5949         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5950         to error messages.
5951         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5952         (with thanks to Stas Sergeev)
5953         * device/include/time.h,
5954         * device/lib/time.c (CheckTime): suppress unreachable code warning
5955
5956 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5957
5958         * src/SDCCast.c (createIvalCharPtr),
5959         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5960         bug #753752)
5961         * support/regression/tests/nullstring.c: tests for these two bugs
5962
5963 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5964
5965         * support/Util/SDCCerr.h,
5966         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5967         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5968         about storage class and 'at' used inside struct or union
5969         * src/SDCCBBlock.c (iCodeFromeBBlock),
5970         * src/SDCCcse.c (ifxOptimize),
5971         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5972         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5973         printIval, emitStaticSeg, emitOverlay),
5974         * src/SDCClabel.c (deleteIfx),
5975         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5976         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5977         gatherAutoInit, processParms),
5978         * support/Util/SDCCerr.h,
5979         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5980         reporting for post-parse errors.
5981
5982 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5983
5984         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5985         implicit casts via union; they don't work on big endian systems
5986         (possible fix for bug #861138)
5987
5988 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5989
5990         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5991         * src/mcs51/main.c: fixed the fix for bug #737001
5992
5993 2003-12-15  Borut Razem <borut.razem AT siol.net>
5994
5995         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5996
5997 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5998
5999         * support/makebin/makebin.c: put output in binary mode
6000
6001 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6002
6003         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
6004         xdata and data memory on startup. Set the environment variable
6005         SDCC_NOGENRAMCLEAR to disable this.
6006         * src/mcs51/peephole.def,
6007         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
6008         (allows non-interrupt and interrupt code to safely compete for a resource
6009         without the non-interrupt code having to disable interrupts)
6010
6011 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6012
6013         * src/SDCCicode.c (geniCodeAdd),
6014         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
6015         with valFromType if type might be a pointer and host is big endian).
6016         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
6017         types, not just integer types.
6018         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
6019         multiply defined with mismatching "at" address.
6020
6021 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6022
6023         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
6024         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
6025         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
6026         with embedded nulls (fixed bug #753752)
6027
6028 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6029
6030         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
6031         Apparently this did not see much testing (endless loop)
6032
6033 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6036
6037 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6038
6039         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6040         gracefully handle NULL memmap pointers
6041
6042 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6043
6044         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6045         instead of deleting the iCode when an operand is volatile
6046         * src/z80/gen.c (genDummyRead),
6047         * src/mcs51/gen.c (genDummyRead),
6048         * src/ds390/gen.c (genDummyRead),
6049         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6050         not just IC_RIGHT
6051         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6052         * src/SDCC.y: fixed bug #850420
6053
6054 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6055
6056         Applied z80 i/o port patch from Peter Townson and fixed some operators
6057         to better handle operands in A register.
6058         * device/include/z180.h
6059         * src/SDCC.y
6060         * src/SDCCglue.c
6061         * src/z80/gen.c
6062         * src/z80/gen.h
6063         * src/z80/main.c
6064         * src/z80/peeph-z80.def
6065         * src/z80/peeph.def
6066         * src/z80/z80.h
6067
6068 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6069
6070         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6071
6072 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6073
6074         * device/lib/hc08/_mullong.c: Removed extra #endif
6075
6076 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6077
6078         * sim/ucsim/hc08.src/inst.cc,
6079         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6080         carries from x to h
6081         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6082         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6083         * device/include/stdarg.h: fixed varargs for hc08
6084         * device/lib/Makefile.in,
6085         * device/lib/hc08/Makefile,
6086         * device/lib/hc08/_mulint.c,
6087         * device/lib/hc08/_mullong.c: fixed some endian problems
6088
6089 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6090
6091         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6092         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6093         * device/lib/_gptrget.c,
6094         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6095
6096 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6097
6098         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6099         * src/SDCCast.c (astErrors): fixed bug #846007
6100         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6101
6102 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6103
6104         * src/SDCCast.c (decorateType): disabled a transformation I added in
6105         revision 1.188 (access to fields of a structure at an absolute address);
6106         it breaks with bitfields, extern declarations, and gcse analysis.
6107         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6108         could be assigned through a pointer, so don't complain.
6109         * src/SDCCast.c (astErrors),
6110         * src/SDCCast.h,
6111         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6112
6113 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6114
6115         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6116         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6117         output of __config directives, since gpasm now supports them
6118         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6119         pre-processor macro, i.e. -DMCU=p18f452
6120         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6121         and modified to handle 'cast' icode similarly to '=' icode
6122         * src/pic16/device.h (typedef struct PIC_device): added field
6123         'extMIface' to indicate that chip has external memory interface
6124         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6125         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6126         18F8720
6127
6128 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6129
6130         * src/SDCC.y (pointer): fixed bug #846006
6131         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6132         * src/SDCCast.c (decorateType): fixed bug #846009
6133         * src/ds390/peeph.def,
6134         * src/ds390/gen.c (genAnd, genOr),
6135         * src/mcs51/peeph.def,
6136         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6137
6138 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6139
6140         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6141         * src/SDCCdflow.c
6142         * src/SDCCcse.c
6143         * src/SDCCcse.h
6144         * src/SDCCBBlock.h
6145         * src/SDCCBBlock.c
6146
6147 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6148
6149         fixed bug #845089
6150         * src/SDCCbitv.h,
6151         * src/SDCCbitv.c: added function to free a bitvector
6152         * src/SDCClrange.h,
6153         * src/SDCClrange.c: added function to recompute the liveranges
6154         * src/avr/ralloc.c,
6155         * src/ds390/ralloc.c,
6156         * src/hc08/ralloc.c,
6157         * src/mcs51/ralloc.c,
6158         * src/pic/ralloc.c,
6159         * src/pic16/ralloc.c,
6160         * src/xa51/ralloc.c,
6161         * src/z80/ralloc.c: recompute the liveranges after register packing
6162
6163 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6164
6165         * src/SDCCloop.c (newInduction): fixed bug #845630
6166
6167 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6168
6169         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6170         inadvertantly left behind from my 2003-11-12 change
6171
6172 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6173
6174         Updated headers I neglected to commit yesterday.
6175         * src/SDCClrange.h,
6176         * src/SDCCicode.h
6177
6178 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6179
6180         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6181         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6182         * src/SDCCopt.c (eBBlockFromiCode),
6183         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6184         the creation of the key hash table from the sequencing so it can be used
6185         earlier (for some GCSE bug fixes still pending)
6186
6187 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6188
6189         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6190         * support/regression/tests/addsub.c: testing genPlus shortcut
6191
6192 2003-11-15  Borut Razem <borut.razem AT siol.net>
6193
6194         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6195
6196 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6197
6198         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6199         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6200         ordering is immaterial.
6201         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6202
6203 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6204
6205         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6206         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6207         (SIGSEV) of bug #840381
6208         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6209         unlink new file before rename if new and old filenames are the same)
6210
6211 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6212
6213         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6214         uninitialized variables) for the mcs51. Set environment variable
6215         SDCC_GENRAMCLEAR to test.
6216         xdata initialization slightly shorter
6217
6218 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6219
6220         * src/SDCCsymt.h,
6221         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6222         #838241 & 780691 (basicly the same bug)
6223         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6224         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6225
6226 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6227
6228         * src/SDCCmain.c (linkEdit): "fix" #834252
6229
6230 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6231
6232         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6233         * src/SDCCast.h,
6234         * src/SDCC.y: fixed bug #819403
6235
6236 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6237
6238         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6239         the reentrant attribute.
6240         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6241         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6242         simulation
6243         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6244         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6245         erroneously reduced to a literal.
6246         * src/hc08/ralloc.c (packRegisters, rematStr),
6247         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6248         some cases
6249
6250 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6251
6252         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6253         * doc/sdccman.lyx: changed from 'article' to 'book'
6254         * doc/Makefile: readded test_suite_spec and cdbfileformat
6255
6256 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6257
6258         * device/include/stdlib.h: include malloc.h to comply with ANSI
6259         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6260
6261 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6262
6263         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6264         * doc/clean.mk: also remove *.out files
6265         * doc/sdccman.lyx: some additions, larger top/bottom margins
6266
6267 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6268
6269         * src/SDCC.y: fixed bug #837365
6270         * support/regression/tests/bitopcse.c
6271         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6272         a symbol (might be valop instead)
6273         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6274         * device/lib/clean.mk: added hc08 to the cleaning list
6275
6276 2003-11-04  Borut Razem <borut.razem AT siol.net>
6277
6278         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6279           made 2003-11-04
6280         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6281           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6282           malloc is declared in standard stdlib.h
6283
6284 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6285
6286         * device/lib/hc08/Makefile: need to clean .rel not .o files
6287         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6288
6289 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6290
6291         * src/port.h,
6292         * src/hc08/main.c,
6293         * src/mcs51/main.c,
6294         * src/ds390/main.c,
6295         * src/z80/main.c,
6296         * src/avr/main.c,
6297         * src/pic/main.c,
6298         * src/pic16/main.c,
6299         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6300         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6301         tests (which uses the port's oclsExpense function)
6302         * src/SDCC.y,
6303         * src/SDCCast.c,
6304         * src/SDCCicode.c,
6305         * src/hc08/gen.c,
6306         * src/ds390/gen.c,
6307         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6308
6309 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6310
6311         * src/SDCCcse.c (ifxOptimize),
6312         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6313         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6314         deleting the IFX iCode.
6315         * src/hc08/ralloc.c: reduced unneeded slocs
6316         * src/hc08/gen.c: fixed bug in asmopToBoolean
6317
6318 2003-11-04  Borut Razem <borut.razem AT siol.net>
6319
6320         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6321           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6322           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6323           transferred to configure
6324
6325 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6326
6327         Use headers defined in the C[++] standards:
6328         * sim/ucsim/gui.src/serio.src/fileio.cc
6329         * sim/ucsim/gui.src/serio.src/frontend.cc
6330         * sim/ucsim/gui.src/serio.src/main.cc
6331         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6332         * support/Util/NewAlloc.c
6333         * as/hc08/lklibr.c
6334         * as/mcs51/lklibr.c
6335         * as/z80/aslist.c
6336         * as/z80/assym.c
6337
6338 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6339
6340         * Added MSVC projects for hc08 assembler and linker:
6341         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6342         /as/hc08/link_hc08.dsp
6343
6344 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6345
6346         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6347
6348 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6349
6350         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6351
6352 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6353
6354         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6355
6356 2003-10-31  Borut Razem <borut.razem AT siol.net>
6357
6358         * support/cpp2/cpplib.h,
6359           support/cpp2/cpplib.c,
6360           support/cpp2/cpplex.c,
6361           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6362           to switch _asm block preprocessing on / off. Default is
6363           #pragma preproc_asm +
6364
6365 2003-10-31  Borut Razem <borut.razem AT siol.net>
6366
6367         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6368           when outputting comment blocks (when executed with -C option) and
6369           _asm (SDCPP specific) blocks
6370
6371 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6372
6373         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6374
6375 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6376
6377         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6378
6379 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6380
6381         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6382         * src/SDCCast.c (decorateType): fixed bug #832664
6383
6384 2003-10-31  Borut Razem <borut.razem AT siol.net>
6385
6386         * support\cpp2\cpplex.c: fixed for SDCPP:
6387           comments(when executed with -C option) and _asm blocks
6388           were included even if they where in skipped #if block.
6389           Applied solution from GCC cpp 3.3.2
6390
6391 2003-10-31  Borut Razem <borut.razem AT siol.net>
6392
6393         * src/SDCC.lex: sdcc now understands both formats:
6394           '# <line_number> <file_name>' and
6395           '#line <line_number> <file_name>'
6396         * support/cpp2/cppmain.c: sdcpp now generates the standard
6397           '# <line_number> <file_name>' instead of former
6398           '#line <line_number> <file_name>'
6399
6400 2003-10-30  Borut Razem <borut.razem AT siol.net>
6401
6402         * support/cpp2/cpphash.h,
6403         * support/cpp2/cpplib.h
6404         * support/cpp2/cpplex.c,
6405         * support/cpp2/cppmain.c,
6406         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6407
6408 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6409
6410         Fixed a number of problems revealed by bug #827883.
6411         * src/SDCCloop.c (loopInvariants): Spill location of the
6412         result operand should be recomputed if extracted from
6413         a loop. Also, don't extract assignments of an iTemp
6414         from a literal.
6415         * src/SDCCast.c (isConformingBody): loop reversal should
6416         not occur if the control variable is involved with a
6417         relational operator.
6418
6419 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6420
6421         * .version: bumped to 2.3.6 to reflect the big improvements
6422         made by Erik and Klaus. Thanks!
6423
6424 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6425
6426         Replaced the livrange code.
6427         * src/SDCClrange.c: added new LR code
6428         * src/SDCCloop.c,
6429         * src/SDCCBBlock.h: removed remainig parts from old LR code
6430         * src/ds390/ralloc.c,
6431         * src/ds390/gen.c: minor fixes to make it work with new code
6432
6433 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6434
6435         * as/hc08/asm.h,
6436         * as/hc08/lkrloc.c,
6437         * src/hc08/gen.c,
6438         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6439         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6440         (tweaked fix for bug #818696)
6441
6442 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6443
6444         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6445
6446 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6447
6448         * src/SDCCmain.c,
6449         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6450         * src/mcs51/gen.c (gencjneshort),
6451         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6452         more efficient (per Scott Bronson's suggestion)
6453
6454 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6455
6456         Extended the semantics of the critical keyword to include
6457         individual statements. See RFE #827755 and #799831
6458         * src/SDCC.y
6459         * src/SDCCicode.c
6460         * src/SDCCopt.c
6461         * src/SDCCast.c
6462         * support/Util/SDCCerr.c
6463         * support/Util/SDCCerr.h
6464         * src/mcs51/gen.c
6465         * src/ds390/gen.c
6466         * src/hc08/gen.c
6467
6468 2003-10-19  Borut Razem <borut.razem AT siol.net>
6469
6470         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6471
6472 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6473
6474         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6475         Fixed bug #818696
6476         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6477         and predecrement operand is displayed
6478
6479 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6480
6481         * src/SDCCval.c (valMinus): fixed bug #826041
6482
6483 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6484
6485         Some hc08 related updates that I missed earlier
6486         * sim/ucsim/stypes.h
6487         * support/regression/ports/hc08/spec.mk
6488
6489 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6490
6491         New target "hc08" for the Motorola 68hc08 family of micros
6492
6493         * configure
6494         * configure.in
6495         * Makefile
6496         * src/hc08/*
6497         * src/SDCCmain.c
6498         * src/port.h
6499         * sim/ucsim/hc08.src/*
6500         * sim/ucsim/configure.in
6501         * src/ucsim/configure
6502         * sim/ucsim/packages_in.mk
6503         * as/hc08/*
6504         * as/Makefile
6505         * device/include/mc68hc908qy.h
6506         * device/lib/hc08/*
6507         * device/lib/Makefile.in
6508         * support/regression/ports/hc08/*
6509         * support/regression/Makefile
6510
6511 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6512
6513         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6514         regression test
6515         * src/ds390/gen.c (genCast): fixed bug #821957
6516
6517 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6518
6519         * device/lib/logf.c: "fixed" overlay bug
6520         * support/regression/ports/host/spec.mk: added m library
6521         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6522         * support/regression/tests/float_trans: added (for Eric)
6523
6524 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6525
6526         * src/mcs51/gen.c (genCpl): fixed bug
6527         http://sf.net/mailarchive/message.php?msg_id=6263915
6528
6529 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6530
6531         * src/SDCCast.c (decorateType): added extended constant folding
6532         * src/SDCCsymt.c (computeType): cleanup
6533         * src/SDCCval.c (valShift): minor optimization
6534         * support/regression/tests/ast_constant_folding.c: added
6535
6536 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6537
6538         * src/SDCCmain.c: removed some unintended changes
6539
6540 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6541
6542         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6543         * src/z80/gen.c: fixed part of bug #817589
6544         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6545
6546 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6547
6548         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6549         * src/SDCCcflow.c
6550         * src/SDCCcse.c
6551         * src/SDCCdflow.c
6552         * src/SDCClabel.c
6553         * src/SDCClrange.c
6554         * src/SDCCmem.c
6555         * src/SDCCopt.c
6556         * src/SDCCpeeph.c
6557         * src/SDCCset.c
6558         * src/avr/ralloc.c
6559         * src/ds390/ralloc.c
6560         * src/izt/ralloc.c
6561         * src/mcs51/ralloc.c
6562         * src/pic/ralloc.c
6563         * src/pic16/ralloc.c
6564         * src/xa51/ralloc.c
6565         * src/z80/ralloc.c
6566         * src/z80/gen.c: removed unused label "release:"
6567
6568 2003-10-06  Borut Razem <borut.razem AT siol.net>
6569
6570         * src/SDCC.lex: removed definition of unused variables
6571           save_optimize and save_options
6572
6573 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6574
6575         * clean.mk: removed '=' in "-maxdepth=1"
6576         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6577         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6578
6579 2003-10-06  Borut Razem <borut.razem AT siol.net>
6580
6581         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6582           my_unput() replaced by unput()
6583
6584 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6585
6586         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6587         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6588         type-punned pointer will break strict-aliasing rules"
6589         Old LR behaviour is again default; Klaus' LR can be choosen by
6590         defining the environment variable LRKLAUS
6591         * src/SDCCBBlock.h
6592         * src/SDCCloop.c
6593         * src/SDCClrange.c
6594         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6595         * clean.mk: fixed removal of files in bin/CVS/
6596         * device/lib/clean.mk: fixed removal of directories small and large
6597         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6598         * src/SDCCicode.c,
6599         * src/SDCCval.c: removed superflous test for pedantic
6600
6601 2003-10-05  Borut Razem <borut.razem AT siol.net>
6602
6603         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6604           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6605           message "unmatched #pragma SAVE and #pragma RESTORE"
6606
6607 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6608
6609         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6610           assembly, critical functions, atomic, nojtbound)
6611
6612 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6613
6614         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6615         * src/SDCCBBlock.h
6616         * src/SDCCloop.c
6617         * src/SDCCloop.h
6618         * src/SDCClrange.c
6619
6620 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6621
6622         * src/z80/gen.h,
6623         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6624         * src/mcs51/gen.h
6625         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6626         * src/ds390/gen.h
6627         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6628         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6629         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6630
6631 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6632
6633         * src/z80/gen.c (genRet): fixed bug #524753
6634         * src/z80/gen.c (genCast): fixed internal error on cast from
6635         pointer to long
6636         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6637         fix for bug #477835 to the z80
6638         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6639         for tracking iCodes in the peephole optimizer for z80
6640
6641 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6642
6643         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6644         the other part of bug #814548
6645         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6646
6647 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6648
6649         * src/SDCCcse.c: fixed part of bug #814548
6650
6651 2003-09-28  Borut Razem <borut.razem AT siol.net>
6652
6653         * src/asm.c: rewrite of printILine() to use temporary file instead
6654           a pipe
6655         * src/xa51/main.c: commented out declaration of int rewinds
6656
6657 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6658
6659         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6660
6661 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6662
6663         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6664         * src/asm.c (printILine): Fixed bug #811015
6665
6666 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6667
6668         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6669         freeing.
6670
6671 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6672
6673         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6674         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6675         to correctly handle general case of AOP_PAIRPTR
6676         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6677
6678 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6679
6680         * src/mcs51/ralloc.c (fillGaps),
6681         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6682         register positioning bug)
6683
6684 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6685
6686         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6687
6688 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6689
6690         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6691         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6692         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6693         (ralloc doesn't intentionally do this now, but perhaps later)
6694         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6695         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6696         register positioning bugs (Fixed bug #762602 and #795325)
6697         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6698         (Fixed bug #808779)
6699         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6700         lines that --i-code-in-asm generates
6701
6702 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6703
6704         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6705         trying to fclose a FILE* that was already closed.
6706
6707 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6708
6709         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6710         of const struct should be treated as if const themselves)
6711
6712 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6713
6714         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6715
6716 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6717
6718         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6719         Unix (/n) and DOS (/r/n) line terminations.
6720
6721 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6722
6723         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6724         bug #613775
6725
6726 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6727
6728         * src/mcs51/gen.c (genFunction, genEndFunction),
6729         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6730         and restore of EA so that stack offsets to parameters are
6731         correct when using both critical and reentrant/stack-auto.
6732         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6733         size (can be triggered in error if sloc is shared between
6734         different sized objects)
6735         * device/include/float.h: fixed macros to explicitly use
6736         unsigned long where needed
6737
6738 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6739
6740         Feature req. 799831: added code to allow nesting of critical functions
6741         * src/mcs51/gen.c (genFunction, genEndFunction)
6742         * src/ds390/gen.c (genFunction, genEndFunction)
6743
6744 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6745
6746         * src/SDCCsymt.c (sclsFromPtr),
6747         * src/SDCCsymt.h,
6748         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6749         support for standard C idiom of memory mapped variables; for
6750         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6751         to xdata int at 0x1234 tempvar = 1.
6752         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6753         provided by Akiya ISHIDA
6754
6755 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6756
6757         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6758         * src/SDCCval.c (constVal): added reduction from int to char
6759         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6760         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6761         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6762         to ignore the sign
6763         * support/regression/tests/shifts.c: fixed
6764
6765 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6766
6767         * src/z80/gen.c (genXor): Fixed bug #805445
6768
6769 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6770
6771         Fixed bug #621531 (const & volatile confusion in the type chain).
6772         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6773         refer to the const or volatile state of the pointer itself.
6774
6775         * src/SDCCast.c
6776         * src/SDCCglue.c
6777         * src/SDCCicode.c
6778         * src/SDCCsymt.c
6779         * src/SDCCval.c
6780         * src/SDCC.y
6781         * src/SDCCsymt.h
6782         * src/pic/gen.c
6783         * src/pic/ralloc.c
6784         * src/pic16/gen.c
6785         * src/pic16/ralloc.c
6786         * support/regression/tests/const.c
6787
6788 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6789
6790         When checking for duplicated modules, use absolute paths
6791         instead of relative paths.  Files changed:
6792
6793         * as/mcs51/lklib.c
6794         * link/z80/lklib.c
6795
6796 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6797
6798         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6799
6800 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6801
6802         * device/include/string.h: added size_t typedef, changed
6803         prototypes to use size_t, eliminated separate reentrant and
6804         non-reentrant declarations, added _memmove declaration
6805         * device/lib/_memcpy.c: changed to use size_t instead of int,
6806         changed /4 to >>2 to avoid division library call
6807         * device/lib/_memcmp.c,
6808         * device/lib/_memset.c,
6809         * device/lib/_strncat.c,
6810         * device/lib/_strncpy.c,
6811         * device/lib/_strncmp.c: changed to use size_t instead of int
6812         * device/lib/_memmove.c: new file (fixed bug #772294)
6813         * device/lib/Makefile.in: added _memmove.c
6814         * device/lib/z80/asm_strings.s: fixed bug #772290
6815         * support/regression/tests/bitfields.c: attempt to fix host assertion
6816         failure on amd64-unknown-linux2.2
6817
6818 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6819
6820         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6821         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6822         * as/z80/asmain.c (main): fixed bug #801766
6823
6824 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6825
6826         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6827         compilers
6828
6829 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6830
6831         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6832         reported in bug #800609
6833
6834 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6835
6836         * Top header beautifications in src/pic16 directory:
6837           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6838           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6839           pcoderegs.h, ralloc.c, ralloc.h
6840         * main.c: added top header and GPL license notice
6841         * pcode.c: fixed the if-conditional warning
6842
6843 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6844
6845         * device/lib/_mullong.c: replaced int by short for gcc
6846
6847 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6848
6849         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6850         and JUMPTABLE iCodes properly now (worked by accident before)
6851         * src/mcs51/gen.c (leftRightUseAcc),
6852         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6853         iCode properly now. Use getSize instead of nRegs since a & b
6854         aren't part of the nRegs tally.
6855
6856 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6857
6858         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6859         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6860           before instructions that use the _STATUS register
6861
6862 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6863
6864         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6865         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6866         fetching of the pointer
6867         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6868         copied from genNearPointerSet()
6869         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6870         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6871         If they pop r0/r1 they must be called in the opposite order than aopOp().
6872         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6873         (resp. --stack-auto), prepared for --xstack
6874
6875 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6876
6877         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6878
6879 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6880
6881         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6882         these ports have their own __sdcc_external_start()
6883
6884 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6885
6886         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6887         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6888         type for bits was changed. It resulted in bit variables becoming
6889         global, which is not permitted in PIC 14 assembly output.
6890
6891 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6892
6893         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6894
6895 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6896
6897         Z80 and MCS51 linkers complaint if a public symbol is defined
6898         in more than one library module:
6899
6900         * as/mcs51/lklib.c
6901         * link/z80/lklib.c
6902         * as/mcs51/Makefile.in
6903
6904 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6905
6906         A few small changes that speed up the peephole optimizer.
6907
6908         * src/SDCCpeeph.c
6909
6910 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6911
6912         Try to make the peephole optimizer smarter by maintaining
6913         an association between the assembly source code and the
6914         iCodes that originated them. Put this information to use
6915         with a new peephole rule condition "notVolatile" so that
6916         the rules can be aggressive yet still safe.
6917
6918         * src/SDCCpeeph.c
6919         * src/SDCCpeeph.h
6920         * src/mcs51/gen.c
6921         * src/mcs51/peeph.def
6922
6923 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6924
6925         Fixed bug #741761
6926
6927         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6928         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6929         if the left or right operand symbols have the accuse flag set.
6930
6931 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6932
6933         Changed the type of the result of the ! (NOT) operator to char;
6934         previously it returned the same type as the source. This allows
6935         us to eliminate all the genFloatNot functions (all of its target
6936         implementations were very buggy) since !float can use the same
6937         code as !long now.
6938
6939         * src/SDCCicode.c (ast2iCode): ! returns char
6940         * src/mcs51/gen.c (genNot, genNotFloat),
6941         * src/ds390/gen.c (genNot, genNotFloat),
6942         * src/z80/gen.c (genNot, genNotFloat),
6943         * src/pic/gen.c (genNot, genNotFloat),
6944         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6945
6946 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6947
6948         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6949         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6950            during interrupts. Ensure WSAVE is located at a shared bank address.
6951         2. Fixed page selection in some places
6952         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6953            the registers name strings.
6954         4. Fixed "signed / unsigned compare" compiler warnings.
6955         5. The PIC port manages its own allocation of the general purpose
6956            registers, but makes no attempt to reuse them. As a result when
6957            compiling it soon runs out of general purpose registers. Some
6958            additional code was added to the files pcode.c and device.c to walk
6959            through the function call tree and rename the registers so that they
6960            get reused.
6961
6962         * src/pic/device.c
6963         * src/pic/gen.c
6964         * src/pic/glue.c
6965         * src/pic/pcode.c
6966         * src/pic/pcode.h
6967         * src/pic/ralloc.c
6968         * src/pic/ralloc.h
6969         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6970         genPlus() & genMinus() when the result is the same as left or right
6971
6972 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6973
6974         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6975
6976 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6977
6978         Made bitfield a distinct type from bit so that bitfields
6979         convert as per ANSI C and bits retain their traditional
6980         boolean style behaviour. Implemented bitfield support in
6981         the z80 port.
6982
6983         * src/SDCCsymt.h,
6984         * src/SDCCsymt.c,
6985         * src/SDCCast.c,
6986         * src/cdbFile.c,
6987         * src/mcs51/gen.c,
6988         * src/ds390/gen.c: bit v bitfield split
6989         * src/z80/gen.c: New support for bitfields
6990         * support/regression/tests/bitfields.c: reenabled z80,
6991         added more tests
6992
6993 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6994
6995         Rules 246.x, 247.x relate to bitfields, the others speed up
6996         access to xdata mapped I/O devices.
6997
6998         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6999
7000 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7001
7002         Cleaned up genPackBits and genUnpackBits and added two helper
7003         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
7004         for literal assignments in genPackBits (thanks to Frieder for
7005         reminding me).
7006
7007         * src/mcs51/gen.c
7008         * src/ds390/gen.c
7009
7010 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7011
7012         Fixed bug #748310 (pointer to function type mishandled when the
7013         function name is omitted). Also fixed a SIGSEGV when a function
7014         attribute (reentrant, etc) is used on a non-function or on a
7015         function but misplaced before the parameter list.
7016
7017         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
7018         bug #748310
7019         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
7020         * support/Util/SDCCerr.h,
7021         * support/Util/SDCCerr.c: Added func attr misuse error msg
7022
7023 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7024
7025         Fixed bug #787649 by anonymous
7026         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
7027         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
7028
7029 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7030
7031         Fixed numerous bitfield problems.
7032
7033         * src/SDCC.y: More bitfield related error checking
7034         * src/SDCCsymt.h,
7035         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7036         * support/Util/SDCCerr.h,
7037         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7038         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7039         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7040         * support/regression/tests/bitfields.c: tests added
7041
7042 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7043
7044         Made the constant following the "interrupt" keyword optional. If
7045         omitted, the function will not automatically be given an entry
7046         in the interrupt vector table (similar to #pragma NOIV, but
7047         less syntacticly kludgy). The interrupt number is also now
7048         range checked. Also fixed a bug in the high order bit example
7049         in the manual.
7050
7051         * src/SDCC.y
7052         * src/SDCCmem.c
7053         * src/SDCCglue.c
7054         * src/SDCCsymt.h
7055         * support/Util/SDCCerr.c
7056         * support/Util/SDCCerr.h
7057         * doc/sdccman.lyx
7058
7059 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7060
7061         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7062         * src/SDCCicode.c (operandOperation): rewritten some ops
7063         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7064         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7065         other type
7066         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7067         be re-activated by defining REDUCE_LITERALS)
7068         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7069         unsigned, but are signed by default
7070         * src/SDCCval.c (constVal): rearranged
7071         * src/SDCCval.c (valMod): preliminary fix
7072         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7073         * support/regression/literalop.c: added, work in progress
7074
7075 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7076
7077         Generate warnings for useless declarations like "char data;"
7078         that don't do what new users expect.
7079
7080         * src/SDCC.y
7081         * support/Util/SDCCerr.h
7082         * support/Util/SDCCerr.c
7083
7084 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7085
7086         * src/SDCCval.c (valMult): fix overflow detection of negative int
7087
7088 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7089
7090         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7091
7092         Changes to support big endian targets:
7093
7094         * src/ports.h
7095         * src/SDCCglue.c
7096         * src/avr/main.c
7097         * src/ds390/main.c
7098         * src/izt/i186.c
7099         * src/mcs51/main.c
7100         * src/pic/main.c
7101         * src/pic16/main.c
7102         * src/xa51/main.c
7103         * src/z80/main.c
7104
7105 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7106
7107         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7108         * device/lib/time.c: fixed warning "integer overflow in expression"
7109
7110 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7111
7112         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7113         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7114         constants are unsigned; added recognition of "u" flag for unsigned
7115         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7116         * src/SDCCval.c (valDiv, valMod): fixed signdness
7117         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7118         signedness of modulo, left and right shift
7119         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7120         * support/Util/SDCCerr.h: added warning W_INT_OVL
7121         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7122         * src/SDCCast.c (ast_print): improved output of constants
7123
7124 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7125
7126         Fixed some warnings when building with MSVC:
7127
7128         * as\mcs51\asdata.c
7129         * as\z80\asdata.c
7130         * as\mcs51\asm.h
7131         * as\z80\asm.h
7132         * link\z80\aslink.h
7133         * link\z80\lkdata.c
7134         * link\z80\lkeval.c
7135         * link\z80\lkgb.c
7136         * link\z80\lkihx.c
7137         * link\z80\lks19.c
7138         * link\z80\lksym.c
7139         * support\cpp2\cpplib.c
7140         * src\ds390\gen.c
7141         * src\mcs51\gen.c
7142
7143 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7144
7145         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7146
7147 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7148
7149         * support\librarian\clean.mk: Do not remove Makefile.
7150         * support\librarian\Makefile: added.
7151
7152 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7153
7154         Added librarian to MSVC build:
7155         * all.dsp
7156         * sdcc.dsw
7157         * support\librarian\librarian.dsp
7158
7159         'configure' not needed for librarian, removed:
7160         * support\librarian\configure
7161         * support\librarian\configure.in
7162         * support\librarian\config_in.h
7163         * support\librarian\Makefile.in
7164
7165         Hopefully these ones built the librarian and the rest of sdcc properly:
7166         * Makefile
7167         * Makefile.common.in
7168
7169         Messed up 'configure', so revert to previous version:
7170         * configure
7171         * configure.in
7172
7173 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7174
7175         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7176         there, while the mantissa of a double is "only" 53 bits wide.
7177
7178 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7179
7180         Adding sdcclib to the build.  MSVC project coming soon.
7181         Files added/changed:
7182
7183         * support\librarian\clean.mk
7184         * support\librarian\configure
7185         * support\librarian\configure.in
7186         * support\librarian\config_in.h
7187         * support\librarian\Makefile.bcc
7188         * support\librarian\Makefile.in
7189         * support\librarian\sdcclib.c
7190         * Makefile.bcc
7191         * Makefile
7192         * Makefile.common.in
7193         * configure
7194         * configure.in
7195
7196 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7197
7198         Linker now complaints if linked modules have conflicting options, for
7199         example, one compiled using --model-large and another one compiled with
7200         --model-small.  The following files were modified:
7201
7202         * as\mcs51\asdata.c
7203         * as\mcs51\aslink.h
7204         * as\mcs51\asm.h
7205         * as\mcs51\asmain.c
7206         * as\mcs51\asout.c
7207         * as\mcs51\i51pst.c
7208         * as\mcs51\lkdata.c
7209         * as\mcs51\lklibr.c
7210         * as\mcs51\lkmain.c
7211         * as\z80\asdata.c
7212         * as\z80\asm.h
7213         * as\z80\asmain.c
7214         * as\z80\asout.c
7215         * as\z80\z80pst.c
7216         * link\z80\aslink.h
7217         * link\z80\lkdata.c
7218         * link\z80\lklibr.c
7219         * link\z80\lkmain.c
7220         * src\SDCCglue.c
7221
7222 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7223
7224         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7225         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7226
7227 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7228
7229         * src/z80/mappings.i: fix _mul[us][int,long] entries
7230
7231 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7232
7233         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7234
7235 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7236
7237         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7238         * support/regression/tests/bitopcse.c: added
7239         fixed warning:
7240         * src/avr/gen.c:
7241         * src/pic/gen.c:
7242         * src/pic16/gen.c:
7243         * src/z80/gen.c:
7244         * src/xa51/gen.c:
7245
7246 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7247
7248         added support for new library format to z80, gbz80 linkers:
7249         *link/z80/aslink.h
7250         *link/z80/lklex.c
7251         *link/z80/lklib.c
7252         *link/z80/lklist.c
7253
7254 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7255
7256         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7257         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7258
7259 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7260
7261         added DUMMY_READ_VOLATILE:
7262         * src/SDCC.y:
7263         * src/avr/gen.c:
7264         * src/xa51/gen.c:
7265         * src/z80/gen.c:
7266         * src/pic/gen.c:
7267         * src/pic16/gen.c:
7268         * src/mcs51/gen.c:
7269         * src/ds390/gen.c:
7270         * src/SDCCcse.c (algebraicOpts): many improvements
7271         * src/SDCCcse.h: removed algebraicOpts()
7272         * src/SDCCicode.c (picDummyRead): added
7273
7274 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7275
7276         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7277         "Insufficient space in data memory".
7278
7279 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7280
7281         * src/mcs51/gen.c: fixed bug #771358
7282         * src/z80/gen.c: fixed bug #759087
7283
7284 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7285
7286         * src/pic16/glue.c: minor cleanup by Vangelis
7287
7288 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7289
7290         * device/include/regc515c.h: fixed #758477
7291         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7292         * device/lib/_gptrput.c: saved a few bytes
7293         * my tab spacing is 8, yours too?)
7294         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7295         * device/lib/serial.c: process RX bytes earlier than TX bytes
7296         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7297
7298 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7299
7300         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7301
7302 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7303
7304     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7305
7306 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7307
7308         * device/lib/Makefile.in: bad fix, reverted to 1.43
7309
7310 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7311
7312         * device/lib/Makefile.in: added missing z80 object files
7313
7314 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7315
7316         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7317         pic16 progress by Vangelis:
7318         * src/SDCCglobl.h:
7319         * src/SDCCmain.c:
7320         * src/pic/Makefile:
7321         * src/pic:
7322         * pic/Makefile:
7323         * pic16/device.c:
7324         * pic16/device.h:
7325         * pic16/gen.c:
7326         * pic16/gen.h:
7327         * pic16/genarith.c:
7328         * pic16/glue.c:
7329         * pic16/main.c:
7330         * pic16/pcode.c:
7331         * pic16/pcode.h:
7332         * pic16/pcodepeep.c:
7333         * pic16/peeph.def:
7334
7335 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7336
7337     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7338
7339 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7340
7341     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7342     added gbz80 build to MSVC project.
7343     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7344     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7345     from 8051 stuff and setup so it links using a .lnk file.
7346
7347 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7348
7349     * support/librarian/sdcclib.c: sdcc librarian.
7350     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7351     with sdcclib.
7352
7353 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7354
7355     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7356
7357 2003-07-02  Borut Razem <borut.razem AT siol.net>
7358
7359         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7360         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7361         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7362         src/xa51/main.c, src/z80/main.c:
7363         virtualization of glue() function: each port has it's own glue function,
7364         which is accessed by do_glue function pointer in PORT.general structure
7365
7366 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7367
7368         * DS800C400 fun, improved ROM interface and tinibios.
7369
7370 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7371
7372         * More support for DS80C400. Now includes beginning of interface to ROM.
7373
7374 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7375
7376         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7377
7378 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7379
7380         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7381
7382 2003-06-19  Borut Razem <borut.razem AT siol.net>
7383
7384         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7385
7386 2003-06-19  Borut Razem <borut.razem AT siol.net>
7387
7388         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7389         fixed Z80 port - crt0.o: cannot open.
7390
7391 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7392
7393         * support/Util/MySystem.c (merge_command): revert bad fix
7394
7395 2003-06-18  Borut Razem <borut.razem AT siol.net>
7396
7397         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7398
7399 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7400
7401         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7402         option --use-stdout sends errors to stdout instead of stderr.
7403
7404 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7405
7406         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7407
7408 2003-06-15  Borut Razem <borut.razem AT siol.net>
7409
7410         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7411         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7412         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7413         fixed width array of pointers replaced with sets;
7414         multiple include and lib paths ared transferred to preprocessor and linker
7415         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7416         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7417         fixed width array of pointers
7418         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7419         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7420         fixupPath(), getPathDifference()
7421         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7422         fixed width array of pointers
7423
7424 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7425
7426         * src/pic16/ralloc.c: fix warnings
7427         * src/pic16/pcode.c: fix warning
7428
7429 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7430
7431          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7432         know all the details, but essentially this set of changes enable
7433         the pic16 port to generate movff instructions and generate assembler
7434         directives,
7435         * src/SDCCmain.c:
7436         * src/pic16/gen.c:
7437         * src/pic16/glue.c:
7438         * src/pic16/pcode.c:
7439         * src/pic16/device.c:
7440         * src/pic16/main.c:
7441         * src/pic16/pcode.h:
7442         * src/pic16/pcoderegs.c:
7443         * src/pic16/ralloc.c:
7444         * src/pic16/ralloc.h:
7445
7446 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7447
7448         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7449         added option --vc, so sdcc errors and warnings are compatible with
7450         Microsoft Visual Studio.
7451
7452 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7453
7454         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7455           device/lib/libfloat.lib: added atof function.
7456
7457 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7458
7459         * doc/sdccman.lyx: updated to Lyx 1.3
7460         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7461         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7462         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7463
7464 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7465
7466         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7467
7468 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7469
7470         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7471           additions to the "related tools/documentation" section
7472
7473 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7474
7475         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7476
7477 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7478
7479         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7480         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7481
7482 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7483
7484         * doc/sdccman.lyx: fix double dash and other minor things
7485         * doc/Makefile: fix double dash
7486
7487 2003-05-28  Karl Bongers(patches from Martin Helmling)
7488         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7489           condition and ignore commands.
7490
7491 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7492
7493         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7494           is in parts still quite out of date, I did changes as far as I felt makes sense
7495           for a non-native english speaker.
7496           Please feel free to add to the manual or to correct my changes.
7497         * doc/Makefile: undid touching the date of intermediate tex files.
7498
7499 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7500
7501         * doc/sdccman.lyx: Manual has an index now
7502
7503 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7504
7505         Finalize muluint/mulsint and mululong/mulslong merging:
7506         * device/lib/_mulint.c
7507         * device/lib/_mullong.c
7508         * device/lib/gbz80/mul.s
7509         * device/lib/gbz80/stubs.s
7510         * device/lib/z80/mul.s
7511         * device/lib/z80/stubs.s
7512         * src/SDCCsymt.c (initCSupport)
7513
7514 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7515
7516         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7517         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7518           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7519           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7520           instead of /Zm500.
7521
7522 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7523
7524         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7525           the regression tests I'm not brave enough to enable 245.b, 245.c
7526         * doc/sdccman.lyx: added latex preamble for hyperref package.
7527           Using pdflatex this will give you a hyperlinked pdf file with
7528           bookmarks. (prepend '%' before /usepackage if this breaks something)
7529
7530 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7531
7532          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7533
7534 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7535
7536         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7537
7538 2003-05-21    <johan AT balder>
7539
7540         * src/SDCCglue.c (printIval): fixed bug #739934
7541
7542 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7543
7544         Applied patch from bug 737905 (renamed yylineo to mylineno):
7545         * src/altlex.c
7546         * src/SDCCast.c
7547         * src/SDCglobl.h
7548         * src/SDCC.lex
7549         * src/SDCCsymt.c
7550         * src/SDCCval.c
7551         * src/pic16/pcode.c: Cleaned warnings
7552         * src/pic16/pcodeflow.c: Cleaned warnings
7553         * src/pic16/pcoderegs.c: Cleaned warnings
7554
7555 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7556
7557         * src/pic16/pcode.c: Cleaned warnings
7558         * src/pic16/pcodepeep.c: Cleaned warnings
7559         * src/pic16/ralloc.c: Cleaned warnings
7560
7561 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7562
7563         * doc/sdccman.lyx: fixed bug 739745
7564         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7565
7566 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7567
7568         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7569         it can be defined with CFLAGS when running configure
7570         * src/SDCCmain.c: fixed compiling + linking with object files
7571
7572 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7573
7574         * configure.in: configure for pic16 port,
7575             added --disable-pic16-port
7576         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7577         * src/SDCCmain.c: linkOptions is changed to set *,
7578             added if/endif conditional macros to remove options help
7579             messages from optionsTable when a port is not configured, added
7580             support for the PIc16 port in the ports table, when executing
7581             the compiler with no port specified on command line, a default
7582             port is selected with the new macro DEFAULT_PORT which is
7583             defined in port.h, in setDefaultOptions() linkOptions is removed
7584             from initialization assignment, since now it is a set,
7585             parseCmdLine uses setParseWithComma for linkOptions, in
7586             linkEdit() linkOptions are accessed with new function indexSet()
7587             which returns the i'th item of a set variable. See SDCCset.c, in
7588             linkEdit() when calling buildCmdLine(), added linkOptions as
7589             last argument. Now users can pass arguments to gplink via the
7590             -Wl option, main() uses pic16glue() to glue up pic16 programs
7591         * src/SDCCpeeph.c: various changes to support pic16
7592         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7593             return the i'th item of the set
7594         * src/SDCCset.h: added function prototype for indexSet()
7595         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7596         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7597         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7598             added macro DEFAULT_PORT
7599         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7600         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7601             generated
7602         * src/pic16/glue.c: commented out some error producing lines
7603         * src/pic16/main.c: __config directives are commented out to stop
7604             gpasm complaining and test the linkage with gplink, _linkCmd and
7605             _asmCmd changed to be more gplink and gpasm friendly
7606         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7607             produced an error when parsed, peep rule 12 is added to utilize
7608             movff, but it is commented out since the pCode does not support
7609             yet a command with 2 address arguments
7610
7611 2003-05-18    <johan AT balder>
7612
7613         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7614         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7615 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7616
7617         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7618   Added feature to script commands from file.
7619
7620 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7621
7622         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7623         * src/SDCCutil.c: include ctype.h for win32
7624
7625 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7626
7627         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7628
7629 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7630
7631         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7632   Fixed so you can set breakpoints prior to run, run does not stop
7633   on entry now.  Add tbreak.  Other enhancements and fixes for use
7634   with ddd.
7635
7636 2003-05-12  Borut Razem <borut.razem AT siol.net>
7637
7638         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7639
7640 2003-05-11  Borut Razem <borut.razem AT siol.net>
7641
7642         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7643         the path of bin directory, so that PATH is the only env. variable, which has to be set
7644         in case of standard installation.
7645         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7646         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7647         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7648
7649 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7650
7651         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7652         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7653         temp files are in the port dir; clean the gen/test directory when
7654         generating new test.c
7655         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7656         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7657         * support/regression/tests/zeropad.c: added
7658
7659 2003-05-09    <johan AT balder>
7660
7661         * src/SDCCglue.c: fixed bug #597940
7662
7663 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7664
7665         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7666   cache sfr, optimize next,step, fix off by one sourceline,
7667   support ddd list function.
7668         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7669
7670 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7671
7672         * support/regression/HTMLgen.py: added compare_s2f()
7673         * support/regression/Makefile: redo 1.27
7674         * support/regression/generate-cases.py: redo 1.5
7675
7676 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7677
7678         * support/regression/tests/float.c: workaround 33 bit hex constant
7679         * support/regression/tests/simplefloat.c: fix division for host
7680
7681 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7682
7683         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7684         that tame's the PIC's over-aggressive optimizer.
7685
7686 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7687
7688          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7689          support for MSVC.
7690
7691 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7692
7693         Initial support for DS80C400. "Hello world" runs on TINIm400
7694         (with polled I/O).
7695
7696 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7697
7698          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7699          * Some notes on ddd usage added in debugger/README
7700          Martin Helmling adding more features and fixes for ddd GUI debugger.
7701          Code added for nexti, stepi, up, down, and other adjustments.
7702
7703 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7704
7705         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7706         * src/pic/peeph.def Added two rules to optimize carry manipulation
7707         * src/pic/* removed debug printfs
7708
7709 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7710
7711         * debugger/mcs51/cmd.c: added header newalloc.h
7712
7713 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7714
7715         * as/Makefile: new EXEEXT
7716         * as/z80/Makefile: remove trailing slash of BUILDIR
7717         * as/z80/clean.mk: new EXEEXT
7718         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7719         * support/cpp2/Makefile.in: new EXEEXT
7720         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7721
7722 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7723
7724         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7725         EXEEXT was introduced to fix all related problems with targets
7726         "clean", "install" and "uninstall"; a couple of further flaws
7727         especially with "clean" have been fixed too
7728         * as/mcs51/Makefile.in
7729         * as/mcs51/clean.mk
7730         * as/z80/Makefile
7731         * Makefile
7732         * clean.mk
7733         * debugger/mcs51/Makefile.in
7734         * debugger/mcs51/clean.mk
7735         * link/z80/Makefile
7736         * link/z80/Makefile.in
7737         * link/z80/clean.mk
7738         * link/Makefile
7739         * packihx/Makefile.in
7740         * packihx/clean.mk
7741         * sim/ucsim/Makefile
7742         * sim/ucsim/clean.mk
7743         * sim/ucsim/avr.src/Makefile.in
7744         * sim/ucsim/avr.src/clean.mk
7745         * sim/ucsim/s51.src/Makefile.in
7746         * sim/ucsim/s51.src/clean.mk
7747         * sim/ucsim/xa.src/Makefile.in
7748         * sim/ucsim/xa.src/clean.mk
7749         * sim/ucsim/z80.src/Makefile.in
7750         * sim/ucsim/z80.src/clean.mk
7751         * sim/ucsim/main_in.mk
7752         * sim/ucsim/packages_in.mk
7753         * sim/ucsim/gui.src/Makefile.in
7754         * sim/ucsim/gui.src/serio.src/Makefile.in
7755         * sim/ucsim/gui.src/serio.src/clean.mk
7756         * src/Makefile.in
7757         * src/clean.mk
7758         * support/cpp2/Makefile.in
7759         * support/cpp2/clean.mk
7760         * support/makebin/Makefile
7761         * support/makebin/clean.mk
7762         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7763         * doc/sdccman.lyx: --program-suffix no longer needed
7764
7765 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7766
7767          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7768          Martin Helmling added support for ddd GUI debugger.
7769          Code added to display assembly, set variables, and other commands
7770          to interface to ddd.
7771
7772 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7773
7774         * as/Makefile: fix target clean
7775         * as/clean.mk: fix target clean
7776         * as/z80/clean.mk: fix target clean
7777
7778 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7779
7780         * Makefile.common.in: added  AT EXEEXT AT
7781         * configure.in: removed all mingw32 stuff
7782         * configure: rebuilt from configure.in
7783         * doc/sdccman.lyx: updated section "installation"
7784         * support/scripts/sdcc_mingw32: adapted to configure
7785         * support/scripts/sdcc_cygwin_mingw32: added
7786
7787 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7788
7789         * src/pic Added object file support for the PIC port
7790         * src/pic Applied patch from Craig Franklin (this started the object file support)
7791         * src/regression Updated the PIC regression tests for object files
7792
7793 2003-04-20  Borut Razem <borut.razem AT siol.net>
7794
7795         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7796           lklex.c: In function `getfid':
7797           lklex.c:203: warning: array subscript has type `char'
7798         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7799           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7800         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7801           stack handling macros
7802
7803 2003-04-19  Borut Razem <borut.razem AT siol.net>
7804
7805         * "handling space characters in file path" task:
7806         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7807         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7808         * support/Util/MySystem.h: make it self-sufficient
7809         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7810           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7811           handling space characters in file path
7812         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7813           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7814         * support/Util/MySystem.c: handling space characters in executable's path
7815
7816 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7817
7818         * as/z80/Makefile: fix permanent rebuild of z80
7819         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7820         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7821
7822 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7823
7824         * src/SDCCopt.c: add special case optimization to replace modulo by
7825           a power of two with a bitwise AND.
7826
7827 2003-04-18    <johan AT balder>
7828
7829         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7830
7831 2003-04-17    <johan AT balder>
7832
7833         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7834         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7835
7836 2003-04-13  Borut Razem <borut.razem AT siol.net>
7837
7838         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7839         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7840           fixed mingw problem in adl_NORMALIZE_PATH
7841
7842 2003-04-12  Borut Razem <borut.razem AT siol.net>
7843
7844         * fixed "#pragma SAVE/RESTORE can not be nested":
7845         * src/SDCC.lex: reworked pragma handling functions
7846         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7847         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7848
7849 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7850
7851         * src/SDCCutil.c (pathEquivalent): defined but not used
7852         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7853         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7854         * configure: rebuilt from configure.in
7855         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7856         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7857         * device/include/Makefile.in: replace sdcc_datadir
7858         * device/lib/Makefile.in: replace sdcc_datadir
7859         * Makefile.common.in: add LDFLAGS from configure
7860         * packihx/Makefile.in: use LDFLAGS
7861         * src/Makefile.in: use LDFLAGS
7862         * support/cpp2/Makefile.in: add LDFLAGS from configure
7863         * support/makebin/Makefile: use LDFLAGS
7864         * .version: bumped version number to 2.3.5
7865
7866 2003-04-12  Borut Razem <borut.razem AT siol.net>
7867
7868         * completed "different paths" task:
7869         * src/SDCCmacro.c: fixed bug in handling quotes
7870         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7871         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7872
7873 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7874
7875         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7876
7877 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7878
7879         * ds390/gen.c ds390/peeph.def: fix bug 706781
7880
7881 2003-04-11  Borut Razem <borut.razem AT siol.net>
7882
7883         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7884
7885 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7886
7887         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7888         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7889          set - this bit used to not be set...).
7890         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7891           bad code in PIC Port
7892         * src/regression/and2.c added to test bug 609268
7893         * src/regression/Makefile added and2.c to regression test
7894
7895
7896 2003-04-08    <johan AT CP255758-A>
7897
7898         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7899         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7900         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7901
7902 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7903
7904         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7905         fix bug #487815
7906         * support/cpp2/Makefile.in: fix bug #487815
7907         * configure: rebuilt from configure.in
7908         * Makefile.common.in: docdir changed, new path suffixes
7909         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7910         * sdcc_vc_in.h: reflect changes from sdccconf.h
7911         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7912         * src/SDCCutil.h: remove BINDIR hack
7913         * doc/sdccman.lyx: update new path hierarchy
7914
7915 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7916
7917         * src/SDCCpeeph.c: added okToRemoveSLOC test
7918
7919 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7920
7921         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7922
7923 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7924
7925         * src/SDCCpeeph.c: added labelIsReturnOnly test
7926         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7927
7928 2003-04-05    <johan AT balder>
7929
7930         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7931         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7932         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7933         * src/SDCCast.c: fixed a warning
7934         * src/SDCCast.h: fixed a warning
7935         * src/SDCCicode.c (operandFromAst): fixed a warning
7936
7937 2003-04-04    <johan AT balder>
7938
7939         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7940         * src/SDCCast.c (decorateType): fixed bug #715076
7941         * src/SDCC.y: fixed bug #702907
7942
7943 2003-04-03    <johan AT balder>
7944
7945         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7946         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7947         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7948         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7949         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7950
7951 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7952
7953         * _decdptr.c: fix return values
7954         * _gptrget.c: fix return values
7955         * _gptrgetc.c: fix return values
7956         * _gptrput.c: fix return values
7957         * _mulint.c: fix return values
7958         * as/z80/Makefile: fix 'make -j' problem
7959
7960 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7961
7962         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7963         * configure.in: big cleanup, updated to autoconf 2.5x
7964         * configure: rebuilt from configure.in
7965         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7966         * sdcc_vc_in.h: reflect changes from sdccconf.h
7967         * doc/Makefile: fixed a flaw in "make install"
7968
7969 2003-04-02    <johan AT balder>
7970
7971         * src/ds390/gen.c (genCmp): no comments
7972         * src/mcs51/gen.c (genCmp): no comments
7973         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7974         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7975
7976 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7977
7978         * support/regression/generate-cases.py: place generated file in given sub directory
7979         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7980         * support/regression/Makefile: improvements for 'make -j';
7981         side effect: it's simpler and faster now
7982
7983 2003-03-31  Borut Razem <borut.razem AT siol.net>
7984
7985         * src/z80/main.c: link-{port} and as-{port} defined without path
7986         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7987
7988 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7989
7990         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7991
7992 2003-03-30  Borut Razem <borut.razem AT siol.net>
7993
7994         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7995           changed type of list parameter to set
7996         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7997         * src/port.h: changed type of do_assemble() parameter to set
7998         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7999           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
8000           definition of "cppoutfilename" macro with NULL value in preProcess()
8001         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
8002         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
8003         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
8004           replaced with set *binPathSet
8005         * shash_add() deallocates the item, if allready exsists, before adding the new one
8006         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
8007
8008 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
8009
8010         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
8011           a nested for loop bug in the PIC port
8012         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
8013           for loops
8014
8015 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
8016
8017         * support/Util/dbuf.h: remove C++ stuff to make it portable
8018
8019 2003-03-28  Borut Razem <borut.razem AT siol.net>
8020
8021         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
8022           literal strings in stringLiteral()
8023         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
8024         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
8025           to the project
8026
8027 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
8028
8029         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
8030
8031 2003-03-26    <johan AT balder>
8032
8033         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
8034         * src/ds390/gen.c (saveRegisters): catched symbol abuse
8035         * src/SDCCast.c (decorateType): fixed " -v < 3"
8036
8037 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8038
8039         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8040         Added Lenny Story's debug infrastructure changes:
8041         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8042         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8043         * src/cdbFile.c: added
8044         * src/SDCCdebug.c: added
8045         * src/SDCCdebug.h: added
8046         * src/SDCCast.c (createFunction)
8047         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8048         * src/SDCCmain.c (parseCmdLine, main)
8049         * src/SDCCmem.c (redoStackOffsets)
8050         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8051         * src/SDCCsymt.h
8052         * src/common.h
8053         * src/avr/gen.c (genAVRCode)
8054         * src/ds390/gen.c (gen390Code)
8055         * src/mcs51/gen.c (gen51Code)
8056         * src/pic/gen.c (genpic14Code)
8057         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8058         * src/xa51/gen.c (genXA51Code)
8059         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8060
8061 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8062
8063         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8064         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8065
8066 2003-03-22    <johan AT balder>
8067
8068         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8069
8070 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8071
8072         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8073         * doc/cdbfileformat.lyx: added, written by Lenny Story
8074         * doc/Makefile: added cdbfileformat.lyx
8075         * doc/clean.mk: added cdbfileformat.lyx
8076
8077 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8078
8079         * src/mcs51/peeph.def: fix bug #705773
8080
8081 2003-03-20    <johan AT balder>
8082
8083         An sfr/sbit can have an "at #" AND an initializer
8084         * src/SDCCsymt.c (checkSClass):
8085         * src/SDCCmem.c (allocGlobal):
8086         * src/SDCCmem.c (allocLocal):
8087         * src/SDCCast.c (createBlock):
8088
8089 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8090
8091         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8092
8093 2003-03-16    <johan AT balder>
8094
8095         Undid the hackup of const and volatile, the problem is much bigger
8096         * src/SDCC.y:1.65
8097         * src/SDCCast.c:1.171
8098         * src/SDCCglue.c:1.138
8099         * src/SDCCicode.c:1.146
8100         * src/SDCCsymt.c:1.150
8101         * src/SDCCval.c:1.65
8102
8103 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8104
8105         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8106         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8107
8108 2003-03-13    <johan AT balder>
8109
8110         Hackup const and volatile modifiers in type chains a bit:
8111         * src/SDCC.y:1.63
8112         * src/SDCCast.c:1.169
8113         * src/SDCCglue.c:1.136
8114         * src/SDCCicode.c:1.143
8115         * src/SDCCsymt.c1.146
8116         * src/SDCCsymt.h1.59
8117         * src/SDCCval.c:1.63
8118
8119 2003-03-12    <johan AT balder>
8120
8121         * src/SDCCBBlock.h: more LRH debugging junk
8122         * src/SDCCcflow.h: more LRH debugging junk
8123         * src/SDCCloop.c: more LRH debugging junk
8124         * src/SDCC.y (struct_declaration): fixed bug #697590
8125         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8126         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8127         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8128
8129 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8130         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8131         test function names must now match exactly).
8132         * src/SDCCcse.c: added special case in findCheaperOp to allow
8133         extending a short integer. Makes less awful code for bug 700121 test case.
8134
8135 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8136
8137         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8138         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8139
8140 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8141
8142         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8143         actually called (operandsNotEqual() was called for all
8144         operandsNotEqualX tests).
8145
8146 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8147
8148         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8149         with shorter literals. Fixes bug 700121.
8150
8151 2003-03-11    <johan AT balder>
8152
8153         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8154
8155 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8156
8157         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8158         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8159
8160 2003-03-10  Borut Razem <borut.razem AT siol.net>
8161
8162         * src/SDCCmain.c: pipe preprocessor's output
8163         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8164         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8165         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8166         which closes all pipes in pipeSet set
8167         * src/SDCCset.c: free deleted item in function deleteSetItem()
8168         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8169         moved from z80 to src subproject
8170         * .version: increased version number to 2.3.4
8171
8172 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8173
8174         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8175         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8176         * support/regression/ports/xa51/spec.mk: fix typo
8177
8178 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8179
8180         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8181
8182 2003-03-09  Borut Razem <borut.razem AT siol.net>
8183
8184         * src/SDCCmain.c: pipe preprocessor's output
8185         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8186         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8187         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8188         which closes all pipes in pipeSet set
8189         * src/SDCCset.c: free deleted item in function deleteSetItem()
8190         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8191         moved from z80 to src subproject
8192
8193 2003-03-09  Borut Razem <borut.razem AT siol.net>
8194
8195         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8196         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8197         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8198         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8199         * src/SDCCglobl.h: unification of WIN32 native definitions
8200
8201 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8202
8203         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8204
8205 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8206
8207         * src/configure.in:   check for endianess (even while cross-compiling)
8208         * src/configure:      check for endianess (even while cross-compiling)
8209         * src/configure_in.h: check for endianess (even while cross-compiling)
8210         * src/avr/gen.c:        remove old endianess stuff
8211         * src/mcs51/gen.c:      remove old endianess stuff
8212         * src/ds390/gen.c:      remove old endianess stuff
8213         * src/pic/gen.c:        remove old endianess stuff
8214         * src/pic/genarith.c:   remove old endianess stuff
8215         * src/pic/glue.c:       fix endianess check
8216         * src/pic16/gen.c:      remove old endianess stuff
8217         * src/pic16/genarith.c: remove old endianess stuff
8218         * src/pic16/glue.c:     fix endianess check
8219         * src/xa51/gen.c:       remove old endianess stuff
8220         * src/z80/gen.c:        fix endianess check
8221         * src/SDCCglue.c:       fix endianess check
8222         * src/ds390/peeph.def: fix bug 700036
8223
8224 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8225
8226         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8227         * src/configure: find appropriate data-types on host for SDCC's int and long
8228         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8229         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8230         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8231
8232 2003-03-07    <johan AT balder>
8233
8234         Just a big NOOP:
8235                 some minor cleanups before the big shot
8236                 OP_DEFS and OP_USES now use Kevin's protection
8237                 new option --nolabelopt
8238
8239         * src/SDCCBBlock.c:
8240         * src/SDCCast.c,:
8241         * src/SDCCcflow.c:
8242         * src/SDCCcse.c:
8243         * src/SDCCicode.c:
8244         * src/SDCCicode.h:
8245         * src/SDCClabel.c:
8246         * src/SDCCloop.c:
8247         * src/SDCCmain.c:
8248         * src/ds390/ralloc.c:
8249         * src/mcs51/ralloc.c:
8250         * src/pic/ralloc.c:
8251         * src/xa51/ralloc.c:
8252         * src/z80/ralloc.c:
8253
8254 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8255
8256         * src/pic/pcode.c (get_op): fix 64 bit warnings
8257         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8258         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8259         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8260         * support/regression/tests/malloc.c: fix 64 bit warnings
8261
8262 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8263
8264         * src/mcs51/gen.c (genMinus): fixed bug 696436
8265
8266 2003-03-02  Borut Razem <borut.razem AT siol.net>
8267
8268         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8269
8270 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8271
8272         * configure.in: test for mkstemp
8273         * sdccconf_in.h: add HAVE_MKSTEMP
8274
8275 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8276
8277         * device/include/ctype.h: removed warning while using --stack-auto
8278         * device/include/malloc.h: removed warning while using --stack-auto
8279         * device/include/string.h: removed warning while using --stack-auto
8280
8281 2003-02-23  Borut Razem <borut.razem AT siol.net>
8282
8283         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8284         because NDEBUG is defined (see man assert)
8285         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8286
8287 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8288
8289         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8290         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8291
8292 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8293
8294         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8295         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8296
8297 2003-02-18    <johan AT balder>
8298
8299         * as/mcs51/asmain.c (asmbl): module can start with a digit
8300         * as/z80/asmain.c (asmbl): module can start with a digit
8301
8302 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8303
8304         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8305         * src/asm.c: fix pipe() for Mingw32
8306
8307 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8308
8309         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8310         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8311         make -V work again; --c1mode reads now from stdin
8312         * doc/sdccman.lyx: added --c1mode
8313         * support/Util/SDCCerr.c: new messages for c1 mode
8314         * support/Util/SDCCerr.h: new messages for c1 mode
8315         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8316
8317 2003-02-15    <johan AT balder>
8318
8319         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8320
8321 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8322
8323         * doc/sdccman.lyx: Environment variables, -o and other minor things
8324
8325 2003-02-14    <johan AT balder>
8326
8327         * src/xa51/main.c: before anyone really tries to use it :)
8328
8329         * Install doc's in share/sdcc/doc
8330         * removed some obsolete files
8331         * Do a proper make distclean and uninstall
8332         M Makefile.common.in
8333         R sdccbuild.sh
8334         M as/Makefile
8335         M device/include/Makefile.in
8336         M device/lib/Makefile.in
8337         M doc/sdccman.lyx
8338         M link/Makefile
8339         M sim/ucsim/doc/Makefile.in
8340         M src/clean.mk
8341         R src/avr/peeph.rul
8342         R src/xa51/peeph.rul
8343         M support/cpp2/Makefile.in
8344         M support/makebin/Makefile
8345
8346
8347 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8348
8349         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8350
8351 2003-02-10  Borut Razem <borut.razem AT siol.net>
8352
8353         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8354         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8355         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8356         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8357         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8358         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8359         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8360         src/z80/Makefile.bcc: Borland Makefile cleanup
8361         * as/z80/Makefile.bcc: Added Borland Makefile
8362         * support/cpp2/borland.h: Removed
8363
8364 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8365
8366         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8367         * src/SDCC.lex: new pragma NOIV
8368         * src/SDCCglobl.h: new pragma NOIV
8369         * src/SDCCmem.c: new pragma NOIV
8370
8371 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8372
8373         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8374
8375 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8376
8377         * src/SDCCmain.c: signal handling is switched off by --debug
8378         * doc/Makefile: small fix for install; use clean.mk again
8379         * doc/clean.mk: clean *.pdf and *.html too
8380
8381 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8382
8383         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8384         * device/lib/printfl.c: fix a ds390 bug by making it portable
8385         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8386         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8387         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8388         * debugger/mcs51/cmd.c: converted multi-line string literals
8389         * sim/ucsim/globals.cc: converted multi-line string literals
8390         * src/SDCCmain.c: introduced signal handler to remove temp files
8391         * doc/Makefile: small tweaks, implement clean
8392         * doc: removed generated files
8393
8394 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8395
8396         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8397         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8398         Address Record is not correctly generated for DS390."
8399
8400 2003-02-02  Borut Razem <borut.razem AT siol.net>
8401
8402         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8403         * as/mcs51/asm.h: fixed compilation with Borland C
8404         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8405         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8406         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8407         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8408         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8409         src/z80/Makefile.bcc: delete $(LIB) only if exist
8410         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8411
8412 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8413
8414         * device/include/malloc.h: introduced NULL
8415         * device/include/string.h: introduced NULL
8416         * device/include/stdlib.h: introduced NULL
8417         * device/lib/_memcpy.c: removed NULL
8418         * device/lib/_strcat.c: removed NULL
8419         * device/lib/_strchr.c: removed NULL
8420         * device/lib/_strcmp.c: removed NULL
8421         * device/lib/_strcpy.c: removed NULL
8422         * device/lib/_strcspn.c: removed NULL
8423         * device/lib/_strlen.c: removed NULL
8424         * device/lib/_strncat.c: removed NULL
8425         * device/lib/_strncmp.c: removed NULL
8426         * device/lib/_strncpy.c: removed NULL
8427         * device/lib/_strpbrk.c: removed NULL
8428         * device/lib/_strrchr.c: removed NULL
8429         * device/lib/_strspn.c: removed NULL
8430         * device/lib/_strstr.c: removed NULL
8431         * device/lib/_strtok.c: removed NULL
8432         * device/lib/malloc.c: removed NULL, include own header
8433
8434 2003-02-02    <johan AT balder>
8435
8436         * 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
8437         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8438         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8439         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8440         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8441         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8442
8443 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8444
8445         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8446         area 'DATA'"
8447
8448 2003-02-01    <johan AT balder>
8449
8450         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8451
8452 2003-01-31    <johan AT CP255758-A>
8453
8454         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8455
8456 2003-01-30    <johan AT balder>
8457
8458         * src/SDCCBBlock.c: automatic bug detection
8459         * src/SDCCicode.c: automatic bug detection
8460
8461 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8462
8463         * src/SDCCglobl.h:   now --xram-size 0 works
8464         * src/SDCCmain.c:    now --xram-size 0 works
8465
8466 2003-01-29    <johan AT balder>
8467
8468         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8469
8470 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8471
8472         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8473         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8474         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8475         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8476         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8477         * src/SDCCmain.c:    Added options --xram-size and --code-size
8478
8479 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8480
8481         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8482         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8483
8484 2003-01-27    <johan AT balder>
8485
8486         * src/SDCC.y: fixed bug #613764
8487
8488 2003-01-26    <johan AT balder>
8489
8490         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8491         * src/SDCCsymt.h: fixed bug #673374
8492         * src/SDCCglue.c: fixed bug #661910
8493         * src/SDCCast.c: fixed bug #458099 and 673374
8494
8495 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8496
8497         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8498         * as/mcs51/strcmpi.h: added
8499         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8500         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8501         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8502         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8503         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8504         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8505         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8506         * as/mcs51/Makefile.aslink: new module strcmpi
8507         * as/mcs51/Makefile.asx8051: new module strcmpi
8508         * as/mcs51/Makefil.bcc: new module strcmpi
8509         * as/mcs51/Makefile.in: new module strcmpi
8510         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8511
8512 2003-01-26    <johan AT balder>
8513
8514         * src/SDCCglue.c: reverted back to 1.124
8515         * src/SDCCast.c: reverted back to 1.156
8516         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8517
8518 2003-01-25    <johan AT balder>
8519
8520         * src/SDCCglue.c: A better fix for bug #661910
8521         * src/SDCCast.c: A better fix for bug #661910
8522         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8523
8524 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8525
8526         * src/Makefile.in: remove spawn.o
8527         * src/SDCCmain.c: remove spawn.h
8528         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8529         * src/spawn.c: removed
8530         * src/spawn.h: removed
8531         * support/regression/ports/ds390/spec.mk: link with -r
8532
8533 2003-01-24    <johan AT CP255758-A>
8534
8535         * src/ds390/gen.c (aopOp): fixed bug #667458
8536         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8537         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8538         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8539
8540 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8541
8542         * src/mcs51/peeph.def: better assembler identation by Frieder
8543         * src/mcs51/gen.c: better assembler identation by Frieder
8544
8545 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8546
8547         * as/z80/string.h: removed for gcc 3.2
8548         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8549         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8550
8551 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8552
8553         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8554         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8555         * support/regression/Makefile: separate temp files for ports
8556         * support/regression/generate-cases.py: separate temp files for ports
8557         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8558         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8559
8560 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8561
8562         * moved tinitalk to device/examples/ds390
8563
8564 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8565
8566         * as/mcs51/lkmem.c: rflag is for DS390
8567         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8568         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8569                          (linkEdit): move mem- and map-files the same way as ihx-files
8570         * src/z80/main.c (_setDefaultOptions): removed --generic
8571         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8572         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8573         * src/pic/glue.c (picglue): --c1mode works again
8574         * src/pic16/glue.c (pic16glue): --c1mode works again
8575         * src/asm.c (printCLine): fix #660034
8576
8577 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8578
8579         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8580         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8581         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8582         * as/mcs51/lkmem (summary): better fix for sp problem
8583         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8584         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8585         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8586                                               remove --stack-after-data
8587
8588 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8589
8590         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8591         * src/SDCCutil.c (join): ugly bug: missing '\0'
8592         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8593
8594 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8595
8596         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8597         * src/port.h: typo
8598         * src/pic/main.c (_asmCmd): gpasm supports -o
8599         * src/z80/main.c: more general macros
8600         * device/lib/Makefile.in: remove intermediate files
8601
8602 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8603
8604         * .version: Bumped version number to 2.3.3
8605         * src/SDCCBBlock.c: new option -o
8606         * src/SDCCglobl.h: new option -o
8607         * src/SDCCglue.c: new option -o
8608         * src/SDCCmain.c: new option -o
8609         * src/asm.c: new option -o
8610         * src/ds390/main.c: new option -o
8611         * src/pic/glue.c: new option -o
8612         * src/pic/pcode.c: new option -o
8613         * src/pic/ralloc.c: new option -o
8614         * src/pic16/glue.c: new option -o
8615         * src/pic16/pcode.c: new option -o
8616         * src/pic16/ralloc.c: new option -o
8617         * src/z80/main.c: new option -o
8618         * device/lib/Makefile.in: use -o
8619         * support/regression/ports/ds390/spec.mk: use -o
8620         * support/regression/ports/gbz80/spec.mk: use -o
8621         * support/regression/ports/mcs51/spec.mk: use -o
8622         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8623         * support/regression/ports/z80/spec.mk: use -o
8624         * support/regression/ports/ucz80/spec.mk: use -o
8625         * support/regression/ports/xa51/spec.mk: use -o
8626         * support/regression/fwk/lib/timeout.c: fix usage string
8627
8628 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8629         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8630
8631 2003-01-07    <johan AT balder>
8632
8633         * src/SDCCast.c (decorateType): fixed bug #600035
8634
8635 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8636         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8637         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8638         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8639         * src/pic/pcode.c: outcommented unused variable to remove warnings
8640         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8641
8642 2003-01-06    <karl AT turbobit.com>
8643         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8644    regression tests.
8645
8646 2003-01-06    <johan AT balder>
8647
8648         * src/SDCCicode.c: fixed array add
8649
8650 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8651         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8652         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8653
8654 2003-01-04    <johan AT balder>
8655
8656         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8657
8658 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8659         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8660
8661 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8662         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8663         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8664
8665 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8666         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8667
8668 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8669         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8670
8671 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8672         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8673
8674 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8675
8676     * in \sdcc\as\mcs51\ changed these files in order to create an
8677     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8678     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8679     following files to include the previous two files: aslink.dsp,
8680     Makefile.aslink, Makefile.bcc, and Makefile.in.
8681
8682     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8683     .adb instead of .cdb
8684
8685 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8686
8687         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8688         value from option --iram-size.
8689
8690 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8691
8692         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8693         dram[] array.
8694
8695 2002-09-18    <wiml AT hhhh.org>
8696
8697         * SDCClrange.h: exposed setFromRange() and setToRange()
8698         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8699           packRegsForAccUse() (bug 542397)
8700         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8701           multiple times and emitting the fetch operations more than once
8702           added aopGetUsesAcc() function to allow binary operators to
8703           fetch their operands in the correct order; made genMinus() emit
8704           compact code for X = LITERAL - Y
8705
8706 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8707         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8708         sprintf() in line 1267.
8709
8710 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8711         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8712         like ports.
8713
8714 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8715         Changes to aslink (All the changes are marked with 'JCF'):
8716
8717         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8718         summary().
8719
8720         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8721         area BSEG.  Also moves, if possible, the DATA area down into the internal
8722         ram so more space is available.
8723
8724         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8725         sflag.
8726
8727         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8728         not bytes.  Function summary() which creates a memory usage summary
8729         file with extension .mem.  Reports of overlaping stack and small stack
8730         size.  If the space for the stack is less than 16 bytes aslink trows a
8731         warning.
8732
8733         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8734         the 8051.  Option 'y' for memory summary output file.
8735
8736         Changes to sdcc (All the changes are marked with 'JCF'):
8737
8738         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8739
8740         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8741         overlaying area for it (uses RegBankUsed[4]).
8742
8743         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8744         bank zero as used by default.  By default aslink locates the stack
8745         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8746         the creation of the .mem file.  Delegates the allocation of data area
8747         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8748         the begining of the stack area to aslink.
8749
8750         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8751         glue() in SDCCglue.c creates an area for it.
8752
8753 2002-09-03  Borut Razem <borut.razem AT siol.net>
8754         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8755         sdcc/src/pic/glue.c:
8756         introduced atexit() handler for teporay files removal in case of
8757         errors, assertions, ...
8758
8759 2002-08-29  Borut Razem <borut.razem AT siol.net>
8760         * sdcc/support/cpp2/auto-host_vc_in.h:
8761         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8762         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8763         Maybe there is a similar problem with BORLANDC? It should be checked!
8764
8765         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8766         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8767         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8768         was not executed, and the compiler (cl) launched a warning:
8769         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8770
8771 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8772         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8773
8774 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8775         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8776
8777         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8778           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8779           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8780           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8781           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8782           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8783           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8784         - added Release configuration in VS projects
8785         - review of compiler an linker options
8786         - VC .exe files are generated in bin_vc directory, not to interfere
8787           with binaries generated from other projects (cygwin, mingw, bcc ...)
8788
8789         * sdcc/src/yacc.dsp: added
8790
8791         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8792         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8793         and insert the version number definitions from .version
8794
8795         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8796
8797         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8798         added - genarate auto-host.h using auto-host_vc_in.h as template
8799
8800         * sdcc/sdcc_vc.h,
8801         removed from CVS, generated automatically
8802
8803 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8804         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8805
8806 2002-08-11  Borut Razem <borut.razem AT siol.net>
8807         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8808
8809 2002-08-10  Borut Razem <borut.razem AT siol.net>
8810         * src/SDCCmain.c (main):
8811         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8812         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8813         The consequence was that some temporary files were not removed.
8814
8815         * src/SDCCglue.c:
8816         unification of code in functions tempfilename() and tempfile():
8817         function tempnam() is defined in Visual Studio 6.0 and .NET
8818
8819         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8820
8821         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8822           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8823         - removed compiler command line option /WX: Treats all warnings as errors
8824         - update a list of source files, included into the project
8825
8826         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8827           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8828         changed project type to Generic Project so that can be correcly converted to VS.NET project
8829
8830         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8831
8832         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8833
8834         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8835
8836         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8837         added return 0 statements after assert() to make compiler happy
8838
8839         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8840         added newline in the def file to keep MSC compiler satisfied
8841
8842         * sdcc/src/z80/gen.c:
8843         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8844           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8845         - solved MSC error in function aopDump()
8846
8847         * sdcc_vc.h: define PREFIX as "\\sdcc"
8848
8849 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8850         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8851
8852 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8853         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8854         - Rewrote the register banking algorithm.
8855         - Added pCode live-range analysis to registers (for now, only non-used and
8856         singly-used registers optimized away)
8857
8858         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8859
8860         * 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.
8861
8862 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8863         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8864
8865 2002-04-22  Michael Hope  <michaelh AT vroom>
8866
8867         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8868
8869         * configure.in (DD_COPT): Added include support required for gbdk.
8870
8871         * .version: Bumped version number just to increase it.
8872
8873         * src/SDCCmain.c: Added -nostdinc to the default options.
8874
8875 2002-04-15  Michael Hope  <michaelh AT vroom>
8876
8877         * device/lib/z80/printf.c (sprintf): Added.
8878
8879         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8880
8881         * src/z80/peeph.def: Added transpose redundent load rule.
8882
8883         * src/z80/main.c: Added force callee saves for jaune.
8884
8885         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8886
8887         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8888
8889 2002-03-28  Johan Knol  <johan AT balder>
8890
8891         * src/SDCCval.c: fixed bug #532436
8892
8893 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8894         * /src/port.h:
8895         Added "char *Processor" field to the port structure.
8896
8897         * /src/SDCCmain.c:
8898         Added -p option. Allows port dependent processor to be specified.
8899
8900         * all ports:
8901         Initialized the new field char *Processor field to NULL in all ports
8902
8903         * /src/pic/*:
8904         Compiler generated registers for interrupt context saving
8905         were not getting allocated.
8906
8907 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8908
8909         * /src/SDCCast.c:
8910         Fixed left shift. Will promote the left side of a left shift
8911         if a) left shifting more than size of operand or b) when assigned
8912         to something size > size of left side
8913
8914 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8915         * src/pic/*
8916         tons of changes. Register allocation has been
8917         rewritten. Added customization for the various PICs. Flow
8918         analysis is restructured. ...
8919
8920         * src/pic/device.h:
8921         Added
8922
8923         * src/pic/device.c:
8924         Added. device.c is a PIC port hack to accomodate variations
8925         in PIC devices.
8926
8927 2002-03-13  Michael Hope  <michaelh AT vroom>
8928
8929         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8930
8931 2002-03-04  johanknol  <johanknol AT manik>
8932
8933         * /src/SDCCval.c: fixed
8934
8935         const unsigned char arr[][2] = { { 0, 1 } };
8936         t18.c:1: error: Initializer element is not constant
8937
8938 2002-03-04  bela  <bela AT manik>
8939
8940         * /device/include/mcs51reg.h:
8941         ds89c420 register definition update
8942
8943 2002-03-03    <johan AT FRIJA>
8944
8945         * support/Util/SDCCerr.c: did something, but don't no why anymore
8946
8947         * support/regression/tests/bug-524691.c: made it a little less shy
8948
8949         * src/SDCCast.c (decorateType): fixed bug #524697
8950
8951         * src/SDCCast.c: made some lineno improvements
8952
8953         * src/SDCCval.c (getNelements): changed warning to error
8954
8955         * src/SDCCglue.c (printIvalArray): changed warning to error
8956
8957         * src/SDCCicode.c: fixed a warning for mingw
8958
8959         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8960
8961         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8962
8963 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8964
8965         * src/ds390/peeph.def:
8966         Added some more peephole rules
8967
8968         * src/ds390/gen.c: Various fixes & enhancements
8969
8970         * src/SDCClrange.c, src/SDCClrange.h:
8971         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8972
8973         * src/ds390/ralloc.c:
8974         various fixes & enhancements (ds390) specific
8975
8976         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8977         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8978         from rallocs.
8979
8980         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8981
8982 2002-03-02    <johan AT FRIJA>
8983
8984         * src/SDCCast.c (decorateType): fixed bug #524708
8985
8986         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8987
8988         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8989
8990 2002-03-01  Michael Hope  <michaelh AT vroom>
8991
8992         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8993
8994         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8995
8996 2002-03-01    <johan AT FRIJA>
8997
8998         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8999
9000         * src/SDCCast.c (decorateType): fixed bug #524209
9001
9002         * src/SDCCval.c (valNot): fixed bug #524195
9003
9004 2002-02-26    <johan AT balder>
9005
9006         * src/xa51/gen.c: fixed a warning
9007
9008         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
9009
9010         * src/SDCCast.c (decorateType): fixed bug #522534
9011
9012 2002-02-23    <johan AT balder>
9013
9014         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
9015
9016 2002-02-22    <johan AT balder>
9017
9018         * src/SDCCast.c: fixed bug #514865
9019
9020         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
9021
9022 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
9023
9024         * sdcc/src/SDCCloop.c:
9025         Previous fix was not good. basic blocks that have "break" or "return" are
9026         not really partof a loop , but live ranges used in these blocks should
9027         be live thru the entire loop, so set partOfLoop but don't add them to
9028         loop region
9029
9030 2002-02-21    <johan AT FRIJA>
9031
9032         * src/SDCCcse.c: fixed bug #514308
9033
9034 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
9035
9036         * src/SDCCloop.c:
9037         Fixed BUG #519583. If a conditional block ended in a return/break
9038         statement inside a loop, it was not being considered part of the loop.
9039
9040         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9041
9042 2002-02-10  Karl Bongers <karl AT turbobit.com>
9043
9044         * debugger/*:
9045         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9046         with lots of comments and notes.
9047
9048         * device/examples/test2.c:
9049         Fix bug, "red" variable not being initialized(compiler complained).
9050
9051         * device/examples/Makefile, examples/test3.c:
9052         Add Makefile in device/examples folder, compiles test3.c
9053         for use as a multiple module SDCDB test case.
9054
9055         * sim/ucsim/cmd.src/cmdset.cc:
9056         Took out debug printfs in ucsim "next" command.
9057
9058         * sim/ucsim/xa.src:
9059         Karl and Johan start ucsim XA support.  Most dissassembly working,
9060         about 75% emulation done(plenty of work remaining).
9061
9062         * sim/ucsim/z80.src:
9063         Add Z80 support to ucsim, add test-ucz80 regression test,
9064         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9065         Notice z80 compiler fails on examples/test3.c/crc code.
9066
9067 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9068
9069         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9070         Added support for --parms-in-bank1
9071
9072         * src/ds390/peeph.def:
9073         added a few more peephole optimzations
9074
9075         * src/ds390/main.c:
9076         1) added __builtin_inp & __builtin_outp used to read in data of given length
9077            from a memory mapped port
9078         2) added __builtin_memcmp
9079         3) added __builtin_swapw swap bytes of a short
9080
9081         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9082         1) handle multiple send & receives from register bank1
9083         2) ralloc can now allocate DPTR1 to some liveRanges
9084
9085         * src/SDCCsymt.c, src/SDCCsymt.h:
9086         changes to handle multiple sends & receives
9087
9088         * src/SDCCptropt.h:
9089         added some pointer arithmetic optimization
9090
9091         * src/SDCCptropt.c:
9092         added some pointer arithmetic optimizations but not stable yet so not
9093         called from anywhere (will get this working shortly)
9094
9095         * src/SDCCopt.c: fixed for multiple sends & receives
9096
9097         * src/SDCCmain.c:
9098         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9099         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9100            set preprocessor defines (depending on options)
9101
9102         * src/SDCCicode.c, src/SDCCicode.h:
9103         changes made to handle multiple sends & receives
9104
9105         * src/SDCCglobl.h:
9106         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9107
9108         * src/SDCCcse.c, src/SDCCcse.h:
9109         added function findbackward def (to be used in upcoming optimization)
9110
9111         * src/SDCCcflow.c, src/SDCCcflow.h:
9112         added function returnAtEnd - to determine if a basic block terminates with
9113         a RETURN iCode
9114
9115         * src/SDCCast.c, src/SDCCast.h:
9116         added option parms-in-bank1
9117
9118         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9119         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9120         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9121         adjusted for --parms-in-bank1 option
9122
9123         * device/include/string.h:
9124         donot redefine "reentrant" keyword
9125
9126         * device/include/ds80c390.h: Added some more SFRs
9127
9128 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9129
9130         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9131
9132 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9133
9134         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9135
9136 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9137
9138         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9139
9140 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9141
9142         * Added --xram-movc option
9143
9144 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9145
9146         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9147
9148 2002-01-11  Johan Knol
9149
9150         * Added math lib of Jesus Calvino-Fraga
9151
9152 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9153
9154         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9155         * support/regression/Makefile: new target test-mcs51-stack-auto
9156         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9157
9158 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9159
9160         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9161
9162 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9163
9164         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9165
9166 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9167
9168         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9169
9170         * src/SDCCglue.h: add definition for printIvalChar()
9171
9172 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9173
9174         * src/SDCCast.c: fix #498138 by Johan
9175
9176         * src/SDCCglue.c: fix #498138 by Johan
9177
9178 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9179
9180         * support/regression/Makefile: fix clean
9181
9182         * support/regression/ports/ds390/support.c: fix transmission of last character
9183
9184 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9185
9186         * /sdcc/src/ds390/gen.c:
9187         a) improved computing address of stack variable
9188         b) took out some #if 0 code
9189         c) improved parmBytes adjustment
9190         d) improved genPlusIncr & genMinusIncr
9191         e) genCmp could generate bad code (when left assigned to DPTR)
9192         f) Fixed bug in hasInc
9193
9194         * /sdcc/src/ds390/ralloc.c:
9195         a) packRegsForSupport could mess up live information (Fixed)
9196         b) packRegsDPTRuse could be incorrect for left & right shift
9197
9198         * /sdcc/src/mcs51/ralloc.c:
9199         packRegsForSupport could mess up the live information (Fixed)
9200
9201         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9202
9203         * /sdcc/src/SDCCast.c:
9204         can reverse a loop even if function call is present as long
9205         as the loop control variable is local & is not passed as parameter
9206
9207 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9208
9209         * /sdcc/ChangeLog: *** empty log message ***
9210
9211         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9212         More builtin function additions for TININative
9213
9214         * /sdcc/src/ds390/ralloc.c:
9215         Had broken the regression testsuite
9216
9217         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9218
9219         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9220         Added funcattr hasStackParms will be set for reentrant functions when there
9221         are paramteres on the stack, this helps in minimizing frame pointer generation
9222         typeFromStr can handle function pointers now
9223
9224         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9225         *** empty log message ***
9226
9227 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9228
9229         * /src/ds390/gen.c, /src/ds390/main.c:
9230         More builtin function additions for TININative
9231
9232         * /src/ds390/ralloc.c:
9233         Had broken the regression testsuite
9234
9235         * /src/SDCCast.c: Fixed a bug in dumptree
9236
9237         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9238         Added funcattr hasStackParms will be set for reentrant functions when there
9239         are paramteres on the stack, this helps in minimizing frame pointer generation
9240         typeFromStr can handle function pointers now
9241
9242         * /doc/builtins.txt, /doc/TININative.txt:
9243         *** empty log message ***
9244
9245
9246 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9247
9248         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9249         ALPHA version for -mTININative
9250
9251         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9252         updated to reflect changes in the port structure
9253
9254         * /src/port.h:
9255         added function do_assemble (similar to do_link) if non-null this function
9256         will be called to do assembly (-mTININative) requires a multi command
9257         assembly
9258         added function genAssemblerEnd will be called to generate assembler Epilogue
9259
9260         * /src/SDCCsymt.c:
9261         added _JavaNative to debug info printing
9262
9263         * /src/SDCCmain.c: added option --tini-libid
9264         added port->do_assemble function (-mTININative) has a multi command assemble
9265
9266         * /src/SDCCglue.c: Disabled "constExpr" check
9267         added port->genAssemblerEnd function
9268
9269         * /src/SDCCglobl.h: Added option --tini-libid value
9270
9271         * /src/SDCCast.h:
9272         tookout optimizeCompare from the header (has no external references)
9273
9274         * /src/SDCCast.c: made one more function "static"
9275
9276 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9277
9278         * src/z80/mappings.i: Added z80asm support.
9279
9280         * src/z80/main.c: Added z80asm support on --asm=z80asm
9281
9282         * src/z80/gen.c: Fixed asm portability issues.
9283
9284         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9285
9286         * src/SDCCglue.c (printExterns): Added global/extern split.
9287
9288 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9289
9290         * support/regression/Makefile: added test for mcs51 model large
9291
9292         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9293
9294         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9295
9296 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9297
9298         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9299
9300 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9301
9302         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9303
9304         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9305
9306 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9307
9308         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9309
9310         * support/regression/tests/simplefloat.c: Port to mcs51.
9311
9312 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9313         * support/regression/tests/bug-485362.c: Added.
9314
9315         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9316
9317         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9318
9319         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9320
9321         * src/z80/gen.c (aopDump): Added a dump function.
9322
9323 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9324         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9325
9326         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9327
9328         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9329
9330         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9331
9332         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9333
9334         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9335
9336         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9337
9338         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9339
9340         * support/regression/ports/ds390/support.c: Use tinibios.
9341
9342         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9343
9344 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9345
9346         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9347         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9348
9349         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9350
9351         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9352
9353 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9354
9355         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9356
9357         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9358         (packRegsForIYUse): Created and optimised.
9359
9360 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9361
9362         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9363 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9364
9365         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9366
9367         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9368
9369         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9370
9371 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9372
9373         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9374
9375         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9376
9377 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9378
9379         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9380
9381         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9382
9383         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9384
9385 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9386
9387         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9388         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9389         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9390
9391         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9392
9393         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9394         (genNotFloat): Added.
9395         (genUminusFloat): Added.
9396
9397         * device/lib/z80/Makefile: Added floating pt stubs.
9398
9399         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9400
9401         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9402
9403         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9404
9405 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9406
9407         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9408
9409         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9410
9411         * sdcc/support/regression/Makefile: Add port ds390.
9412
9413         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9414
9415         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9416
9417         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9418
9419         * sdcc/support/regression/ports/ds390/support.c: Added.
9420
9421         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9422
9423         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9424
9425         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9426
9427 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9428
9429         * device/include/malloc.h: Added z80 and gbz80 support.
9430
9431         * device/lib/gbz80/heap.s: Added.
9432
9433         * device/lib/z80/heap.s: Added.
9434
9435         * device/lib/malloc.c: Added z80 and gbz80 support.
9436
9437         * support/regression/tests/malloc.c (testMalloc): Added.
9438
9439         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9440
9441         * support/regression/tests/bug-478094.c: Added.
9442
9443         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9444
9445 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9446
9447         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9448
9449         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9450
9451         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9452
9453         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9454
9455         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9456
9457 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9458
9459         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9460
9461 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9462
9463         * support/regression/tests/bug-477927.c: Added.
9464
9465         * src/z80/peeph.def: Added minor rules.
9466
9467         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9468
9469         * src/z80/peeph.def: Added jump optimisation modification.
9470
9471 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9472
9473         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9474
9475 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9476
9477         * support/regression/tests/funptrs.c: Added.
9478
9479 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9480
9481         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9482
9483 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9484
9485         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9486
9487         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9488
9489         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9490         (movLeft2ResultLong): Created.
9491
9492         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9493         (joinPushes): Added.  Joins two char pushes into a word push.
9494
9495 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9496
9497         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9498
9499         * support/makebin/Makefile (install): Added creation of dest dir.
9500
9501 2001-10-24 Karl Bongers <karl AT turbobit.com>
9502
9503         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9504
9505 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9506
9507         * src/z80/ralloc.c: Turned off faulty pack for one use.
9508
9509         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9510
9511         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9512
9513 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9514
9515         * support/regression/Makefile: Improved clean
9516
9517         * support/regression/ports/gbz80/spec.mk: Added clean
9518
9519         * support/regression/ports/host/spec.mk: Added clean
9520
9521         * support/regression/ports/z80/spec.mk: Added clean
9522
9523         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9524
9525         * support/regression/ports/mcs51/timeout.c: little improvements
9526
9527 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9528
9529         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9530
9531         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9532
9533         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9534
9535 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9536
9537         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9538
9539         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9540
9541 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9542         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9543
9544         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9545
9546         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9547
9548         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9549
9550         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9551
9552         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9553
9554         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9555
9556         * support/regression/tests/longor.c: Added.
9557
9558 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9559
9560         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9561
9562         * as/mcs51/aslink.h: define PATH_MAX
9563
9564         * as/mcs51/asm.h: define PATH_MAX
9565
9566         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9567
9568         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9569
9570         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9571
9572         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9573
9574         * src/SDCCglobl.h: define PATH_MAX
9575
9576         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9577
9578         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9579
9580 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9581
9582         * src/z80/gen.c (gencjneshort): Fixed
9583
9584         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9585
9586 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9587
9588         * support/regression/tests/bug-469671.c: Added.
9589
9590         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9591
9592 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9593
9594         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9595
9596         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9597
9598 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9599
9600         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9601
9602         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9603
9604         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9605
9606         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9607
9608         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9609
9610         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9611
9612         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9613
9614 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9615
9616         * 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.
9617
9618         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9619
9620         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9621
9622 2001-10-07    <johan AT FRIJA>
9623
9624         * device/lib/gets.c (gets): fixed the return value.
9625
9626 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9627         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9628
9629         * 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.
9630
9631         * 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.
9632
9633         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9634
9635         * src/pic/gen.c: Removed Safe_strdup.
9636
9637         * configure.in: Added option to enable libgc support.
9638
9639         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9640         (bitVectUnion): Optimised.
9641         (bitVectIntersect): Optimised.
9642         (bitVectBitsInCommon): Optimised.
9643         (bitVectCplAnd): Optimised.
9644
9645         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9646
9647 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9648
9649         * src/SDCCmain.c: distinguish between assembler debug and plain options
9650
9651         * src/avr/main.c:   remove standard assembler options
9652
9653         * src/ds390/main.c: remove standard assembler options
9654
9655         * src/mcs51/main.c: remove standard assembler options
9656
9657         * src/port.h: removed "PENDING" comment
9658
9659 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9660
9661         * src/device/lib/_mulint.c  : new, with assember functions
9662
9663         * src/device/lib/_mullong.c : new, with assember functions
9664
9665         * src/device/lib/_divuint.c : with assember functions
9666
9667         * src/device/lib/_divsint.c : with assember functions
9668
9669         * src/device/lib/_divulong.c: with assember functions
9670
9671         * src/device/lib/_divslong.c: with assember functions
9672
9673         * src/device/lib/_moduint.c : with assember functions
9674
9675         * src/device/lib/_modsint.c : with assember functions
9676
9677         * src/device/lib/_modulong.c: with assember functions
9678
9679         * src/device/lib/_modslong.c: with assember functions
9680
9681         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9682
9683         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9684
9685         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9686                                       replaced _mululong.c and _mulslong.c by _mullong.c
9687
9688 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9689
9690         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9691
9692 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9693
9694         * src/SDCCglue.c: test, if win32api is available for MINGW
9695
9696 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9697
9698         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9699         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9700         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9701         * support/regression/ports/host/spec.mk: removed GENERIC
9702         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9703         * support/regression/ports/z80/spec.mk: removed GENERIC
9704
9705 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9706
9707         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9708
9709         * support/regression/tests/bug-467035.c: Created.
9710
9711 2001-10-01    <johan AT FRIJA>
9712
9713         * src/SDCC.y: fixed bug #466586 part 1
9714
9715 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9716
9717         * SDCCicode.c: z80 has no generic pointers
9718         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9719
9720 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9721
9722         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9723
9724 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9725
9726         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9727
9728         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9729
9730 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9731
9732         * configure.in: Fixed up so that ucsim is only configured once.
9733
9734         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9735
9736         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9737         (getPathDifference): As above.
9738
9739         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9740
9741         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9742
9743 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9744         * .version: Updated to 2.3.1
9745
9746         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9747         Added copyright header.
9748
9749         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9750         (assemble): Added support for macro based assembler commands.
9751         (linkEdit): Added support for macro based linker commands.
9752         (preProcess): Changed the pre-processor to use macros.
9753         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9754         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9755
9756         * device/lib/z80/crt0.s: Added module name for debugging.
9757
9758 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9759
9760         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9761
9762         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9763
9764         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9765
9766         * src/Makefile.in: Added SDCCmacro and SDCCutil
9767
9768 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9769
9770         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9771
9772 2001-09-16    <johan AT FRIJA>
9773
9774         * 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.
9775
9776 2001-09-15    <johan AT FRIJA>
9777
9778         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9779         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9780
9781 2001-09-11    <johan AT FRIJA>
9782
9783         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9784
9785 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9786
9787         * support/regression/tests/bug-460444.c: Added test case.
9788
9789         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9790         (genCast): Added justification for all of the asserts.
9791
9792 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9793
9794         * support/regression/support.c: _xdata replaced by xdata
9795
9796         * support/regression/spec.mk: removed _generic
9797
9798 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9799
9800         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9801
9802         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9803         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9804
9805         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9806
9807         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9808
9809         * support/regression/tests/bug-460010.c: Added test case.
9810
9811         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9812
9813 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9814
9815         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9816
9817         * support/regression/testfwk.c: removed workaround for bug #436344
9818
9819         * support/regression/tests/bp.c: use less memory with mcs51
9820
9821         * support/regression/tests/bug-441448.c: use less memory
9822
9823         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9824
9825         * support/regression/collate-results.py: typo
9826
9827 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9828
9829         * support/regression/tests/fetchoverlap.c: Added new test case.
9830
9831         * support/regression/tests/bp.c: Added new test case.
9832
9833         * support/regression/tests/bug-448984.c: Added new test case.
9834
9835         * support/regression/tests/pow2shifts.c: Added new test case.
9836
9837         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9838         (genlshTwo): Fixed right shift for count > 8.
9839
9840         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9841
9842 2001-09-08    <johan AT FRIJA>
9843
9844         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9845
9846 2001-09-07    <johan AT FRIJA>
9847
9848         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9849
9850         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9851
9852 2001-09-06    <johan AT FRIJA>
9853
9854         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9855         * bernhard noted me at this: "() equals to (void)" (1.38)
9856
9857 2001-09-05    <johan AT FRIJA>
9858
9859         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9860
9861 2001-09-04    <johan AT FRIJA>
9862
9863         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9864
9865
9866 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9867
9868         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9869
9870 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9871
9872         * link/z80/aslink.h: Fixed path for PATH_MAX
9873
9874 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9875
9876         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9877
9878         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9879
9880         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9881
9882         * 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.
9883
9884 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9885
9886         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9887         (genCmp): Fixed up genCmp for the GB with longs.
9888
9889         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9890
9891         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9892
9893         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9894
9895         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9896
9897 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9898
9899         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9900
9901 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9902
9903         * 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.
9904
9905         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9906
9907 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9908
9909         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9910
9911         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9912
9913 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9914
9915   * sim/ucsim/configure:    little improvement of Cygwin-detection
9916   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9917   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9918   * support/regression/tests/bug-221100.c: small changes for mcs51
9919   * support/regression/tests/bug-221168.c: small changes for mcs51
9920   * support/regression/tests/bug-227710.c: small changes for mcs51
9921   * support/regression/tests/staticinit.c: small changes for mcs51
9922   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9923   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9924   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9925
9926 $Revision$