fd5764198ef220db2a7fda524191966f71eb4b2a
[fw/sdcc] / ChangeLog
1 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2
3         * device/lib/_strcmp.c: Fixed bug 1326457
4
5 2005-10-11 Raphael Neider <rneider AT web.de>
6
7         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
8         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
9
10 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
11
12         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
13         * support/regression/tests/sfr16.c: added test for the sfr32 bug
14
15 2005-10-04 Raphael Neider <rneider AT web.de>
16
17         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
18           device/lib/pic16/pics.all: added pic18f1320
19         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
20
21 2005-09-30 Raphael Neider <rneider AT web.de>
22
23         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
24         * src/pic16/devices.inc: NEW, provides device descriptions
25         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
26
27 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
28
29         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
30           GETHBIT
31
32 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
33
34         * doc/sdccman.lyx: updated Highest Order Bit documentation,
35           documented Any Order Bit, Higher Order Byte and Higher Order Word
36         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
37         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
38           (optimizeGetAbit): new, to get any bit, not only the high bit,
39           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
40           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
41           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
42           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
43             RIGHT_OP: also try GETBYTE, GETWORD optimization,
44             GETABIT, GETBYTE, GETWORD: decorate them,
45           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
46           (ast_print): added GETABIT, GETBYTE, GETWORD
47         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
48         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
49           (geniCodeBinary): new generic binary icode,
50           (ast2iCode): added GETABIT, GETBYTE, GETWORD
51         * src/port.h: updated comment for PORT.hasExtBitOp
52         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
53           (genGetByte): new, to get a single byte,
54           (genGetWord): new, to get a word from a long,
55           (gen51Code): added GETABIT, GETBYTE, GETWORD
56         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
57
58 2005-09-23 Raphael Neider <rneider AT web.de>
59
60         * configure.in, configure: have device/lib/pic configured
61         * device/lib/Makefile.in: added model-pic14
62         * device/lib/clean.mk: added pic/ to clean rule
63         * device/lib/pic: added rudimentary pic14 library providing support
64           functions for multiplication/division/generic pointer access
65         * src/SDCCopt.c (convilong): mark support functions as extern
66           for pic14 port as well
67         * src/pic/gen.c (genMult): added assertions,
68           (genpic14Code): emit warning on unhandled iCodes
69         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
70         * src/pic/pcode.c (pCodeOpCopy),
71         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
72           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
73           SFR_REGISTER}), made safe for future extensions
74         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
75           instructions even if preceeded by SKIP instructions (also remove
76           them); removed unused code
77         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
78           prevents leaving parts of the structure uninitialized after copying
79
80 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
81
82         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
83           ago by me
84         * support/regression/tests/addsub.c: added test for the bug
85
86 2005-09-21 Raphael Neider <rneider AT web.de>
87
88         * device/include/pic16/pic18f1220.h,
89           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
90         * device/lib/pic16/Makefile.rules: added missing opening paren
91         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
92           are provided in genutils.c,
93           (genUminusFloat,genUminus,genCmpEq): added asserts on different
94           operand/result sizes,
95           (genCmp): assert on NULL pointers first, then check deref'ed values
96         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
97           result size
98
99 2005-09-18 Raphael Neider <rneider AT web.de>
100
101         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
102           as these are now unused,
103           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
104         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
105           local, avoids uninitialized pointer dereference on r->name
106         * src/pic16/ralloc.c (newReg): fixed indentation
107
108 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
109
110         * src/SDCCval.c (constVal): fixed bug 730366
111         * support/Util/SDCCerr.c,
112         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
113
114 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
115
116         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
117
118 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
119
120         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
121
122 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
123
124         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
125           (hex2dec): made hex_digit unsigned char, removed ascii dependance
126         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
127           (hex2dec): made hex_digit unsigned char, removed ascii dependance
128         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
129         * packihx/packihx.c (hexDigit): made c unsigned char
130         * as/mcs51/lklibr.c (fndsym),
131         * link/z80/lkgb.c (gb),
132         * link/z80/lklibr.c (fndsym),
133         * link/z80/lkrloc.c (relr),
134         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
135         * src/SDCC.lex (checkCurrFile, process_pragma),
136         * src/SDCCglue.c (spacesToUnderscores),
137         * src/SDCCmain.c (setParseWithComma, processFile),
138         * src/asm.c (tvsprintf, printCLine),
139         * src/avr/gen.c (emitcode, aopPut),
140         * src/ds390/gen.c (emitcode),
141         * src/hc08/gen.c (emitcode, emitinline),
142         * src/mcs51/gen.c (emitcode, genInline),
143         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
144           tokenizeLineNode),
145         * src/pic/ralloc.c (debugLog),
146         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
147           tokenizeLineNode),
148         * src/pic16/ralloc.c (debugLog),
149         * src/z80/main.c (_process_pragma):
150            made all ctype.h function calls safe
151         * src/SDCCopt.c: include math.h for fabs
152         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
153           and used them throughout the code to make ctype.h function calls safe
154         * src/ds390/main.c (asmLineNodeFromLineNode),
155         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
156         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
157            unsigned char*
158         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
159           (newpCodeAsmDir): made ctype.h function calls safe
160         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
161           pic16_emitcode):  made lbp unsigned char*
162         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
163           (pic16_newpCodeAsmDir): made ctype.h function calls safe
164         * src/xa51/gen.c (emitcode),
165         * src/z80/gen.c (_emit2): made lbp unsigned char*
166         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
167            char*
168
169 2005-09-05 Raphael Neider <rneider AT web.de>
170
171         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
172           access bank splitpoint
173
174 2005-09-05 Raphael Neider <rneider AT web.de>
175
176         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
177
178 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
179
180         * .version: changed to version 2.5.3
181         * doc/sdccman.lyx: changed version to 2.5.3,
182           documented --codeseg and --constseg and pragma codeseg and constseg,
183           documented bit parameters (reentrant) and bit returning
184         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
185            currFunc->recvSize, but is this ok for all ports?
186           (ast2iCode): result of ~ on unsigned char must be cast to int for
187            bool to work
188         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
189           function pointers in bit space
190         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
191           (processFuncArgs): call port.reg_parm() with reentrancy info
192         * src/port.h,
193         * src/avr/main.c,
194         * src/ds390/main.c,
195         * src/hc08/main.c,
196         * src/pic/main.c,
197         * src/pic16/main.c,
198         * src/xa51/main.c,
199         * src/z80/main.c: port.reg_parm prototype extended with
200           "bool reentrant" parameter
201         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
202           options.stackAuto for allocating bit register parameters
203         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
204           (genSend): set BitBankUsed if it is,
205           (selectRegBank): factored out of genCall for use in genPcall,
206           (genCall): removed redundant dtype assignmen, use selectRegBank,
207           (genPcall): handle returning in Carry properly, save in F0 if needed,
208           (genReceive): handle bit register parameters
209         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
210           (mcs51_assignRegisters): enable bit registers for all reentrant
211            functions and don't set BitBankUsed unconditionally
212         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
213         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
214         * support/regression/tests/funptrs.c: added tests for BOOL and for return
215
216 2005-08-27 Borut Razem <borut.razem AT siol.net>
217
218         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
219         ppc-osx (Darwin) does not support -u option. It seems that it is
220         supported only on Linux - GNU cp
221
222 2005-08-25 Borut Razem <borut.razem AT siol.net>
223
224         * sim/ucsim/gui.src/serio.src/Makefile.in,
225           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
226           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
227           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
228           install and strip, since the strip at /usr/ccs/bin should be used
229           on solaris
230
231 2005-08-24 Borut Razem <borut.razem AT siol.net>
232
233         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
234
235 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
236
237         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
238         ffffffffu
239
240 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
241
242         * as/mcs51/aslink.h: completed lkrloc.c prototypes
243         * as/mcs51/lkmain.c (link_main): fixed warning
244         * device/include/stdbool.h: ds390 has no advanced bit support yet
245         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
246         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
247         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
248           and updated their macros
249         * src/SDCCval.c (constVal): updated comment for renamed b_long
250
251 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
252
253         * as/mcs51/asdata.c: changed ctype['['] to BINOP
254         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
255           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
256           (oprio): set priority for '['
257         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
258            and adb_24_bit
259         * as/mcs51/asm.h: added defines R_BIT and S_BIT
260         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
261         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
262         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
263           added overlayable BIT_BANK area
264         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
265           (summary2): explain 'T' in legenda
266         * as/mcs51/lkrloc.c: replaced old K&R style,
267           (relr): added R_BIT processing,
268           (errmsg): added "Bit-addressable relocation error",
269           (adb_bit): added for converting from byte- to bit-addressable space,
270           (adb_24_bit): added for converting from byte- to bit-addressable space
271         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
272            used in reentrant functions now even as return value
273         * device/lib/_gptrput.c (_gptrput): removed obsolete code
274         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
275           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
276         * src/SDCCglobl.h: added indicator BitBankUsed
277         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
278            the bit registers b0-b7
279         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
280           (geniCodeCast): fixed bug 1263853,
281           (geniCodeLogicAndOr): put result in bool or char,
282           (geniCodeReceive): added parameter func for accessing the return type,
283           (geniCodeFunctionBody): pass func to geniCodeReceive
284         * src/SDCCmain.c: added indicator BitBankUsed
285         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
286         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
287           (checkSClass): don't put automatic bool/bit on stack,
288           (checkFunction): removed check on function cannot return bit
289         * src/SDCCsymt.h: added newBoolLink prototype
290         * src/mcs51/gen.c (rb1regs): added bit registers,
291           (movc): created for assigning to carry,
292           (pushReg, popReg): created for pushing registers,
293           (sameRegs): check both AOP_REG and AOP_CRY types,
294           (aopOp): handle bit registers,
295           (aopPut): optimization no self-assign,
296           (saveRegisters): push reg->base (bits) only once for bit registers,
297            and use pushReg,
298           (unsaveRegisters): pop reg->base only once and use popReg,
299           (assignResultValue): added parameter func and return in carry for bits,
300           (genIpush): optimization no reload in A if not changed,
301           (genSend): bit parameters in reentrant functions are passed in bit
302            registers by first assigning to bits in B, then save registers and
303            copy B to bits,
304           (genCall): handle returning in Carry properly, save it in F0 if needed,
305           (genPcall): updated assignResultValue call, this is not safe yet for bit
306            returning function !!!
307           (genFunction): don't generate equ's for bit registers and use pushReg,
308           (genEndFunction): take care of bit returning functions and use popReg,
309           (genRet): return bit in Carry,
310           (genIfx): optimize bit registers and other directly addressable bits,
311           (genReceive): updated assignResultValue call
312         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
313           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
314            registers when using stack-auto
315         * src/mcs51/ralloc.c (_G): added allBitregs,
316           (regs8051): added the bit registers,
317           (createStackSpil): use macro IS_BIT,
318           (getRegBit): added to allocate a bit register, else spill,
319           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
320           (updateRegUsage): factored out to ease stepping while debugging,
321           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
322            also allocate bit registers,
323           (fillGaps): handle bit registers,
324           (findAllBitregs): added to create bit vector with all bit registers,
325           (mcs51_allBitregs): returns this bit vector,
326           (mcs51_assignRegisters): when using stack-auto use bit registers for
327            passing parameters and creating local variables
328         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
329
330 2005-08-22 Borut Razem <borut.razem AT siol.net>
331
332         * device/lib/Makefile.in: replaced find option -or with -o
333           to make it run on solaris
334
335 2005-08-22 Raphael Neider <rneider AT web.de>
336
337         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
338           fixes #1265442 (crash on Solaris)
339
340 2005-08-20 Borut Razem <borut.razem AT siol.net>
341
342         * configure, configure.in: added tests for libsocket and libnsl libraries,
343           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
344           from support/regression/Makefile.in
345         * support/regression/Makefile.in: added
346         * device/lib/pic16/Makefile.common.in: force make to use bash shell
347         * sim/ucsim/libtool: regenerated on sparc-solaris
348         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
349           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
350           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
351           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
352           sparc-solaris, which doesn't use GNU ld linker
353         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
354         * as/Makefile: find on sparc-solaris does not support -maxdepth option
355
356 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
357
358         * src/mcs51/peeph.def: updated comments
359
360 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
361
362         * device/lib/_gptrget.c,
363         * device/lib/_gptrput.c: slightly shorter
364         * doc/sdccman.lyx: incremented version
365         * src/mcs51/peeph.def: moved peephole comments to the line of first
366           change to better keep line correlation, reanimated 186.e
367         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
368
369 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
370
371         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
372           David Saxton with quotes around file name.
373
374 2005-08-15 Borut Razem <borut.razem AT siol.net>
375
376         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
377           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
378           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
379           make tests run on x86_64 platform
380
381 2005-08-13 Raphael Neider <rneider AT web.de>
382
383         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
384           as it might be executed DURING a build (parallel make is wonderful)
385
386 2005-08-13 Raphael Neider <rneider AT web.de>
387
388         * device/lib/Makefile.in (port-specific-objects-pic16):
389           revert to cp $(PORT)/bin/*.* $(PORTDIR)
390         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
391           dependency
392         * device/lib/pic16/Makefile.rules: build subdirs before creating
393           the library, removed builddir rule, create $(builddir) early in
394           recurse rule, use empty recurse rule for leaf directories
395         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
396           mkdir errors (race condition), removed duplicate suffix "hex"
397           from clean rules
398         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
399         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
400           prevents mkdir -p from aborting on Alpha
401
402 2005-08-12 Raphael Neider <rneider AT web.de>
403
404         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
405           db-statements in order to allow for arrays of pointers in code
406           sections to be placed without interspersed 0-padding, fixes
407           bug #1256215
408         * (emitStatistics): fixed division by zero for pic18f1220
409         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
410           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
411         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
412         * (pic16_pCodeConstString): keep track of already emitted string
413           literals to prevent "duplicate definitions of symbol _str_NR"
414         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
415           debug message
416         * device/lib/Makefile.in: ignore failing PIC16 library builds
417         * device/lib/pic16/Makefile: do not build if gputils are missing
418         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
419
420 2005-08-10 Raphael Neider <rneider AT web.de>
421
422         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
423           my last commit)
424
425 2005-08-10 Raphael Neider <rneider AT web.de>
426
427         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
428           Rokas' patch to add the new fixed point type "__fixed16x16"
429         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
430           functions for __fixed16x16 arithmetics
431         * device/lib/pic16: reimplemented the build system to support
432           a separate build directory, better handling of libio (create
433           the library in a separate subdir for each architecture) and
434           easier configuration (centralized in Makefile.common)
435
436 2005-08-07 Raphael Neider <rneider AT web.de>
437
438         * src/pic16/gen.c (genrshTwo): fixed sign extension
439         * src/pic16/device.c: added pic18f2320, 4220 and 4320
440         * device/include/pic16/pic18f2220.h: changed some bit definitions,
441           added T0CONbits
442         * device/include/pic16/pic18f4220.h: NEW, header for
443           pic18f4220 and pic18f4320
444         * device/include/pic16/pic18fregs.h: added new devices,
445           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
446         * device/include/pic16/signal.h: resolved name clashes
447           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
448           to also allow testing for interrupt enable bits, added
449           comments on how to use the macros
450         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
451         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
452           register definitions for the devices
453         * device/lib/pic16/pics.all: added new devices
454         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
455           allocated memory
456         * device/lib/pic16/libc/stdlib/memfree: do not count
457           the block header as free memory
458         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
459           simplified and added missing end-of-blocklist-marker
460           (reported by Peter Onion, fixes #1252814)
461         * (_mergeHeapBlock): fixed loop condition
462         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
463           len==0, restructured code
464         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
465           up a bit, reduced bitfield accesses, prevent endless loops
466           in case of heap corruption
467         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
468           "unreferenced arguments/must return a value" warnings
469         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
470           replaced BAUDREG with SPBRG
471         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
472           device/lib/pic16/debug/gstack/gstack.c: replaced
473           _naked, _asm, _endasm with __naked, __asm, __endasm
474
475 2005-08-05 Raphael Neider <rneider AT web.de>
476
477         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
478           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
479
480 2005-08-05 Borut Razem <borut.razem AT siol.net>
481
482         * device/lib/Makefile.in: added missing ';'
483         * configure: removed ^M characters
484
485 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
486
487         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
488           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
489           License
490
491 2005-08-04 Borut Razem <borut.razem AT siol.net>
492
493         * configure.in: pic16 libraries build 2nd try - enable running
494           configure in device/lib/pic16
495         * configure: regenerated from configure.in
496         * device/lib/Makefile.in: create $(PORT)/bin directory
497
498 2005-08-03 Raphael Neider <rneider AT web.de>
499
500         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
501           to get/set values via pointers
502         * (genUnpackBits,genPackBits): changed detection of
503           ptr->bitfield vs. sym.bitfield, fixed access via generic
504           pointers, removed dead (wrong) code for multibyte bitfields
505         * (genNearPointerGet, genGenPointerGet): removed useless code,
506           fixed bitfield detection, fixes #1250594
507         * (genNearPointerSet): removed useless code
508         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
509           and introduced macro pic16_emitpcode that conditionally emits
510           the origin of the following pCode (useful for debugging SDCC)
511         * src/pic16/pcode.c: changed (and disabled) some debug outputs
512         * (createDefmap): fixed handling of LFSR for --optimize-df
513
514 2005-08-02 Borut Razem <borut.razem AT siol.net>
515
516         * device/lib/Makefile.in: pic16 libraries build enabled since
517           gputils-0.13.2 are now localy installed at sourceforge's compile farm
518
519 2005-08-02 Raphael Neider <rneider AT web.de>
520
521         * src/pic16/gen.c (genPackBits): removed deprecated warning
522         * (genGenPointerSet): fixed bitfield detection
523
524 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
525
526         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
527
528 2005-07-31 Raphael Neider <rneider AT web.de>
529
530         * device/lib/pic16/libdev/pic18f458.c,
531           device/include/pic16/pic18f458.h: added missing T0CONbits
532
533 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
534
535         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
536
537 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
538
539         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
540
541 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
542
543         * device/include/mcs51/at89c51ed2.h: added.
544
545 2005-07-23 Raphael Neider <rneider AT web.de>
546
547         * src/pic/gen.h: added emitpcode macro for debugging
548         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
549           and replace by macro adding debug information on demand
550         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
551         * (gencjne): tried to fix; replaced with correct (slower) code
552         * (gen{Unp,P}ackBits): fixed single bit access
553         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
554         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
555           previous instruction
556         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
557           register has to be handled with care (forbidding movement
558           of assignments/uses, removing assignments completely, ...)
559         * (pCodeOptime2pCodes): make use of regIsSpecial
560         * added lots of debugging output (commented out)
561         * src/pic/rallloc.c (deassignLRs): prevent operand registers
562           from being reused as result UNLESS it is known to work
563
564 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
565
566         * support/Util/dbuf.h: include <stddef.h> for size_t
567         * .version: changed to version 2.5.2
568
569 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
570
571         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
572
573 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
574
575         * src/hc08/gen.c (genMinus): fixed bug #1241835,
576           (genModOneByte): removed needless psha/pula
577
578 2005-07-22 Raphael Neider <rneider AT web.de>
579
580         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
581           have PIC14 handled like PIC16, fixes broken pic14 linker calls
582         * src/pic/gen.c (resolveIfx): do not "invent" labels
583         * (genSkipc): changed to positive logic
584         * (genSkipCond): removed as no longer needed
585         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
586           backport from PIC16
587         * (genLeftShift): check operands are in different registers
588         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
589           INCF does not update CARRY...
590         * src/pic/main.c: fixed _linkCmd
591         * src/pic/pcode.c (unlinkpCode): added inactive code
592         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
593           alive (do not assign result and operand overlapping registers)
594
595 2005-07-22 Raphael Neider <rneider AT web.de>
596
597         * src/pic/device.c (dump_sfr): replaced register declaration with
598           call to emitSymbolToFile() to avoid duplicate symbols
599         * (assignRelocatableRegisters): do not declare external symbols
600         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
601           right (take size of type, not etype)
602         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
603         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
604         * (packRegsForAccUse): disabled assignment of WREG as
605           the result reg to prevent occurence of just fixed #1235003,
606           fixes #1242954
607         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
608           symbols (avoids duplicate symbols in .asm file)
609         * (pic14emitRegularMap): use emitSymbolToFile()
610         * src/pic/gen.c (aopOp): fixed spillLocation handling
611         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
612         * (genDataPointerSet): removed unneccessary variables/output
613
614 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
615
616         * as/mcs51/lkarea.c: enlarged codemap for banked memory
617         * device/lib/mcs51/crtbank.asm: added # to 0x0F
618
619 2005-07-21 Raphael Neider <rneider AT web.de>
620
621         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
622           architecture cannot handle them efficiently, fixes bug #1235003
623         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
624           check for empty sets before using them (fixes bug #1232190)
625
626 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
627
628         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
629           (lnksect2): generate warnings for memory overlap
630         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
631           constseg to set the name of these segments so you can instruct the linker
632           to place them in banks
633         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
634         * src/SDCCglobl.h: added MODEL_HUGE to enum,
635           added code_seg and const_seg to options
636         * src/SDCCglue.c (emitMaps): use options.const_seg,
637           (createInterruptVect): put interrupt vectors in segment HOME,
638           (glue): put HOME before static segment and put the main glue in HOME,
639           (glue): use options.code_seg
640         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
641         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
642           these segments so you can instruct the linker to place them in banks
643           (linkEdit): use code_loc for HOME segment which should be the first
644           segment in code memory now
645         * src/SDCCmem.c: fixed more stuff like bug 1238386
646         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
647           (changePointer): don't change function pointers to code pointers for
648           banked functions,
649           (compareType): added exceptional check for banked function pointers
650         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
651         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
652           after static in code memory
653         * src/mcs51/gen.c: added aopLiteralLong prototype,
654           (aopForSym): use getSize for functions,
655           (genCall): generate banked calls over one trampoline __sdcc_banked_call
656           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
657           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
658           the segment,
659           (genPcall): use call for literal function pointers and generate banked
660           calls over the one trampoline so there's only one place for the user to
661           modify according to his/hers hardware,
662           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
663           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
664         * src/mcs51/main.c: added keyword banked,
665           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
666         * support/Util/SDCCerr.c,
667         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
668           needed for passing the bank and address to the trampoline
669         * device/lib/mcs51/crtbank.asm: added for bankswitching
670         * device/lib/mcs51/Makefile: added crtbank
671
672 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
673
674         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
675           for fields at offset 0 of a struct or union as reported
676           on 2005-07-07 in the developer mailing list.
677
678 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
679
680         * src/SDCCmem.c: fixed bug 1238386
681
682 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
683
684         * src/mcs51/peeph.def: added labelrefcounting for peepholes
685           (patch #1144962), added peephole 300, enabled 259.x
686         * doc/sdccman.lyx: removed screenshot and provided link instead
687
688 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
689
690         * doc/sdccman.lyx: added section about debugging with ddd
691         * doc/figures/ddd_example.eps: screenshot of debugging session
692
693 2005-07-04 Raphael Neider <rneider AT web.de>
694
695         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
696           like CODE pointers, fixes #1115683
697         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
698           call, fixes bugs #1232211, #1228110,
699           fixed wrong casts to pCodeFlow from pCodeInstructions
700
701 2005-07-04 Raphael Neider <rneider AT web.de>
702
703         * src/pic/gen.c (popGet): changed assert to allow for
704           bit operands
705         * (popGetAddr): changed signature to provide
706           an additional index, patched all call sites
707         * (genCmpEq): handle literal-like operands correctly
708         * (genAddrOf): added sanity checks on __code/__data pointers
709         * (genAssign): added handling of symbols from __code section
710         * (gencjne): do not generate code for comparisons whose result
711           is neither stored nor used, fixes bug #1171114
712         * (AccLsh, AccRsh): operate on operand instead of WREG
713         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
714           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
715           by known count
716         * rewrote complete shift-by-literal logic, commented unused
717           functions out
718         * (genConstPointerGet): get multiple bytes (if result size > 1),
719           fixed handling of non-immediate addresses
720         * (genPointerGet): handle CODE pointers like CONST pointers
721         * (genpic14Code): insert C-SRC lines as Cource-pCodes
722         * ({aop,op}_isLitLike): NEW, single place to decide whether an
723           operand is to be treated as a literal or not
724         * (mov2w,genPcall,genCmpEq),
725           src/pic/genarith.c: use aop_isLitLike() to decide between
726           literal/register contents
727         * (addSign): added missing offset
728         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
729           only emit comment in debug-mode,
730           use {aop,op}_isLitLike throughout the file
731         * src/pic/glue.c: fix initializers for pointers (work in progress)
732         * src/pic/pcode.c (get_op): honor index on _const symbols
733         * ({reset,dump}pCodeStatistics): NEW, estimate code size
734         * (dumppBlock): added pCode size estimation
735         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
736           check for IS_SYMOP before OP_SYMBOL'ing
737         * fixed indentation, compacted switch-statements
738         * (allocReg): find free register and allocate it instead of
739           allocating new registers all the time
740         * (deassignLRs): prevent POINTER_GET's from being assigned the same
741           registers as its operands (necessary only for multibyte GETs)
742
743 2005-07-01 Raphael Neider <rneider AT web.de>
744
745         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
746           debugging .asm-output macros FENTRY + FEXIT
747         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
748           way... I wonder...
749         * (emitpComment): NEW, printf to pCode
750         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
751           offset handling
752         * (popGetAddr): NEW, variant of popGet to access an immediates
753           high(er) bytes instead of the n'th byte of memory they reference,
754           replaced popGet with popGetAddr where neccessary
755         * (genDataPointerGet): reactivated and fixed implementation
756         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
757           accesses
758         * (genDataPointerSet): fixed multibyte assignments
759         * (genpic14Code): fixed --i-code-in-asm handling
760         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
761         * (genPlus): fixed index-out-of-bounds error
762         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
763         * src/pic/ralloc.c: added debugging output macro FENTRY2
764         * (spillThis): fixed indentation, enbraced for-body for clarity
765         * (rematStr): commented out as now unused
766         * (regTypeNum): commented out special spill case (overwrites
767           arbitrary values)
768         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
769
770 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
771
772         * doc/sdccman.lyx: documented sfr16/sfr32,
773           added example for using storage class with function pointers
774         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
775
776 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
777
778         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
779         * device/lib/_itoa.c,
780         * device/lib/_ltoa.c: optimized codesize
781         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
782           but don't know how to suppress the double warning.
783         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
784         * support/Util/SDCCerr.c,
785         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
786
787 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
788
789         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
790           fixed old K&R prototypes
791         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
792         * device/lib/_gptrget.c,
793         * device/lib/_gptrgetc.c,
794         * device/lib/_gptrput.c: changed versions for new memory indicator values,
795           also new versions for small generic pointers and banked generic pointers
796         * src/port.h: added const_name
797         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
798         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
799         * src/SDCCcse.c (findPrevIc): check all associative operators
800         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
801         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
802         * src/SDCCmem.c: updated comments,
803           set far-space to 0 for pdata, results in optimized code
804         * src/SDCCmem.h: added macro CONST_NAME
805         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
806           moving the info into the highest bits, see also gptrget/gptrput
807         * src/src.dsp: added sdcc.ico to project files
808         * src/avr/gen.c (genCast): fixed bug 0x%d
809         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
810         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
811           relation between ptr_type and DCL_TYPE,
812           (genCast): fixed bug 0x%d
813         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
814           (CODE)" for const_name
815         * src/hc08/gen.c (genCast): fixed bug 0x%d
816         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
817           (hc08_port): added "CONST (CODE)" for const_name
818         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
819           (aopForRemat, adjustArithmeticResult): disconnected direct relation
820           between ptr_type and DCL_TYPE,
821           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
822           operand* and took AOP() inside function so sfr-ness can be checked,
823           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
824           new prototype,
825           (genFunction, genEndFunction): optimized stack setup,
826           (genMinus): optimized for literals with ending zeroes (in bytes),
827           (genCast): fixed bug 0x%d
828         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
829           (mcs51_port): added "CONST (CODE)" for const_name
830         * src/mcs51/peeph.def: made rule 226 more generic
831         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
832         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
833         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
834         * src/z80/main.c (z80_port): added NULL for const_name,
835           (gbz80_port): added NULL for const_name
836         * support/regression/tests/bug663539.c,
837         * support/regression/tests/sfr16.c: new tests
838
839 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
840
841         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
842
843 2005-06-24 Raphael Neider <rneider AT web.de>
844
845         * device/lib/pic16/libdev/pic18f[68][567]20.c:
846           corrected typos...
847         * device/include/pic16/signal.h: added USBIF
848           and SIG_USB
849
850 2005-06-24 Raphael Neider <rneider AT web.de>
851
852         * device/lib/pic16/libdev/pic18f2455.c,
853           device/include/pic16/pic18f2455.h: NEW
854         * device/include/pic16/pic18fregs.h,
855           device/lib/pic16/pics.all,
856           src/pic16/device.c: added 18f2455
857         * device/lib/pic16/libdev/pic18f[68][567]20.c,
858           device/include/pic16/{pic18f[68][567].h,usart.h}:
859           replaced MULTIPLE_USARTS define with more relaible
860           compatibility sfrs (for USART access)
861
862 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
863
864         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
865           and the output asm file line is printed on two lines.
866
867 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
868
869         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
870           BGT, BLE, BHI, and BLS instructions
871         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
872           genCmpEq): removed
873         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
874           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
875           fixes bug #1216342
876         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
877
878 2005-06-15 Raphael Neider <rneider AT web.de>
879
880         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
881         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
882         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
883           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
884           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
885
886 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
887
888         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
889           Marcel Telka in bug #1215704
890
891 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
892
893         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
894           located in shared memory bank.
895
896 2005-05-31 Raphael Neider <rneider AT web.de>
897
898         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
899           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
900           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
901
902 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
903
904         * device/lib/_strncpy.c: fixed the fix
905
906 2005-05-26 Raphael Neider <rneider AT web.de>
907
908         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
909           initializers with \0, bug #1208187
910         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
911           intializers with \0, bug #1208187
912
913 2005-05-26 Raphael Neider <rneider AT web.de>
914
915         * src/pic16/glue.c (pic16_printIvalChar): fixed string
916           initializers with \0, bug #1208187
917         * src/pic16/main.c (_process_pragma): added sanity checks
918           for stack position and size, emit warnings when appropriate
919
920 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
921
922         * device/lib/_strncpy.c: fixed not filling with \0
923
924 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
925
926         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
927           createFunction),
928         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
929           compound_statement),
930         * src/SDCCsymt.h,
931         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
932
933 2005-05-24 Raphael Neider <rneider AT web.de>
934
935         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
936
937 2005-05-24 Raphael Neider <rneider AT web.de>
938
939         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
940           TRISE definitions, closes bug #1162453
941
942 2005-05-22 Raphael Neider <rneider AT web.de>
943
944         * src/pic16/main.c (_process_pragma): check for missing
945           arguments to pragmas code and udata
946         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
947           consistency fixes to match other headers (thanks to Jim Paris)
948         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
949
950 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
951
952         * src/SDCCicode.c (isOperandEqual): fixed missing ;
953
954 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
955
956         * support/regression/tests/bug1198642.c: new test
957         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
958         * src/SDCCcse.c (findPrevIc): added comment, please have a look
959         * support/scripts/resource.h,
960         * support/scripts/resource.rc,
961         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
962         * support/scripts/sdcc.ico: added 32x32 icon
963
964 2005-05-18 Raphael Neider <rneider AT web.de>
965
966         * device/lib/pic16/libdev/pic18f*.c,
967         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
968           keywords to "__sfr" and "__at (X)"
969         * device/include/pic16/pic18fregs.h: added pic18f4520
970         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
971           #1203088 (MPLAB compatibility)
972
973 2005-05-17 Raphael Neider <rneider AT web.de>
974
975         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
976         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
977         * device/lib/pic16/pics.all: added new devices
978         * src/pic16/device.c: added support for pic18f4520
979
980 2005-05-16 Raphael Neider <rneider AT web.de>
981         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
982         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
983         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
984           convenience function for bit access
985
986 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
987
988         * device/lib/printf_large.c: fixed bug 1193299
989         * support/regression/tests/bug1057979.c: added test %3.3s
990
991 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
992
993         * device/include/mcs51/8051.h,
994         * device/include/mcs51/8052.h: made parseable with lint
995         * device/include/mcs51/lint.h: added include file for (sp)lint
996         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
997         * doc/cdbfileformat.lyx,
998         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
999
1000 2005-05-14 Raphael Neider <rneider AT web.de>
1001
1002         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1003         * device/lib/pic16/libc/stdlib/itoa.c (new)
1004         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1005         * device/lib/pic16/libio/Makefile: exclude subdir according to
1006           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1007         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1008         * src/pic16/gen.c (genFunction): prevent annoying warning
1009         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1010           nameclashes on BeOS
1011         * support/cpp2/cppmain.c (cpp_output_string): new
1012         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1013           fixes bug 1116802
1014
1015 2005-05-13 Borut Razem <borut.razem AT siol.net>
1016
1017         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1018
1019 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1020
1021         * .version: changed to version 2.5.1; back to bleeding edge development
1022
1023 2005-05-11 Borut Razem <borut.razem AT siol.net>
1024
1025         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1026           generate PDF version 1.3 documents
1027
1028 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1029
1030         * .version: changed to version 2.5.0
1031
1032 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1033
1034         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1035
1036 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1037
1038         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1039         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1040         well as many smaller updates.
1041         * .version: changed to version 2.5.0-pre1
1042
1043 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1044
1045         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1046
1047 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1048
1049         * support/regression/tests/bug1185672.c: added
1050         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1051           bug 1185672
1052         * src/mcs51/gen.c (genCall): added comments, made it look safer
1053         * src/mcs51/gen.c (genEndFunction): simplified
1054
1055 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1056
1057         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1058
1059 2005-04-14 Borut Razem <borut.razem AT siol.net>
1060
1061         * fixed bug 1045046 - SIGSEGV with really simple code?:
1062           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1063           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1064
1065 2005-04-14 Borut Razem <borut.razem AT siol.net>
1066
1067         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1068           src/pic16/device.h: temporarily disabled experimental #inline pragma
1069           for 2.5.0 release
1070
1071 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1072
1073         * device/include/z80/stdio.h,
1074         * device/include/z80/string.h: removed these highly incomplete files so
1075           SDCC can use the default ones in device/include/
1076
1077 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1078
1079         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1080         gcc warning.
1081         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1082         fix sdcpp warnings.
1083
1084 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1085
1086         * device/include/malloc.h: removed redundant __reentrant prototypes
1087         * device/lib/_mullong.c: added working xstack variant in asm (C version
1088           doesn't pass regression tests)
1089         * device/lib/bpx.c: used __data and made bpx char for mcs51
1090         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1091           (createFunction): fixed bug with xstackPtr
1092         * src/SDCCcse.c: corrected comments
1093         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1094           (killDeadCode, eBBlockFromiCode): removed unused code
1095         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1096           corrected comments
1097         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1098           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1099           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1100           (genModOneByte): fixed warning in MSVC
1101         * src/mcs51/main.c (): added comments
1102         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1103
1104 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1105
1106         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1107
1108 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1109
1110         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1111
1112 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1113
1114         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1115         characters arrays of larger size than the declared one.
1116
1117 2005-04-10 Borut Razem <borut.razem AT siol.net>
1118
1119         * src/pic/gen.c (genInline),
1120           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1121           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1122           (findNextInstruction), (findPrevInstruction),
1123           (findInstructionUsingLabel),
1124           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1125         * src/pic/pcode.c (findLabel): added missing '\n'
1126         * src/src.dsp: added SDCCdwarf2.c to the project
1127
1128 2005-04-09 Borut Razem <borut.razem AT siol.net>
1129
1130         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1131
1132 2005-04-08 Raphael Neider <rneider AT web.de>
1133
1134         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1135           into the chain after a given one) and mergeDefmapSymbols (combine
1136           defmap entries for each symbol per pcode)
1137         * (createDefmap): have defmap entries merged in the end
1138         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1139           a symbol before replacing one access type's symbol, merge symbols in
1140           the end (replacement symbol might already have an entry)
1141         * (assignValnums): keep reference to written WREG intact
1142
1143 2005-04-08 Raphael Neider <rneider AT web.de>
1144
1145         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1146           Alpha)
1147
1148 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1149
1150         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1151         bytes
1152
1153 2005-04-07 Raphael Neider <rneider AT web.de>
1154
1155         * device/include/pic16/usart.h: added compatibility defines for
1156           devices with more than one USART
1157         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1158
1159 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1160
1161         * device/lib/Makefile.in: updated for port specific include
1162
1163 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1164
1165         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1166
1167 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1168
1169         * device/include/8051.h,
1170         * device/include/8052.h,
1171         * device/include/at89S8252.h,
1172         * device/include/at89c55.h,
1173         * device/include/at89x051.h,
1174         * device/include/at89x51.h,
1175         * device/include/at89x52.h,
1176         * device/include/mcs51reg.h,
1177         * device/include/reg51.h,
1178         * device/include/reg764.h,
1179         * device/include/regc515c.h,
1180         * device/include/sab80515.h: (re)moved these 12 files
1181         * device/include/mcs51/8051.h,
1182         * device/include/mcs51/8052.h,
1183         * device/include/mcs51/at89S8252.h,
1184         * device/include/mcs51/at89c55.h,
1185         * device/include/mcs51/at89x051.h,
1186         * device/include/mcs51/at89x51.h,
1187         * device/include/mcs51/at89x52.h,
1188         * device/include/mcs51/mcs51reg.h,
1189         * device/include/mcs51/reg51.h,
1190         * device/include/mcs51/reg764.h,
1191         * device/include/mcs51/regc515c.h,
1192         * device/include/mcs51/sab80515.h: and added them here
1193
1194 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1195
1196         * device/include/stdarg.h: changed SDCC specific keywords to double
1197           underlined form.
1198         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1199           mcs51 and ds390.
1200         * device/include/hc08/mc68hc908gp32.h,
1201         * device/include/hc08/mc68hc908jb8.h,
1202         * device/include/hc08/mc68hc908jkjl.h,
1203         * device/include/hc08/mc68hc908qy.h: fixed comments
1204         * device/include/mcs51/README: updated
1205         * device/include/mcs51/c8051f120.h: added PINRSF
1206         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1207         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1208           amidst code. Also inline is not supported.
1209
1210 2005-04-06 Raphael Neider <rneider AT web.de>
1211
1212         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1213         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1214           callers stack/frame pointers
1215
1216 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1217
1218         * device/include/pic16/usart.h: added, missing in previous commit,
1219         * device/include/pic16/adc.h: fixed typo,
1220         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1221         commit,
1222         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1223         <p18fxxx.inc>
1224         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1225         uninitialized because a bug appears with gplink
1226         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1227         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1228         complains for unrecognised option
1229
1230 2005-04-05 Raphael Neider <rneider AT web.de>
1231
1232         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1233           structs as well (using memcpy)
1234         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1235           on ISRs (GOTO has no label)
1236         * src/pic16/device.h: added OF_OPTIMIZE_DF
1237         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1238           new data flow analysis/optimization
1239         * src/pic16/pcode.c: added (prototypes for and implementation of)
1240           dataflow analysis functions, fixed pCodeInstructions' inCond and
1241           outCond values, made RCALL a branch instruction
1242         * (pic16_unlinkpCode): keep C line if possible
1243         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1244           C line moved if possible
1245         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1246         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1247           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1248         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1249           new flow)
1250         * (pic16_getJumptabpCode): NEW, needed in...
1251         * (LinkFlow): fixed handling of jumptables, calls and conditional
1252           branches
1253         * (pic16_InsertCommentAfter): NEW
1254         * (pic16_pCodeReplace): made verbose and flow preserving
1255         * (AnalyzeFlow): added call to data flow analysis
1256         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1257         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1258         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1259
1260 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1261
1262         * src/SDCCast.c (decorateType): fixed bug #1105626
1263
1264 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1265
1266         * device/include/asm/pic16/features.h,
1267         * pic18f*.h headers,
1268         * device/include/pic16/adc.h,
1269         * device/include/pic16/delay.h,
1270         * device/include/pic16/i2c.h,
1271         * device/include/pic16/malloc.h,
1272         * device/include/pic16/stdio.h,
1273         * device/include/pic16/stdlib.h,
1274         * device/include/pic16/string.h,
1275         * device/lib/pic16/libc/stdio/printf_tiny.c,
1276         * device/lib/pic16/libc/stdio/printf_small.c,
1277         * device/lib/pic16/libc/stdio/strmgpsim.c,
1278         * device/lib/pic16/libc/stdio/strmmssp.c,
1279         * device/lib/pic16/libc/stdio/strmusart.c,
1280         * device/lib/pic16/libc/stdio/vfprintf.c,
1281         * device/lib/pic16/libc/stdlib/ltoa.c,
1282         * device/lib/pic16/libc/stdlib/putchar.c,
1283         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1284         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1285         * device/lib/pic16/libc/stdlib/memchrram.c,
1286         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1287         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1288         * device/lib/pic16/libio/adc/adcbusy.c,
1289         * device/lib/pic16/libio/adc/adcread.c,
1290         * device/lib/pic16/libio/adc/adcsetch.c,
1291         * device/lib/pic16/libio/usart/ubaud.c,
1292         * device/lib/pic16/libio/usart/ubusy.c,
1293         * device/lib/pic16/libio/usart/udrdy.c,
1294         * device/lib/pic16/libio/usart/uopen.c,
1295         * device/lib/pic16/libio/usart/uputc.c,
1296         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1297         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1298         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1299         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1300         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1301         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1302         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1303         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1304         specific keywords to double underlined form,
1305         * device/lib/pic16/libc/Makefile.rules,
1306         * device/lib/pic16/libsdcc/Makefile.rules,
1307         * device/lib/pic16/libm/Makefile,
1308         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1309         to compile with C standard set in Makefile.common
1310         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1311         rand.c and crc.c in compilation process,
1312         * device/lib/pic16/libsdcc/int/divuint.c,
1313         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1314         `c' from signed to unsigned,
1315         * device/lib/pic16/startup/crt0.c,
1316         * device/lib/pic16/startup/crt0i.c,
1317         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1318         keywords to double underlined form, bug fixes in _do_cinit function
1319         which prevented the correct initialization of the .idata segment,
1320         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1321         core to enter a infinite loop
1322         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1323
1324 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1325
1326         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1327
1328 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1329
1330         * device/include/Makefile.in: add support for hc08 subdirectory
1331         * device/include/hc08/: new subdirectory
1332         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1333         Lucas Loizaga, thanks!
1334         * device/include/hc08/mc68hc908qy.h,
1335         * device/include/hc08/mc68hc908gp32.h,
1336         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1337         their own directory. Changed internal macro names to use the compiler
1338         reserved namespace. Changed SDCC specific keywords to double
1339         underlined form.
1340         * device/include/math.h,
1341         * device/include/malloc.h,
1342         * device/include/stdarg.h,
1343         * device/include/stdbool.h
1344         * device/include/string.h,
1345         * device/include/tinibios.h,
1346         * device/include/ds400rom.h,
1347         * device/include/8051.h,
1348         * device/include/8052.h,
1349         * device/include/80c51xa.h,
1350         * device/include/at89c55.h,
1351         * device/include/at89S8252.h,
1352         * device/include/at89x51.h,
1353         * device/include/at89x52.h,
1354         * device/include/ds80c390.h,
1355         * device/include/reg764.h,
1356         * device/include/regc515c.h,
1357         * device/include/sab80515.h,
1358         * device/include/mcs51/c8051f000.h,
1359         * device/include/mcs51/c8051f018.h,
1360         * device/include/mcs51/c8051f020.h,
1361         * device/include/mcs51/c8051f040.h,
1362         * device/include/mcs51/c8051f060.h,
1363         * device/include/mcs51/c8051f120.h,
1364         * device/include/mcs51/c8051f300.h,
1365         * device/include/mcs51/c8051f310.h,
1366         * device/include/mcs51/c8051f320.h,
1367         * device/include/mcs51/c8051f330.h,
1368         * device/include/mcs51/c8051f350.h,
1369         * device/include/z180.h: Changed SDCC specific keywords to double
1370         underlined form.
1371
1372 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1373
1374         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1375         18F4455,
1376         * (pic16_assignConfigWordValue): disable testing of configuration
1377         register value with config mask,
1378         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1379         function with port->fun_prefix,
1380         * (genFunction): when generating a naked interrupt function never
1381         create an absolute segment placed in interrupt vector address, place
1382         the actual interrupt function at IVA instead, when an interrupt
1383         function is generated with unspecified interrupt then do not create
1384         the absolute section,
1385         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1386         code for generating a call to generic pointer get/put function with
1387         a call to function pic16_callGenericPointer(),
1388         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1389         the call to the generic pointer get/put functions with prefixing the
1390         function name with port->fun_prefix,
1391         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1392         * src/pic16/main.c (_process_pragma): prefix function with
1393         port->fun_prefix,
1394         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1395         calling assembler, old 18Fxxxx macro is deprecated,
1396         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1397         PC_ASMDIR in while condition,
1398         * (findInstruction): add PC_ASMDIR in while condition,
1399         * (buildCallTree): prefix main with port->fun_prefix,
1400         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1401         identifier for variable with banked access in instructions BTFSS,
1402         BTFSC, BCF, BSF, BTG
1403         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1404         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1405         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1406         perform optimization when enviroment variable NO_REG_OPT is set,
1407         * (insideLRBlock): NEW, return 1 if register is inside an
1408         INF_LOCALREGS block,
1409         * (RemoveRegFromLRBlock): remove a register that is completely
1410         eliminated by register optimization, but it is still left in local
1411         register store/restore in/from stack block,
1412         * (Remove2pcodes): after removing register, check to see if it
1413         should be removed from local register store/restore in/from stack
1414         block,
1415         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1416         DUMMY_READ_VOLATILE,
1417
1418         * device/include/pic16/adc.h: minor prototype modifications and
1419         update,
1420         * device/include/pic16/malloc.h: added GPL notice various
1421         modifications,
1422         * device/include/pic16/stdint.h: NEW, standard header for ints
1423         * device/include/pic16/delay.h: NEW, header for delay functions,
1424         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1425         delay1mtcy,
1426         * device/include/pic16/signal.h: NEW, header providing helper macros
1427         for implementing signal handlers,
1428         * device/include/pic16/stdio.h: added prototypes for functions,
1429         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1430         prototypes for stdin and stdout, added macro PUTCHAR to
1431         automatically implement putchar function prototype,
1432         * device/include/pic16/usart.h: modified and updated USART library,
1433         * device/lib/pic16/libio/adc/,
1434         * device/lib/pic16/libio/i2c: some modifications to improve library
1435         performance,
1436         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1437         family of functions,
1438         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1439         family of functions and other sources,
1440         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1441         of the PIC18Fxx[28] devices,
1442         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1443         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1444         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1445         _do_cinit function, because the previous failed when local variables
1446         where not placed in the same memory bank,
1447         * device/lib/pic16/libsdcc/char/: various modifications to improve
1448         library performance,
1449         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1450         information on the new functions of the c library and more...
1451
1452 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1453
1454         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1455
1456 2005-03-26 Raphael Neider <rneider AT web.de>
1457
1458         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1459           if condition == CARRY)
1460         * (genCmp): adapted to new genSkipc semantics
1461         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1462           on rIfx (genCmp was broken)
1463
1464 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1465
1466         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1467         * src/z80/main.c (_keywords[]),
1468         * src/SDCCglobal.h (struct options),
1469         * src/SDCC.y,
1470         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1471         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1472         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1473         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1474         always available in leading double underscore form. The C99 support is
1475         mostly missing, but it's a start.
1476         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1477         reserved identifier "__data".
1478
1479 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1480
1481         * src/mcs51/peeph.def: fixed bug 1170013
1482
1483 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1484
1485         * device/include/mcs51reg.h: fixed bug 842007
1486
1487 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1488
1489         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1490         last time.
1491
1492 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1493
1494         * src/port.h (struct PORT),
1495         * src/avr/ralloc.c (avr_assignRegisters),
1496         * src/avr/main.c,
1497         * src/ds390/ralloc.c (ds390_assignRegisters),
1498         * src/ds390/main.c,
1499         * src/hc08/ralloc.c (hc08_assignRegisters),
1500         * src/hc08/main.c,
1501         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1502         * src/mcs51/main.c,
1503         * src/pic/ralloc.c (pic14_assignRegisters),
1504         * src/pic/main.c,
1505         * src/pic16/ralloc.c (pic16_assignRegisters),
1506         * src/pic16/main.c,
1507         * src/xa51/ralloc.c (xa51_assignRegisters),
1508         * src/xa51/main.c,
1509         * src/z80/ralloc.c (z80_assignRegisters),
1510         * src/z80/ralloc.h,
1511         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1512         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1513         * src/SDCCcse.h,
1514         * src/SDCCdflow.c (computeDataFlow),
1515         * src/SDCCdflow.h,
1516         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1517         * src/SDCCloop.h,
1518         * src/SDCCcflow.c (*),
1519         * src/SDCCcflow.h,
1520         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1521         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1522         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1523         immedDom() returning wrong block; probably fixes bug #1160833)
1524
1525 2005-03-20 Borut Razem <borut.razem AT siol.net>
1526
1527         * support/scripts/inc2h.pl: WIN32 port
1528
1529 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1530
1531         * device/lib/makefile.in: added abs.c and labs.c
1532
1533 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1534
1535         * device/include/stdint.h: added
1536         * device/lib/abs.c: added
1537         * device/lib/labs.c: added
1538         * device/include/stdlib.h: added abs() and labs() prototypes
1539         * device/lib/libsdcc.lib: added abs and labs
1540         * device/include/float.h,
1541         * device/lib/_fsmul.c,
1542         * device/lib/printf_fast.c,
1543         * device/lib/printf_tiny.c: updated comments
1544
1545 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1546
1547         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1548         bug #1164313
1549
1550 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1551
1552         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1553         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1554
1555 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1556
1557         * device/lib/printf_large.c: removed inline assembly for portability and
1558           readability. Use printf_fast if speed or size are more important.
1559         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1560         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1561
1562 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1563
1564         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1565         prevent compiler warning
1566
1567 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1568
1569         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1570         moved to level 0 and declared as static. Also they are explicit
1571         placed in access bank. This was necessery because some times they
1572         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1573         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1574         optimizations. Currently only compare to unsigned char is implemented,
1575         * src/pic16/gen.c: added fReturnIdx array,
1576         * (struct resolvedIfx) is moved to gen.h and made public,
1577         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1578         * (aopForSym): added an optimization to directly store in stack of
1579         the operand of a SEND iCode,
1580         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1581         but as registers instead (AOP_REG) using the fReturnIdx array,
1582         * (pic16_freeAsmop): remove the freed register from the
1583         _G.sregsAlloc field,
1584         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1585         a compare of 'WREG',
1586         * (pic16_popGetTempRegCond): changed function prototype, now
1587         function takes also a bitVector argument v which holds the current
1588         set of registers that are allocated for stack access by aopForSym,
1589         registers allocated in aopForSym for accessing stack symbols are not
1590         any more part of the functions usedRegs field,
1591         * (genCall): some times aopOp is called for a stack variable to be
1592         send, aopForSym might perform the push, if this is true make sure
1593         that genCall doesn't push the variable twice by testing _G.resDirect,
1594         * (genFunction): changed testing for unspecified interrupt number
1595         from 256 to INTNO_UNSPEC,
1596         * modified selection scheme of frame pointer generation. Previously
1597         if function did use local registers a frame pointer was generated,
1598         now a frame pointer is generated only if function has arguments
1599         (that need PLUSW2 register access), or has stack arguments, or the
1600         compiler is not instructed to omit the frame pointer,
1601         * (genEndFunction): before restoring local registers that were saved
1602         in the function preamble, also restore the registers that *might*
1603         have been allocated for stack access,
1604         * (genRet): removed some old comments,
1605         * (genCmp, the active (RN's) version): added a call to the
1606         pic16_genCmp_special function to perform the compare with a more
1607         robust and optimized way,
1608         * (genInline): a feature has been added in inline code generation,
1609         which allows a wildcard variable substitution when writing inline
1610         assembly. Code is incomplete and experimental therefore undocumented,
1611         * (genCast): changed order of aopOp for result and right to allow
1612         aopForSym to directly load the result if possible,
1613         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1614         perform an optimized compare on some selected special occasions,
1615         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1616         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1617         generate an IVT any more,
1618         * src/pic16/main.c (pic16_optionsTable): added command line option
1619         --optimize-cmp,
1620         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1621         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1622         macros,
1623         * src/pic16/NOTES: Raphael Neider added in list of active developers
1624         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1625         jumptable_end to prevent bug #,
1626         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1627         inCond and outCond fields,
1628         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1629         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1630         turn off register spilling,
1631         * (packRegsForOneUse): synced with other ports' versions although it
1632         is not used currently,
1633         * (pic16_packRegisters): added an optimization while reading
1634         structure bitfields, some registers may be saved (malloc code is
1635         decreased by 80 bytes)
1636
1637 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1638
1639         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1640         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1641         this can be optimized more?
1642
1643 2005-03-10 Raphael Neider <rneider AT web.de>
1644
1645         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1646           genNearPointerGet): (hopefully) fixed access to bitfields via
1647           pointers (p->bitN = x; and x = p->bitN; failed)
1648
1649 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1650
1651         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1652
1653 2005-03-09 Raphael Neider <rneider AT web.de>
1654
1655         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1656
1657 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1658
1659         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1660         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1661           (regTypeNum): set REG_BIT type if necessary
1662         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1663         * support/regression/tests/critical.c: check bug 1144613
1664
1665 2005-03-02 Raphael Neider <rneider AT web.de>
1666
1667         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1668
1669 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1670
1671         * src/avr/ralloc.c (serialRegAssign),
1672         * src/ds390/ralloc.c (serialRegAssign),
1673         * src/hc08/ralloc.c (serialRegAssign),
1674         * src/mcs51/ralloc.c (serialRegAssign),
1675         * src/pic/ralloc.c (serialRegAssign),
1676         * src/pic16/ralloc.c (serialRegAssign),
1677         * src/xa51/ralloc.c (serialRegAssign),
1678         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1679
1680 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1681
1682         * src/SDCCast.c (decorateType): fixed bug 1124787
1683
1684 2005-02-20 Hubert Sack <sack AT digiplan.de>
1685         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1686
1687         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1688         patch #1121755
1689
1690 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1691
1692         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1693         to keep the correct label reference count when adding/removing references
1694         to labels. A peephole file using this is appended to patch #1144962.
1695
1696 2005-02-14 Raphael Neider <rneider AT web.de>
1697
1698         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1699         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1700         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1701           retrievals of result operand's value on assignment
1702
1703 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1704
1705         * device/include/pic16/string.h: modified prototype for memccpy()
1706         to memccpy(void *, void *, char, size_t)
1707         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1708         check whether to omit frame pointer or not,
1709         * (genInline): convert all occurences of "\n" to LF in inline
1710         assembler blocks, this helps formatting the inline text,
1711         * (pic16_loadFSR0): modified prototype,
1712         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1713         removed some 8051 legacy code,
1714         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1715         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1716         before allocating temporary registers in functions,
1717
1718 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1719
1720         * support/regression/tests/bitvars.c: corrected the "fix"
1721
1722 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1723
1724         * support/regression/tests/bitvars.c,
1725         * support/regression/tests/bitwise.c,
1726         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1727
1728 2005-02-10 Raphael Neider <rneider AT web.de>
1729
1730         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1731           different size for Alpha
1732         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1733
1734 2005-02-09 Raphael Neider <rneider AT web.de>
1735
1736         * src/SDCC.lex(doPragma) : save and restore warning options as well
1737           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1738         * have #pragma less_pedantic set the errorlevel to WARNING
1739           (fixes #1117001)
1740         * (cloneOptimize) : fixed wrong malloc's size
1741         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1742           facilitate correct handling of #pragma (save|restore)
1743
1744 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1745
1746         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1747
1748 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1749
1750         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1751
1752 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1753
1754         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1755
1756 2005-02-02 Raphael Neider <rneider AT web.de>
1757
1758         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1759         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1760         * (pic16_storeForReturn): fixed to allow returning function pointers
1761         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1762         * device/include/pic16/{stddef.h,stdbool.h}: added
1763
1764 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1765
1766         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1767
1768 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1769
1770         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1771         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1772          appeared to be required
1773
1774 2005-01-31 Borut Razem <borut.razem AT siol.net>
1775
1776         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1777           include/mcs51 and include/z80 directories to the package
1778
1779 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1780
1781         * src/hc08/gen.c (genFunction): fixed bug #1112752
1782
1783 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1784
1785         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1786
1787 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1788
1789         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1790
1791 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1792
1793         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1794
1795 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1796
1797         * device/include/c8051fxxx.h: removed these 6 files
1798         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1799
1800 2005-01-26 Raphael Neider <rneider AT web.de>
1801
1802         * src/pic16/gen.c (genAssign): fixed assignment from longs
1803           in codespace (were cut to three bytes)
1804         * (genDummyRead): implemented (except for CODESPACE...),
1805           fixed bug #1108575
1806         * src/pic16/glue.c (emitStatistics): beautified
1807         * device/lib/pic16/libm/Makefile: added include path
1808
1809 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1810
1811         * src/z80/gen.c (aopPut): fixed bug #1103902
1812
1813 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1814
1815         * device/lib/expf.c: fixed bug #1095792
1816
1817 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1818
1819         * device/lib/pic16/libm: added Math library sources
1820
1821 2005-01-24 Raphael Neider <rneider AT web.de>
1822
1823         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1824           to enable upcast to pCodeOpReg2 (there is no type tag to
1825           differenciate the two and pic16_popGet2p cast into PCOR2)
1826         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1827           (sizeof(sectNames) changed to sizeof(sectName))
1828           Both patches fix segfaults under MinGW.
1829
1830 2005-01-23 Raphael Neider <rneider AT web.de>
1831
1832         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1833           Safe_[mc]?alloc()'ed variables
1834         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1835           of (byte sized) temporaries (assign them to WREG for now)
1836         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1837           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1838           this might fix SIGSEGVs on MinGW...
1839         * src/SDCCopt.c (killDeadCode): restored original behaviour
1840           (volatile operands might get thrown away though)
1841
1842 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1843
1844         * src/pic16/gen.c: fixed bug #1106975,
1845         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1846         pointer update, INTCON is saved, global interrupts are disabled and
1847         restored after updateing TOS.
1848         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1849         * added function attribute 'shadowregs' to take advantage of shadow
1850         registers,
1851         * added function attribute 'wparam' as an alternative to the wparam
1852         pragma,
1853         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1854         user declares a non-ISR function as 'shadowregs',
1855         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1856
1857 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1858
1859         * .version: bumped version number to 2.4.8
1860         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1861         pic16 port,
1862         * device/lib/pic16/libio/i2c/: I2C module support library,
1863         * device/include/pic16/i2c.h: I2C support library header,
1864         * device/lib/pic16/libc/stdio/: standard IO support sources,
1865         * (printf_small.c): printf_small() source, supports float print,
1866         * (printf_tiny.c): printf_tiny() source, does not support floats,
1867         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1868         enable global optimizations for entire library source, other
1869         Makefiles in the source tree are also modified to reflect this,
1870         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1871         function,
1872         * doc/sdccman.lyx: updated to reflect new changes,
1873         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1874         sym->onStack if-case,
1875         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1876         sbit, idata, _idata, xdata, _xdata,
1877         * added pragma library, to link an external library, (see doc),
1878         * removed command line options, --pomit-config-words, --pomit-ivt,
1879         --pleave-reset-vector,
1880         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1881         when calling assembler to reflect memory model used, also define
1882         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1883         reflect stack model used,
1884         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1885         on stack return NULL,
1886
1887 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1888
1889         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1890           of the operands is volatile. Fixes #1020220
1891
1892 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1893
1894         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1895         * (OptimizeRegUsage): make sure that there is really no other flow where
1896           the first pCode is used
1897
1898 2005-01-22 Raphael Neider <rneider AT web.de>
1899
1900         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1901           to fix #1106967 (pCode->seq are not set up correctly)
1902
1903 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1904
1905         * src/SDCCglue.c (glue): make sure code area is declared before the
1906         static initialization area.
1907
1908 2005-01-21 Raphael Neider <rneider AT web.de>
1909
1910         * device/lib/Makefile.in: fixed test for pic16 install dir
1911         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1912           optimizations
1913         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1914           added --optimize-goto compiler switch and pragma wparam documentation
1915         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1916         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1917           and PRODH closing bug #1071770 (peephole optimizer)
1918
1919 2005-01-19 Raphael Neider <rneider AT web.de>
1920
1921         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1922           cmdLine buffers (used when calling sdcpp...) are large enough
1923           (MAX_PATH=256 truncates arguments leading to system halts when
1924           used in MinGW...)
1925         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1926         * (genUminus): rewritten to for efficiency
1927         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1928           used uninitialized in some cases)
1929         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1930           copy the third byte from the int -- now assumes 0x80 (data memory)
1931         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1932           operands (genAddLit expects the iCode's operands to swapped as
1933           well), fixed leftover bytes (crashed for short left operands)
1934         * (pic16_genMinusDec): performance improvements, removed false
1935           PIC14 emitSKPNCs
1936         * (pic16_genMinus): fixed to cope with differently sized operands
1937         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1938           for --obanksel > 1
1939         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1940         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1941           new banksel optimization
1942         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1943           analysis for temporary registers (segfaults...)
1944         * src/pic16/peeph.def: added rule
1945
1946 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1947
1948         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1949         which converts a float number to its ASCII representation
1950         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1951         functions to convert the fractional and integer part of a float to ASCII,
1952         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1953         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1954         ram
1955         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1956         _STATMEM macros,
1957         * device/include/pic16/adc.h: added GPL info,
1958         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1959         a pCodeOp as tested operand,
1960         * (genNearPointerGet): optimized bit testing, does not use
1961         intermediate register for bit value, test directly instead with
1962         BTFSS, BTFSC, works only for single bits,
1963         * (genpic16Code): dump the name of the iCode in the asm,
1964         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1965         renamed to pic16_decodeOp,
1966         * (serialRegAssign): do not allocate a temporary register for iCode
1967         sequences that test a single bit for 1/0
1968
1969 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1970
1971         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1972         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1973         access stack and frame pointers. They are initially assigned to
1974         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1975         accessing SFRs. Updated all occurences of modification of stack or
1976         frame pointer in gen.c and pcode.c,
1977         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1978         assigning of a literal value to pointers,
1979         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1980         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1981         selected
1982
1983 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1984
1985         * doc/sdccman.lyx: update documentation about stack pragma, added
1986         some info for stack memory models
1987
1988 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1989
1990         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1991
1992 2005-01-08 Raphael Neider <rneider AT web.de>
1993
1994         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1995           udata sections to fix bug #1097823
1996
1997 2005-01-05 Raphael Neider <rneider AT web.de>
1998
1999         * src/pic16/gen.c (genGenericShift): added handling of differently
2000           sized left operand and result
2001
2002 2005-01-04 Raphael Neider <rneider AT web.de>
2003
2004         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2005         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2006           to hold the condition bit)
2007         * added new version of genCmp (old code available via #define)
2008         * added new version of genShiftLeft/genShiftRight in a generic
2009           way, now supports shifting by negative values
2010         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2011           shiftCount (expected by genGenericShift)
2012         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2013         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2014           dump
2015         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2016           is an invalid literal too...)
2017
2018 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2019
2020         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2021         from Raphael Neider,
2022         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2023         for 8-bit literals. This fixes some literal operands which are sign
2024         extended to 16-bits ints when instruction needs only 8-bits.
2025
2026 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2027
2028         * device/lib/logf.c: added mcs51 assembly version
2029         * device/lib/expf.c: added mcs51 assembly version
2030         * device/lib/_logexpf.c: new shared asm code for expf and logf
2031         * device/include/math.h: add defines for assembly math library
2032         * device/lib/Makefile.in: build new _logexpf.c
2033         * device/lib/libfloat.lib: use new _logexpf.c
2034
2035 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2036
2037         * src/pic/device.c
2038         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2039           device types which have less than 0x7f registers.
2040
2041 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2042
2043         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2044
2045 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2046
2047         * device/lib/printf_fast.c: only build on supported arch.
2048         * device/lib/printf_tiny.c: only build on supported arch.
2049         * device/lib/printf_fast_f.c: only build if asm float lib
2050         * device/lib/_fsget1arg.c: only build if asm float lib
2051         * device/lib/_fsget2args.c: only build if asm float lib
2052         * device/lib/_fsnormalize.c: only build if asm float lib
2053         * device/lib/_fsreturnval.c: only build if asm float lib
2054         * device/lib/_fsrshift.c: only build if asm float lib
2055         * device/lib/_fsswapargs.c: only build if asm float lib
2056         * device/include/stdio.h: don't provide print_fast,
2057           print_fast_f, print_tiny prototypes if --xstack used
2058
2059 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2060
2061         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2062         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2063           to the SOURCES
2064
2065 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2066
2067         * device/lib/printf_fast_f.c: same as printf_fast, but
2068           with floating point enabled
2069         * device/lib/printf_fast.c: minor tweaks
2070         * device/include/stdio.h: add printf_fast_f
2071
2072 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2073
2074         * src/SDCCmain.c: make --float-reent default for mcs51
2075         * device/lib/_fsadd.c: added mcs51 assembly version
2076         * device/lib/_fssub.c: added mcs51 assembly version
2077         * device/lib/_fsmul.c: added mcs51 assembly version
2078         * device/lib/_fsdiv.c: added mcs51 assembly version
2079         * device/lib/_fseq.c: added mcs51 assembly version
2080         * device/lib/_fsneq.c: added mcs51 assembly version
2081         * device/lib/_fsgt.c: added mcs51 assembly version
2082         * device/lib/_fslt.c: added mcs51 assembly version
2083         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2084         * device/lib/Makefile.in: add _fscmp to build
2085         * device/lib/libfloat.lib: add _fscmp to build
2086
2087 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2088
2089         * device/lib/_fs2slong.c: added mcs51 assembly version
2090         * device/lib/_fs2sint.c: added mcs51 assembly version
2091         * device/lib/_fs2schar.c: added mcs51 assembly version
2092         * device/lib/_fs2ulong.c: added mcs51 assembly version
2093         * device/lib/_fs2uint.c: added mcs51 assembly version
2094         * device/lib/_fs2uchar.c: added mcs51 assembly version
2095         * device/lib/_slong2fs.c: added mcs51 assembly version
2096         * device/lib/_sint2fs.c: added mcs51 assembly version
2097         * device/lib/_schar2fs.c: added mcs51 assembly version
2098         * device/lib/_ulong2fs.c: added mcs51 assembly version
2099         * device/lib/_uint2fs.c: added mcs51 assembly version
2100         * device/lib/_uchar2fs.c: added mcs51 assembly version
2101         * device/include/float.h: added #define to select asm vs c
2102
2103 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2104
2105         * device/lib/printf_fast.c: improvements to float output
2106         * device/include/float.h: add defines for assembly float library
2107         * device/lib/_fsget1arg.c: receive 1 float arg
2108         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2109         * device/lib/_fsnormalize.c: normalize a float
2110         * device/lib/_fsreturnval.c: return float, various helper routines
2111         * device/lib/_fsrshift.c: right shift a float's mantissa
2112         * device/lib/_fsswapargs.c: swap 2 floats
2113         * device/lib/Makefile.in: build these 6 new files for mcs51
2114         * device/lib/libfloat.lib: add these 6 files to the library
2115
2116 2004-12-26 Borut Razem <borut.razem AT siol.net>
2117
2118         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2119           built by gcc 3.4.2
2120
2121 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2122
2123         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2124           and fully reentrant and register bank neutral.
2125         * device/lib/printf_fast.c: added float (not enabled by default),
2126           added compact/slower integer (also not enabled by default),
2127           improved size/speed of fast integer code, other minor changes
2128         * device/include/stdio.h, device/lib/Makefile.in,
2129           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2130
2131 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2132
2133         * src/pic16/pcode.c: declaring variables other than at the start of a
2134           block is not supported in C by VC6.
2135
2136 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2137
2138         * applied a previous patch from Raphael Neider that wasn't included
2139         in the previous commits, which fixes infinite loops within jumptable
2140         improvements,
2141         * made some fixes that previous patches introduced
2142
2143 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2144
2145         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2146         that fixes an issue with AOP_PCODE asmop's offset,
2147         * (pic16_popCopyReg): update instance field too,
2148         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2149         function of pic port,
2150         * (genCmp, genAnd, genAssign),
2151         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2152
2153 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2154
2155         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2156         variables initial values to idata section,
2157         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2158         variables in some functions. This utilizes parmBytes field of iCode
2159         structure to hold the offset of the variable in stack. (might be
2160         able to use the stack field too?)
2161         * applied patch from Raphael Neider # ### , # ###
2162         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2163         variable initial values in idata section,
2164         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2165         for static variables with initial value
2166         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2167         applied fix in while loop from Raphael Neider.
2168
2169 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2170
2171         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2172         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2173         * src/ds390/ralloc.c (serialRegAssign): spill bits
2174         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2175         * support/Util/SDCCerr.c,
2176         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2177         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2178         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2179
2180 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2181
2182         * device/include/sdcc-lib.h: inserted LGPL, added includes
2183           asm/ds390/features.h and asm/mcs51/features.h
2184         * device/include/asm/default/features.h,
2185         * device/include/asm/gbz80/features.h,
2186         * device/include/asm/z80/features.h: added empty _AUTOMEM
2187           and _STATMEM
2188         * device/include/asm/ds390/features.h,
2189         * device/include/asm/mcs51/features.h: added files with defines for
2190           _AUTOMEM and _STATMEM indicating automatic and static storage class
2191         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2192         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2193         * src/SDCCicode.c (geniCodeCast),
2194         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2195         * src/SDCCloop.c (loopInduction): removed unused variable lr
2196         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2197           to convertToFcall to include char modulo (RFE 1065037), added check
2198           if left operand is unsigned and use abs of literal value
2199         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2200           as it doesn't work after conversion from peephole.def to peephole.rul
2201         * src/mcs51/gen.c (toBoolean): added check for size,
2202           (genModOneByte): optimized code for signed char modulo a literal
2203           power of 2 (thanks to Hubert Sack),
2204           (genRRC): removed unnecessary "clr c",
2205           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2206         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2207           jump optimization,
2208           swapped rules 256.c and 256.d,
2209           extended 256.d by using new multiple checks (thanks Erik),
2210           added rules 256.e and 256.f,
2211           updated rule 261.a and 261.b to new generated code
2212         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2213
2214 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2215
2216         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2217           induction related bugs, including first part of bug #1074377
2218
2219 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2220
2221         * applied patch from bug-report #1076292,
2222         * applied patches for genAnd and Goto-optimizations for Raphael
2223         Neider,
2224         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2225         dump a less iCode information,
2226         * src/pic16/device.h (pic16_options_t): added field debgen,
2227         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2228         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2229         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2230         puclic,
2231         * (various functions): added macros FENTRY and FENTRY2 to functions,
2232         to emit function prologue,
2233         * (various functions): fixed indentation,
2234         * (genNearPointerGet): fixed loading of FSR0,
2235         * (genPackBits): applied patch from Raphael Neider to fix updating
2236         of FSR0 and touching only the modified bits,
2237         * src/pic16/genarith.c (various functions): added macros FENTRY to
2238         emit function prologue in comments,
2239         * src/pic16/pcode.h: added functions debugf2, debugf3,
2240         * src/pic16/ralloc.c: partial fix for packForPush caused
2241         segmentation fault,
2242
2243 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2244
2245         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2246           <stsp AT users.sourceforge.net> with reversed byte order
2247         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2248
2249 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2250
2251         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2252           bug #1074377
2253         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2254         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2255
2256 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2257
2258         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2259
2260 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2261
2262         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2263           conditions,
2264           (setFromConditionArgs): friendly operand parser for peephole rules,
2265           (operandBaseName, operandsNotRelated): new peephole condition
2266           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2267           architecture specific register naming into account, handles n-way
2268           comparisons, and supports quoted literals
2269         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2270
2271 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2272
2273         * src/mcs51/peeph.def: fixed bug #1076940
2274
2275 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2276
2277         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2278
2279 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2280
2281         Adding support for replacing ljmps with sjmps in jumptables
2282         generated for switch statements. For now you need to set the
2283         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2284         Now 4 algorithms for mcs51 jumptable generation are used:
2285         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2286         addresses loaded pc-relative for up to 112 cases and stack-pushing
2287         target addresses loaded with offset from dptr for up to 256 cases.
2288
2289         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2290         * src/mcs51/main.c: adapted constants for switch table generation
2291         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2292
2293 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2294
2295         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2296         * support/regression/tests/bug1057979.c: added test for bug 1073386
2297
2298 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2299
2300         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2301         compilers
2302
2303 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2304
2305         * src/pic16/device.h,
2306         * src/pic16/genarith.c,
2307         * src/pic16/glue.c,
2308         * src/pic16/main.c,
2309         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2310
2311 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2312
2313         Large cummulative patch for pic16 port.
2314         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2315         to call when a stack overflow occurs,
2316         * (malloc.h): added CVS Id tag,
2317         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2318         variable,
2319         * added libc directory. The current version of LibC contains string
2320         functions, ctype functions and macros and some functions of the
2321         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2322         be extensively tested in the future. Standard disclaimer here.
2323         Library is not automatically build yet. But one can build it by
2324         invoking 'make' inside the libc directory.
2325         * added ADC library under libio. Preliminary version yet.
2326
2327         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2328         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2329         aopForRemat() now and not by pic16_aopOp(),
2330         * (pic16_popGetTempReg): removed warning messgae when allocating
2331         temporary registers, its a buggy feature and will be removed,
2332         * (pic16_popGet): set register instance field in AOP_CRY,
2333         * (pic16_outBitC): fixed for results in size greater than 1,
2334         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2335         * (pic16_storeForReturn): optimized return of 0,
2336         * (genCmp): experimental code for new genCmp which uses PIC18's
2337         special compare&skip instructions. Initial tests fail some times
2338         with variables grater than 1 byte in size, so new code is disabled,
2339         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2340         a single bit,
2341         * (genCast): began a fix to optimize the casting of a bit to another
2342         bit, now assigning a bitfield to another bitfield will fail, sorry,
2343         * src/pic16/main.c: disabled the use of lr-support feature,
2344         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2345         * added some function prototypes, added function _debugf prototype,
2346         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2347         bits with offset (case PO_GPR_BIT),
2348         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2349         command line,
2350         * (isBankInstruction): modified to return 0 for no banking instruction,
2351         and 1 for banking instruction,
2352         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2353         caused stop processing pCodes after a inline assembly block,
2354         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2355         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2356         registers when it shouldn't,
2357         * src/pic16/ralloc.c (allocReg): add preliminary support for
2358         supporting a limited set of temporary registers,
2359
2360 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2361
2362         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2363           genDataPointerSet): ensure assignments always copy in MSB to LSB
2364           order,
2365           (loadRegFromAop): recognize CLRH optimization,
2366           (genFunction): optimize RECEIVE iCodes in reentrant functions
2367
2368 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2369
2370         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2371           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2372           selected.
2373         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2374         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2375           contiguous with data
2376
2377 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2378
2379         * device/lib/_gptrget.c (_gptrget),
2380         * device/lib/_gptrgetc.c (_gptrgetc),
2381         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2382           instead of sjmp to ret
2383         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2384           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2385
2386 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2387
2388         * .version: bumped version to 2.4.7
2389         * device/lib/_gptrget.c (_gptrget): is now _naked
2390         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2391         * device/lib/_gptrput.c (_gptrput): is now _naked
2392         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2393           (createFunction): fixed xstack
2394         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2395         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2396           or bit either,
2397           (geniCodeCritical): store original interrupt state in an iTemp bit
2398           var unless stack-auto
2399         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2400         * src/SDCCmain.c (setIncludePath): added include/target to search path
2401         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2402         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2403           prototype,
2404           (processFuncArgs): put bit vars in bit area
2405         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2406           unsaveRBank): fixed xstack,
2407           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2408           (genFunction, genEndFunction): fixed xstack,
2409           (genAssign): optimization don't walk backwards through mem
2410         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2411         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2412         * support/regression/Makefile: also make library (for stack-auto) when
2413           making "all" and added "test-mcs51-xstack-auto"
2414         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2415         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2416         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2417         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2418         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2419           make-library by MAKE_LIBRARY
2420         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2421           regression tests for xstack
2422         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2423         * support/regression/tests/critical.c: test for critical on mcs51
2424
2425 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2426
2427         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2428           built version of sdcc instead of installed version
2429
2430 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2431
2432         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2433         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2434           vprintf.c now
2435         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2436         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2437           WARNING: remove device/lib/build/z80/printf.o by hand when
2438           updating from previous build!
2439         * device/lib/z80/printf.c: updated comment
2440         * support/regression/tests/bug1057979.c: test all ports now
2441         * support/regression/tests/bug1065458.c: file added
2442
2443 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2444
2445         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2446           *_start and *_end symbols for static functions
2447
2448 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2449
2450         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2451           and search crt0.o in all library paths,
2452           (setIncludePath): proper handling of --nostdinc,
2453           (setLibPath): proper handling of --nostdlib
2454         * support/regression/Makefile,
2455         * support/regression/ports/ds390/spec.mk,
2456         * support/regression/ports/gbz80/spec.mk,
2457         * support/regression/ports/hc08/spec.mk,
2458         * support/regression/ports/mcs51/spec.mk,
2459         * support/regression/ports/mcs51-large/spec.mk,
2460         * support/regression/ports/mcs51-stack-auto/spec.mk,
2461         * support/regression/ports/z80/spec.mk: use include and lib files from
2462           built version of sdcc instead of installed version
2463         * doc/sdccman.lyx: fixed typo in --nostdinc
2464
2465 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2466
2467         * src/pic/pcode.c,
2468         * src/pic/device.c,
2469         * src/pic/ralloc.c,
2470         * src/pic/gen.c : added support to generate code for struct bit fields.
2471
2472 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2473
2474         * as/xa51/xa_version.h,
2475         * device/include/errno.h,
2476         * device/include/regc515c.h,
2477         * device/lib/_itoa.c,
2478         * device/lib/_ltoa.c,
2479         * device/lib/ser_ir_cts_rts.c,
2480         * sim/ucsim/xa.src/glob.cc,
2481         * sim/ucsim/xa.src/inst_gen.cc,
2482         * sim/ucsim/xa.src/xa_bit.cc,
2483         * sim/ucsim/xa.src/xa_sfr.cc,
2484         * sim/ucsim/z80.src/inst_dd.cc,
2485         * sim/ucsim/z80.src/inst_fdcb.cc,
2486         * support/scripts/keil2sdcc.pl,
2487         * src/pic16/pic16.dsp,
2488         * src/pic16/pic16a.dsp: corrected cvs line endings
2489         * device/lib/printf_large.c: fixed bug 1057979
2490         * src/pic16/gen.c: fixed non-C standard code
2491         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2492         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2493         * support/regression/ports/mcs51/support.c: reload T1 asap
2494         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2495           pdata use and clear idata startup behaviour
2496         * support/regression/tests/bug1057979.c: added
2497
2498 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2499
2500         * device/examples/ds390/ow390/ad26.h,
2501         * device/examples/ds390/ow390/cnt1d.h,
2502         * device/examples/ds390/ow390/crcutil.c,
2503         * device/examples/ds390/ow390/ownet.h,
2504         * device/examples/ds390/ow390/owsesu.c,
2505         * device/examples/ds390/ow390/swt12.h,
2506         * device/examples/ds390/ow390/swtoper.c,
2507         * device/examples/ds390/ow390/temp10.h,
2508         * device/examples/ds390/ow390/thermodl.c,
2509         * device/examples/ds390/tinitalk/tinitalk.dsp,
2510         * device/examples/ds390/tinitalk/tinitalk.dsw,
2511         * device/examples/mcs51/clock/hw.h,
2512         * device/examples/mcs51/simple2/go.bat,
2513         * device/examples/serialcomm/windows/serial.h,
2514         * device/examples/xa51/dummy.c,
2515         * device/examples/xa51/hello.c,
2516         * device/include/80c51xa.h,
2517         * device/include/at89x051.h: corrected cvs line endings
2518
2519 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2520
2521         * src/pic16/main.c (options): added command line --gstack, to trace
2522         stack over/under flows,
2523         * added pragma 'wparam' to allow passing first byte of function
2524         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2525         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2526         call to __gstack_test function and sets up the symbol as extern,
2527         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2528         * popaop): added call to pic16_testStackOverflow,
2529         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2530         wparamList list,
2531         * (genCall, genPcall): now all parameters are passed via stack
2532         except in functions that are pass to wparam pragma in which WREG is
2533         used too,
2534         * (genPcall): REENTRANT flag is checked to see if variable prototype
2535         contains reentrant keyword, don't call a non-reentrant function, via
2536         a reentrant function pointer or vice versa, functions are never
2537         passed via WREG,
2538         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2539         D.Winkler,
2540         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2541         SIGSEGV when accessing a NULL register stucture,
2542         * (pic16_printGPointerType): modified to handle UPPER modifier for
2543         function initializers, changed prototype of function to simpler one,
2544         * (pic16_printIvalFuncPtr): check to see if function is already
2545         added in externs list,
2546         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2547         optimized a move from W to SFR with a move to the same register
2548         later after a CALL,
2549         * device/lib/pic16/debug: NEW directory, contains debug features
2550         which are enabled when linking with libdebug.lib, currently command
2551         line option --gstack enables stack pointer tracing for over/under
2552         flow, corresponding sources are in debug/gstack
2553
2554 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2555
2556         * doc/sdccman.lyx: updated SDCC version,
2557         * (PIC16 port): update list of command line options,
2558         * src/pic16/device.h (structure pic16_options_t): added field gstack
2559         to enable stack overflow tracing on push/pops,
2560         * src/pic16/device.c (statistics structure): added statistics
2561         structure,
2562         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2563         pic16_dump_int_registers): increase statistics counters for each
2564         * variable which is encountered
2565         * (pic16_dump_usection): emit each .udata variable to its own udata
2566         section,
2567         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2568         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2569         parameters via stack, otherwise use old scheme,
2570         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2571         assembler output file,
2572         * src/pic16/main.c: added command line options --gstack to enable
2573         push/pop tracing for stack overflow,
2574         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2575         instructions): added size of each instruction,
2576         * (pic16_countInstruction): estimate size of instructions in
2577         the_pFile list, inline assembly blocks are not counted,
2578         * (pic16_FixRegisterBanking): trace previous register usage, when
2579         banksel optimizations is greater than 0, don't emit a redudant
2580         banksel directive,
2581
2582 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2583
2584         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2585         * src/pic16/ralloc.c : applied same fix for pic16.
2586         * src/pic/gen.c : tidied it up a little.
2587
2588 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2589
2590         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2591         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2592
2593 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2594
2595         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2596
2597 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2598
2599         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2600         non-reentrant function __modsint in the interrupt function (thus
2601         corrupting math operations during serial I/O)
2602         * device/lib/ser_ir.c: as above, changed buffersize
2603         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2604         256.c,d for zeroing
2605         * doc/Makefile: added option -t for rsync
2606
2607 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2608
2609         * src/SDCCast.h (struct ast),
2610         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2611
2612 2004-10-20 Borut Razem <borut.razem AT siol.net>
2613
2614         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2615         package
2616
2617 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2618
2619         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2620         makefile targets,
2621         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2622         support functions to replace long sequences of MOVFF's from access
2623         bank registers to stack and vice versa,
2624         * src/pic16/device.h: added new field opt_flags, where optimization
2625         flags can be set to enable certain features,
2626         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2627         * pBlock, (genFunction, genEndFunction): surroung loop for
2628         saving/loading used registers in stack with PC_INFO pCodes,
2629         INF_LREGS. Code in between can then be optimized by pCode optimizer
2630         to support function calls,
2631         * (genDataPointerSet): fixed bug which loaded float fields in
2632         structures with corrupt data,
2633         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2634         in a standard way debug info on stderr. Feature used for developing
2635         and debugging only,
2636         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2637         obsolete chunks of code,
2638         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2639         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2640         * pic16/src/pcode.c (pic16_newpCodeInfo,
2641         * (pic16_newpCodeOpLocalRegs),
2642         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2643         feature,
2644         * (pic16_pCodeConstString): printing of the initial value of a
2645         symbol as a comment is inhibited since parsing was already done by
2646         copyStr and output is corrupt,
2647         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2648
2649 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2650
2651         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2652
2653 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2654
2655         * as/mcs51/lkarea.c: removed old K&R style,
2656           (lnksect): changed check on boundary error,
2657           (lnksect2): changed check on boundary error,
2658           (lnksect2): extend XSTK to end of page if size = 1
2659         * as/mcs51/lkmain.c: removed old K&R style,
2660           (Areas51): create l_IRAM symbol
2661         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2662         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2663           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2664         * device/lib/_mullong.c: added version to be compiled with xstack
2665         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2666         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2667         * device/lib/mcs51/crtxstack.asm: fixed comment
2668         * src/SDCCglue.c: maxInterrupts defaults to 0,
2669           (emitMaps): added pdata,
2670           (createInterruptVect): (re)moved default,
2671           (glue): added pdata,
2672           (glue): moved __start__xstack to XSTK with default size 1
2673         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2674           and options.float_rent when options.stackAuto is set,
2675           (linkEdit): only write XDATA_NAME if provided on command line
2676         * src/SDCCmem.h,
2677         * src/SDCCmem.c: added pdata
2678         * src/port.h: added pdata_name to PORT
2679         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2680           (saveRegisters, unsaveRegisters): removed usage of B,
2681           (genMinus): fixed accumulator clash,
2682           (genJumpTab): added comment, this needs another look
2683         * src/mcs51/gen.c: added check for "B in use" paranoia,
2684           added pushB() and popB()
2685         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2686           chance
2687         * src/avr/main.c,
2688         * src/ds390/main.c,
2689         * src/hc08/main.c,
2690         * src/mcs51/main.c,
2691         * src/pic/main.c,
2692         * src/pic16/main.c,
2693         * src/xa51/main.c,
2694         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2695           added PSEG (PAG,XDATA) or NULL to port specifier
2696         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2697         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2698           (_mcs51_genInitStartup): removed __start__xstack equ,
2699           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2700         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2701         * src/z80/gen.c (_rleAppend): fixed warnings
2702         * support/regression/tests/zeropad.c: added pdata test
2703         * .version: bumped to 2.4.6
2704
2705 2004-10-17 Borut Razem <borut.razem AT siol.net>
2706
2707         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2708         as a part of nightly build
2709
2710 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2711
2712         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2713         WREG holds the first byte function parameters,
2714         * (aopForSym): take special case for symbols which are in FARSPACE
2715         but in CODESPACE too,
2716         * (assignResultValue): modified to take into account _G.useWreg,
2717         * (genCall): don't use wreg for parameter passing when function is
2718         declared as reentrant, too, added optimization INCF to stack
2719         pointer when stack parameter count is 1,
2720         * (genFunction, genEndFunction): refurnished and fixed to not using
2721         wreg for passing parameters when function has varargs or is
2722         reentrant, fixed bug with symbol name compare for generating
2723         functions in absolute address,
2724         * (pic16_storeForReturn): refurnished,
2725         * (genCmp): began writing a new version of the function, not ready
2726         yet, therefore it is disabled,
2727         * (genAssign): do not read code memory when assigning a function to
2728         a pointer function,
2729         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2730         array of characters, not pointer,
2731         * (pic16initialComments): in debug mode emit an .ident directive for
2732         the assembler,
2733         * (_process_pragma): emit a new warning type (internal to pic16)
2734         when setting stack to default length, emit a similar warning when
2735         placing a function at absolute address and address is not word aligned
2736         * (_pic16_parseOptions): added 'return TRUE' statement,
2737         * (_pic16_linkEdit): if compiling a source, then add the source's
2738         file object, first in the list of objects to link,
2739
2740 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2741
2742         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2743         * src/pic/main.c : removed VC warning.
2744         * src/pic/gen.c : changed comment.
2745
2746 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2747
2748         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2749         reference to a deprecated symbol _GPTRREG was causing failure to
2750         link. Thanks G. M. Gallant for the info.
2751
2752 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2753
2754         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2755         comments for Bugs item #954788.
2756
2757 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2758
2759         * src/pic16/device.c (pic16_dump_gsection,
2760         * pic16_groupRegistersInSection): handle symbols declared to be in
2761         access bank differently,
2762         * src/pic16/gen.c (struct _G): added field resDirect,
2763         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2764         send values read from stack directly to result and don't allocate
2765         temporary values,
2766         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2767         same registers,
2768         * (pic16_sameRegsOfs): NEW,
2769         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2770         free because they were not allocated from temporary pool,
2771         * pic16_popRegFromString): workaround to fix a problem with
2772         allocating variables twice or never,
2773         * (genGenPointerGet): using PRODL instead of FSR0H,
2774         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2775         instead of FSR0H,
2776         * (genAssign): take advantage of the _G.resDirect flag,
2777         * (genCast): around line 11844, use mov2f instead of directly
2778         MOVFF'ing between operands to account for literal values,
2779         * src/pic16/genutils.c: some new debug functions for gpsim have been
2780         added,
2781         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2782         float with integer part only,
2783         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2784         place variables in access bank
2785         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2786         updated sources to reflect recent changes in gen.c
2787
2788 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2789
2790         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2791         sources that searched for headers in installation path, now the
2792         device/include/pic16 is used,
2793         * src/pic16/glue.c (pic16glue),
2794         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2795         .line directives if not in debug mode, this suppresses assembler's
2796         warnings for ignored directives
2797
2798 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2799
2800         * src/port.h: made reset_regparms prototype void parameter explicit.
2801         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2802         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2803         * doc/sdccman.lyx: documented warning disabling and how to use
2804           printf_large to make it print floats.
2805         * device/include/stdbool.h: NEW
2806         * device/lib/_atof.c,
2807         * device/lib/_divuint.c,
2808         * device/lib/_divulong.c,
2809         * device/lib/expf.c,
2810         * device/lib/printf_large.c,
2811         * device/lib/sincosf.c,
2812         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2813         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2814           a completely reentrant lib.
2815
2816 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2817
2818         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2819         * device/include/pic16/stdio.h: fixed bug with colon
2820
2821 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2822
2823         * device/include/pic16/stdio.h,
2824         * device/include/pic16/stdlib.h,
2825         * device/include/pic16/math.h: NEW
2826         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2827         declared as _naked to reduce overhead
2828         * device/lib/Makefile.in (target port-specific-objects-pic16):
2829         changed * to *.* so to ignore the CVS directory,
2830         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2831         stacked variables back in stack,
2832         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2833         corruption
2834
2835 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2836
2837         * .version: bumped version number to 2.4.5
2838         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2839         * support/Util/SDCCerr.c (messages structure): added entry for
2840         W_POSSBUG2
2841
2842         Large cumulative patch for pic16 port and libraries.
2843         * device/include/pic16/sdcc-lib.h,
2844         * device/include/pic16/stdarg.h,
2845         * device/include/asm/pic16/features.h,
2846         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2847         * device/include/pic16/float.h: changes reentrant keyword with
2848         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2849         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2850         updated target build-libraries to include objects from gptr,
2851         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2852         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2853         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2854         all function headings,
2855         * src/SDCCmain.c: added global parameter userIncDirsSet,
2856         * (parseCmdLine): when option -I is encountered add directory to
2857         userIncDirsSet too,
2858         * src/version.awk: added space between control and long,
2859         * src/pic16/NOTES: added some notes for the port,
2860         * src/pic16/gen.c: added prototype for mov2fp function,
2861         * (fReturnpic16[]): properly named return value registers,
2862         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2863         * (aopForSym): added code to handle symbols with onStack flag set,
2864         symbols onStack are allocated PTRSIZE bytes,
2865         * (aopFreeAsmop): handles special case where asmops are stack objects,
2866         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2867         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2868         added argument lock to trace flaws in allocating temporary registers
2869         when developing port,
2870         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2871         * (pic16_popRegFromString): reenabled allocating a direct register
2872         from string,
2873         * (assignResultValue): various beautifications,
2874         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2875         referenced function argument,
2876         * (genIpush): reenabled to allow stacked arguments, handles only
2877         ic->parmPush iCodes,
2878         * (genCall, genPcall): major changes to allow for variable argument
2879         functions, fixed a bug with falsely restoring stack pointer after
2880         returning from call,
2881         * (genFunction): pending code for critical function,
2882         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2883         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2884         * (genNearPointerGet): fixed bug with indirect reading, was always
2885         reading from INDF0
2886         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2887         pointers,
2888         * (genAddrOf): rewrote code to take address of a stacked function parameter
2889         * (genCast): fixed casting to generic pointer type,
2890         * src/pic16/gen.h: added AOP_STA,
2891         * (struct asmop): added field stk,
2892         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2893         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2894         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2895         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2896         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2897         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2898         generic pointers,
2899         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2900         and library paths,
2901         * (pic16_port structure): generic pointer size is set to 3,
2902         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2903         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2904         compiler warning,
2905         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2906         operand is an iTemp,
2907
2908 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2909
2910         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2911         * debugger/mcs51/simi.c: addapt new syntax of s51
2912
2913 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2914
2915         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2916         * src/pic16/pcode.c: commented out some calls to free() in order to
2917         fix bug #989576,
2918
2919 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2920
2921         * src/SDCCicode.h,
2922         * src/SDCCicode.c (isiCodeInFunctionCall),
2923         * src/avr/ralloc.c (selectSpil),
2924         * src/pic/ralloc.c (selectSpil),
2925         * src/pic16/ralloc.c (selectSpil),
2926         * src/ds390/ralloc.c (selectSpil),
2927         * src/hc08/ralloc.c (selectSpil),
2928         * src/xa51/ralloc.c (selectSpil),
2929         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2930         stack in the middle of a function call sequence (fixes bug #1020268)
2931         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2932         costs associated with the minimum switch case.
2933
2934 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2935
2936         * src/SDCC.lex: fixed bug #1030549
2937
2938 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2939
2940         * src/SDCCcse.h (struct cseDef),
2941         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2942         over a function call if the CSE is derived from a symbol whose
2943         address has been taken (fixes bug #1029883)
2944         * support/regression/tests/bug-1029883: a new regression test for
2945         this bug
2946
2947 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2948
2949         * src/hc08/gen.c (emitinline): fixed bug #1029778
2950         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2951         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2952         and starts toward RFE #905167)
2953
2954 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2955
2956         * src/pic16/gen.c (mov2f): New function to move an operand to
2957         another without considering if it is a literal or a register,
2958         * (pic16_sameRegs): don't check if they are both AOP_REG,
2959         * (AccRsh): removed andmask=0 lines,
2960         * (genLeftShift): duplicated to be improved in future versions,
2961         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2962         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2963         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2964         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2965         * (insertBankSwitch): fixed inserting banksel directives algorithm
2966         for instructions that follow a skip instruction, this fixes a report
2967         for broken subtraction code generation,
2968         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2969         iCode is a left op, just in case result and right share the same
2970         registers
2971
2972 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2973
2974         * src/hc08/main.c,
2975         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2976         preservation of HX
2977         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2978         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2979         on 2004-09-12; it was buggy
2980
2981 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2982
2983         * src/SDCCsymt.h: removed RESULT_CHECK
2984         * src/SDCCast.c,
2985         * src/SDCCglue.c,
2986         * src/SDCCval.c,
2987         * src/pic/glue.c,
2988         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2989
2990 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2991
2992         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2993         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2994         configuration values no more rejected by compiler, they are assigned
2995         to configuration registers with a warning message instead,
2996         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2997         the for-loop so last conf register is emitted too,
2998         * (_pic16_initPaths): link library libsdcc.lib by default,
2999         * (_hasNativeMulFor): modified test for multiplication according to
3000         Raphael Neider's remarks. Integer multiplication is also done with
3001         support functions,
3002         * device/include/pic16/pic18fregs.h: corrected type error in while
3003         testing and including 18f6720 header file
3004
3005 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3006
3007         * src/pic16/device.h (pic16_options): removed field use_crt,
3008         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3009         until an optimization to handle single bits is added,
3010         * (pic16_loadFSR0): moved before genUnpackBits,
3011         * (genAnd): some white lines removed,
3012         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3013         leave_reset flags in pic16_options when using crt modules,
3014
3015 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3016
3017         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3018           for bugs 898889 & 979599. Also used some safer print instructions.
3019
3020 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3021
3022         * src/pic16/device.h (pic16_options_t): added field use_crt,
3023         crt_name, no_crt,
3024         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3025         catch a probable future bug,
3026         * src/pic16/gen.c: aopIdx function commented out,
3027         * (genAssign): commented out old code which used aopIdx,
3028         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3029         code, added if conditionals to take into account the --use-crt
3030         command line options,
3031         * src/pic16/main.c (pic16_optionsTable): added new command line
3032         options, --use-crt= and --no-crt,
3033         * (_pic16_linkEdit): now the proper crt object is added in the
3034         linker command line except than when --no-crt is specified,
3035         * src/pic16/pcode.c,
3036         * src/pic16/pcode.h: added some structures and functions for a new
3037         optimization scheme to compansate for instruction overhead between
3038         same iCodes, this scheme is currently under development and is not
3039         working in any way,
3040         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3041         to && operator,
3042         * device/lib/pic16/startup/crt0i.c,
3043         * device/lib/pic16/startup/crt0iz.c: added global char variable
3044         __uflags to force the generation of an idata section
3045
3046 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3047
3048         * doc/Makefile,
3049         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3050         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3051
3052 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3053
3054         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3055         Frieder) and clarified the default code optimization mode
3056
3057 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3058
3059         * src/SDCC.lex (doPragma, process_pragma),
3060         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3061         "opt_code_size", and "opt_code_balanced"
3062         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3063         regrouped options by category, added support for category headers
3064         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3065         and "--opt-code-size"
3066         * doc/sdccman.lyx: documented these new options and pragmas
3067         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3068         preference into account
3069
3070 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3071
3072         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3073           geniCodePreDec): Fixed bug 904237 by generating a warning
3074         * src/SDCCerr.h,
3075         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3076
3077 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3078
3079         * src/pic/device.c : When no max ram set validate full memory range.
3080         * src/pic/pcode.c,
3081         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3082
3083 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3084
3085         * device/lib/_gptrget.c,
3086         * device/lib/_gptrput.c: updated comment
3087         * device/lib/calloc.c,
3088         * device/lib/free.c,
3089         * device/lib/malloc.c,
3090         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3091         * src/SDCCcse.c (cseBBlock),
3092         * src/SDCCicode.c (printOperand, geniCodeArray),
3093         * src/SDCCicode.h (struct operand): fixed bug 868103
3094         * support/regression/tests/bug-868103.c: added
3095         * src/SDCCast.c (searchLitOp),
3096         * src/SDCCcse.h (struct cseDef),
3097         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3098         * src/SDCCicode.h (struct operand),
3099         * src/SDCCsymt.h (struct sym_link),
3100         * src/avr/gen.c (hasInc),
3101         * src/ds390/gen.c (hasInc),
3102         * src/hc08/gen.c (genPlusIncr, hasInc),
3103         * src/mcs51/gen.c (hasInc),
3104         * src/pic16/glue.c (pic16_printIvalChar),
3105         * src/pic16/ralloc.c (regWithIdx),
3106         * src/xa51/gen.c (hasInc) : removed warnings
3107         * src/SDCCast.c (createBlock): added comment ???
3108         * src/hc08/ralloc.c: updated comments
3109
3110 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3111
3112         * doc/sdccman.lyx: updated section on switch statements, added
3113         section about semaphore locking
3114         * doc/Makefile: added option -info for latex2html
3115         * device/lib/_gptrget.c,
3116         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3117
3118 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3119
3120         * src/pic/device.h,
3121         * src/pic/device.c,
3122         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3123          maxram is less than 0x100.
3124
3125 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3126
3127         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3128
3129 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3130
3131         * src/port.h,
3132         * src/mcs51/main.c,
3133         * src/ds390/main.c,
3134         * src/z80/main.c,
3135         * src/hc08/main.c,
3136         * src/pic/main.c,
3137         * src/pic16/main.c,
3138         * src/avr/main.c,
3139         * src/xa51/main.c
3140         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3141         a jump table is the best form for a switch statement, including
3142         automatic insertion of missing cases to make the case range
3143         continuous. Developed in collaboration with Frieder Ferlemann.
3144
3145 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3146
3147         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3148         accumulator result if it needs sign extension
3149
3150 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3151
3152         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3153
3154 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3155
3156         * device/lib/gbz80/printf.c,
3157         * device/lib/z80/printf.c: removed define for NULL
3158
3159 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3160
3161         * as/xa51/xa_link.c,
3162         * device/examples/ds390/ow390/ad26.c,
3163         * device/examples/ds390/ow390/cnt1d.c,
3164         * device/examples/ds390/ow390/counter.c,
3165         * device/examples/ds390/ow390/ds2480.h,
3166         * device/examples/ds390/ow390/ds2480ut.c,
3167         * device/examples/ds390/ow390/findtype.c,
3168         * device/examples/ds390/ow390/gethumd.c,
3169         * device/examples/ds390/ow390/owllu.c,
3170         * device/examples/ds390/ow390/ownetu.c,
3171         * device/examples/ds390/ow390/swt12.c,
3172         * device/examples/ds390/ow390/swtloop.c,
3173         * device/examples/ds390/ow390/temp.c,
3174         * device/examples/ds390/ow390/temp10.c,
3175         * device/examples/ds390/ow390/thermo21.c,
3176         * device/examples/ds390/ow390/tinilnk.c,
3177         * device/examples/ds390/ow390/tstfind.c,
3178         * device/examples/serialcomm/windows/serial.cpp,
3179         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3180         * device/include/reg51.h: fixed line endings for cvs
3181
3182 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3183
3184         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3185         packRegsForAccUse, packRegisters): new accumulator register
3186         packing algorithm
3187         * support/regression/ports/hc08/support.c (_putchar): suppress
3188         warning of unused variable
3189         * src/SDCCicode.c: added SWAP entry to codeTable
3190
3191 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3192
3193         * device/lib/sprintf.c: forgot to add this file before previous commit
3194
3195 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3196
3197         * src/pic16/gen.c (genPackBits): added operand right in function
3198         parameters, load result directly if p_type is POINTER (that is
3199         called by genNearPointerSet)
3200         * (genUnPackBits): added operand left in function parameters,
3201         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3202         FSR0 if accessing bitfields,
3203
3204 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3205
3206         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3207           _print_format; updated printf, sprintf, vsprintf
3208         * device/include/asm/default/features.h: corrected comment/define
3209         * device/lib/Makefile.in: added sprintf.c
3210         * device/lib/libsdcc.lib: added sprintf module
3211         * device/lib/printf_large.c,
3212         * device/lib/vprintf.c,
3213         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3214           into these 3 files
3215         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3216         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3217         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3218           hc08 test
3219         * support/regression/tests/zeropad.c: define idata as data for hc08
3220
3221 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3222
3223         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3224         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3225         labels are referenced at least once (even if a reference is not found)
3226         * src/hc08/gen.c (emitcode): set isComment flag for comments
3227         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3228         loads), rules 6a..6b (optimize jumps to return)
3229
3230 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3231
3232         * device/lib/acosf.c (acosf),
3233         * device/lib/asinf.c (asinf),
3234         * device/lib/atanf.c (atanf),
3235         * device/lib/ceilf.c (ceilf),
3236         * device/lib/cosf.c (cosf),
3237         * device/lib/coshf.c (coshf),
3238         * device/lib/cotf.c (cotf),
3239         * device/lib/fabsf.c (fabsf),
3240         * device/lib/floorf.c (floorf),
3241         * device/lib/log10f.c (log10f),
3242         * device/lib/logf.c (logf),
3243         * device/lib/sinf.c (sinf),
3244         * device/lib/sinhf.c (sinhf),
3245         * device/lib/sqrtf.c (sqrtf),
3246         * device/lib/tanf.c (tanf),
3247         * device/lib/tanhf.c (tanhf),
3248         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3249         replaced all instances of "reentrant" in the library functions
3250         defined in math.h with this macro.
3251         * support/regression/tests/float_trans.c: reenabled test for hc08
3252
3253 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3254
3255         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3256         erroneously deleted
3257
3258 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3259
3260         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3261         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3262         multi-byte volatile operands are used
3263         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3264         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3265         initialization to area GSINIT0 so that it would always precede
3266         any static initializers in GSINIT
3267         * support/regression/tests/zeropad.c: fixed idata define for hc08
3268         * support/regression/tests/bug-927659.c,
3269         * support/regression/tests/float_trans.c: disabled tests for hc08
3270         pending missing library routines
3271         * .version: increased version number to 2.4.4 - hc08 port now passes
3272         regression tests
3273
3274
3275 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3276
3277         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3278         * Makefile.common.in,
3279         * as/Makefile,
3280         * as/hc08/Makefile.in,
3281         * as/mcs51/Makefile.in,
3282         * as/z80/Makefile.in,
3283         * debugger/mcs51/Makefile.in,
3284         * device/include/Makefile.in,
3285         * device/lib/Makefile.in,
3286         * doc/Makefile,
3287         * link/Makefile,
3288         * link/z80/Makefile.in,
3289         * packihx/Makefile.in,
3290         * sim/ucsim/main_in.mk,
3291         * sim/ucsim/avr.src/Makefile.in,
3292         * sim/ucsim/doc/Makefile.in,
3293         * sim/ucsim/gui.src/serio.src/Makefile.in,
3294         * sim/ucsim/hc08.src/Makefile.in,
3295         * sim/ucsim/s51.src/Makefile.in,
3296         * sim/ucsim/xa.src/Makefile.in,
3297         * sim/ucsim/z80.src/Makefile.in,
3298         * src/Makefile.in,
3299         * support/cpp2/Makefile.in,
3300         * support/librarian/Makefile,
3301         * support/makebin/Makefile: added DESTDIR to the install path proposed
3302         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3303         * doc/sdccman.lyx: added DESTDIR documentation
3304
3305 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3306
3307         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3308         instruction for interrupt handlers, use fast returns when returning
3309         from high priority interrupts
3310
3311 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3312
3313         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3314         code generation
3315         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3316         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3317         bugs, ported much of Bernhard's code from mcs51
3318         * src/mcs51/gen.c (genSend),
3319         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3320         than one when calling a reentrant function
3321         * device/lib/_mullong.c: defined an alternate struct layout for big
3322         endian ports (hc08)
3323
3324 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3325
3326         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3327         test
3328
3329 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3330
3331         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3332         are sane and complete before asking the port its prefered parameter
3333         passing method (fixes bug #1017633)
3334         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3335         and _ret3
3336
3337 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3338
3339         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3340         problem in bitfields >= 8 bits.
3341
3342 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3343
3344         * src/SDCCsymt.c: undid changes that were not meant to be committed
3345
3346 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3347
3348         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3349
3350 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3351
3352         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3353           copied and wrong bit got inverted
3354
3355 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3356
3357         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3358         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3359         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3360         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3361         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3362         assignments to bitfields at known addresses
3363         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3364         reads from bitfields at known addresses
3365         * src/hc08/ralloc.c (packRegisters),
3366         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3367         genhc08Code): optimize pointer get values used as conditionals
3368         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3369         and branch
3370
3371 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3372
3373         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3374         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3375         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3376         as conditionals
3377
3378 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3379
3380         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3381
3382 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3383
3384         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3385         related problems
3386
3387 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3388
3389         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3390
3391 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3392
3393         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3394         mcs51 port
3395
3396 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3397
3398         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3399
3400 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3401
3402         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3403         cases use more compact code.
3404
3405 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3406
3407         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3408
3409 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3410
3411         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3412
3413 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3414
3415         * src/SDCCsymt.h,
3416         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3417         parameter of changePointer() from symbol* to sym_link*
3418         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3419         * src/SDCCsymt.c (compareType): void* type is castable to other
3420         pointers, but not necesarily an exact match.
3421         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3422         is no longer blindly treated as an exact match.
3423         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3424
3425 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3426
3427         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3428
3429 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3430
3431         * src/pic/gen.c,
3432         * src/pic/pcode.c,
3433         * src/pic/ralloc.h,
3434         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3435
3436 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3437
3438         * src/pic/device.c,
3439         * src/pic/device.h,
3440         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3441
3442 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3443
3444         * src/mcs51/gen.c (emitcode): fixed bug #992819
3445
3446 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3447
3448         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3449           there's no need to make it worse
3450
3451 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3452
3453         * src/mcs51/ralloc.c (deassignLR),
3454         * src/ds390/ralloc.c (deassignLR),
3455         * src/hc08/ralloc.c (deassignLR),
3456         * src/z80/ralloc.c (deassignLR),
3457         * src/pic/ralloc.c (deassignLR),
3458         * src/pic16/ralloc.c (deassignLR),
3459         * src/avr/ralloc.c (deassignLR),
3460         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3461         rlivePoint): fixed another part of bug #971834
3462
3463 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3464
3465         * src/z80/main.c: enabled "critical" keyword
3466         * src/z80/mappings.i,
3467         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3468         functions (fixes bug #979646)
3469         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3470
3471 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3472
3473         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3474           such as c:\mydir.
3475
3476 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3477
3478         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3479           doesn't disable too much optimizations
3480
3481 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3482
3483         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3484
3485 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3486
3487         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3488
3489 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3490
3491         * src/pic/gen.c tidied up tabs
3492         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3493         * src/pic/main.c tidied up tabs
3494         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3495         * src/pic/pcoderegs.c tidied up tabs
3496         * src/pic/ralloc.c tidied up tabs
3497
3498 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3499
3500         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3501         to S_FIXED for pic16 port and when symbol is not in level 0,
3502         allocate for S_REGISTER storage class and pic16 port, too,
3503         * src/pic16/device.h: prototype for checkSym,
3504         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3505         * (pic16_assignConfigWordValue): test the value and the mask to
3506         validate that the value is suitable for the configuration word,
3507         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3508         collect extern declared symbols, don't emit symbol twice, check
3509         first if symbol is in publics set first,
3510         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3511         * added command line '--fstack' which enables an experimental
3512         feature for stack access, too buggy to be used yet...
3513         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3514         * (pic16_allocDirReg): when register has storage class S_REGISTER
3515         allocate in pic16_dynAccessRegs,
3516         * device/include/pic16/pic18f????.h: modified configuration word
3517         naming convention, words started as CONFIG0H but should be CONFIG1H
3518
3519 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3520
3521         * device/include/mcs51reg.h: fixed bug 970993
3522
3523 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3524
3525         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3526         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3527         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3528         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3529         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3530         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3531           error/warning numbers,
3532           added function setWarningDisabled()
3533         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3534         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3535           _memcmp.c _memmove.c calloc.c realloc.c free.c
3536         * support/regression/tests/malloc.c: added tests for new functionality
3537         * support/regression/tests/zeropad.c: added tests for truncated initializers
3538           and initialized char arrays starting with '\x0'
3539         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3540
3541 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3542
3543         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3544
3545 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3546
3547         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3548         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3549         peephole 177.e. Thanks to anonymous
3550
3551 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3552
3553         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3554         function isn't used in the source but referenced as a
3555         variable initializer then declare it as extern in .asm file
3556
3557 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3558
3559         * .version: increased version number to 2.4.3
3560
3561         Adding version extension according to ChangeLog CVS revision
3562         * src/Makefile.in (target all): added dependency 'version.h'
3563         * (rule version.h): added rule to create version.h from ChangeLog,
3564         * (rule dep): added dependency version.h,
3565         * src/version.awk: AWK script to create version.h
3566         * src/SDCCdwarf2.c (dwWriteModule),
3567         * src/SDCCglue.c (initialComments),
3568         * src/SDCCmain.c (printVersionInfo): modified to write after
3569         version string the version extension number,
3570         * src/SDCCutil.c: included "version.h"
3571         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3572         number,
3573         * src/SDCCutil.h: added prototype for getBuildNumber
3574
3575         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3576         includeDirsSet, too,
3577         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3578         const char [] is found in function prototype...
3579
3580         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3581         moving to WREG with source is already in WREG,
3582         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3583         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3584         * (aopForSym): stack'ed symbols are partially supported, added
3585         if-clause to support symbols in FARSPACE,
3586         * (sameRegs): added test for AOP_ACC to see if registers are same,
3587         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3588         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3589         * (pic16_popRegFromString): will not allocate a new register if it
3590         doesn't find one by name, bug may have introduced...
3591         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3592         * (genIpush): revived to use pic16 port's stack,
3593         * (genAddrOf): added incomplete case for stack'ed operand,
3594         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3595         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3596         can handle multibyte operands,
3597         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3598         * (pic16initialComments): added message for MPLAB compatibility
3599         mode enabled,
3600         * src/pic16/main.h: prototype for pic16_mplab_comp,
3601         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3602         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3603         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3604         because of increased complexity of procedure,
3605         * (_process_pragma): stack pragma changed to format 'stack pos len',
3606         emit symbol '_stack_end' to conform with gplink,
3607         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3608         to search for register,
3609         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3610         PO_GPR_REGISTER,
3611         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3612         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3613         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3614         case for PO_GPR_REGISTER,
3615         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3616         dies, the new era is ahead !...
3617         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3618         pic16_dynInternalRegs,
3619         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3620         * (pic16_allocDirReg): minor optimizations and bug fixes,
3621         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3622
3623         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3624         load stack and frame pointer with address of 'stack_end' symbol
3625
3626 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3627
3628         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3629         without source code but only variable initializers
3630
3631 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3632
3633         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3634         external are not declared as extern to reduce overhead while linking
3635
3636 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3637
3638         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3639
3640 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3641
3642         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3643           Yee Keat for the patch
3644         * src/SDCCast.c (decorateType): fixed bug #979599
3645         * src/ds390/gen.h: removed local fReturnSizeDS390
3646         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3647         * src/ds390/gen.c (genAnd, genOr, genXor),
3648         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3649
3650 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3651
3652         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3653         add relFilesSet to $3, manipulate $2 to handle linking of object
3654         files without source files in command line,
3655         * device/include/pic16 (all headers): added ID location macros,
3656         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3657         entries for ID location bytes,
3658         * (pic16_assignIdByteValue): NEW,
3659         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3660         added field dumpcalltree to pic16_options_t,
3661         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3662         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3663         emitting rFalseIfx label after check_carry label,
3664         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3665         pic16_emitDIRegs), NEW
3666         * (pic16glue): dump .calltree file when option --calltree found,
3667         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3668         * (_pic16_genAssemblerPreamble): emit ID locations after
3669         configuration registers,
3670         * (pic16_linkCmd): modifications of the link command,
3671         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3672         * (pic16_pCodeInitRegisters): don't init stack registers,
3673         * (pic16_findPrevInstruction): fixed bug,
3674         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3675         bug with immediate registers,
3676         * (buildCallTree): traces stack push and pop,
3677         * (pct2): dump also stack usage for each function,
3678         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3679         * (pic16_allocDirReg): various modifications,
3680         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3681         fixed to 1,
3682
3683 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3684
3685         * src/pic16/pcode.c: removed buggy double colon
3686
3687 2004-07-01 Borut Razem <borut.razem AT siol.net>
3688
3689         * support/scripts/sdcc.nsi: added include/pic16 to setup
3690
3691 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3692
3693         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3694         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3695         target 'clean',
3696         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3697         specific command line arguments. Also added sample lkr script
3698         for placing a variable at a specific memory bank.
3699         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3700         at a specific memory bank,
3701         * (pic16_dump_isection): fixed bug which caused string literals to
3702         be omitted when dumping idata section,
3703         * (pic16_groupRegistersInSection): added code to handle registers
3704         in specific memory banks,
3705         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3706         public, all references are renamed too,
3707         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3708         AOP_DPTR2,
3709         * (pic16_storeForReturn): added case to handle when dest is WREG,
3710         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3711         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3712         pic16_rel_udata, check to see if that register is marked as being
3713         a member of a specific memory bank,
3714         * (pic16_printIvalCharPtr): added code to add string literals either
3715         to code or the idata sections,
3716         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3717         also accept the 'udata' pragma,
3718         * src/pic16/main.h: new structure types sectName and sectSym
3719         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3720         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3721         * (pic16_findPrevInstruction): fixed, it returned nothing,
3722         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3723         instruction combinations,
3724         * (pic16_FixRegisterBanking): heavily reorganised,
3725         * (pic16_AnalyzeBanking): if generating banksel directives is
3726         disabled, then don't call FixRegisterBanking at all,
3727         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3728         completely removed,
3729         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3730
3731 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3732
3733         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3734         Phuah Yee Keat <yk.phuah AT nestac.com>
3735
3736 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3737
3738         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3739         correctly the IVT even if it is relocated to some other location
3740
3741 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3742
3743         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3744         * device/include/pic16/pic18f2220.h: NEW,
3745         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3746         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3747         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3748         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3749         nodefaultlibs, ivt_loc is the location of the interrupt vector
3750         table, and nodefaultlibs signs that default libraries should not be
3751         linked in link stage,
3752         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3753         according to --ivt-loc argument,
3754         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3755         when pragma stack is found,
3756
3757 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3758
3759         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3760         256 (range check), 257 (do while), 258.a-f (bit banging
3761         f.e. on 3-wire SPI bus)
3762
3763 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3764
3765         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3766         variables used exclusively within a loop
3767
3768 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3769
3770         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3771
3772 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3773
3774         * src/SDCClrange.c (computeClash): fixed bug #971834
3775
3776 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3777
3778         * src/mcs51/gen.c (genCmp): fixed bug #975903
3779         * src/hc08/gen.c (operandsEqu),
3780         * src/ds390/gen.c (operandsEqu),
3781         * src/z80/gen.c (operandsEqu),
3782         * src/pic/gen.c (operandsEqu),
3783         * src/pic16/gen.c (operandsEqu),
3784         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3785         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3786
3787 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3788
3789         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3790
3791 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3792
3793         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3794         default case in switch statement,
3795         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3796         to eliminate problem with initialisation of pointers, but problem
3797         still exists,
3798         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3799         * (emitStaticSegment): removed various lines emitting debug info,
3800         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3801         added processor registers for utilizing EEPROM,
3802         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3803         configurable and set 8
3804
3805 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3806
3807         * .version: increased version number to 2.4.2,
3808
3809         Cumulative patch for pic16 port
3810         * src/pic16/device.c: changed scheme to dump initial values for
3811         variables in idata segment, all print_idata* functions were removed,
3812         now the pic16_printIval* will be called,
3813         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3814         * _pic16_printPointerType, pic16_printPointerType,
3815         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3816         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3817         NEW, similar to the respective functions in SDCCglue.c,
3818         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3819         way, emitting hex bytes,
3820         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3821
3822 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3823
3824         * src/avr/ralloc.c (serialRegAssign),
3825         * src/xa51/ralloc.c (serialRegAssign),
3826         * src/pic/ralloc.c (serialRegAssign),
3827         * src/pic16/ralloc.c (serialRegAssign),
3828         * src/hc08/ralloc.c (serialRegAssign),
3829         * src/z80/ralloc.c (serialRegAssign),
3830         * src/ds390/ralloc.c (serialRegAssign),
3831         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3832
3833 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3834
3835         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3836         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3837
3838 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3839
3840         Cumulative patch for pic16 port:
3841         * src/pic16/device.h (typedef PIC16_device) modified fields for
3842         defining microcontrollers,
3843         * src/pic16/device.c: added new info for all devices in Pics16 array,
3844         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3845         to be optimised out by the pCode optimiser,
3846         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3847         specially, bug reported by G.M. Gallant,
3848         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3849         as force'd so that cannot be optimised out by pCode optimiser,
3850         * src/pic16/pcode.c,
3851         * src/pic16/pcodepeeph.c,
3852         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3853         they are disabled by default, but can be enabled explicit with
3854         command argument --denable-peeps, for testing,
3855         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3856         --pomit-ivt in COMPILE_FLAGS
3857
3858 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3859
3860         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3861           compilation on MSVC
3862
3863 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3864
3865         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3866
3867 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3868
3869         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3870         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3871
3872 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3873
3874         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3875         would only assign 0x300001 register.
3876
3877 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3878
3879         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3880         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3881
3882 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3883
3884         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3885         for ds80c400
3886         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3887         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3888         added peephole 254 (left shift), 255 (jump table)
3889
3890 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3891
3892         * device/lib/Makefile.in: removed comment line with model-pic16,
3893         * (target port-specific-objects-pic16): the libraries and objects
3894         are copied to the build directory form the device/lib/pic16/bin
3895         directory
3896
3897         Cumulative patch concerning pic16 port:
3898         * library directory has been re-organized,
3899         * added support for PIC18F1220,
3900         * added headers and library sources for chips 18f1220,18f6520,
3901         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3902
3903         * configuration registers setting has changed, now each supported
3904         device has a complete description of the registers it uses,
3905         * all initialisations are moved to idata sections, these section
3906         can be absolute or relocatable,
3907         * fixed initialisation of codespace variables,
3908         * fixed warning about PCLATU and gpsim,
3909         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3910         * (genAssign): use table reads when assigning from variables in codespace,
3911         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3912         char/int variables placed in codespace,
3913         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3914         registers set in .asm file, no need for --pomit-config-words anymore,
3915         * (pic16glue): some 8051 legacy segments are commented out
3916         (to be removed completely),
3917         * added support for alternative assembler and linker with --asm=
3918         and --link= command line arguments,
3919         * peepholes are disabled automatically in the port, no need to
3920         specify on command line,
3921         * port supports natively char/int/long multiplication, but converts
3922         all divisions to support functions,
3923         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3924         to the file set in variable $2,
3925         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3926         strings in ASCII format and not in hex,
3927         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3928         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3929         allocate proper register if iCodes aren't temporary,
3930
3931 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3932
3933         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3934
3935 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3936
3937         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3938         is commented out
3939
3940 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3941
3942         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3943         computed address is reused
3944         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3945         multi-byte bitfields
3946
3947 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3948
3949         * src/z80/gen.c: (genArrayInit): must check for pointers too
3950
3951 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3952
3953         * support/regression/tests/zeropad.c: never meant to commit the
3954           nestedstruct test: removed, added check for GCC version
3955
3956 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3957
3958         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3959         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3960         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3961           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3962           bugs 928906 and 954082 half-empty initializers
3963         * src/SDCCsymt.h,
3964         * src/SDCCsymt.c (getAllocSize): added for above fix
3965         * src/z80/gen.c (genArrayInit): fixed bug 741044
3966         * support/regression/tests/zeropad.c: added tests
3967
3968 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3969
3970         * src/pic16/device.c (pic16_dump_section): corrected bug which
3971         caused some symbols of the libraries to be misplaced
3972
3973 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3974
3975         * src/pic16/glue.c,
3976         * src/pic16/ralloc.h,
3977         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3978         to fix conflict with pic port
3979
3980 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3981
3982         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3983         externs configuration variables,
3984         * src/pic16/ralloc.h,
3985         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3986         prototype in header, commented out some debug messages
3987
3988 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3989
3990         * src/pic16/glue.c,
3991         * src/pic16/main.c,
3992         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3993         for gpasm COFF object generation. Thanks to D. Hawkins for
3994         his patch info
3995
3996 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3997
3998         * src/ds390/main.c,
3999         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4000         Brock for spotting this)
4001         * src/ds390/gen.c (genEndFunction),
4002         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4003         interrupt handler and critical. Disable push/pop optimizations when
4004         peephole optimizations disabled.
4005
4006 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4007
4008         Updated pic16 library sources and headers.
4009         * device/lib/pic16/pic18f*/ ,
4010         * device/include/pic16/*.h: modified to handle structured SFR
4011         definitions
4012
4013 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4014
4015         * src/port.h (PORT structure): added hook initPaths, now each
4016         port can declare its own default search paths,
4017         which can been seen with the --print-search-dirs option,
4018         see pic16 port for example,
4019         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4020         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4021         * (doPrintSearchDirs): NEW, replaces in a central manner the
4022         printing of search dirs which was split in set*Paths functions,
4023         * (main): added call to port->initPaths and doPrintSearchDirs,
4024         * src/avr/main.c,
4025         * src/ds390/main.c,
4026         * src/hc08/main.c,
4027         * src/izt/i186.c,
4028         * src/izt/tlcs900h.c,
4029         * src/mcs51/main.c,
4030         * src/pic/main.c,
4031         * src/pic16/main.c: modified port structures to reflect addition of
4032         initPaths hook,
4033
4034         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4035         * (pic16_dump_section): for registers in same address reserve memory once,
4036         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4037         to no_banksel,
4038         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4039         result is greater in size than right or left,
4040         * (pic16_genUMult8X8_8): there are some cases where the result can
4041         be 16 bits size, so handle these,
4042         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4043         * (pic16_outBitC): modified to emit pcodes,
4044         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4045         or not,
4046         * (genDivOneByte): implemented algorithm to divide 8-bits,
4047         * (genCmp): uncommented goto, but issues still exist,
4048         * (genAnd): fixed a bug with variables >8bits,
4049         * (genPackBits): optimization added that uses BCF/BSF to change a
4050         single bit,
4051         * (genAssign): fixed bug when assigning floating point literals,
4052         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4053         __sdcc_gsinit_startup label,
4054         * src/pic16/main.c (_pic16_init): removed search directory
4055         initialisations,
4056         * (_pic16_initPaths): NEW, used to initialise search directories,
4057         * (_hasNativeMulFor): support functions for all except char/int
4058         multiplication, and char division,
4059         * (PIC16_port struct): modified entry for native mul support,
4060         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4061         no_banksel option,
4062         * (buildCallTree): call to register_usage is ifdef'ed out,
4063
4064 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4065
4066         * device/include/string.h: applied Stas Sergeev's patch to make this
4067         header file compatible with the preprocessor -Wundef option
4068         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4069         failure (fixes bug #941458)
4070
4071 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4072
4073         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4074         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4075         that the variable, not the function, should be static
4076         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4077         to be consistent with non-literal case
4078
4079 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4080
4081         * src/SDCCast.c (isConformingBody): fixed bug #949967
4082         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4083         convilong): fixed bug #952086
4084
4085 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4086
4087         * src/SDCCmem.c (allocVariables): fixed bug #955321
4088
4089 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4090
4091         * src/hc08/main.c (_hc08_genAssemblerEnd),
4092         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4093         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4094         completely eliminated the use of a temporary file
4095         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4096         when more than one file linked
4097         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4098
4099 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4100
4101         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4102         which fixes bug #543481
4103         * support/regression/tests/bug-751703.c: fixed comments left from a
4104         cut and paste error
4105         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4106         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4107         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4108         scopes
4109         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4110         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4111         are now changed to underscores in moduleName
4112
4113 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4114
4115         * as/mcs51/lkmem.c: better fix for bug #954173
4116
4117 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4118         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4119
4120         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4121         * device/include/c8051f000.h,
4122         * device/include/c8051f120.h,
4123         * device/include/c8051f300.h,
4124         * device/include/c8051f310.h,
4125         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4126         PWM16) and detab'ed
4127
4128 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4129
4130         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4131         and mailing lists, doc'ed --no-peep-comments, removed reference
4132         to knoppix (newest version has no LyX/LaTeX), other minor changes
4133         * src/SDCCglue.c (glue): save 2 bytes stack space with
4134         option --main-return. The ljmp could probably be avoided too
4135
4136 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4137
4138         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4139
4140 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4141
4142         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4143         * src/SDCCopt.c (isLocalWithoutDef),
4144         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4145         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4146         (credit to Maarten Brock for patch #949363, on which this is based)
4147         * support/regression/tests/bug-751703.c: some test cases of extern used
4148         within inner scopes.
4149
4150 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4151
4152         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4153         SPEC_STRUCT
4154         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4155         struct definitions
4156         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4157         dwWriteLabel): fix to create valid debugger symbols even when
4158         the module name has non-alphanumeric symbols in it
4159         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4160         when a variable's allocation has been optimized away
4161
4162
4163 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4164
4165         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4166         * src/hc08/main.c,
4167         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4168         * src/mcs51/main.c,
4169         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4170         * src/ds390/main.c,
4171         * src/z80/gen.c (z80_emitDebuggerSymbol),
4172         * src/z80/main.c,
4173         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4174         * src/pic/main.c,
4175         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4176         * src/pic16/main.c,
4177         * src/avr/gen.c (avr_emitDebuggerSymbol),
4178         * src/avr/main.c,
4179         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4180         * src/xa51/main.c,
4181         * src/SDCCdebug.c (emitDebuggerSymbol),
4182         * src/SDCCdebug.h,
4183         * src/port.h: added a debugger struct to the port struct. Added a
4184         callback for defining debugger symbols
4185
4186         * src/SDCCast.c (createLabel),
4187         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4188         with isitmp = 1
4189         * src/SDCCicode.h,
4190         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4191         iCode back to the ast for the function
4192
4193         * src/hc08/ralloc.c (hc08_assignRegisters),
4194         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4195         unneeded fields from the regs struct.
4196         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4197         pushReg() & pullReg() functions instead of emitcode()
4198
4199         * src/hc08/gen.c (genLabel, genhc08Code),
4200         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4201
4202         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4203         debugger hooks
4204
4205         * src/hc08/gen.c (genEndFunction, genhc08Code),
4206         * src/hc08/gen.h,
4207         * src/mcs51/gen.c (genEndFunction, gen51Code),
4208         * src/mcs51/gen.h,
4209         * src/ds390/gen.c (genEndFunction, gen390Code),
4210         * src/ds390/gen.h,
4211         * src/z80/gen.c (genEndFunction, genZ80Code),
4212         * src/z80/gen.h,
4213         * src/z80/z80.h,
4214         * src/pic/gen.c (genEndFunction, genpic14Code),
4215         * src/pic/gen.h,
4216         * src/pic16/gen.c (genEndFunction, genpic16Code),
4217         * src/pic16/gen.h,
4218         * src/avr/gen.c (genEndFunction, genAVRCode),
4219         * src/avr/gen.h,
4220         * src/xa51/gen.c (genEndFunction, genXA51Code),
4221         * src/xa51/gen.h,
4222         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4223         specific code to cdbFile.c and out of the backend code generators
4224
4225         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4226         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4227         starting address is now 0
4228
4229         * as/hc08/asm.h,
4230         * as/hc08/m08pst.c,
4231         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4232         assembler directive for DWARF support
4233         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4234
4235         * src/src.dsp,
4236         * src/Makefile.in,
4237         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4238
4239 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4240
4241         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4242         and inappropriate peephole optimization in jump tables
4243
4244 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4245
4246         * as/hc08/m08pst.c,
4247         * src/SDCCglue.c: sdccopt works for the hc08 port now
4248
4249 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4250
4251         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4252
4253 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4254
4255         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4256
4257 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4258
4259         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4260         rules
4261         * src/SDCCmain.c,
4262         * src/SDCCglobl.h,
4263         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4264         comments from the peephole optimizer replacement rules
4265         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4266         symbols
4267         * src/SDCCcse.c (updateSpillLocation),
4268         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4269         equivalents
4270         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4271         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4272         objects far pointers
4273
4274 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4275
4276         * src/SDCCsymt.h: a missing part of my last change
4277         * src/pic/ralloc.c (regTypeNum),
4278         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4279
4280 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4281
4282         * src/SDCCicode.h,
4283         * src/SDCCicode.c (aggrToPtrDclType),
4284         * src/SDCCptropt.h,
4285         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4286         ptrPseudoSymConvert),
4287         * src/pic/ralloc.c (regTypeNum),
4288         * src/pic16/ralloc.c (regTypeNum),
4289         * src/hc08/ralloc.c (regTypeNum),
4290         * src/ds390/ralloc.c (regTypeNum),
4291         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4292         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4293
4294 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4295
4296         * link/z80/lkmain.c (afile),
4297         * as/hc08/lkmain.c (afile),
4298         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4299         prevent a pointer problem when a filename has no directory and
4300         no extension specified.
4301
4302 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4303
4304         * link/z80/lkmain.c (afile): allow periods in directory names
4305         * link/z80/lkmain.c (afile),
4306         * as/mcs51/lkmain.c (afile),
4307         * as/hc08/lkmain.c (afile): allow linker script file to have an
4308         extension other than ".lnk"
4309         * link/z80/lklex.c (getfid),
4310         * link/z80/lkmain.c (parse),
4311         * as/mcs51/lklex.c (getfid),
4312         * as/mcs51/lkmain.c (parse),
4313         * as/hc08/lklex.c (getfid),
4314         * as/hc08/lkmain.c (parse): Support comments in the linker script
4315         file on lines by themselves and after filenames
4316
4317 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4318
4319         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4320
4321 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4322
4323         * src/z80/peeph-z80.def: removed some peephole rules that don't
4324         work with multibyte arithmetic (fixed bug #937126)
4325         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4326         to registers and not global variables
4327         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4328         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4329         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4330         checking for assignments not internally generated (fixed bug #931895)
4331         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4332         structure member (fixed bug #930072)
4333
4334 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4335
4336         * src/SDCCmain.c (linkEdit),
4337         * src/hc08/main.c (_hc08_parseOptions),
4338         * as/hc08/Makefile.in,
4339         * as/hc08/aslink.h,
4340         * as/hc08/asm.h,
4341         * as/hc08/m08pst.c,
4342         * as/hc08/lkrloc.c (relr, rele),
4343         * as/hc08/lkarea.c (lnkarea)
4344         * as/hc08/lkmain.c (afile, parse),
4345         * as/hc08/lkelf.c: support for ELF output
4346         * as/hc08/lks19.c (s19),
4347         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4348
4349 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4350
4351         * as/mcs51/lkihx.c: Fixed bug #899105.
4352
4353 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4354
4355         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4356         .dsp files from Unix to DOS.
4357
4358 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4359
4360         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4361         function pointers; we have been compliant for several months now.
4362         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4363         change that was accidently commented out
4364         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4365         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4366         bug #922319
4367
4368 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4369
4370         * src/hc08/gen.c: output of all of the internal debugging information
4371         is now controlled by the D() macro; it is disabled by default
4372
4373 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4374
4375         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4376         harder to keep the same registers during a CAST iCode
4377         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4378         long via int can be done in a single cast, if the signedness is
4379         correct.
4380         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4381         putchar() in tinibios.c in ds390's library
4382
4383 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4384
4385         * src/SDCCast.c (decorateType): fixed bug #898889,
4386         cast result of a literal complement too
4387         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4388         fixed check for bitfields
4389
4390 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4391
4392         * src/SDCCicode.c (geniCodeLogic): made it static,
4393         (geniCodeLogicAndOr): added in order to fix bug #905492,
4394         (ast2iCode): fixed bug #905492
4395         * support/regression/tests/bug-905492.c: added
4396         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4397         (processParms): fixed bug #927659: don't copy parms, this will clear
4398         decorated flag
4399         * support/regression/tests/bug-927659.c: added
4400
4401 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4402
4403         * src/SDCCast.c (addCast): don't cast float to char
4404         * device/lib/libsdcc.lib: added _memmove
4405
4406 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4407
4408         * device/lib/large/Makefile: fixed parallel execution by
4409         replacing `make` by `$(MAKE)`
4410
4411 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4412
4413         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4414         offsets (fixes bug #923936)
4415
4416 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4417
4418         * device/lib/small/Makefile: fixed parallel execution by
4419         replacing `make` by `$(MAKE)`
4420
4421 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4422
4423         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4424
4425 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4426
4427         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4428         * src/regression/Makefile: Regression test was not running.
4429
4430 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4431
4432         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4433         complement if possible
4434         * src/SDCCval.c (valComplement),
4435         * src/SDCCicode.c (operandOperation): fixed complement of literal
4436         * support/regression/tests/onebyte.c (testComplement): added
4437
4438 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4439
4440         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4441         return an optimized tree; actually replace actParm with the new tree
4442         * src/SDCCast.h: added some parantheses to remove side effects
4443         * support/regression/tests/bug-920866.c
4444
4445 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4446         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4447         Bit operands were not being handled properly in the pic14 port.
4448         (now src/regression/add.c passes again).
4449
4450 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4451
4452         * src/SDCC.y (labeled_statement): case and default no longer require
4453         a following statement (RFE #893037)
4454
4455 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4456
4457         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4458         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4459         disabled (fixes bug #916294)
4460         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4461         "mov a,acc"; patch provided by Lenny Story
4462         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4463
4464 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4465
4466         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4467         functions
4468         * src/ds390/gen.c (genFunction, genEndFunction),
4469         * src/ds390/ralloc.c (ds390_assignRegisters),
4470         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4471         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4472         pushed if there are parameters passed on the stack. Also, a cleaner
4473         way to decide if r0/r1 should be pushed/popped. (Together they fix
4474         bug #918693)
4475
4476 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4477
4478         * doc/sdccman.lyx,
4479         * device/lib/mcs51/crtpagesfr.asm,
4480         * device/lib/mcs51/crtxinit.asm,
4481         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4482         to avoid confusion with Si Lab's SFRPAGE register.
4483
4484 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4485
4486         * src/SDCCglue.c (emitMaps): allow public sfr variables
4487         * src/SDCCglue.c (initialComments): include compiler build date
4488         with compiler version and put the timestamp of the generated
4489         assembly file on a serperate line to be less confusing.
4490         * src/port.h: added genInitStartup hook
4491         * src/avr/main.c,
4492         * src/ds390/main.c,
4493         * src/hc08/main.c,
4494         * src/pic/main.c,
4495         * src/pic16/main.c,
4496         * src/xa51/main.c,
4497         * src/z80/main.c: genInitStartup initialize as NULL (default to
4498         historical behaviour)
4499         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4500         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4501         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4502         library instead of hard coding it into the compiler.
4503         * support/regression/ports/mcs51-stack-auto/spec.mk,
4504         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4505         * device/lib/mcs51/Makefile,
4506         * device/lib/small/Makefile,
4507         * device/lib/large/Makefile,
4508         * device/lib/mcs51/crtpagesfr.asm,
4509         * device/lib/mcs51/crtstart.asm,
4510         * device/lib/mcs51/crtxclear.asm,
4511         * device/lib/mcs51/crtxinit.asm,
4512         * device/lib/mcs51/crtclear.asm,
4513         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4514         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4515         and into user configurable files.
4516         * device/lib/clean.mk: clean mcs51 directory too
4517         * support/regression/tests/longlit.c: added static to T1 declaration
4518         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4519         accesses in the initialization code
4520
4521 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4522
4523         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4524         OSCTRIMVAL as noted in bug #916008
4525
4526 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4527
4528         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4529         in loops with multiple exits (reported as incorrect registers
4530         used by Martin Helmling in Sdcc-user list)
4531
4532 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4533
4534         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4535         made ds390 register extensions look less like error messages
4536
4537 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4538
4539         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4540         reported by Adam Wozniak in Sdcc-user list
4541
4542 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4543
4544         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4545         arithmetic optimizations, added debug output
4546
4547 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4548
4549         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4550         * sdcc.spec: updated and split sdcc into 3 rpms
4551         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4552         needed for literals of LEFT_OP and '+'
4553         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4554         introduced RESULT_TYPE_NOPROM
4555         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4556         left shift
4557         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4558         limited promotion to int only for '*'
4559         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4560
4561 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4562
4563         * src/pic16/gen.c (genSkip),
4564         (genc16bit2lit), (gencjneshort): commented out
4565         (is_LitOp): new helper function, checks operand type
4566         (genCmpEq): rewritten
4567
4568 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4569
4570         * support/regression/tests/bug-908454.c: added
4571
4572 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4573
4574         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4575         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4576         (geniCodeCast): cosmetic, don't preserve bit storage class
4577         (geniCodeLeftShift): added promotion
4578         (geniCodeLogic): fixed regression
4579         * src/SDCCsymt.c (computeTypeOr): accept bits too
4580         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4581
4582 2004-03-07  Borut Razem <borut.razem AT siol.net>
4583
4584         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4585
4586 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4587
4588         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4589         version of pic16_genPackRegisters which does not check if ic is a
4590         CAST operator,
4591         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4592         function cause string1.c regression test fails
4593
4594 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4595
4596         * sim/ucsim/configure.in,
4597         * sim/ucsim/configure,
4598         * sim/ucsim/doc/Makefile.in: use docdir
4599         * src/SDCC.y: fixed sbit atrributes
4600         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4601         * src/SDCCast.c (decorateType): |^& need special promotion handling
4602         * src/SDCCast.h,
4603         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4604         * src/SDCCsymt.h (computeType),
4605         * src/SDCCicode.c: computeType() needs op
4606         * src/SDCCsymt.c (checkTypeSanity),
4607         * doc/sddman.lyx: "plain" bitfields are unsigned
4608         * src/SDCCsymt.c (computeTypeOr): added
4609         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4610         |^& ops
4611         * src/SDCCval.c (val*): computeType() needs op
4612         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4613         * support/regression/tests/onebyte.c: added tests for |^&
4614
4615 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4616
4617         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4618         for writing icode into asm output.
4619
4620 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4621
4622         * src/pic16/device.c: added some debug lines enabled
4623         with macro DEBUG_CHECK,
4624         * src/pic16/genarith.c: more debug in genPlus,
4625         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4626         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4627         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4628         * (aopForSym): onStack symbols are re-placed in data memspace,
4629         and onStack flag is cleared,
4630         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4631         copy temporary pcodeop,
4632         * (genPcall): added warning for not updating PCLATU,
4633         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4634         always true for pic16 port,
4635         * (genMultOneWord): NEW, supports integer multiplication,
4636         * (genMult): modified to call genMultOneWord,
4637         * (ifxForOp): added warning when return NULL,
4638         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4639         flag is set before call to operandFromSymbol for implicit
4640         added structures,
4641         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4642         options.intlong_rent are set by default,
4643         * (_hasNativeMulFor): modified to allow port generation of integer
4644         multiplication,
4645         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4646         set regtype to REG_SFR for all registers, restricting seting the
4647         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4648
4649 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4650
4651         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4652         more than 500 times in the regression tests
4653
4654 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4655
4656         * support/Util/SDCCerr.h,
4657         * support/Util/SDCCerr.c,
4658         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4659         enumerator_list),
4660         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4661         for symbol conflicts.
4662         * support/valdiags/tests/enum.c,
4663         * support/valdiags/tests/tentdecl.c,
4664         * support/valdiags/tests/struct.c: expect possible error messages
4665         referring to original symbol definitions.
4666         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4667         * src/SDCCsymt.h,
4668         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4669
4670 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4671
4672         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4673
4674 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4675
4676         * src/pic16/ralloc.c (newReg): fixed bug #908929
4677
4678 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4679
4680         * src/ds390/gen.c: added missing #include "main.h"
4681
4682 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4683
4684         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4685         checking if symbol is already in set,
4686         * src/pic16/device.h: prototype for checkAddSym,
4687         * src/pic16/gen.c: (_G): added entry interruptvector,
4688         * (assignResultValue): removed some commented out lines,
4689         * (genFunction): check for ISR via sym->type, absolute section for
4690         interrupt code is created via a new pBlock, the goto instruction is
4691         placed now correctly at the interrupt vector position, changed all
4692         references from ivec to _G.interruptvector,
4693         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4694         is the interrupt is a high priority one, same for return from ISR,
4695         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4696         externs to calls of checkAddSym,
4697         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4698         pic16_pcode_verbose flag is set,
4699         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4700         * src/pic16/pcoderegs.c: message about how many registers are saved
4701         will only be emitted if pic16_pcode_verbose flag is set,
4702
4703 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4704
4705         * src/ds390/ralloc.h,
4706         * src/ds390/ralloc.c (ds390_regWithIdx),
4707         * src/ds390/gen.c (emitcode),
4708         * src/ds390/main.h,
4709         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4710         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4711         ds390operandCompare, getRegsRead, getRegsWritten,
4712         initializeAsmLineNode): customized instruction size calculation for
4713         ds390, started basis for some register optimizations
4714         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4715         corresponding assembly output
4716         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4717         missing push/pop of r0/r1. Optimized push/pops
4718
4719 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4720
4721         * src/mcs51/main.c (instructionSize): fixed ACALL size
4722         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4723
4724 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4725
4726         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4727         the sorting of rlist with NULL elements
4728         * (print_idataType, print_idata): NEW to create idata sections
4729         * src/pic16/device.h: idataSymSet new variable
4730         * src/pic16/gen.c (genFunction): fixed some bugs in string
4731         comparing, improved the absolute section creation for ISRs,
4732         added FSR0L/FSR0H in registers that are saved in an ISR,
4733         * (genInline): fixed the processing of inline snippets,
4734         now they undergo no process by the peephole optimizer
4735         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4736         are placed in idataSymSet,
4737         * (pic16emitStaticSeg): extern symbols are added in externs,
4738         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4739         switching when aboslute variables are placed in access bank memory
4740         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4741         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4742         commented out with #if,
4743         * (pic16_packRegisters): reintroduce the check for CAST because some
4744         symbols are not correctly handled,
4745         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4746         pCodeInstruction instead of pCode,
4747         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4748         pCodeAsmDir definition,
4749         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4750         directive, then the argument directive is emitted without the leading
4751         tab, hack for inline labels which must be in the first column,
4752         * (compareLabel,pic16_findNextInstruction),
4753         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4754         * (insertBankSwitch): modified for the new pCodeAsmDir,
4755
4756 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4757         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4758
4759         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4760         instance,
4761         * (pushSide): commented out with #if,
4762         * (assignResultValue): fixed some typos in saving
4763         registers,
4764         * (genPcall): FIXED and sync'ed with genCall,
4765         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4766         * (genNearPointerGet): fixed to handle some more cases,
4767         implementation scheme via table reads,
4768         * (genConstPointerGet): modified to access code memory correct,
4769         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4770         and improved to handle some cases
4771         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4772         instead of "RETLW" for init data
4773         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4774         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4775         variables are placed in access bank memory (<0x80 and >=0xf80),
4776         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4777         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4778         TBLWT_POSTDEC,TBLWT_PREINC
4779         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4780         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4781         directives
4782         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4783         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4784         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4785         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4786
4787 2004-02-29  Borut Razem <borut.razem AT siol.net>
4788
4789         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4790         support/Util/findme.h, support/Util/system.h: enhance binary relative
4791         search for lib and include by using findProgramPath()
4792
4793 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4794
4795         * src/SDCCpeeph.h,
4796         * src/SDCCpeeph.c (pcDistance),
4797         * src/port.h,
4798         * src/mcs51/ralloc.h,
4799         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4800         * src/mcs51/main.h,
4801         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4802         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4803         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4804         size calculation port specific, started basis for some register
4805         optimizations
4806         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4807         missing push/pop of r0/r1. Optimized push/pops
4808         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4809         * device/lib/_modsint.c (_modsint),
4810         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4811         and stack version so regression tests pass
4812
4813 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4814
4815         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4816         * src/SDCCast.c (decorateType): catch another small optimization
4817         with '?' operator
4818         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4819         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4820         modified to finally use computeType() all over SDCC,
4821         see Feature Request #877103
4822         * src/SDCCval.h: cosmetic
4823         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4824         valCompare(); regression tested in muldiv.c
4825         * support/regression/tests/muldiv.c (testMod): mod sign follows
4826         dividend only
4827
4828 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4829
4830         * src/SDCCast.c (decorateType): fixed bug #902362
4831         * doc/INSTALL.txt: fixed install instructions for win32
4832
4833 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4834
4835         * device/include/Makefile.in (install): fixed by replacing spaces
4836         by tabs
4837         * doc/README.txt,
4838         * doc/INSTALL.txt: updated for release
4839         * doc/sdccman.lyx: added warning for --xstack being buggy
4840
4841 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4842
4843         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4844         to eliminate build warnings.
4845         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4846
4847 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4848            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4849
4850         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4851         removed -penable-stack, added comment for stack pragma, added
4852         warning for not initializing the stack/frame registers, removed
4853         comment at interrupts section
4854
4855         Stack is made permanent, there is no ability to disable stack usage.
4856         * src/pic16/device.h,
4857         * src/pic16/device.c: removed all references to USE_STACK macro,
4858         * src/pic16/device.c (pic16_dump_section): when no elements in
4859         rlist, free rlist before return,
4860         * (pic16_dump_int_registers): NEW, internal registers are a new set
4861         of general purpose registers reused by each function,
4862         * (checkAddReg): returns 1 if registers is added to set,
4863         * (pic16_groupRegistersInSection): when a registers is of type
4864         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4865         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4866         SRCASECMP macro is moved here from device.c
4867         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4868         PO_PCLATU, PO_PRODL, PO_PRODH,
4869         * (pic16_pCodeOpType, genMinus,
4870         changed compares to "a" register, with AOP_ACC,
4871         * (pic16_genPlus): fixed some bugs and indented properly,
4872         * (pic16_addSign): changed size to size+offset in the MOVWF
4873         instruction,
4874         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4875         multiply 8-bit operand by literal, result is 8-bit,
4876         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4877         multiply 2 8-bit operand, result is 8-bit,
4878         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4879         genUMult8X*_16,
4880         * src/pic16/gen.c: changed accUse to contain WREG only,
4881         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4882         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4883         true, do not use immediate addressing any more unless sym is a
4884         pointer in codespace,
4885         * (aopForRemat): do not use immediate addressing when symbol not in
4886         codespace and when symbol's address is requested,
4887         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4888         accUse size (= 1),
4889         * (aopGet): added case for AOP_ACC and don't return "accumulator
4890         bug" but WREG instead,
4891         * (popGetTempReg): pushes contents of temporary register in stack,
4892         * (popReleaseTempReg): pops contents of temporary register from
4893         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4894         * (pic16_popGet): separated case AOP_ACC to return register WREG
4895         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4896         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4897         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4898         the use of immediate pointers to certain cases only.
4899
4900         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4901         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4902         * (assignResultValue, genCall, genRet): modified to use the new
4903         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4904         genPcall is still broken,
4905         * (genFunction): added code to create 'A' type pBlocks when
4906         interrupt functions are generated, code not extensively tested yet,
4907         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4908         * (genEndFunction): modified so ISRs pop stored registers from stack,
4909         * (genMultOneByte): cleanup,
4910         * (AccRsh): added flag andmask, to and result with appropriate mask,
4911         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4912         * (genDataPointerGet): fixed and reenabled its use,
4913         * (genNearDataPointerGet): bugs fixed,
4914         * (genDataPointerSet): bugs fixed,
4915         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4916         pic16_DumpSymbol, pic16_DumpOp,
4917         * src/pic16/genutils.h: function prototypes for the above functions,
4918         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4919         pointers,
4920         * (pic16emitRegularMap): many many many improvements, but needs a
4921         major cleanup,
4922         * src/pic16/main.c: enable_stack in pic16_options is removed,
4923         * (_pic16_parseOptions): removed command line options -penable-stack,
4924         * (_process_pragma): emit stack symbol only when stack pragma is
4925         processed,
4926         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4927         redirected to FSR0L/FSR0H pair,
4928         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4929         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4930         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4931         for immediates,
4932         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4933         * (dumpPicOptype): NEW,
4934         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4935         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4936         with movff instruction,
4937         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4938         added pic16_int_regs, some packRegsFor* functions are commented out,
4939         because produce errors,
4940         * src/pic16/NOTES: minor modifications
4941
4942 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4943
4944         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4945         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4946         --pack-iram.
4947         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4948         * as/mcs51/lkaomf51.c: fixed bug #895763
4949
4950 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4951
4952         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4953
4954 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4955
4956         * doc/sdccman.lyx: added details about the HC08 storage classes and
4957         interrupts, fixed the register usage info for z80 & gbz80
4958
4959 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4960
4961         * doc/sdccman.lyx: added more pic16 port documentation
4962         * device/include/pic16/: added header pic18fregs.h
4963
4964 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4965
4966         * doc/sdccman.lyx: added Vangelis' contribution
4967
4968 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4969
4970         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4971         extend to the next CALL or PCALL, not just to the next CALL.
4972
4973 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4974
4975         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4976
4977 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4978
4979         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4980         bug #895752 and a better fix for bug #716790
4981
4982 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4983
4984         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4985
4986 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4987
4988         * doc/sdccman.lyx: minor changes, minor changed
4989
4990 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4991
4992         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4993         which can't handle SDCC_NEWONEBYTEOPS,
4994         (geniCodeMultiply): removed conversion from mult to shift for pic14
4995         and pic16
4996
4997 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4998
4999         * src/hc08/gen.h,
5000         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5001         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5002         thus fixing bug #895406
5003
5004 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5005
5006         * device/lib/_modsint.c,
5007         * device/lib/_modslong.c: sign follows divisor only
5008         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5009         signs or signedness can be ignored
5010         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5011         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5012         added optimization for IFX,
5013         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5014         arguments;
5015         reenabled optimization for IFX, which was removed on 2004-01-11
5016         * src/SDCCast.h: added return type IFX
5017         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5018         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5019         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5020         SDCC_OLDONEBYTEOPS selects the old behaviour
5021         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5022         changed again and commented promotion rule
5023         * src/SDCCval.c (valDiv): promotion no longer necessary
5024         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5025         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5026         rewritten
5027         * support/regression/tests/onebyte.c: added
5028
5029 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5030
5031         * gen.c (genInline): reverted to old code for assemnling inline
5032         code because of bug reported James Chadd
5033
5034 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5035
5036         * ralloc.h: missing declarations from previous patch,
5037         seems that patch for ralloc.h was never applied, fixed
5038
5039 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5040            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5041
5042         * pcode.c,
5043         * pcode.h,
5044         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5045         indirect addressing. Marked FSR0 as deprecated
5046         * gen.c (pointerCode): commented out, not needed now
5047         (pic16_popGet2p): new MOVFF helper function
5048         (genGenPointerGet),
5049         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5050         (shiftRLong): removed duplicate debugging info
5051
5052 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5053
5054         * src/ds390/gen.c (genNearPointerGet),
5055         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5056         optimization with bits, but not bitfields.
5057         * src/ds390/ralloc.c (packRegisters),
5058         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5059
5060 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5061
5062         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5063
5064 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5065
5066         * src/SDCCsymt.h,
5067         * src/SDCCicode.c (operandFromSymbol),
5068         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5069         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5070         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5071         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5072         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5073         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5074         bug #892038
5075         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5076         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5077         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5078         * src/SDCCsymt.c (newSymbol),
5079         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5080         enumerator_list),
5081         * src/SDCCval.h,
5082         * src/SDCCval.c (newiList): fixed bug #885705
5083
5084 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5085
5086         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5087         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5088
5089 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5090
5091         * device/include/c8051f120.h,
5092         * device/include/c8051f300.h,
5093         * device/include/c8051f310.h: added/updated header files for Silicon
5094         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5095         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5096         in new section Submitting patches
5097
5098 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5099
5100         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5101         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5102         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5103         genGenPointerSet),
5104         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5105         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5106         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5107         genGenPointerSet),
5108         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5109         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5110         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5111         genGenPointerSet),
5112         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5113         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5114         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5115         genGenPointerSet): fixed bug #892400
5116         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5117         to eliminate build warnings.
5118         * src/SDCCast.c (processParms),
5119         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5120         fixed bug 751859
5121         * support/valdiag/valdiag.py: added GCC to the list of defines active
5122         when compiling with gcc
5123
5124 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5125
5126         * support/Util/SDCCerr.h,
5127         * support/Util/SDCCerr.c,
5128         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5129         with an incomplete type (fixed bug #883734)
5130         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5131
5132 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5133
5134         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5135
5136 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5137
5138         * src/SDCCast.c (decorateType),
5139         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5140         function pointer implementation
5141         * support/regression/tests/funptrs.c: added tests to verify both forms
5142         of function pointers work correctly. Added tests to verify parameters
5143         are passed in the correct order.
5144
5145 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5146
5147         * device.c (regCompare): registers are sorted by ascending
5148         address and increasing size,
5149         * main.c (_pic16_finaliseOptions): removed the declaration
5150         of compiler macro MCU. Now a macro of the format pic18fxxxx
5151         will be defined from the command line
5152
5153 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5154             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5155
5156         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5157         PCOP_RLCF was overwritten!
5158         * gen.c (genSkip): commented out calls to pic16_emitcode,
5159         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5160         * (genlshTwo),
5161         * (genRRC): added debugging info,
5162         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5163         overwritten while shifting,
5164         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5165         overwritten while shifting,
5166         * (AccLsh),
5167         * (AccRsh),
5168         * (shiftLLeftOrResult),
5169         * (shiftRLeftOrResult),
5170         * (shiftRLong),
5171         * (shiftLLong): Implemented with pic16_emitpcode
5172         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5173         * (genLeftShift): Fixed bug, operand for shift by variable always
5174         was "and"ed with 0x0f,
5175         * (genLeftShiftLiteral),
5176         * (genrshTwo),
5177         * (genRightShiftLiteral): added debugging info,
5178         * (genrshFour): added comment,
5179         * (genRightShift): determined signedness from operand "left"
5180         instead of "result"
5181
5182 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5183
5184         * src/SDCCicode.c (geniCodeParms),
5185         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5186         function pointers, fixed function pointer bugs #861242 and #861896
5187
5188 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5189
5190         * device/include/c8051f000.h,
5191         * device/include/c8051f120.h,
5192         * device/include/c8051f300.h: added header files for Silicon
5193         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5194
5195 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5196
5197         * src/SDCCast.c (processParams): added new type flow and restructured
5198         (gatherAutoInit): added new type flow
5199         (addCast): cosmetic changes
5200         (getLeftResultType): added new type flow for array indices, patch
5201         provided by Stas, see FR #877103
5202         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5203         array index patch by Stas
5204         * src/SDCCast.h: added prototype getResultTypeFromType()
5205         * src/SDCCval.h,
5206         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5207         * src/pic/glue.c (pic14emitStaticSeg),
5208         * src/pic16/glue.c (pic16emitStaticSeg),
5209         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5210         for initialization of symbols
5211         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5212         * support/Util/SDCCerr.h:
5213         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5214         * .version: bumped version number to 2.3.8
5215         * device/include/Makefile.in (install),
5216         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5217         avoid warnings
5218
5219 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5220
5221         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5222         Slade Rich fixed an optimization bug
5223         * src/pic/pcodepeep.c,
5224         * src/pic/pcoderegs.c
5225         * doc/Makefile (install): added test for directory
5226
5227 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5228
5229         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5230         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5231         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5232         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5233         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5234         * as/mcs51/asexpr.c (term),
5235         * as/hc08/asexpr.c (term): fixed bug #887146
5236
5237 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5238
5239         * src/z80/gen.c (genMult): handle single byte result product
5240         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5241         DUMMY_READ_VOLATILE (fixed bug #886367)
5242
5243 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5244
5245         * support/regression/tests/libmullong.c: fixed logic, on little endian
5246         hosts we ended without a mullong_wrapper()
5247
5248 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5249
5250         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5251         virus/worm forged address usage.
5252
5253 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5254
5255         Fixed promotion, it should be done on AST level:
5256         * src/SDCCast.c (addCast): added promotion to int
5257         (decorateType): updated call to upCast()
5258         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5259         usualUnaryConversions()
5260
5261 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5262
5263         * support/regression/tests/literalop.c (mulWrapper): Added a
5264         wrapper to remove integer overflow warnings.
5265
5266         * support/regression/tests/float_trans.c: Made work on host.
5267
5268         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5269         location of sz80.
5270
5271         * support/regression/generate-cases.py (main): Changed from inline
5272         to a main method.
5273
5274         * doc/Makefile (install): Changed to depth first to get rid of
5275         missing directory install warning.
5276
5277         * as/Makefile (install-doc): Made work on Mac.
5278
5279 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5280
5281         * src/SDCCast.c: added an additional type flow in decorateType() of
5282         opposite direction, see feature request #860006; it's enabled at runtime
5283         by setting the environment variable SDCC_NEWTYPEFLOW
5284         * src/SDCCast.h: changed prototype of decorateType()
5285         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5286         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5287         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5288         see feature request #877103
5289         * src/SDCCval.c: updated call of decorateType()
5290         (valBitwise): fixed bug #882876
5291         (valMinus): added promotion
5292         (valLogicAndOr): result is unsigned
5293         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5294         * src/SDCCsymt.c (computeType),
5295         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5296         must not cause an unsigned operation
5297         * src/pic/glue (pic14emitRegularMap),
5298         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5299
5300 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5301
5302         * src/pic/pcode.c (PCodeID): commented out left over debug code
5303
5304 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5305
5306         * support/valdiag/tests/overflow.c: added shift tests
5307         * src/pic/device.c,
5308         * src/pic/gen.c,
5309         * src/pic/gen.h,
5310         * src/pic/glue.c,
5311         * src/pic/main.c,
5312         * src/pic/pcode.c,
5313         * src/pic/pcode.h,
5314         * src/pic/pcodepeep.c,
5315         * src/pic/pcoderegs.c,
5316         * src/pic/ralloc.c,
5317         * src/pic/ralloc.h: applied patch from Slade Rich;
5318         added support for multiple code pages and multiple RAM banks on the
5319         PIC 14 port. The ASM files now no longer simply assume all the
5320         code / RAM are in the same page / bank. This means the linker can
5321         safely allocate code/RAM of separate ASM files to different pages/banks.
5322         * doc/sdccman.lyx: added Slade's tips
5323         * src/mcs51/peeph.def: fixed bug #880768
5324
5325 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5326
5327         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5328         * src/SDCCast.c (decorateType): fixed bug #880197
5329
5330 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5331
5332         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5333         getopt.h.
5334
5335         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5336         strtof is not part of C89 and isn't included with Mac OS X.
5337
5338 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5339
5340         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5341         shiftL2Left2Result): fixed bug #879326
5342         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5343         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5344         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5345         address fetch for clr instruction
5346         * device/lib/hc08/_mulint.c: created optimized assembly version
5347         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5348
5349 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5350
5351         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5352         proposed in FR #877103
5353
5354 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5355
5356         * src/SDCCval.c (cheapestVal): added missing checks
5357         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5358         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5359
5360 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5361
5362         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5363         equal operands
5364
5365 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5366
5367         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5368         loaded with the linker search paths (-L arguments) and the libraries
5369         to be linked with the current source (-l arguments). Changes
5370         currently will affect only the pic16 port.
5371         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5372         include path the port specific paths and port specific libraries,
5373         * gplink command now contains the $3 argument,
5374         * src/pic16/device.h,
5375         * src/pic16/device.c,: structure PIC_device is made public and
5376         renamed to PIC16_device, the same for variable Pics which is renamed
5377         to Pics16. Updated all references to them.
5378         * src/pic16/glue.c (pic16glue): corrected bug with code
5379         initialization which bypassed the variable initializations block.
5380
5381         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5382         COMPILE_FLAGS and added the --nostdinc option
5383
5384 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5385
5386         * device/include/mc68hc908jb8.h: Register defs for another member
5387         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5388
5389 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5390
5391         Documenting changes from previous commits.
5392         * configure.in (version 1.56),
5393         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5394         when generating output files to configure the pic16 library,
5395         but now I've commented it out, since gputils aren't installed in the
5396         SF compile farm, so library won't compile
5397
5398         * device/lib/Makefile.in (version 1.56): initially I've added in
5399         target 'all' the prerequestive 'model-pic16' so it compiled the
5400         pic16 library, but now I've commented it out for the same reasons
5401         above,
5402         * added targets 'model-pic16' and 'objects-pic16' to compile the
5403         library
5404         * added target 'port-specific-objects-pic16' to handle the
5405         generated libraries and copy them into the build/ directory
5406         * added target 'clean-intermediate-pic16' to clean intermediate
5407         files into pic16 directory
5408         * in target 'installdirs' added line to create directory pic16 in
5409         the installation path
5410
5411         * device/include/Makefile.in (version 1.11): in target 'install'
5412         added lines to copy all header files to installation path,
5413         * in target 'installdirs' added line create directory for pic16
5414         headers in the installation path
5415
5416 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5417
5418         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5419          a function call
5420
5421 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5422
5423         * configure,
5424         * device/lib/configure.in,
5425         * device/lib/configure: fixed for autoconf 2.57
5426
5427 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5428
5429         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5430         option so that it actually works. Made it specific to the z80, since
5431         the gbz80 doesn't have these kinds of I/O ports.
5432
5433 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5434
5435         * device/include/z180.h,
5436         * device/lib/_memcpy.c,
5437         * device/lib/_memmove.c,
5438         * device/lib/_mulint.c,
5439         * device/lib/ser_ir.c,
5440         * device/lib/ser_ir_cts_rts.c,
5441         * device/lib/_strcmp.c,
5442         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5443         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5444         portmode; added deprecation warning for bank= and protmode= forms.
5445         Also, guard against buffer overflow.
5446         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5447
5448 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5449
5450         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5451         changed interrupt vector table generation to only emit declared vectors.
5452         * device/include/Makefile.in: added missing backslash
5453         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5454
5455 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5456
5457         Mainly changes to support compilation of the device libraries
5458         * src/pic16/device.c: stack is allocated via symbol and not
5459         via literal number. The symbol is placed in the corresponding
5460         position of the data ram
5461         * (pic16_dump_section): relocatable and absolute uninitialized
5462         data are now emitted in sorted order to reduce section naming,
5463         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5464         weren't marked as being in the access bank,
5465
5466 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5467
5468         Added portion of GNU PIC Library under the directory
5469         device/include/pic16 and device/lib/pic16. These files
5470         contain the declarations of SFRs for the PIC18Fxx2 devices.
5471         The directory is initialized via configure from toplevel.
5472
5473 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5474
5475         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5476         the spilllocations to be compared correctly
5477
5478 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5479
5480         * src/SDCCast.c (decorateType): fixed bug introduced today
5481
5482 2004-01-12  Borut Razem <borut.razem AT siol.net>
5483
5484         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5485         doc/sdccman.lyx: upper case pragmas are deprecated
5486
5487 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5488
5489         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5490         in simpler and even better code
5491
5492 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5493
5494         * src/SDCCicode.c (operandOperation): fixed bug #874819
5495         * src/SDCCast.c (decorateType): fixed
5496         char foo (unsigned long ul) { return ul > 0; }
5497
5498 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5499
5500         * doc/sdccman.lyx: Moved and added some sections, small changes
5501         all over. Telling LaTeX to be less strict with word spacing
5502         to better keep the right margin. Changed some notes about
5503         maintainance of the ports in section 3.2.1 - is it OK like this?
5504
5505 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5506
5507         SDCC source changes:
5508         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5509         convilong): modified to inform the pic16 port that builtin functions
5510         are external
5511
5512         PIC16 PORT specific changes:
5513         * src/pic16/device.c pic16_dump_equates() added,
5514         processor registers declared internally by the port are emitted in
5515         the translation as equates,
5516         * src/pic16/gen.c: inline code is passed unprocessed to the
5517         translation,
5518         * (pic16_popGetLit2): fnuction modified to take second operand as
5519         pCodeOp pointer and not as literal,
5520         * (popRegFromIdx): prefixed with pic16_,
5521         * (pic16_popCombine2): modified to receive already allocated pCode
5522         operands,
5523         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5524         * (genFunction): initializes local stack frame and pushes on stack
5525         all the registers used by this function,
5526         * (genEndFunction): restores all registers from stack and restores
5527         stack frame,
5528         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5529         improvements,
5530         * (pic16glue): changed the program startup sequence,
5531         * added new dbName code 'A' for functions placed in absolute section
5532         * src/pic16/main.c: added function attribute _naked,
5533         * added pragma 'code' to place a fnuction at an absolute address,
5534         * added command line arguments --debug-ralloc and --pcode-verbose,
5535         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5536         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5537         * (pic16_newpCodeOpLit2): modified to take the second operand as
5538         pCodeOp pointer,
5539         * (pic16_printpBlock): modified to emit each function in a separate
5540         section,
5541         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5542         UPPER for immediate operands,
5543         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5544         instruction,
5545         * src/pic16/peeph.def: all peepholes with movff are commented out,
5546         because there is a problem in the pcode peep optimizer,
5547         * src/pic16/ralloc.c: the register allocator can now reuse local
5548         function symbols for another function. This saves register usage.
5549         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5550
5551         Added file src/pic16/NOTES with information about program writing on
5552         the current port version.
5553
5554 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5555
5556         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5557         and peephole 252 (array access)
5558
5559 2004-01-09  Borut Razem <borut.razem AT siol.net>
5560
5561         * src/SDCCmain.c : fixed #872250: -l command line defined library
5562           files are scanned before standard library files
5563
5564 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5565
5566         * src/SDCCast.c (decorateType): fixed bug #874046
5567
5568 2004-01-09  Borut Razem <borut.razem AT siol.net>
5569
5570         * support/scripts/sdcc.nsi: remove previous installation
5571
5572 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5573
5574         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5575         bytes for last interrupt vector (mcs51)
5576         * sdcc.spec: fixed typo
5577
5578 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5579
5580         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5581         gen51Code): more efficient parameter receive for --model-large
5582         ("bug" #845294)
5583
5584 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5585
5586         * src/ds390/main.c,
5587         * src/z80/main.c: added missed needLinkerScript flags (more than
5588         one port structure defined in these file)
5589         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5590         bug #795325
5591
5592 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5593
5594         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5595         * src/port.h: added flag needLinkerScript in port->linker
5596         structure to inform whether to create a .lnk file or not,
5597         * src/avr/main.c,
5598         * src/ds390/main.c,
5599         * src/hc08/main.c,
5600         * src/mcs51/main.c,
5601         * src/pic/main.c,
5602         * src/pic16/main.c,
5603         * src/xa51/main.c,
5604         * src/z80/main.c: changed appropriately to configure
5605         needLinkerScript flag
5606         * src/pic/gen.c,
5607         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5608         * src/pic/glue.c: added variable udata_section_name to
5609         override default uninitialized data segment definition for
5610         devices only with SHAREBANK memory (reported from Erik Epetrich)
5611         * (pic14emitOverlay): modified to emit a commented overlay segment
5612         directive when no overlay data exist
5613         * (picglue): modified to emit uninitialized data segment
5614         according to udata_section_name
5615         * src/pic/main.c (_pic14_parseOptions): added command line
5616         options --udata-section-name=[name] to override default
5617         udata definition name
5618         * modified _linkCmd and _asmCmd to include compiler passed
5619         arguments via -W option
5620         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5621         object file from '.rel' to '.o' in port->linker structure,
5622         changed size of fptr from 2 to 3 in port structure
5623
5624 2004-01-07  Borut Razem <borut.razem AT siol.net>
5625
5626         * support/scripts/sdcc.nsi: update PATH
5627         * support/scripts/sdcc.ico: craeted
5628
5629 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5630
5631         * device/include/Makefile.in: fix install
5632         * doc/Makefile: fix install
5633
5634 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5635
5636         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5637         in bug #860505
5638         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5639         how the function variable allocation summary is displayed; also
5640         include information about variables allocated to the overlay
5641         segment
5642
5643 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5644
5645         * as/mcs51/lkmain.c: Help about -Y option
5646         * as/mcs51/lkarea.c: Fixed gcc warnings
5647
5648 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5649
5650         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5651         fixed warning
5652         * support/valdiag/tests/overflow.c: added
5653         * src/SDCCast.c (decorateType),
5654         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5655         LEFT_OP (left shift)
5656
5657 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5658
5659         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5660         (default behaviour).
5661
5662 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5663
5664         A python script to validate compiler diagnostic messages. It can be
5665         used to verify that sdcc complains about bad c source code and
5666         gives a good location of the error.
5667         * support/valdiag/Makefile,
5668         * support/valdiag/valdiag.py,
5669         * support/valdiag/tests/*
5670
5671 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5672
5673         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5674         * src/SDCCsymt.c (newEnumType),
5675         * src/SDCCsymt.h
5676         * support/Util/SDCCerr.c,
5677         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5678         enum related bugs.
5679         * support/regression/tests/enum.c: added test for enum values that
5680         require at least 2 bytes of storage.
5681
5682 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5683
5684         * src/common.h: added ifndef/define/endif macros
5685         around the header file.
5686         Bug reported from Jesus Calvino-Fraga
5687
5688 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5689
5690         * sdcc.spec: updated
5691         * device/include/Makefile.in: don't install CVS directories
5692         * device/lib/Makefile.in: added removal of CVS directories after install
5693         * doc/Makefile: fixed install, added local_icons
5694         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5695         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5696         * src/ds390/gen.c (genRightShift): fixed bug #870788
5697         * src/SDCCast.c (decorateType): fixed bug #870781
5698
5699 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5700
5701         PIC16 port related changes:
5702         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5703         added variable stackPos,
5704
5705         * gen.c: genCall, assignResultValue: added support for
5706         pushing/retrieving function parameters to/from stack,
5707         genFunction,genEndFunction: setup stack frame for the
5708         generated function,
5709         genAddrOf: will be changed according to bug 863624
5710
5711         * added files genutils.c and genutils.h which contain gen*
5712         debugged and optimised functions extracted from gen.c
5713
5714         * glue.c: added variable 'externs' which holds extern symbols,
5715         pic16emitRegularMap: is modified to properly handle relocatable
5716          symbols under the new scheme,
5717         pic16createInterruptVect: is modified
5718         pic16printPublics: is modified to emit 'global' assembler directives,
5719         added pic16_printExterns to print extern symbols,
5720         pic16glue: initializes stack/frame pointer in the beginning of
5721         the assembly output. Temporary hack, will be corrected later,
5722         because gplink yet does not support stack and SDCC does not
5723         yet support a type of crt0.o object to create the final binary.
5724
5725         * Removed many lines that contain 8051 legacy code.
5726         * The code is finally placed under a 'code' directive.
5727         * Added port specific options.
5728
5729         * _process_pragma: simplified since now we do not need *special*
5730         include file to define SFR registers. But a separate header
5731         will be needed. This will be developed later.
5732         * _pic16_parseOptions: added, parses port specific options:
5733         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5734         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5735         --preplace-udata-with=
5736
5737         * _pic16_setDefaultOptions: modified to initialize section names,
5738         but hack is temporarly out of order since it needs improvement.
5739         * _pic16_genAssemblerPreamble: configuration words are emitted by
5740         their address instead of their name. This part is incomplete and
5741         supports only the 18Fxx2 devices. Other devices will emit an error
5742         during assembly since they do not contain the same set of config
5743         registers
5744         * _pic16_genIVT: is modified,
5745
5746         * pcode.c: added definitions for some hardware registers that are needed
5747         for stack support
5748         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5749         All PCI entries are updated. Now LFSR is supported.
5750         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5751         * added pic16_newpCodeOpLit2 to support instructions with
5752         two literal arguments
5753         * pic16_pCode2str: corrected code that emits assembler instructions
5754         with two literal operands and those that have an access bit modifier
5755         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5756         this fixes a bug which caused some labels to be lost, when an
5757         assembler directive was added, i.e. banksel,
5758         * pic16_FixRegisterBanking: improved logic that causes the insertion
5759         of bank switching,
5760         * InlineFunction: functions that are called once, are not any more
5761         inlined. This can be a port option in the future,
5762
5763         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5764
5765         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5766         hold the corresponding uninitialized symbols,
5767         * pic16_allocProcessorRegister: registers have explicit marked the
5768         accessBank field,
5769         * pic16_allocInternalRegister: registers are explicit marked as
5770         not used,
5771         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5772         processing list, so bit registers were lost,
5773         *
5774
5775         * ralloc.h: added field 'accessBank' and original symbol operand
5776         in register definition,
5777         * removed the field isMapped from register definition,
5778
5779         ** Several functions have been removed from various sources:
5780         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5781         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5782         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5783         pic16_assignRelocatableRegisters
5784
5785         ** others have been introduced:
5786         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5787         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5788
5789 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5790
5791         * support/scripts/inc2h.pl: changed definition of BIT_AT
5792         to emit 'sbit at' instead of 'bit at'. This was a request.
5793
5794         PIC16 port related preliminary changes:
5795         * gen.c: prefixed function popRegFromString with
5796         pic16_ and all references to it corrected
5797         * pcode.c: all pic16_pc_* hardware registers prefixed
5798         with underscore (_),
5799         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5800         * ralloc.c: newReg(): when register is REG_SFR then
5801         set address to rIdx,
5802         pic16_allocProcessorRegister(): marks register wasUsed=0
5803         pic16_writeUsedRegs(): added a call to assign processor
5804         registers via pic16_assignFixedRegisters
5805
5806 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5807
5808         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5809         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5810         variables in unused register banks.  Also the SSEG is placed
5811         wherever there is enough space for it, and IDATA can be anywhere
5812         in internal RAM.  For now compile using -Wl-Y[stack_size].
5813         The mem file is different for this option as well, since it
5814         makes no sense of talking about DSEG lenght.
5815
5816 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5817
5818         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5819         in certain cases, e.g. when ROM assignment, patch provided
5820         from Albert den Haan.
5821
5822 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5823
5824         Many signedness and type propagation fixes:
5825         * src/SDCCicode.c: made geniCodeCast() static
5826         replaced SPEC_ by IS_ (cosmetic)
5827         (operandOperation): fixed div and mod operation
5828         (usualBinaryConversions): added support for promotion of char
5829         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5830         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5831         (geniCodeAdd): an array index will stay unsigned, even if promoted
5832         from char to int
5833         (geniCodeArray): ditto
5834         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5835         * src/SDCCsymt.c (computeType): added more support for char;
5836         promotion of char is selectable by promoteCharToInt, fixed signedness
5837         for all cases
5838         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5839         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5840         * src/SDCCval (val*): replaced signedness calculation by
5841         computeType()
5842         rearranged if-branches (cosmetic)
5843         (valShift): added warning W_SHIFT_CHANGED
5844         (valCompare): fixed problem with different types
5845         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5846         * support/regression/tests/literalop.c: added many cases
5847         * support/regression/tests/ast_constant_folding.c: changed finally to
5848         'unsigned int'
5849         * .version: new year, new version: 2.3.7
5850         * src/SDCCmain.c (main): applied patch #866468
5851         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5852         provided by Scott Bronson
5853         * doc/sdccman.lyx: updated documentation for sdcdb
5854         updated and added chapter tips
5855
5856 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5857
5858         * src/SDCCsymt.h: missing from yesterday's commits
5859
5860 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5861
5862         * src/SDCC.y (struct_or_union_specifier),
5863         * support/Util/SDCCerr.c,
5864         * support/Util/SDCCerr.h: verify that struct & union tags are used
5865         as declared.
5866
5867 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5868
5869         * src/SDCCglobl.h: missing from yesterday's commits
5870
5871 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5872
5873         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5874         sft_attributes, struct_declaration, parameter_declaration,
5875         type_name, start_block, declaration_list),
5876         * src/SDCC.lex (check_type): support redefinition of typedef names
5877
5878 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5879
5880         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5881         aligned xdata arrays. Erik helped me with the if clause.
5882
5883 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5884
5885         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5886         warning
5887
5888 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5889
5890         * src/SDCCast.h,
5891         * src/SDCCast.c (newAst_),
5892         * src/SDCCicode.h,
5893         * src/SDCCicode.c (ast2iCode, newiCode),
5894         * src/SDCCglobl.h,
5895         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5896         expr, statement, expression_statement, selection_statement,
5897         iteration_statement, expr_opt, jump_statement): foundation for tracking
5898         sequence points
5899         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5900         point code too)
5901
5902 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5903
5904         * support/Util/SDCCerr.c,
5905         * src/SDCCast.h,
5906         * src/SDCCast.c (createCase, createDefault, decorateType),
5907         * src/SDCClabel.c (labelUnreach),
5908         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5909         to error messages.
5910         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5911         (with thanks to Stas Sergeev)
5912         * device/include/time.h,
5913         * device/lib/time.c (CheckTime): suppress unreachable code warning
5914
5915 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5916
5917         * src/SDCCast.c (createIvalCharPtr),
5918         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5919         bug #753752)
5920         * support/regression/tests/nullstring.c: tests for these two bugs
5921
5922 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5923
5924         * support/Util/SDCCerr.h,
5925         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5926         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5927         about storage class and 'at' used inside struct or union
5928         * src/SDCCBBlock.c (iCodeFromeBBlock),
5929         * src/SDCCcse.c (ifxOptimize),
5930         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5931         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5932         printIval, emitStaticSeg, emitOverlay),
5933         * src/SDCClabel.c (deleteIfx),
5934         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5935         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5936         gatherAutoInit, processParms),
5937         * support/Util/SDCCerr.h,
5938         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5939         reporting for post-parse errors.
5940
5941 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5942
5943         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5944         implicit casts via union; they don't work on big endian systems
5945         (possible fix for bug #861138)
5946
5947 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5948
5949         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5950         * src/mcs51/main.c: fixed the fix for bug #737001
5951
5952 2003-12-15  Borut Razem <borut.razem AT siol.net>
5953
5954         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5955
5956 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5957
5958         * support/makebin/makebin.c: put output in binary mode
5959
5960 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5961
5962         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5963         xdata and data memory on startup. Set the environment variable
5964         SDCC_NOGENRAMCLEAR to disable this.
5965         * src/mcs51/peephole.def,
5966         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5967         (allows non-interrupt and interrupt code to safely compete for a resource
5968         without the non-interrupt code having to disable interrupts)
5969
5970 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5971
5972         * src/SDCCicode.c (geniCodeAdd),
5973         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5974         with valFromType if type might be a pointer and host is big endian).
5975         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5976         types, not just integer types.
5977         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5978         multiply defined with mismatching "at" address.
5979
5980 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5981
5982         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5983         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5984         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5985         with embedded nulls (fixed bug #753752)
5986
5987 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5988
5989         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5990         Apparently this did not see much testing (endless loop)
5991
5992 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5993
5994         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5995
5996 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5997
5998         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5999         gracefully handle NULL memmap pointers
6000
6001 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6002
6003         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6004         instead of deleting the iCode when an operand is volatile
6005         * src/z80/gen.c (genDummyRead),
6006         * src/mcs51/gen.c (genDummyRead),
6007         * src/ds390/gen.c (genDummyRead),
6008         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6009         not just IC_RIGHT
6010         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6011         * src/SDCC.y: fixed bug #850420
6012
6013 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6014
6015         Applied z80 i/o port patch from Peter Townson and fixed some operators
6016         to better handle operands in A register.
6017         * device/include/z180.h
6018         * src/SDCC.y
6019         * src/SDCCglue.c
6020         * src/z80/gen.c
6021         * src/z80/gen.h
6022         * src/z80/main.c
6023         * src/z80/peeph-z80.def
6024         * src/z80/peeph.def
6025         * src/z80/z80.h
6026
6027 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6028
6029         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6030
6031 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6032
6033         * device/lib/hc08/_mullong.c: Removed extra #endif
6034
6035 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6036
6037         * sim/ucsim/hc08.src/inst.cc,
6038         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6039         carries from x to h
6040         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6041         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6042         * device/include/stdarg.h: fixed varargs for hc08
6043         * device/lib/Makefile.in,
6044         * device/lib/hc08/Makefile,
6045         * device/lib/hc08/_mulint.c,
6046         * device/lib/hc08/_mullong.c: fixed some endian problems
6047
6048 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6049
6050         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6051         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6052         * device/lib/_gptrget.c,
6053         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6054
6055 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6056
6057         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6058         * src/SDCCast.c (astErrors): fixed bug #846007
6059         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6060
6061 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6062
6063         * src/SDCCast.c (decorateType): disabled a transformation I added in
6064         revision 1.188 (access to fields of a structure at an absolute address);
6065         it breaks with bitfields, extern declarations, and gcse analysis.
6066         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6067         could be assigned through a pointer, so don't complain.
6068         * src/SDCCast.c (astErrors),
6069         * src/SDCCast.h,
6070         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6071
6072 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6073
6074         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6075         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6076         output of __config directives, since gpasm now supports them
6077         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6078         pre-processor macro, i.e. -DMCU=p18f452
6079         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6080         and modified to handle 'cast' icode similarly to '=' icode
6081         * src/pic16/device.h (typedef struct PIC_device): added field
6082         'extMIface' to indicate that chip has external memory interface
6083         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6084         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6085         18F8720
6086
6087 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6088
6089         * src/SDCC.y (pointer): fixed bug #846006
6090         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6091         * src/SDCCast.c (decorateType): fixed bug #846009
6092         * src/ds390/peeph.def,
6093         * src/ds390/gen.c (genAnd, genOr),
6094         * src/mcs51/peeph.def,
6095         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6096
6097 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6098
6099         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6100         * src/SDCCdflow.c
6101         * src/SDCCcse.c
6102         * src/SDCCcse.h
6103         * src/SDCCBBlock.h
6104         * src/SDCCBBlock.c
6105
6106 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6107
6108         fixed bug #845089
6109         * src/SDCCbitv.h,
6110         * src/SDCCbitv.c: added function to free a bitvector
6111         * src/SDCClrange.h,
6112         * src/SDCClrange.c: added function to recompute the liveranges
6113         * src/avr/ralloc.c,
6114         * src/ds390/ralloc.c,
6115         * src/hc08/ralloc.c,
6116         * src/mcs51/ralloc.c,
6117         * src/pic/ralloc.c,
6118         * src/pic16/ralloc.c,
6119         * src/xa51/ralloc.c,
6120         * src/z80/ralloc.c: recompute the liveranges after register packing
6121
6122 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6123
6124         * src/SDCCloop.c (newInduction): fixed bug #845630
6125
6126 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6127
6128         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6129         inadvertantly left behind from my 2003-11-12 change
6130
6131 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6132
6133         Updated headers I neglected to commit yesterday.
6134         * src/SDCClrange.h,
6135         * src/SDCCicode.h
6136
6137 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6138
6139         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6140         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6141         * src/SDCCopt.c (eBBlockFromiCode),
6142         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6143         the creation of the key hash table from the sequencing so it can be used
6144         earlier (for some GCSE bug fixes still pending)
6145
6146 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6147
6148         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6149         * support/regression/tests/addsub.c: testing genPlus shortcut
6150
6151 2003-11-15  Borut Razem <borut.razem AT siol.net>
6152
6153         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6154
6155 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6156
6157         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6158         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6159         ordering is immaterial.
6160         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6161
6162 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6163
6164         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6165         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6166         (SIGSEV) of bug #840381
6167         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6168         unlink new file before rename if new and old filenames are the same)
6169
6170 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6171
6172         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6173         uninitialized variables) for the mcs51. Set environment variable
6174         SDCC_GENRAMCLEAR to test.
6175         xdata initialization slightly shorter
6176
6177 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6178
6179         * src/SDCCsymt.h,
6180         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6181         #838241 & 780691 (basicly the same bug)
6182         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6183         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6184
6185 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6186
6187         * src/SDCCmain.c (linkEdit): "fix" #834252
6188
6189 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6190
6191         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6192         * src/SDCCast.h,
6193         * src/SDCC.y: fixed bug #819403
6194
6195 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6196
6197         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6198         the reentrant attribute.
6199         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6200         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6201         simulation
6202         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6203         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6204         erroneously reduced to a literal.
6205         * src/hc08/ralloc.c (packRegisters, rematStr),
6206         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6207         some cases
6208
6209 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6210
6211         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6212         * doc/sdccman.lyx: changed from 'article' to 'book'
6213         * doc/Makefile: readded test_suite_spec and cdbfileformat
6214
6215 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6216
6217         * device/include/stdlib.h: include malloc.h to comply with ANSI
6218         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6219
6220 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6221
6222         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6223         * doc/clean.mk: also remove *.out files
6224         * doc/sdccman.lyx: some additions, larger top/bottom margins
6225
6226 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6227
6228         * src/SDCC.y: fixed bug #837365
6229         * support/regression/tests/bitopcse.c
6230         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6231         a symbol (might be valop instead)
6232         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6233         * device/lib/clean.mk: added hc08 to the cleaning list
6234
6235 2003-11-04  Borut Razem <borut.razem AT siol.net>
6236
6237         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6238           made 2003-11-04
6239         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6240           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6241           malloc is declared in standard stdlib.h
6242
6243 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6244
6245         * device/lib/hc08/Makefile: need to clean .rel not .o files
6246         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6247
6248 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6249
6250         * src/port.h,
6251         * src/hc08/main.c,
6252         * src/mcs51/main.c,
6253         * src/ds390/main.c,
6254         * src/z80/main.c,
6255         * src/avr/main.c,
6256         * src/pic/main.c,
6257         * src/pic16/main.c,
6258         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6259         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6260         tests (which uses the port's oclsExpense function)
6261         * src/SDCC.y,
6262         * src/SDCCast.c,
6263         * src/SDCCicode.c,
6264         * src/hc08/gen.c,
6265         * src/ds390/gen.c,
6266         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6267
6268 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6269
6270         * src/SDCCcse.c (ifxOptimize),
6271         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6272         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6273         deleting the IFX iCode.
6274         * src/hc08/ralloc.c: reduced unneeded slocs
6275         * src/hc08/gen.c: fixed bug in asmopToBoolean
6276
6277 2003-11-04  Borut Razem <borut.razem AT siol.net>
6278
6279         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6280           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6281           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6282           transferred to configure
6283
6284 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6285
6286         Use headers defined in the C[++] standards:
6287         * sim/ucsim/gui.src/serio.src/fileio.cc
6288         * sim/ucsim/gui.src/serio.src/frontend.cc
6289         * sim/ucsim/gui.src/serio.src/main.cc
6290         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6291         * support/Util/NewAlloc.c
6292         * as/hc08/lklibr.c
6293         * as/mcs51/lklibr.c
6294         * as/z80/aslist.c
6295         * as/z80/assym.c
6296
6297 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6298
6299         * Added MSVC projects for hc08 assembler and linker:
6300         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6301         /as/hc08/link_hc08.dsp
6302
6303 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6304
6305         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6306
6307 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6308
6309         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6310
6311 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6312
6313         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6314
6315 2003-10-31  Borut Razem <borut.razem AT siol.net>
6316
6317         * support/cpp2/cpplib.h,
6318           support/cpp2/cpplib.c,
6319           support/cpp2/cpplex.c,
6320           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6321           to switch _asm block preprocessing on / off. Default is
6322           #pragma preproc_asm +
6323
6324 2003-10-31  Borut Razem <borut.razem AT siol.net>
6325
6326         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6327           when outputting comment blocks (when executed with -C option) and
6328           _asm (SDCPP specific) blocks
6329
6330 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6331
6332         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6333
6334 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6335
6336         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6337
6338 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6339
6340         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6341         * src/SDCCast.c (decorateType): fixed bug #832664
6342
6343 2003-10-31  Borut Razem <borut.razem AT siol.net>
6344
6345         * support\cpp2\cpplex.c: fixed for SDCPP:
6346           comments(when executed with -C option) and _asm blocks
6347           were included even if they where in skipped #if block.
6348           Applied solution from GCC cpp 3.3.2
6349
6350 2003-10-31  Borut Razem <borut.razem AT siol.net>
6351
6352         * src/SDCC.lex: sdcc now understands both formats:
6353           '# <line_number> <file_name>' and
6354           '#line <line_number> <file_name>'
6355         * support/cpp2/cppmain.c: sdcpp now generates the standard
6356           '# <line_number> <file_name>' instead of former
6357           '#line <line_number> <file_name>'
6358
6359 2003-10-30  Borut Razem <borut.razem AT siol.net>
6360
6361         * support/cpp2/cpphash.h,
6362         * support/cpp2/cpplib.h
6363         * support/cpp2/cpplex.c,
6364         * support/cpp2/cppmain.c,
6365         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6366
6367 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6368
6369         Fixed a number of problems revealed by bug #827883.
6370         * src/SDCCloop.c (loopInvariants): Spill location of the
6371         result operand should be recomputed if extracted from
6372         a loop. Also, don't extract assignments of an iTemp
6373         from a literal.
6374         * src/SDCCast.c (isConformingBody): loop reversal should
6375         not occur if the control variable is involved with a
6376         relational operator.
6377
6378 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6379
6380         * .version: bumped to 2.3.6 to reflect the big improvements
6381         made by Erik and Klaus. Thanks!
6382
6383 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6384
6385         Replaced the livrange code.
6386         * src/SDCClrange.c: added new LR code
6387         * src/SDCCloop.c,
6388         * src/SDCCBBlock.h: removed remainig parts from old LR code
6389         * src/ds390/ralloc.c,
6390         * src/ds390/gen.c: minor fixes to make it work with new code
6391
6392 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6393
6394         * as/hc08/asm.h,
6395         * as/hc08/lkrloc.c,
6396         * src/hc08/gen.c,
6397         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6398         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6399         (tweaked fix for bug #818696)
6400
6401 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6402
6403         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6404
6405 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6406
6407         * src/SDCCmain.c,
6408         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6409         * src/mcs51/gen.c (gencjneshort),
6410         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6411         more efficient (per Scott Bronson's suggestion)
6412
6413 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6414
6415         Extended the semantics of the critical keyword to include
6416         individual statements. See RFE #827755 and #799831
6417         * src/SDCC.y
6418         * src/SDCCicode.c
6419         * src/SDCCopt.c
6420         * src/SDCCast.c
6421         * support/Util/SDCCerr.c
6422         * support/Util/SDCCerr.h
6423         * src/mcs51/gen.c
6424         * src/ds390/gen.c
6425         * src/hc08/gen.c
6426
6427 2003-10-19  Borut Razem <borut.razem AT siol.net>
6428
6429         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6430
6431 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6432
6433         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6434         Fixed bug #818696
6435         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6436         and predecrement operand is displayed
6437
6438 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6439
6440         * src/SDCCval.c (valMinus): fixed bug #826041
6441
6442 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6443
6444         Some hc08 related updates that I missed earlier
6445         * sim/ucsim/stypes.h
6446         * support/regression/ports/hc08/spec.mk
6447
6448 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6449
6450         New target "hc08" for the Motorola 68hc08 family of micros
6451
6452         * configure
6453         * configure.in
6454         * Makefile
6455         * src/hc08/*
6456         * src/SDCCmain.c
6457         * src/port.h
6458         * sim/ucsim/hc08.src/*
6459         * sim/ucsim/configure.in
6460         * src/ucsim/configure
6461         * sim/ucsim/packages_in.mk
6462         * as/hc08/*
6463         * as/Makefile
6464         * device/include/mc68hc908qy.h
6465         * device/lib/hc08/*
6466         * device/lib/Makefile.in
6467         * support/regression/ports/hc08/*
6468         * support/regression/Makefile
6469
6470 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6471
6472         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6473         regression test
6474         * src/ds390/gen.c (genCast): fixed bug #821957
6475
6476 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6477
6478         * device/lib/logf.c: "fixed" overlay bug
6479         * support/regression/ports/host/spec.mk: added m library
6480         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6481         * support/regression/tests/float_trans: added (for Eric)
6482
6483 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6484
6485         * src/mcs51/gen.c (genCpl): fixed bug
6486         http://sf.net/mailarchive/message.php?msg_id=6263915
6487
6488 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6489
6490         * src/SDCCast.c (decorateType): added extended constant folding
6491         * src/SDCCsymt.c (computeType): cleanup
6492         * src/SDCCval.c (valShift): minor optimization
6493         * support/regression/tests/ast_constant_folding.c: added
6494
6495 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6496
6497         * src/SDCCmain.c: removed some unintended changes
6498
6499 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6500
6501         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6502         * src/z80/gen.c: fixed part of bug #817589
6503         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6504
6505 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6506
6507         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6508         * src/SDCCcflow.c
6509         * src/SDCCcse.c
6510         * src/SDCCdflow.c
6511         * src/SDCClabel.c
6512         * src/SDCClrange.c
6513         * src/SDCCmem.c
6514         * src/SDCCopt.c
6515         * src/SDCCpeeph.c
6516         * src/SDCCset.c
6517         * src/avr/ralloc.c
6518         * src/ds390/ralloc.c
6519         * src/izt/ralloc.c
6520         * src/mcs51/ralloc.c
6521         * src/pic/ralloc.c
6522         * src/pic16/ralloc.c
6523         * src/xa51/ralloc.c
6524         * src/z80/ralloc.c
6525         * src/z80/gen.c: removed unused label "release:"
6526
6527 2003-10-06  Borut Razem <borut.razem AT siol.net>
6528
6529         * src/SDCC.lex: removed definition of unused variables
6530           save_optimize and save_options
6531
6532 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6533
6534         * clean.mk: removed '=' in "-maxdepth=1"
6535         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6536         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6537
6538 2003-10-06  Borut Razem <borut.razem AT siol.net>
6539
6540         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6541           my_unput() replaced by unput()
6542
6543 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6544
6545         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6546         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6547         type-punned pointer will break strict-aliasing rules"
6548         Old LR behaviour is again default; Klaus' LR can be choosen by
6549         defining the environment variable LRKLAUS
6550         * src/SDCCBBlock.h
6551         * src/SDCCloop.c
6552         * src/SDCClrange.c
6553         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6554         * clean.mk: fixed removal of files in bin/CVS/
6555         * device/lib/clean.mk: fixed removal of directories small and large
6556         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6557         * src/SDCCicode.c,
6558         * src/SDCCval.c: removed superflous test for pedantic
6559
6560 2003-10-05  Borut Razem <borut.razem AT siol.net>
6561
6562         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6563           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6564           message "unmatched #pragma SAVE and #pragma RESTORE"
6565
6566 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6567
6568         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6569           assembly, critical functions, atomic, nojtbound)
6570
6571 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6572
6573         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6574         * src/SDCCBBlock.h
6575         * src/SDCCloop.c
6576         * src/SDCCloop.h
6577         * src/SDCClrange.c
6578
6579 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6580
6581         * src/z80/gen.h,
6582         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6583         * src/mcs51/gen.h
6584         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6585         * src/ds390/gen.h
6586         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6587         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6588         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6589
6590 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6591
6592         * src/z80/gen.c (genRet): fixed bug #524753
6593         * src/z80/gen.c (genCast): fixed internal error on cast from
6594         pointer to long
6595         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6596         fix for bug #477835 to the z80
6597         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6598         for tracking iCodes in the peephole optimizer for z80
6599
6600 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6601
6602         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6603         the other part of bug #814548
6604         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6605
6606 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6607
6608         * src/SDCCcse.c: fixed part of bug #814548
6609
6610 2003-09-28  Borut Razem <borut.razem AT siol.net>
6611
6612         * src/asm.c: rewrite of printILine() to use temporary file instead
6613           a pipe
6614         * src/xa51/main.c: commented out declaration of int rewinds
6615
6616 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6617
6618         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6619
6620 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6621
6622         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6623         * src/asm.c (printILine): Fixed bug #811015
6624
6625 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6626
6627         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6628         freeing.
6629
6630 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6631
6632         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6633         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6634         to correctly handle general case of AOP_PAIRPTR
6635         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6636
6637 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6638
6639         * src/mcs51/ralloc.c (fillGaps),
6640         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6641         register positioning bug)
6642
6643 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6644
6645         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6646
6647 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6648
6649         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6650         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6651         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6652         (ralloc doesn't intentionally do this now, but perhaps later)
6653         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6654         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6655         register positioning bugs (Fixed bug #762602 and #795325)
6656         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6657         (Fixed bug #808779)
6658         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6659         lines that --i-code-in-asm generates
6660
6661 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6662
6663         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6664         trying to fclose a FILE* that was already closed.
6665
6666 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6667
6668         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6669         of const struct should be treated as if const themselves)
6670
6671 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6672
6673         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6674
6675 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6676
6677         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6678         Unix (/n) and DOS (/r/n) line terminations.
6679
6680 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6681
6682         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6683         bug #613775
6684
6685 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6686
6687         * src/mcs51/gen.c (genFunction, genEndFunction),
6688         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6689         and restore of EA so that stack offsets to parameters are
6690         correct when using both critical and reentrant/stack-auto.
6691         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6692         size (can be triggered in error if sloc is shared between
6693         different sized objects)
6694         * device/include/float.h: fixed macros to explicitly use
6695         unsigned long where needed
6696
6697 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6698
6699         Feature req. 799831: added code to allow nesting of critical functions
6700         * src/mcs51/gen.c (genFunction, genEndFunction)
6701         * src/ds390/gen.c (genFunction, genEndFunction)
6702
6703 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6704
6705         * src/SDCCsymt.c (sclsFromPtr),
6706         * src/SDCCsymt.h,
6707         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6708         support for standard C idiom of memory mapped variables; for
6709         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6710         to xdata int at 0x1234 tempvar = 1.
6711         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6712         provided by Akiya ISHIDA
6713
6714 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6715
6716         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6717         * src/SDCCval.c (constVal): added reduction from int to char
6718         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6719         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6720         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6721         to ignore the sign
6722         * support/regression/tests/shifts.c: fixed
6723
6724 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6725
6726         * src/z80/gen.c (genXor): Fixed bug #805445
6727
6728 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6729
6730         Fixed bug #621531 (const & volatile confusion in the type chain).
6731         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6732         refer to the const or volatile state of the pointer itself.
6733
6734         * src/SDCCast.c
6735         * src/SDCCglue.c
6736         * src/SDCCicode.c
6737         * src/SDCCsymt.c
6738         * src/SDCCval.c
6739         * src/SDCC.y
6740         * src/SDCCsymt.h
6741         * src/pic/gen.c
6742         * src/pic/ralloc.c
6743         * src/pic16/gen.c
6744         * src/pic16/ralloc.c
6745         * support/regression/tests/const.c
6746
6747 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6748
6749         When checking for duplicated modules, use absolute paths
6750         instead of relative paths.  Files changed:
6751
6752         * as/mcs51/lklib.c
6753         * link/z80/lklib.c
6754
6755 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6756
6757         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6758
6759 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6760
6761         * device/include/string.h: added size_t typedef, changed
6762         prototypes to use size_t, eliminated separate reentrant and
6763         non-reentrant declarations, added _memmove declaration
6764         * device/lib/_memcpy.c: changed to use size_t instead of int,
6765         changed /4 to >>2 to avoid division library call
6766         * device/lib/_memcmp.c,
6767         * device/lib/_memset.c,
6768         * device/lib/_strncat.c,
6769         * device/lib/_strncpy.c,
6770         * device/lib/_strncmp.c: changed to use size_t instead of int
6771         * device/lib/_memmove.c: new file (fixed bug #772294)
6772         * device/lib/Makefile.in: added _memmove.c
6773         * device/lib/z80/asm_strings.s: fixed bug #772290
6774         * support/regression/tests/bitfields.c: attempt to fix host assertion
6775         failure on amd64-unknown-linux2.2
6776
6777 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6778
6779         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6780         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6781         * as/z80/asmain.c (main): fixed bug #801766
6782
6783 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6784
6785         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6786         compilers
6787
6788 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6789
6790         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6791         reported in bug #800609
6792
6793 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6794
6795         * Top header beautifications in src/pic16 directory:
6796           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6797           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6798           pcoderegs.h, ralloc.c, ralloc.h
6799         * main.c: added top header and GPL license notice
6800         * pcode.c: fixed the if-conditional warning
6801
6802 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6803
6804         * device/lib/_mullong.c: replaced int by short for gcc
6805
6806 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6807
6808         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6809         and JUMPTABLE iCodes properly now (worked by accident before)
6810         * src/mcs51/gen.c (leftRightUseAcc),
6811         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6812         iCode properly now. Use getSize instead of nRegs since a & b
6813         aren't part of the nRegs tally.
6814
6815 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6816
6817         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6818         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6819           before instructions that use the _STATUS register
6820
6821 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6822
6823         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6824         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6825         fetching of the pointer
6826         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6827         copied from genNearPointerSet()
6828         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6829         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6830         If they pop r0/r1 they must be called in the opposite order than aopOp().
6831         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6832         (resp. --stack-auto), prepared for --xstack
6833
6834 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6835
6836         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6837
6838 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6839
6840         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6841         these ports have their own __sdcc_external_start()
6842
6843 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6844
6845         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6846         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6847         type for bits was changed. It resulted in bit variables becoming
6848         global, which is not permitted in PIC 14 assembly output.
6849
6850 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6851
6852         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6853
6854 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6855
6856         Z80 and MCS51 linkers complaint if a public symbol is defined
6857         in more than one library module:
6858
6859         * as/mcs51/lklib.c
6860         * link/z80/lklib.c
6861         * as/mcs51/Makefile.in
6862
6863 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6864
6865         A few small changes that speed up the peephole optimizer.
6866
6867         * src/SDCCpeeph.c
6868
6869 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6870
6871         Try to make the peephole optimizer smarter by maintaining
6872         an association between the assembly source code and the
6873         iCodes that originated them. Put this information to use
6874         with a new peephole rule condition "notVolatile" so that
6875         the rules can be aggressive yet still safe.
6876
6877         * src/SDCCpeeph.c
6878         * src/SDCCpeeph.h
6879         * src/mcs51/gen.c
6880         * src/mcs51/peeph.def
6881
6882 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6883
6884         Fixed bug #741761
6885
6886         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6887         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6888         if the left or right operand symbols have the accuse flag set.
6889
6890 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6891
6892         Changed the type of the result of the ! (NOT) operator to char;
6893         previously it returned the same type as the source. This allows
6894         us to eliminate all the genFloatNot functions (all of its target
6895         implementations were very buggy) since !float can use the same
6896         code as !long now.
6897
6898         * src/SDCCicode.c (ast2iCode): ! returns char
6899         * src/mcs51/gen.c (genNot, genNotFloat),
6900         * src/ds390/gen.c (genNot, genNotFloat),
6901         * src/z80/gen.c (genNot, genNotFloat),
6902         * src/pic/gen.c (genNot, genNotFloat),
6903         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6904
6905 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6906
6907         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6908         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6909            during interrupts. Ensure WSAVE is located at a shared bank address.
6910         2. Fixed page selection in some places
6911         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6912            the registers name strings.
6913         4. Fixed "signed / unsigned compare" compiler warnings.
6914         5. The PIC port manages its own allocation of the general purpose
6915            registers, but makes no attempt to reuse them. As a result when
6916            compiling it soon runs out of general purpose registers. Some
6917            additional code was added to the files pcode.c and device.c to walk
6918            through the function call tree and rename the registers so that they
6919            get reused.
6920
6921         * src/pic/device.c
6922         * src/pic/gen.c
6923         * src/pic/glue.c
6924         * src/pic/pcode.c
6925         * src/pic/pcode.h
6926         * src/pic/ralloc.c
6927         * src/pic/ralloc.h
6928         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6929         genPlus() & genMinus() when the result is the same as left or right
6930
6931 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6932
6933         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6934
6935 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6936
6937         Made bitfield a distinct type from bit so that bitfields
6938         convert as per ANSI C and bits retain their traditional
6939         boolean style behaviour. Implemented bitfield support in
6940         the z80 port.
6941
6942         * src/SDCCsymt.h,
6943         * src/SDCCsymt.c,
6944         * src/SDCCast.c,
6945         * src/cdbFile.c,
6946         * src/mcs51/gen.c,
6947         * src/ds390/gen.c: bit v bitfield split
6948         * src/z80/gen.c: New support for bitfields
6949         * support/regression/tests/bitfields.c: reenabled z80,
6950         added more tests
6951
6952 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6953
6954         Rules 246.x, 247.x relate to bitfields, the others speed up
6955         access to xdata mapped I/O devices.
6956
6957         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6958
6959 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6960
6961         Cleaned up genPackBits and genUnpackBits and added two helper
6962         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6963         for literal assignments in genPackBits (thanks to Frieder for
6964         reminding me).
6965
6966         * src/mcs51/gen.c
6967         * src/ds390/gen.c
6968
6969 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6970
6971         Fixed bug #748310 (pointer to function type mishandled when the
6972         function name is omitted). Also fixed a SIGSEGV when a function
6973         attribute (reentrant, etc) is used on a non-function or on a
6974         function but misplaced before the parameter list.
6975
6976         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6977         bug #748310
6978         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6979         * support/Util/SDCCerr.h,
6980         * support/Util/SDCCerr.c: Added func attr misuse error msg
6981
6982 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6983
6984         Fixed bug #787649 by anonymous
6985         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6986         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6987
6988 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6989
6990         Fixed numerous bitfield problems.
6991
6992         * src/SDCC.y: More bitfield related error checking
6993         * src/SDCCsymt.h,
6994         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6995         * support/Util/SDCCerr.h,
6996         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6997         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6998         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6999         * support/regression/tests/bitfields.c: tests added
7000
7001 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7002
7003         Made the constant following the "interrupt" keyword optional. If
7004         omitted, the function will not automatically be given an entry
7005         in the interrupt vector table (similar to #pragma NOIV, but
7006         less syntacticly kludgy). The interrupt number is also now
7007         range checked. Also fixed a bug in the high order bit example
7008         in the manual.
7009
7010         * src/SDCC.y
7011         * src/SDCCmem.c
7012         * src/SDCCglue.c
7013         * src/SDCCsymt.h
7014         * support/Util/SDCCerr.c
7015         * support/Util/SDCCerr.h
7016         * doc/sdccman.lyx
7017
7018 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7019
7020         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7021         * src/SDCCicode.c (operandOperation): rewritten some ops
7022         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7023         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7024         other type
7025         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7026         be re-activated by defining REDUCE_LITERALS)
7027         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7028         unsigned, but are signed by default
7029         * src/SDCCval.c (constVal): rearranged
7030         * src/SDCCval.c (valMod): preliminary fix
7031         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7032         * support/regression/literalop.c: added, work in progress
7033
7034 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7035
7036         Generate warnings for useless declarations like "char data;"
7037         that don't do what new users expect.
7038
7039         * src/SDCC.y
7040         * support/Util/SDCCerr.h
7041         * support/Util/SDCCerr.c
7042
7043 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7044
7045         * src/SDCCval.c (valMult): fix overflow detection of negative int
7046
7047 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7048
7049         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7050
7051         Changes to support big endian targets:
7052
7053         * src/ports.h
7054         * src/SDCCglue.c
7055         * src/avr/main.c
7056         * src/ds390/main.c
7057         * src/izt/i186.c
7058         * src/mcs51/main.c
7059         * src/pic/main.c
7060         * src/pic16/main.c
7061         * src/xa51/main.c
7062         * src/z80/main.c
7063
7064 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7065
7066         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7067         * device/lib/time.c: fixed warning "integer overflow in expression"
7068
7069 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7070
7071         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7072         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7073         constants are unsigned; added recognition of "u" flag for unsigned
7074         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7075         * src/SDCCval.c (valDiv, valMod): fixed signdness
7076         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7077         signedness of modulo, left and right shift
7078         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7079         * support/Util/SDCCerr.h: added warning W_INT_OVL
7080         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7081         * src/SDCCast.c (ast_print): improved output of constants
7082
7083 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7084
7085         Fixed some warnings when building with MSVC:
7086
7087         * as\mcs51\asdata.c
7088         * as\z80\asdata.c
7089         * as\mcs51\asm.h
7090         * as\z80\asm.h
7091         * link\z80\aslink.h
7092         * link\z80\lkdata.c
7093         * link\z80\lkeval.c
7094         * link\z80\lkgb.c
7095         * link\z80\lkihx.c
7096         * link\z80\lks19.c
7097         * link\z80\lksym.c
7098         * support\cpp2\cpplib.c
7099         * src\ds390\gen.c
7100         * src\mcs51\gen.c
7101
7102 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7103
7104         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7105
7106 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7107
7108         * support\librarian\clean.mk: Do not remove Makefile.
7109         * support\librarian\Makefile: added.
7110
7111 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7112
7113         Added librarian to MSVC build:
7114         * all.dsp
7115         * sdcc.dsw
7116         * support\librarian\librarian.dsp
7117
7118         'configure' not needed for librarian, removed:
7119         * support\librarian\configure
7120         * support\librarian\configure.in
7121         * support\librarian\config_in.h
7122         * support\librarian\Makefile.in
7123
7124         Hopefully these ones built the librarian and the rest of sdcc properly:
7125         * Makefile
7126         * Makefile.common.in
7127
7128         Messed up 'configure', so revert to previous version:
7129         * configure
7130         * configure.in
7131
7132 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7133
7134         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7135         there, while the mantissa of a double is "only" 53 bits wide.
7136
7137 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7138
7139         Adding sdcclib to the build.  MSVC project coming soon.
7140         Files added/changed:
7141
7142         * support\librarian\clean.mk
7143         * support\librarian\configure
7144         * support\librarian\configure.in
7145         * support\librarian\config_in.h
7146         * support\librarian\Makefile.bcc
7147         * support\librarian\Makefile.in
7148         * support\librarian\sdcclib.c
7149         * Makefile.bcc
7150         * Makefile
7151         * Makefile.common.in
7152         * configure
7153         * configure.in
7154
7155 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7156
7157         Linker now complaints if linked modules have conflicting options, for
7158         example, one compiled using --model-large and another one compiled with
7159         --model-small.  The following files were modified:
7160
7161         * as\mcs51\asdata.c
7162         * as\mcs51\aslink.h
7163         * as\mcs51\asm.h
7164         * as\mcs51\asmain.c
7165         * as\mcs51\asout.c
7166         * as\mcs51\i51pst.c
7167         * as\mcs51\lkdata.c
7168         * as\mcs51\lklibr.c
7169         * as\mcs51\lkmain.c
7170         * as\z80\asdata.c
7171         * as\z80\asm.h
7172         * as\z80\asmain.c
7173         * as\z80\asout.c
7174         * as\z80\z80pst.c
7175         * link\z80\aslink.h
7176         * link\z80\lkdata.c
7177         * link\z80\lklibr.c
7178         * link\z80\lkmain.c
7179         * src\SDCCglue.c
7180
7181 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7182
7183         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7184         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7185
7186 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7187
7188         * src/z80/mappings.i: fix _mul[us][int,long] entries
7189
7190 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7191
7192         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7193
7194 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7195
7196         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7197         * support/regression/tests/bitopcse.c: added
7198         fixed warning:
7199         * src/avr/gen.c:
7200         * src/pic/gen.c:
7201         * src/pic16/gen.c:
7202         * src/z80/gen.c:
7203         * src/xa51/gen.c:
7204
7205 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7206
7207         added support for new library format to z80, gbz80 linkers:
7208         *link/z80/aslink.h
7209         *link/z80/lklex.c
7210         *link/z80/lklib.c
7211         *link/z80/lklist.c
7212
7213 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7214
7215         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7216         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7217
7218 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7219
7220         added DUMMY_READ_VOLATILE:
7221         * src/SDCC.y:
7222         * src/avr/gen.c:
7223         * src/xa51/gen.c:
7224         * src/z80/gen.c:
7225         * src/pic/gen.c:
7226         * src/pic16/gen.c:
7227         * src/mcs51/gen.c:
7228         * src/ds390/gen.c:
7229         * src/SDCCcse.c (algebraicOpts): many improvements
7230         * src/SDCCcse.h: removed algebraicOpts()
7231         * src/SDCCicode.c (picDummyRead): added
7232
7233 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7234
7235         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7236         "Insufficient space in data memory".
7237
7238 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7239
7240         * src/mcs51/gen.c: fixed bug #771358
7241         * src/z80/gen.c: fixed bug #759087
7242
7243 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7244
7245         * src/pic16/glue.c: minor cleanup by Vangelis
7246
7247 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7248
7249         * device/include/regc515c.h: fixed #758477
7250         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7251         * device/lib/_gptrput.c: saved a few bytes
7252         * my tab spacing is 8, yours too?)
7253         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7254         * device/lib/serial.c: process RX bytes earlier than TX bytes
7255         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7256
7257 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7258
7259         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7260
7261 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7262
7263     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7264
7265 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7266
7267         * device/lib/Makefile.in: bad fix, reverted to 1.43
7268
7269 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7270
7271         * device/lib/Makefile.in: added missing z80 object files
7272
7273 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7274
7275         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7276         pic16 progress by Vangelis:
7277         * src/SDCCglobl.h:
7278         * src/SDCCmain.c:
7279         * src/pic/Makefile:
7280         * src/pic:
7281         * pic/Makefile:
7282         * pic16/device.c:
7283         * pic16/device.h:
7284         * pic16/gen.c:
7285         * pic16/gen.h:
7286         * pic16/genarith.c:
7287         * pic16/glue.c:
7288         * pic16/main.c:
7289         * pic16/pcode.c:
7290         * pic16/pcode.h:
7291         * pic16/pcodepeep.c:
7292         * pic16/peeph.def:
7293
7294 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7295
7296     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7297
7298 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7299
7300     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7301     added gbz80 build to MSVC project.
7302     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7303     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7304     from 8051 stuff and setup so it links using a .lnk file.
7305
7306 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7307
7308     * support/librarian/sdcclib.c: sdcc librarian.
7309     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7310     with sdcclib.
7311
7312 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7313
7314     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7315
7316 2003-07-02  Borut Razem <borut.razem AT siol.net>
7317
7318         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7319         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7320         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7321         src/xa51/main.c, src/z80/main.c:
7322         virtualization of glue() function: each port has it's own glue function,
7323         which is accessed by do_glue function pointer in PORT.general structure
7324
7325 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7326
7327         * DS800C400 fun, improved ROM interface and tinibios.
7328
7329 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7330
7331         * More support for DS80C400. Now includes beginning of interface to ROM.
7332
7333 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7334
7335         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7336
7337 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7338
7339         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7340
7341 2003-06-19  Borut Razem <borut.razem AT siol.net>
7342
7343         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7344
7345 2003-06-19  Borut Razem <borut.razem AT siol.net>
7346
7347         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7348         fixed Z80 port - crt0.o: cannot open.
7349
7350 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7351
7352         * support/Util/MySystem.c (merge_command): revert bad fix
7353
7354 2003-06-18  Borut Razem <borut.razem AT siol.net>
7355
7356         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7357
7358 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7359
7360         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7361         option --use-stdout sends errors to stdout instead of stderr.
7362
7363 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7364
7365         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7366
7367 2003-06-15  Borut Razem <borut.razem AT siol.net>
7368
7369         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7370         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7371         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7372         fixed width array of pointers replaced with sets;
7373         multiple include and lib paths ared transferred to preprocessor and linker
7374         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7375         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7376         fixed width array of pointers
7377         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7378         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7379         fixupPath(), getPathDifference()
7380         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7381         fixed width array of pointers
7382
7383 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7384
7385         * src/pic16/ralloc.c: fix warnings
7386         * src/pic16/pcode.c: fix warning
7387
7388 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7389
7390          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7391         know all the details, but essentially this set of changes enable
7392         the pic16 port to generate movff instructions and generate assembler
7393         directives,
7394         * src/SDCCmain.c:
7395         * src/pic16/gen.c:
7396         * src/pic16/glue.c:
7397         * src/pic16/pcode.c:
7398         * src/pic16/device.c:
7399         * src/pic16/main.c:
7400         * src/pic16/pcode.h:
7401         * src/pic16/pcoderegs.c:
7402         * src/pic16/ralloc.c:
7403         * src/pic16/ralloc.h:
7404
7405 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7406
7407         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7408         added option --vc, so sdcc errors and warnings are compatible with
7409         Microsoft Visual Studio.
7410
7411 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7412
7413         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7414           device/lib/libfloat.lib: added atof function.
7415
7416 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7417
7418         * doc/sdccman.lyx: updated to Lyx 1.3
7419         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7420         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7421         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7422
7423 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7424
7425         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7426
7427 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7428
7429         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7430           additions to the "related tools/documentation" section
7431
7432 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7433
7434         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7435
7436 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7437
7438         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7439         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7440
7441 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7442
7443         * doc/sdccman.lyx: fix double dash and other minor things
7444         * doc/Makefile: fix double dash
7445
7446 2003-05-28  Karl Bongers(patches from Martin Helmling)
7447         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7448           condition and ignore commands.
7449
7450 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7451
7452         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7453           is in parts still quite out of date, I did changes as far as I felt makes sense
7454           for a non-native english speaker.
7455           Please feel free to add to the manual or to correct my changes.
7456         * doc/Makefile: undid touching the date of intermediate tex files.
7457
7458 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7459
7460         * doc/sdccman.lyx: Manual has an index now
7461
7462 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7463
7464         Finalize muluint/mulsint and mululong/mulslong merging:
7465         * device/lib/_mulint.c
7466         * device/lib/_mullong.c
7467         * device/lib/gbz80/mul.s
7468         * device/lib/gbz80/stubs.s
7469         * device/lib/z80/mul.s
7470         * device/lib/z80/stubs.s
7471         * src/SDCCsymt.c (initCSupport)
7472
7473 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7474
7475         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7476         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7477           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7478           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7479           instead of /Zm500.
7480
7481 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7482
7483         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7484           the regression tests I'm not brave enough to enable 245.b, 245.c
7485         * doc/sdccman.lyx: added latex preamble for hyperref package.
7486           Using pdflatex this will give you a hyperlinked pdf file with
7487           bookmarks. (prepend '%' before /usepackage if this breaks something)
7488
7489 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7490
7491          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7492
7493 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7494
7495         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7496
7497 2003-05-21    <johan AT balder>
7498
7499         * src/SDCCglue.c (printIval): fixed bug #739934
7500
7501 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7502
7503         Applied patch from bug 737905 (renamed yylineo to mylineno):
7504         * src/altlex.c
7505         * src/SDCCast.c
7506         * src/SDCglobl.h
7507         * src/SDCC.lex
7508         * src/SDCCsymt.c
7509         * src/SDCCval.c
7510         * src/pic16/pcode.c: Cleaned warnings
7511         * src/pic16/pcodeflow.c: Cleaned warnings
7512         * src/pic16/pcoderegs.c: Cleaned warnings
7513
7514 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7515
7516         * src/pic16/pcode.c: Cleaned warnings
7517         * src/pic16/pcodepeep.c: Cleaned warnings
7518         * src/pic16/ralloc.c: Cleaned warnings
7519
7520 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7521
7522         * doc/sdccman.lyx: fixed bug 739745
7523         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7524
7525 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7526
7527         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7528         it can be defined with CFLAGS when running configure
7529         * src/SDCCmain.c: fixed compiling + linking with object files
7530
7531 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7532
7533         * configure.in: configure for pic16 port,
7534             added --disable-pic16-port
7535         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7536         * src/SDCCmain.c: linkOptions is changed to set *,
7537             added if/endif conditional macros to remove options help
7538             messages from optionsTable when a port is not configured, added
7539             support for the PIc16 port in the ports table, when executing
7540             the compiler with no port specified on command line, a default
7541             port is selected with the new macro DEFAULT_PORT which is
7542             defined in port.h, in setDefaultOptions() linkOptions is removed
7543             from initialization assignment, since now it is a set,
7544             parseCmdLine uses setParseWithComma for linkOptions, in
7545             linkEdit() linkOptions are accessed with new function indexSet()
7546             which returns the i'th item of a set variable. See SDCCset.c, in
7547             linkEdit() when calling buildCmdLine(), added linkOptions as
7548             last argument. Now users can pass arguments to gplink via the
7549             -Wl option, main() uses pic16glue() to glue up pic16 programs
7550         * src/SDCCpeeph.c: various changes to support pic16
7551         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7552             return the i'th item of the set
7553         * src/SDCCset.h: added function prototype for indexSet()
7554         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7555         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7556         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7557             added macro DEFAULT_PORT
7558         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7559         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7560             generated
7561         * src/pic16/glue.c: commented out some error producing lines
7562         * src/pic16/main.c: __config directives are commented out to stop
7563             gpasm complaining and test the linkage with gplink, _linkCmd and
7564             _asmCmd changed to be more gplink and gpasm friendly
7565         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7566             produced an error when parsed, peep rule 12 is added to utilize
7567             movff, but it is commented out since the pCode does not support
7568             yet a command with 2 address arguments
7569
7570 2003-05-18    <johan AT balder>
7571
7572         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7573         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7574 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7575
7576         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7577   Added feature to script commands from file.
7578
7579 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7580
7581         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7582         * src/SDCCutil.c: include ctype.h for win32
7583
7584 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7585
7586         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7587
7588 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7589
7590         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7591   Fixed so you can set breakpoints prior to run, run does not stop
7592   on entry now.  Add tbreak.  Other enhancements and fixes for use
7593   with ddd.
7594
7595 2003-05-12  Borut Razem <borut.razem AT siol.net>
7596
7597         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7598
7599 2003-05-11  Borut Razem <borut.razem AT siol.net>
7600
7601         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7602         the path of bin directory, so that PATH is the only env. variable, which has to be set
7603         in case of standard installation.
7604         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7605         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7606         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7607
7608 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7609
7610         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7611         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7612         temp files are in the port dir; clean the gen/test directory when
7613         generating new test.c
7614         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7615         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7616         * support/regression/tests/zeropad.c: added
7617
7618 2003-05-09    <johan AT balder>
7619
7620         * src/SDCCglue.c: fixed bug #597940
7621
7622 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7623
7624         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7625   cache sfr, optimize next,step, fix off by one sourceline,
7626   support ddd list function.
7627         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7628
7629 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7630
7631         * support/regression/HTMLgen.py: added compare_s2f()
7632         * support/regression/Makefile: redo 1.27
7633         * support/regression/generate-cases.py: redo 1.5
7634
7635 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7636
7637         * support/regression/tests/float.c: workaround 33 bit hex constant
7638         * support/regression/tests/simplefloat.c: fix division for host
7639
7640 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7641
7642         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7643         that tame's the PIC's over-aggressive optimizer.
7644
7645 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7646
7647          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7648          support for MSVC.
7649
7650 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7651
7652         Initial support for DS80C400. "Hello world" runs on TINIm400
7653         (with polled I/O).
7654
7655 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7656
7657          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7658          * Some notes on ddd usage added in debugger/README
7659          Martin Helmling adding more features and fixes for ddd GUI debugger.
7660          Code added for nexti, stepi, up, down, and other adjustments.
7661
7662 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7663
7664         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7665         * src/pic/peeph.def Added two rules to optimize carry manipulation
7666         * src/pic/* removed debug printfs
7667
7668 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7669
7670         * debugger/mcs51/cmd.c: added header newalloc.h
7671
7672 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7673
7674         * as/Makefile: new EXEEXT
7675         * as/z80/Makefile: remove trailing slash of BUILDIR
7676         * as/z80/clean.mk: new EXEEXT
7677         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7678         * support/cpp2/Makefile.in: new EXEEXT
7679         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7680
7681 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7682
7683         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7684         EXEEXT was introduced to fix all related problems with targets
7685         "clean", "install" and "uninstall"; a couple of further flaws
7686         especially with "clean" have been fixed too
7687         * as/mcs51/Makefile.in
7688         * as/mcs51/clean.mk
7689         * as/z80/Makefile
7690         * Makefile
7691         * clean.mk
7692         * debugger/mcs51/Makefile.in
7693         * debugger/mcs51/clean.mk
7694         * link/z80/Makefile
7695         * link/z80/Makefile.in
7696         * link/z80/clean.mk
7697         * link/Makefile
7698         * packihx/Makefile.in
7699         * packihx/clean.mk
7700         * sim/ucsim/Makefile
7701         * sim/ucsim/clean.mk
7702         * sim/ucsim/avr.src/Makefile.in
7703         * sim/ucsim/avr.src/clean.mk
7704         * sim/ucsim/s51.src/Makefile.in
7705         * sim/ucsim/s51.src/clean.mk
7706         * sim/ucsim/xa.src/Makefile.in
7707         * sim/ucsim/xa.src/clean.mk
7708         * sim/ucsim/z80.src/Makefile.in
7709         * sim/ucsim/z80.src/clean.mk
7710         * sim/ucsim/main_in.mk
7711         * sim/ucsim/packages_in.mk
7712         * sim/ucsim/gui.src/Makefile.in
7713         * sim/ucsim/gui.src/serio.src/Makefile.in
7714         * sim/ucsim/gui.src/serio.src/clean.mk
7715         * src/Makefile.in
7716         * src/clean.mk
7717         * support/cpp2/Makefile.in
7718         * support/cpp2/clean.mk
7719         * support/makebin/Makefile
7720         * support/makebin/clean.mk
7721         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7722         * doc/sdccman.lyx: --program-suffix no longer needed
7723
7724 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7725
7726          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7727          Martin Helmling added support for ddd GUI debugger.
7728          Code added to display assembly, set variables, and other commands
7729          to interface to ddd.
7730
7731 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7732
7733         * as/Makefile: fix target clean
7734         * as/clean.mk: fix target clean
7735         * as/z80/clean.mk: fix target clean
7736
7737 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7738
7739         * Makefile.common.in: added  AT EXEEXT AT
7740         * configure.in: removed all mingw32 stuff
7741         * configure: rebuilt from configure.in
7742         * doc/sdccman.lyx: updated section "installation"
7743         * support/scripts/sdcc_mingw32: adapted to configure
7744         * support/scripts/sdcc_cygwin_mingw32: added
7745
7746 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7747
7748         * src/pic Added object file support for the PIC port
7749         * src/pic Applied patch from Craig Franklin (this started the object file support)
7750         * src/regression Updated the PIC regression tests for object files
7751
7752 2003-04-20  Borut Razem <borut.razem AT siol.net>
7753
7754         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7755           lklex.c: In function `getfid':
7756           lklex.c:203: warning: array subscript has type `char'
7757         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7758           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7759         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7760           stack handling macros
7761
7762 2003-04-19  Borut Razem <borut.razem AT siol.net>
7763
7764         * "handling space characters in file path" task:
7765         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7766         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7767         * support/Util/MySystem.h: make it self-sufficient
7768         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7769           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7770           handling space characters in file path
7771         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7772           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7773         * support/Util/MySystem.c: handling space characters in executable's path
7774
7775 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7776
7777         * as/z80/Makefile: fix permanent rebuild of z80
7778         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7779         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7780
7781 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7782
7783         * src/SDCCopt.c: add special case optimization to replace modulo by
7784           a power of two with a bitwise AND.
7785
7786 2003-04-18    <johan AT balder>
7787
7788         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7789
7790 2003-04-17    <johan AT balder>
7791
7792         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7793         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7794
7795 2003-04-13  Borut Razem <borut.razem AT siol.net>
7796
7797         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7798         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7799           fixed mingw problem in adl_NORMALIZE_PATH
7800
7801 2003-04-12  Borut Razem <borut.razem AT siol.net>
7802
7803         * fixed "#pragma SAVE/RESTORE can not be nested":
7804         * src/SDCC.lex: reworked pragma handling functions
7805         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7806         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7807
7808 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7809
7810         * src/SDCCutil.c (pathEquivalent): defined but not used
7811         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7812         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7813         * configure: rebuilt from configure.in
7814         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7815         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7816         * device/include/Makefile.in: replace sdcc_datadir
7817         * device/lib/Makefile.in: replace sdcc_datadir
7818         * Makefile.common.in: add LDFLAGS from configure
7819         * packihx/Makefile.in: use LDFLAGS
7820         * src/Makefile.in: use LDFLAGS
7821         * support/cpp2/Makefile.in: add LDFLAGS from configure
7822         * support/makebin/Makefile: use LDFLAGS
7823         * .version: bumped version number to 2.3.5
7824
7825 2003-04-12  Borut Razem <borut.razem AT siol.net>
7826
7827         * completed "different paths" task:
7828         * src/SDCCmacro.c: fixed bug in handling quotes
7829         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7830         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7831
7832 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7833
7834         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7835
7836 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7837
7838         * ds390/gen.c ds390/peeph.def: fix bug 706781
7839
7840 2003-04-11  Borut Razem <borut.razem AT siol.net>
7841
7842         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7843
7844 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7845
7846         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7847         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7848          set - this bit used to not be set...).
7849         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7850           bad code in PIC Port
7851         * src/regression/and2.c added to test bug 609268
7852         * src/regression/Makefile added and2.c to regression test
7853
7854
7855 2003-04-08    <johan AT CP255758-A>
7856
7857         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7858         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7859         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7860
7861 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7862
7863         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7864         fix bug #487815
7865         * support/cpp2/Makefile.in: fix bug #487815
7866         * configure: rebuilt from configure.in
7867         * Makefile.common.in: docdir changed, new path suffixes
7868         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7869         * sdcc_vc_in.h: reflect changes from sdccconf.h
7870         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7871         * src/SDCCutil.h: remove BINDIR hack
7872         * doc/sdccman.lyx: update new path hierarchy
7873
7874 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7875
7876         * src/SDCCpeeph.c: added okToRemoveSLOC test
7877
7878 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7879
7880         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7881
7882 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7883
7884         * src/SDCCpeeph.c: added labelIsReturnOnly test
7885         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7886
7887 2003-04-05    <johan AT balder>
7888
7889         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7890         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7891         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7892         * src/SDCCast.c: fixed a warning
7893         * src/SDCCast.h: fixed a warning
7894         * src/SDCCicode.c (operandFromAst): fixed a warning
7895
7896 2003-04-04    <johan AT balder>
7897
7898         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7899         * src/SDCCast.c (decorateType): fixed bug #715076
7900         * src/SDCC.y: fixed bug #702907
7901
7902 2003-04-03    <johan AT balder>
7903
7904         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7905         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7906         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7907         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7908         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7909
7910 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7911
7912         * _decdptr.c: fix return values
7913         * _gptrget.c: fix return values
7914         * _gptrgetc.c: fix return values
7915         * _gptrput.c: fix return values
7916         * _mulint.c: fix return values
7917         * as/z80/Makefile: fix 'make -j' problem
7918
7919 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7920
7921         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7922         * configure.in: big cleanup, updated to autoconf 2.5x
7923         * configure: rebuilt from configure.in
7924         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7925         * sdcc_vc_in.h: reflect changes from sdccconf.h
7926         * doc/Makefile: fixed a flaw in "make install"
7927
7928 2003-04-02    <johan AT balder>
7929
7930         * src/ds390/gen.c (genCmp): no comments
7931         * src/mcs51/gen.c (genCmp): no comments
7932         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7933         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7934
7935 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7936
7937         * support/regression/generate-cases.py: place generated file in given sub directory
7938         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7939         * support/regression/Makefile: improvements for 'make -j';
7940         side effect: it's simpler and faster now
7941
7942 2003-03-31  Borut Razem <borut.razem AT siol.net>
7943
7944         * src/z80/main.c: link-{port} and as-{port} defined without path
7945         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7946
7947 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7948
7949         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7950
7951 2003-03-30  Borut Razem <borut.razem AT siol.net>
7952
7953         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7954           changed type of list parameter to set
7955         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7956         * src/port.h: changed type of do_assemble() parameter to set
7957         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7958           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7959           definition of "cppoutfilename" macro with NULL value in preProcess()
7960         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7961         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7962         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7963           replaced with set *binPathSet
7964         * shash_add() deallocates the item, if allready exsists, before adding the new one
7965         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7966
7967 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7968
7969         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7970           a nested for loop bug in the PIC port
7971         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7972           for loops
7973
7974 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7975
7976         * support/Util/dbuf.h: remove C++ stuff to make it portable
7977
7978 2003-03-28  Borut Razem <borut.razem AT siol.net>
7979
7980         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7981           literal strings in stringLiteral()
7982         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7983         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7984           to the project
7985
7986 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7987
7988         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7989
7990 2003-03-26    <johan AT balder>
7991
7992         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7993         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7994         * src/SDCCast.c (decorateType): fixed " -v < 3"
7995
7996 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7997
7998         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7999         Added Lenny Story's debug infrastructure changes:
8000         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8001         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8002         * src/cdbFile.c: added
8003         * src/SDCCdebug.c: added
8004         * src/SDCCdebug.h: added
8005         * src/SDCCast.c (createFunction)
8006         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8007         * src/SDCCmain.c (parseCmdLine, main)
8008         * src/SDCCmem.c (redoStackOffsets)
8009         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8010         * src/SDCCsymt.h
8011         * src/common.h
8012         * src/avr/gen.c (genAVRCode)
8013         * src/ds390/gen.c (gen390Code)
8014         * src/mcs51/gen.c (gen51Code)
8015         * src/pic/gen.c (genpic14Code)
8016         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8017         * src/xa51/gen.c (genXA51Code)
8018         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8019
8020 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8021
8022         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8023         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8024
8025 2003-03-22    <johan AT balder>
8026
8027         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8028
8029 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8030
8031         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8032         * doc/cdbfileformat.lyx: added, written by Lenny Story
8033         * doc/Makefile: added cdbfileformat.lyx
8034         * doc/clean.mk: added cdbfileformat.lyx
8035
8036 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8037
8038         * src/mcs51/peeph.def: fix bug #705773
8039
8040 2003-03-20    <johan AT balder>
8041
8042         An sfr/sbit can have an "at #" AND an initializer
8043         * src/SDCCsymt.c (checkSClass):
8044         * src/SDCCmem.c (allocGlobal):
8045         * src/SDCCmem.c (allocLocal):
8046         * src/SDCCast.c (createBlock):
8047
8048 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8049
8050         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8051
8052 2003-03-16    <johan AT balder>
8053
8054         Undid the hackup of const and volatile, the problem is much bigger
8055         * src/SDCC.y:1.65
8056         * src/SDCCast.c:1.171
8057         * src/SDCCglue.c:1.138
8058         * src/SDCCicode.c:1.146
8059         * src/SDCCsymt.c:1.150
8060         * src/SDCCval.c:1.65
8061
8062 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8063
8064         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8065         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8066
8067 2003-03-13    <johan AT balder>
8068
8069         Hackup const and volatile modifiers in type chains a bit:
8070         * src/SDCC.y:1.63
8071         * src/SDCCast.c:1.169
8072         * src/SDCCglue.c:1.136
8073         * src/SDCCicode.c:1.143
8074         * src/SDCCsymt.c1.146
8075         * src/SDCCsymt.h1.59
8076         * src/SDCCval.c:1.63
8077
8078 2003-03-12    <johan AT balder>
8079
8080         * src/SDCCBBlock.h: more LRH debugging junk
8081         * src/SDCCcflow.h: more LRH debugging junk
8082         * src/SDCCloop.c: more LRH debugging junk
8083         * src/SDCC.y (struct_declaration): fixed bug #697590
8084         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8085         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8086         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8087
8088 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8089         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8090         test function names must now match exactly).
8091         * src/SDCCcse.c: added special case in findCheaperOp to allow
8092         extending a short integer. Makes less awful code for bug 700121 test case.
8093
8094 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8095
8096         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8097         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8098
8099 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8100
8101         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8102         actually called (operandsNotEqual() was called for all
8103         operandsNotEqualX tests).
8104
8105 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8106
8107         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8108         with shorter literals. Fixes bug 700121.
8109
8110 2003-03-11    <johan AT balder>
8111
8112         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8113
8114 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8115
8116         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8117         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8118
8119 2003-03-10  Borut Razem <borut.razem AT siol.net>
8120
8121         * src/SDCCmain.c: pipe preprocessor's output
8122         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8123         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8124         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8125         which closes all pipes in pipeSet set
8126         * src/SDCCset.c: free deleted item in function deleteSetItem()
8127         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8128         moved from z80 to src subproject
8129         * .version: increased version number to 2.3.4
8130
8131 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8132
8133         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8134         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8135         * support/regression/ports/xa51/spec.mk: fix typo
8136
8137 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8138
8139         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8140
8141 2003-03-09  Borut Razem <borut.razem AT siol.net>
8142
8143         * src/SDCCmain.c: pipe preprocessor's output
8144         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8145         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8146         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8147         which closes all pipes in pipeSet set
8148         * src/SDCCset.c: free deleted item in function deleteSetItem()
8149         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8150         moved from z80 to src subproject
8151
8152 2003-03-09  Borut Razem <borut.razem AT siol.net>
8153
8154         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8155         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8156         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8157         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8158         * src/SDCCglobl.h: unification of WIN32 native definitions
8159
8160 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8161
8162         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8163
8164 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8165
8166         * src/configure.in:   check for endianess (even while cross-compiling)
8167         * src/configure:      check for endianess (even while cross-compiling)
8168         * src/configure_in.h: check for endianess (even while cross-compiling)
8169         * src/avr/gen.c:        remove old endianess stuff
8170         * src/mcs51/gen.c:      remove old endianess stuff
8171         * src/ds390/gen.c:      remove old endianess stuff
8172         * src/pic/gen.c:        remove old endianess stuff
8173         * src/pic/genarith.c:   remove old endianess stuff
8174         * src/pic/glue.c:       fix endianess check
8175         * src/pic16/gen.c:      remove old endianess stuff
8176         * src/pic16/genarith.c: remove old endianess stuff
8177         * src/pic16/glue.c:     fix endianess check
8178         * src/xa51/gen.c:       remove old endianess stuff
8179         * src/z80/gen.c:        fix endianess check
8180         * src/SDCCglue.c:       fix endianess check
8181         * src/ds390/peeph.def: fix bug 700036
8182
8183 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8184
8185         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8186         * src/configure: find appropriate data-types on host for SDCC's int and long
8187         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8188         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8189         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8190
8191 2003-03-07    <johan AT balder>
8192
8193         Just a big NOOP:
8194                 some minor cleanups before the big shot
8195                 OP_DEFS and OP_USES now use Kevin's protection
8196                 new option --nolabelopt
8197
8198         * src/SDCCBBlock.c:
8199         * src/SDCCast.c,:
8200         * src/SDCCcflow.c:
8201         * src/SDCCcse.c:
8202         * src/SDCCicode.c:
8203         * src/SDCCicode.h:
8204         * src/SDCClabel.c:
8205         * src/SDCCloop.c:
8206         * src/SDCCmain.c:
8207         * src/ds390/ralloc.c:
8208         * src/mcs51/ralloc.c:
8209         * src/pic/ralloc.c:
8210         * src/xa51/ralloc.c:
8211         * src/z80/ralloc.c:
8212
8213 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8214
8215         * src/pic/pcode.c (get_op): fix 64 bit warnings
8216         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8217         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8218         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8219         * support/regression/tests/malloc.c: fix 64 bit warnings
8220
8221 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8222
8223         * src/mcs51/gen.c (genMinus): fixed bug 696436
8224
8225 2003-03-02  Borut Razem <borut.razem AT siol.net>
8226
8227         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8228
8229 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8230
8231         * configure.in: test for mkstemp
8232         * sdccconf_in.h: add HAVE_MKSTEMP
8233
8234 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8235
8236         * device/include/ctype.h: removed warning while using --stack-auto
8237         * device/include/malloc.h: removed warning while using --stack-auto
8238         * device/include/string.h: removed warning while using --stack-auto
8239
8240 2003-02-23  Borut Razem <borut.razem AT siol.net>
8241
8242         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8243         because NDEBUG is defined (see man assert)
8244         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8245
8246 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8247
8248         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8249         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8250
8251 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8252
8253         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8254         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8255
8256 2003-02-18    <johan AT balder>
8257
8258         * as/mcs51/asmain.c (asmbl): module can start with a digit
8259         * as/z80/asmain.c (asmbl): module can start with a digit
8260
8261 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8262
8263         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8264         * src/asm.c: fix pipe() for Mingw32
8265
8266 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8267
8268         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8269         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8270         make -V work again; --c1mode reads now from stdin
8271         * doc/sdccman.lyx: added --c1mode
8272         * support/Util/SDCCerr.c: new messages for c1 mode
8273         * support/Util/SDCCerr.h: new messages for c1 mode
8274         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8275
8276 2003-02-15    <johan AT balder>
8277
8278         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8279
8280 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8281
8282         * doc/sdccman.lyx: Environment variables, -o and other minor things
8283
8284 2003-02-14    <johan AT balder>
8285
8286         * src/xa51/main.c: before anyone really tries to use it :)
8287
8288         * Install doc's in share/sdcc/doc
8289         * removed some obsolete files
8290         * Do a proper make distclean and uninstall
8291         M Makefile.common.in
8292         R sdccbuild.sh
8293         M as/Makefile
8294         M device/include/Makefile.in
8295         M device/lib/Makefile.in
8296         M doc/sdccman.lyx
8297         M link/Makefile
8298         M sim/ucsim/doc/Makefile.in
8299         M src/clean.mk
8300         R src/avr/peeph.rul
8301         R src/xa51/peeph.rul
8302         M support/cpp2/Makefile.in
8303         M support/makebin/Makefile
8304
8305
8306 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8307
8308         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8309
8310 2003-02-10  Borut Razem <borut.razem AT siol.net>
8311
8312         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8313         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8314         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8315         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8316         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8317         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8318         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8319         src/z80/Makefile.bcc: Borland Makefile cleanup
8320         * as/z80/Makefile.bcc: Added Borland Makefile
8321         * support/cpp2/borland.h: Removed
8322
8323 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8324
8325         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8326         * src/SDCC.lex: new pragma NOIV
8327         * src/SDCCglobl.h: new pragma NOIV
8328         * src/SDCCmem.c: new pragma NOIV
8329
8330 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8331
8332         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8333
8334 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8335
8336         * src/SDCCmain.c: signal handling is switched off by --debug
8337         * doc/Makefile: small fix for install; use clean.mk again
8338         * doc/clean.mk: clean *.pdf and *.html too
8339
8340 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8341
8342         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8343         * device/lib/printfl.c: fix a ds390 bug by making it portable
8344         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8345         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8346         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8347         * debugger/mcs51/cmd.c: converted multi-line string literals
8348         * sim/ucsim/globals.cc: converted multi-line string literals
8349         * src/SDCCmain.c: introduced signal handler to remove temp files
8350         * doc/Makefile: small tweaks, implement clean
8351         * doc: removed generated files
8352
8353 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8354
8355         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8356         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8357         Address Record is not correctly generated for DS390."
8358
8359 2003-02-02  Borut Razem <borut.razem AT siol.net>
8360
8361         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8362         * as/mcs51/asm.h: fixed compilation with Borland C
8363         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8364         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8365         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8366         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8367         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8368         src/z80/Makefile.bcc: delete $(LIB) only if exist
8369         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8370
8371 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8372
8373         * device/include/malloc.h: introduced NULL
8374         * device/include/string.h: introduced NULL
8375         * device/include/stdlib.h: introduced NULL
8376         * device/lib/_memcpy.c: removed NULL
8377         * device/lib/_strcat.c: removed NULL
8378         * device/lib/_strchr.c: removed NULL
8379         * device/lib/_strcmp.c: removed NULL
8380         * device/lib/_strcpy.c: removed NULL
8381         * device/lib/_strcspn.c: removed NULL
8382         * device/lib/_strlen.c: removed NULL
8383         * device/lib/_strncat.c: removed NULL
8384         * device/lib/_strncmp.c: removed NULL
8385         * device/lib/_strncpy.c: removed NULL
8386         * device/lib/_strpbrk.c: removed NULL
8387         * device/lib/_strrchr.c: removed NULL
8388         * device/lib/_strspn.c: removed NULL
8389         * device/lib/_strstr.c: removed NULL
8390         * device/lib/_strtok.c: removed NULL
8391         * device/lib/malloc.c: removed NULL, include own header
8392
8393 2003-02-02    <johan AT balder>
8394
8395         * 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
8396         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8397         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8398         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8399         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8400         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8401
8402 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8403
8404         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8405         area 'DATA'"
8406
8407 2003-02-01    <johan AT balder>
8408
8409         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8410
8411 2003-01-31    <johan AT CP255758-A>
8412
8413         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8414
8415 2003-01-30    <johan AT balder>
8416
8417         * src/SDCCBBlock.c: automatic bug detection
8418         * src/SDCCicode.c: automatic bug detection
8419
8420 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8421
8422         * src/SDCCglobl.h:   now --xram-size 0 works
8423         * src/SDCCmain.c:    now --xram-size 0 works
8424
8425 2003-01-29    <johan AT balder>
8426
8427         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8428
8429 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8430
8431         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8432         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8433         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8434         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8435         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8436         * src/SDCCmain.c:    Added options --xram-size and --code-size
8437
8438 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8439
8440         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8441         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8442
8443 2003-01-27    <johan AT balder>
8444
8445         * src/SDCC.y: fixed bug #613764
8446
8447 2003-01-26    <johan AT balder>
8448
8449         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8450         * src/SDCCsymt.h: fixed bug #673374
8451         * src/SDCCglue.c: fixed bug #661910
8452         * src/SDCCast.c: fixed bug #458099 and 673374
8453
8454 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8455
8456         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8457         * as/mcs51/strcmpi.h: added
8458         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8459         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8460         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8461         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8462         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8463         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8464         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8465         * as/mcs51/Makefile.aslink: new module strcmpi
8466         * as/mcs51/Makefile.asx8051: new module strcmpi
8467         * as/mcs51/Makefil.bcc: new module strcmpi
8468         * as/mcs51/Makefile.in: new module strcmpi
8469         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8470
8471 2003-01-26    <johan AT balder>
8472
8473         * src/SDCCglue.c: reverted back to 1.124
8474         * src/SDCCast.c: reverted back to 1.156
8475         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8476
8477 2003-01-25    <johan AT balder>
8478
8479         * src/SDCCglue.c: A better fix for bug #661910
8480         * src/SDCCast.c: A better fix for bug #661910
8481         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8482
8483 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8484
8485         * src/Makefile.in: remove spawn.o
8486         * src/SDCCmain.c: remove spawn.h
8487         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8488         * src/spawn.c: removed
8489         * src/spawn.h: removed
8490         * support/regression/ports/ds390/spec.mk: link with -r
8491
8492 2003-01-24    <johan AT CP255758-A>
8493
8494         * src/ds390/gen.c (aopOp): fixed bug #667458
8495         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8496         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8497         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8498
8499 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8500
8501         * src/mcs51/peeph.def: better assembler identation by Frieder
8502         * src/mcs51/gen.c: better assembler identation by Frieder
8503
8504 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8505
8506         * as/z80/string.h: removed for gcc 3.2
8507         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8508         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8509
8510 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8511
8512         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8513         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8514         * support/regression/Makefile: separate temp files for ports
8515         * support/regression/generate-cases.py: separate temp files for ports
8516         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8517         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8518
8519 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8520
8521         * moved tinitalk to device/examples/ds390
8522
8523 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8524
8525         * as/mcs51/lkmem.c: rflag is for DS390
8526         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8527         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8528                          (linkEdit): move mem- and map-files the same way as ihx-files
8529         * src/z80/main.c (_setDefaultOptions): removed --generic
8530         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8531         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8532         * src/pic/glue.c (picglue): --c1mode works again
8533         * src/pic16/glue.c (pic16glue): --c1mode works again
8534         * src/asm.c (printCLine): fix #660034
8535
8536 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8537
8538         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8539         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8540         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8541         * as/mcs51/lkmem (summary): better fix for sp problem
8542         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8543         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8544         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8545                                               remove --stack-after-data
8546
8547 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8548
8549         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8550         * src/SDCCutil.c (join): ugly bug: missing '\0'
8551         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8552
8553 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8554
8555         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8556         * src/port.h: typo
8557         * src/pic/main.c (_asmCmd): gpasm supports -o
8558         * src/z80/main.c: more general macros
8559         * device/lib/Makefile.in: remove intermediate files
8560
8561 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8562
8563         * .version: Bumped version number to 2.3.3
8564         * src/SDCCBBlock.c: new option -o
8565         * src/SDCCglobl.h: new option -o
8566         * src/SDCCglue.c: new option -o
8567         * src/SDCCmain.c: new option -o
8568         * src/asm.c: new option -o
8569         * src/ds390/main.c: new option -o
8570         * src/pic/glue.c: new option -o
8571         * src/pic/pcode.c: new option -o
8572         * src/pic/ralloc.c: new option -o
8573         * src/pic16/glue.c: new option -o
8574         * src/pic16/pcode.c: new option -o
8575         * src/pic16/ralloc.c: new option -o
8576         * src/z80/main.c: new option -o
8577         * device/lib/Makefile.in: use -o
8578         * support/regression/ports/ds390/spec.mk: use -o
8579         * support/regression/ports/gbz80/spec.mk: use -o
8580         * support/regression/ports/mcs51/spec.mk: use -o
8581         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8582         * support/regression/ports/z80/spec.mk: use -o
8583         * support/regression/ports/ucz80/spec.mk: use -o
8584         * support/regression/ports/xa51/spec.mk: use -o
8585         * support/regression/fwk/lib/timeout.c: fix usage string
8586
8587 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8588         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8589
8590 2003-01-07    <johan AT balder>
8591
8592         * src/SDCCast.c (decorateType): fixed bug #600035
8593
8594 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8595         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8596         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8597         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8598         * src/pic/pcode.c: outcommented unused variable to remove warnings
8599         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8600
8601 2003-01-06    <karl AT turbobit.com>
8602         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8603    regression tests.
8604
8605 2003-01-06    <johan AT balder>
8606
8607         * src/SDCCicode.c: fixed array add
8608
8609 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8610         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8611         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8612
8613 2003-01-04    <johan AT balder>
8614
8615         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8616
8617 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8618         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8619
8620 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8621         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8622         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8623
8624 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8625         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8626
8627 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8628         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8629
8630 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8631         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8632
8633 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8634
8635     * in \sdcc\as\mcs51\ changed these files in order to create an
8636     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8637     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8638     following files to include the previous two files: aslink.dsp,
8639     Makefile.aslink, Makefile.bcc, and Makefile.in.
8640
8641     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8642     .adb instead of .cdb
8643
8644 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8645
8646         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8647         value from option --iram-size.
8648
8649 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8650
8651         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8652         dram[] array.
8653
8654 2002-09-18    <wiml AT hhhh.org>
8655
8656         * SDCClrange.h: exposed setFromRange() and setToRange()
8657         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8658           packRegsForAccUse() (bug 542397)
8659         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8660           multiple times and emitting the fetch operations more than once
8661           added aopGetUsesAcc() function to allow binary operators to
8662           fetch their operands in the correct order; made genMinus() emit
8663           compact code for X = LITERAL - Y
8664
8665 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8666         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8667         sprintf() in line 1267.
8668
8669 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8670         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8671         like ports.
8672
8673 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8674         Changes to aslink (All the changes are marked with 'JCF'):
8675
8676         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8677         summary().
8678
8679         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8680         area BSEG.  Also moves, if possible, the DATA area down into the internal
8681         ram so more space is available.
8682
8683         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8684         sflag.
8685
8686         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8687         not bytes.  Function summary() which creates a memory usage summary
8688         file with extension .mem.  Reports of overlaping stack and small stack
8689         size.  If the space for the stack is less than 16 bytes aslink trows a
8690         warning.
8691
8692         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8693         the 8051.  Option 'y' for memory summary output file.
8694
8695         Changes to sdcc (All the changes are marked with 'JCF'):
8696
8697         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8698
8699         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8700         overlaying area for it (uses RegBankUsed[4]).
8701
8702         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8703         bank zero as used by default.  By default aslink locates the stack
8704         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8705         the creation of the .mem file.  Delegates the allocation of data area
8706         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8707         the begining of the stack area to aslink.
8708
8709         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8710         glue() in SDCCglue.c creates an area for it.
8711
8712 2002-09-03  Borut Razem <borut.razem AT siol.net>
8713         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8714         sdcc/src/pic/glue.c:
8715         introduced atexit() handler for teporay files removal in case of
8716         errors, assertions, ...
8717
8718 2002-08-29  Borut Razem <borut.razem AT siol.net>
8719         * sdcc/support/cpp2/auto-host_vc_in.h:
8720         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8721         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8722         Maybe there is a similar problem with BORLANDC? It should be checked!
8723
8724         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8725         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8726         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8727         was not executed, and the compiler (cl) launched a warning:
8728         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8729
8730 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8731         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8732
8733 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8734         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8735
8736         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8737           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8738           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8739           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8740           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8741           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8742           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8743         - added Release configuration in VS projects
8744         - review of compiler an linker options
8745         - VC .exe files are generated in bin_vc directory, not to interfere
8746           with binaries generated from other projects (cygwin, mingw, bcc ...)
8747
8748         * sdcc/src/yacc.dsp: added
8749
8750         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8751         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8752         and insert the version number definitions from .version
8753
8754         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8755
8756         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8757         added - genarate auto-host.h using auto-host_vc_in.h as template
8758
8759         * sdcc/sdcc_vc.h,
8760         removed from CVS, generated automatically
8761
8762 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8763         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8764
8765 2002-08-11  Borut Razem <borut.razem AT siol.net>
8766         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8767
8768 2002-08-10  Borut Razem <borut.razem AT siol.net>
8769         * src/SDCCmain.c (main):
8770         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8771         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8772         The consequence was that some temporary files were not removed.
8773
8774         * src/SDCCglue.c:
8775         unification of code in functions tempfilename() and tempfile():
8776         function tempnam() is defined in Visual Studio 6.0 and .NET
8777
8778         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8779
8780         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8781           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8782         - removed compiler command line option /WX: Treats all warnings as errors
8783         - update a list of source files, included into the project
8784
8785         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8786           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8787         changed project type to Generic Project so that can be correcly converted to VS.NET project
8788
8789         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8790
8791         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8792
8793         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8794
8795         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8796         added return 0 statements after assert() to make compiler happy
8797
8798         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8799         added newline in the def file to keep MSC compiler satisfied
8800
8801         * sdcc/src/z80/gen.c:
8802         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8803           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8804         - solved MSC error in function aopDump()
8805
8806         * sdcc_vc.h: define PREFIX as "\\sdcc"
8807
8808 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8809         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8810
8811 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8812         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8813         - Rewrote the register banking algorithm.
8814         - Added pCode live-range analysis to registers (for now, only non-used and
8815         singly-used registers optimized away)
8816
8817         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8818
8819         * 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.
8820
8821 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8822         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8823
8824 2002-04-22  Michael Hope  <michaelh AT vroom>
8825
8826         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8827
8828         * configure.in (DD_COPT): Added include support required for gbdk.
8829
8830         * .version: Bumped version number just to increase it.
8831
8832         * src/SDCCmain.c: Added -nostdinc to the default options.
8833
8834 2002-04-15  Michael Hope  <michaelh AT vroom>
8835
8836         * device/lib/z80/printf.c (sprintf): Added.
8837
8838         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8839
8840         * src/z80/peeph.def: Added transpose redundent load rule.
8841
8842         * src/z80/main.c: Added force callee saves for jaune.
8843
8844         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8845
8846         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8847
8848 2002-03-28  Johan Knol  <johan AT balder>
8849
8850         * src/SDCCval.c: fixed bug #532436
8851
8852 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8853         * /src/port.h:
8854         Added "char *Processor" field to the port structure.
8855
8856         * /src/SDCCmain.c:
8857         Added -p option. Allows port dependent processor to be specified.
8858
8859         * all ports:
8860         Initialized the new field char *Processor field to NULL in all ports
8861
8862         * /src/pic/*:
8863         Compiler generated registers for interrupt context saving
8864         were not getting allocated.
8865
8866 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8867
8868         * /src/SDCCast.c:
8869         Fixed left shift. Will promote the left side of a left shift
8870         if a) left shifting more than size of operand or b) when assigned
8871         to something size > size of left side
8872
8873 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8874         * src/pic/*
8875         tons of changes. Register allocation has been
8876         rewritten. Added customization for the various PICs. Flow
8877         analysis is restructured. ...
8878
8879         * src/pic/device.h:
8880         Added
8881
8882         * src/pic/device.c:
8883         Added. device.c is a PIC port hack to accomodate variations
8884         in PIC devices.
8885
8886 2002-03-13  Michael Hope  <michaelh AT vroom>
8887
8888         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8889
8890 2002-03-04  johanknol  <johanknol AT manik>
8891
8892         * /src/SDCCval.c: fixed
8893
8894         const unsigned char arr[][2] = { { 0, 1 } };
8895         t18.c:1: error: Initializer element is not constant
8896
8897 2002-03-04  bela  <bela AT manik>
8898
8899         * /device/include/mcs51reg.h:
8900         ds89c420 register definition update
8901
8902 2002-03-03    <johan AT FRIJA>
8903
8904         * support/Util/SDCCerr.c: did something, but don't no why anymore
8905
8906         * support/regression/tests/bug-524691.c: made it a little less shy
8907
8908         * src/SDCCast.c (decorateType): fixed bug #524697
8909
8910         * src/SDCCast.c: made some lineno improvements
8911
8912         * src/SDCCval.c (getNelements): changed warning to error
8913
8914         * src/SDCCglue.c (printIvalArray): changed warning to error
8915
8916         * src/SDCCicode.c: fixed a warning for mingw
8917
8918         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8919
8920         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8921
8922 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8923
8924         * src/ds390/peeph.def:
8925         Added some more peephole rules
8926
8927         * src/ds390/gen.c: Various fixes & enhancements
8928
8929         * src/SDCClrange.c, src/SDCClrange.h:
8930         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8931
8932         * src/ds390/ralloc.c:
8933         various fixes & enhancements (ds390) specific
8934
8935         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8936         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8937         from rallocs.
8938
8939         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8940
8941 2002-03-02    <johan AT FRIJA>
8942
8943         * src/SDCCast.c (decorateType): fixed bug #524708
8944
8945         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8946
8947         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8948
8949 2002-03-01  Michael Hope  <michaelh AT vroom>
8950
8951         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8952
8953         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8954
8955 2002-03-01    <johan AT FRIJA>
8956
8957         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8958
8959         * src/SDCCast.c (decorateType): fixed bug #524209
8960
8961         * src/SDCCval.c (valNot): fixed bug #524195
8962
8963 2002-02-26    <johan AT balder>
8964
8965         * src/xa51/gen.c: fixed a warning
8966
8967         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8968
8969         * src/SDCCast.c (decorateType): fixed bug #522534
8970
8971 2002-02-23    <johan AT balder>
8972
8973         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8974
8975 2002-02-22    <johan AT balder>
8976
8977         * src/SDCCast.c: fixed bug #514865
8978
8979         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8980
8981 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8982
8983         * sdcc/src/SDCCloop.c:
8984         Previous fix was not good. basic blocks that have "break" or "return" are
8985         not really partof a loop , but live ranges used in these blocks should
8986         be live thru the entire loop, so set partOfLoop but don't add them to
8987         loop region
8988
8989 2002-02-21    <johan AT FRIJA>
8990
8991         * src/SDCCcse.c: fixed bug #514308
8992
8993 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8994
8995         * src/SDCCloop.c:
8996         Fixed BUG #519583. If a conditional block ended in a return/break
8997         statement inside a loop, it was not being considered part of the loop.
8998
8999         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9000
9001 2002-02-10  Karl Bongers <karl AT turbobit.com>
9002
9003         * debugger/*:
9004         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9005         with lots of comments and notes.
9006
9007         * device/examples/test2.c:
9008         Fix bug, "red" variable not being initialized(compiler complained).
9009
9010         * device/examples/Makefile, examples/test3.c:
9011         Add Makefile in device/examples folder, compiles test3.c
9012         for use as a multiple module SDCDB test case.
9013
9014         * sim/ucsim/cmd.src/cmdset.cc:
9015         Took out debug printfs in ucsim "next" command.
9016
9017         * sim/ucsim/xa.src:
9018         Karl and Johan start ucsim XA support.  Most dissassembly working,
9019         about 75% emulation done(plenty of work remaining).
9020
9021         * sim/ucsim/z80.src:
9022         Add Z80 support to ucsim, add test-ucz80 regression test,
9023         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9024         Notice z80 compiler fails on examples/test3.c/crc code.
9025
9026 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9027
9028         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9029         Added support for --parms-in-bank1
9030
9031         * src/ds390/peeph.def:
9032         added a few more peephole optimzations
9033
9034         * src/ds390/main.c:
9035         1) added __builtin_inp & __builtin_outp used to read in data of given length
9036            from a memory mapped port
9037         2) added __builtin_memcmp
9038         3) added __builtin_swapw swap bytes of a short
9039
9040         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9041         1) handle multiple send & receives from register bank1
9042         2) ralloc can now allocate DPTR1 to some liveRanges
9043
9044         * src/SDCCsymt.c, src/SDCCsymt.h:
9045         changes to handle multiple sends & receives
9046
9047         * src/SDCCptropt.h:
9048         added some pointer arithmetic optimization
9049
9050         * src/SDCCptropt.c:
9051         added some pointer arithmetic optimizations but not stable yet so not
9052         called from anywhere (will get this working shortly)
9053
9054         * src/SDCCopt.c: fixed for multiple sends & receives
9055
9056         * src/SDCCmain.c:
9057         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9058         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9059            set preprocessor defines (depending on options)
9060
9061         * src/SDCCicode.c, src/SDCCicode.h:
9062         changes made to handle multiple sends & receives
9063
9064         * src/SDCCglobl.h:
9065         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9066
9067         * src/SDCCcse.c, src/SDCCcse.h:
9068         added function findbackward def (to be used in upcoming optimization)
9069
9070         * src/SDCCcflow.c, src/SDCCcflow.h:
9071         added function returnAtEnd - to determine if a basic block terminates with
9072         a RETURN iCode
9073
9074         * src/SDCCast.c, src/SDCCast.h:
9075         added option parms-in-bank1
9076
9077         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9078         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9079         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9080         adjusted for --parms-in-bank1 option
9081
9082         * device/include/string.h:
9083         donot redefine "reentrant" keyword
9084
9085         * device/include/ds80c390.h: Added some more SFRs
9086
9087 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9088
9089         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9090
9091 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9092
9093         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9094
9095 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9096
9097         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9098
9099 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9100
9101         * Added --xram-movc option
9102
9103 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9104
9105         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9106
9107 2002-01-11  Johan Knol
9108
9109         * Added math lib of Jesus Calvino-Fraga
9110
9111 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9112
9113         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9114         * support/regression/Makefile: new target test-mcs51-stack-auto
9115         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9116
9117 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9118
9119         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9120
9121 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9122
9123         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9124
9125 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9126
9127         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9128
9129         * src/SDCCglue.h: add definition for printIvalChar()
9130
9131 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9132
9133         * src/SDCCast.c: fix #498138 by Johan
9134
9135         * src/SDCCglue.c: fix #498138 by Johan
9136
9137 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9138
9139         * support/regression/Makefile: fix clean
9140
9141         * support/regression/ports/ds390/support.c: fix transmission of last character
9142
9143 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9144
9145         * /sdcc/src/ds390/gen.c:
9146         a) improved computing address of stack variable
9147         b) took out some #if 0 code
9148         c) improved parmBytes adjustment
9149         d) improved genPlusIncr & genMinusIncr
9150         e) genCmp could generate bad code (when left assigned to DPTR)
9151         f) Fixed bug in hasInc
9152
9153         * /sdcc/src/ds390/ralloc.c:
9154         a) packRegsForSupport could mess up live information (Fixed)
9155         b) packRegsDPTRuse could be incorrect for left & right shift
9156
9157         * /sdcc/src/mcs51/ralloc.c:
9158         packRegsForSupport could mess up the live information (Fixed)
9159
9160         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9161
9162         * /sdcc/src/SDCCast.c:
9163         can reverse a loop even if function call is present as long
9164         as the loop control variable is local & is not passed as parameter
9165
9166 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9167
9168         * /sdcc/ChangeLog: *** empty log message ***
9169
9170         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9171         More builtin function additions for TININative
9172
9173         * /sdcc/src/ds390/ralloc.c:
9174         Had broken the regression testsuite
9175
9176         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9177
9178         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9179         Added funcattr hasStackParms will be set for reentrant functions when there
9180         are paramteres on the stack, this helps in minimizing frame pointer generation
9181         typeFromStr can handle function pointers now
9182
9183         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9184         *** empty log message ***
9185
9186 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9187
9188         * /src/ds390/gen.c, /src/ds390/main.c:
9189         More builtin function additions for TININative
9190
9191         * /src/ds390/ralloc.c:
9192         Had broken the regression testsuite
9193
9194         * /src/SDCCast.c: Fixed a bug in dumptree
9195
9196         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9197         Added funcattr hasStackParms will be set for reentrant functions when there
9198         are paramteres on the stack, this helps in minimizing frame pointer generation
9199         typeFromStr can handle function pointers now
9200
9201         * /doc/builtins.txt, /doc/TININative.txt:
9202         *** empty log message ***
9203
9204
9205 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9206
9207         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9208         ALPHA version for -mTININative
9209
9210         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9211         updated to reflect changes in the port structure
9212
9213         * /src/port.h:
9214         added function do_assemble (similar to do_link) if non-null this function
9215         will be called to do assembly (-mTININative) requires a multi command
9216         assembly
9217         added function genAssemblerEnd will be called to generate assembler Epilogue
9218
9219         * /src/SDCCsymt.c:
9220         added _JavaNative to debug info printing
9221
9222         * /src/SDCCmain.c: added option --tini-libid
9223         added port->do_assemble function (-mTININative) has a multi command assemble
9224
9225         * /src/SDCCglue.c: Disabled "constExpr" check
9226         added port->genAssemblerEnd function
9227
9228         * /src/SDCCglobl.h: Added option --tini-libid value
9229
9230         * /src/SDCCast.h:
9231         tookout optimizeCompare from the header (has no external references)
9232
9233         * /src/SDCCast.c: made one more function "static"
9234
9235 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9236
9237         * src/z80/mappings.i: Added z80asm support.
9238
9239         * src/z80/main.c: Added z80asm support on --asm=z80asm
9240
9241         * src/z80/gen.c: Fixed asm portability issues.
9242
9243         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9244
9245         * src/SDCCglue.c (printExterns): Added global/extern split.
9246
9247 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9248
9249         * support/regression/Makefile: added test for mcs51 model large
9250
9251         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9252
9253         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9254
9255 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9256
9257         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9258
9259 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9260
9261         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9262
9263         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9264
9265 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9266
9267         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9268
9269         * support/regression/tests/simplefloat.c: Port to mcs51.
9270
9271 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9272         * support/regression/tests/bug-485362.c: Added.
9273
9274         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9275
9276         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9277
9278         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9279
9280         * src/z80/gen.c (aopDump): Added a dump function.
9281
9282 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9283         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9284
9285         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9286
9287         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9288
9289         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9290
9291         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9292
9293         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9294
9295         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9296
9297         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9298
9299         * support/regression/ports/ds390/support.c: Use tinibios.
9300
9301         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9302
9303 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9304
9305         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9306         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9307
9308         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9309
9310         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9311
9312 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9313
9314         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9315
9316         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9317         (packRegsForIYUse): Created and optimised.
9318
9319 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9320
9321         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9322 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9323
9324         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9325
9326         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9327
9328         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9329
9330 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9331
9332         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9333
9334         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9335
9336 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9337
9338         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9339
9340         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9341
9342         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9343
9344 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9345
9346         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9347         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9348         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9349
9350         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9351
9352         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9353         (genNotFloat): Added.
9354         (genUminusFloat): Added.
9355
9356         * device/lib/z80/Makefile: Added floating pt stubs.
9357
9358         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9359
9360         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9361
9362         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9363
9364 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9365
9366         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9367
9368         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9369
9370         * sdcc/support/regression/Makefile: Add port ds390.
9371
9372         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9373
9374         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9375
9376         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9377
9378         * sdcc/support/regression/ports/ds390/support.c: Added.
9379
9380         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9381
9382         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9383
9384         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9385
9386 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9387
9388         * device/include/malloc.h: Added z80 and gbz80 support.
9389
9390         * device/lib/gbz80/heap.s: Added.
9391
9392         * device/lib/z80/heap.s: Added.
9393
9394         * device/lib/malloc.c: Added z80 and gbz80 support.
9395
9396         * support/regression/tests/malloc.c (testMalloc): Added.
9397
9398         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9399
9400         * support/regression/tests/bug-478094.c: Added.
9401
9402         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9403
9404 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9405
9406         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9407
9408         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9409
9410         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9411
9412         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9413
9414         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9415
9416 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9417
9418         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9419
9420 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9421
9422         * support/regression/tests/bug-477927.c: Added.
9423
9424         * src/z80/peeph.def: Added minor rules.
9425
9426         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9427
9428         * src/z80/peeph.def: Added jump optimisation modification.
9429
9430 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9431
9432         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9433
9434 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9435
9436         * support/regression/tests/funptrs.c: Added.
9437
9438 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9439
9440         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9441
9442 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9443
9444         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9445
9446         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9447
9448         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9449         (movLeft2ResultLong): Created.
9450
9451         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9452         (joinPushes): Added.  Joins two char pushes into a word push.
9453
9454 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9455
9456         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9457
9458         * support/makebin/Makefile (install): Added creation of dest dir.
9459
9460 2001-10-24 Karl Bongers <karl AT turbobit.com>
9461
9462         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9463
9464 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9465
9466         * src/z80/ralloc.c: Turned off faulty pack for one use.
9467
9468         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9469
9470         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9471
9472 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9473
9474         * support/regression/Makefile: Improved clean
9475
9476         * support/regression/ports/gbz80/spec.mk: Added clean
9477
9478         * support/regression/ports/host/spec.mk: Added clean
9479
9480         * support/regression/ports/z80/spec.mk: Added clean
9481
9482         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9483
9484         * support/regression/ports/mcs51/timeout.c: little improvements
9485
9486 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9487
9488         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9489
9490         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9491
9492         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9493
9494 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9495
9496         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9497
9498         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9499
9500 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9501         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9502
9503         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9504
9505         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9506
9507         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9508
9509         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9510
9511         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9512
9513         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9514
9515         * support/regression/tests/longor.c: Added.
9516
9517 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9518
9519         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9520
9521         * as/mcs51/aslink.h: define PATH_MAX
9522
9523         * as/mcs51/asm.h: define PATH_MAX
9524
9525         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9526
9527         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9528
9529         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9530
9531         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9532
9533         * src/SDCCglobl.h: define PATH_MAX
9534
9535         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9536
9537         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9538
9539 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9540
9541         * src/z80/gen.c (gencjneshort): Fixed
9542
9543         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9544
9545 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9546
9547         * support/regression/tests/bug-469671.c: Added.
9548
9549         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9550
9551 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9552
9553         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9554
9555         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9556
9557 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9558
9559         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9560
9561         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9562
9563         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9564
9565         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9566
9567         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9568
9569         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9570
9571         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9572
9573 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9574
9575         * 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.
9576
9577         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9578
9579         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9580
9581 2001-10-07    <johan AT FRIJA>
9582
9583         * device/lib/gets.c (gets): fixed the return value.
9584
9585 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9586         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9587
9588         * 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.
9589
9590         * 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.
9591
9592         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9593
9594         * src/pic/gen.c: Removed Safe_strdup.
9595
9596         * configure.in: Added option to enable libgc support.
9597
9598         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9599         (bitVectUnion): Optimised.
9600         (bitVectIntersect): Optimised.
9601         (bitVectBitsInCommon): Optimised.
9602         (bitVectCplAnd): Optimised.
9603
9604         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9605
9606 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9607
9608         * src/SDCCmain.c: distinguish between assembler debug and plain options
9609
9610         * src/avr/main.c:   remove standard assembler options
9611
9612         * src/ds390/main.c: remove standard assembler options
9613
9614         * src/mcs51/main.c: remove standard assembler options
9615
9616         * src/port.h: removed "PENDING" comment
9617
9618 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9619
9620         * src/device/lib/_mulint.c  : new, with assember functions
9621
9622         * src/device/lib/_mullong.c : new, with assember functions
9623
9624         * src/device/lib/_divuint.c : with assember functions
9625
9626         * src/device/lib/_divsint.c : with assember functions
9627
9628         * src/device/lib/_divulong.c: with assember functions
9629
9630         * src/device/lib/_divslong.c: with assember functions
9631
9632         * src/device/lib/_moduint.c : with assember functions
9633
9634         * src/device/lib/_modsint.c : with assember functions
9635
9636         * src/device/lib/_modulong.c: with assember functions
9637
9638         * src/device/lib/_modslong.c: with assember functions
9639
9640         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9641
9642         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9643
9644         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9645                                       replaced _mululong.c and _mulslong.c by _mullong.c
9646
9647 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9648
9649         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9650
9651 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9652
9653         * src/SDCCglue.c: test, if win32api is available for MINGW
9654
9655 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9656
9657         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9658         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9659         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9660         * support/regression/ports/host/spec.mk: removed GENERIC
9661         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9662         * support/regression/ports/z80/spec.mk: removed GENERIC
9663
9664 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9665
9666         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9667
9668         * support/regression/tests/bug-467035.c: Created.
9669
9670 2001-10-01    <johan AT FRIJA>
9671
9672         * src/SDCC.y: fixed bug #466586 part 1
9673
9674 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9675
9676         * SDCCicode.c: z80 has no generic pointers
9677         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9678
9679 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9680
9681         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9682
9683 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9684
9685         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9686
9687         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9688
9689 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9690
9691         * configure.in: Fixed up so that ucsim is only configured once.
9692
9693         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9694
9695         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9696         (getPathDifference): As above.
9697
9698         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9699
9700         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9701
9702 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9703         * .version: Updated to 2.3.1
9704
9705         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9706         Added copyright header.
9707
9708         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9709         (assemble): Added support for macro based assembler commands.
9710         (linkEdit): Added support for macro based linker commands.
9711         (preProcess): Changed the pre-processor to use macros.
9712         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9713         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9714
9715         * device/lib/z80/crt0.s: Added module name for debugging.
9716
9717 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9718
9719         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9720
9721         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9722
9723         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9724
9725         * src/Makefile.in: Added SDCCmacro and SDCCutil
9726
9727 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9728
9729         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9730
9731 2001-09-16    <johan AT FRIJA>
9732
9733         * 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.
9734
9735 2001-09-15    <johan AT FRIJA>
9736
9737         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9738         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9739
9740 2001-09-11    <johan AT FRIJA>
9741
9742         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9743
9744 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9745
9746         * support/regression/tests/bug-460444.c: Added test case.
9747
9748         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9749         (genCast): Added justification for all of the asserts.
9750
9751 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9752
9753         * support/regression/support.c: _xdata replaced by xdata
9754
9755         * support/regression/spec.mk: removed _generic
9756
9757 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9758
9759         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9760
9761         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9762         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9763
9764         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9765
9766         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9767
9768         * support/regression/tests/bug-460010.c: Added test case.
9769
9770         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9771
9772 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9773
9774         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9775
9776         * support/regression/testfwk.c: removed workaround for bug #436344
9777
9778         * support/regression/tests/bp.c: use less memory with mcs51
9779
9780         * support/regression/tests/bug-441448.c: use less memory
9781
9782         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9783
9784         * support/regression/collate-results.py: typo
9785
9786 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9787
9788         * support/regression/tests/fetchoverlap.c: Added new test case.
9789
9790         * support/regression/tests/bp.c: Added new test case.
9791
9792         * support/regression/tests/bug-448984.c: Added new test case.
9793
9794         * support/regression/tests/pow2shifts.c: Added new test case.
9795
9796         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9797         (genlshTwo): Fixed right shift for count > 8.
9798
9799         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9800
9801 2001-09-08    <johan AT FRIJA>
9802
9803         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9804
9805 2001-09-07    <johan AT FRIJA>
9806
9807         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9808
9809         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9810
9811 2001-09-06    <johan AT FRIJA>
9812
9813         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9814         * bernhard noted me at this: "() equals to (void)" (1.38)
9815
9816 2001-09-05    <johan AT FRIJA>
9817
9818         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9819
9820 2001-09-04    <johan AT FRIJA>
9821
9822         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9823
9824
9825 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9826
9827         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9828
9829 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9830
9831         * link/z80/aslink.h: Fixed path for PATH_MAX
9832
9833 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9834
9835         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9836
9837         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9838
9839         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9840
9841         * 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.
9842
9843 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9844
9845         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9846         (genCmp): Fixed up genCmp for the GB with longs.
9847
9848         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9849
9850         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9851
9852         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9853
9854         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9855
9856 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9857
9858         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9859
9860 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9861
9862         * 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.
9863
9864         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9865
9866 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9867
9868         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9869
9870         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9871
9872 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9873
9874   * sim/ucsim/configure:    little improvement of Cygwin-detection
9875   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9876   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9877   * support/regression/tests/bug-221100.c: small changes for mcs51
9878   * support/regression/tests/bug-221168.c: small changes for mcs51
9879   * support/regression/tests/bug-227710.c: small changes for mcs51
9880   * support/regression/tests/staticinit.c: small changes for mcs51
9881   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9882   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9883   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9884
9885 $Revision$