97e4a19401f45f5741111f0515b248a121265057
[fw/sdcc] / ChangeLog
1 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
2
3         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
4         all chars are promoted to int; promotion should be handled in SDCCast.c
5
6 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7
8         * device/lib/_strcmp.c: Fixed bug 1326457
9
10 2005-10-11 Raphael Neider <rneider AT web.de>
11
12         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
13         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
14
15 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
16
17         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
18         * support/regression/tests/sfr16.c: added test for the sfr32 bug
19
20 2005-10-04 Raphael Neider <rneider AT web.de>
21
22         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
23           device/lib/pic16/pics.all: added pic18f1320
24         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
25
26 2005-09-30 Raphael Neider <rneider AT web.de>
27
28         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
29         * src/pic16/devices.inc: NEW, provides device descriptions
30         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
31
32 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
33
34         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
35           GETHBIT
36
37 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
38
39         * doc/sdccman.lyx: updated Highest Order Bit documentation,
40           documented Any Order Bit, Higher Order Byte and Higher Order Word
41         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
42         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
43           (optimizeGetAbit): new, to get any bit, not only the high bit,
44           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
45           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
46           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
47           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
48             RIGHT_OP: also try GETBYTE, GETWORD optimization,
49             GETABIT, GETBYTE, GETWORD: decorate them,
50           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
51           (ast_print): added GETABIT, GETBYTE, GETWORD
52         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
53         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
54           (geniCodeBinary): new generic binary icode,
55           (ast2iCode): added GETABIT, GETBYTE, GETWORD
56         * src/port.h: updated comment for PORT.hasExtBitOp
57         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
58           (genGetByte): new, to get a single byte,
59           (genGetWord): new, to get a word from a long,
60           (gen51Code): added GETABIT, GETBYTE, GETWORD
61         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
62
63 2005-09-23 Raphael Neider <rneider AT web.de>
64
65         * configure.in, configure: have device/lib/pic configured
66         * device/lib/Makefile.in: added model-pic14
67         * device/lib/clean.mk: added pic/ to clean rule
68         * device/lib/pic: added rudimentary pic14 library providing support
69           functions for multiplication/division/generic pointer access
70         * src/SDCCopt.c (convilong): mark support functions as extern
71           for pic14 port as well
72         * src/pic/gen.c (genMult): added assertions,
73           (genpic14Code): emit warning on unhandled iCodes
74         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
75         * src/pic/pcode.c (pCodeOpCopy),
76         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
77           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
78           SFR_REGISTER}), made safe for future extensions
79         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
80           instructions even if preceeded by SKIP instructions (also remove
81           them); removed unused code
82         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
83           prevents leaving parts of the structure uninitialized after copying
84
85 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
86
87         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
88           ago by me
89         * support/regression/tests/addsub.c: added test for the bug
90
91 2005-09-21 Raphael Neider <rneider AT web.de>
92
93         * device/include/pic16/pic18f1220.h,
94           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
95         * device/lib/pic16/Makefile.rules: added missing opening paren
96         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
97           are provided in genutils.c,
98           (genUminusFloat,genUminus,genCmpEq): added asserts on different
99           operand/result sizes,
100           (genCmp): assert on NULL pointers first, then check deref'ed values
101         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
102           result size
103
104 2005-09-18 Raphael Neider <rneider AT web.de>
105
106         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
107           as these are now unused,
108           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
109         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
110           local, avoids uninitialized pointer dereference on r->name
111         * src/pic16/ralloc.c (newReg): fixed indentation
112
113 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
114
115         * src/SDCCval.c (constVal): fixed bug 730366
116         * support/Util/SDCCerr.c,
117         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
118
119 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
120
121         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
122
123 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
124
125         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
126
127 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
128
129         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
130           (hex2dec): made hex_digit unsigned char, removed ascii dependance
131         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
132           (hex2dec): made hex_digit unsigned char, removed ascii dependance
133         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
134         * packihx/packihx.c (hexDigit): made c unsigned char
135         * as/mcs51/lklibr.c (fndsym),
136         * link/z80/lkgb.c (gb),
137         * link/z80/lklibr.c (fndsym),
138         * link/z80/lkrloc.c (relr),
139         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
140         * src/SDCC.lex (checkCurrFile, process_pragma),
141         * src/SDCCglue.c (spacesToUnderscores),
142         * src/SDCCmain.c (setParseWithComma, processFile),
143         * src/asm.c (tvsprintf, printCLine),
144         * src/avr/gen.c (emitcode, aopPut),
145         * src/ds390/gen.c (emitcode),
146         * src/hc08/gen.c (emitcode, emitinline),
147         * src/mcs51/gen.c (emitcode, genInline),
148         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
149           tokenizeLineNode),
150         * src/pic/ralloc.c (debugLog),
151         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
152           tokenizeLineNode),
153         * src/pic16/ralloc.c (debugLog),
154         * src/z80/main.c (_process_pragma):
155            made all ctype.h function calls safe
156         * src/SDCCopt.c: include math.h for fabs
157         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
158           and used them throughout the code to make ctype.h function calls safe
159         * src/ds390/main.c (asmLineNodeFromLineNode),
160         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
161         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
162            unsigned char*
163         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
164           (newpCodeAsmDir): made ctype.h function calls safe
165         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
166           pic16_emitcode):  made lbp unsigned char*
167         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
168           (pic16_newpCodeAsmDir): made ctype.h function calls safe
169         * src/xa51/gen.c (emitcode),
170         * src/z80/gen.c (_emit2): made lbp unsigned char*
171         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
172            char*
173
174 2005-09-05 Raphael Neider <rneider AT web.de>
175
176         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
177           access bank splitpoint
178
179 2005-09-05 Raphael Neider <rneider AT web.de>
180
181         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
182
183 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
184
185         * .version: changed to version 2.5.3
186         * doc/sdccman.lyx: changed version to 2.5.3,
187           documented --codeseg and --constseg and pragma codeseg and constseg,
188           documented bit parameters (reentrant) and bit returning
189         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
190            currFunc->recvSize, but is this ok for all ports?
191           (ast2iCode): result of ~ on unsigned char must be cast to int for
192            bool to work
193         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
194           function pointers in bit space
195         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
196           (processFuncArgs): call port.reg_parm() with reentrancy info
197         * src/port.h,
198         * src/avr/main.c,
199         * src/ds390/main.c,
200         * src/hc08/main.c,
201         * src/pic/main.c,
202         * src/pic16/main.c,
203         * src/xa51/main.c,
204         * src/z80/main.c: port.reg_parm prototype extended with
205           "bool reentrant" parameter
206         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
207           options.stackAuto for allocating bit register parameters
208         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
209           (genSend): set BitBankUsed if it is,
210           (selectRegBank): factored out of genCall for use in genPcall,
211           (genCall): removed redundant dtype assignmen, use selectRegBank,
212           (genPcall): handle returning in Carry properly, save in F0 if needed,
213           (genReceive): handle bit register parameters
214         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
215           (mcs51_assignRegisters): enable bit registers for all reentrant
216            functions and don't set BitBankUsed unconditionally
217         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
218         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
219         * support/regression/tests/funptrs.c: added tests for BOOL and for return
220
221 2005-08-27 Borut Razem <borut.razem AT siol.net>
222
223         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
224         ppc-osx (Darwin) does not support -u option. It seems that it is
225         supported only on Linux - GNU cp
226
227 2005-08-25 Borut Razem <borut.razem AT siol.net>
228
229         * sim/ucsim/gui.src/serio.src/Makefile.in,
230           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
231           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
232           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
233           install and strip, since the strip at /usr/ccs/bin should be used
234           on solaris
235
236 2005-08-24 Borut Razem <borut.razem AT siol.net>
237
238         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
239
240 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
241
242         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
243         ffffffffu
244
245 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
246
247         * as/mcs51/aslink.h: completed lkrloc.c prototypes
248         * as/mcs51/lkmain.c (link_main): fixed warning
249         * device/include/stdbool.h: ds390 has no advanced bit support yet
250         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
251         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
252         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
253           and updated their macros
254         * src/SDCCval.c (constVal): updated comment for renamed b_long
255
256 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
257
258         * as/mcs51/asdata.c: changed ctype['['] to BINOP
259         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
260           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
261           (oprio): set priority for '['
262         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
263            and adb_24_bit
264         * as/mcs51/asm.h: added defines R_BIT and S_BIT
265         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
266         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
267         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
268           added overlayable BIT_BANK area
269         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
270           (summary2): explain 'T' in legenda
271         * as/mcs51/lkrloc.c: replaced old K&R style,
272           (relr): added R_BIT processing,
273           (errmsg): added "Bit-addressable relocation error",
274           (adb_bit): added for converting from byte- to bit-addressable space,
275           (adb_24_bit): added for converting from byte- to bit-addressable space
276         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
277            used in reentrant functions now even as return value
278         * device/lib/_gptrput.c (_gptrput): removed obsolete code
279         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
280           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
281         * src/SDCCglobl.h: added indicator BitBankUsed
282         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
283            the bit registers b0-b7
284         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
285           (geniCodeCast): fixed bug 1263853,
286           (geniCodeLogicAndOr): put result in bool or char,
287           (geniCodeReceive): added parameter func for accessing the return type,
288           (geniCodeFunctionBody): pass func to geniCodeReceive
289         * src/SDCCmain.c: added indicator BitBankUsed
290         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
291         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
292           (checkSClass): don't put automatic bool/bit on stack,
293           (checkFunction): removed check on function cannot return bit
294         * src/SDCCsymt.h: added newBoolLink prototype
295         * src/mcs51/gen.c (rb1regs): added bit registers,
296           (movc): created for assigning to carry,
297           (pushReg, popReg): created for pushing registers,
298           (sameRegs): check both AOP_REG and AOP_CRY types,
299           (aopOp): handle bit registers,
300           (aopPut): optimization no self-assign,
301           (saveRegisters): push reg->base (bits) only once for bit registers,
302            and use pushReg,
303           (unsaveRegisters): pop reg->base only once and use popReg,
304           (assignResultValue): added parameter func and return in carry for bits,
305           (genIpush): optimization no reload in A if not changed,
306           (genSend): bit parameters in reentrant functions are passed in bit
307            registers by first assigning to bits in B, then save registers and
308            copy B to bits,
309           (genCall): handle returning in Carry properly, save it in F0 if needed,
310           (genPcall): updated assignResultValue call, this is not safe yet for bit
311            returning function !!!
312           (genFunction): don't generate equ's for bit registers and use pushReg,
313           (genEndFunction): take care of bit returning functions and use popReg,
314           (genRet): return bit in Carry,
315           (genIfx): optimize bit registers and other directly addressable bits,
316           (genReceive): updated assignResultValue call
317         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
318           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
319            registers when using stack-auto
320         * src/mcs51/ralloc.c (_G): added allBitregs,
321           (regs8051): added the bit registers,
322           (createStackSpil): use macro IS_BIT,
323           (getRegBit): added to allocate a bit register, else spill,
324           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
325           (updateRegUsage): factored out to ease stepping while debugging,
326           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
327            also allocate bit registers,
328           (fillGaps): handle bit registers,
329           (findAllBitregs): added to create bit vector with all bit registers,
330           (mcs51_allBitregs): returns this bit vector,
331           (mcs51_assignRegisters): when using stack-auto use bit registers for
332            passing parameters and creating local variables
333         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
334
335 2005-08-22 Borut Razem <borut.razem AT siol.net>
336
337         * device/lib/Makefile.in: replaced find option -or with -o
338           to make it run on solaris
339
340 2005-08-22 Raphael Neider <rneider AT web.de>
341
342         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
343           fixes #1265442 (crash on Solaris)
344
345 2005-08-20 Borut Razem <borut.razem AT siol.net>
346
347         * configure, configure.in: added tests for libsocket and libnsl libraries,
348           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
349           from support/regression/Makefile.in
350         * support/regression/Makefile.in: added
351         * device/lib/pic16/Makefile.common.in: force make to use bash shell
352         * sim/ucsim/libtool: regenerated on sparc-solaris
353         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
354           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
355           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
356           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
357           sparc-solaris, which doesn't use GNU ld linker
358         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
359         * as/Makefile: find on sparc-solaris does not support -maxdepth option
360
361 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
362
363         * src/mcs51/peeph.def: updated comments
364
365 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
366
367         * device/lib/_gptrget.c,
368         * device/lib/_gptrput.c: slightly shorter
369         * doc/sdccman.lyx: incremented version
370         * src/mcs51/peeph.def: moved peephole comments to the line of first
371           change to better keep line correlation, reanimated 186.e
372         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
373
374 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
375
376         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
377           David Saxton with quotes around file name.
378
379 2005-08-15 Borut Razem <borut.razem AT siol.net>
380
381         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
382           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
383           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
384           make tests run on x86_64 platform
385
386 2005-08-13 Raphael Neider <rneider AT web.de>
387
388         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
389           as it might be executed DURING a build (parallel make is wonderful)
390
391 2005-08-13 Raphael Neider <rneider AT web.de>
392
393         * device/lib/Makefile.in (port-specific-objects-pic16):
394           revert to cp $(PORT)/bin/*.* $(PORTDIR)
395         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
396           dependency
397         * device/lib/pic16/Makefile.rules: build subdirs before creating
398           the library, removed builddir rule, create $(builddir) early in
399           recurse rule, use empty recurse rule for leaf directories
400         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
401           mkdir errors (race condition), removed duplicate suffix "hex"
402           from clean rules
403         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
404         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
405           prevents mkdir -p from aborting on Alpha
406
407 2005-08-12 Raphael Neider <rneider AT web.de>
408
409         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
410           db-statements in order to allow for arrays of pointers in code
411           sections to be placed without interspersed 0-padding, fixes
412           bug #1256215
413         * (emitStatistics): fixed division by zero for pic18f1220
414         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
415           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
416         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
417         * (pic16_pCodeConstString): keep track of already emitted string
418           literals to prevent "duplicate definitions of symbol _str_NR"
419         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
420           debug message
421         * device/lib/Makefile.in: ignore failing PIC16 library builds
422         * device/lib/pic16/Makefile: do not build if gputils are missing
423         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
424
425 2005-08-10 Raphael Neider <rneider AT web.de>
426
427         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
428           my last commit)
429
430 2005-08-10 Raphael Neider <rneider AT web.de>
431
432         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
433           Rokas' patch to add the new fixed point type "__fixed16x16"
434         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
435           functions for __fixed16x16 arithmetics
436         * device/lib/pic16: reimplemented the build system to support
437           a separate build directory, better handling of libio (create
438           the library in a separate subdir for each architecture) and
439           easier configuration (centralized in Makefile.common)
440
441 2005-08-07 Raphael Neider <rneider AT web.de>
442
443         * src/pic16/gen.c (genrshTwo): fixed sign extension
444         * src/pic16/device.c: added pic18f2320, 4220 and 4320
445         * device/include/pic16/pic18f2220.h: changed some bit definitions,
446           added T0CONbits
447         * device/include/pic16/pic18f4220.h: NEW, header for
448           pic18f4220 and pic18f4320
449         * device/include/pic16/pic18fregs.h: added new devices,
450           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
451         * device/include/pic16/signal.h: resolved name clashes
452           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
453           to also allow testing for interrupt enable bits, added
454           comments on how to use the macros
455         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
456         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
457           register definitions for the devices
458         * device/lib/pic16/pics.all: added new devices
459         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
460           allocated memory
461         * device/lib/pic16/libc/stdlib/memfree: do not count
462           the block header as free memory
463         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
464           simplified and added missing end-of-blocklist-marker
465           (reported by Peter Onion, fixes #1252814)
466         * (_mergeHeapBlock): fixed loop condition
467         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
468           len==0, restructured code
469         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
470           up a bit, reduced bitfield accesses, prevent endless loops
471           in case of heap corruption
472         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
473           "unreferenced arguments/must return a value" warnings
474         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
475           replaced BAUDREG with SPBRG
476         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
477           device/lib/pic16/debug/gstack/gstack.c: replaced
478           _naked, _asm, _endasm with __naked, __asm, __endasm
479
480 2005-08-05 Raphael Neider <rneider AT web.de>
481
482         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
483           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
484
485 2005-08-05 Borut Razem <borut.razem AT siol.net>
486
487         * device/lib/Makefile.in: added missing ';'
488         * configure: removed ^M characters
489
490 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
491
492         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
493           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
494           License
495
496 2005-08-04 Borut Razem <borut.razem AT siol.net>
497
498         * configure.in: pic16 libraries build 2nd try - enable running
499           configure in device/lib/pic16
500         * configure: regenerated from configure.in
501         * device/lib/Makefile.in: create $(PORT)/bin directory
502
503 2005-08-03 Raphael Neider <rneider AT web.de>
504
505         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
506           to get/set values via pointers
507         * (genUnpackBits,genPackBits): changed detection of
508           ptr->bitfield vs. sym.bitfield, fixed access via generic
509           pointers, removed dead (wrong) code for multibyte bitfields
510         * (genNearPointerGet, genGenPointerGet): removed useless code,
511           fixed bitfield detection, fixes #1250594
512         * (genNearPointerSet): removed useless code
513         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
514           and introduced macro pic16_emitpcode that conditionally emits
515           the origin of the following pCode (useful for debugging SDCC)
516         * src/pic16/pcode.c: changed (and disabled) some debug outputs
517         * (createDefmap): fixed handling of LFSR for --optimize-df
518
519 2005-08-02 Borut Razem <borut.razem AT siol.net>
520
521         * device/lib/Makefile.in: pic16 libraries build enabled since
522           gputils-0.13.2 are now localy installed at sourceforge's compile farm
523
524 2005-08-02 Raphael Neider <rneider AT web.de>
525
526         * src/pic16/gen.c (genPackBits): removed deprecated warning
527         * (genGenPointerSet): fixed bitfield detection
528
529 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
530
531         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
532
533 2005-07-31 Raphael Neider <rneider AT web.de>
534
535         * device/lib/pic16/libdev/pic18f458.c,
536           device/include/pic16/pic18f458.h: added missing T0CONbits
537
538 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
539
540         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
541
542 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
543
544         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
545
546 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
547
548         * device/include/mcs51/at89c51ed2.h: added.
549
550 2005-07-23 Raphael Neider <rneider AT web.de>
551
552         * src/pic/gen.h: added emitpcode macro for debugging
553         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
554           and replace by macro adding debug information on demand
555         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
556         * (gencjne): tried to fix; replaced with correct (slower) code
557         * (gen{Unp,P}ackBits): fixed single bit access
558         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
559         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
560           previous instruction
561         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
562           register has to be handled with care (forbidding movement
563           of assignments/uses, removing assignments completely, ...)
564         * (pCodeOptime2pCodes): make use of regIsSpecial
565         * added lots of debugging output (commented out)
566         * src/pic/rallloc.c (deassignLRs): prevent operand registers
567           from being reused as result UNLESS it is known to work
568
569 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
570
571         * support/Util/dbuf.h: include <stddef.h> for size_t
572         * .version: changed to version 2.5.2
573
574 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
575
576         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
577
578 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
579
580         * src/hc08/gen.c (genMinus): fixed bug #1241835,
581           (genModOneByte): removed needless psha/pula
582
583 2005-07-22 Raphael Neider <rneider AT web.de>
584
585         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
586           have PIC14 handled like PIC16, fixes broken pic14 linker calls
587         * src/pic/gen.c (resolveIfx): do not "invent" labels
588         * (genSkipc): changed to positive logic
589         * (genSkipCond): removed as no longer needed
590         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
591           backport from PIC16
592         * (genLeftShift): check operands are in different registers
593         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
594           INCF does not update CARRY...
595         * src/pic/main.c: fixed _linkCmd
596         * src/pic/pcode.c (unlinkpCode): added inactive code
597         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
598           alive (do not assign result and operand overlapping registers)
599
600 2005-07-22 Raphael Neider <rneider AT web.de>
601
602         * src/pic/device.c (dump_sfr): replaced register declaration with
603           call to emitSymbolToFile() to avoid duplicate symbols
604         * (assignRelocatableRegisters): do not declare external symbols
605         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
606           right (take size of type, not etype)
607         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
608         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
609         * (packRegsForAccUse): disabled assignment of WREG as
610           the result reg to prevent occurence of just fixed #1235003,
611           fixes #1242954
612         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
613           symbols (avoids duplicate symbols in .asm file)
614         * (pic14emitRegularMap): use emitSymbolToFile()
615         * src/pic/gen.c (aopOp): fixed spillLocation handling
616         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
617         * (genDataPointerSet): removed unneccessary variables/output
618
619 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
620
621         * as/mcs51/lkarea.c: enlarged codemap for banked memory
622         * device/lib/mcs51/crtbank.asm: added # to 0x0F
623
624 2005-07-21 Raphael Neider <rneider AT web.de>
625
626         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
627           architecture cannot handle them efficiently, fixes bug #1235003
628         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
629           check for empty sets before using them (fixes bug #1232190)
630
631 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
632
633         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
634           (lnksect2): generate warnings for memory overlap
635         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
636           constseg to set the name of these segments so you can instruct the linker
637           to place them in banks
638         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
639         * src/SDCCglobl.h: added MODEL_HUGE to enum,
640           added code_seg and const_seg to options
641         * src/SDCCglue.c (emitMaps): use options.const_seg,
642           (createInterruptVect): put interrupt vectors in segment HOME,
643           (glue): put HOME before static segment and put the main glue in HOME,
644           (glue): use options.code_seg
645         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
646         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
647           these segments so you can instruct the linker to place them in banks
648           (linkEdit): use code_loc for HOME segment which should be the first
649           segment in code memory now
650         * src/SDCCmem.c: fixed more stuff like bug 1238386
651         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
652           (changePointer): don't change function pointers to code pointers for
653           banked functions,
654           (compareType): added exceptional check for banked function pointers
655         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
656         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
657           after static in code memory
658         * src/mcs51/gen.c: added aopLiteralLong prototype,
659           (aopForSym): use getSize for functions,
660           (genCall): generate banked calls over one trampoline __sdcc_banked_call
661           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
662           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
663           the segment,
664           (genPcall): use call for literal function pointers and generate banked
665           calls over the one trampoline so there's only one place for the user to
666           modify according to his/hers hardware,
667           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
668           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
669         * src/mcs51/main.c: added keyword banked,
670           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
671         * support/Util/SDCCerr.c,
672         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
673           needed for passing the bank and address to the trampoline
674         * device/lib/mcs51/crtbank.asm: added for bankswitching
675         * device/lib/mcs51/Makefile: added crtbank
676
677 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
678
679         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
680           for fields at offset 0 of a struct or union as reported
681           on 2005-07-07 in the developer mailing list.
682
683 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
684
685         * src/SDCCmem.c: fixed bug 1238386
686
687 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
688
689         * src/mcs51/peeph.def: added labelrefcounting for peepholes
690           (patch #1144962), added peephole 300, enabled 259.x
691         * doc/sdccman.lyx: removed screenshot and provided link instead
692
693 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
694
695         * doc/sdccman.lyx: added section about debugging with ddd
696         * doc/figures/ddd_example.eps: screenshot of debugging session
697
698 2005-07-04 Raphael Neider <rneider AT web.de>
699
700         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
701           like CODE pointers, fixes #1115683
702         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
703           call, fixes bugs #1232211, #1228110,
704           fixed wrong casts to pCodeFlow from pCodeInstructions
705
706 2005-07-04 Raphael Neider <rneider AT web.de>
707
708         * src/pic/gen.c (popGet): changed assert to allow for
709           bit operands
710         * (popGetAddr): changed signature to provide
711           an additional index, patched all call sites
712         * (genCmpEq): handle literal-like operands correctly
713         * (genAddrOf): added sanity checks on __code/__data pointers
714         * (genAssign): added handling of symbols from __code section
715         * (gencjne): do not generate code for comparisons whose result
716           is neither stored nor used, fixes bug #1171114
717         * (AccLsh, AccRsh): operate on operand instead of WREG
718         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
719           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
720           by known count
721         * rewrote complete shift-by-literal logic, commented unused
722           functions out
723         * (genConstPointerGet): get multiple bytes (if result size > 1),
724           fixed handling of non-immediate addresses
725         * (genPointerGet): handle CODE pointers like CONST pointers
726         * (genpic14Code): insert C-SRC lines as Cource-pCodes
727         * ({aop,op}_isLitLike): NEW, single place to decide whether an
728           operand is to be treated as a literal or not
729         * (mov2w,genPcall,genCmpEq),
730           src/pic/genarith.c: use aop_isLitLike() to decide between
731           literal/register contents
732         * (addSign): added missing offset
733         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
734           only emit comment in debug-mode,
735           use {aop,op}_isLitLike throughout the file
736         * src/pic/glue.c: fix initializers for pointers (work in progress)
737         * src/pic/pcode.c (get_op): honor index on _const symbols
738         * ({reset,dump}pCodeStatistics): NEW, estimate code size
739         * (dumppBlock): added pCode size estimation
740         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
741           check for IS_SYMOP before OP_SYMBOL'ing
742         * fixed indentation, compacted switch-statements
743         * (allocReg): find free register and allocate it instead of
744           allocating new registers all the time
745         * (deassignLRs): prevent POINTER_GET's from being assigned the same
746           registers as its operands (necessary only for multibyte GETs)
747
748 2005-07-01 Raphael Neider <rneider AT web.de>
749
750         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
751           debugging .asm-output macros FENTRY + FEXIT
752         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
753           way... I wonder...
754         * (emitpComment): NEW, printf to pCode
755         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
756           offset handling
757         * (popGetAddr): NEW, variant of popGet to access an immediates
758           high(er) bytes instead of the n'th byte of memory they reference,
759           replaced popGet with popGetAddr where neccessary
760         * (genDataPointerGet): reactivated and fixed implementation
761         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
762           accesses
763         * (genDataPointerSet): fixed multibyte assignments
764         * (genpic14Code): fixed --i-code-in-asm handling
765         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
766         * (genPlus): fixed index-out-of-bounds error
767         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
768         * src/pic/ralloc.c: added debugging output macro FENTRY2
769         * (spillThis): fixed indentation, enbraced for-body for clarity
770         * (rematStr): commented out as now unused
771         * (regTypeNum): commented out special spill case (overwrites
772           arbitrary values)
773         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
774
775 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
776
777         * doc/sdccman.lyx: documented sfr16/sfr32,
778           added example for using storage class with function pointers
779         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
780
781 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
782
783         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
784         * device/lib/_itoa.c,
785         * device/lib/_ltoa.c: optimized codesize
786         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
787           but don't know how to suppress the double warning.
788         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
789         * support/Util/SDCCerr.c,
790         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
791
792 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
793
794         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
795           fixed old K&R prototypes
796         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
797         * device/lib/_gptrget.c,
798         * device/lib/_gptrgetc.c,
799         * device/lib/_gptrput.c: changed versions for new memory indicator values,
800           also new versions for small generic pointers and banked generic pointers
801         * src/port.h: added const_name
802         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
803         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
804         * src/SDCCcse.c (findPrevIc): check all associative operators
805         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
806         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
807         * src/SDCCmem.c: updated comments,
808           set far-space to 0 for pdata, results in optimized code
809         * src/SDCCmem.h: added macro CONST_NAME
810         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
811           moving the info into the highest bits, see also gptrget/gptrput
812         * src/src.dsp: added sdcc.ico to project files
813         * src/avr/gen.c (genCast): fixed bug 0x%d
814         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
815         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
816           relation between ptr_type and DCL_TYPE,
817           (genCast): fixed bug 0x%d
818         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
819           (CODE)" for const_name
820         * src/hc08/gen.c (genCast): fixed bug 0x%d
821         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
822           (hc08_port): added "CONST (CODE)" for const_name
823         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
824           (aopForRemat, adjustArithmeticResult): disconnected direct relation
825           between ptr_type and DCL_TYPE,
826           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
827           operand* and took AOP() inside function so sfr-ness can be checked,
828           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
829           new prototype,
830           (genFunction, genEndFunction): optimized stack setup,
831           (genMinus): optimized for literals with ending zeroes (in bytes),
832           (genCast): fixed bug 0x%d
833         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
834           (mcs51_port): added "CONST (CODE)" for const_name
835         * src/mcs51/peeph.def: made rule 226 more generic
836         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
837         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
838         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
839         * src/z80/main.c (z80_port): added NULL for const_name,
840           (gbz80_port): added NULL for const_name
841         * support/regression/tests/bug663539.c,
842         * support/regression/tests/sfr16.c: new tests
843
844 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
845
846         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
847
848 2005-06-24 Raphael Neider <rneider AT web.de>
849
850         * device/lib/pic16/libdev/pic18f[68][567]20.c:
851           corrected typos...
852         * device/include/pic16/signal.h: added USBIF
853           and SIG_USB
854
855 2005-06-24 Raphael Neider <rneider AT web.de>
856
857         * device/lib/pic16/libdev/pic18f2455.c,
858           device/include/pic16/pic18f2455.h: NEW
859         * device/include/pic16/pic18fregs.h,
860           device/lib/pic16/pics.all,
861           src/pic16/device.c: added 18f2455
862         * device/lib/pic16/libdev/pic18f[68][567]20.c,
863           device/include/pic16/{pic18f[68][567].h,usart.h}:
864           replaced MULTIPLE_USARTS define with more relaible
865           compatibility sfrs (for USART access)
866
867 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
868
869         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
870           and the output asm file line is printed on two lines.
871
872 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
873
874         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
875           BGT, BLE, BHI, and BLS instructions
876         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
877           genCmpEq): removed
878         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
879           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
880           fixes bug #1216342
881         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
882
883 2005-06-15 Raphael Neider <rneider AT web.de>
884
885         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
886         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
887         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
888           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
889           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
890
891 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
892
893         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
894           Marcel Telka in bug #1215704
895
896 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
897
898         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
899           located in shared memory bank.
900
901 2005-05-31 Raphael Neider <rneider AT web.de>
902
903         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
904           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
905           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
906
907 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
908
909         * device/lib/_strncpy.c: fixed the fix
910
911 2005-05-26 Raphael Neider <rneider AT web.de>
912
913         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
914           initializers with \0, bug #1208187
915         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
916           intializers with \0, bug #1208187
917
918 2005-05-26 Raphael Neider <rneider AT web.de>
919
920         * src/pic16/glue.c (pic16_printIvalChar): fixed string
921           initializers with \0, bug #1208187
922         * src/pic16/main.c (_process_pragma): added sanity checks
923           for stack position and size, emit warnings when appropriate
924
925 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
926
927         * device/lib/_strncpy.c: fixed not filling with \0
928
929 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
930
931         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
932           createFunction),
933         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
934           compound_statement),
935         * src/SDCCsymt.h,
936         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
937
938 2005-05-24 Raphael Neider <rneider AT web.de>
939
940         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
941
942 2005-05-24 Raphael Neider <rneider AT web.de>
943
944         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
945           TRISE definitions, closes bug #1162453
946
947 2005-05-22 Raphael Neider <rneider AT web.de>
948
949         * src/pic16/main.c (_process_pragma): check for missing
950           arguments to pragmas code and udata
951         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
952           consistency fixes to match other headers (thanks to Jim Paris)
953         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
954
955 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
956
957         * src/SDCCicode.c (isOperandEqual): fixed missing ;
958
959 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
960
961         * support/regression/tests/bug1198642.c: new test
962         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
963         * src/SDCCcse.c (findPrevIc): added comment, please have a look
964         * support/scripts/resource.h,
965         * support/scripts/resource.rc,
966         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
967         * support/scripts/sdcc.ico: added 32x32 icon
968
969 2005-05-18 Raphael Neider <rneider AT web.de>
970
971         * device/lib/pic16/libdev/pic18f*.c,
972         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
973           keywords to "__sfr" and "__at (X)"
974         * device/include/pic16/pic18fregs.h: added pic18f4520
975         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
976           #1203088 (MPLAB compatibility)
977
978 2005-05-17 Raphael Neider <rneider AT web.de>
979
980         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
981         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
982         * device/lib/pic16/pics.all: added new devices
983         * src/pic16/device.c: added support for pic18f4520
984
985 2005-05-16 Raphael Neider <rneider AT web.de>
986         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
987         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
988         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
989           convenience function for bit access
990
991 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
992
993         * device/lib/printf_large.c: fixed bug 1193299
994         * support/regression/tests/bug1057979.c: added test %3.3s
995
996 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
997
998         * device/include/mcs51/8051.h,
999         * device/include/mcs51/8052.h: made parseable with lint
1000         * device/include/mcs51/lint.h: added include file for (sp)lint
1001         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
1002         * doc/cdbfileformat.lyx,
1003         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
1004
1005 2005-05-14 Raphael Neider <rneider AT web.de>
1006
1007         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
1008         * device/lib/pic16/libc/stdlib/itoa.c (new)
1009         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
1010         * device/lib/pic16/libio/Makefile: exclude subdir according to
1011           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
1012         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
1013         * src/pic16/gen.c (genFunction): prevent annoying warning
1014         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
1015           nameclashes on BeOS
1016         * support/cpp2/cppmain.c (cpp_output_string): new
1017         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
1018           fixes bug 1116802
1019
1020 2005-05-13 Borut Razem <borut.razem AT siol.net>
1021
1022         * src/SDCCmain.c (linkEdit): fixed bug 1195202
1023
1024 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1025
1026         * .version: changed to version 2.5.1; back to bleeding edge development
1027
1028 2005-05-11 Borut Razem <borut.razem AT siol.net>
1029
1030         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
1031           generate PDF version 1.3 documents
1032
1033 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1034
1035         * .version: changed to version 2.5.0
1036
1037 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1038
1039         * doc/sdccman.lyx: updated weblinks, index and smaller updates
1040
1041 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1042
1043         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
1044         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
1045         well as many smaller updates.
1046         * .version: changed to version 2.5.0-pre1
1047
1048 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1049
1050         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
1051
1052 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
1053
1054         * support/regression/tests/bug1185672.c: added
1055         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
1056           bug 1185672
1057         * src/mcs51/gen.c (genCall): added comments, made it look safer
1058         * src/mcs51/gen.c (genEndFunction): simplified
1059
1060 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
1061
1062         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
1063
1064 2005-04-14 Borut Razem <borut.razem AT siol.net>
1065
1066         * fixed bug 1045046 - SIGSEGV with really simple code?:
1067           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
1068           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
1069
1070 2005-04-14 Borut Razem <borut.razem AT siol.net>
1071
1072         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
1073           src/pic16/device.h: temporarily disabled experimental #inline pragma
1074           for 2.5.0 release
1075
1076 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
1077
1078         * device/include/z80/stdio.h,
1079         * device/include/z80/string.h: removed these highly incomplete files so
1080           SDCC can use the default ones in device/include/
1081
1082 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1083
1084         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
1085         gcc warning.
1086         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
1087         fix sdcpp warnings.
1088
1089 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1090
1091         * device/include/malloc.h: removed redundant __reentrant prototypes
1092         * device/lib/_mullong.c: added working xstack variant in asm (C version
1093           doesn't pass regression tests)
1094         * device/lib/bpx.c: used __data and made bpx char for mcs51
1095         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
1096           (createFunction): fixed bug with xstackPtr
1097         * src/SDCCcse.c: corrected comments
1098         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
1099           (killDeadCode, eBBlockFromiCode): removed unused code
1100         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
1101           corrected comments
1102         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
1103           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
1104           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
1105           (genModOneByte): fixed warning in MSVC
1106         * src/mcs51/main.c (): added comments
1107         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
1108
1109 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
1110
1111         * src/SDCCmain.c (linkEdit): oops, changed one line too many
1112
1113 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
1114
1115         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
1116
1117 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
1118
1119         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
1120         characters arrays of larger size than the declared one.
1121
1122 2005-04-10 Borut Razem <borut.razem AT siol.net>
1123
1124         * src/pic/gen.c (genInline),
1125           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
1126           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
1127           (findNextInstruction), (findPrevInstruction),
1128           (findInstructionUsingLabel),
1129           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
1130         * src/pic/pcode.c (findLabel): added missing '\n'
1131         * src/src.dsp: added SDCCdwarf2.c to the project
1132
1133 2005-04-09 Borut Razem <borut.razem AT siol.net>
1134
1135         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
1136
1137 2005-04-08 Raphael Neider <rneider AT web.de>
1138
1139         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
1140           into the chain after a given one) and mergeDefmapSymbols (combine
1141           defmap entries for each symbol per pcode)
1142         * (createDefmap): have defmap entries merged in the end
1143         * (defmapReplaceSymRef): split defmap entries covering two accesses to
1144           a symbol before replacing one access type's symbol, merge symbols in
1145           the end (replacement symbol might already have an entry)
1146         * (assignValnums): keep reference to written WREG intact
1147
1148 2005-04-08 Raphael Neider <rneider AT web.de>
1149
1150         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
1151           Alpha)
1152
1153 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
1154
1155         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
1156         bytes
1157
1158 2005-04-07 Raphael Neider <rneider AT web.de>
1159
1160         * device/include/pic16/usart.h: added compatibility defines for
1161           devices with more than one USART
1162         * device/include/pic16/pic18f[68][567]20.h: activated above defines
1163
1164 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1165
1166         * device/lib/Makefile.in: updated for port specific include
1167
1168 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1169
1170         * support/regression/ports/mcs51/spec.mk: added mcs51 include
1171
1172 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
1173
1174         * device/include/8051.h,
1175         * device/include/8052.h,
1176         * device/include/at89S8252.h,
1177         * device/include/at89c55.h,
1178         * device/include/at89x051.h,
1179         * device/include/at89x51.h,
1180         * device/include/at89x52.h,
1181         * device/include/mcs51reg.h,
1182         * device/include/reg51.h,
1183         * device/include/reg764.h,
1184         * device/include/regc515c.h,
1185         * device/include/sab80515.h: (re)moved these 12 files
1186         * device/include/mcs51/8051.h,
1187         * device/include/mcs51/8052.h,
1188         * device/include/mcs51/at89S8252.h,
1189         * device/include/mcs51/at89c55.h,
1190         * device/include/mcs51/at89x051.h,
1191         * device/include/mcs51/at89x51.h,
1192         * device/include/mcs51/at89x52.h,
1193         * device/include/mcs51/mcs51reg.h,
1194         * device/include/mcs51/reg51.h,
1195         * device/include/mcs51/reg764.h,
1196         * device/include/mcs51/regc515c.h,
1197         * device/include/mcs51/sab80515.h: and added them here
1198
1199 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
1200
1201         * device/include/stdarg.h: changed SDCC specific keywords to double
1202           underlined form.
1203         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
1204           mcs51 and ds390.
1205         * device/include/hc08/mc68hc908gp32.h,
1206         * device/include/hc08/mc68hc908jb8.h,
1207         * device/include/hc08/mc68hc908jkjl.h,
1208         * device/include/hc08/mc68hc908qy.h: fixed comments
1209         * device/include/mcs51/README: updated
1210         * device/include/mcs51/c8051f120.h: added PINRSF
1211         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
1212         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
1213           amidst code. Also inline is not supported.
1214
1215 2005-04-06 Raphael Neider <rneider AT web.de>
1216
1217         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
1218         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
1219           callers stack/frame pointers
1220
1221 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
1222
1223         * device/include/pic16/usart.h: added, missing in previous commit,
1224         * device/include/pic16/adc.h: fixed typo,
1225         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
1226         commit,
1227         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
1228         <p18fxxx.inc>
1229         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
1230         uninitialized because a bug appears with gplink
1231         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
1232         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
1233         complains for unrecognised option
1234
1235 2005-04-05 Raphael Neider <rneider AT web.de>
1236
1237         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
1238           structs as well (using memcpy)
1239         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
1240           on ISRs (GOTO has no label)
1241         * src/pic16/device.h: added OF_OPTIMIZE_DF
1242         * src/pic16/main.c: added compiler switch --optimize-df to enable the
1243           new data flow analysis/optimization
1244         * src/pic16/pcode.c: added (prototypes for and implementation of)
1245           dataflow analysis functions, fixed pCodeInstructions' inCond and
1246           outCond values, made RCALL a branch instruction
1247         * (pic16_unlinkpCode): keep C line if possible
1248         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
1249           C line moved if possible
1250         * (pic16_getRegFrompCodeOp): NEW, improved version of...
1251         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
1252           to use new pic16_getRegFrompCodeOp (works for more SFRs)
1253         * (pic16_BuildFlow): fixed skip instructions with label (did not start
1254           new flow)
1255         * (pic16_getJumptabpCode): NEW, needed in...
1256         * (LinkFlow): fixed handling of jumptables, calls and conditional
1257           branches
1258         * (pic16_InsertCommentAfter): NEW
1259         * (pic16_pCodeReplace): made verbose and flow preserving
1260         * (AnalyzeFlow): added call to data flow analysis
1261         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
1262         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
1263         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
1264
1265 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1266
1267         * src/SDCCast.c (decorateType): fixed bug #1105626
1268
1269 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
1270
1271         * device/include/asm/pic16/features.h,
1272         * pic18f*.h headers,
1273         * device/include/pic16/adc.h,
1274         * device/include/pic16/delay.h,
1275         * device/include/pic16/i2c.h,
1276         * device/include/pic16/malloc.h,
1277         * device/include/pic16/stdio.h,
1278         * device/include/pic16/stdlib.h,
1279         * device/include/pic16/string.h,
1280         * device/lib/pic16/libc/stdio/printf_tiny.c,
1281         * device/lib/pic16/libc/stdio/printf_small.c,
1282         * device/lib/pic16/libc/stdio/strmgpsim.c,
1283         * device/lib/pic16/libc/stdio/strmmssp.c,
1284         * device/lib/pic16/libc/stdio/strmusart.c,
1285         * device/lib/pic16/libc/stdio/vfprintf.c,
1286         * device/lib/pic16/libc/stdlib/ltoa.c,
1287         * device/lib/pic16/libc/stdlib/putchar.c,
1288         * device/lib/pic16/libc/stdlib/x_ftoa.c,
1289         * device/lib/pic16/libc/stdlib/memchrpgm.c,
1290         * device/lib/pic16/libc/stdlib/memchrram.c,
1291         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
1292         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
1293         * device/lib/pic16/libio/adc/adcbusy.c,
1294         * device/lib/pic16/libio/adc/adcread.c,
1295         * device/lib/pic16/libio/adc/adcsetch.c,
1296         * device/lib/pic16/libio/usart/ubaud.c,
1297         * device/lib/pic16/libio/usart/ubusy.c,
1298         * device/lib/pic16/libio/usart/udrdy.c,
1299         * device/lib/pic16/libio/usart/uopen.c,
1300         * device/lib/pic16/libio/usart/uputc.c,
1301         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
1302         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
1303         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
1304         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
1305         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
1306         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
1307         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
1308         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
1309         specific keywords to double underlined form,
1310         * device/lib/pic16/libc/Makefile.rules,
1311         * device/lib/pic16/libsdcc/Makefile.rules,
1312         * device/lib/pic16/libm/Makefile,
1313         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
1314         to compile with C standard set in Makefile.common
1315         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
1316         rand.c and crc.c in compilation process,
1317         * device/lib/pic16/libsdcc/int/divuint.c,
1318         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
1319         `c' from signed to unsigned,
1320         * device/lib/pic16/startup/crt0.c,
1321         * device/lib/pic16/startup/crt0i.c,
1322         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
1323         keywords to double underlined form, bug fixes in _do_cinit function
1324         which prevented the correct initialization of the .idata segment,
1325         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
1326         core to enter a infinite loop
1327         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
1328
1329 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1330
1331         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
1332
1333 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1334
1335         * device/include/Makefile.in: add support for hc08 subdirectory
1336         * device/include/hc08/: new subdirectory
1337         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
1338         Lucas Loizaga, thanks!
1339         * device/include/hc08/mc68hc908qy.h,
1340         * device/include/hc08/mc68hc908gp32.h,
1341         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
1342         their own directory. Changed internal macro names to use the compiler
1343         reserved namespace. Changed SDCC specific keywords to double
1344         underlined form.
1345         * device/include/math.h,
1346         * device/include/malloc.h,
1347         * device/include/stdarg.h,
1348         * device/include/stdbool.h
1349         * device/include/string.h,
1350         * device/include/tinibios.h,
1351         * device/include/ds400rom.h,
1352         * device/include/8051.h,
1353         * device/include/8052.h,
1354         * device/include/80c51xa.h,
1355         * device/include/at89c55.h,
1356         * device/include/at89S8252.h,
1357         * device/include/at89x51.h,
1358         * device/include/at89x52.h,
1359         * device/include/ds80c390.h,
1360         * device/include/reg764.h,
1361         * device/include/regc515c.h,
1362         * device/include/sab80515.h,
1363         * device/include/mcs51/c8051f000.h,
1364         * device/include/mcs51/c8051f018.h,
1365         * device/include/mcs51/c8051f020.h,
1366         * device/include/mcs51/c8051f040.h,
1367         * device/include/mcs51/c8051f060.h,
1368         * device/include/mcs51/c8051f120.h,
1369         * device/include/mcs51/c8051f300.h,
1370         * device/include/mcs51/c8051f310.h,
1371         * device/include/mcs51/c8051f320.h,
1372         * device/include/mcs51/c8051f330.h,
1373         * device/include/mcs51/c8051f350.h,
1374         * device/include/z180.h: Changed SDCC specific keywords to double
1375         underlined form.
1376
1377 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1378
1379         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1380         18F4455,
1381         * (pic16_assignConfigWordValue): disable testing of configuration
1382         register value with config mask,
1383         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1384         function with port->fun_prefix,
1385         * (genFunction): when generating a naked interrupt function never
1386         create an absolute segment placed in interrupt vector address, place
1387         the actual interrupt function at IVA instead, when an interrupt
1388         function is generated with unspecified interrupt then do not create
1389         the absolute section,
1390         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1391         code for generating a call to generic pointer get/put function with
1392         a call to function pic16_callGenericPointer(),
1393         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1394         the call to the generic pointer get/put functions with prefixing the
1395         function name with port->fun_prefix,
1396         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1397         * src/pic16/main.c (_process_pragma): prefix function with
1398         port->fun_prefix,
1399         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1400         calling assembler, old 18Fxxxx macro is deprecated,
1401         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1402         PC_ASMDIR in while condition,
1403         * (findInstruction): add PC_ASMDIR in while condition,
1404         * (buildCallTree): prefix main with port->fun_prefix,
1405         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1406         identifier for variable with banked access in instructions BTFSS,
1407         BTFSC, BCF, BSF, BTG
1408         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1409         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1410         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1411         perform optimization when enviroment variable NO_REG_OPT is set,
1412         * (insideLRBlock): NEW, return 1 if register is inside an
1413         INF_LOCALREGS block,
1414         * (RemoveRegFromLRBlock): remove a register that is completely
1415         eliminated by register optimization, but it is still left in local
1416         register store/restore in/from stack block,
1417         * (Remove2pcodes): after removing register, check to see if it
1418         should be removed from local register store/restore in/from stack
1419         block,
1420         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1421         DUMMY_READ_VOLATILE,
1422
1423         * device/include/pic16/adc.h: minor prototype modifications and
1424         update,
1425         * device/include/pic16/malloc.h: added GPL notice various
1426         modifications,
1427         * device/include/pic16/stdint.h: NEW, standard header for ints
1428         * device/include/pic16/delay.h: NEW, header for delay functions,
1429         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1430         delay1mtcy,
1431         * device/include/pic16/signal.h: NEW, header providing helper macros
1432         for implementing signal handlers,
1433         * device/include/pic16/stdio.h: added prototypes for functions,
1434         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1435         prototypes for stdin and stdout, added macro PUTCHAR to
1436         automatically implement putchar function prototype,
1437         * device/include/pic16/usart.h: modified and updated USART library,
1438         * device/lib/pic16/libio/adc/,
1439         * device/lib/pic16/libio/i2c: some modifications to improve library
1440         performance,
1441         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1442         family of functions,
1443         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1444         family of functions and other sources,
1445         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1446         of the PIC18Fxx[28] devices,
1447         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1448         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1449         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1450         _do_cinit function, because the previous failed when local variables
1451         where not placed in the same memory bank,
1452         * device/lib/pic16/libsdcc/char/: various modifications to improve
1453         library performance,
1454         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1455         information on the new functions of the c library and more...
1456
1457 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1458
1459         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1460
1461 2005-03-26 Raphael Neider <rneider AT web.de>
1462
1463         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1464           if condition == CARRY)
1465         * (genCmp): adapted to new genSkipc semantics
1466         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1467           on rIfx (genCmp was broken)
1468
1469 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1470
1471         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1472         * src/z80/main.c (_keywords[]),
1473         * src/SDCCglobal.h (struct options),
1474         * src/SDCC.y,
1475         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1476         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1477         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1478         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1479         always available in leading double underscore form. The C99 support is
1480         mostly missing, but it's a start.
1481         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1482         reserved identifier "__data".
1483
1484 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1485
1486         * src/mcs51/peeph.def: fixed bug 1170013
1487
1488 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1489
1490         * device/include/mcs51reg.h: fixed bug 842007
1491
1492 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1493
1494         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1495         last time.
1496
1497 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1498
1499         * src/port.h (struct PORT),
1500         * src/avr/ralloc.c (avr_assignRegisters),
1501         * src/avr/main.c,
1502         * src/ds390/ralloc.c (ds390_assignRegisters),
1503         * src/ds390/main.c,
1504         * src/hc08/ralloc.c (hc08_assignRegisters),
1505         * src/hc08/main.c,
1506         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1507         * src/mcs51/main.c,
1508         * src/pic/ralloc.c (pic14_assignRegisters),
1509         * src/pic/main.c,
1510         * src/pic16/ralloc.c (pic16_assignRegisters),
1511         * src/pic16/main.c,
1512         * src/xa51/ralloc.c (xa51_assignRegisters),
1513         * src/xa51/main.c,
1514         * src/z80/ralloc.c (z80_assignRegisters),
1515         * src/z80/ralloc.h,
1516         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1517         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1518         * src/SDCCcse.h,
1519         * src/SDCCdflow.c (computeDataFlow),
1520         * src/SDCCdflow.h,
1521         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1522         * src/SDCCloop.h,
1523         * src/SDCCcflow.c (*),
1524         * src/SDCCcflow.h,
1525         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1526         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1527         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1528         immedDom() returning wrong block; probably fixes bug #1160833)
1529
1530 2005-03-20 Borut Razem <borut.razem AT siol.net>
1531
1532         * support/scripts/inc2h.pl: WIN32 port
1533
1534 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1535
1536         * device/lib/makefile.in: added abs.c and labs.c
1537
1538 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1539
1540         * device/include/stdint.h: added
1541         * device/lib/abs.c: added
1542         * device/lib/labs.c: added
1543         * device/include/stdlib.h: added abs() and labs() prototypes
1544         * device/lib/libsdcc.lib: added abs and labs
1545         * device/include/float.h,
1546         * device/lib/_fsmul.c,
1547         * device/lib/printf_fast.c,
1548         * device/lib/printf_tiny.c: updated comments
1549
1550 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1551
1552         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1553         bug #1164313
1554
1555 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1556
1557         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1558         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1559
1560 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1561
1562         * device/lib/printf_large.c: removed inline assembly for portability and
1563           readability. Use printf_fast if speed or size are more important.
1564         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1565         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1566
1567 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1568
1569         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1570         prevent compiler warning
1571
1572 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1573
1574         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1575         moved to level 0 and declared as static. Also they are explicit
1576         placed in access bank. This was necessery because some times they
1577         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1578         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1579         optimizations. Currently only compare to unsigned char is implemented,
1580         * src/pic16/gen.c: added fReturnIdx array,
1581         * (struct resolvedIfx) is moved to gen.h and made public,
1582         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1583         * (aopForSym): added an optimization to directly store in stack of
1584         the operand of a SEND iCode,
1585         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1586         but as registers instead (AOP_REG) using the fReturnIdx array,
1587         * (pic16_freeAsmop): remove the freed register from the
1588         _G.sregsAlloc field,
1589         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1590         a compare of 'WREG',
1591         * (pic16_popGetTempRegCond): changed function prototype, now
1592         function takes also a bitVector argument v which holds the current
1593         set of registers that are allocated for stack access by aopForSym,
1594         registers allocated in aopForSym for accessing stack symbols are not
1595         any more part of the functions usedRegs field,
1596         * (genCall): some times aopOp is called for a stack variable to be
1597         send, aopForSym might perform the push, if this is true make sure
1598         that genCall doesn't push the variable twice by testing _G.resDirect,
1599         * (genFunction): changed testing for unspecified interrupt number
1600         from 256 to INTNO_UNSPEC,
1601         * modified selection scheme of frame pointer generation. Previously
1602         if function did use local registers a frame pointer was generated,
1603         now a frame pointer is generated only if function has arguments
1604         (that need PLUSW2 register access), or has stack arguments, or the
1605         compiler is not instructed to omit the frame pointer,
1606         * (genEndFunction): before restoring local registers that were saved
1607         in the function preamble, also restore the registers that *might*
1608         have been allocated for stack access,
1609         * (genRet): removed some old comments,
1610         * (genCmp, the active (RN's) version): added a call to the
1611         pic16_genCmp_special function to perform the compare with a more
1612         robust and optimized way,
1613         * (genInline): a feature has been added in inline code generation,
1614         which allows a wildcard variable substitution when writing inline
1615         assembly. Code is incomplete and experimental therefore undocumented,
1616         * (genCast): changed order of aopOp for result and right to allow
1617         aopForSym to directly load the result if possible,
1618         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1619         perform an optimized compare on some selected special occasions,
1620         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1621         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1622         generate an IVT any more,
1623         * src/pic16/main.c (pic16_optionsTable): added command line option
1624         --optimize-cmp,
1625         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1626         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1627         macros,
1628         * src/pic16/NOTES: Raphael Neider added in list of active developers
1629         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1630         jumptable_end to prevent bug #,
1631         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1632         inCond and outCond fields,
1633         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1634         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1635         turn off register spilling,
1636         * (packRegsForOneUse): synced with other ports' versions although it
1637         is not used currently,
1638         * (pic16_packRegisters): added an optimization while reading
1639         structure bitfields, some registers may be saved (malloc code is
1640         decreased by 80 bytes)
1641
1642 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1643
1644         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1645         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1646         this can be optimized more?
1647
1648 2005-03-10 Raphael Neider <rneider AT web.de>
1649
1650         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1651           genNearPointerGet): (hopefully) fixed access to bitfields via
1652           pointers (p->bitN = x; and x = p->bitN; failed)
1653
1654 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1655
1656         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1657
1658 2005-03-09 Raphael Neider <rneider AT web.de>
1659
1660         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1661
1662 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1663
1664         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1665         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1666           (regTypeNum): set REG_BIT type if necessary
1667         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1668         * support/regression/tests/critical.c: check bug 1144613
1669
1670 2005-03-02 Raphael Neider <rneider AT web.de>
1671
1672         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1673
1674 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1675
1676         * src/avr/ralloc.c (serialRegAssign),
1677         * src/ds390/ralloc.c (serialRegAssign),
1678         * src/hc08/ralloc.c (serialRegAssign),
1679         * src/mcs51/ralloc.c (serialRegAssign),
1680         * src/pic/ralloc.c (serialRegAssign),
1681         * src/pic16/ralloc.c (serialRegAssign),
1682         * src/xa51/ralloc.c (serialRegAssign),
1683         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1684
1685 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1686
1687         * src/SDCCast.c (decorateType): fixed bug 1124787
1688
1689 2005-02-20 Hubert Sack <sack AT digiplan.de>
1690         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1691
1692         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1693         patch #1121755
1694
1695 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1696
1697         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1698         to keep the correct label reference count when adding/removing references
1699         to labels. A peephole file using this is appended to patch #1144962.
1700
1701 2005-02-14 Raphael Neider <rneider AT web.de>
1702
1703         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1704         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1705         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1706           retrievals of result operand's value on assignment
1707
1708 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1709
1710         * device/include/pic16/string.h: modified prototype for memccpy()
1711         to memccpy(void *, void *, char, size_t)
1712         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1713         check whether to omit frame pointer or not,
1714         * (genInline): convert all occurences of "\n" to LF in inline
1715         assembler blocks, this helps formatting the inline text,
1716         * (pic16_loadFSR0): modified prototype,
1717         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1718         removed some 8051 legacy code,
1719         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1720         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1721         before allocating temporary registers in functions,
1722
1723 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1724
1725         * support/regression/tests/bitvars.c: corrected the "fix"
1726
1727 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1728
1729         * support/regression/tests/bitvars.c,
1730         * support/regression/tests/bitwise.c,
1731         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1732
1733 2005-02-10 Raphael Neider <rneider AT web.de>
1734
1735         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1736           different size for Alpha
1737         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1738
1739 2005-02-09 Raphael Neider <rneider AT web.de>
1740
1741         * src/SDCC.lex(doPragma) : save and restore warning options as well
1742           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1743         * have #pragma less_pedantic set the errorlevel to WARNING
1744           (fixes #1117001)
1745         * (cloneOptimize) : fixed wrong malloc's size
1746         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1747           facilitate correct handling of #pragma (save|restore)
1748
1749 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1750
1751         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1752
1753 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1754
1755         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1756
1757 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1758
1759         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1760
1761 2005-02-02 Raphael Neider <rneider AT web.de>
1762
1763         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1764         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1765         * (pic16_storeForReturn): fixed to allow returning function pointers
1766         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1767         * device/include/pic16/{stddef.h,stdbool.h}: added
1768
1769 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1770
1771         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1772
1773 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1774
1775         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1776         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1777          appeared to be required
1778
1779 2005-01-31 Borut Razem <borut.razem AT siol.net>
1780
1781         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1782           include/mcs51 and include/z80 directories to the package
1783
1784 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1785
1786         * src/hc08/gen.c (genFunction): fixed bug #1112752
1787
1788 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1789
1790         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1791
1792 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1793
1794         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1795
1796 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1797
1798         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1799
1800 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1801
1802         * device/include/c8051fxxx.h: removed these 6 files
1803         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1804
1805 2005-01-26 Raphael Neider <rneider AT web.de>
1806
1807         * src/pic16/gen.c (genAssign): fixed assignment from longs
1808           in codespace (were cut to three bytes)
1809         * (genDummyRead): implemented (except for CODESPACE...),
1810           fixed bug #1108575
1811         * src/pic16/glue.c (emitStatistics): beautified
1812         * device/lib/pic16/libm/Makefile: added include path
1813
1814 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1815
1816         * src/z80/gen.c (aopPut): fixed bug #1103902
1817
1818 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1819
1820         * device/lib/expf.c: fixed bug #1095792
1821
1822 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1823
1824         * device/lib/pic16/libm: added Math library sources
1825
1826 2005-01-24 Raphael Neider <rneider AT web.de>
1827
1828         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1829           to enable upcast to pCodeOpReg2 (there is no type tag to
1830           differenciate the two and pic16_popGet2p cast into PCOR2)
1831         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1832           (sizeof(sectNames) changed to sizeof(sectName))
1833           Both patches fix segfaults under MinGW.
1834
1835 2005-01-23 Raphael Neider <rneider AT web.de>
1836
1837         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1838           Safe_[mc]?alloc()'ed variables
1839         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1840           of (byte sized) temporaries (assign them to WREG for now)
1841         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1842           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1843           this might fix SIGSEGVs on MinGW...
1844         * src/SDCCopt.c (killDeadCode): restored original behaviour
1845           (volatile operands might get thrown away though)
1846
1847 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1848
1849         * src/pic16/gen.c: fixed bug #1106975,
1850         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1851         pointer update, INTCON is saved, global interrupts are disabled and
1852         restored after updateing TOS.
1853         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1854         * added function attribute 'shadowregs' to take advantage of shadow
1855         registers,
1856         * added function attribute 'wparam' as an alternative to the wparam
1857         pragma,
1858         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1859         user declares a non-ISR function as 'shadowregs',
1860         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1861
1862 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1863
1864         * .version: bumped version number to 2.4.8
1865         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1866         pic16 port,
1867         * device/lib/pic16/libio/i2c/: I2C module support library,
1868         * device/include/pic16/i2c.h: I2C support library header,
1869         * device/lib/pic16/libc/stdio/: standard IO support sources,
1870         * (printf_small.c): printf_small() source, supports float print,
1871         * (printf_tiny.c): printf_tiny() source, does not support floats,
1872         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1873         enable global optimizations for entire library source, other
1874         Makefiles in the source tree are also modified to reflect this,
1875         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1876         function,
1877         * doc/sdccman.lyx: updated to reflect new changes,
1878         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1879         sym->onStack if-case,
1880         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1881         sbit, idata, _idata, xdata, _xdata,
1882         * added pragma library, to link an external library, (see doc),
1883         * removed command line options, --pomit-config-words, --pomit-ivt,
1884         --pleave-reset-vector,
1885         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1886         when calling assembler to reflect memory model used, also define
1887         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1888         reflect stack model used,
1889         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1890         on stack return NULL,
1891
1892 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1893
1894         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1895           of the operands is volatile. Fixes #1020220
1896
1897 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1898
1899         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1900         * (OptimizeRegUsage): make sure that there is really no other flow where
1901           the first pCode is used
1902
1903 2005-01-22 Raphael Neider <rneider AT web.de>
1904
1905         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1906           to fix #1106967 (pCode->seq are not set up correctly)
1907
1908 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1909
1910         * src/SDCCglue.c (glue): make sure code area is declared before the
1911         static initialization area.
1912
1913 2005-01-21 Raphael Neider <rneider AT web.de>
1914
1915         * device/lib/Makefile.in: fixed test for pic16 install dir
1916         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1917           optimizations
1918         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1919           added --optimize-goto compiler switch and pragma wparam documentation
1920         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1921         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1922           and PRODH closing bug #1071770 (peephole optimizer)
1923
1924 2005-01-19 Raphael Neider <rneider AT web.de>
1925
1926         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1927           cmdLine buffers (used when calling sdcpp...) are large enough
1928           (MAX_PATH=256 truncates arguments leading to system halts when
1929           used in MinGW...)
1930         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1931         * (genUminus): rewritten to for efficiency
1932         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1933           used uninitialized in some cases)
1934         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1935           copy the third byte from the int -- now assumes 0x80 (data memory)
1936         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1937           operands (genAddLit expects the iCode's operands to swapped as
1938           well), fixed leftover bytes (crashed for short left operands)
1939         * (pic16_genMinusDec): performance improvements, removed false
1940           PIC14 emitSKPNCs
1941         * (pic16_genMinus): fixed to cope with differently sized operands
1942         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1943           for --obanksel > 1
1944         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1945         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1946           new banksel optimization
1947         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1948           analysis for temporary registers (segfaults...)
1949         * src/pic16/peeph.def: added rule
1950
1951 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1952
1953         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1954         which converts a float number to its ASCII representation
1955         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1956         functions to convert the fractional and integer part of a float to ASCII,
1957         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1958         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1959         ram
1960         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1961         _STATMEM macros,
1962         * device/include/pic16/adc.h: added GPL info,
1963         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1964         a pCodeOp as tested operand,
1965         * (genNearPointerGet): optimized bit testing, does not use
1966         intermediate register for bit value, test directly instead with
1967         BTFSS, BTFSC, works only for single bits,
1968         * (genpic16Code): dump the name of the iCode in the asm,
1969         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1970         renamed to pic16_decodeOp,
1971         * (serialRegAssign): do not allocate a temporary register for iCode
1972         sequences that test a single bit for 1/0
1973
1974 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1975
1976         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1977         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1978         access stack and frame pointers. They are initially assigned to
1979         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1980         accessing SFRs. Updated all occurences of modification of stack or
1981         frame pointer in gen.c and pcode.c,
1982         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1983         assigning of a literal value to pointers,
1984         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1985         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1986         selected
1987
1988 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1989
1990         * doc/sdccman.lyx: update documentation about stack pragma, added
1991         some info for stack memory models
1992
1993 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1994
1995         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1996
1997 2005-01-08 Raphael Neider <rneider AT web.de>
1998
1999         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
2000           udata sections to fix bug #1097823
2001
2002 2005-01-05 Raphael Neider <rneider AT web.de>
2003
2004         * src/pic16/gen.c (genGenericShift): added handling of differently
2005           sized left operand and result
2006
2007 2005-01-04 Raphael Neider <rneider AT web.de>
2008
2009         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
2010         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
2011           to hold the condition bit)
2012         * added new version of genCmp (old code available via #define)
2013         * added new version of genShiftLeft/genShiftRight in a generic
2014           way, now supports shifting by negative values
2015         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
2016           shiftCount (expected by genGenericShift)
2017         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
2018         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
2019           dump
2020         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
2021           is an invalid literal too...)
2022
2023 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
2024
2025         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
2026         from Raphael Neider,
2027         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
2028         for 8-bit literals. This fixes some literal operands which are sign
2029         extended to 16-bits ints when instruction needs only 8-bits.
2030
2031 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
2032
2033         * device/lib/logf.c: added mcs51 assembly version
2034         * device/lib/expf.c: added mcs51 assembly version
2035         * device/lib/_logexpf.c: new shared asm code for expf and logf
2036         * device/include/math.h: add defines for assembly math library
2037         * device/lib/Makefile.in: build new _logexpf.c
2038         * device/lib/libfloat.lib: use new _logexpf.c
2039
2040 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2041
2042         * src/pic/device.c
2043         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
2044           device types which have less than 0x7f registers.
2045
2046 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
2047
2048         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
2049
2050 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2051
2052         * device/lib/printf_fast.c: only build on supported arch.
2053         * device/lib/printf_tiny.c: only build on supported arch.
2054         * device/lib/printf_fast_f.c: only build if asm float lib
2055         * device/lib/_fsget1arg.c: only build if asm float lib
2056         * device/lib/_fsget2args.c: only build if asm float lib
2057         * device/lib/_fsnormalize.c: only build if asm float lib
2058         * device/lib/_fsreturnval.c: only build if asm float lib
2059         * device/lib/_fsrshift.c: only build if asm float lib
2060         * device/lib/_fsswapargs.c: only build if asm float lib
2061         * device/include/stdio.h: don't provide print_fast,
2062           print_fast_f, print_tiny prototypes if --xstack used
2063
2064 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
2065
2066         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
2067         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
2068           to the SOURCES
2069
2070 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
2071
2072         * device/lib/printf_fast_f.c: same as printf_fast, but
2073           with floating point enabled
2074         * device/lib/printf_fast.c: minor tweaks
2075         * device/include/stdio.h: add printf_fast_f
2076
2077 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2078
2079         * src/SDCCmain.c: make --float-reent default for mcs51
2080         * device/lib/_fsadd.c: added mcs51 assembly version
2081         * device/lib/_fssub.c: added mcs51 assembly version
2082         * device/lib/_fsmul.c: added mcs51 assembly version
2083         * device/lib/_fsdiv.c: added mcs51 assembly version
2084         * device/lib/_fseq.c: added mcs51 assembly version
2085         * device/lib/_fsneq.c: added mcs51 assembly version
2086         * device/lib/_fsgt.c: added mcs51 assembly version
2087         * device/lib/_fslt.c: added mcs51 assembly version
2088         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
2089         * device/lib/Makefile.in: add _fscmp to build
2090         * device/lib/libfloat.lib: add _fscmp to build
2091
2092 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
2093
2094         * device/lib/_fs2slong.c: added mcs51 assembly version
2095         * device/lib/_fs2sint.c: added mcs51 assembly version
2096         * device/lib/_fs2schar.c: added mcs51 assembly version
2097         * device/lib/_fs2ulong.c: added mcs51 assembly version
2098         * device/lib/_fs2uint.c: added mcs51 assembly version
2099         * device/lib/_fs2uchar.c: added mcs51 assembly version
2100         * device/lib/_slong2fs.c: added mcs51 assembly version
2101         * device/lib/_sint2fs.c: added mcs51 assembly version
2102         * device/lib/_schar2fs.c: added mcs51 assembly version
2103         * device/lib/_ulong2fs.c: added mcs51 assembly version
2104         * device/lib/_uint2fs.c: added mcs51 assembly version
2105         * device/lib/_uchar2fs.c: added mcs51 assembly version
2106         * device/include/float.h: added #define to select asm vs c
2107
2108 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
2109
2110         * device/lib/printf_fast.c: improvements to float output
2111         * device/include/float.h: add defines for assembly float library
2112         * device/lib/_fsget1arg.c: receive 1 float arg
2113         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
2114         * device/lib/_fsnormalize.c: normalize a float
2115         * device/lib/_fsreturnval.c: return float, various helper routines
2116         * device/lib/_fsrshift.c: right shift a float's mantissa
2117         * device/lib/_fsswapargs.c: swap 2 floats
2118         * device/lib/Makefile.in: build these 6 new files for mcs51
2119         * device/lib/libfloat.lib: add these 6 files to the library
2120
2121 2004-12-26 Borut Razem <borut.razem AT siol.net>
2122
2123         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
2124           built by gcc 3.4.2
2125
2126 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
2127
2128         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
2129           and fully reentrant and register bank neutral.
2130         * device/lib/printf_fast.c: added float (not enabled by default),
2131           added compact/slower integer (also not enabled by default),
2132           improved size/speed of fast integer code, other minor changes
2133         * device/include/stdio.h, device/lib/Makefile.in,
2134           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
2135
2136 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
2137
2138         * src/pic16/pcode.c: declaring variables other than at the start of a
2139           block is not supported in C by VC6.
2140
2141 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
2142
2143         * applied a previous patch from Raphael Neider that wasn't included
2144         in the previous commits, which fixes infinite loops within jumptable
2145         improvements,
2146         * made some fixes that previous patches introduced
2147
2148 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
2149
2150         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
2151         that fixes an issue with AOP_PCODE asmop's offset,
2152         * (pic16_popCopyReg): update instance field too,
2153         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
2154         function of pic port,
2155         * (genCmp, genAnd, genAssign),
2156         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
2157
2158 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
2159
2160         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
2161         variables initial values to idata section,
2162         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
2163         variables in some functions. This utilizes parmBytes field of iCode
2164         structure to hold the offset of the variable in stack. (might be
2165         able to use the stack field too?)
2166         * applied patch from Raphael Neider # ### , # ###
2167         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
2168         variable initial values in idata section,
2169         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
2170         for static variables with initial value
2171         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
2172         applied fix in while loop from Raphael Neider.
2173
2174 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
2175
2176         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
2177         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
2178         * src/ds390/ralloc.c (serialRegAssign): spill bits
2179         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
2180         * support/Util/SDCCerr.c,
2181         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
2182         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
2183         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
2184
2185 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
2186
2187         * device/include/sdcc-lib.h: inserted LGPL, added includes
2188           asm/ds390/features.h and asm/mcs51/features.h
2189         * device/include/asm/default/features.h,
2190         * device/include/asm/gbz80/features.h,
2191         * device/include/asm/z80/features.h: added empty _AUTOMEM
2192           and _STATMEM
2193         * device/include/asm/ds390/features.h,
2194         * device/include/asm/mcs51/features.h: added files with defines for
2195           _AUTOMEM and _STATMEM indicating automatic and static storage class
2196         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
2197         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
2198         * src/SDCCicode.c (geniCodeCast),
2199         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
2200         * src/SDCCloop.c (loopInduction): removed unused variable lr
2201         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
2202           to convertToFcall to include char modulo (RFE 1065037), added check
2203           if left operand is unsigned and use abs of literal value
2204         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
2205           as it doesn't work after conversion from peephole.def to peephole.rul
2206         * src/mcs51/gen.c (toBoolean): added check for size,
2207           (genModOneByte): optimized code for signed char modulo a literal
2208           power of 2 (thanks to Hubert Sack),
2209           (genRRC): removed unnecessary "clr c",
2210           (genRLC): replaced "add a,acc" with cheaper "rlc a"
2211         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
2212           jump optimization,
2213           swapped rules 256.c and 256.d,
2214           extended 256.d by using new multiple checks (thanks Erik),
2215           added rules 256.e and 256.f,
2216           updated rule 261.a and 261.b to new generated code
2217         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
2218
2219 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2220
2221         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
2222           induction related bugs, including first part of bug #1074377
2223
2224 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
2225
2226         * applied patch from bug-report #1076292,
2227         * applied patches for genAnd and Goto-optimizations for Raphael
2228         Neider,
2229         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
2230         dump a less iCode information,
2231         * src/pic16/device.h (pic16_options_t): added field debgen,
2232         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
2233         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
2234         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
2235         puclic,
2236         * (various functions): added macros FENTRY and FENTRY2 to functions,
2237         to emit function prologue,
2238         * (various functions): fixed indentation,
2239         * (genNearPointerGet): fixed loading of FSR0,
2240         * (genPackBits): applied patch from Raphael Neider to fix updating
2241         of FSR0 and touching only the modified bits,
2242         * src/pic16/genarith.c (various functions): added macros FENTRY to
2243         emit function prologue in comments,
2244         * src/pic16/pcode.h: added functions debugf2, debugf3,
2245         * src/pic16/ralloc.c: partial fix for packForPush caused
2246         segmentation fault,
2247
2248 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2249
2250         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
2251           <stsp AT users.sourceforge.net> with reversed byte order
2252         * support/regression/tests/rotate.c: added (ds390 skips some tests)
2253
2254 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2255
2256         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
2257           bug #1074377
2258         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
2259         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
2260
2261 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2262
2263         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
2264
2265 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2266
2267         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
2268           conditions,
2269           (setFromConditionArgs): friendly operand parser for peephole rules,
2270           (operandBaseName, operandsNotRelated): new peephole condition
2271           "operandsNotRelated" -- similar to "operandsNotSame", but takes
2272           architecture specific register naming into account, handles n-way
2273           comparisons, and supports quoted literals
2274         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
2275
2276 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2277
2278         * src/mcs51/peeph.def: fixed bug #1076940
2279
2280 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
2281
2282         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
2283
2284 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2285
2286         Adding support for replacing ljmps with sjmps in jumptables
2287         generated for switch statements. For now you need to set the
2288         environment variable SDCC_SJMP_JUMPTABLE to enable this.
2289         Now 4 algorithms for mcs51 jumptable generation are used:
2290         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
2291         addresses loaded pc-relative for up to 112 cases and stack-pushing
2292         target addresses loaded with offset from dptr for up to 256 cases.
2293
2294         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
2295         * src/mcs51/main.c: adapted constants for switch table generation
2296         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
2297
2298 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
2299
2300         * device/lib/printf_large.c (_print_format): fixed bug 1073386
2301         * support/regression/tests/bug1057979.c: added test for bug 1073386
2302
2303 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2304
2305         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
2306         compilers
2307
2308 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
2309
2310         * src/pic16/device.h,
2311         * src/pic16/genarith.c,
2312         * src/pic16/glue.c,
2313         * src/pic16/main.c,
2314         * src/pic16/pcode.c: applied patches #1068154 and #1070213
2315
2316 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
2317
2318         Large cummulative patch for pic16 port.
2319         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
2320         to call when a stack overflow occurs,
2321         * (malloc.h): added CVS Id tag,
2322         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
2323         variable,
2324         * added libc directory. The current version of LibC contains string
2325         functions, ctype functions and macros and some functions of the
2326         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
2327         be extensively tested in the future. Standard disclaimer here.
2328         Library is not automatically build yet. But one can build it by
2329         invoking 'make' inside the libc directory.
2330         * added ADC library under libio. Preliminary version yet.
2331
2332         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
2333         * src/pic16/gen.c (aopForRemat): asmop size is filled by
2334         aopForRemat() now and not by pic16_aopOp(),
2335         * (pic16_popGetTempReg): removed warning messgae when allocating
2336         temporary registers, its a buggy feature and will be removed,
2337         * (pic16_popGet): set register instance field in AOP_CRY,
2338         * (pic16_outBitC): fixed for results in size greater than 1,
2339         * (genUminusFloat): fixed for pic16, ported code from mcs51,
2340         * (pic16_storeForReturn): optimized return of 0,
2341         * (genCmp): experimental code for new genCmp which uses PIC18's
2342         special compare&skip instructions. Initial tests fail some times
2343         with variables grater than 1 byte in size, so new code is disabled,
2344         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
2345         a single bit,
2346         * (genCast): began a fix to optimize the casting of a bit to another
2347         bit, now assigning a bitfield to another bitfield will fail, sorry,
2348         * src/pic16/main.c: disabled the use of lr-support feature,
2349         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
2350         * added some function prototypes, added function _debugf prototype,
2351         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
2352         bits with offset (case PO_GPR_BIT),
2353         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
2354         command line,
2355         * (isBankInstruction): modified to return 0 for no banking instruction,
2356         and 1 for banking instruction,
2357         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
2358         caused stop processing pCodes after a inline assembly block,
2359         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
2360         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
2361         registers when it shouldn't,
2362         * src/pic16/ralloc.c (allocReg): add preliminary support for
2363         supporting a limited set of temporary registers,
2364
2365 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2366
2367         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
2368           genDataPointerSet): ensure assignments always copy in MSB to LSB
2369           order,
2370           (loadRegFromAop): recognize CLRH optimization,
2371           (genFunction): optimize RECEIVE iCodes in reentrant functions
2372
2373 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2374
2375         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2376           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2377           selected.
2378         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2379         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2380           contiguous with data
2381
2382 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2383
2384         * device/lib/_gptrget.c (_gptrget),
2385         * device/lib/_gptrgetc.c (_gptrgetc),
2386         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2387           instead of sjmp to ret
2388         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2389           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2390
2391 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2392
2393         * .version: bumped version to 2.4.7
2394         * device/lib/_gptrget.c (_gptrget): is now _naked
2395         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2396         * device/lib/_gptrput.c (_gptrput): is now _naked
2397         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2398           (createFunction): fixed xstack
2399         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2400         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2401           or bit either,
2402           (geniCodeCritical): store original interrupt state in an iTemp bit
2403           var unless stack-auto
2404         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2405         * src/SDCCmain.c (setIncludePath): added include/target to search path
2406         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2407         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2408           prototype,
2409           (processFuncArgs): put bit vars in bit area
2410         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2411           unsaveRBank): fixed xstack,
2412           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2413           (genFunction, genEndFunction): fixed xstack,
2414           (genAssign): optimization don't walk backwards through mem
2415         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2416         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2417         * support/regression/Makefile: also make library (for stack-auto) when
2418           making "all" and added "test-mcs51-xstack-auto"
2419         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2420         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2421         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2422         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2423         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2424           make-library by MAKE_LIBRARY
2425         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2426           regression tests for xstack
2427         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2428         * support/regression/tests/critical.c: test for critical on mcs51
2429
2430 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2431
2432         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2433           built version of sdcc instead of installed version
2434
2435 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2436
2437         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2438         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2439           vprintf.c now
2440         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2441         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2442           WARNING: remove device/lib/build/z80/printf.o by hand when
2443           updating from previous build!
2444         * device/lib/z80/printf.c: updated comment
2445         * support/regression/tests/bug1057979.c: test all ports now
2446         * support/regression/tests/bug1065458.c: file added
2447
2448 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2449
2450         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2451           *_start and *_end symbols for static functions
2452
2453 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2454
2455         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2456           and search crt0.o in all library paths,
2457           (setIncludePath): proper handling of --nostdinc,
2458           (setLibPath): proper handling of --nostdlib
2459         * support/regression/Makefile,
2460         * support/regression/ports/ds390/spec.mk,
2461         * support/regression/ports/gbz80/spec.mk,
2462         * support/regression/ports/hc08/spec.mk,
2463         * support/regression/ports/mcs51/spec.mk,
2464         * support/regression/ports/mcs51-large/spec.mk,
2465         * support/regression/ports/mcs51-stack-auto/spec.mk,
2466         * support/regression/ports/z80/spec.mk: use include and lib files from
2467           built version of sdcc instead of installed version
2468         * doc/sdccman.lyx: fixed typo in --nostdinc
2469
2470 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2471
2472         * src/pic/pcode.c,
2473         * src/pic/device.c,
2474         * src/pic/ralloc.c,
2475         * src/pic/gen.c : added support to generate code for struct bit fields.
2476
2477 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2478
2479         * as/xa51/xa_version.h,
2480         * device/include/errno.h,
2481         * device/include/regc515c.h,
2482         * device/lib/_itoa.c,
2483         * device/lib/_ltoa.c,
2484         * device/lib/ser_ir_cts_rts.c,
2485         * sim/ucsim/xa.src/glob.cc,
2486         * sim/ucsim/xa.src/inst_gen.cc,
2487         * sim/ucsim/xa.src/xa_bit.cc,
2488         * sim/ucsim/xa.src/xa_sfr.cc,
2489         * sim/ucsim/z80.src/inst_dd.cc,
2490         * sim/ucsim/z80.src/inst_fdcb.cc,
2491         * support/scripts/keil2sdcc.pl,
2492         * src/pic16/pic16.dsp,
2493         * src/pic16/pic16a.dsp: corrected cvs line endings
2494         * device/lib/printf_large.c: fixed bug 1057979
2495         * src/pic16/gen.c: fixed non-C standard code
2496         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2497         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2498         * support/regression/ports/mcs51/support.c: reload T1 asap
2499         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2500           pdata use and clear idata startup behaviour
2501         * support/regression/tests/bug1057979.c: added
2502
2503 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2504
2505         * device/examples/ds390/ow390/ad26.h,
2506         * device/examples/ds390/ow390/cnt1d.h,
2507         * device/examples/ds390/ow390/crcutil.c,
2508         * device/examples/ds390/ow390/ownet.h,
2509         * device/examples/ds390/ow390/owsesu.c,
2510         * device/examples/ds390/ow390/swt12.h,
2511         * device/examples/ds390/ow390/swtoper.c,
2512         * device/examples/ds390/ow390/temp10.h,
2513         * device/examples/ds390/ow390/thermodl.c,
2514         * device/examples/ds390/tinitalk/tinitalk.dsp,
2515         * device/examples/ds390/tinitalk/tinitalk.dsw,
2516         * device/examples/mcs51/clock/hw.h,
2517         * device/examples/mcs51/simple2/go.bat,
2518         * device/examples/serialcomm/windows/serial.h,
2519         * device/examples/xa51/dummy.c,
2520         * device/examples/xa51/hello.c,
2521         * device/include/80c51xa.h,
2522         * device/include/at89x051.h: corrected cvs line endings
2523
2524 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2525
2526         * src/pic16/main.c (options): added command line --gstack, to trace
2527         stack over/under flows,
2528         * added pragma 'wparam' to allow passing first byte of function
2529         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2530         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2531         call to __gstack_test function and sets up the symbol as extern,
2532         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2533         * popaop): added call to pic16_testStackOverflow,
2534         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2535         wparamList list,
2536         * (genCall, genPcall): now all parameters are passed via stack
2537         except in functions that are pass to wparam pragma in which WREG is
2538         used too,
2539         * (genPcall): REENTRANT flag is checked to see if variable prototype
2540         contains reentrant keyword, don't call a non-reentrant function, via
2541         a reentrant function pointer or vice versa, functions are never
2542         passed via WREG,
2543         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2544         D.Winkler,
2545         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2546         SIGSEGV when accessing a NULL register stucture,
2547         * (pic16_printGPointerType): modified to handle UPPER modifier for
2548         function initializers, changed prototype of function to simpler one,
2549         * (pic16_printIvalFuncPtr): check to see if function is already
2550         added in externs list,
2551         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2552         optimized a move from W to SFR with a move to the same register
2553         later after a CALL,
2554         * device/lib/pic16/debug: NEW directory, contains debug features
2555         which are enabled when linking with libdebug.lib, currently command
2556         line option --gstack enables stack pointer tracing for over/under
2557         flow, corresponding sources are in debug/gstack
2558
2559 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2560
2561         * doc/sdccman.lyx: updated SDCC version,
2562         * (PIC16 port): update list of command line options,
2563         * src/pic16/device.h (structure pic16_options_t): added field gstack
2564         to enable stack overflow tracing on push/pops,
2565         * src/pic16/device.c (statistics structure): added statistics
2566         structure,
2567         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2568         pic16_dump_int_registers): increase statistics counters for each
2569         * variable which is encountered
2570         * (pic16_dump_usection): emit each .udata variable to its own udata
2571         section,
2572         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2573         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2574         parameters via stack, otherwise use old scheme,
2575         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2576         assembler output file,
2577         * src/pic16/main.c: added command line options --gstack to enable
2578         push/pop tracing for stack overflow,
2579         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2580         instructions): added size of each instruction,
2581         * (pic16_countInstruction): estimate size of instructions in
2582         the_pFile list, inline assembly blocks are not counted,
2583         * (pic16_FixRegisterBanking): trace previous register usage, when
2584         banksel optimizations is greater than 0, don't emit a redudant
2585         banksel directive,
2586
2587 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2588
2589         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2590         * src/pic16/ralloc.c : applied same fix for pic16.
2591         * src/pic/gen.c : tidied it up a little.
2592
2593 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2594
2595         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2596         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2597
2598 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2599
2600         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2601
2602 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2603
2604         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2605         non-reentrant function __modsint in the interrupt function (thus
2606         corrupting math operations during serial I/O)
2607         * device/lib/ser_ir.c: as above, changed buffersize
2608         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2609         256.c,d for zeroing
2610         * doc/Makefile: added option -t for rsync
2611
2612 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2613
2614         * src/SDCCast.h (struct ast),
2615         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2616
2617 2004-10-20 Borut Razem <borut.razem AT siol.net>
2618
2619         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2620         package
2621
2622 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2623
2624         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2625         makefile targets,
2626         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2627         support functions to replace long sequences of MOVFF's from access
2628         bank registers to stack and vice versa,
2629         * src/pic16/device.h: added new field opt_flags, where optimization
2630         flags can be set to enable certain features,
2631         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2632         * pBlock, (genFunction, genEndFunction): surroung loop for
2633         saving/loading used registers in stack with PC_INFO pCodes,
2634         INF_LREGS. Code in between can then be optimized by pCode optimizer
2635         to support function calls,
2636         * (genDataPointerSet): fixed bug which loaded float fields in
2637         structures with corrupt data,
2638         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2639         in a standard way debug info on stderr. Feature used for developing
2640         and debugging only,
2641         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2642         obsolete chunks of code,
2643         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2644         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2645         * pic16/src/pcode.c (pic16_newpCodeInfo,
2646         * (pic16_newpCodeOpLocalRegs),
2647         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2648         feature,
2649         * (pic16_pCodeConstString): printing of the initial value of a
2650         symbol as a comment is inhibited since parsing was already done by
2651         copyStr and output is corrupt,
2652         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2653
2654 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2655
2656         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2657
2658 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2659
2660         * as/mcs51/lkarea.c: removed old K&R style,
2661           (lnksect): changed check on boundary error,
2662           (lnksect2): changed check on boundary error,
2663           (lnksect2): extend XSTK to end of page if size = 1
2664         * as/mcs51/lkmain.c: removed old K&R style,
2665           (Areas51): create l_IRAM symbol
2666         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2667         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2668           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2669         * device/lib/_mullong.c: added version to be compiled with xstack
2670         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2671         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2672         * device/lib/mcs51/crtxstack.asm: fixed comment
2673         * src/SDCCglue.c: maxInterrupts defaults to 0,
2674           (emitMaps): added pdata,
2675           (createInterruptVect): (re)moved default,
2676           (glue): added pdata,
2677           (glue): moved __start__xstack to XSTK with default size 1
2678         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2679           and options.float_rent when options.stackAuto is set,
2680           (linkEdit): only write XDATA_NAME if provided on command line
2681         * src/SDCCmem.h,
2682         * src/SDCCmem.c: added pdata
2683         * src/port.h: added pdata_name to PORT
2684         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2685           (saveRegisters, unsaveRegisters): removed usage of B,
2686           (genMinus): fixed accumulator clash,
2687           (genJumpTab): added comment, this needs another look
2688         * src/mcs51/gen.c: added check for "B in use" paranoia,
2689           added pushB() and popB()
2690         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2691           chance
2692         * src/avr/main.c,
2693         * src/ds390/main.c,
2694         * src/hc08/main.c,
2695         * src/mcs51/main.c,
2696         * src/pic/main.c,
2697         * src/pic16/main.c,
2698         * src/xa51/main.c,
2699         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2700           added PSEG (PAG,XDATA) or NULL to port specifier
2701         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2702         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2703           (_mcs51_genInitStartup): removed __start__xstack equ,
2704           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2705         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2706         * src/z80/gen.c (_rleAppend): fixed warnings
2707         * support/regression/tests/zeropad.c: added pdata test
2708         * .version: bumped to 2.4.6
2709
2710 2004-10-17 Borut Razem <borut.razem AT siol.net>
2711
2712         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2713         as a part of nightly build
2714
2715 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2716
2717         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2718         WREG holds the first byte function parameters,
2719         * (aopForSym): take special case for symbols which are in FARSPACE
2720         but in CODESPACE too,
2721         * (assignResultValue): modified to take into account _G.useWreg,
2722         * (genCall): don't use wreg for parameter passing when function is
2723         declared as reentrant, too, added optimization INCF to stack
2724         pointer when stack parameter count is 1,
2725         * (genFunction, genEndFunction): refurnished and fixed to not using
2726         wreg for passing parameters when function has varargs or is
2727         reentrant, fixed bug with symbol name compare for generating
2728         functions in absolute address,
2729         * (pic16_storeForReturn): refurnished,
2730         * (genCmp): began writing a new version of the function, not ready
2731         yet, therefore it is disabled,
2732         * (genAssign): do not read code memory when assigning a function to
2733         a pointer function,
2734         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2735         array of characters, not pointer,
2736         * (pic16initialComments): in debug mode emit an .ident directive for
2737         the assembler,
2738         * (_process_pragma): emit a new warning type (internal to pic16)
2739         when setting stack to default length, emit a similar warning when
2740         placing a function at absolute address and address is not word aligned
2741         * (_pic16_parseOptions): added 'return TRUE' statement,
2742         * (_pic16_linkEdit): if compiling a source, then add the source's
2743         file object, first in the list of objects to link,
2744
2745 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2746
2747         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2748         * src/pic/main.c : removed VC warning.
2749         * src/pic/gen.c : changed comment.
2750
2751 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2752
2753         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2754         reference to a deprecated symbol _GPTRREG was causing failure to
2755         link. Thanks G. M. Gallant for the info.
2756
2757 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2758
2759         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2760         comments for Bugs item #954788.
2761
2762 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2763
2764         * src/pic16/device.c (pic16_dump_gsection,
2765         * pic16_groupRegistersInSection): handle symbols declared to be in
2766         access bank differently,
2767         * src/pic16/gen.c (struct _G): added field resDirect,
2768         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2769         send values read from stack directly to result and don't allocate
2770         temporary values,
2771         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2772         same registers,
2773         * (pic16_sameRegsOfs): NEW,
2774         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2775         free because they were not allocated from temporary pool,
2776         * pic16_popRegFromString): workaround to fix a problem with
2777         allocating variables twice or never,
2778         * (genGenPointerGet): using PRODL instead of FSR0H,
2779         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2780         instead of FSR0H,
2781         * (genAssign): take advantage of the _G.resDirect flag,
2782         * (genCast): around line 11844, use mov2f instead of directly
2783         MOVFF'ing between operands to account for literal values,
2784         * src/pic16/genutils.c: some new debug functions for gpsim have been
2785         added,
2786         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2787         float with integer part only,
2788         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2789         place variables in access bank
2790         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2791         updated sources to reflect recent changes in gen.c
2792
2793 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2794
2795         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2796         sources that searched for headers in installation path, now the
2797         device/include/pic16 is used,
2798         * src/pic16/glue.c (pic16glue),
2799         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2800         .line directives if not in debug mode, this suppresses assembler's
2801         warnings for ignored directives
2802
2803 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2804
2805         * src/port.h: made reset_regparms prototype void parameter explicit.
2806         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2807         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2808         * doc/sdccman.lyx: documented warning disabling and how to use
2809           printf_large to make it print floats.
2810         * device/include/stdbool.h: NEW
2811         * device/lib/_atof.c,
2812         * device/lib/_divuint.c,
2813         * device/lib/_divulong.c,
2814         * device/lib/expf.c,
2815         * device/lib/printf_large.c,
2816         * device/lib/sincosf.c,
2817         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2818         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2819           a completely reentrant lib.
2820
2821 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2822
2823         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2824         * device/include/pic16/stdio.h: fixed bug with colon
2825
2826 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2827
2828         * device/include/pic16/stdio.h,
2829         * device/include/pic16/stdlib.h,
2830         * device/include/pic16/math.h: NEW
2831         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2832         declared as _naked to reduce overhead
2833         * device/lib/Makefile.in (target port-specific-objects-pic16):
2834         changed * to *.* so to ignore the CVS directory,
2835         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2836         stacked variables back in stack,
2837         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2838         corruption
2839
2840 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2841
2842         * .version: bumped version number to 2.4.5
2843         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2844         * support/Util/SDCCerr.c (messages structure): added entry for
2845         W_POSSBUG2
2846
2847         Large cumulative patch for pic16 port and libraries.
2848         * device/include/pic16/sdcc-lib.h,
2849         * device/include/pic16/stdarg.h,
2850         * device/include/asm/pic16/features.h,
2851         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2852         * device/include/pic16/float.h: changes reentrant keyword with
2853         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2854         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2855         updated target build-libraries to include objects from gptr,
2856         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2857         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2858         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2859         all function headings,
2860         * src/SDCCmain.c: added global parameter userIncDirsSet,
2861         * (parseCmdLine): when option -I is encountered add directory to
2862         userIncDirsSet too,
2863         * src/version.awk: added space between control and long,
2864         * src/pic16/NOTES: added some notes for the port,
2865         * src/pic16/gen.c: added prototype for mov2fp function,
2866         * (fReturnpic16[]): properly named return value registers,
2867         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2868         * (aopForSym): added code to handle symbols with onStack flag set,
2869         symbols onStack are allocated PTRSIZE bytes,
2870         * (aopFreeAsmop): handles special case where asmops are stack objects,
2871         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2872         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2873         added argument lock to trace flaws in allocating temporary registers
2874         when developing port,
2875         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2876         * (pic16_popRegFromString): reenabled allocating a direct register
2877         from string,
2878         * (assignResultValue): various beautifications,
2879         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2880         referenced function argument,
2881         * (genIpush): reenabled to allow stacked arguments, handles only
2882         ic->parmPush iCodes,
2883         * (genCall, genPcall): major changes to allow for variable argument
2884         functions, fixed a bug with falsely restoring stack pointer after
2885         returning from call,
2886         * (genFunction): pending code for critical function,
2887         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2888         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2889         * (genNearPointerGet): fixed bug with indirect reading, was always
2890         reading from INDF0
2891         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2892         pointers,
2893         * (genAddrOf): rewrote code to take address of a stacked function parameter
2894         * (genCast): fixed casting to generic pointer type,
2895         * src/pic16/gen.h: added AOP_STA,
2896         * (struct asmop): added field stk,
2897         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2898         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2899         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2900         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2901         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2902         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2903         generic pointers,
2904         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2905         and library paths,
2906         * (pic16_port structure): generic pointer size is set to 3,
2907         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2908         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2909         compiler warning,
2910         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2911         operand is an iTemp,
2912
2913 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2914
2915         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2916         * debugger/mcs51/simi.c: addapt new syntax of s51
2917
2918 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2919
2920         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2921         * src/pic16/pcode.c: commented out some calls to free() in order to
2922         fix bug #989576,
2923
2924 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2925
2926         * src/SDCCicode.h,
2927         * src/SDCCicode.c (isiCodeInFunctionCall),
2928         * src/avr/ralloc.c (selectSpil),
2929         * src/pic/ralloc.c (selectSpil),
2930         * src/pic16/ralloc.c (selectSpil),
2931         * src/ds390/ralloc.c (selectSpil),
2932         * src/hc08/ralloc.c (selectSpil),
2933         * src/xa51/ralloc.c (selectSpil),
2934         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2935         stack in the middle of a function call sequence (fixes bug #1020268)
2936         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2937         costs associated with the minimum switch case.
2938
2939 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2940
2941         * src/SDCC.lex: fixed bug #1030549
2942
2943 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2944
2945         * src/SDCCcse.h (struct cseDef),
2946         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2947         over a function call if the CSE is derived from a symbol whose
2948         address has been taken (fixes bug #1029883)
2949         * support/regression/tests/bug-1029883: a new regression test for
2950         this bug
2951
2952 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2953
2954         * src/hc08/gen.c (emitinline): fixed bug #1029778
2955         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2956         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2957         and starts toward RFE #905167)
2958
2959 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2960
2961         * src/pic16/gen.c (mov2f): New function to move an operand to
2962         another without considering if it is a literal or a register,
2963         * (pic16_sameRegs): don't check if they are both AOP_REG,
2964         * (AccRsh): removed andmask=0 lines,
2965         * (genLeftShift): duplicated to be improved in future versions,
2966         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2967         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2968         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2969         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2970         * (insertBankSwitch): fixed inserting banksel directives algorithm
2971         for instructions that follow a skip instruction, this fixes a report
2972         for broken subtraction code generation,
2973         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2974         iCode is a left op, just in case result and right share the same
2975         registers
2976
2977 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2978
2979         * src/hc08/main.c,
2980         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2981         preservation of HX
2982         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2983         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2984         on 2004-09-12; it was buggy
2985
2986 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2987
2988         * src/SDCCsymt.h: removed RESULT_CHECK
2989         * src/SDCCast.c,
2990         * src/SDCCglue.c,
2991         * src/SDCCval.c,
2992         * src/pic/glue.c,
2993         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2994
2995 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2996
2997         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2998         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2999         configuration values no more rejected by compiler, they are assigned
3000         to configuration registers with a warning message instead,
3001         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
3002         the for-loop so last conf register is emitted too,
3003         * (_pic16_initPaths): link library libsdcc.lib by default,
3004         * (_hasNativeMulFor): modified test for multiplication according to
3005         Raphael Neider's remarks. Integer multiplication is also done with
3006         support functions,
3007         * device/include/pic16/pic18fregs.h: corrected type error in while
3008         testing and including 18f6720 header file
3009
3010 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
3011
3012         * src/pic16/device.h (pic16_options): removed field use_crt,
3013         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
3014         until an optimization to handle single bits is added,
3015         * (pic16_loadFSR0): moved before genUnpackBits,
3016         * (genAnd): some white lines removed,
3017         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
3018         leave_reset flags in pic16_options when using crt modules,
3019
3020 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
3021
3022         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
3023           for bugs 898889 & 979599. Also used some safer print instructions.
3024
3025 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
3026
3027         * src/pic16/device.h (pic16_options_t): added field use_crt,
3028         crt_name, no_crt,
3029         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
3030         catch a probable future bug,
3031         * src/pic16/gen.c: aopIdx function commented out,
3032         * (genAssign): commented out old code which used aopIdx,
3033         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
3034         code, added if conditionals to take into account the --use-crt
3035         command line options,
3036         * src/pic16/main.c (pic16_optionsTable): added new command line
3037         options, --use-crt= and --no-crt,
3038         * (_pic16_linkEdit): now the proper crt object is added in the
3039         linker command line except than when --no-crt is specified,
3040         * src/pic16/pcode.c,
3041         * src/pic16/pcode.h: added some structures and functions for a new
3042         optimization scheme to compansate for instruction overhead between
3043         same iCodes, this scheme is currently under development and is not
3044         working in any way,
3045         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
3046         to && operator,
3047         * device/lib/pic16/startup/crt0i.c,
3048         * device/lib/pic16/startup/crt0iz.c: added global char variable
3049         __uflags to force the generation of an idata section
3050
3051 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
3052
3053         * doc/Makefile,
3054         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
3055         * doc/sdccman.lyx: updated sdcc version to 2.4.4
3056
3057 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3058
3059         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
3060         Frieder) and clarified the default code optimization mode
3061
3062 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3063
3064         * src/SDCC.lex (doPragma, process_pragma),
3065         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
3066         "opt_code_size", and "opt_code_balanced"
3067         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
3068         regrouped options by category, added support for category headers
3069         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
3070         and "--opt-code-size"
3071         * doc/sdccman.lyx: documented these new options and pragmas
3072         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
3073         preference into account
3074
3075 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3076
3077         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
3078           geniCodePreDec): Fixed bug 904237 by generating a warning
3079         * src/SDCCerr.h,
3080         * src/SDCCerr.c: added warning W_SIZEOF_VOID
3081
3082 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
3083
3084         * src/pic/device.c : When no max ram set validate full memory range.
3085         * src/pic/pcode.c,
3086         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
3087
3088 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
3089
3090         * device/lib/_gptrget.c,
3091         * device/lib/_gptrput.c: updated comment
3092         * device/lib/calloc.c,
3093         * device/lib/free.c,
3094         * device/lib/malloc.c,
3095         * device/lib/realloc.c: added LGPL, made them reentrant-safe
3096         * src/SDCCcse.c (cseBBlock),
3097         * src/SDCCicode.c (printOperand, geniCodeArray),
3098         * src/SDCCicode.h (struct operand): fixed bug 868103
3099         * support/regression/tests/bug-868103.c: added
3100         * src/SDCCast.c (searchLitOp),
3101         * src/SDCCcse.h (struct cseDef),
3102         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
3103         * src/SDCCicode.h (struct operand),
3104         * src/SDCCsymt.h (struct sym_link),
3105         * src/avr/gen.c (hasInc),
3106         * src/ds390/gen.c (hasInc),
3107         * src/hc08/gen.c (genPlusIncr, hasInc),
3108         * src/mcs51/gen.c (hasInc),
3109         * src/pic16/glue.c (pic16_printIvalChar),
3110         * src/pic16/ralloc.c (regWithIdx),
3111         * src/xa51/gen.c (hasInc) : removed warnings
3112         * src/SDCCast.c (createBlock): added comment ???
3113         * src/hc08/ralloc.c: updated comments
3114
3115 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3116
3117         * doc/sdccman.lyx: updated section on switch statements, added
3118         section about semaphore locking
3119         * doc/Makefile: added option -info for latex2html
3120         * device/lib/_gptrget.c,
3121         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
3122
3123 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3124
3125         * src/pic/device.h,
3126         * src/pic/device.c,
3127         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
3128          maxram is less than 0x100.
3129
3130 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
3131
3132         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
3133
3134 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3135
3136         * src/port.h,
3137         * src/mcs51/main.c,
3138         * src/ds390/main.c,
3139         * src/z80/main.c,
3140         * src/hc08/main.c,
3141         * src/pic/main.c,
3142         * src/pic16/main.c,
3143         * src/avr/main.c,
3144         * src/xa51/main.c
3145         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
3146         a jump table is the best form for a switch statement, including
3147         automatic insertion of missing cases to make the case range
3148         continuous. Developed in collaboration with Frieder Ferlemann.
3149
3150 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3151
3152         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
3153         accumulator result if it needs sign extension
3154
3155 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3156
3157         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
3158
3159 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3160
3161         * device/lib/gbz80/printf.c,
3162         * device/lib/z80/printf.c: removed define for NULL
3163
3164 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
3165
3166         * as/xa51/xa_link.c,
3167         * device/examples/ds390/ow390/ad26.c,
3168         * device/examples/ds390/ow390/cnt1d.c,
3169         * device/examples/ds390/ow390/counter.c,
3170         * device/examples/ds390/ow390/ds2480.h,
3171         * device/examples/ds390/ow390/ds2480ut.c,
3172         * device/examples/ds390/ow390/findtype.c,
3173         * device/examples/ds390/ow390/gethumd.c,
3174         * device/examples/ds390/ow390/owllu.c,
3175         * device/examples/ds390/ow390/ownetu.c,
3176         * device/examples/ds390/ow390/swt12.c,
3177         * device/examples/ds390/ow390/swtloop.c,
3178         * device/examples/ds390/ow390/temp.c,
3179         * device/examples/ds390/ow390/temp10.c,
3180         * device/examples/ds390/ow390/thermo21.c,
3181         * device/examples/ds390/ow390/tinilnk.c,
3182         * device/examples/ds390/ow390/tstfind.c,
3183         * device/examples/serialcomm/windows/serial.cpp,
3184         * device/examples/serialcomm/windows/test_serialcomm.cpp,
3185         * device/include/reg51.h: fixed line endings for cvs
3186
3187 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3188
3189         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
3190         packRegsForAccUse, packRegisters): new accumulator register
3191         packing algorithm
3192         * support/regression/ports/hc08/support.c (_putchar): suppress
3193         warning of unused variable
3194         * src/SDCCicode.c: added SWAP entry to codeTable
3195
3196 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
3197
3198         * device/lib/sprintf.c: forgot to add this file before previous commit
3199
3200 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
3201
3202         * src/pic16/gen.c (genPackBits): added operand right in function
3203         parameters, load result directly if p_type is POINTER (that is
3204         called by genNearPointerSet)
3205         * (genUnPackBits): added operand left in function parameters,
3206         * (genNearPointerGet, genNearPointerSet): prevent the loading of
3207         FSR0 if accessing bitfields,
3208
3209 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
3210
3211         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
3212           _print_format; updated printf, sprintf, vsprintf
3213         * device/include/asm/default/features.h: corrected comment/define
3214         * device/lib/Makefile.in: added sprintf.c
3215         * device/lib/libsdcc.lib: added sprintf module
3216         * device/lib/printf_large.c,
3217         * device/lib/vprintf.c,
3218         * device/lib/sprintf.c: totally refactored printf_large and vprintf
3219           into these 3 files
3220         * support/regression/Makefile: changed ALL_PORTS into a usefull default
3221         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
3222         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
3223           hc08 test
3224         * support/regression/tests/zeropad.c: define idata as data for hc08
3225
3226 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3227
3228         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
3229         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
3230         labels are referenced at least once (even if a reference is not found)
3231         * src/hc08/gen.c (emitcode): set isComment flag for comments
3232         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
3233         loads), rules 6a..6b (optimize jumps to return)
3234
3235 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3236
3237         * device/lib/acosf.c (acosf),
3238         * device/lib/asinf.c (asinf),
3239         * device/lib/atanf.c (atanf),
3240         * device/lib/ceilf.c (ceilf),
3241         * device/lib/cosf.c (cosf),
3242         * device/lib/coshf.c (coshf),
3243         * device/lib/cotf.c (cotf),
3244         * device/lib/fabsf.c (fabsf),
3245         * device/lib/floorf.c (floorf),
3246         * device/lib/log10f.c (log10f),
3247         * device/lib/logf.c (logf),
3248         * device/lib/sinf.c (sinf),
3249         * device/lib/sinhf.c (sinhf),
3250         * device/lib/sqrtf.c (sqrtf),
3251         * device/lib/tanf.c (tanf),
3252         * device/lib/tanhf.c (tanhf),
3253         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
3254         replaced all instances of "reentrant" in the library functions
3255         defined in math.h with this macro.
3256         * support/regression/tests/float_trans.c: reenabled test for hc08
3257
3258 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
3259
3260         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
3261         erroneously deleted
3262
3263 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3264
3265         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
3266         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
3267         multi-byte volatile operands are used
3268         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
3269         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
3270         initialization to area GSINIT0 so that it would always precede
3271         any static initializers in GSINIT
3272         * support/regression/tests/zeropad.c: fixed idata define for hc08
3273         * support/regression/tests/bug-927659.c,
3274         * support/regression/tests/float_trans.c: disabled tests for hc08
3275         pending missing library routines
3276         * .version: increased version number to 2.4.4 - hc08 port now passes
3277         regression tests
3278
3279
3280 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
3281
3282         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
3283         * Makefile.common.in,
3284         * as/Makefile,
3285         * as/hc08/Makefile.in,
3286         * as/mcs51/Makefile.in,
3287         * as/z80/Makefile.in,
3288         * debugger/mcs51/Makefile.in,
3289         * device/include/Makefile.in,
3290         * device/lib/Makefile.in,
3291         * doc/Makefile,
3292         * link/Makefile,
3293         * link/z80/Makefile.in,
3294         * packihx/Makefile.in,
3295         * sim/ucsim/main_in.mk,
3296         * sim/ucsim/avr.src/Makefile.in,
3297         * sim/ucsim/doc/Makefile.in,
3298         * sim/ucsim/gui.src/serio.src/Makefile.in,
3299         * sim/ucsim/hc08.src/Makefile.in,
3300         * sim/ucsim/s51.src/Makefile.in,
3301         * sim/ucsim/xa.src/Makefile.in,
3302         * sim/ucsim/z80.src/Makefile.in,
3303         * src/Makefile.in,
3304         * support/cpp2/Makefile.in,
3305         * support/librarian/Makefile,
3306         * support/makebin/Makefile: added DESTDIR to the install path proposed
3307         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
3308         * doc/sdccman.lyx: added DESTDIR documentation
3309
3310 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
3311
3312         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
3313         instruction for interrupt handlers, use fast returns when returning
3314         from high priority interrupts
3315
3316 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3317
3318         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
3319         code generation
3320         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
3321         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
3322         bugs, ported much of Bernhard's code from mcs51
3323         * src/mcs51/gen.c (genSend),
3324         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
3325         than one when calling a reentrant function
3326         * device/lib/_mullong.c: defined an alternate struct layout for big
3327         endian ports (hc08)
3328
3329 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3330
3331         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
3332         test
3333
3334 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3335
3336         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
3337         are sane and complete before asking the port its prefered parameter
3338         passing method (fixes bug #1017633)
3339         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
3340         and _ret3
3341
3342 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3343
3344         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
3345         problem in bitfields >= 8 bits.
3346
3347 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3348
3349         * src/SDCCsymt.c: undid changes that were not meant to be committed
3350
3351 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3352
3353         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
3354
3355 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
3356
3357         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
3358           copied and wrong bit got inverted
3359
3360 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3361
3362         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
3363         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
3364         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
3365         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
3366         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
3367         assignments to bitfields at known addresses
3368         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
3369         reads from bitfields at known addresses
3370         * src/hc08/ralloc.c (packRegisters),
3371         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
3372         genhc08Code): optimize pointer get values used as conditionals
3373         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3374         and branch
3375
3376 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3377
3378         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3379         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3380         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3381         as conditionals
3382
3383 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3384
3385         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3386
3387 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3388
3389         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3390         related problems
3391
3392 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3393
3394         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3395
3396 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3397
3398         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3399         mcs51 port
3400
3401 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3402
3403         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3404
3405 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3406
3407         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3408         cases use more compact code.
3409
3410 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3411
3412         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3413
3414 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3415
3416         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3417
3418 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3419
3420         * src/SDCCsymt.h,
3421         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3422         parameter of changePointer() from symbol* to sym_link*
3423         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3424         * src/SDCCsymt.c (compareType): void* type is castable to other
3425         pointers, but not necesarily an exact match.
3426         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3427         is no longer blindly treated as an exact match.
3428         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3429
3430 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3431
3432         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3433
3434 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3435
3436         * src/pic/gen.c,
3437         * src/pic/pcode.c,
3438         * src/pic/ralloc.h,
3439         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3440
3441 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3442
3443         * src/pic/device.c,
3444         * src/pic/device.h,
3445         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3446
3447 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3448
3449         * src/mcs51/gen.c (emitcode): fixed bug #992819
3450
3451 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3452
3453         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3454           there's no need to make it worse
3455
3456 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3457
3458         * src/mcs51/ralloc.c (deassignLR),
3459         * src/ds390/ralloc.c (deassignLR),
3460         * src/hc08/ralloc.c (deassignLR),
3461         * src/z80/ralloc.c (deassignLR),
3462         * src/pic/ralloc.c (deassignLR),
3463         * src/pic16/ralloc.c (deassignLR),
3464         * src/avr/ralloc.c (deassignLR),
3465         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3466         rlivePoint): fixed another part of bug #971834
3467
3468 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3469
3470         * src/z80/main.c: enabled "critical" keyword
3471         * src/z80/mappings.i,
3472         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3473         functions (fixes bug #979646)
3474         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3475
3476 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3477
3478         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3479           such as c:\mydir.
3480
3481 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3482
3483         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3484           doesn't disable too much optimizations
3485
3486 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3487
3488         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3489
3490 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3491
3492         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3493
3494 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3495
3496         * src/pic/gen.c tidied up tabs
3497         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3498         * src/pic/main.c tidied up tabs
3499         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3500         * src/pic/pcoderegs.c tidied up tabs
3501         * src/pic/ralloc.c tidied up tabs
3502
3503 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3504
3505         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3506         to S_FIXED for pic16 port and when symbol is not in level 0,
3507         allocate for S_REGISTER storage class and pic16 port, too,
3508         * src/pic16/device.h: prototype for checkSym,
3509         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3510         * (pic16_assignConfigWordValue): test the value and the mask to
3511         validate that the value is suitable for the configuration word,
3512         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3513         collect extern declared symbols, don't emit symbol twice, check
3514         first if symbol is in publics set first,
3515         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3516         * added command line '--fstack' which enables an experimental
3517         feature for stack access, too buggy to be used yet...
3518         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3519         * (pic16_allocDirReg): when register has storage class S_REGISTER
3520         allocate in pic16_dynAccessRegs,
3521         * device/include/pic16/pic18f????.h: modified configuration word
3522         naming convention, words started as CONFIG0H but should be CONFIG1H
3523
3524 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3525
3526         * device/include/mcs51reg.h: fixed bug 970993
3527
3528 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3529
3530         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3531         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3532         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3533         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3534         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3535         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3536           error/warning numbers,
3537           added function setWarningDisabled()
3538         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3539         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3540           _memcmp.c _memmove.c calloc.c realloc.c free.c
3541         * support/regression/tests/malloc.c: added tests for new functionality
3542         * support/regression/tests/zeropad.c: added tests for truncated initializers
3543           and initialized char arrays starting with '\x0'
3544         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3545
3546 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3547
3548         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3549
3550 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3551
3552         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3553         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3554         peephole 177.e. Thanks to anonymous
3555
3556 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3557
3558         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3559         function isn't used in the source but referenced as a
3560         variable initializer then declare it as extern in .asm file
3561
3562 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3563
3564         * .version: increased version number to 2.4.3
3565
3566         Adding version extension according to ChangeLog CVS revision
3567         * src/Makefile.in (target all): added dependency 'version.h'
3568         * (rule version.h): added rule to create version.h from ChangeLog,
3569         * (rule dep): added dependency version.h,
3570         * src/version.awk: AWK script to create version.h
3571         * src/SDCCdwarf2.c (dwWriteModule),
3572         * src/SDCCglue.c (initialComments),
3573         * src/SDCCmain.c (printVersionInfo): modified to write after
3574         version string the version extension number,
3575         * src/SDCCutil.c: included "version.h"
3576         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3577         number,
3578         * src/SDCCutil.h: added prototype for getBuildNumber
3579
3580         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3581         includeDirsSet, too,
3582         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3583         const char [] is found in function prototype...
3584
3585         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3586         moving to WREG with source is already in WREG,
3587         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3588         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3589         * (aopForSym): stack'ed symbols are partially supported, added
3590         if-clause to support symbols in FARSPACE,
3591         * (sameRegs): added test for AOP_ACC to see if registers are same,
3592         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3593         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3594         * (pic16_popRegFromString): will not allocate a new register if it
3595         doesn't find one by name, bug may have introduced...
3596         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3597         * (genIpush): revived to use pic16 port's stack,
3598         * (genAddrOf): added incomplete case for stack'ed operand,
3599         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3600         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3601         can handle multibyte operands,
3602         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3603         * (pic16initialComments): added message for MPLAB compatibility
3604         mode enabled,
3605         * src/pic16/main.h: prototype for pic16_mplab_comp,
3606         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3607         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3608         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3609         because of increased complexity of procedure,
3610         * (_process_pragma): stack pragma changed to format 'stack pos len',
3611         emit symbol '_stack_end' to conform with gplink,
3612         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3613         to search for register,
3614         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3615         PO_GPR_REGISTER,
3616         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3617         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3618         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3619         case for PO_GPR_REGISTER,
3620         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3621         dies, the new era is ahead !...
3622         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3623         pic16_dynInternalRegs,
3624         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3625         * (pic16_allocDirReg): minor optimizations and bug fixes,
3626         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3627
3628         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3629         load stack and frame pointer with address of 'stack_end' symbol
3630
3631 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3632
3633         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3634         without source code but only variable initializers
3635
3636 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3637
3638         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3639         external are not declared as extern to reduce overhead while linking
3640
3641 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3642
3643         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3644
3645 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3646
3647         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3648           Yee Keat for the patch
3649         * src/SDCCast.c (decorateType): fixed bug #979599
3650         * src/ds390/gen.h: removed local fReturnSizeDS390
3651         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3652         * src/ds390/gen.c (genAnd, genOr, genXor),
3653         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3654
3655 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3656
3657         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3658         add relFilesSet to $3, manipulate $2 to handle linking of object
3659         files without source files in command line,
3660         * device/include/pic16 (all headers): added ID location macros,
3661         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3662         entries for ID location bytes,
3663         * (pic16_assignIdByteValue): NEW,
3664         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3665         added field dumpcalltree to pic16_options_t,
3666         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3667         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3668         emitting rFalseIfx label after check_carry label,
3669         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3670         pic16_emitDIRegs), NEW
3671         * (pic16glue): dump .calltree file when option --calltree found,
3672         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3673         * (_pic16_genAssemblerPreamble): emit ID locations after
3674         configuration registers,
3675         * (pic16_linkCmd): modifications of the link command,
3676         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3677         * (pic16_pCodeInitRegisters): don't init stack registers,
3678         * (pic16_findPrevInstruction): fixed bug,
3679         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3680         bug with immediate registers,
3681         * (buildCallTree): traces stack push and pop,
3682         * (pct2): dump also stack usage for each function,
3683         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3684         * (pic16_allocDirReg): various modifications,
3685         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3686         fixed to 1,
3687
3688 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3689
3690         * src/pic16/pcode.c: removed buggy double colon
3691
3692 2004-07-01 Borut Razem <borut.razem AT siol.net>
3693
3694         * support/scripts/sdcc.nsi: added include/pic16 to setup
3695
3696 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3697
3698         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3699         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3700         target 'clean',
3701         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3702         specific command line arguments. Also added sample lkr script
3703         for placing a variable at a specific memory bank.
3704         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3705         at a specific memory bank,
3706         * (pic16_dump_isection): fixed bug which caused string literals to
3707         be omitted when dumping idata section,
3708         * (pic16_groupRegistersInSection): added code to handle registers
3709         in specific memory banks,
3710         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3711         public, all references are renamed too,
3712         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3713         AOP_DPTR2,
3714         * (pic16_storeForReturn): added case to handle when dest is WREG,
3715         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3716         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3717         pic16_rel_udata, check to see if that register is marked as being
3718         a member of a specific memory bank,
3719         * (pic16_printIvalCharPtr): added code to add string literals either
3720         to code or the idata sections,
3721         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3722         also accept the 'udata' pragma,
3723         * src/pic16/main.h: new structure types sectName and sectSym
3724         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3725         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3726         * (pic16_findPrevInstruction): fixed, it returned nothing,
3727         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3728         instruction combinations,
3729         * (pic16_FixRegisterBanking): heavily reorganised,
3730         * (pic16_AnalyzeBanking): if generating banksel directives is
3731         disabled, then don't call FixRegisterBanking at all,
3732         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3733         completely removed,
3734         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3735
3736 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3737
3738         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3739         Phuah Yee Keat <yk.phuah AT nestac.com>
3740
3741 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3742
3743         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3744         correctly the IVT even if it is relocated to some other location
3745
3746 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3747
3748         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3749         * device/include/pic16/pic18f2220.h: NEW,
3750         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3751         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3752         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3753         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3754         nodefaultlibs, ivt_loc is the location of the interrupt vector
3755         table, and nodefaultlibs signs that default libraries should not be
3756         linked in link stage,
3757         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3758         according to --ivt-loc argument,
3759         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3760         when pragma stack is found,
3761
3762 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3763
3764         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3765         256 (range check), 257 (do while), 258.a-f (bit banging
3766         f.e. on 3-wire SPI bus)
3767
3768 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3769
3770         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3771         variables used exclusively within a loop
3772
3773 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3774
3775         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3776
3777 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3778
3779         * src/SDCClrange.c (computeClash): fixed bug #971834
3780
3781 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3782
3783         * src/mcs51/gen.c (genCmp): fixed bug #975903
3784         * src/hc08/gen.c (operandsEqu),
3785         * src/ds390/gen.c (operandsEqu),
3786         * src/z80/gen.c (operandsEqu),
3787         * src/pic/gen.c (operandsEqu),
3788         * src/pic16/gen.c (operandsEqu),
3789         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3790         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3791
3792 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3793
3794         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3795
3796 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3797
3798         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3799         default case in switch statement,
3800         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3801         to eliminate problem with initialisation of pointers, but problem
3802         still exists,
3803         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3804         * (emitStaticSegment): removed various lines emitting debug info,
3805         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3806         added processor registers for utilizing EEPROM,
3807         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3808         configurable and set 8
3809
3810 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3811
3812         * .version: increased version number to 2.4.2,
3813
3814         Cumulative patch for pic16 port
3815         * src/pic16/device.c: changed scheme to dump initial values for
3816         variables in idata segment, all print_idata* functions were removed,
3817         now the pic16_printIval* will be called,
3818         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3819         * _pic16_printPointerType, pic16_printPointerType,
3820         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3821         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3822         NEW, similar to the respective functions in SDCCglue.c,
3823         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3824         way, emitting hex bytes,
3825         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3826
3827 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3828
3829         * src/avr/ralloc.c (serialRegAssign),
3830         * src/xa51/ralloc.c (serialRegAssign),
3831         * src/pic/ralloc.c (serialRegAssign),
3832         * src/pic16/ralloc.c (serialRegAssign),
3833         * src/hc08/ralloc.c (serialRegAssign),
3834         * src/z80/ralloc.c (serialRegAssign),
3835         * src/ds390/ralloc.c (serialRegAssign),
3836         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3837
3838 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3839
3840         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3841         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3842
3843 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3844
3845         Cumulative patch for pic16 port:
3846         * src/pic16/device.h (typedef PIC16_device) modified fields for
3847         defining microcontrollers,
3848         * src/pic16/device.c: added new info for all devices in Pics16 array,
3849         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3850         to be optimised out by the pCode optimiser,
3851         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3852         specially, bug reported by G.M. Gallant,
3853         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3854         as force'd so that cannot be optimised out by pCode optimiser,
3855         * src/pic16/pcode.c,
3856         * src/pic16/pcodepeeph.c,
3857         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3858         they are disabled by default, but can be enabled explicit with
3859         command argument --denable-peeps, for testing,
3860         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3861         --pomit-ivt in COMPILE_FLAGS
3862
3863 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3864
3865         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3866           compilation on MSVC
3867
3868 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3869
3870         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3871
3872 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3873
3874         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3875         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3876
3877 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3878
3879         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3880         would only assign 0x300001 register.
3881
3882 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3883
3884         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3885         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3886
3887 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3888
3889         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3890         for ds80c400
3891         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3892         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3893         added peephole 254 (left shift), 255 (jump table)
3894
3895 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3896
3897         * device/lib/Makefile.in: removed comment line with model-pic16,
3898         * (target port-specific-objects-pic16): the libraries and objects
3899         are copied to the build directory form the device/lib/pic16/bin
3900         directory
3901
3902         Cumulative patch concerning pic16 port:
3903         * library directory has been re-organized,
3904         * added support for PIC18F1220,
3905         * added headers and library sources for chips 18f1220,18f6520,
3906         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3907
3908         * configuration registers setting has changed, now each supported
3909         device has a complete description of the registers it uses,
3910         * all initialisations are moved to idata sections, these section
3911         can be absolute or relocatable,
3912         * fixed initialisation of codespace variables,
3913         * fixed warning about PCLATU and gpsim,
3914         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3915         * (genAssign): use table reads when assigning from variables in codespace,
3916         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3917         char/int variables placed in codespace,
3918         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3919         registers set in .asm file, no need for --pomit-config-words anymore,
3920         * (pic16glue): some 8051 legacy segments are commented out
3921         (to be removed completely),
3922         * added support for alternative assembler and linker with --asm=
3923         and --link= command line arguments,
3924         * peepholes are disabled automatically in the port, no need to
3925         specify on command line,
3926         * port supports natively char/int/long multiplication, but converts
3927         all divisions to support functions,
3928         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3929         to the file set in variable $2,
3930         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3931         strings in ASCII format and not in hex,
3932         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3933         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3934         allocate proper register if iCodes aren't temporary,
3935
3936 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3937
3938         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3939
3940 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3941
3942         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3943         is commented out
3944
3945 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3946
3947         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3948         computed address is reused
3949         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3950         multi-byte bitfields
3951
3952 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3953
3954         * src/z80/gen.c: (genArrayInit): must check for pointers too
3955
3956 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3957
3958         * support/regression/tests/zeropad.c: never meant to commit the
3959           nestedstruct test: removed, added check for GCC version
3960
3961 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3962
3963         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3964         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3965         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3966           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3967           bugs 928906 and 954082 half-empty initializers
3968         * src/SDCCsymt.h,
3969         * src/SDCCsymt.c (getAllocSize): added for above fix
3970         * src/z80/gen.c (genArrayInit): fixed bug 741044
3971         * support/regression/tests/zeropad.c: added tests
3972
3973 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3974
3975         * src/pic16/device.c (pic16_dump_section): corrected bug which
3976         caused some symbols of the libraries to be misplaced
3977
3978 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3979
3980         * src/pic16/glue.c,
3981         * src/pic16/ralloc.h,
3982         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3983         to fix conflict with pic port
3984
3985 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3986
3987         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3988         externs configuration variables,
3989         * src/pic16/ralloc.h,
3990         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3991         prototype in header, commented out some debug messages
3992
3993 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3994
3995         * src/pic16/glue.c,
3996         * src/pic16/main.c,
3997         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3998         for gpasm COFF object generation. Thanks to D. Hawkins for
3999         his patch info
4000
4001 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4002
4003         * src/ds390/main.c,
4004         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
4005         Brock for spotting this)
4006         * src/ds390/gen.c (genEndFunction),
4007         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
4008         interrupt handler and critical. Disable push/pop optimizations when
4009         peephole optimizations disabled.
4010
4011 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4012
4013         Updated pic16 library sources and headers.
4014         * device/lib/pic16/pic18f*/ ,
4015         * device/include/pic16/*.h: modified to handle structured SFR
4016         definitions
4017
4018 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
4019
4020         * src/port.h (PORT structure): added hook initPaths, now each
4021         port can declare its own default search paths,
4022         which can been seen with the --print-search-dirs option,
4023         see pic16 port for example,
4024         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
4025         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
4026         * (doPrintSearchDirs): NEW, replaces in a central manner the
4027         printing of search dirs which was split in set*Paths functions,
4028         * (main): added call to port->initPaths and doPrintSearchDirs,
4029         * src/avr/main.c,
4030         * src/ds390/main.c,
4031         * src/hc08/main.c,
4032         * src/izt/i186.c,
4033         * src/izt/tlcs900h.c,
4034         * src/mcs51/main.c,
4035         * src/pic/main.c,
4036         * src/pic16/main.c: modified port structures to reflect addition of
4037         initPaths hook,
4038
4039         * src/pic16/device.c (regCompare): registers are finally sorted by name,
4040         * (pic16_dump_section): for registers in same address reserve memory once,
4041         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
4042         to no_banksel,
4043         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
4044         result is greater in size than right or left,
4045         * (pic16_genUMult8X8_8): there are some cases where the result can
4046         be 16 bits size, so handle these,
4047         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
4048         * (pic16_outBitC): modified to emit pcodes,
4049         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
4050         or not,
4051         * (genDivOneByte): implemented algorithm to divide 8-bits,
4052         * (genCmp): uncommented goto, but issues still exist,
4053         * (genAnd): fixed a bug with variables >8bits,
4054         * (genPackBits): optimization added that uses BCF/BSF to change a
4055         single bit,
4056         * (genAssign): fixed bug when assigning floating point literals,
4057         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
4058         __sdcc_gsinit_startup label,
4059         * src/pic16/main.c (_pic16_init): removed search directory
4060         initialisations,
4061         * (_pic16_initPaths): NEW, used to initialise search directories,
4062         * (_hasNativeMulFor): support functions for all except char/int
4063         multiplication, and char division,
4064         * (PIC16_port struct): modified entry for native mul support,
4065         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
4066         no_banksel option,
4067         * (buildCallTree): call to register_usage is ifdef'ed out,
4068
4069 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4070
4071         * device/include/string.h: applied Stas Sergeev's patch to make this
4072         header file compatible with the preprocessor -Wundef option
4073         * src/SDCCmain.c (main): abort compilation if preprocessor reports
4074         failure (fixes bug #941458)
4075
4076 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4077
4078         * src/SDCCopt.c (killDeadCode): fixed bug #907733
4079         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
4080         that the variable, not the function, should be static
4081         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
4082         to be consistent with non-literal case
4083
4084 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4085
4086         * src/SDCCast.c (isConformingBody): fixed bug #949967
4087         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
4088         convilong): fixed bug #952086
4089
4090 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4091
4092         * src/SDCCmem.c (allocVariables): fixed bug #955321
4093
4094 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4095
4096         * src/hc08/main.c (_hc08_genAssemblerEnd),
4097         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
4098         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
4099         completely eliminated the use of a temporary file
4100         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
4101         when more than one file linked
4102         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
4103
4104 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4105
4106         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
4107         which fixes bug #543481
4108         * support/regression/tests/bug-751703.c: fixed comments left from a
4109         cut and paste error
4110         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
4111         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
4112         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
4113         scopes
4114         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
4115         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
4116         are now changed to underscores in moduleName
4117
4118 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4119
4120         * as/mcs51/lkmem.c: better fix for bug #954173
4121
4122 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
4123         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4124
4125         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
4126         * device/include/c8051f000.h,
4127         * device/include/c8051f120.h,
4128         * device/include/c8051f300.h,
4129         * device/include/c8051f310.h,
4130         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
4131         PWM16) and detab'ed
4132
4133 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4134
4135         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
4136         and mailing lists, doc'ed --no-peep-comments, removed reference
4137         to knoppix (newest version has no LyX/LaTeX), other minor changes
4138         * src/SDCCglue.c (glue): save 2 bytes stack space with
4139         option --main-return. The ljmp could probably be avoided too
4140
4141 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4142
4143         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
4144
4145 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4146
4147         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
4148         * src/SDCCopt.c (isLocalWithoutDef),
4149         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
4150         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
4151         (credit to Maarten Brock for patch #949363, on which this is based)
4152         * support/regression/tests/bug-751703.c: some test cases of extern used
4153         within inner scopes.
4154
4155 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4156
4157         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
4158         SPEC_STRUCT
4159         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
4160         struct definitions
4161         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
4162         dwWriteLabel): fix to create valid debugger symbols even when
4163         the module name has non-alphanumeric symbols in it
4164         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
4165         when a variable's allocation has been optimized away
4166
4167
4168 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4169
4170         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
4171         * src/hc08/main.c,
4172         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
4173         * src/mcs51/main.c,
4174         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
4175         * src/ds390/main.c,
4176         * src/z80/gen.c (z80_emitDebuggerSymbol),
4177         * src/z80/main.c,
4178         * src/pic/gen.c (pic14_emitDebuggerSymbol),
4179         * src/pic/main.c,
4180         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
4181         * src/pic16/main.c,
4182         * src/avr/gen.c (avr_emitDebuggerSymbol),
4183         * src/avr/main.c,
4184         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
4185         * src/xa51/main.c,
4186         * src/SDCCdebug.c (emitDebuggerSymbol),
4187         * src/SDCCdebug.h,
4188         * src/port.h: added a debugger struct to the port struct. Added a
4189         callback for defining debugger symbols
4190
4191         * src/SDCCast.c (createLabel),
4192         * src/SDCC.y (labeled_statement): mark all compiler generated labels
4193         with isitmp = 1
4194         * src/SDCCicode.h,
4195         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
4196         iCode back to the ast for the function
4197
4198         * src/hc08/ralloc.c (hc08_assignRegisters),
4199         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
4200         unneeded fields from the regs struct.
4201         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
4202         pushReg() & pullReg() functions instead of emitcode()
4203
4204         * src/hc08/gen.c (genLabel, genhc08Code),
4205         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
4206
4207         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
4208         debugger hooks
4209
4210         * src/hc08/gen.c (genEndFunction, genhc08Code),
4211         * src/hc08/gen.h,
4212         * src/mcs51/gen.c (genEndFunction, gen51Code),
4213         * src/mcs51/gen.h,
4214         * src/ds390/gen.c (genEndFunction, gen390Code),
4215         * src/ds390/gen.h,
4216         * src/z80/gen.c (genEndFunction, genZ80Code),
4217         * src/z80/gen.h,
4218         * src/z80/z80.h,
4219         * src/pic/gen.c (genEndFunction, genpic14Code),
4220         * src/pic/gen.h,
4221         * src/pic16/gen.c (genEndFunction, genpic16Code),
4222         * src/pic16/gen.h,
4223         * src/avr/gen.c (genEndFunction, genAVRCode),
4224         * src/avr/gen.h,
4225         * src/xa51/gen.c (genEndFunction, genXA51Code),
4226         * src/xa51/gen.h,
4227         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
4228         specific code to cdbFile.c and out of the backend code generators
4229
4230         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
4231         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
4232         starting address is now 0
4233
4234         * as/hc08/asm.h,
4235         * as/hc08/m08pst.c,
4236         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
4237         assembler directive for DWARF support
4238         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
4239
4240         * src/src.dsp,
4241         * src/Makefile.in,
4242         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
4243
4244 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4245
4246         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
4247         and inappropriate peephole optimization in jump tables
4248
4249 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4250
4251         * as/hc08/m08pst.c,
4252         * src/SDCCglue.c: sdccopt works for the hc08 port now
4253
4254 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
4255
4256         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
4257
4258 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4259
4260         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
4261
4262 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4263
4264         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
4265         rules
4266         * src/SDCCmain.c,
4267         * src/SDCCglobl.h,
4268         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
4269         comments from the peephole optimizer replacement rules
4270         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
4271         symbols
4272         * src/SDCCcse.c (updateSpillLocation),
4273         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
4274         equivalents
4275         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
4276         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
4277         objects far pointers
4278
4279 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4280
4281         * src/SDCCsymt.h: a missing part of my last change
4282         * src/pic/ralloc.c (regTypeNum),
4283         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
4284
4285 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4286
4287         * src/SDCCicode.h,
4288         * src/SDCCicode.c (aggrToPtrDclType),
4289         * src/SDCCptropt.h,
4290         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
4291         ptrPseudoSymConvert),
4292         * src/pic/ralloc.c (regTypeNum),
4293         * src/pic16/ralloc.c (regTypeNum),
4294         * src/hc08/ralloc.c (regTypeNum),
4295         * src/ds390/ralloc.c (regTypeNum),
4296         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
4297         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
4298
4299 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4300
4301         * link/z80/lkmain.c (afile),
4302         * as/hc08/lkmain.c (afile),
4303         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
4304         prevent a pointer problem when a filename has no directory and
4305         no extension specified.
4306
4307 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4308
4309         * link/z80/lkmain.c (afile): allow periods in directory names
4310         * link/z80/lkmain.c (afile),
4311         * as/mcs51/lkmain.c (afile),
4312         * as/hc08/lkmain.c (afile): allow linker script file to have an
4313         extension other than ".lnk"
4314         * link/z80/lklex.c (getfid),
4315         * link/z80/lkmain.c (parse),
4316         * as/mcs51/lklex.c (getfid),
4317         * as/mcs51/lkmain.c (parse),
4318         * as/hc08/lklex.c (getfid),
4319         * as/hc08/lkmain.c (parse): Support comments in the linker script
4320         file on lines by themselves and after filenames
4321
4322 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4323
4324         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
4325
4326 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4327
4328         * src/z80/peeph-z80.def: removed some peephole rules that don't
4329         work with multibyte arithmetic (fixed bug #937126)
4330         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
4331         to registers and not global variables
4332         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
4333         geniCodePreInc, geniCodePostDec, geniCodePreDec,
4334         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
4335         checking for assignments not internally generated (fixed bug #931895)
4336         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
4337         structure member (fixed bug #930072)
4338
4339 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4340
4341         * src/SDCCmain.c (linkEdit),
4342         * src/hc08/main.c (_hc08_parseOptions),
4343         * as/hc08/Makefile.in,
4344         * as/hc08/aslink.h,
4345         * as/hc08/asm.h,
4346         * as/hc08/m08pst.c,
4347         * as/hc08/lkrloc.c (relr, rele),
4348         * as/hc08/lkarea.c (lnkarea)
4349         * as/hc08/lkmain.c (afile, parse),
4350         * as/hc08/lkelf.c: support for ELF output
4351         * as/hc08/lks19.c (s19),
4352         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
4353
4354 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4355
4356         * as/mcs51/lkihx.c: Fixed bug #899105.
4357
4358 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4359
4360         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
4361         .dsp files from Unix to DOS.
4362
4363 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4364
4365         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
4366         function pointers; we have been compliant for several months now.
4367         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
4368         change that was accidently commented out
4369         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
4370         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
4371         bug #922319
4372
4373 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4374
4375         * src/hc08/gen.c: output of all of the internal debugging information
4376         is now controlled by the D() macro; it is disabled by default
4377
4378 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4379
4380         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4381         harder to keep the same registers during a CAST iCode
4382         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4383         long via int can be done in a single cast, if the signedness is
4384         correct.
4385         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4386         putchar() in tinibios.c in ds390's library
4387
4388 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4389
4390         * src/SDCCast.c (decorateType): fixed bug #898889,
4391         cast result of a literal complement too
4392         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4393         fixed check for bitfields
4394
4395 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4396
4397         * src/SDCCicode.c (geniCodeLogic): made it static,
4398         (geniCodeLogicAndOr): added in order to fix bug #905492,
4399         (ast2iCode): fixed bug #905492
4400         * support/regression/tests/bug-905492.c: added
4401         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4402         (processParms): fixed bug #927659: don't copy parms, this will clear
4403         decorated flag
4404         * support/regression/tests/bug-927659.c: added
4405
4406 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4407
4408         * src/SDCCast.c (addCast): don't cast float to char
4409         * device/lib/libsdcc.lib: added _memmove
4410
4411 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4412
4413         * device/lib/large/Makefile: fixed parallel execution by
4414         replacing `make` by `$(MAKE)`
4415
4416 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4417
4418         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4419         offsets (fixes bug #923936)
4420
4421 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4422
4423         * device/lib/small/Makefile: fixed parallel execution by
4424         replacing `make` by `$(MAKE)`
4425
4426 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4427
4428         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4429
4430 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4431
4432         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4433         * src/regression/Makefile: Regression test was not running.
4434
4435 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4436
4437         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4438         complement if possible
4439         * src/SDCCval.c (valComplement),
4440         * src/SDCCicode.c (operandOperation): fixed complement of literal
4441         * support/regression/tests/onebyte.c (testComplement): added
4442
4443 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4444
4445         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4446         return an optimized tree; actually replace actParm with the new tree
4447         * src/SDCCast.h: added some parantheses to remove side effects
4448         * support/regression/tests/bug-920866.c
4449
4450 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4451         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4452         Bit operands were not being handled properly in the pic14 port.
4453         (now src/regression/add.c passes again).
4454
4455 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4456
4457         * src/SDCC.y (labeled_statement): case and default no longer require
4458         a following statement (RFE #893037)
4459
4460 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4461
4462         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4463         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4464         disabled (fixes bug #916294)
4465         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4466         "mov a,acc"; patch provided by Lenny Story
4467         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4468
4469 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4470
4471         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4472         functions
4473         * src/ds390/gen.c (genFunction, genEndFunction),
4474         * src/ds390/ralloc.c (ds390_assignRegisters),
4475         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4476         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4477         pushed if there are parameters passed on the stack. Also, a cleaner
4478         way to decide if r0/r1 should be pushed/popped. (Together they fix
4479         bug #918693)
4480
4481 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4482
4483         * doc/sdccman.lyx,
4484         * device/lib/mcs51/crtpagesfr.asm,
4485         * device/lib/mcs51/crtxinit.asm,
4486         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4487         to avoid confusion with Si Lab's SFRPAGE register.
4488
4489 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4490
4491         * src/SDCCglue.c (emitMaps): allow public sfr variables
4492         * src/SDCCglue.c (initialComments): include compiler build date
4493         with compiler version and put the timestamp of the generated
4494         assembly file on a serperate line to be less confusing.
4495         * src/port.h: added genInitStartup hook
4496         * src/avr/main.c,
4497         * src/ds390/main.c,
4498         * src/hc08/main.c,
4499         * src/pic/main.c,
4500         * src/pic16/main.c,
4501         * src/xa51/main.c,
4502         * src/z80/main.c: genInitStartup initialize as NULL (default to
4503         historical behaviour)
4504         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4505         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4506         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4507         library instead of hard coding it into the compiler.
4508         * support/regression/ports/mcs51-stack-auto/spec.mk,
4509         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4510         * device/lib/mcs51/Makefile,
4511         * device/lib/small/Makefile,
4512         * device/lib/large/Makefile,
4513         * device/lib/mcs51/crtpagesfr.asm,
4514         * device/lib/mcs51/crtstart.asm,
4515         * device/lib/mcs51/crtxclear.asm,
4516         * device/lib/mcs51/crtxinit.asm,
4517         * device/lib/mcs51/crtclear.asm,
4518         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4519         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4520         and into user configurable files.
4521         * device/lib/clean.mk: clean mcs51 directory too
4522         * support/regression/tests/longlit.c: added static to T1 declaration
4523         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4524         accesses in the initialization code
4525
4526 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4527
4528         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4529         OSCTRIMVAL as noted in bug #916008
4530
4531 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4532
4533         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4534         in loops with multiple exits (reported as incorrect registers
4535         used by Martin Helmling in Sdcc-user list)
4536
4537 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4538
4539         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4540         made ds390 register extensions look less like error messages
4541
4542 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4543
4544         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4545         reported by Adam Wozniak in Sdcc-user list
4546
4547 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4548
4549         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4550         arithmetic optimizations, added debug output
4551
4552 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4553
4554         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4555         * sdcc.spec: updated and split sdcc into 3 rpms
4556         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4557         needed for literals of LEFT_OP and '+'
4558         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4559         introduced RESULT_TYPE_NOPROM
4560         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4561         left shift
4562         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4563         limited promotion to int only for '*'
4564         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4565
4566 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4567
4568         * src/pic16/gen.c (genSkip),
4569         (genc16bit2lit), (gencjneshort): commented out
4570         (is_LitOp): new helper function, checks operand type
4571         (genCmpEq): rewritten
4572
4573 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4574
4575         * support/regression/tests/bug-908454.c: added
4576
4577 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4578
4579         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4580         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4581         (geniCodeCast): cosmetic, don't preserve bit storage class
4582         (geniCodeLeftShift): added promotion
4583         (geniCodeLogic): fixed regression
4584         * src/SDCCsymt.c (computeTypeOr): accept bits too
4585         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4586
4587 2004-03-07  Borut Razem <borut.razem AT siol.net>
4588
4589         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4590
4591 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4592
4593         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4594         version of pic16_genPackRegisters which does not check if ic is a
4595         CAST operator,
4596         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4597         function cause string1.c regression test fails
4598
4599 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4600
4601         * sim/ucsim/configure.in,
4602         * sim/ucsim/configure,
4603         * sim/ucsim/doc/Makefile.in: use docdir
4604         * src/SDCC.y: fixed sbit atrributes
4605         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4606         * src/SDCCast.c (decorateType): |^& need special promotion handling
4607         * src/SDCCast.h,
4608         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4609         * src/SDCCsymt.h (computeType),
4610         * src/SDCCicode.c: computeType() needs op
4611         * src/SDCCsymt.c (checkTypeSanity),
4612         * doc/sddman.lyx: "plain" bitfields are unsigned
4613         * src/SDCCsymt.c (computeTypeOr): added
4614         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4615         |^& ops
4616         * src/SDCCval.c (val*): computeType() needs op
4617         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4618         * support/regression/tests/onebyte.c: added tests for |^&
4619
4620 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4621
4622         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4623         for writing icode into asm output.
4624
4625 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4626
4627         * src/pic16/device.c: added some debug lines enabled
4628         with macro DEBUG_CHECK,
4629         * src/pic16/genarith.c: more debug in genPlus,
4630         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4631         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4632         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4633         * (aopForSym): onStack symbols are re-placed in data memspace,
4634         and onStack flag is cleared,
4635         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4636         copy temporary pcodeop,
4637         * (genPcall): added warning for not updating PCLATU,
4638         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4639         always true for pic16 port,
4640         * (genMultOneWord): NEW, supports integer multiplication,
4641         * (genMult): modified to call genMultOneWord,
4642         * (ifxForOp): added warning when return NULL,
4643         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4644         flag is set before call to operandFromSymbol for implicit
4645         added structures,
4646         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4647         options.intlong_rent are set by default,
4648         * (_hasNativeMulFor): modified to allow port generation of integer
4649         multiplication,
4650         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4651         set regtype to REG_SFR for all registers, restricting seting the
4652         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4653
4654 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4655
4656         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4657         more than 500 times in the regression tests
4658
4659 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4660
4661         * support/Util/SDCCerr.h,
4662         * support/Util/SDCCerr.c,
4663         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4664         enumerator_list),
4665         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4666         for symbol conflicts.
4667         * support/valdiags/tests/enum.c,
4668         * support/valdiags/tests/tentdecl.c,
4669         * support/valdiags/tests/struct.c: expect possible error messages
4670         referring to original symbol definitions.
4671         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4672         * src/SDCCsymt.h,
4673         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4674
4675 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4676
4677         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4678
4679 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4680
4681         * src/pic16/ralloc.c (newReg): fixed bug #908929
4682
4683 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4684
4685         * src/ds390/gen.c: added missing #include "main.h"
4686
4687 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4688
4689         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4690         checking if symbol is already in set,
4691         * src/pic16/device.h: prototype for checkAddSym,
4692         * src/pic16/gen.c: (_G): added entry interruptvector,
4693         * (assignResultValue): removed some commented out lines,
4694         * (genFunction): check for ISR via sym->type, absolute section for
4695         interrupt code is created via a new pBlock, the goto instruction is
4696         placed now correctly at the interrupt vector position, changed all
4697         references from ivec to _G.interruptvector,
4698         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4699         is the interrupt is a high priority one, same for return from ISR,
4700         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4701         externs to calls of checkAddSym,
4702         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4703         pic16_pcode_verbose flag is set,
4704         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4705         * src/pic16/pcoderegs.c: message about how many registers are saved
4706         will only be emitted if pic16_pcode_verbose flag is set,
4707
4708 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4709
4710         * src/ds390/ralloc.h,
4711         * src/ds390/ralloc.c (ds390_regWithIdx),
4712         * src/ds390/gen.c (emitcode),
4713         * src/ds390/main.h,
4714         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4715         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4716         ds390operandCompare, getRegsRead, getRegsWritten,
4717         initializeAsmLineNode): customized instruction size calculation for
4718         ds390, started basis for some register optimizations
4719         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4720         corresponding assembly output
4721         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4722         missing push/pop of r0/r1. Optimized push/pops
4723
4724 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4725
4726         * src/mcs51/main.c (instructionSize): fixed ACALL size
4727         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4728
4729 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4730
4731         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4732         the sorting of rlist with NULL elements
4733         * (print_idataType, print_idata): NEW to create idata sections
4734         * src/pic16/device.h: idataSymSet new variable
4735         * src/pic16/gen.c (genFunction): fixed some bugs in string
4736         comparing, improved the absolute section creation for ISRs,
4737         added FSR0L/FSR0H in registers that are saved in an ISR,
4738         * (genInline): fixed the processing of inline snippets,
4739         now they undergo no process by the peephole optimizer
4740         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4741         are placed in idataSymSet,
4742         * (pic16emitStaticSeg): extern symbols are added in externs,
4743         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4744         switching when aboslute variables are placed in access bank memory
4745         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4746         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4747         commented out with #if,
4748         * (pic16_packRegisters): reintroduce the check for CAST because some
4749         symbols are not correctly handled,
4750         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4751         pCodeInstruction instead of pCode,
4752         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4753         pCodeAsmDir definition,
4754         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4755         directive, then the argument directive is emitted without the leading
4756         tab, hack for inline labels which must be in the first column,
4757         * (compareLabel,pic16_findNextInstruction),
4758         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4759         * (insertBankSwitch): modified for the new pCodeAsmDir,
4760
4761 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4762         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4763
4764         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4765         instance,
4766         * (pushSide): commented out with #if,
4767         * (assignResultValue): fixed some typos in saving
4768         registers,
4769         * (genPcall): FIXED and sync'ed with genCall,
4770         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4771         * (genNearPointerGet): fixed to handle some more cases,
4772         implementation scheme via table reads,
4773         * (genConstPointerGet): modified to access code memory correct,
4774         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4775         and improved to handle some cases
4776         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4777         instead of "RETLW" for init data
4778         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4779         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4780         variables are placed in access bank memory (<0x80 and >=0xf80),
4781         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4782         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4783         TBLWT_POSTDEC,TBLWT_PREINC
4784         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4785         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4786         directives
4787         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4788         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4789         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4790         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4791
4792 2004-02-29  Borut Razem <borut.razem AT siol.net>
4793
4794         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4795         support/Util/findme.h, support/Util/system.h: enhance binary relative
4796         search for lib and include by using findProgramPath()
4797
4798 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4799
4800         * src/SDCCpeeph.h,
4801         * src/SDCCpeeph.c (pcDistance),
4802         * src/port.h,
4803         * src/mcs51/ralloc.h,
4804         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4805         * src/mcs51/main.h,
4806         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4807         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4808         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4809         size calculation port specific, started basis for some register
4810         optimizations
4811         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4812         missing push/pop of r0/r1. Optimized push/pops
4813         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4814         * device/lib/_modsint.c (_modsint),
4815         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4816         and stack version so regression tests pass
4817
4818 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4819
4820         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4821         * src/SDCCast.c (decorateType): catch another small optimization
4822         with '?' operator
4823         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4824         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4825         modified to finally use computeType() all over SDCC,
4826         see Feature Request #877103
4827         * src/SDCCval.h: cosmetic
4828         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4829         valCompare(); regression tested in muldiv.c
4830         * support/regression/tests/muldiv.c (testMod): mod sign follows
4831         dividend only
4832
4833 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4834
4835         * src/SDCCast.c (decorateType): fixed bug #902362
4836         * doc/INSTALL.txt: fixed install instructions for win32
4837
4838 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4839
4840         * device/include/Makefile.in (install): fixed by replacing spaces
4841         by tabs
4842         * doc/README.txt,
4843         * doc/INSTALL.txt: updated for release
4844         * doc/sdccman.lyx: added warning for --xstack being buggy
4845
4846 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4847
4848         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4849         to eliminate build warnings.
4850         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4851
4852 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4853            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4854
4855         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4856         removed -penable-stack, added comment for stack pragma, added
4857         warning for not initializing the stack/frame registers, removed
4858         comment at interrupts section
4859
4860         Stack is made permanent, there is no ability to disable stack usage.
4861         * src/pic16/device.h,
4862         * src/pic16/device.c: removed all references to USE_STACK macro,
4863         * src/pic16/device.c (pic16_dump_section): when no elements in
4864         rlist, free rlist before return,
4865         * (pic16_dump_int_registers): NEW, internal registers are a new set
4866         of general purpose registers reused by each function,
4867         * (checkAddReg): returns 1 if registers is added to set,
4868         * (pic16_groupRegistersInSection): when a registers is of type
4869         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4870         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4871         SRCASECMP macro is moved here from device.c
4872         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4873         PO_PCLATU, PO_PRODL, PO_PRODH,
4874         * (pic16_pCodeOpType, genMinus,
4875         changed compares to "a" register, with AOP_ACC,
4876         * (pic16_genPlus): fixed some bugs and indented properly,
4877         * (pic16_addSign): changed size to size+offset in the MOVWF
4878         instruction,
4879         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4880         multiply 8-bit operand by literal, result is 8-bit,
4881         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4882         multiply 2 8-bit operand, result is 8-bit,
4883         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4884         genUMult8X*_16,
4885         * src/pic16/gen.c: changed accUse to contain WREG only,
4886         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4887         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4888         true, do not use immediate addressing any more unless sym is a
4889         pointer in codespace,
4890         * (aopForRemat): do not use immediate addressing when symbol not in
4891         codespace and when symbol's address is requested,
4892         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4893         accUse size (= 1),
4894         * (aopGet): added case for AOP_ACC and don't return "accumulator
4895         bug" but WREG instead,
4896         * (popGetTempReg): pushes contents of temporary register in stack,
4897         * (popReleaseTempReg): pops contents of temporary register from
4898         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4899         * (pic16_popGet): separated case AOP_ACC to return register WREG
4900         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4901         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4902         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4903         the use of immediate pointers to certain cases only.
4904
4905         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4906         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4907         * (assignResultValue, genCall, genRet): modified to use the new
4908         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4909         genPcall is still broken,
4910         * (genFunction): added code to create 'A' type pBlocks when
4911         interrupt functions are generated, code not extensively tested yet,
4912         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4913         * (genEndFunction): modified so ISRs pop stored registers from stack,
4914         * (genMultOneByte): cleanup,
4915         * (AccRsh): added flag andmask, to and result with appropriate mask,
4916         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4917         * (genDataPointerGet): fixed and reenabled its use,
4918         * (genNearDataPointerGet): bugs fixed,
4919         * (genDataPointerSet): bugs fixed,
4920         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4921         pic16_DumpSymbol, pic16_DumpOp,
4922         * src/pic16/genutils.h: function prototypes for the above functions,
4923         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4924         pointers,
4925         * (pic16emitRegularMap): many many many improvements, but needs a
4926         major cleanup,
4927         * src/pic16/main.c: enable_stack in pic16_options is removed,
4928         * (_pic16_parseOptions): removed command line options -penable-stack,
4929         * (_process_pragma): emit stack symbol only when stack pragma is
4930         processed,
4931         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4932         redirected to FSR0L/FSR0H pair,
4933         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4934         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4935         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4936         for immediates,
4937         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4938         * (dumpPicOptype): NEW,
4939         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4940         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4941         with movff instruction,
4942         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4943         added pic16_int_regs, some packRegsFor* functions are commented out,
4944         because produce errors,
4945         * src/pic16/NOTES: minor modifications
4946
4947 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4948
4949         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4950         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4951         --pack-iram.
4952         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4953         * as/mcs51/lkaomf51.c: fixed bug #895763
4954
4955 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4956
4957         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4958
4959 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4960
4961         * doc/sdccman.lyx: added details about the HC08 storage classes and
4962         interrupts, fixed the register usage info for z80 & gbz80
4963
4964 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4965
4966         * doc/sdccman.lyx: added more pic16 port documentation
4967         * device/include/pic16/: added header pic18fregs.h
4968
4969 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4970
4971         * doc/sdccman.lyx: added Vangelis' contribution
4972
4973 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4974
4975         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4976         extend to the next CALL or PCALL, not just to the next CALL.
4977
4978 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4979
4980         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4981
4982 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4983
4984         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4985         bug #895752 and a better fix for bug #716790
4986
4987 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4988
4989         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4990
4991 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4992
4993         * doc/sdccman.lyx: minor changes, minor changed
4994
4995 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4996
4997         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4998         which can't handle SDCC_NEWONEBYTEOPS,
4999         (geniCodeMultiply): removed conversion from mult to shift for pic14
5000         and pic16
5001
5002 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5003
5004         * src/hc08/gen.h,
5005         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
5006         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
5007         thus fixing bug #895406
5008
5009 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
5010
5011         * device/lib/_modsint.c,
5012         * device/lib/_modslong.c: sign follows divisor only
5013         * src/hc08/gen.c (genMultOneByte): if result size is 1,
5014         signs or signedness can be ignored
5015         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
5016         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
5017         added optimization for IFX,
5018         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
5019         arguments;
5020         reenabled optimization for IFX, which was removed on 2004-01-11
5021         * src/SDCCast.h: added return type IFX
5022         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
5023         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
5024         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
5025         SDCC_OLDONEBYTEOPS selects the old behaviour
5026         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
5027         changed again and commented promotion rule
5028         * src/SDCCval.c (valDiv): promotion no longer necessary
5029         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
5030         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
5031         rewritten
5032         * support/regression/tests/onebyte.c: added
5033
5034 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
5035
5036         * gen.c (genInline): reverted to old code for assemnling inline
5037         code because of bug reported James Chadd
5038
5039 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
5040
5041         * ralloc.h: missing declarations from previous patch,
5042         seems that patch for ralloc.h was never applied, fixed
5043
5044 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5045            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5046
5047         * pcode.c,
5048         * pcode.h,
5049         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
5050         indirect addressing. Marked FSR0 as deprecated
5051         * gen.c (pointerCode): commented out, not needed now
5052         (pic16_popGet2p): new MOVFF helper function
5053         (genGenPointerGet),
5054         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
5055         (shiftRLong): removed duplicate debugging info
5056
5057 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5058
5059         * src/ds390/gen.c (genNearPointerGet),
5060         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
5061         optimization with bits, but not bitfields.
5062         * src/ds390/ralloc.c (packRegisters),
5063         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
5064
5065 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
5066
5067         * src/SDCCcse.c (algebraicOpts): copy operands before modification
5068
5069 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5070
5071         * src/SDCCsymt.h,
5072         * src/SDCCicode.c (operandFromSymbol),
5073         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
5074         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
5075         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
5076         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
5077         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
5078         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
5079         bug #892038
5080         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
5081         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
5082         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
5083         * src/SDCCsymt.c (newSymbol),
5084         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5085         enumerator_list),
5086         * src/SDCCval.h,
5087         * src/SDCCval.c (newiList): fixed bug #885705
5088
5089 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5090
5091         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
5092         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
5093
5094 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5095
5096         * device/include/c8051f120.h,
5097         * device/include/c8051f300.h,
5098         * device/include/c8051f310.h: added/updated header files for Silicon
5099         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5100         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
5101         in new section Submitting patches
5102
5103 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5104
5105         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
5106         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5107         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5108         genGenPointerSet),
5109         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
5110         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5111         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5112         genGenPointerSet),
5113         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
5114         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5115         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5116         genGenPointerSet),
5117         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
5118         genFarPointerGet, genCodePointerGet, genGenPointerGet,
5119         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
5120         genGenPointerSet): fixed bug #892400
5121         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
5122         to eliminate build warnings.
5123         * src/SDCCast.c (processParms),
5124         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
5125         fixed bug 751859
5126         * support/valdiag/valdiag.py: added GCC to the list of defines active
5127         when compiling with gcc
5128
5129 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5130
5131         * support/Util/SDCCerr.h,
5132         * support/Util/SDCCerr.c,
5133         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
5134         with an incomplete type (fixed bug #883734)
5135         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
5136
5137 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5138
5139         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
5140
5141 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5142
5143         * src/SDCCast.c (decorateType),
5144         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
5145         function pointer implementation
5146         * support/regression/tests/funptrs.c: added tests to verify both forms
5147         of function pointers work correctly. Added tests to verify parameters
5148         are passed in the correct order.
5149
5150 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
5151
5152         * device.c (regCompare): registers are sorted by ascending
5153         address and increasing size,
5154         * main.c (_pic16_finaliseOptions): removed the declaration
5155         of compiler macro MCU. Now a macro of the format pic18fxxxx
5156         will be defined from the command line
5157
5158 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5159             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
5160
5161         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
5162         PCOP_RLCF was overwritten!
5163         * gen.c (genSkip): commented out calls to pic16_emitcode,
5164         * (genCmpEQ): fixed "long" compares, only high word did get compared,
5165         * (genlshTwo),
5166         * (genRRC): added debugging info,
5167         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
5168         overwritten while shifting,
5169         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
5170         overwritten while shifting,
5171         * (AccLsh),
5172         * (AccRsh),
5173         * (shiftLLeftOrResult),
5174         * (shiftRLeftOrResult),
5175         * (shiftRLong),
5176         * (shiftLLong): Implemented with pic16_emitpcode
5177         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
5178         * (genLeftShift): Fixed bug, operand for shift by variable always
5179         was "and"ed with 0x0f,
5180         * (genLeftShiftLiteral),
5181         * (genrshTwo),
5182         * (genRightShiftLiteral): added debugging info,
5183         * (genrshFour): added comment,
5184         * (genRightShift): determined signedness from operand "left"
5185         instead of "result"
5186
5187 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5188
5189         * src/SDCCicode.c (geniCodeParms),
5190         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
5191         function pointers, fixed function pointer bugs #861242 and #861896
5192
5193 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5194
5195         * device/include/c8051f000.h,
5196         * device/include/c8051f120.h,
5197         * device/include/c8051f300.h: added header files for Silicon
5198         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
5199
5200 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
5201
5202         * src/SDCCast.c (processParams): added new type flow and restructured
5203         (gatherAutoInit): added new type flow
5204         (addCast): cosmetic changes
5205         (getLeftResultType): added new type flow for array indices, patch
5206         provided by Stas, see FR #877103
5207         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
5208         array index patch by Stas
5209         * src/SDCCast.h: added prototype getResultTypeFromType()
5210         * src/SDCCval.h,
5211         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
5212         * src/pic/glue.c (pic14emitStaticSeg),
5213         * src/pic16/glue.c (pic16emitStaticSeg),
5214         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
5215         for initialization of symbols
5216         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
5217         * support/Util/SDCCerr.h:
5218         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
5219         * .version: bumped version number to 2.3.8
5220         * device/include/Makefile.in (install),
5221         * doc/Makefile (install): changed to 'rm `find ...`' construct to
5222         avoid warnings
5223
5224 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
5225
5226         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
5227         Slade Rich fixed an optimization bug
5228         * src/pic/pcodepeep.c,
5229         * src/pic/pcoderegs.c
5230         * doc/Makefile (install): added test for directory
5231
5232 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5233
5234         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
5235         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
5236         * src/pic/ralloc.c (getRegPtr, getRegGpr),
5237         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
5238         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
5239         * as/mcs51/asexpr.c (term),
5240         * as/hc08/asexpr.c (term): fixed bug #887146
5241
5242 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5243
5244         * src/z80/gen.c (genMult): handle single byte result product
5245         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
5246         DUMMY_READ_VOLATILE (fixed bug #886367)
5247
5248 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5249
5250         * support/regression/tests/libmullong.c: fixed logic, on little endian
5251         hosts we ended without a mullong_wrapper()
5252
5253 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5254
5255         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
5256         virus/worm forged address usage.
5257
5258 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
5259
5260         Fixed promotion, it should be done on AST level:
5261         * src/SDCCast.c (addCast): added promotion to int
5262         (decorateType): updated call to upCast()
5263         * src/SDCCicode.c (geniCodeLeftShift): removed call to
5264         usualUnaryConversions()
5265
5266 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
5267
5268         * support/regression/tests/literalop.c (mulWrapper): Added a
5269         wrapper to remove integer overflow warnings.
5270
5271         * support/regression/tests/float_trans.c: Made work on host.
5272
5273         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
5274         location of sz80.
5275
5276         * support/regression/generate-cases.py (main): Changed from inline
5277         to a main method.
5278
5279         * doc/Makefile (install): Changed to depth first to get rid of
5280         missing directory install warning.
5281
5282         * as/Makefile (install-doc): Made work on Mac.
5283
5284 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
5285
5286         * src/SDCCast.c: added an additional type flow in decorateType() of
5287         opposite direction, see feature request #860006; it's enabled at runtime
5288         by setting the environment variable SDCC_NEWTYPEFLOW
5289         * src/SDCCast.h: changed prototype of decorateType()
5290         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
5291         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
5292         'char' to 'int' can be omitted, if both operands are 'unsigned char';
5293         see feature request #877103
5294         * src/SDCCval.c: updated call of decorateType()
5295         (valBitwise): fixed bug #882876
5296         (valMinus): added promotion
5297         (valLogicAndOr): result is unsigned
5298         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
5299         * src/SDCCsymt.c (computeType),
5300         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
5301         must not cause an unsigned operation
5302         * src/pic/glue (pic14emitRegularMap),
5303         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
5304
5305 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
5306
5307         * src/pic/pcode.c (PCodeID): commented out left over debug code
5308
5309 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
5310
5311         * support/valdiag/tests/overflow.c: added shift tests
5312         * src/pic/device.c,
5313         * src/pic/gen.c,
5314         * src/pic/gen.h,
5315         * src/pic/glue.c,
5316         * src/pic/main.c,
5317         * src/pic/pcode.c,
5318         * src/pic/pcode.h,
5319         * src/pic/pcodepeep.c,
5320         * src/pic/pcoderegs.c,
5321         * src/pic/ralloc.c,
5322         * src/pic/ralloc.h: applied patch from Slade Rich;
5323         added support for multiple code pages and multiple RAM banks on the
5324         PIC 14 port. The ASM files now no longer simply assume all the
5325         code / RAM are in the same page / bank. This means the linker can
5326         safely allocate code/RAM of separate ASM files to different pages/banks.
5327         * doc/sdccman.lyx: added Slade's tips
5328         * src/mcs51/peeph.def: fixed bug #880768
5329
5330 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5331
5332         * src/hc08/ralloc.c (rematStr): fixed bug #879282
5333         * src/SDCCast.c (decorateType): fixed bug #880197
5334
5335 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
5336
5337         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
5338         getopt.h.
5339
5340         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
5341         strtof is not part of C89 and isn't included with Mac OS X.
5342
5343 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5344
5345         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
5346         shiftL2Left2Result): fixed bug #879326
5347         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
5348         (genMultOneByte): fixed bug in signed vs unsigned multiplication
5349         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
5350         address fetch for clr instruction
5351         * device/lib/hc08/_mulint.c: created optimized assembly version
5352         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
5353
5354 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
5355
5356         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
5357         proposed in FR #877103
5358
5359 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
5360
5361         * src/SDCCval.c (cheapestVal): added missing checks
5362         * src/SDCCicode.c (usualBinaryConversions): fixed condition
5363         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
5364
5365 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
5366
5367         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
5368         equal operands
5369
5370 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
5371
5372         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5373         loaded with the linker search paths (-L arguments) and the libraries
5374         to be linked with the current source (-l arguments). Changes
5375         currently will affect only the pic16 port.
5376         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5377         include path the port specific paths and port specific libraries,
5378         * gplink command now contains the $3 argument,
5379         * src/pic16/device.h,
5380         * src/pic16/device.c,: structure PIC_device is made public and
5381         renamed to PIC16_device, the same for variable Pics which is renamed
5382         to Pics16. Updated all references to them.
5383         * src/pic16/glue.c (pic16glue): corrected bug with code
5384         initialization which bypassed the variable initializations block.
5385
5386         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5387         COMPILE_FLAGS and added the --nostdinc option
5388
5389 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5390
5391         * device/include/mc68hc908jb8.h: Register defs for another member
5392         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5393
5394 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5395
5396         Documenting changes from previous commits.
5397         * configure.in (version 1.56),
5398         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5399         when generating output files to configure the pic16 library,
5400         but now I've commented it out, since gputils aren't installed in the
5401         SF compile farm, so library won't compile
5402
5403         * device/lib/Makefile.in (version 1.56): initially I've added in
5404         target 'all' the prerequestive 'model-pic16' so it compiled the
5405         pic16 library, but now I've commented it out for the same reasons
5406         above,
5407         * added targets 'model-pic16' and 'objects-pic16' to compile the
5408         library
5409         * added target 'port-specific-objects-pic16' to handle the
5410         generated libraries and copy them into the build/ directory
5411         * added target 'clean-intermediate-pic16' to clean intermediate
5412         files into pic16 directory
5413         * in target 'installdirs' added line to create directory pic16 in
5414         the installation path
5415
5416         * device/include/Makefile.in (version 1.11): in target 'install'
5417         added lines to copy all header files to installation path,
5418         * in target 'installdirs' added line create directory for pic16
5419         headers in the installation path
5420
5421 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5422
5423         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5424          a function call
5425
5426 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5427
5428         * configure,
5429         * device/lib/configure.in,
5430         * device/lib/configure: fixed for autoconf 2.57
5431
5432 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5433
5434         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5435         option so that it actually works. Made it specific to the z80, since
5436         the gbz80 doesn't have these kinds of I/O ports.
5437
5438 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5439
5440         * device/include/z180.h,
5441         * device/lib/_memcpy.c,
5442         * device/lib/_memmove.c,
5443         * device/lib/_mulint.c,
5444         * device/lib/ser_ir.c,
5445         * device/lib/ser_ir_cts_rts.c,
5446         * device/lib/_strcmp.c,
5447         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5448         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5449         portmode; added deprecation warning for bank= and protmode= forms.
5450         Also, guard against buffer overflow.
5451         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5452
5453 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5454
5455         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5456         changed interrupt vector table generation to only emit declared vectors.
5457         * device/include/Makefile.in: added missing backslash
5458         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5459
5460 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5461
5462         Mainly changes to support compilation of the device libraries
5463         * src/pic16/device.c: stack is allocated via symbol and not
5464         via literal number. The symbol is placed in the corresponding
5465         position of the data ram
5466         * (pic16_dump_section): relocatable and absolute uninitialized
5467         data are now emitted in sorted order to reduce section naming,
5468         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5469         weren't marked as being in the access bank,
5470
5471 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5472
5473         Added portion of GNU PIC Library under the directory
5474         device/include/pic16 and device/lib/pic16. These files
5475         contain the declarations of SFRs for the PIC18Fxx2 devices.
5476         The directory is initialized via configure from toplevel.
5477
5478 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5479
5480         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5481         the spilllocations to be compared correctly
5482
5483 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5484
5485         * src/SDCCast.c (decorateType): fixed bug introduced today
5486
5487 2004-01-12  Borut Razem <borut.razem AT siol.net>
5488
5489         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5490         doc/sdccman.lyx: upper case pragmas are deprecated
5491
5492 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5493
5494         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5495         in simpler and even better code
5496
5497 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5498
5499         * src/SDCCicode.c (operandOperation): fixed bug #874819
5500         * src/SDCCast.c (decorateType): fixed
5501         char foo (unsigned long ul) { return ul > 0; }
5502
5503 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5504
5505         * doc/sdccman.lyx: Moved and added some sections, small changes
5506         all over. Telling LaTeX to be less strict with word spacing
5507         to better keep the right margin. Changed some notes about
5508         maintainance of the ports in section 3.2.1 - is it OK like this?
5509
5510 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5511
5512         SDCC source changes:
5513         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5514         convilong): modified to inform the pic16 port that builtin functions
5515         are external
5516
5517         PIC16 PORT specific changes:
5518         * src/pic16/device.c pic16_dump_equates() added,
5519         processor registers declared internally by the port are emitted in
5520         the translation as equates,
5521         * src/pic16/gen.c: inline code is passed unprocessed to the
5522         translation,
5523         * (pic16_popGetLit2): fnuction modified to take second operand as
5524         pCodeOp pointer and not as literal,
5525         * (popRegFromIdx): prefixed with pic16_,
5526         * (pic16_popCombine2): modified to receive already allocated pCode
5527         operands,
5528         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5529         * (genFunction): initializes local stack frame and pushes on stack
5530         all the registers used by this function,
5531         * (genEndFunction): restores all registers from stack and restores
5532         stack frame,
5533         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5534         improvements,
5535         * (pic16glue): changed the program startup sequence,
5536         * added new dbName code 'A' for functions placed in absolute section
5537         * src/pic16/main.c: added function attribute _naked,
5538         * added pragma 'code' to place a fnuction at an absolute address,
5539         * added command line arguments --debug-ralloc and --pcode-verbose,
5540         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5541         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5542         * (pic16_newpCodeOpLit2): modified to take the second operand as
5543         pCodeOp pointer,
5544         * (pic16_printpBlock): modified to emit each function in a separate
5545         section,
5546         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5547         UPPER for immediate operands,
5548         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5549         instruction,
5550         * src/pic16/peeph.def: all peepholes with movff are commented out,
5551         because there is a problem in the pcode peep optimizer,
5552         * src/pic16/ralloc.c: the register allocator can now reuse local
5553         function symbols for another function. This saves register usage.
5554         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5555
5556         Added file src/pic16/NOTES with information about program writing on
5557         the current port version.
5558
5559 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5560
5561         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5562         and peephole 252 (array access)
5563
5564 2004-01-09  Borut Razem <borut.razem AT siol.net>
5565
5566         * src/SDCCmain.c : fixed #872250: -l command line defined library
5567           files are scanned before standard library files
5568
5569 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5570
5571         * src/SDCCast.c (decorateType): fixed bug #874046
5572
5573 2004-01-09  Borut Razem <borut.razem AT siol.net>
5574
5575         * support/scripts/sdcc.nsi: remove previous installation
5576
5577 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5578
5579         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5580         bytes for last interrupt vector (mcs51)
5581         * sdcc.spec: fixed typo
5582
5583 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5584
5585         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5586         gen51Code): more efficient parameter receive for --model-large
5587         ("bug" #845294)
5588
5589 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5590
5591         * src/ds390/main.c,
5592         * src/z80/main.c: added missed needLinkerScript flags (more than
5593         one port structure defined in these file)
5594         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5595         bug #795325
5596
5597 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5598
5599         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5600         * src/port.h: added flag needLinkerScript in port->linker
5601         structure to inform whether to create a .lnk file or not,
5602         * src/avr/main.c,
5603         * src/ds390/main.c,
5604         * src/hc08/main.c,
5605         * src/mcs51/main.c,
5606         * src/pic/main.c,
5607         * src/pic16/main.c,
5608         * src/xa51/main.c,
5609         * src/z80/main.c: changed appropriately to configure
5610         needLinkerScript flag
5611         * src/pic/gen.c,
5612         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5613         * src/pic/glue.c: added variable udata_section_name to
5614         override default uninitialized data segment definition for
5615         devices only with SHAREBANK memory (reported from Erik Epetrich)
5616         * (pic14emitOverlay): modified to emit a commented overlay segment
5617         directive when no overlay data exist
5618         * (picglue): modified to emit uninitialized data segment
5619         according to udata_section_name
5620         * src/pic/main.c (_pic14_parseOptions): added command line
5621         options --udata-section-name=[name] to override default
5622         udata definition name
5623         * modified _linkCmd and _asmCmd to include compiler passed
5624         arguments via -W option
5625         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5626         object file from '.rel' to '.o' in port->linker structure,
5627         changed size of fptr from 2 to 3 in port structure
5628
5629 2004-01-07  Borut Razem <borut.razem AT siol.net>
5630
5631         * support/scripts/sdcc.nsi: update PATH
5632         * support/scripts/sdcc.ico: craeted
5633
5634 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5635
5636         * device/include/Makefile.in: fix install
5637         * doc/Makefile: fix install
5638
5639 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5640
5641         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5642         in bug #860505
5643         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5644         how the function variable allocation summary is displayed; also
5645         include information about variables allocated to the overlay
5646         segment
5647
5648 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5649
5650         * as/mcs51/lkmain.c: Help about -Y option
5651         * as/mcs51/lkarea.c: Fixed gcc warnings
5652
5653 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5654
5655         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5656         fixed warning
5657         * support/valdiag/tests/overflow.c: added
5658         * src/SDCCast.c (decorateType),
5659         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5660         LEFT_OP (left shift)
5661
5662 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5663
5664         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5665         (default behaviour).
5666
5667 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5668
5669         A python script to validate compiler diagnostic messages. It can be
5670         used to verify that sdcc complains about bad c source code and
5671         gives a good location of the error.
5672         * support/valdiag/Makefile,
5673         * support/valdiag/valdiag.py,
5674         * support/valdiag/tests/*
5675
5676 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5677
5678         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5679         * src/SDCCsymt.c (newEnumType),
5680         * src/SDCCsymt.h
5681         * support/Util/SDCCerr.c,
5682         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5683         enum related bugs.
5684         * support/regression/tests/enum.c: added test for enum values that
5685         require at least 2 bytes of storage.
5686
5687 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5688
5689         * src/common.h: added ifndef/define/endif macros
5690         around the header file.
5691         Bug reported from Jesus Calvino-Fraga
5692
5693 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5694
5695         * sdcc.spec: updated
5696         * device/include/Makefile.in: don't install CVS directories
5697         * device/lib/Makefile.in: added removal of CVS directories after install
5698         * doc/Makefile: fixed install, added local_icons
5699         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5700         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5701         * src/ds390/gen.c (genRightShift): fixed bug #870788
5702         * src/SDCCast.c (decorateType): fixed bug #870781
5703
5704 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5705
5706         PIC16 port related changes:
5707         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5708         added variable stackPos,
5709
5710         * gen.c: genCall, assignResultValue: added support for
5711         pushing/retrieving function parameters to/from stack,
5712         genFunction,genEndFunction: setup stack frame for the
5713         generated function,
5714         genAddrOf: will be changed according to bug 863624
5715
5716         * added files genutils.c and genutils.h which contain gen*
5717         debugged and optimised functions extracted from gen.c
5718
5719         * glue.c: added variable 'externs' which holds extern symbols,
5720         pic16emitRegularMap: is modified to properly handle relocatable
5721          symbols under the new scheme,
5722         pic16createInterruptVect: is modified
5723         pic16printPublics: is modified to emit 'global' assembler directives,
5724         added pic16_printExterns to print extern symbols,
5725         pic16glue: initializes stack/frame pointer in the beginning of
5726         the assembly output. Temporary hack, will be corrected later,
5727         because gplink yet does not support stack and SDCC does not
5728         yet support a type of crt0.o object to create the final binary.
5729
5730         * Removed many lines that contain 8051 legacy code.
5731         * The code is finally placed under a 'code' directive.
5732         * Added port specific options.
5733
5734         * _process_pragma: simplified since now we do not need *special*
5735         include file to define SFR registers. But a separate header
5736         will be needed. This will be developed later.
5737         * _pic16_parseOptions: added, parses port specific options:
5738         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5739         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5740         --preplace-udata-with=
5741
5742         * _pic16_setDefaultOptions: modified to initialize section names,
5743         but hack is temporarly out of order since it needs improvement.
5744         * _pic16_genAssemblerPreamble: configuration words are emitted by
5745         their address instead of their name. This part is incomplete and
5746         supports only the 18Fxx2 devices. Other devices will emit an error
5747         during assembly since they do not contain the same set of config
5748         registers
5749         * _pic16_genIVT: is modified,
5750
5751         * pcode.c: added definitions for some hardware registers that are needed
5752         for stack support
5753         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5754         All PCI entries are updated. Now LFSR is supported.
5755         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5756         * added pic16_newpCodeOpLit2 to support instructions with
5757         two literal arguments
5758         * pic16_pCode2str: corrected code that emits assembler instructions
5759         with two literal operands and those that have an access bit modifier
5760         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5761         this fixes a bug which caused some labels to be lost, when an
5762         assembler directive was added, i.e. banksel,
5763         * pic16_FixRegisterBanking: improved logic that causes the insertion
5764         of bank switching,
5765         * InlineFunction: functions that are called once, are not any more
5766         inlined. This can be a port option in the future,
5767
5768         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5769
5770         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5771         hold the corresponding uninitialized symbols,
5772         * pic16_allocProcessorRegister: registers have explicit marked the
5773         accessBank field,
5774         * pic16_allocInternalRegister: registers are explicit marked as
5775         not used,
5776         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5777         processing list, so bit registers were lost,
5778         *
5779
5780         * ralloc.h: added field 'accessBank' and original symbol operand
5781         in register definition,
5782         * removed the field isMapped from register definition,
5783
5784         ** Several functions have been removed from various sources:
5785         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5786         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5787         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5788         pic16_assignRelocatableRegisters
5789
5790         ** others have been introduced:
5791         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5792         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5793
5794 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5795
5796         * support/scripts/inc2h.pl: changed definition of BIT_AT
5797         to emit 'sbit at' instead of 'bit at'. This was a request.
5798
5799         PIC16 port related preliminary changes:
5800         * gen.c: prefixed function popRegFromString with
5801         pic16_ and all references to it corrected
5802         * pcode.c: all pic16_pc_* hardware registers prefixed
5803         with underscore (_),
5804         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5805         * ralloc.c: newReg(): when register is REG_SFR then
5806         set address to rIdx,
5807         pic16_allocProcessorRegister(): marks register wasUsed=0
5808         pic16_writeUsedRegs(): added a call to assign processor
5809         registers via pic16_assignFixedRegisters
5810
5811 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5812
5813         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5814         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5815         variables in unused register banks.  Also the SSEG is placed
5816         wherever there is enough space for it, and IDATA can be anywhere
5817         in internal RAM.  For now compile using -Wl-Y[stack_size].
5818         The mem file is different for this option as well, since it
5819         makes no sense of talking about DSEG lenght.
5820
5821 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5822
5823         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5824         in certain cases, e.g. when ROM assignment, patch provided
5825         from Albert den Haan.
5826
5827 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5828
5829         Many signedness and type propagation fixes:
5830         * src/SDCCicode.c: made geniCodeCast() static
5831         replaced SPEC_ by IS_ (cosmetic)
5832         (operandOperation): fixed div and mod operation
5833         (usualBinaryConversions): added support for promotion of char
5834         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5835         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5836         (geniCodeAdd): an array index will stay unsigned, even if promoted
5837         from char to int
5838         (geniCodeArray): ditto
5839         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5840         * src/SDCCsymt.c (computeType): added more support for char;
5841         promotion of char is selectable by promoteCharToInt, fixed signedness
5842         for all cases
5843         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5844         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5845         * src/SDCCval (val*): replaced signedness calculation by
5846         computeType()
5847         rearranged if-branches (cosmetic)
5848         (valShift): added warning W_SHIFT_CHANGED
5849         (valCompare): fixed problem with different types
5850         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5851         * support/regression/tests/literalop.c: added many cases
5852         * support/regression/tests/ast_constant_folding.c: changed finally to
5853         'unsigned int'
5854         * .version: new year, new version: 2.3.7
5855         * src/SDCCmain.c (main): applied patch #866468
5856         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5857         provided by Scott Bronson
5858         * doc/sdccman.lyx: updated documentation for sdcdb
5859         updated and added chapter tips
5860
5861 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5862
5863         * src/SDCCsymt.h: missing from yesterday's commits
5864
5865 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5866
5867         * src/SDCC.y (struct_or_union_specifier),
5868         * support/Util/SDCCerr.c,
5869         * support/Util/SDCCerr.h: verify that struct & union tags are used
5870         as declared.
5871
5872 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5873
5874         * src/SDCCglobl.h: missing from yesterday's commits
5875
5876 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5877
5878         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5879         sft_attributes, struct_declaration, parameter_declaration,
5880         type_name, start_block, declaration_list),
5881         * src/SDCC.lex (check_type): support redefinition of typedef names
5882
5883 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5884
5885         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5886         aligned xdata arrays. Erik helped me with the if clause.
5887
5888 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5889
5890         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5891         warning
5892
5893 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5894
5895         * src/SDCCast.h,
5896         * src/SDCCast.c (newAst_),
5897         * src/SDCCicode.h,
5898         * src/SDCCicode.c (ast2iCode, newiCode),
5899         * src/SDCCglobl.h,
5900         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5901         expr, statement, expression_statement, selection_statement,
5902         iteration_statement, expr_opt, jump_statement): foundation for tracking
5903         sequence points
5904         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5905         point code too)
5906
5907 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5908
5909         * support/Util/SDCCerr.c,
5910         * src/SDCCast.h,
5911         * src/SDCCast.c (createCase, createDefault, decorateType),
5912         * src/SDCClabel.c (labelUnreach),
5913         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5914         to error messages.
5915         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5916         (with thanks to Stas Sergeev)
5917         * device/include/time.h,
5918         * device/lib/time.c (CheckTime): suppress unreachable code warning
5919
5920 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5921
5922         * src/SDCCast.c (createIvalCharPtr),
5923         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5924         bug #753752)
5925         * support/regression/tests/nullstring.c: tests for these two bugs
5926
5927 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5928
5929         * support/Util/SDCCerr.h,
5930         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5931         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5932         about storage class and 'at' used inside struct or union
5933         * src/SDCCBBlock.c (iCodeFromeBBlock),
5934         * src/SDCCcse.c (ifxOptimize),
5935         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5936         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5937         printIval, emitStaticSeg, emitOverlay),
5938         * src/SDCClabel.c (deleteIfx),
5939         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5940         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5941         gatherAutoInit, processParms),
5942         * support/Util/SDCCerr.h,
5943         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5944         reporting for post-parse errors.
5945
5946 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5947
5948         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5949         implicit casts via union; they don't work on big endian systems
5950         (possible fix for bug #861138)
5951
5952 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5953
5954         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5955         * src/mcs51/main.c: fixed the fix for bug #737001
5956
5957 2003-12-15  Borut Razem <borut.razem AT siol.net>
5958
5959         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5960
5961 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5962
5963         * support/makebin/makebin.c: put output in binary mode
5964
5965 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5966
5967         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5968         xdata and data memory on startup. Set the environment variable
5969         SDCC_NOGENRAMCLEAR to disable this.
5970         * src/mcs51/peephole.def,
5971         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5972         (allows non-interrupt and interrupt code to safely compete for a resource
5973         without the non-interrupt code having to disable interrupts)
5974
5975 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5976
5977         * src/SDCCicode.c (geniCodeAdd),
5978         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5979         with valFromType if type might be a pointer and host is big endian).
5980         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5981         types, not just integer types.
5982         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5983         multiply defined with mismatching "at" address.
5984
5985 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5986
5987         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5988         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5989         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5990         with embedded nulls (fixed bug #753752)
5991
5992 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5993
5994         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5995         Apparently this did not see much testing (endless loop)
5996
5997 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5998
5999         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
6000
6001 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6002
6003         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
6004         gracefully handle NULL memmap pointers
6005
6006 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6007
6008         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
6009         instead of deleting the iCode when an operand is volatile
6010         * src/z80/gen.c (genDummyRead),
6011         * src/mcs51/gen.c (genDummyRead),
6012         * src/ds390/gen.c (genDummyRead),
6013         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
6014         not just IC_RIGHT
6015         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
6016         * src/SDCC.y: fixed bug #850420
6017
6018 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6019
6020         Applied z80 i/o port patch from Peter Townson and fixed some operators
6021         to better handle operands in A register.
6022         * device/include/z180.h
6023         * src/SDCC.y
6024         * src/SDCCglue.c
6025         * src/z80/gen.c
6026         * src/z80/gen.h
6027         * src/z80/main.c
6028         * src/z80/peeph-z80.def
6029         * src/z80/peeph.def
6030         * src/z80/z80.h
6031
6032 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6033
6034         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
6035
6036 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6037
6038         * device/lib/hc08/_mullong.c: Removed extra #endif
6039
6040 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6041
6042         * sim/ucsim/hc08.src/inst.cc,
6043         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
6044         carries from x to h
6045         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
6046         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
6047         * device/include/stdarg.h: fixed varargs for hc08
6048         * device/lib/Makefile.in,
6049         * device/lib/hc08/Makefile,
6050         * device/lib/hc08/_mulint.c,
6051         * device/lib/hc08/_mullong.c: fixed some endian problems
6052
6053 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6054
6055         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
6056         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
6057         * device/lib/_gptrget.c,
6058         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
6059
6060 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6061
6062         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
6063         * src/SDCCast.c (astErrors): fixed bug #846007
6064         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
6065
6066 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6067
6068         * src/SDCCast.c (decorateType): disabled a transformation I added in
6069         revision 1.188 (access to fields of a structure at an absolute address);
6070         it breaks with bitfields, extern declarations, and gcse analysis.
6071         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
6072         could be assigned through a pointer, so don't complain.
6073         * src/SDCCast.c (astErrors),
6074         * src/SDCCast.h,
6075         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
6076
6077 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
6078
6079         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
6080         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
6081         output of __config directives, since gpasm now supports them
6082         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
6083         pre-processor macro, i.e. -DMCU=p18f452
6084         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
6085         and modified to handle 'cast' icode similarly to '=' icode
6086         * src/pic16/device.h (typedef struct PIC_device): added field
6087         'extMIface' to indicate that chip has external memory interface
6088         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
6089         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
6090         18F8720
6091
6092 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6093
6094         * src/SDCC.y (pointer): fixed bug #846006
6095         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
6096         * src/SDCCast.c (decorateType): fixed bug #846009
6097         * src/ds390/peeph.def,
6098         * src/ds390/gen.c (genAnd, genOr),
6099         * src/mcs51/peeph.def,
6100         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
6101
6102 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6103
6104         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
6105         * src/SDCCdflow.c
6106         * src/SDCCcse.c
6107         * src/SDCCcse.h
6108         * src/SDCCBBlock.h
6109         * src/SDCCBBlock.c
6110
6111 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
6112
6113         fixed bug #845089
6114         * src/SDCCbitv.h,
6115         * src/SDCCbitv.c: added function to free a bitvector
6116         * src/SDCClrange.h,
6117         * src/SDCClrange.c: added function to recompute the liveranges
6118         * src/avr/ralloc.c,
6119         * src/ds390/ralloc.c,
6120         * src/hc08/ralloc.c,
6121         * src/mcs51/ralloc.c,
6122         * src/pic/ralloc.c,
6123         * src/pic16/ralloc.c,
6124         * src/xa51/ralloc.c,
6125         * src/z80/ralloc.c: recompute the liveranges after register packing
6126
6127 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
6128
6129         * src/SDCCloop.c (newInduction): fixed bug #845630
6130
6131 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6132
6133         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
6134         inadvertantly left behind from my 2003-11-12 change
6135
6136 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6137
6138         Updated headers I neglected to commit yesterday.
6139         * src/SDCClrange.h,
6140         * src/SDCCicode.h
6141
6142 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6143
6144         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
6145         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
6146         * src/SDCCopt.c (eBBlockFromiCode),
6147         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
6148         the creation of the key hash table from the sequencing so it can be used
6149         earlier (for some GCSE bug fixes still pending)
6150
6151 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6152
6153         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
6154         * support/regression/tests/addsub.c: testing genPlus shortcut
6155
6156 2003-11-15  Borut Razem <borut.razem AT siol.net>
6157
6158         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
6159
6160 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6161
6162         * src/SDCCcse.c (cseBBlock): fixed bug #527779
6163         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
6164         ordering is immaterial.
6165         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
6166
6167 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6168
6169         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
6170         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
6171         (SIGSEV) of bug #840381
6172         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
6173         unlink new file before rename if new and old filenames are the same)
6174
6175 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6176
6177         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
6178         uninitialized variables) for the mcs51. Set environment variable
6179         SDCC_GENRAMCLEAR to test.
6180         xdata initialization slightly shorter
6181
6182 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6183
6184         * src/SDCCsymt.h,
6185         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
6186         #838241 & 780691 (basicly the same bug)
6187         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
6188         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
6189
6190 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
6191
6192         * src/SDCCmain.c (linkEdit): "fix" #834252
6193
6194 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6195
6196         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
6197         * src/SDCCast.h,
6198         * src/SDCC.y: fixed bug #819403
6199
6200 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6201
6202         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
6203         the reentrant attribute.
6204         * src/hc08/gen.c (genPackBits): added missing stack readjustment
6205         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
6206         simulation
6207         * src/SDCCast.c (decorateType): fixed bug with storage class not being
6208         updated during pointer dereference; f.e. ~(((char *)1)*) was being
6209         erroneously reduced to a literal.
6210         * src/hc08/ralloc.c (packRegisters, rematStr),
6211         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
6212         some cases
6213
6214 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6215
6216         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
6217         * doc/sdccman.lyx: changed from 'article' to 'book'
6218         * doc/Makefile: readded test_suite_spec and cdbfileformat
6219
6220 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
6221
6222         * device/include/stdlib.h: include malloc.h to comply with ANSI
6223         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
6224
6225 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6226
6227         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
6228         * doc/clean.mk: also remove *.out files
6229         * doc/sdccman.lyx: some additions, larger top/bottom margins
6230
6231 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6232
6233         * src/SDCC.y: fixed bug #837365
6234         * support/regression/tests/bitopcse.c
6235         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
6236         a symbol (might be valop instead)
6237         * device/lib/Makefile.in: added errno.c to HC08SOURCES
6238         * device/lib/clean.mk: added hc08 to the cleaning list
6239
6240 2003-11-04  Borut Razem <borut.razem AT siol.net>
6241
6242         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
6243           made 2003-11-04
6244         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6245           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
6246           malloc is declared in standard stdlib.h
6247
6248 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6249
6250         * device/lib/hc08/Makefile: need to clean .rel not .o files
6251         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
6252
6253 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6254
6255         * src/port.h,
6256         * src/hc08/main.c,
6257         * src/mcs51/main.c,
6258         * src/ds390/main.c,
6259         * src/z80/main.c,
6260         * src/avr/main.c,
6261         * src/pic/main.c,
6262         * src/pic16/main.c,
6263         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
6264         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
6265         tests (which uses the port's oclsExpense function)
6266         * src/SDCC.y,
6267         * src/SDCCast.c,
6268         * src/SDCCicode.c,
6269         * src/hc08/gen.c,
6270         * src/ds390/gen.c,
6271         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
6272
6273 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6274
6275         * src/SDCCcse.c (ifxOptimize),
6276         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
6277         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
6278         deleting the IFX iCode.
6279         * src/hc08/ralloc.c: reduced unneeded slocs
6280         * src/hc08/gen.c: fixed bug in asmopToBoolean
6281
6282 2003-11-04  Borut Razem <borut.razem AT siol.net>
6283
6284         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
6285           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
6286           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
6287           transferred to configure
6288
6289 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
6290
6291         Use headers defined in the C[++] standards:
6292         * sim/ucsim/gui.src/serio.src/fileio.cc
6293         * sim/ucsim/gui.src/serio.src/frontend.cc
6294         * sim/ucsim/gui.src/serio.src/main.cc
6295         * sim/ucsim/gui.src/serio.src/posix_signal.cc
6296         * support/Util/NewAlloc.c
6297         * as/hc08/lklibr.c
6298         * as/mcs51/lklibr.c
6299         * as/z80/aslist.c
6300         * as/z80/assym.c
6301
6302 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6303
6304         * Added MSVC projects for hc08 assembler and linker:
6305         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
6306         /as/hc08/link_hc08.dsp
6307
6308 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
6309
6310         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
6311
6312 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
6313
6314         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
6315
6316 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6317
6318         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
6319
6320 2003-10-31  Borut Razem <borut.razem AT siol.net>
6321
6322         * support/cpp2/cpplib.h,
6323           support/cpp2/cpplib.c,
6324           support/cpp2/cpplex.c,
6325           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
6326           to switch _asm block preprocessing on / off. Default is
6327           #pragma preproc_asm +
6328
6329 2003-10-31  Borut Razem <borut.razem AT siol.net>
6330
6331         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
6332           when outputting comment blocks (when executed with -C option) and
6333           _asm (SDCPP specific) blocks
6334
6335 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6336
6337         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
6338
6339 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
6340
6341         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
6342
6343 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
6344
6345         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
6346         * src/SDCCast.c (decorateType): fixed bug #832664
6347
6348 2003-10-31  Borut Razem <borut.razem AT siol.net>
6349
6350         * support\cpp2\cpplex.c: fixed for SDCPP:
6351           comments(when executed with -C option) and _asm blocks
6352           were included even if they where in skipped #if block.
6353           Applied solution from GCC cpp 3.3.2
6354
6355 2003-10-31  Borut Razem <borut.razem AT siol.net>
6356
6357         * src/SDCC.lex: sdcc now understands both formats:
6358           '# <line_number> <file_name>' and
6359           '#line <line_number> <file_name>'
6360         * support/cpp2/cppmain.c: sdcpp now generates the standard
6361           '# <line_number> <file_name>' instead of former
6362           '#line <line_number> <file_name>'
6363
6364 2003-10-30  Borut Razem <borut.razem AT siol.net>
6365
6366         * support/cpp2/cpphash.h,
6367         * support/cpp2/cpplib.h
6368         * support/cpp2/cpplex.c,
6369         * support/cpp2/cppmain.c,
6370         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
6371
6372 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6373
6374         Fixed a number of problems revealed by bug #827883.
6375         * src/SDCCloop.c (loopInvariants): Spill location of the
6376         result operand should be recomputed if extracted from
6377         a loop. Also, don't extract assignments of an iTemp
6378         from a literal.
6379         * src/SDCCast.c (isConformingBody): loop reversal should
6380         not occur if the control variable is involved with a
6381         relational operator.
6382
6383 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6384
6385         * .version: bumped to 2.3.6 to reflect the big improvements
6386         made by Erik and Klaus. Thanks!
6387
6388 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6389
6390         Replaced the livrange code.
6391         * src/SDCClrange.c: added new LR code
6392         * src/SDCCloop.c,
6393         * src/SDCCBBlock.h: removed remainig parts from old LR code
6394         * src/ds390/ralloc.c,
6395         * src/ds390/gen.c: minor fixes to make it work with new code
6396
6397 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6398
6399         * as/hc08/asm.h,
6400         * as/hc08/lkrloc.c,
6401         * src/hc08/gen.c,
6402         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6403         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6404         (tweaked fix for bug #818696)
6405
6406 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6407
6408         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6409
6410 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6411
6412         * src/SDCCmain.c,
6413         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6414         * src/mcs51/gen.c (gencjneshort),
6415         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6416         more efficient (per Scott Bronson's suggestion)
6417
6418 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6419
6420         Extended the semantics of the critical keyword to include
6421         individual statements. See RFE #827755 and #799831
6422         * src/SDCC.y
6423         * src/SDCCicode.c
6424         * src/SDCCopt.c
6425         * src/SDCCast.c
6426         * support/Util/SDCCerr.c
6427         * support/Util/SDCCerr.h
6428         * src/mcs51/gen.c
6429         * src/ds390/gen.c
6430         * src/hc08/gen.c
6431
6432 2003-10-19  Borut Razem <borut.razem AT siol.net>
6433
6434         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6435
6436 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6437
6438         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6439         Fixed bug #818696
6440         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6441         and predecrement operand is displayed
6442
6443 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6444
6445         * src/SDCCval.c (valMinus): fixed bug #826041
6446
6447 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6448
6449         Some hc08 related updates that I missed earlier
6450         * sim/ucsim/stypes.h
6451         * support/regression/ports/hc08/spec.mk
6452
6453 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6454
6455         New target "hc08" for the Motorola 68hc08 family of micros
6456
6457         * configure
6458         * configure.in
6459         * Makefile
6460         * src/hc08/*
6461         * src/SDCCmain.c
6462         * src/port.h
6463         * sim/ucsim/hc08.src/*
6464         * sim/ucsim/configure.in
6465         * src/ucsim/configure
6466         * sim/ucsim/packages_in.mk
6467         * as/hc08/*
6468         * as/Makefile
6469         * device/include/mc68hc908qy.h
6470         * device/lib/hc08/*
6471         * device/lib/Makefile.in
6472         * support/regression/ports/hc08/*
6473         * support/regression/Makefile
6474
6475 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6476
6477         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6478         regression test
6479         * src/ds390/gen.c (genCast): fixed bug #821957
6480
6481 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6482
6483         * device/lib/logf.c: "fixed" overlay bug
6484         * support/regression/ports/host/spec.mk: added m library
6485         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6486         * support/regression/tests/float_trans: added (for Eric)
6487
6488 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6489
6490         * src/mcs51/gen.c (genCpl): fixed bug
6491         http://sf.net/mailarchive/message.php?msg_id=6263915
6492
6493 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6494
6495         * src/SDCCast.c (decorateType): added extended constant folding
6496         * src/SDCCsymt.c (computeType): cleanup
6497         * src/SDCCval.c (valShift): minor optimization
6498         * support/regression/tests/ast_constant_folding.c: added
6499
6500 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6501
6502         * src/SDCCmain.c: removed some unintended changes
6503
6504 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6505
6506         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6507         * src/z80/gen.c: fixed part of bug #817589
6508         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6509
6510 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6511
6512         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6513         * src/SDCCcflow.c
6514         * src/SDCCcse.c
6515         * src/SDCCdflow.c
6516         * src/SDCClabel.c
6517         * src/SDCClrange.c
6518         * src/SDCCmem.c
6519         * src/SDCCopt.c
6520         * src/SDCCpeeph.c
6521         * src/SDCCset.c
6522         * src/avr/ralloc.c
6523         * src/ds390/ralloc.c
6524         * src/izt/ralloc.c
6525         * src/mcs51/ralloc.c
6526         * src/pic/ralloc.c
6527         * src/pic16/ralloc.c
6528         * src/xa51/ralloc.c
6529         * src/z80/ralloc.c
6530         * src/z80/gen.c: removed unused label "release:"
6531
6532 2003-10-06  Borut Razem <borut.razem AT siol.net>
6533
6534         * src/SDCC.lex: removed definition of unused variables
6535           save_optimize and save_options
6536
6537 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6538
6539         * clean.mk: removed '=' in "-maxdepth=1"
6540         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6541         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6542
6543 2003-10-06  Borut Razem <borut.razem AT siol.net>
6544
6545         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6546           my_unput() replaced by unput()
6547
6548 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6549
6550         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6551         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6552         type-punned pointer will break strict-aliasing rules"
6553         Old LR behaviour is again default; Klaus' LR can be choosen by
6554         defining the environment variable LRKLAUS
6555         * src/SDCCBBlock.h
6556         * src/SDCCloop.c
6557         * src/SDCClrange.c
6558         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6559         * clean.mk: fixed removal of files in bin/CVS/
6560         * device/lib/clean.mk: fixed removal of directories small and large
6561         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6562         * src/SDCCicode.c,
6563         * src/SDCCval.c: removed superflous test for pedantic
6564
6565 2003-10-05  Borut Razem <borut.razem AT siol.net>
6566
6567         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6568           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6569           message "unmatched #pragma SAVE and #pragma RESTORE"
6570
6571 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6572
6573         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6574           assembly, critical functions, atomic, nojtbound)
6575
6576 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6577
6578         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6579         * src/SDCCBBlock.h
6580         * src/SDCCloop.c
6581         * src/SDCCloop.h
6582         * src/SDCClrange.c
6583
6584 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6585
6586         * src/z80/gen.h,
6587         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6588         * src/mcs51/gen.h
6589         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6590         * src/ds390/gen.h
6591         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6592         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6593         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6594
6595 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6596
6597         * src/z80/gen.c (genRet): fixed bug #524753
6598         * src/z80/gen.c (genCast): fixed internal error on cast from
6599         pointer to long
6600         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6601         fix for bug #477835 to the z80
6602         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6603         for tracking iCodes in the peephole optimizer for z80
6604
6605 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6606
6607         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6608         the other part of bug #814548
6609         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6610
6611 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6612
6613         * src/SDCCcse.c: fixed part of bug #814548
6614
6615 2003-09-28  Borut Razem <borut.razem AT siol.net>
6616
6617         * src/asm.c: rewrite of printILine() to use temporary file instead
6618           a pipe
6619         * src/xa51/main.c: commented out declaration of int rewinds
6620
6621 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6622
6623         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6624
6625 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6626
6627         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6628         * src/asm.c (printILine): Fixed bug #811015
6629
6630 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6631
6632         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6633         freeing.
6634
6635 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6636
6637         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6638         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6639         to correctly handle general case of AOP_PAIRPTR
6640         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6641
6642 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6643
6644         * src/mcs51/ralloc.c (fillGaps),
6645         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6646         register positioning bug)
6647
6648 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6649
6650         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6651
6652 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6653
6654         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6655         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6656         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6657         (ralloc doesn't intentionally do this now, but perhaps later)
6658         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6659         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6660         register positioning bugs (Fixed bug #762602 and #795325)
6661         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6662         (Fixed bug #808779)
6663         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6664         lines that --i-code-in-asm generates
6665
6666 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6667
6668         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6669         trying to fclose a FILE* that was already closed.
6670
6671 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6672
6673         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6674         of const struct should be treated as if const themselves)
6675
6676 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6677
6678         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6679
6680 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6681
6682         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6683         Unix (/n) and DOS (/r/n) line terminations.
6684
6685 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6686
6687         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6688         bug #613775
6689
6690 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6691
6692         * src/mcs51/gen.c (genFunction, genEndFunction),
6693         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6694         and restore of EA so that stack offsets to parameters are
6695         correct when using both critical and reentrant/stack-auto.
6696         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6697         size (can be triggered in error if sloc is shared between
6698         different sized objects)
6699         * device/include/float.h: fixed macros to explicitly use
6700         unsigned long where needed
6701
6702 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6703
6704         Feature req. 799831: added code to allow nesting of critical functions
6705         * src/mcs51/gen.c (genFunction, genEndFunction)
6706         * src/ds390/gen.c (genFunction, genEndFunction)
6707
6708 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6709
6710         * src/SDCCsymt.c (sclsFromPtr),
6711         * src/SDCCsymt.h,
6712         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6713         support for standard C idiom of memory mapped variables; for
6714         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6715         to xdata int at 0x1234 tempvar = 1.
6716         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6717         provided by Akiya ISHIDA
6718
6719 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6720
6721         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6722         * src/SDCCval.c (constVal): added reduction from int to char
6723         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6724         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6725         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6726         to ignore the sign
6727         * support/regression/tests/shifts.c: fixed
6728
6729 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6730
6731         * src/z80/gen.c (genXor): Fixed bug #805445
6732
6733 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6734
6735         Fixed bug #621531 (const & volatile confusion in the type chain).
6736         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6737         refer to the const or volatile state of the pointer itself.
6738
6739         * src/SDCCast.c
6740         * src/SDCCglue.c
6741         * src/SDCCicode.c
6742         * src/SDCCsymt.c
6743         * src/SDCCval.c
6744         * src/SDCC.y
6745         * src/SDCCsymt.h
6746         * src/pic/gen.c
6747         * src/pic/ralloc.c
6748         * src/pic16/gen.c
6749         * src/pic16/ralloc.c
6750         * support/regression/tests/const.c
6751
6752 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6753
6754         When checking for duplicated modules, use absolute paths
6755         instead of relative paths.  Files changed:
6756
6757         * as/mcs51/lklib.c
6758         * link/z80/lklib.c
6759
6760 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6761
6762         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6763
6764 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6765
6766         * device/include/string.h: added size_t typedef, changed
6767         prototypes to use size_t, eliminated separate reentrant and
6768         non-reentrant declarations, added _memmove declaration
6769         * device/lib/_memcpy.c: changed to use size_t instead of int,
6770         changed /4 to >>2 to avoid division library call
6771         * device/lib/_memcmp.c,
6772         * device/lib/_memset.c,
6773         * device/lib/_strncat.c,
6774         * device/lib/_strncpy.c,
6775         * device/lib/_strncmp.c: changed to use size_t instead of int
6776         * device/lib/_memmove.c: new file (fixed bug #772294)
6777         * device/lib/Makefile.in: added _memmove.c
6778         * device/lib/z80/asm_strings.s: fixed bug #772290
6779         * support/regression/tests/bitfields.c: attempt to fix host assertion
6780         failure on amd64-unknown-linux2.2
6781
6782 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6783
6784         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6785         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6786         * as/z80/asmain.c (main): fixed bug #801766
6787
6788 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6789
6790         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6791         compilers
6792
6793 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6794
6795         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6796         reported in bug #800609
6797
6798 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6799
6800         * Top header beautifications in src/pic16 directory:
6801           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6802           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6803           pcoderegs.h, ralloc.c, ralloc.h
6804         * main.c: added top header and GPL license notice
6805         * pcode.c: fixed the if-conditional warning
6806
6807 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6808
6809         * device/lib/_mullong.c: replaced int by short for gcc
6810
6811 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6812
6813         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6814         and JUMPTABLE iCodes properly now (worked by accident before)
6815         * src/mcs51/gen.c (leftRightUseAcc),
6816         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6817         iCode properly now. Use getSize instead of nRegs since a & b
6818         aren't part of the nRegs tally.
6819
6820 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6821
6822         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6823         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6824           before instructions that use the _STATUS register
6825
6826 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6827
6828         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6829         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6830         fetching of the pointer
6831         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6832         copied from genNearPointerSet()
6833         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6834         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6835         If they pop r0/r1 they must be called in the opposite order than aopOp().
6836         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6837         (resp. --stack-auto), prepared for --xstack
6838
6839 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6840
6841         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6842
6843 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6844
6845         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6846         these ports have their own __sdcc_external_start()
6847
6848 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6849
6850         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6851         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6852         type for bits was changed. It resulted in bit variables becoming
6853         global, which is not permitted in PIC 14 assembly output.
6854
6855 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6856
6857         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6858
6859 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6860
6861         Z80 and MCS51 linkers complaint if a public symbol is defined
6862         in more than one library module:
6863
6864         * as/mcs51/lklib.c
6865         * link/z80/lklib.c
6866         * as/mcs51/Makefile.in
6867
6868 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6869
6870         A few small changes that speed up the peephole optimizer.
6871
6872         * src/SDCCpeeph.c
6873
6874 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6875
6876         Try to make the peephole optimizer smarter by maintaining
6877         an association between the assembly source code and the
6878         iCodes that originated them. Put this information to use
6879         with a new peephole rule condition "notVolatile" so that
6880         the rules can be aggressive yet still safe.
6881
6882         * src/SDCCpeeph.c
6883         * src/SDCCpeeph.h
6884         * src/mcs51/gen.c
6885         * src/mcs51/peeph.def
6886
6887 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6888
6889         Fixed bug #741761
6890
6891         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6892         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6893         if the left or right operand symbols have the accuse flag set.
6894
6895 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6896
6897         Changed the type of the result of the ! (NOT) operator to char;
6898         previously it returned the same type as the source. This allows
6899         us to eliminate all the genFloatNot functions (all of its target
6900         implementations were very buggy) since !float can use the same
6901         code as !long now.
6902
6903         * src/SDCCicode.c (ast2iCode): ! returns char
6904         * src/mcs51/gen.c (genNot, genNotFloat),
6905         * src/ds390/gen.c (genNot, genNotFloat),
6906         * src/z80/gen.c (genNot, genNotFloat),
6907         * src/pic/gen.c (genNot, genNotFloat),
6908         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6909
6910 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6911
6912         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6913         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6914            during interrupts. Ensure WSAVE is located at a shared bank address.
6915         2. Fixed page selection in some places
6916         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6917            the registers name strings.
6918         4. Fixed "signed / unsigned compare" compiler warnings.
6919         5. The PIC port manages its own allocation of the general purpose
6920            registers, but makes no attempt to reuse them. As a result when
6921            compiling it soon runs out of general purpose registers. Some
6922            additional code was added to the files pcode.c and device.c to walk
6923            through the function call tree and rename the registers so that they
6924            get reused.
6925
6926         * src/pic/device.c
6927         * src/pic/gen.c
6928         * src/pic/glue.c
6929         * src/pic/pcode.c
6930         * src/pic/pcode.h
6931         * src/pic/ralloc.c
6932         * src/pic/ralloc.h
6933         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6934         genPlus() & genMinus() when the result is the same as left or right
6935
6936 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6937
6938         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6939
6940 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6941
6942         Made bitfield a distinct type from bit so that bitfields
6943         convert as per ANSI C and bits retain their traditional
6944         boolean style behaviour. Implemented bitfield support in
6945         the z80 port.
6946
6947         * src/SDCCsymt.h,
6948         * src/SDCCsymt.c,
6949         * src/SDCCast.c,
6950         * src/cdbFile.c,
6951         * src/mcs51/gen.c,
6952         * src/ds390/gen.c: bit v bitfield split
6953         * src/z80/gen.c: New support for bitfields
6954         * support/regression/tests/bitfields.c: reenabled z80,
6955         added more tests
6956
6957 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6958
6959         Rules 246.x, 247.x relate to bitfields, the others speed up
6960         access to xdata mapped I/O devices.
6961
6962         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6963
6964 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6965
6966         Cleaned up genPackBits and genUnpackBits and added two helper
6967         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6968         for literal assignments in genPackBits (thanks to Frieder for
6969         reminding me).
6970
6971         * src/mcs51/gen.c
6972         * src/ds390/gen.c
6973
6974 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6975
6976         Fixed bug #748310 (pointer to function type mishandled when the
6977         function name is omitted). Also fixed a SIGSEGV when a function
6978         attribute (reentrant, etc) is used on a non-function or on a
6979         function but misplaced before the parameter list.
6980
6981         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6982         bug #748310
6983         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6984         * support/Util/SDCCerr.h,
6985         * support/Util/SDCCerr.c: Added func attr misuse error msg
6986
6987 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6988
6989         Fixed bug #787649 by anonymous
6990         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6991         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6992
6993 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6994
6995         Fixed numerous bitfield problems.
6996
6997         * src/SDCC.y: More bitfield related error checking
6998         * src/SDCCsymt.h,
6999         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
7000         * support/Util/SDCCerr.h,
7001         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
7002         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7003         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
7004         * support/regression/tests/bitfields.c: tests added
7005
7006 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7007
7008         Made the constant following the "interrupt" keyword optional. If
7009         omitted, the function will not automatically be given an entry
7010         in the interrupt vector table (similar to #pragma NOIV, but
7011         less syntacticly kludgy). The interrupt number is also now
7012         range checked. Also fixed a bug in the high order bit example
7013         in the manual.
7014
7015         * src/SDCC.y
7016         * src/SDCCmem.c
7017         * src/SDCCglue.c
7018         * src/SDCCsymt.h
7019         * support/Util/SDCCerr.c
7020         * support/Util/SDCCerr.h
7021         * doc/sdccman.lyx
7022
7023 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
7024
7025         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
7026         * src/SDCCicode.c (operandOperation): rewritten some ops
7027         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
7028         * src/SDCCsymt.c (computeType): literals are handled the same way as any
7029         other type
7030         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
7031         be re-activated by defining REDUCE_LITERALS)
7032         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
7033         unsigned, but are signed by default
7034         * src/SDCCval.c (constVal): rearranged
7035         * src/SDCCval.c (valMod): preliminary fix
7036         * src/SDCCval.c (valCastLiteral): use TYPE_* types
7037         * support/regression/literalop.c: added, work in progress
7038
7039 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7040
7041         Generate warnings for useless declarations like "char data;"
7042         that don't do what new users expect.
7043
7044         * src/SDCC.y
7045         * support/Util/SDCCerr.h
7046         * support/Util/SDCCerr.c
7047
7048 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
7049
7050         * src/SDCCval.c (valMult): fix overflow detection of negative int
7051
7052 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7053
7054         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
7055
7056         Changes to support big endian targets:
7057
7058         * src/ports.h
7059         * src/SDCCglue.c
7060         * src/avr/main.c
7061         * src/ds390/main.c
7062         * src/izt/i186.c
7063         * src/mcs51/main.c
7064         * src/pic/main.c
7065         * src/pic16/main.c
7066         * src/xa51/main.c
7067         * src/z80/main.c
7068
7069 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
7070
7071         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
7072         * device/lib/time.c: fixed warning "integer overflow in expression"
7073
7074 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
7075
7076         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
7077         * src/SDCCval.c (constVal): changed default to signed; hex and octal
7078         constants are unsigned; added recognition of "u" flag for unsigned
7079         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
7080         * src/SDCCval.c (valDiv, valMod): fixed signdness
7081         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
7082         signedness of modulo, left and right shift
7083         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
7084         * support/Util/SDCCerr.h: added warning W_INT_OVL
7085         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
7086         * src/SDCCast.c (ast_print): improved output of constants
7087
7088 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7089
7090         Fixed some warnings when building with MSVC:
7091
7092         * as\mcs51\asdata.c
7093         * as\z80\asdata.c
7094         * as\mcs51\asm.h
7095         * as\z80\asm.h
7096         * link\z80\aslink.h
7097         * link\z80\lkdata.c
7098         * link\z80\lkeval.c
7099         * link\z80\lkgb.c
7100         * link\z80\lkihx.c
7101         * link\z80\lks19.c
7102         * link\z80\lksym.c
7103         * support\cpp2\cpplib.c
7104         * src\ds390\gen.c
7105         * src\mcs51\gen.c
7106
7107 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
7108
7109         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
7110
7111 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7112
7113         * support\librarian\clean.mk: Do not remove Makefile.
7114         * support\librarian\Makefile: added.
7115
7116 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7117
7118         Added librarian to MSVC build:
7119         * all.dsp
7120         * sdcc.dsw
7121         * support\librarian\librarian.dsp
7122
7123         'configure' not needed for librarian, removed:
7124         * support\librarian\configure
7125         * support\librarian\configure.in
7126         * support\librarian\config_in.h
7127         * support\librarian\Makefile.in
7128
7129         Hopefully these ones built the librarian and the rest of sdcc properly:
7130         * Makefile
7131         * Makefile.common.in
7132
7133         Messed up 'configure', so revert to previous version:
7134         * configure
7135         * configure.in
7136
7137 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
7138
7139         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
7140         there, while the mantissa of a double is "only" 53 bits wide.
7141
7142 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7143
7144         Adding sdcclib to the build.  MSVC project coming soon.
7145         Files added/changed:
7146
7147         * support\librarian\clean.mk
7148         * support\librarian\configure
7149         * support\librarian\configure.in
7150         * support\librarian\config_in.h
7151         * support\librarian\Makefile.bcc
7152         * support\librarian\Makefile.in
7153         * support\librarian\sdcclib.c
7154         * Makefile.bcc
7155         * Makefile
7156         * Makefile.common.in
7157         * configure
7158         * configure.in
7159
7160 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7161
7162         Linker now complaints if linked modules have conflicting options, for
7163         example, one compiled using --model-large and another one compiled with
7164         --model-small.  The following files were modified:
7165
7166         * as\mcs51\asdata.c
7167         * as\mcs51\aslink.h
7168         * as\mcs51\asm.h
7169         * as\mcs51\asmain.c
7170         * as\mcs51\asout.c
7171         * as\mcs51\i51pst.c
7172         * as\mcs51\lkdata.c
7173         * as\mcs51\lklibr.c
7174         * as\mcs51\lkmain.c
7175         * as\z80\asdata.c
7176         * as\z80\asm.h
7177         * as\z80\asmain.c
7178         * as\z80\asout.c
7179         * as\z80\z80pst.c
7180         * link\z80\aslink.h
7181         * link\z80\lkdata.c
7182         * link\z80\lklibr.c
7183         * link\z80\lkmain.c
7184         * src\SDCCglue.c
7185
7186 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7187
7188         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
7189         as/mcs51/lklibr.c: Generate a warning when a library is not found.
7190
7191 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
7192
7193         * src/z80/mappings.i: fix _mul[us][int,long] entries
7194
7195 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7196
7197         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
7198
7199 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7200
7201         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
7202         * support/regression/tests/bitopcse.c: added
7203         fixed warning:
7204         * src/avr/gen.c:
7205         * src/pic/gen.c:
7206         * src/pic16/gen.c:
7207         * src/z80/gen.c:
7208         * src/xa51/gen.c:
7209
7210 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7211
7212         added support for new library format to z80, gbz80 linkers:
7213         *link/z80/aslink.h
7214         *link/z80/lklex.c
7215         *link/z80/lklib.c
7216         *link/z80/lklist.c
7217
7218 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
7219
7220         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
7221         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
7222
7223 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
7224
7225         added DUMMY_READ_VOLATILE:
7226         * src/SDCC.y:
7227         * src/avr/gen.c:
7228         * src/xa51/gen.c:
7229         * src/z80/gen.c:
7230         * src/pic/gen.c:
7231         * src/pic16/gen.c:
7232         * src/mcs51/gen.c:
7233         * src/ds390/gen.c:
7234         * src/SDCCcse.c (algebraicOpts): many improvements
7235         * src/SDCCcse.h: removed algebraicOpts()
7236         * src/SDCCicode.c (picDummyRead): added
7237
7238 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7239
7240         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
7241         "Insufficient space in data memory".
7242
7243 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7244
7245         * src/mcs51/gen.c: fixed bug #771358
7246         * src/z80/gen.c: fixed bug #759087
7247
7248 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
7249
7250         * src/pic16/glue.c: minor cleanup by Vangelis
7251
7252 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7253
7254         * device/include/regc515c.h: fixed #758477
7255         * device/lib/_gptrget.c: saving some cycles in generic pointer get
7256         * device/lib/_gptrput.c: saved a few bytes
7257         * my tab spacing is 8, yours too?)
7258         * device/lib/_ser.c: process RX bytes earlier than TX bytes
7259         * device/lib/serial.c: process RX bytes earlier than TX bytes
7260         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
7261
7262 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7263
7264         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
7265
7266 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7267
7268     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
7269
7270 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
7271
7272         * device/lib/Makefile.in: bad fix, reverted to 1.43
7273
7274 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
7275
7276         * device/lib/Makefile.in: added missing z80 object files
7277
7278 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
7279
7280         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
7281         pic16 progress by Vangelis:
7282         * src/SDCCglobl.h:
7283         * src/SDCCmain.c:
7284         * src/pic/Makefile:
7285         * src/pic:
7286         * pic/Makefile:
7287         * pic16/device.c:
7288         * pic16/device.h:
7289         * pic16/gen.c:
7290         * pic16/gen.h:
7291         * pic16/genarith.c:
7292         * pic16/glue.c:
7293         * pic16/main.c:
7294         * pic16/pcode.c:
7295         * pic16/pcode.h:
7296         * pic16/pcodepeep.c:
7297         * pic16/peeph.def:
7298
7299 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7300
7301     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
7302
7303 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7304
7305     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
7306     added gbz80 build to MSVC project.
7307     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
7308     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
7309     from 8051 stuff and setup so it links using a .lnk file.
7310
7311 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7312
7313     * support/librarian/sdcclib.c: sdcc librarian.
7314     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
7315     with sdcclib.
7316
7317 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7318
7319     * as/mcs51/lkmain.c: properly handle extensions in function afile.
7320
7321 2003-07-02  Borut Razem <borut.razem AT siol.net>
7322
7323         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
7324         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
7325         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
7326         src/xa51/main.c, src/z80/main.c:
7327         virtualization of glue() function: each port has it's own glue function,
7328         which is accessed by do_glue function pointer in PORT.general structure
7329
7330 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
7331
7332         * DS800C400 fun, improved ROM interface and tinibios.
7333
7334 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
7335
7336         * More support for DS80C400. Now includes beginning of interface to ROM.
7337
7338 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
7339
7340         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
7341
7342 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7343
7344         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
7345
7346 2003-06-19  Borut Razem <borut.razem AT siol.net>
7347
7348         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
7349
7350 2003-06-19  Borut Razem <borut.razem AT siol.net>
7351
7352         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
7353         fixed Z80 port - crt0.o: cannot open.
7354
7355 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
7356
7357         * support/Util/MySystem.c (merge_command): revert bad fix
7358
7359 2003-06-18  Borut Razem <borut.razem AT siol.net>
7360
7361         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
7362
7363 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7364
7365         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7366         option --use-stdout sends errors to stdout instead of stderr.
7367
7368 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
7369
7370         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
7371
7372 2003-06-15  Borut Razem <borut.razem AT siol.net>
7373
7374         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7375         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7376         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7377         fixed width array of pointers replaced with sets;
7378         multiple include and lib paths ared transferred to preprocessor and linker
7379         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7380         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7381         fixed width array of pointers
7382         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7383         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7384         fixupPath(), getPathDifference()
7385         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7386         fixed width array of pointers
7387
7388 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7389
7390         * src/pic16/ralloc.c: fix warnings
7391         * src/pic16/pcode.c: fix warning
7392
7393 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7394
7395          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7396         know all the details, but essentially this set of changes enable
7397         the pic16 port to generate movff instructions and generate assembler
7398         directives,
7399         * src/SDCCmain.c:
7400         * src/pic16/gen.c:
7401         * src/pic16/glue.c:
7402         * src/pic16/pcode.c:
7403         * src/pic16/device.c:
7404         * src/pic16/main.c:
7405         * src/pic16/pcode.h:
7406         * src/pic16/pcoderegs.c:
7407         * src/pic16/ralloc.c:
7408         * src/pic16/ralloc.h:
7409
7410 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7411
7412         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7413         added option --vc, so sdcc errors and warnings are compatible with
7414         Microsoft Visual Studio.
7415
7416 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7417
7418         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7419           device/lib/libfloat.lib: added atof function.
7420
7421 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7422
7423         * doc/sdccman.lyx: updated to Lyx 1.3
7424         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7425         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7426         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7427
7428 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7429
7430         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7431
7432 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7433
7434         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7435           additions to the "related tools/documentation" section
7436
7437 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7438
7439         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7440
7441 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7442
7443         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7444         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7445
7446 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7447
7448         * doc/sdccman.lyx: fix double dash and other minor things
7449         * doc/Makefile: fix double dash
7450
7451 2003-05-28  Karl Bongers(patches from Martin Helmling)
7452         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7453           condition and ignore commands.
7454
7455 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7456
7457         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7458           is in parts still quite out of date, I did changes as far as I felt makes sense
7459           for a non-native english speaker.
7460           Please feel free to add to the manual or to correct my changes.
7461         * doc/Makefile: undid touching the date of intermediate tex files.
7462
7463 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7464
7465         * doc/sdccman.lyx: Manual has an index now
7466
7467 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7468
7469         Finalize muluint/mulsint and mululong/mulslong merging:
7470         * device/lib/_mulint.c
7471         * device/lib/_mullong.c
7472         * device/lib/gbz80/mul.s
7473         * device/lib/gbz80/stubs.s
7474         * device/lib/z80/mul.s
7475         * device/lib/z80/stubs.s
7476         * src/SDCCsymt.c (initCSupport)
7477
7478 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7479
7480         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7481         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7482           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7483           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7484           instead of /Zm500.
7485
7486 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7487
7488         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7489           the regression tests I'm not brave enough to enable 245.b, 245.c
7490         * doc/sdccman.lyx: added latex preamble for hyperref package.
7491           Using pdflatex this will give you a hyperlinked pdf file with
7492           bookmarks. (prepend '%' before /usepackage if this breaks something)
7493
7494 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7495
7496          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7497
7498 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7499
7500         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7501
7502 2003-05-21    <johan AT balder>
7503
7504         * src/SDCCglue.c (printIval): fixed bug #739934
7505
7506 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7507
7508         Applied patch from bug 737905 (renamed yylineo to mylineno):
7509         * src/altlex.c
7510         * src/SDCCast.c
7511         * src/SDCglobl.h
7512         * src/SDCC.lex
7513         * src/SDCCsymt.c
7514         * src/SDCCval.c
7515         * src/pic16/pcode.c: Cleaned warnings
7516         * src/pic16/pcodeflow.c: Cleaned warnings
7517         * src/pic16/pcoderegs.c: Cleaned warnings
7518
7519 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7520
7521         * src/pic16/pcode.c: Cleaned warnings
7522         * src/pic16/pcodepeep.c: Cleaned warnings
7523         * src/pic16/ralloc.c: Cleaned warnings
7524
7525 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7526
7527         * doc/sdccman.lyx: fixed bug 739745
7528         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7529
7530 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7531
7532         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7533         it can be defined with CFLAGS when running configure
7534         * src/SDCCmain.c: fixed compiling + linking with object files
7535
7536 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7537
7538         * configure.in: configure for pic16 port,
7539             added --disable-pic16-port
7540         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7541         * src/SDCCmain.c: linkOptions is changed to set *,
7542             added if/endif conditional macros to remove options help
7543             messages from optionsTable when a port is not configured, added
7544             support for the PIc16 port in the ports table, when executing
7545             the compiler with no port specified on command line, a default
7546             port is selected with the new macro DEFAULT_PORT which is
7547             defined in port.h, in setDefaultOptions() linkOptions is removed
7548             from initialization assignment, since now it is a set,
7549             parseCmdLine uses setParseWithComma for linkOptions, in
7550             linkEdit() linkOptions are accessed with new function indexSet()
7551             which returns the i'th item of a set variable. See SDCCset.c, in
7552             linkEdit() when calling buildCmdLine(), added linkOptions as
7553             last argument. Now users can pass arguments to gplink via the
7554             -Wl option, main() uses pic16glue() to glue up pic16 programs
7555         * src/SDCCpeeph.c: various changes to support pic16
7556         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7557             return the i'th item of the set
7558         * src/SDCCset.h: added function prototype for indexSet()
7559         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7560         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7561         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7562             added macro DEFAULT_PORT
7563         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7564         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7565             generated
7566         * src/pic16/glue.c: commented out some error producing lines
7567         * src/pic16/main.c: __config directives are commented out to stop
7568             gpasm complaining and test the linkage with gplink, _linkCmd and
7569             _asmCmd changed to be more gplink and gpasm friendly
7570         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7571             produced an error when parsed, peep rule 12 is added to utilize
7572             movff, but it is commented out since the pCode does not support
7573             yet a command with 2 address arguments
7574
7575 2003-05-18    <johan AT balder>
7576
7577         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7578         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7579 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7580
7581         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7582   Added feature to script commands from file.
7583
7584 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7585
7586         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7587         * src/SDCCutil.c: include ctype.h for win32
7588
7589 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7590
7591         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7592
7593 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7594
7595         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7596   Fixed so you can set breakpoints prior to run, run does not stop
7597   on entry now.  Add tbreak.  Other enhancements and fixes for use
7598   with ddd.
7599
7600 2003-05-12  Borut Razem <borut.razem AT siol.net>
7601
7602         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7603
7604 2003-05-11  Borut Razem <borut.razem AT siol.net>
7605
7606         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7607         the path of bin directory, so that PATH is the only env. variable, which has to be set
7608         in case of standard installation.
7609         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7610         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7611         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7612
7613 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7614
7615         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7616         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7617         temp files are in the port dir; clean the gen/test directory when
7618         generating new test.c
7619         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7620         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7621         * support/regression/tests/zeropad.c: added
7622
7623 2003-05-09    <johan AT balder>
7624
7625         * src/SDCCglue.c: fixed bug #597940
7626
7627 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7628
7629         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7630   cache sfr, optimize next,step, fix off by one sourceline,
7631   support ddd list function.
7632         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7633
7634 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7635
7636         * support/regression/HTMLgen.py: added compare_s2f()
7637         * support/regression/Makefile: redo 1.27
7638         * support/regression/generate-cases.py: redo 1.5
7639
7640 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7641
7642         * support/regression/tests/float.c: workaround 33 bit hex constant
7643         * support/regression/tests/simplefloat.c: fix division for host
7644
7645 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7646
7647         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7648         that tame's the PIC's over-aggressive optimizer.
7649
7650 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7651
7652          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7653          support for MSVC.
7654
7655 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7656
7657         Initial support for DS80C400. "Hello world" runs on TINIm400
7658         (with polled I/O).
7659
7660 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7661
7662          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7663          * Some notes on ddd usage added in debugger/README
7664          Martin Helmling adding more features and fixes for ddd GUI debugger.
7665          Code added for nexti, stepi, up, down, and other adjustments.
7666
7667 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7668
7669         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7670         * src/pic/peeph.def Added two rules to optimize carry manipulation
7671         * src/pic/* removed debug printfs
7672
7673 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7674
7675         * debugger/mcs51/cmd.c: added header newalloc.h
7676
7677 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7678
7679         * as/Makefile: new EXEEXT
7680         * as/z80/Makefile: remove trailing slash of BUILDIR
7681         * as/z80/clean.mk: new EXEEXT
7682         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7683         * support/cpp2/Makefile.in: new EXEEXT
7684         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7685
7686 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7687
7688         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7689         EXEEXT was introduced to fix all related problems with targets
7690         "clean", "install" and "uninstall"; a couple of further flaws
7691         especially with "clean" have been fixed too
7692         * as/mcs51/Makefile.in
7693         * as/mcs51/clean.mk
7694         * as/z80/Makefile
7695         * Makefile
7696         * clean.mk
7697         * debugger/mcs51/Makefile.in
7698         * debugger/mcs51/clean.mk
7699         * link/z80/Makefile
7700         * link/z80/Makefile.in
7701         * link/z80/clean.mk
7702         * link/Makefile
7703         * packihx/Makefile.in
7704         * packihx/clean.mk
7705         * sim/ucsim/Makefile
7706         * sim/ucsim/clean.mk
7707         * sim/ucsim/avr.src/Makefile.in
7708         * sim/ucsim/avr.src/clean.mk
7709         * sim/ucsim/s51.src/Makefile.in
7710         * sim/ucsim/s51.src/clean.mk
7711         * sim/ucsim/xa.src/Makefile.in
7712         * sim/ucsim/xa.src/clean.mk
7713         * sim/ucsim/z80.src/Makefile.in
7714         * sim/ucsim/z80.src/clean.mk
7715         * sim/ucsim/main_in.mk
7716         * sim/ucsim/packages_in.mk
7717         * sim/ucsim/gui.src/Makefile.in
7718         * sim/ucsim/gui.src/serio.src/Makefile.in
7719         * sim/ucsim/gui.src/serio.src/clean.mk
7720         * src/Makefile.in
7721         * src/clean.mk
7722         * support/cpp2/Makefile.in
7723         * support/cpp2/clean.mk
7724         * support/makebin/Makefile
7725         * support/makebin/clean.mk
7726         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7727         * doc/sdccman.lyx: --program-suffix no longer needed
7728
7729 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7730
7731          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7732          Martin Helmling added support for ddd GUI debugger.
7733          Code added to display assembly, set variables, and other commands
7734          to interface to ddd.
7735
7736 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7737
7738         * as/Makefile: fix target clean
7739         * as/clean.mk: fix target clean
7740         * as/z80/clean.mk: fix target clean
7741
7742 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7743
7744         * Makefile.common.in: added  AT EXEEXT AT
7745         * configure.in: removed all mingw32 stuff
7746         * configure: rebuilt from configure.in
7747         * doc/sdccman.lyx: updated section "installation"
7748         * support/scripts/sdcc_mingw32: adapted to configure
7749         * support/scripts/sdcc_cygwin_mingw32: added
7750
7751 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7752
7753         * src/pic Added object file support for the PIC port
7754         * src/pic Applied patch from Craig Franklin (this started the object file support)
7755         * src/regression Updated the PIC regression tests for object files
7756
7757 2003-04-20  Borut Razem <borut.razem AT siol.net>
7758
7759         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7760           lklex.c: In function `getfid':
7761           lklex.c:203: warning: array subscript has type `char'
7762         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7763           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7764         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7765           stack handling macros
7766
7767 2003-04-19  Borut Razem <borut.razem AT siol.net>
7768
7769         * "handling space characters in file path" task:
7770         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7771         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7772         * support/Util/MySystem.h: make it self-sufficient
7773         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7774           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7775           handling space characters in file path
7776         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7777           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7778         * support/Util/MySystem.c: handling space characters in executable's path
7779
7780 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7781
7782         * as/z80/Makefile: fix permanent rebuild of z80
7783         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7784         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7785
7786 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7787
7788         * src/SDCCopt.c: add special case optimization to replace modulo by
7789           a power of two with a bitwise AND.
7790
7791 2003-04-18    <johan AT balder>
7792
7793         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7794
7795 2003-04-17    <johan AT balder>
7796
7797         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7798         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7799
7800 2003-04-13  Borut Razem <borut.razem AT siol.net>
7801
7802         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7803         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7804           fixed mingw problem in adl_NORMALIZE_PATH
7805
7806 2003-04-12  Borut Razem <borut.razem AT siol.net>
7807
7808         * fixed "#pragma SAVE/RESTORE can not be nested":
7809         * src/SDCC.lex: reworked pragma handling functions
7810         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7811         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7812
7813 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7814
7815         * src/SDCCutil.c (pathEquivalent): defined but not used
7816         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7817         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7818         * configure: rebuilt from configure.in
7819         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7820         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7821         * device/include/Makefile.in: replace sdcc_datadir
7822         * device/lib/Makefile.in: replace sdcc_datadir
7823         * Makefile.common.in: add LDFLAGS from configure
7824         * packihx/Makefile.in: use LDFLAGS
7825         * src/Makefile.in: use LDFLAGS
7826         * support/cpp2/Makefile.in: add LDFLAGS from configure
7827         * support/makebin/Makefile: use LDFLAGS
7828         * .version: bumped version number to 2.3.5
7829
7830 2003-04-12  Borut Razem <borut.razem AT siol.net>
7831
7832         * completed "different paths" task:
7833         * src/SDCCmacro.c: fixed bug in handling quotes
7834         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7835         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7836
7837 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7838
7839         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7840
7841 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7842
7843         * ds390/gen.c ds390/peeph.def: fix bug 706781
7844
7845 2003-04-11  Borut Razem <borut.razem AT siol.net>
7846
7847         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7848
7849 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7850
7851         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7852         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7853          set - this bit used to not be set...).
7854         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7855           bad code in PIC Port
7856         * src/regression/and2.c added to test bug 609268
7857         * src/regression/Makefile added and2.c to regression test
7858
7859
7860 2003-04-08    <johan AT CP255758-A>
7861
7862         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7863         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7864         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7865
7866 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7867
7868         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7869         fix bug #487815
7870         * support/cpp2/Makefile.in: fix bug #487815
7871         * configure: rebuilt from configure.in
7872         * Makefile.common.in: docdir changed, new path suffixes
7873         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7874         * sdcc_vc_in.h: reflect changes from sdccconf.h
7875         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7876         * src/SDCCutil.h: remove BINDIR hack
7877         * doc/sdccman.lyx: update new path hierarchy
7878
7879 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7880
7881         * src/SDCCpeeph.c: added okToRemoveSLOC test
7882
7883 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7884
7885         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7886
7887 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7888
7889         * src/SDCCpeeph.c: added labelIsReturnOnly test
7890         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7891
7892 2003-04-05    <johan AT balder>
7893
7894         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7895         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7896         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7897         * src/SDCCast.c: fixed a warning
7898         * src/SDCCast.h: fixed a warning
7899         * src/SDCCicode.c (operandFromAst): fixed a warning
7900
7901 2003-04-04    <johan AT balder>
7902
7903         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7904         * src/SDCCast.c (decorateType): fixed bug #715076
7905         * src/SDCC.y: fixed bug #702907
7906
7907 2003-04-03    <johan AT balder>
7908
7909         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7910         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7911         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7912         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7913         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7914
7915 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7916
7917         * _decdptr.c: fix return values
7918         * _gptrget.c: fix return values
7919         * _gptrgetc.c: fix return values
7920         * _gptrput.c: fix return values
7921         * _mulint.c: fix return values
7922         * as/z80/Makefile: fix 'make -j' problem
7923
7924 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7925
7926         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7927         * configure.in: big cleanup, updated to autoconf 2.5x
7928         * configure: rebuilt from configure.in
7929         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7930         * sdcc_vc_in.h: reflect changes from sdccconf.h
7931         * doc/Makefile: fixed a flaw in "make install"
7932
7933 2003-04-02    <johan AT balder>
7934
7935         * src/ds390/gen.c (genCmp): no comments
7936         * src/mcs51/gen.c (genCmp): no comments
7937         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7938         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7939
7940 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7941
7942         * support/regression/generate-cases.py: place generated file in given sub directory
7943         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7944         * support/regression/Makefile: improvements for 'make -j';
7945         side effect: it's simpler and faster now
7946
7947 2003-03-31  Borut Razem <borut.razem AT siol.net>
7948
7949         * src/z80/main.c: link-{port} and as-{port} defined without path
7950         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7951
7952 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7953
7954         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7955
7956 2003-03-30  Borut Razem <borut.razem AT siol.net>
7957
7958         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7959           changed type of list parameter to set
7960         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7961         * src/port.h: changed type of do_assemble() parameter to set
7962         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7963           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7964           definition of "cppoutfilename" macro with NULL value in preProcess()
7965         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7966         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7967         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7968           replaced with set *binPathSet
7969         * shash_add() deallocates the item, if allready exsists, before adding the new one
7970         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7971
7972 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7973
7974         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7975           a nested for loop bug in the PIC port
7976         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7977           for loops
7978
7979 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7980
7981         * support/Util/dbuf.h: remove C++ stuff to make it portable
7982
7983 2003-03-28  Borut Razem <borut.razem AT siol.net>
7984
7985         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7986           literal strings in stringLiteral()
7987         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7988         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7989           to the project
7990
7991 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7992
7993         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7994
7995 2003-03-26    <johan AT balder>
7996
7997         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7998         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7999         * src/SDCCast.c (decorateType): fixed " -v < 3"
8000
8001 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
8002
8003         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
8004         Added Lenny Story's debug infrastructure changes:
8005         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
8006         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
8007         * src/cdbFile.c: added
8008         * src/SDCCdebug.c: added
8009         * src/SDCCdebug.h: added
8010         * src/SDCCast.c (createFunction)
8011         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
8012         * src/SDCCmain.c (parseCmdLine, main)
8013         * src/SDCCmem.c (redoStackOffsets)
8014         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
8015         * src/SDCCsymt.h
8016         * src/common.h
8017         * src/avr/gen.c (genAVRCode)
8018         * src/ds390/gen.c (gen390Code)
8019         * src/mcs51/gen.c (gen51Code)
8020         * src/pic/gen.c (genpic14Code)
8021         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
8022         * src/xa51/gen.c (genXA51Code)
8023         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
8024
8025 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8026
8027         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
8028         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
8029
8030 2003-03-22    <johan AT balder>
8031
8032         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
8033
8034 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
8035
8036         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
8037         * doc/cdbfileformat.lyx: added, written by Lenny Story
8038         * doc/Makefile: added cdbfileformat.lyx
8039         * doc/clean.mk: added cdbfileformat.lyx
8040
8041 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
8042
8043         * src/mcs51/peeph.def: fix bug #705773
8044
8045 2003-03-20    <johan AT balder>
8046
8047         An sfr/sbit can have an "at #" AND an initializer
8048         * src/SDCCsymt.c (checkSClass):
8049         * src/SDCCmem.c (allocGlobal):
8050         * src/SDCCmem.c (allocLocal):
8051         * src/SDCCast.c (createBlock):
8052
8053 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
8054
8055         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
8056
8057 2003-03-16    <johan AT balder>
8058
8059         Undid the hackup of const and volatile, the problem is much bigger
8060         * src/SDCC.y:1.65
8061         * src/SDCCast.c:1.171
8062         * src/SDCCglue.c:1.138
8063         * src/SDCCicode.c:1.146
8064         * src/SDCCsymt.c:1.150
8065         * src/SDCCval.c:1.65
8066
8067 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
8068
8069         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
8070         * src/ds390/gen.c (genAddrOf): fixed bug #704087
8071
8072 2003-03-13    <johan AT balder>
8073
8074         Hackup const and volatile modifiers in type chains a bit:
8075         * src/SDCC.y:1.63
8076         * src/SDCCast.c:1.169
8077         * src/SDCCglue.c:1.136
8078         * src/SDCCicode.c:1.143
8079         * src/SDCCsymt.c1.146
8080         * src/SDCCsymt.h1.59
8081         * src/SDCCval.c:1.63
8082
8083 2003-03-12    <johan AT balder>
8084
8085         * src/SDCCBBlock.h: more LRH debugging junk
8086         * src/SDCCcflow.h: more LRH debugging junk
8087         * src/SDCCloop.c: more LRH debugging junk
8088         * src/SDCC.y (struct_declaration): fixed bug #697590
8089         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
8090         * src/ds390/gen.c (aopForRemat): fixed bug #700031
8091         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
8092
8093 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8094         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
8095         test function names must now match exactly).
8096         * src/SDCCcse.c: added special case in findCheaperOp to allow
8097         extending a short integer. Makes less awful code for bug 700121 test case.
8098
8099 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8100
8101         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
8102         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
8103
8104 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8105
8106         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
8107         actually called (operandsNotEqual() was called for all
8108         operandsNotEqualX tests).
8109
8110 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
8111
8112         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
8113         with shorter literals. Fixes bug 700121.
8114
8115 2003-03-11    <johan AT balder>
8116
8117         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
8118
8119 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
8120
8121         * src/SDCCloop.c (mergeRegions): an evil beast is dead
8122         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
8123
8124 2003-03-10  Borut Razem <borut.razem AT siol.net>
8125
8126         * src/SDCCmain.c: pipe preprocessor's output
8127         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8128         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8129         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8130         which closes all pipes in pipeSet set
8131         * src/SDCCset.c: free deleted item in function deleteSetItem()
8132         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8133         moved from z80 to src subproject
8134         * .version: increased version number to 2.3.4
8135
8136 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
8137
8138         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
8139         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
8140         * support/regression/ports/xa51/spec.mk: fix typo
8141
8142 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
8143
8144         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
8145
8146 2003-03-09  Borut Razem <borut.razem AT siol.net>
8147
8148         * src/SDCCmain.c: pipe preprocessor's output
8149         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
8150         * sdcc_vc_in.h: define pclose as _pclose for WIN32
8151         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
8152         which closes all pipes in pipeSet set
8153         * src/SDCCset.c: free deleted item in function deleteSetItem()
8154         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
8155         moved from z80 to src subproject
8156
8157 2003-03-09  Borut Razem <borut.razem AT siol.net>
8158
8159         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
8160         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
8161         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
8162         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
8163         * src/SDCCglobl.h: unification of WIN32 native definitions
8164
8165 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8166
8167         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
8168
8169 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8170
8171         * src/configure.in:   check for endianess (even while cross-compiling)
8172         * src/configure:      check for endianess (even while cross-compiling)
8173         * src/configure_in.h: check for endianess (even while cross-compiling)
8174         * src/avr/gen.c:        remove old endianess stuff
8175         * src/mcs51/gen.c:      remove old endianess stuff
8176         * src/ds390/gen.c:      remove old endianess stuff
8177         * src/pic/gen.c:        remove old endianess stuff
8178         * src/pic/genarith.c:   remove old endianess stuff
8179         * src/pic/glue.c:       fix endianess check
8180         * src/pic16/gen.c:      remove old endianess stuff
8181         * src/pic16/genarith.c: remove old endianess stuff
8182         * src/pic16/glue.c:     fix endianess check
8183         * src/xa51/gen.c:       remove old endianess stuff
8184         * src/z80/gen.c:        fix endianess check
8185         * src/SDCCglue.c:       fix endianess check
8186         * src/ds390/peeph.def: fix bug 700036
8187
8188 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
8189
8190         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
8191         * src/configure: find appropriate data-types on host for SDCC's int and long
8192         * src/configure.in: find appropriate data-types on host for SDCC's int and long
8193         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
8194         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
8195
8196 2003-03-07    <johan AT balder>
8197
8198         Just a big NOOP:
8199                 some minor cleanups before the big shot
8200                 OP_DEFS and OP_USES now use Kevin's protection
8201                 new option --nolabelopt
8202
8203         * src/SDCCBBlock.c:
8204         * src/SDCCast.c,:
8205         * src/SDCCcflow.c:
8206         * src/SDCCcse.c:
8207         * src/SDCCicode.c:
8208         * src/SDCCicode.h:
8209         * src/SDCClabel.c:
8210         * src/SDCCloop.c:
8211         * src/SDCCmain.c:
8212         * src/ds390/ralloc.c:
8213         * src/mcs51/ralloc.c:
8214         * src/pic/ralloc.c:
8215         * src/xa51/ralloc.c:
8216         * src/z80/ralloc.c:
8217
8218 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
8219
8220         * src/pic/pcode.c (get_op): fix 64 bit warnings
8221         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
8222         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
8223         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
8224         * support/regression/tests/malloc.c: fix 64 bit warnings
8225
8226 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
8227
8228         * src/mcs51/gen.c (genMinus): fixed bug 696436
8229
8230 2003-03-02  Borut Razem <borut.razem AT siol.net>
8231
8232         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
8233
8234 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
8235
8236         * configure.in: test for mkstemp
8237         * sdccconf_in.h: add HAVE_MKSTEMP
8238
8239 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
8240
8241         * device/include/ctype.h: removed warning while using --stack-auto
8242         * device/include/malloc.h: removed warning while using --stack-auto
8243         * device/include/string.h: removed warning while using --stack-auto
8244
8245 2003-02-23  Borut Razem <borut.razem AT siol.net>
8246
8247         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
8248         because NDEBUG is defined (see man assert)
8249         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
8250
8251 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8252
8253         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
8254         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
8255
8256 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8257
8258         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
8259         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
8260
8261 2003-02-18    <johan AT balder>
8262
8263         * as/mcs51/asmain.c (asmbl): module can start with a digit
8264         * as/z80/asmain.c (asmbl): module can start with a digit
8265
8266 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
8267
8268         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
8269         * src/asm.c: fix pipe() for Mingw32
8270
8271 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
8272
8273         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
8274         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
8275         make -V work again; --c1mode reads now from stdin
8276         * doc/sdccman.lyx: added --c1mode
8277         * support/Util/SDCCerr.c: new messages for c1 mode
8278         * support/Util/SDCCerr.h: new messages for c1 mode
8279         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
8280
8281 2003-02-15    <johan AT balder>
8282
8283         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
8284
8285 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
8286
8287         * doc/sdccman.lyx: Environment variables, -o and other minor things
8288
8289 2003-02-14    <johan AT balder>
8290
8291         * src/xa51/main.c: before anyone really tries to use it :)
8292
8293         * Install doc's in share/sdcc/doc
8294         * removed some obsolete files
8295         * Do a proper make distclean and uninstall
8296         M Makefile.common.in
8297         R sdccbuild.sh
8298         M as/Makefile
8299         M device/include/Makefile.in
8300         M device/lib/Makefile.in
8301         M doc/sdccman.lyx
8302         M link/Makefile
8303         M sim/ucsim/doc/Makefile.in
8304         M src/clean.mk
8305         R src/avr/peeph.rul
8306         R src/xa51/peeph.rul
8307         M support/cpp2/Makefile.in
8308         M support/makebin/Makefile
8309
8310
8311 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
8312
8313         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
8314
8315 2003-02-10  Borut Razem <borut.razem AT siol.net>
8316
8317         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
8318         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
8319         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
8320         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
8321         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
8322         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
8323         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
8324         src/z80/Makefile.bcc: Borland Makefile cleanup
8325         * as/z80/Makefile.bcc: Added Borland Makefile
8326         * support/cpp2/borland.h: Removed
8327
8328 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
8329
8330         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
8331         * src/SDCC.lex: new pragma NOIV
8332         * src/SDCCglobl.h: new pragma NOIV
8333         * src/SDCCmem.c: new pragma NOIV
8334
8335 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8336
8337         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
8338
8339 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
8340
8341         * src/SDCCmain.c: signal handling is switched off by --debug
8342         * doc/Makefile: small fix for install; use clean.mk again
8343         * doc/clean.mk: clean *.pdf and *.html too
8344
8345 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
8346
8347         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
8348         * device/lib/printfl.c: fix a ds390 bug by making it portable
8349         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
8350         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
8351         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
8352         * debugger/mcs51/cmd.c: converted multi-line string literals
8353         * sim/ucsim/globals.cc: converted multi-line string literals
8354         * src/SDCCmain.c: introduced signal handler to remove temp files
8355         * doc/Makefile: small tweaks, implement clean
8356         * doc: removed generated files
8357
8358 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8359
8360         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
8361         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
8362         Address Record is not correctly generated for DS390."
8363
8364 2003-02-02  Borut Razem <borut.razem AT siol.net>
8365
8366         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
8367         * as/mcs51/asm.h: fixed compilation with Borland C
8368         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
8369         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
8370         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
8371         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
8372         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8373         src/z80/Makefile.bcc: delete $(LIB) only if exist
8374         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8375
8376 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8377
8378         * device/include/malloc.h: introduced NULL
8379         * device/include/string.h: introduced NULL
8380         * device/include/stdlib.h: introduced NULL
8381         * device/lib/_memcpy.c: removed NULL
8382         * device/lib/_strcat.c: removed NULL
8383         * device/lib/_strchr.c: removed NULL
8384         * device/lib/_strcmp.c: removed NULL
8385         * device/lib/_strcpy.c: removed NULL
8386         * device/lib/_strcspn.c: removed NULL
8387         * device/lib/_strlen.c: removed NULL
8388         * device/lib/_strncat.c: removed NULL
8389         * device/lib/_strncmp.c: removed NULL
8390         * device/lib/_strncpy.c: removed NULL
8391         * device/lib/_strpbrk.c: removed NULL
8392         * device/lib/_strrchr.c: removed NULL
8393         * device/lib/_strspn.c: removed NULL
8394         * device/lib/_strstr.c: removed NULL
8395         * device/lib/_strtok.c: removed NULL
8396         * device/lib/malloc.c: removed NULL, include own header
8397
8398 2003-02-02    <johan AT balder>
8399
8400         * 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
8401         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8402         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8403         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8404         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8405         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8406
8407 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8408
8409         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8410         area 'DATA'"
8411
8412 2003-02-01    <johan AT balder>
8413
8414         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8415
8416 2003-01-31    <johan AT CP255758-A>
8417
8418         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8419
8420 2003-01-30    <johan AT balder>
8421
8422         * src/SDCCBBlock.c: automatic bug detection
8423         * src/SDCCicode.c: automatic bug detection
8424
8425 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8426
8427         * src/SDCCglobl.h:   now --xram-size 0 works
8428         * src/SDCCmain.c:    now --xram-size 0 works
8429
8430 2003-01-29    <johan AT balder>
8431
8432         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8433
8434 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8435
8436         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8437         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8438         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8439         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8440         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8441         * src/SDCCmain.c:    Added options --xram-size and --code-size
8442
8443 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8444
8445         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8446         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8447
8448 2003-01-27    <johan AT balder>
8449
8450         * src/SDCC.y: fixed bug #613764
8451
8452 2003-01-26    <johan AT balder>
8453
8454         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8455         * src/SDCCsymt.h: fixed bug #673374
8456         * src/SDCCglue.c: fixed bug #661910
8457         * src/SDCCast.c: fixed bug #458099 and 673374
8458
8459 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8460
8461         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8462         * as/mcs51/strcmpi.h: added
8463         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8464         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8465         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8466         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8467         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8468         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8469         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8470         * as/mcs51/Makefile.aslink: new module strcmpi
8471         * as/mcs51/Makefile.asx8051: new module strcmpi
8472         * as/mcs51/Makefil.bcc: new module strcmpi
8473         * as/mcs51/Makefile.in: new module strcmpi
8474         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8475
8476 2003-01-26    <johan AT balder>
8477
8478         * src/SDCCglue.c: reverted back to 1.124
8479         * src/SDCCast.c: reverted back to 1.156
8480         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8481
8482 2003-01-25    <johan AT balder>
8483
8484         * src/SDCCglue.c: A better fix for bug #661910
8485         * src/SDCCast.c: A better fix for bug #661910
8486         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8487
8488 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8489
8490         * src/Makefile.in: remove spawn.o
8491         * src/SDCCmain.c: remove spawn.h
8492         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8493         * src/spawn.c: removed
8494         * src/spawn.h: removed
8495         * support/regression/ports/ds390/spec.mk: link with -r
8496
8497 2003-01-24    <johan AT CP255758-A>
8498
8499         * src/ds390/gen.c (aopOp): fixed bug #667458
8500         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8501         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8502         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8503
8504 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8505
8506         * src/mcs51/peeph.def: better assembler identation by Frieder
8507         * src/mcs51/gen.c: better assembler identation by Frieder
8508
8509 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8510
8511         * as/z80/string.h: removed for gcc 3.2
8512         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8513         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8514
8515 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8516
8517         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8518         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8519         * support/regression/Makefile: separate temp files for ports
8520         * support/regression/generate-cases.py: separate temp files for ports
8521         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8522         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8523
8524 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8525
8526         * moved tinitalk to device/examples/ds390
8527
8528 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8529
8530         * as/mcs51/lkmem.c: rflag is for DS390
8531         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8532         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8533                          (linkEdit): move mem- and map-files the same way as ihx-files
8534         * src/z80/main.c (_setDefaultOptions): removed --generic
8535         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8536         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8537         * src/pic/glue.c (picglue): --c1mode works again
8538         * src/pic16/glue.c (pic16glue): --c1mode works again
8539         * src/asm.c (printCLine): fix #660034
8540
8541 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8542
8543         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8544         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8545         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8546         * as/mcs51/lkmem (summary): better fix for sp problem
8547         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8548         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8549         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8550                                               remove --stack-after-data
8551
8552 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8553
8554         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8555         * src/SDCCutil.c (join): ugly bug: missing '\0'
8556         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8557
8558 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8559
8560         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8561         * src/port.h: typo
8562         * src/pic/main.c (_asmCmd): gpasm supports -o
8563         * src/z80/main.c: more general macros
8564         * device/lib/Makefile.in: remove intermediate files
8565
8566 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8567
8568         * .version: Bumped version number to 2.3.3
8569         * src/SDCCBBlock.c: new option -o
8570         * src/SDCCglobl.h: new option -o
8571         * src/SDCCglue.c: new option -o
8572         * src/SDCCmain.c: new option -o
8573         * src/asm.c: new option -o
8574         * src/ds390/main.c: new option -o
8575         * src/pic/glue.c: new option -o
8576         * src/pic/pcode.c: new option -o
8577         * src/pic/ralloc.c: new option -o
8578         * src/pic16/glue.c: new option -o
8579         * src/pic16/pcode.c: new option -o
8580         * src/pic16/ralloc.c: new option -o
8581         * src/z80/main.c: new option -o
8582         * device/lib/Makefile.in: use -o
8583         * support/regression/ports/ds390/spec.mk: use -o
8584         * support/regression/ports/gbz80/spec.mk: use -o
8585         * support/regression/ports/mcs51/spec.mk: use -o
8586         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8587         * support/regression/ports/z80/spec.mk: use -o
8588         * support/regression/ports/ucz80/spec.mk: use -o
8589         * support/regression/ports/xa51/spec.mk: use -o
8590         * support/regression/fwk/lib/timeout.c: fix usage string
8591
8592 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8593         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8594
8595 2003-01-07    <johan AT balder>
8596
8597         * src/SDCCast.c (decorateType): fixed bug #600035
8598
8599 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8600         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8601         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8602         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8603         * src/pic/pcode.c: outcommented unused variable to remove warnings
8604         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8605
8606 2003-01-06    <karl AT turbobit.com>
8607         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8608    regression tests.
8609
8610 2003-01-06    <johan AT balder>
8611
8612         * src/SDCCicode.c: fixed array add
8613
8614 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8615         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8616         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8617
8618 2003-01-04    <johan AT balder>
8619
8620         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8621
8622 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8623         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8624
8625 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8626         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8627         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8628
8629 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8630         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8631
8632 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8633         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8634
8635 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8636         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8637
8638 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8639
8640     * in \sdcc\as\mcs51\ changed these files in order to create an
8641     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8642     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8643     following files to include the previous two files: aslink.dsp,
8644     Makefile.aslink, Makefile.bcc, and Makefile.in.
8645
8646     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8647     .adb instead of .cdb
8648
8649 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8650
8651         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8652         value from option --iram-size.
8653
8654 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8655
8656         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8657         dram[] array.
8658
8659 2002-09-18    <wiml AT hhhh.org>
8660
8661         * SDCClrange.h: exposed setFromRange() and setToRange()
8662         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8663           packRegsForAccUse() (bug 542397)
8664         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8665           multiple times and emitting the fetch operations more than once
8666           added aopGetUsesAcc() function to allow binary operators to
8667           fetch their operands in the correct order; made genMinus() emit
8668           compact code for X = LITERAL - Y
8669
8670 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8671         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8672         sprintf() in line 1267.
8673
8674 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8675         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8676         like ports.
8677
8678 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8679         Changes to aslink (All the changes are marked with 'JCF'):
8680
8681         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8682         summary().
8683
8684         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8685         area BSEG.  Also moves, if possible, the DATA area down into the internal
8686         ram so more space is available.
8687
8688         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8689         sflag.
8690
8691         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8692         not bytes.  Function summary() which creates a memory usage summary
8693         file with extension .mem.  Reports of overlaping stack and small stack
8694         size.  If the space for the stack is less than 16 bytes aslink trows a
8695         warning.
8696
8697         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8698         the 8051.  Option 'y' for memory summary output file.
8699
8700         Changes to sdcc (All the changes are marked with 'JCF'):
8701
8702         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8703
8704         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8705         overlaying area for it (uses RegBankUsed[4]).
8706
8707         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8708         bank zero as used by default.  By default aslink locates the stack
8709         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8710         the creation of the .mem file.  Delegates the allocation of data area
8711         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8712         the begining of the stack area to aslink.
8713
8714         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8715         glue() in SDCCglue.c creates an area for it.
8716
8717 2002-09-03  Borut Razem <borut.razem AT siol.net>
8718         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8719         sdcc/src/pic/glue.c:
8720         introduced atexit() handler for teporay files removal in case of
8721         errors, assertions, ...
8722
8723 2002-08-29  Borut Razem <borut.razem AT siol.net>
8724         * sdcc/support/cpp2/auto-host_vc_in.h:
8725         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8726         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8727         Maybe there is a similar problem with BORLANDC? It should be checked!
8728
8729         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8730         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8731         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8732         was not executed, and the compiler (cl) launched a warning:
8733         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8734
8735 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8736         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8737
8738 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8739         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8740
8741         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8742           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8743           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8744           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8745           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8746           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8747           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8748         - added Release configuration in VS projects
8749         - review of compiler an linker options
8750         - VC .exe files are generated in bin_vc directory, not to interfere
8751           with binaries generated from other projects (cygwin, mingw, bcc ...)
8752
8753         * sdcc/src/yacc.dsp: added
8754
8755         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8756         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8757         and insert the version number definitions from .version
8758
8759         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8760
8761         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8762         added - genarate auto-host.h using auto-host_vc_in.h as template
8763
8764         * sdcc/sdcc_vc.h,
8765         removed from CVS, generated automatically
8766
8767 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8768         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8769
8770 2002-08-11  Borut Razem <borut.razem AT siol.net>
8771         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8772
8773 2002-08-10  Borut Razem <borut.razem AT siol.net>
8774         * src/SDCCmain.c (main):
8775         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8776         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8777         The consequence was that some temporary files were not removed.
8778
8779         * src/SDCCglue.c:
8780         unification of code in functions tempfilename() and tempfile():
8781         function tempnam() is defined in Visual Studio 6.0 and .NET
8782
8783         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8784
8785         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8786           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8787         - removed compiler command line option /WX: Treats all warnings as errors
8788         - update a list of source files, included into the project
8789
8790         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8791           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8792         changed project type to Generic Project so that can be correcly converted to VS.NET project
8793
8794         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8795
8796         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8797
8798         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8799
8800         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8801         added return 0 statements after assert() to make compiler happy
8802
8803         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8804         added newline in the def file to keep MSC compiler satisfied
8805
8806         * sdcc/src/z80/gen.c:
8807         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8808           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8809         - solved MSC error in function aopDump()
8810
8811         * sdcc_vc.h: define PREFIX as "\\sdcc"
8812
8813 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8814         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8815
8816 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8817         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8818         - Rewrote the register banking algorithm.
8819         - Added pCode live-range analysis to registers (for now, only non-used and
8820         singly-used registers optimized away)
8821
8822         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8823
8824         * 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.
8825
8826 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8827         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8828
8829 2002-04-22  Michael Hope  <michaelh AT vroom>
8830
8831         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8832
8833         * configure.in (DD_COPT): Added include support required for gbdk.
8834
8835         * .version: Bumped version number just to increase it.
8836
8837         * src/SDCCmain.c: Added -nostdinc to the default options.
8838
8839 2002-04-15  Michael Hope  <michaelh AT vroom>
8840
8841         * device/lib/z80/printf.c (sprintf): Added.
8842
8843         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8844
8845         * src/z80/peeph.def: Added transpose redundent load rule.
8846
8847         * src/z80/main.c: Added force callee saves for jaune.
8848
8849         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8850
8851         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8852
8853 2002-03-28  Johan Knol  <johan AT balder>
8854
8855         * src/SDCCval.c: fixed bug #532436
8856
8857 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8858         * /src/port.h:
8859         Added "char *Processor" field to the port structure.
8860
8861         * /src/SDCCmain.c:
8862         Added -p option. Allows port dependent processor to be specified.
8863
8864         * all ports:
8865         Initialized the new field char *Processor field to NULL in all ports
8866
8867         * /src/pic/*:
8868         Compiler generated registers for interrupt context saving
8869         were not getting allocated.
8870
8871 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8872
8873         * /src/SDCCast.c:
8874         Fixed left shift. Will promote the left side of a left shift
8875         if a) left shifting more than size of operand or b) when assigned
8876         to something size > size of left side
8877
8878 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8879         * src/pic/*
8880         tons of changes. Register allocation has been
8881         rewritten. Added customization for the various PICs. Flow
8882         analysis is restructured. ...
8883
8884         * src/pic/device.h:
8885         Added
8886
8887         * src/pic/device.c:
8888         Added. device.c is a PIC port hack to accomodate variations
8889         in PIC devices.
8890
8891 2002-03-13  Michael Hope  <michaelh AT vroom>
8892
8893         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8894
8895 2002-03-04  johanknol  <johanknol AT manik>
8896
8897         * /src/SDCCval.c: fixed
8898
8899         const unsigned char arr[][2] = { { 0, 1 } };
8900         t18.c:1: error: Initializer element is not constant
8901
8902 2002-03-04  bela  <bela AT manik>
8903
8904         * /device/include/mcs51reg.h:
8905         ds89c420 register definition update
8906
8907 2002-03-03    <johan AT FRIJA>
8908
8909         * support/Util/SDCCerr.c: did something, but don't no why anymore
8910
8911         * support/regression/tests/bug-524691.c: made it a little less shy
8912
8913         * src/SDCCast.c (decorateType): fixed bug #524697
8914
8915         * src/SDCCast.c: made some lineno improvements
8916
8917         * src/SDCCval.c (getNelements): changed warning to error
8918
8919         * src/SDCCglue.c (printIvalArray): changed warning to error
8920
8921         * src/SDCCicode.c: fixed a warning for mingw
8922
8923         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8924
8925         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8926
8927 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8928
8929         * src/ds390/peeph.def:
8930         Added some more peephole rules
8931
8932         * src/ds390/gen.c: Various fixes & enhancements
8933
8934         * src/SDCClrange.c, src/SDCClrange.h:
8935         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8936
8937         * src/ds390/ralloc.c:
8938         various fixes & enhancements (ds390) specific
8939
8940         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8941         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8942         from rallocs.
8943
8944         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8945
8946 2002-03-02    <johan AT FRIJA>
8947
8948         * src/SDCCast.c (decorateType): fixed bug #524708
8949
8950         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8951
8952         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8953
8954 2002-03-01  Michael Hope  <michaelh AT vroom>
8955
8956         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8957
8958         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8959
8960 2002-03-01    <johan AT FRIJA>
8961
8962         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8963
8964         * src/SDCCast.c (decorateType): fixed bug #524209
8965
8966         * src/SDCCval.c (valNot): fixed bug #524195
8967
8968 2002-02-26    <johan AT balder>
8969
8970         * src/xa51/gen.c: fixed a warning
8971
8972         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8973
8974         * src/SDCCast.c (decorateType): fixed bug #522534
8975
8976 2002-02-23    <johan AT balder>
8977
8978         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8979
8980 2002-02-22    <johan AT balder>
8981
8982         * src/SDCCast.c: fixed bug #514865
8983
8984         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8985
8986 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8987
8988         * sdcc/src/SDCCloop.c:
8989         Previous fix was not good. basic blocks that have "break" or "return" are
8990         not really partof a loop , but live ranges used in these blocks should
8991         be live thru the entire loop, so set partOfLoop but don't add them to
8992         loop region
8993
8994 2002-02-21    <johan AT FRIJA>
8995
8996         * src/SDCCcse.c: fixed bug #514308
8997
8998 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8999
9000         * src/SDCCloop.c:
9001         Fixed BUG #519583. If a conditional block ended in a return/break
9002         statement inside a loop, it was not being considered part of the loop.
9003
9004         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
9005
9006 2002-02-10  Karl Bongers <karl AT turbobit.com>
9007
9008         * debugger/*:
9009         Fixed up SDCDB debugger somewhat.  Updated debugger/README
9010         with lots of comments and notes.
9011
9012         * device/examples/test2.c:
9013         Fix bug, "red" variable not being initialized(compiler complained).
9014
9015         * device/examples/Makefile, examples/test3.c:
9016         Add Makefile in device/examples folder, compiles test3.c
9017         for use as a multiple module SDCDB test case.
9018
9019         * sim/ucsim/cmd.src/cmdset.cc:
9020         Took out debug printfs in ucsim "next" command.
9021
9022         * sim/ucsim/xa.src:
9023         Karl and Johan start ucsim XA support.  Most dissassembly working,
9024         about 75% emulation done(plenty of work remaining).
9025
9026         * sim/ucsim/z80.src:
9027         Add Z80 support to ucsim, add test-ucz80 regression test,
9028         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
9029         Notice z80 compiler fails on examples/test3.c/crc code.
9030
9031 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
9032
9033         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
9034         Added support for --parms-in-bank1
9035
9036         * src/ds390/peeph.def:
9037         added a few more peephole optimzations
9038
9039         * src/ds390/main.c:
9040         1) added __builtin_inp & __builtin_outp used to read in data of given length
9041            from a memory mapped port
9042         2) added __builtin_memcmp
9043         3) added __builtin_swapw swap bytes of a short
9044
9045         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
9046         1) handle multiple send & receives from register bank1
9047         2) ralloc can now allocate DPTR1 to some liveRanges
9048
9049         * src/SDCCsymt.c, src/SDCCsymt.h:
9050         changes to handle multiple sends & receives
9051
9052         * src/SDCCptropt.h:
9053         added some pointer arithmetic optimization
9054
9055         * src/SDCCptropt.c:
9056         added some pointer arithmetic optimizations but not stable yet so not
9057         called from anywhere (will get this working shortly)
9058
9059         * src/SDCCopt.c: fixed for multiple sends & receives
9060
9061         * src/SDCCmain.c:
9062         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
9063         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
9064            set preprocessor defines (depending on options)
9065
9066         * src/SDCCicode.c, src/SDCCicode.h:
9067         changes made to handle multiple sends & receives
9068
9069         * src/SDCCglobl.h:
9070         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
9071
9072         * src/SDCCcse.c, src/SDCCcse.h:
9073         added function findbackward def (to be used in upcoming optimization)
9074
9075         * src/SDCCcflow.c, src/SDCCcflow.h:
9076         added function returnAtEnd - to determine if a basic block terminates with
9077         a RETURN iCode
9078
9079         * src/SDCCast.c, src/SDCCast.h:
9080         added option parms-in-bank1
9081
9082         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
9083         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
9084         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
9085         adjusted for --parms-in-bank1 option
9086
9087         * device/include/string.h:
9088         donot redefine "reentrant" keyword
9089
9090         * device/include/ds80c390.h: Added some more SFRs
9091
9092 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
9093
9094         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
9095
9096 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
9097
9098         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
9099
9100 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
9101
9102         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
9103
9104 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
9105
9106         * Added --xram-movc option
9107
9108 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
9109
9110         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
9111
9112 2002-01-11  Johan Knol
9113
9114         * Added math lib of Jesus Calvino-Fraga
9115
9116 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
9117
9118         * src/SDCCmain.c (processFile): fix processing of ../../src.c
9119         * support/regression/Makefile: new target test-mcs51-stack-auto
9120         * support/regression/ports/mcs51-stack-auto/spec.mk: added
9121
9122 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9123
9124         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
9125
9126 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
9127
9128         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
9129
9130 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
9131
9132         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
9133
9134         * src/SDCCglue.h: add definition for printIvalChar()
9135
9136 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9137
9138         * src/SDCCast.c: fix #498138 by Johan
9139
9140         * src/SDCCglue.c: fix #498138 by Johan
9141
9142 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
9143
9144         * support/regression/Makefile: fix clean
9145
9146         * support/regression/ports/ds390/support.c: fix transmission of last character
9147
9148 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
9149
9150         * /sdcc/src/ds390/gen.c:
9151         a) improved computing address of stack variable
9152         b) took out some #if 0 code
9153         c) improved parmBytes adjustment
9154         d) improved genPlusIncr & genMinusIncr
9155         e) genCmp could generate bad code (when left assigned to DPTR)
9156         f) Fixed bug in hasInc
9157
9158         * /sdcc/src/ds390/ralloc.c:
9159         a) packRegsForSupport could mess up live information (Fixed)
9160         b) packRegsDPTRuse could be incorrect for left & right shift
9161
9162         * /sdcc/src/mcs51/ralloc.c:
9163         packRegsForSupport could mess up the live information (Fixed)
9164
9165         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
9166
9167         * /sdcc/src/SDCCast.c:
9168         can reverse a loop even if function call is present as long
9169         as the loop control variable is local & is not passed as parameter
9170
9171 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9172
9173         * /sdcc/ChangeLog: *** empty log message ***
9174
9175         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
9176         More builtin function additions for TININative
9177
9178         * /sdcc/src/ds390/ralloc.c:
9179         Had broken the regression testsuite
9180
9181         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
9182
9183         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
9184         Added funcattr hasStackParms will be set for reentrant functions when there
9185         are paramteres on the stack, this helps in minimizing frame pointer generation
9186         typeFromStr can handle function pointers now
9187
9188         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
9189         *** empty log message ***
9190
9191 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9192
9193         * /src/ds390/gen.c, /src/ds390/main.c:
9194         More builtin function additions for TININative
9195
9196         * /src/ds390/ralloc.c:
9197         Had broken the regression testsuite
9198
9199         * /src/SDCCast.c: Fixed a bug in dumptree
9200
9201         * /src/SDCCsymt.c, /src/SDCCsymt.h:
9202         Added funcattr hasStackParms will be set for reentrant functions when there
9203         are paramteres on the stack, this helps in minimizing frame pointer generation
9204         typeFromStr can handle function pointers now
9205
9206         * /doc/builtins.txt, /doc/TININative.txt:
9207         *** empty log message ***
9208
9209
9210 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
9211
9212         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
9213         ALPHA version for -mTININative
9214
9215         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
9216         updated to reflect changes in the port structure
9217
9218         * /src/port.h:
9219         added function do_assemble (similar to do_link) if non-null this function
9220         will be called to do assembly (-mTININative) requires a multi command
9221         assembly
9222         added function genAssemblerEnd will be called to generate assembler Epilogue
9223
9224         * /src/SDCCsymt.c:
9225         added _JavaNative to debug info printing
9226
9227         * /src/SDCCmain.c: added option --tini-libid
9228         added port->do_assemble function (-mTININative) has a multi command assemble
9229
9230         * /src/SDCCglue.c: Disabled "constExpr" check
9231         added port->genAssemblerEnd function
9232
9233         * /src/SDCCglobl.h: Added option --tini-libid value
9234
9235         * /src/SDCCast.h:
9236         tookout optimizeCompare from the header (has no external references)
9237
9238         * /src/SDCCast.c: made one more function "static"
9239
9240 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
9241
9242         * src/z80/mappings.i: Added z80asm support.
9243
9244         * src/z80/main.c: Added z80asm support on --asm=z80asm
9245
9246         * src/z80/gen.c: Fixed asm portability issues.
9247
9248         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
9249
9250         * src/SDCCglue.c (printExterns): Added global/extern split.
9251
9252 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
9253
9254         * support/regression/Makefile: added test for mcs51 model large
9255
9256         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
9257
9258         * support/regression/ports/gbz80/spec.mk: added -mgbz80
9259
9260 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
9261
9262         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
9263
9264 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
9265
9266         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
9267
9268         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
9269
9270 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
9271
9272         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
9273
9274         * support/regression/tests/simplefloat.c: Port to mcs51.
9275
9276 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
9277         * support/regression/tests/bug-485362.c: Added.
9278
9279         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
9280
9281         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
9282
9283         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
9284
9285         * src/z80/gen.c (aopDump): Added a dump function.
9286
9287 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
9288         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
9289
9290         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
9291
9292         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
9293
9294         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
9295
9296         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
9297
9298         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
9299
9300         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
9301
9302         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
9303
9304         * support/regression/ports/ds390/support.c: Use tinibios.
9305
9306         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
9307
9308 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
9309
9310         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
9311         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
9312
9313         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
9314
9315         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
9316
9317 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
9318
9319         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
9320
9321         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
9322         (packRegsForIYUse): Created and optimised.
9323
9324 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9325
9326         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
9327 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
9328
9329         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
9330
9331         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
9332
9333         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
9334
9335 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9336
9337         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
9338
9339         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
9340
9341 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9342
9343         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
9344
9345         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
9346
9347         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
9348
9349 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
9350
9351         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
9352         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
9353         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
9354
9355         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
9356
9357         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
9358         (genNotFloat): Added.
9359         (genUminusFloat): Added.
9360
9361         * device/lib/z80/Makefile: Added floating pt stubs.
9362
9363         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
9364
9365         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
9366
9367         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
9368
9369 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
9370
9371         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
9372
9373         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9374
9375         * sdcc/support/regression/Makefile: Add port ds390.
9376
9377         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9378
9379         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9380
9381         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9382
9383         * sdcc/support/regression/ports/ds390/support.c: Added.
9384
9385         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9386
9387         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9388
9389         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9390
9391 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9392
9393         * device/include/malloc.h: Added z80 and gbz80 support.
9394
9395         * device/lib/gbz80/heap.s: Added.
9396
9397         * device/lib/z80/heap.s: Added.
9398
9399         * device/lib/malloc.c: Added z80 and gbz80 support.
9400
9401         * support/regression/tests/malloc.c (testMalloc): Added.
9402
9403         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9404
9405         * support/regression/tests/bug-478094.c: Added.
9406
9407         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9408
9409 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9410
9411         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9412
9413         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9414
9415         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9416
9417         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9418
9419         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9420
9421 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9422
9423         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9424
9425 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9426
9427         * support/regression/tests/bug-477927.c: Added.
9428
9429         * src/z80/peeph.def: Added minor rules.
9430
9431         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9432
9433         * src/z80/peeph.def: Added jump optimisation modification.
9434
9435 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9436
9437         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9438
9439 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9440
9441         * support/regression/tests/funptrs.c: Added.
9442
9443 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9444
9445         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9446
9447 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9448
9449         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9450
9451         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9452
9453         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9454         (movLeft2ResultLong): Created.
9455
9456         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9457         (joinPushes): Added.  Joins two char pushes into a word push.
9458
9459 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9460
9461         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9462
9463         * support/makebin/Makefile (install): Added creation of dest dir.
9464
9465 2001-10-24 Karl Bongers <karl AT turbobit.com>
9466
9467         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9468
9469 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9470
9471         * src/z80/ralloc.c: Turned off faulty pack for one use.
9472
9473         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9474
9475         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9476
9477 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9478
9479         * support/regression/Makefile: Improved clean
9480
9481         * support/regression/ports/gbz80/spec.mk: Added clean
9482
9483         * support/regression/ports/host/spec.mk: Added clean
9484
9485         * support/regression/ports/z80/spec.mk: Added clean
9486
9487         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9488
9489         * support/regression/ports/mcs51/timeout.c: little improvements
9490
9491 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9492
9493         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9494
9495         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9496
9497         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9498
9499 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9500
9501         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9502
9503         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9504
9505 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9506         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9507
9508         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9509
9510         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9511
9512         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9513
9514         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9515
9516         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9517
9518         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9519
9520         * support/regression/tests/longor.c: Added.
9521
9522 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9523
9524         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9525
9526         * as/mcs51/aslink.h: define PATH_MAX
9527
9528         * as/mcs51/asm.h: define PATH_MAX
9529
9530         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9531
9532         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9533
9534         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9535
9536         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9537
9538         * src/SDCCglobl.h: define PATH_MAX
9539
9540         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9541
9542         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9543
9544 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9545
9546         * src/z80/gen.c (gencjneshort): Fixed
9547
9548         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9549
9550 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9551
9552         * support/regression/tests/bug-469671.c: Added.
9553
9554         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9555
9556 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9557
9558         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9559
9560         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9561
9562 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9563
9564         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9565
9566         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9567
9568         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9569
9570         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9571
9572         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9573
9574         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9575
9576         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9577
9578 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9579
9580         * 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.
9581
9582         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9583
9584         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9585
9586 2001-10-07    <johan AT FRIJA>
9587
9588         * device/lib/gets.c (gets): fixed the return value.
9589
9590 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9591         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9592
9593         * 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.
9594
9595         * 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.
9596
9597         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9598
9599         * src/pic/gen.c: Removed Safe_strdup.
9600
9601         * configure.in: Added option to enable libgc support.
9602
9603         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9604         (bitVectUnion): Optimised.
9605         (bitVectIntersect): Optimised.
9606         (bitVectBitsInCommon): Optimised.
9607         (bitVectCplAnd): Optimised.
9608
9609         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9610
9611 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9612
9613         * src/SDCCmain.c: distinguish between assembler debug and plain options
9614
9615         * src/avr/main.c:   remove standard assembler options
9616
9617         * src/ds390/main.c: remove standard assembler options
9618
9619         * src/mcs51/main.c: remove standard assembler options
9620
9621         * src/port.h: removed "PENDING" comment
9622
9623 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9624
9625         * src/device/lib/_mulint.c  : new, with assember functions
9626
9627         * src/device/lib/_mullong.c : new, with assember functions
9628
9629         * src/device/lib/_divuint.c : with assember functions
9630
9631         * src/device/lib/_divsint.c : with assember functions
9632
9633         * src/device/lib/_divulong.c: with assember functions
9634
9635         * src/device/lib/_divslong.c: with assember functions
9636
9637         * src/device/lib/_moduint.c : with assember functions
9638
9639         * src/device/lib/_modsint.c : with assember functions
9640
9641         * src/device/lib/_modulong.c: with assember functions
9642
9643         * src/device/lib/_modslong.c: with assember functions
9644
9645         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9646
9647         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9648
9649         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9650                                       replaced _mululong.c and _mulslong.c by _mullong.c
9651
9652 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9653
9654         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9655
9656 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9657
9658         * src/SDCCglue.c: test, if win32api is available for MINGW
9659
9660 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9661
9662         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9663         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9664         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9665         * support/regression/ports/host/spec.mk: removed GENERIC
9666         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9667         * support/regression/ports/z80/spec.mk: removed GENERIC
9668
9669 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9670
9671         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9672
9673         * support/regression/tests/bug-467035.c: Created.
9674
9675 2001-10-01    <johan AT FRIJA>
9676
9677         * src/SDCC.y: fixed bug #466586 part 1
9678
9679 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9680
9681         * SDCCicode.c: z80 has no generic pointers
9682         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9683
9684 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9685
9686         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9687
9688 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9689
9690         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9691
9692         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9693
9694 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9695
9696         * configure.in: Fixed up so that ucsim is only configured once.
9697
9698         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9699
9700         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9701         (getPathDifference): As above.
9702
9703         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9704
9705         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9706
9707 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9708         * .version: Updated to 2.3.1
9709
9710         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9711         Added copyright header.
9712
9713         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9714         (assemble): Added support for macro based assembler commands.
9715         (linkEdit): Added support for macro based linker commands.
9716         (preProcess): Changed the pre-processor to use macros.
9717         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9718         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9719
9720         * device/lib/z80/crt0.s: Added module name for debugging.
9721
9722 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9723
9724         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9725
9726         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9727
9728         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9729
9730         * src/Makefile.in: Added SDCCmacro and SDCCutil
9731
9732 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9733
9734         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9735
9736 2001-09-16    <johan AT FRIJA>
9737
9738         * 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.
9739
9740 2001-09-15    <johan AT FRIJA>
9741
9742         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9743         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9744
9745 2001-09-11    <johan AT FRIJA>
9746
9747         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9748
9749 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9750
9751         * support/regression/tests/bug-460444.c: Added test case.
9752
9753         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9754         (genCast): Added justification for all of the asserts.
9755
9756 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9757
9758         * support/regression/support.c: _xdata replaced by xdata
9759
9760         * support/regression/spec.mk: removed _generic
9761
9762 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9763
9764         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9765
9766         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9767         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9768
9769         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9770
9771         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9772
9773         * support/regression/tests/bug-460010.c: Added test case.
9774
9775         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9776
9777 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9778
9779         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9780
9781         * support/regression/testfwk.c: removed workaround for bug #436344
9782
9783         * support/regression/tests/bp.c: use less memory with mcs51
9784
9785         * support/regression/tests/bug-441448.c: use less memory
9786
9787         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9788
9789         * support/regression/collate-results.py: typo
9790
9791 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9792
9793         * support/regression/tests/fetchoverlap.c: Added new test case.
9794
9795         * support/regression/tests/bp.c: Added new test case.
9796
9797         * support/regression/tests/bug-448984.c: Added new test case.
9798
9799         * support/regression/tests/pow2shifts.c: Added new test case.
9800
9801         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9802         (genlshTwo): Fixed right shift for count > 8.
9803
9804         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9805
9806 2001-09-08    <johan AT FRIJA>
9807
9808         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9809
9810 2001-09-07    <johan AT FRIJA>
9811
9812         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9813
9814         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9815
9816 2001-09-06    <johan AT FRIJA>
9817
9818         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9819         * bernhard noted me at this: "() equals to (void)" (1.38)
9820
9821 2001-09-05    <johan AT FRIJA>
9822
9823         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9824
9825 2001-09-04    <johan AT FRIJA>
9826
9827         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9828
9829
9830 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9831
9832         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9833
9834 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9835
9836         * link/z80/aslink.h: Fixed path for PATH_MAX
9837
9838 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9839
9840         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9841
9842         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9843
9844         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9845
9846         * 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.
9847
9848 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9849
9850         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9851         (genCmp): Fixed up genCmp for the GB with longs.
9852
9853         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9854
9855         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9856
9857         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9858
9859         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9860
9861 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9862
9863         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9864
9865 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9866
9867         * 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.
9868
9869         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9870
9871 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9872
9873         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9874
9875         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9876
9877 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9878
9879   * sim/ucsim/configure:    little improvement of Cygwin-detection
9880   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9881   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9882   * support/regression/tests/bug-221100.c: small changes for mcs51
9883   * support/regression/tests/bug-221168.c: small changes for mcs51
9884   * support/regression/tests/bug-227710.c: small changes for mcs51
9885   * support/regression/tests/staticinit.c: small changes for mcs51
9886   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9887   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9888   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9889
9890 $Revision$